finds.dev← search

// the find

rui314/minilisp

★ 1,563 · C · updated Feb 2024

A readable lisp in less than 1k lines of C

A ~1000-line Lisp interpreter in C, written as a weekend project to show that a real interpreter (closures, macros, GC) fits in a small, readable codebase. It's for people who want to understand how an interpreter actually works, not for anyone who needs a Lisp to build something with.

The nogc branch is a genuinely good teaching trick — you read the interpreter without GC first, then diff in the copying collector separately instead of untangling both at once. The macro system includes gensym for hygienic-ish expansion and a working `macroexpand` for debugging, which a lot of toy Lisps skip. It ships an actual test suite (`make test`), not just a README full of REPL transcripts.

No tail-call optimization at all — the README admits a loop written as recursion blows the stack, so you're stuck with the single `while` form for anything iterative. There's no string type; symbols get reused as a substitute, which is a real limitation past toy examples. Only integers, no floats or bignums, and portability is hand-waved as 'should work on other Unix-like systems' with no CI to back that claim. Last pushed in early 2024 and was never meant to grow past the demo — there's no package system, no I/O beyond `println`, and no path from this to a usable language.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →