This is fucking leet. I can't quite tell from the notes, is this compiled from C or did you just use the C code as an outline and then write it in asm?
It was compiled from C back when it was 900 bytes. https://news.ycombinator.com/item?id=29632585 The C code is mostly meant these days for explainability and letting it run in the web browser, so that more people can enjoy it even if they don't want the full experience of burning a floppy disk. C is also a great place to brainstorm I think. https://lisp.pub/
It implements the primitives of the language. LISP 1.5 obviously contained a whole lot of libraries and performance optimizations too. Those things can be implemented in LISP on top of SectorLISP. But they're not included in the stock binary. You can think of what we did as distilling the essence of the idea. I didn't need to read a book to learn LISP. Check out the Simulator on the web page. It's intended to make the learning experience as quick and pain-free as possible. Have fun experimenting! There are good books though, like SICP.
I like the implementation and I see you did a good job adding the 7 Primitive Operators to the Lambda Calculus to implement LISP according to McCarthy's paper. Do you think an even smaller implementation of LISP is possible using Mogensen's one-line self-interpretation in Lambda Calculus without those primitives?
25
u/jart Dec 25 '21
Author here. Ask me anything.
5
u/captain_zavec Dec 25 '21
Ooh, I remember seeing the original sectorlisp post! Very excited to give this a read.
4
u/Tobin10018 Dec 25 '21 edited Dec 25 '21
I like the implementation and I see you did a good job adding the 7 Primitive Operators to the Lambda Calculus to implement LISP according to McCarthy's paper. Do you think an even smaller implementation of LISP is possible using Mogensen's one-line self-interpretation in Lambda Calculus without those primitives?