Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
junke
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
22 ms
·
181.
▲
by
junke
9y ago
"the first argument" => "the second argument"
182.
▲
by
junke
9y ago
Let's try to look at it in isolation. "parse-el" is used as a function, which takes one argument, the first argument when invoked from reduce (the accumulator), which is first [] then another vector (because of conj). So &quo
183.
▲
by
junke
9y ago
> Edit: prove it otherwise. Make wild claims, then expect others to do the hard work.
184.
▲
by
junke
9y ago
I am not sure capturing variables by reference implements the expected behavior; what would the equivalent C++ code return for this Go example? func a() { i := 0 defer fmt.Println(i) i++ return }
185.
▲
by
junke
9y ago
Maybe burgled-batteries, which relies on CPython ( https://github.com/pinterface/burgled-batteries ).
186.
▲
by
junke
9y ago
I don't even have to click, I remember it after all those years. Something unique in many aspects. Beware.
187.
▲
by
junke
9y ago
https://xkcd.com/1831/
188.
▲
by
junke
9y ago
Or try to put circular references. A1: 0 A2: =A1+5 A1: =A2*3 If you click on other cells, the values keep increasing. Otherwise, it eventually gives NaN. If you change the steps and first initialize A2, then it converges to
189.
▲
by
junke
9y ago
What do you mean?
190.
▲
by
junke
9y ago
For all the things that are not aligned vertically in strictly consecutive lines. Suppose you wrote some silly code like this: (cond ((eq x :one) ...) ((eq x :two) ...) ((eq x :three)
191.
▲
by
junke
9y ago
This has nothing to do with PHP, but saying "don't" can be a positive thing too, and a change for the better.
192.
▲
by
junke
9y ago
This seems to be relevant ;-) https://www.snellman.net/blog/archive/2017-09-04-lisp-number...
193.
▲
by
junke
9y ago
Yes, SBCL, where declarations are treated as assertions (before you reach it, you must prove it or test it, after the declaration you can assume it). No, (∀a. a → a) is not easily expressible (unless you write your own DSL).
194.
▲
by
junke
9y ago
> the function will be run. You can't be sure, that's just what one compiler does today. Static analysis tools tend to refer to the standard. $ tis-analyzer foo.c -val /tmp/foo.c:16:[kernel] warning: Functi
195.
▲
by
junke
9y ago
"when given an integer, this function always returns an integer" (defun foo (x) (declare (integer x)) (round (/ x))) (describe #'foo) Derived type: (function (integer) (values integer rati
196.
▲
by
junke
9y ago
Let's try the Zen/taoist analogy. At the end of the day, a Zen master tells his student: "your next lesson will start at 5am tomorrow, don't be late"; the student says: "what will happen if I am late?". Th
197.
▲
by
junke
9y ago
> ...the cost is that they don’t allow it. Saying they don't allow it is too strong (they allow it, but it might be harder).
198.
▲
by
junke
9y ago
> On the hyperspec's definition, an array cell is not a variable, but it seems very unlikely that this is what the author of the paper intended. It's much more likely that what the author intended by "variable" the CL
199.
▲
by
junke
9y ago
Yes, everything can be a type error (security, memory management, concurrency (deadlocks), ...). You define properties about the code and you can check them either at runtime, or statically. If I choose to write in OCaml, the memory managem
200.
▲
by
junke
9y ago
The hyperspec has a definition of what is a variable in the different namespaces. Also, for type declarations: "Affects only variable bindings and specifies that the vars take on values only of the specified typespec"
201.
▲
by
junke
9y ago
I know, the parent post was saying "you could just store your modified state to new variables", not replace what existing variables are bound to.
202.
▲
by
junke
9y ago
> in Lisp all expressions evaluate to something Minor nitpick, but note that if you define: (defun foo () (values)) Then (foo) does not return a value and accordingly, the REPL prints nothing. But in a context where you need a
203.
▲
by
junke
9y ago
In a live-coding session, how does the existing, running code knows that it should look at the new variables instead of the old ones?
204.
▲
by
junke
9y ago
> I'd also like to be able to specify my own braces to construct my own type as a shorthand, that'd be great DSL That's the purpose of readtables in Common Lisp, defining custom readers for converting external representati
205.
▲
by
junke
9y ago
Some languages have immutable bindings too, where you only shadow previous bindings.
206.
▲
by
junke
9y ago
If you write a custom _repr_html_, you are likely to assemble subparts by recursively calling _repr_html_ on sub-elements (thanks to open recursion). If you have an object B which inherits from A, you can specialize on B, or use the existin
207.
▲
by
junke
9y ago
It is a subtyping relationship. Bash's command line is a (minimalistic) REPL, but not all REPL are like Bash's command line. In most contexts, talking about REPLs is implicitly talking about REPLs that do more than just read, eval
208.
▲
by
junke
9y ago
This is the kind of use cases where multiple dispatch is useful.
209.
▲
by
junke
9y ago
Not all programming errors lead to incorrect programs (correctness being defined by the language). You shouldn't call sqrt(-1) in C, and if you do, you abort. But maybe you are not supposed to call sqrt(20) either, because 20 is a sign
210.
▲
by
junke
9y ago
Yes, if you break the contract, better abort. But throwing errors can be part of the contract, even for some programming errors. Failure tolerance, resilience etc.
More ›