6/26/2026 at 6:31:57 PM
Hacker News always likes lisp stuff, and even though this is a very simple compiler I had a lot of fun writing it.I started writing a different compiler, but tied myself in knots with the type-encoding, and lack of clear plan. I figured I'd step back and try a lisp, because there's a known syntax, and it is minimal.
The end result supports lists, integers, strings, characters, lambdas (with closures), and a reasonable standard library - big enough to hack up a small brainfuck interpreter along with the standard fibonacci, factorial, and fizzbuzz toy programs.
So it's a toy, but it's my toy, and maybe interesting to some!
by stevekemp
6/27/2026 at 2:55:16 AM
I started working on a Lisp interpreter in Python a few days ago so its really nice to see your implementation.If you're interested here's my repo: https://github.com/lodenrogue/hith
Its very early stages and missing a lot of key features but its been a lot of fun figuring stuff out. Will definitely study your source code to learn more.
by phyzix5761
6/27/2026 at 7:22:46 AM
That's really nice. Even with your limitations you have things I don't, for example quoting and booleans.There's a part of me that thinks your comparisons should return "Nil" on failure rather than "False", but it also seems logical to do it your way too!
I hope you stick with it :)
by stevekemp
6/27/2026 at 9:01:08 AM
Yeah, thats a good observation. I wanted to keep the Python types like True, False, and None since its built for Python. That made more sense to me so that users could easily embed it into their Python scripts.by phyzix5761