Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
junke
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
52 ms
·
511.
▲
by
junke
10y ago
Common Lisp (packages and symbols are first class). There are some gotchas at first but then they feel quite natural. You write your code in one place and manage visibility elsewhere. This allows for example to make a symbol exported in dif
512.
▲
by
junke
10y ago
> As a result, a lot of packages do The Simplest Thing That Could Possibly Work and just expose simple functions. The result is usually refreshingly clear. That's what I do too, but I don't change names. I use "export"
513.
▲
by
junke
10y ago
I didn't downvote either. I would have like to read a more convincing answer, but this always come down to "Rob Pike says so". I found an old thread about this btw: https://news.ycombinator.com/item?id=5201461
514.
▲
by
junke
10y ago
I don't get how "great" it is to let capitalization be used for exported identifiers. What is the rationale behind this?
515.
▲
by
junke
10y ago
This has nothing to do with the matter at hand. Explicitly ignoring errors is a feature that you sometimes need. The equivalent in Go would be to write: _ := db.Exec("DELTE FROM item WHERE id = 2") ... which could be writ
516.
▲
by
junke
10y ago
#3 (too easy to ignore errors) and #6 (hard code generation) do not seem to be either A or B.
517.
▲
Go Traps
(go-traps.appspot.com)
1 points
by
junke
10y ago
|
0 comments
518.
▲
by
junke
10y ago
Quite inspiring. That's how you beat an endless game.
519.
▲
by
junke
10y ago
Reduce can be parallelized when the reducing function is associative. You can split the input sequence into chunks that are reduced in parallel et merge the results with another sequential reduce. https://lparallel.org/predu
520.
▲
by
junke
10y ago
> What’s curious is that this is true in every language with general recursion/looping: Yes, thanks for pointing that out. > The type of “eval” can also be fully static; it can just return a type that you have to do case analysis
521.
▲
by
junke
10y ago
1 + eval(read_from_the_network()) > If we get an integer, that expression is fine; if we get a string, it's not. We can't know what we'll get until we actually run, so we can't statically analyze the type. &
522.
▲
by
junke
10y ago
Suppose you "go generate" code which ends up having something along the lines of: x := true var y = 0 if x { y = 10 } else { y = 20 } In that case dead code elimination might require a litt
523.
▲
by
junke
10y ago
So, Go is designed to be an engineering language and not an academic toy. Contrary to other languages, Go programmers "deliver" and have a pragmatic view of the real development world, not just their own commits. Go programme
524.
▲
by
junke
10y ago
Well, if you want a correct result with negative numbers, you have to implement the modulo operation, not remainder. The distance in the example can be negative, so can be the sum, but you want the resulting position to always be positive.
525.
▲
by
junke
10y ago
As stated by the site owner: IT'S OK TO BE CONFUSED https://www.mousereeve.com/
526.
▲
by
junke
10y ago
You can name your symbol as you want in Lisp, "(make-symbol s)" works for all string "s". With the reader, if you need to define symbols with spaces or otherwise not treated as symbols, or if you want to ensure the names
527.
▲
by
junke
10y ago
I can't reproduce it anymore. I had a bulleted list near the function definition and somehow as soon as I pressed backspace it went unresponsive until the browser's window crashed. I'll keep trying, but there must have been s
528.
▲
by
junke
10y ago
The first thing which comes to my mind is how the Javascript interpreter works, using a regex to replace the deepest s-expressions by their evaluations (both scary and brilliant)[0] I found the console[1] and started using it. I was trying
529.
▲
by
junke
10y ago
What did you do to the parentheses? they are all curly. I find the explanation at [0] a little more detailed and informative (8th European Lisp Symposium 2015). Worth checking out if you are interested. [0] http://epsilonwiki.fre
530.
▲
by
junke
10y ago
From [0] and [1], it seems that ConstraintJS does not try to solve constraints, it propagates changes among variables when they change. In particular, variables are not tied to domains. [0] https://github.com/soney/Cons
531.
▲
by
junke
10y ago
Honestly, what novelty factor?
532.
▲
Generational Garbage Collection, Write Barriers/Write Protection, Userfaultfd(2)
(medium.com)
2 points
by
junke
10y ago
|
0 comments
533.
▲
Labels in Go
(medium.com)
1 points
by
junke
10y ago
|
0 comments
534.
▲
by
junke
10y ago
That's true, because doing so in Lisp is undecidable and because you allow function definitions to change (that's why type checking works better with inline and local functions). The type of analysis applied to Lisp is adapted to
535.
▲
by
junke
10y ago
Do we really have evidence about Bachar's suicide?
536.
▲
by
junke
10y ago
From the about page: https://common-lisp.net/project/mcclim/main.html > McCLIM is a FOSS implementation of the Common Lisp Interface Manager specification, a powerful toolkit for writing GUIs in Common Lisp. It
537.
▲
by
junke
10y ago
A day like any other with Javascript ;-)
538.
▲
by
junke
10y ago
Well, maybe "reject" was too strong a word. The warnings that are emitted by SBCL (Lisp implementation) are produced when two types don't intersect at all , something like "len(3)". There is no warning when types o
539.
▲
by
junke
10y ago
> Let's throw something useful (duck typing) Not sure why you say this is throwing away duck typing, you just don't add a type hint and you continue working as usual. > I'm sincerely disgusted I can sympathize, most of
540.
▲
by
junke
10y ago
I don't know exactly for Python. I would expect mixin class to be used for this. Also, maybe Python will allow you to define union types: e.g. X is either a "foo", a "bar" or a "zot" (all of them duck type
More ›