mrweasel
a day ago
Is there something inherent to Lisp that allows it to be implemented in so little code?
I believe I saw someone demonstrate that almost nothing in a Lisp implementation was written as a "built-in" language feature that required the underlying interpreter to provide the functionality.
giancarlostoro
a day ago
I always think of this HN post every few years, as an aside, someone really needs to archive that page it links to because I wont be surprised when that site shuts down or deletes old content:
https://news.ycombinator.com/item?id=9699065
https://speakerdeck.com/nineties/creating-a-language-using-o...
krig
a day ago
This is super cool!
I could imagine writing a very basic forth or lisp compiler in assembler, but even that would be quite the project.
krig
a day ago
First off, you wouldn’t write an actual interpreter for lisp like this if you wanted to use it for anything serious, it’s very slow.
The parser is very simple thanks to the s-expressions, and the only builtin special forms really needed are quote, cond and lambda, that’s pretty much it. The only data structure is a list, so functions are just lists, function calls are lists etc.
rollcat
a day ago
Lisp (and similarly, Forth) is closer to a mathematical construct than an actual language. We've had to wrap it in parentheses and named symbols to help make sense of it, to talk about it. Pairs, atoms, GCs, are all an implementation detail.
baq
a day ago
see previous discussions at https://news.ycombinator.com/item?id=14727881
quoting the submission verbatim:
The original paper of LISP by John McCarthy http://www-formal.stanford.edu/jmc/recursive.html
Or the more accessible explanation by Paul Graham http://www.paulgraham.com/rootsoflisp.html