3 ms·
This person wrote a lisp in 1K lines of C (not bytes :)), the cool thing is that also includes a copying garbage collector. https://github.com/rui314/minilisp
by andrewchambers 12y ago
This person wrote a lisp in 1K lines of C (not bytes :)), the cool thing is that also includes a copying garbage collector.
https://github.com/rui314/minilisp https://github.com/rui314/minilisp
- rrmm 12y agoIMO, the garbage collection (along with optimization) is the most interesting part of implementing a lisp.
- mrottenkolber 12y agoI wrote a minimal Lisp compiler (targeting C) when I was a bit younger. :> My GC was just a really bad reference counting implementation though. I dare you to make fun of my "hash function". Hehe. https://github.com/eugeneia/microlisp https://github.com/eugeneia/microlisp
- rrmm 12y agoYour hash function is fast! So it's got that going for it.
- PhantomGremlin 12y agoI had to go look. Not hard to find. I'll just say this, back in the prehistoric 1970s, a '%' operation was eschewed, because it wasn't fast (relatively speaking)!!! It often was used anyway, because it's very effective considering its simplicity.