Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
junke
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
42 ms
·
331.
▲
by
junke
10y ago
Note that you are using lists, not arrays. Lists admit a simple recursive definition at the type level, which helps writing recursive code. But if you had to use arrays, how would you do?
332.
▲
by
junke
10y ago
The abstraction then becomes indistinguishable from a language feature, and you have come back full-circle to where you started. You call "random" without managing the state explicitly, except when you need to. http://c
333.
▲
by
junke
10y ago
I couldn't find either. Only the github page https://github.com/nineties/amber
334.
▲
by
junke
10y ago
See also this presentation: Creating a language using only assembly language ( https://speakerdeck.com/nineties/creating-a-language-using-o... ).
335.
▲
by
junke
10y ago
Is Erlang Object-Oriented? https://www.infoq.com/interviews/johnson-armstrong-oop Then, my thesis supervisor said "But you're wrong, Erlang is extremely object oriented". He said object oriented languag
336.
▲
by
junke
10y ago
Thanks for your comment.
337.
▲
by
junke
10y ago
> > And how can I believe you? this is just too late. > Huh? See it from my point of view: for all I know, you could as well have made an error, then pretended you were not really writing in CL but a nebulous Lisp; hours laters, a
338.
▲
by
junke
10y ago
Like, say, Prolog? A = [a | A] Prolog implementations provide destructive operations and mutation, but here above this is done with unification only. Arguably, you could say that unification performs mutation (but only once).
339.
▲
by
junke
10y ago
> My example wasn't meant to be in Common Lisp, just a nebulous "Lisp" dialect. And how can I believe you? this is just too late. > I'm just trying to clear up some confusion [...] You were spreading confusion by u
340.
▲
by
junke
10y ago
Really, an ERROR? Could you show the actual message that was printed? You can't, because you did not even bother to try. Here is an actual test: (defun square (x) (* x x)) (defmacro hypotenuse (x y) `(sqrt (+ (sq
341.
▲
Modern garbage collection
(medium.com)
434 points
by
junke
10y ago
|
243 comments
342.
▲
by
junke
10y ago
Yes, sure (defvar *chip*) (defun memory (&optional (chip *chip*)) (chip-memory chip)) Just binding the variable is enough. If you want to hide this variable as an implementation detail, you can use a macro: (de
343.
▲
by
junke
10y ago
> You're joking, right? It's not a trivial matter. It is a matter of context. There is a whole blog post full of hard work and you comment about an unhygienic macro. Author said: This is nice and readable. Some folks will disl
344.
▲
by
junke
10y ago
> I guess it's just another example of the usual difference in software design between CL and Scheme programmers. You mean, nitpicking about trivialities ;-) ?
345.
▲
by
junke
10y ago
I seem to recall that it wasn't always the case.
346.
▲
by
junke
10y ago
Yes, the book is great. The movie had other good things, like PVS/Lisp code in a spaceship ;-) http://scifi.stackexchange.com/questions/115255/what-program... https://www.reddit.com/r/lis
347.
▲
by
junke
10y ago
From "REALLY REMOTE Debugging: A Conversation with Glenn Reeves" (2010) [0]: We did see the problem before landing, but could not get it to repeat when we tried to track it down. It was not forgotten nor was it deemed unimportant
348.
▲
by
junke
10y ago
This is precisely what functional programming does. Purely functional abstractions are just that, abstractions.
349.
▲
by
junke
10y ago
Yes, sorry, Common was implied (not claiming it should always be, but here I wrote it without thinking about others). Scheme's unspecified results are annoying indeed.
350.
▲
by
junke
10y ago
In Lisp, "def..." macros, like defclass, defun, etc. return the symbol to which is bound the definition. Not essential, but useful at times. I tend to find Lisp is full of details like this.
351.
▲
by
junke
10y ago
In SBCL, type declarations are treated as assertions. If the compiler is sure the assertion is valid without doing runtime checks, it can remove them. The optimization levels are also taken into account ( http://www.sbcl.org/
352.
▲
A Full Analysis of the 2015 GCHQ Crypto Puzzle
(chriskohlhepp.wordpress.com)
3 points
by
junke
10y ago
|
0 comments
353.
▲
by
junke
10y ago
You compute baz in both branches, you can refactor. x = baz(if (something) foo() else bar())
354.
▲
by
junke
10y ago
Which is ... great? what is your point?
355.
▲
by
junke
10y ago
I agree that counting from zero has nice properties. But I must concede that e.g. in music, the surrogate for zero is the "first" beat. You are basically counting when intervals of time start, not when they end. The first second e
356.
▲
by
junke
10y ago
arr.indexOf("thing") > -1 ... this one is hardly related to zero-indexing. If indexOf returned 0, this would be equally inelegant.
357.
▲
by
junke
10y ago
Zach, do you remember one-panel comics? Signed: your hand.
358.
▲
by
junke
10y ago
But is it really? Couldn't there be a way to isolate things at the system level?
359.
▲
Dependency Injection in a nutshell
(appliedgo.net)
1 points
by
junke
10y ago
|
0 comments
360.
▲
by
junke
10y ago
Or you could have a single address space ( https://en.wikipedia.org/wiki/Single_address_space_operating... ), and share objects directly.
More ›