finds.dev

robpike/lisp

Toy Lisp 1.5 interpreter

View on GitHub

★ 993GoBSD-3-Clauseupdated Nov 2024

// the take

A Go implementation of the Lisp 1.5 interpreter from McCarthy's 1962 manual, written by Rob Pike as a personal exercise in translating page 13 of that book into working code. This is explicitly a toy — no mutation, no I/O beyond interactive REPL, no PROG. For anyone wanting to understand what Lisp actually was before Common Lisp and Scheme existed.

The Go source is small and clean enough to read in an afternoon — the entire eval/apply core is transparent; big.Int arithmetic is a nice touch that lets you run `(fac 100)` without overflow surprises; lexical scoping is a deliberate and honest deviation from the original dynamic scoping, acknowledged upfront; the example session in the README is a genuine tutorial, not a hello-world.

No SET or SETQ means you cannot write stateful programs at all, which rules out most real exercises beyond pure recursion; no PROG means no sequential evaluation, so translating classic Lisp textbook examples often fails; identifiers must be alphanumeric so standard Lisp idioms using `+`, `-`, `*` don't work and muscle memory fights you constantly; with ~1000 stars and Pike's name attached, people will stumble in expecting something teachable at scale — the disclaimer is clear but the gap between expectation and reality is wide.

We read the README, the directory tree and a key source file in July 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
993
Forks
52
Language
Go
License
BSD-3-Clause
Last commit
17 Nov 2024

// nearby

If lisp isn't quite it.

All repos →