Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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



I 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


Your hash function is fast! So it's got that going for it.


I 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.


IMO, the garbage collection (along with optimization) is the most interesting part of implementing a lisp.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: