Lisp Interpreter in 99 Lines of C

2025-08-17
Lisp Interpreter in 99 Lines of C

This article presents Tinylisp, a Lisp interpreter implemented in a mere 99 lines of C code. Leveraging NaN boxing and clever C programming techniques, it boasts 21 built-in Lisp primitives, simple garbage collection, and a REPL. The author details its design, implementation, and extension possibilities, even providing examples of running it on a vintage Sharp PC-G850 pocket computer. Tinylisp's concise code is readily understandable and extensible, making it an excellent learning resource for both Lisp and C.

Development