fwiw I think C isn't a bad source language to make a toy tiny lisp. not because any of the things the author says aren't true, but part of the lesson (or joy) here is building semantic towers. there is a kind of mystery around HLLs, where things like memory management and function application are really magical. writing a lisp is Haskell isn't pointless, but at the same time you're kind of just decorating the cake instead of baking it. doing this in C lets you know that you can build heavyweight abstractions from effectively nothing.
but the right approach is probably to abuse C to make it take the shape of a lisp rather than build out a whole C-like intermediate to bridge the gap. and it should be less than 1k lines unless you're actually trying to build something useful.
It’s possible my interpretation wasn’t correct and the author was citing Kernel’s approach as sanity. That would make sense technically.
I don't remember whether that was before or after I started absent-mindedly writing yet a different Lisp in C while hanging around RMS. He looked over my shoulder and asked what I was doing. I said writing a Lisp. He asked why I was doing that and I said everybody ought to write a Lisp. He thought about that for a few seconds, said "you should write it in assembler", and walked away.
The "Don't build your own Lisp" article seems reasonable to me and the book it negatively reviews ("Build your own Lisp", I guess) does sound bad.
It requires faith and intuition. Faith is required to believe that if the stars align, and every incantation is correctly performed for this magical machine, the right thing will really happen. And intuition is required to work out what has gone wrong, and how to fix things when they don’t go as planned.
Unfortunately these can’t be taught directly…
> Testing is generally preferable to faith, and testing needn’t be difficult with computers.Sounds like the sqlite development method. Faith and tests. No architectural planning, and lots of desastrous FTS attempts.
[0] https://github.com/kanaka/mal [1] https://norvig.com/lispy.html [2] https://norvig.com/lispy2.html [3] https://khamidou.com/compilers/lisp.py