3 ms·
> In particular, when you're done, make a list of all the primitives you needed to employ in order to do it. There's a deep insight at the end of this process.
by munificent 15y ago
> In particular, when you're done, make a list of all the primitives you needed to employ in order to do it. There's a deep insight at the end of this process. (No, I'm not going to tell you what it is.)
Having done this before (https://github.com/munificent/lark https://github.com/munificent/lark), all it meant for me was that numbers and basic integer arithmetic became primitive. The clever bit about McCarthy's original metacircular interpreter is that it didn't need any types at all beyond atoms and cons cells: no bools, no ints, no nothing.
I found it interesting, but I don't know if I reached any deep insight. Maybe that's just me, or maybe I missed something.
- lisper 15y agoI suppose depth is in the eye of the beholder. That's pretty much it: to build a Lisp out of vectors you need numbers as primitives. To build a Lisp out of cons cells you don't. Follow-up exercise: do you need numbers to build a Lisp out of associative arrays? (Hint: this is not a trivial question to answer.)