Posts tagged #lisp
-
Fusing a risp pipeline to beat CPython: killing 400,000 allocations wasn't enough
In risp, a zero-dependency Rust Lisp, fusing map/filter/fold cuts 400,000 allocations to O(1) — but only a monomorphized i64 loop beats CPython: 4 ms vs 24 ms.
-
Hardening risp's HTTP stack: TLS behind a flag, try/catch as a 30-line builtin
How risp, a zero-dependency Rust Lisp, gained production HTTP: TLS behind a Cargo flag, try/catch as a 30-line builtin, and a quadratic read loop made linear.
-
An HTTP/1.1 client and server in risp, a zero-dependency Lisp in Rust
risp — a zero-dependency Lisp in Rust, not the 2019 tutorial — gains a full HTTP/1.1 client and server written almost entirely in Lisp, with zero external crates.
-
Learn Rust by reading risp, a real Lisp interpreter (not another toy project)
risp, a zero-dependency Rust Lisp, ships a learn/ directory: file-by-file order (error.rs to eval.rs) and 19 lessons, each pinned to a real file and line.
-
Why risp's standard library is written in risp, not Rust
A deep dive into the native/Lisp boundary in risp — a flat table of std-only builtins, an int-preserving numeric tower, and why map/filter/fold are defined in a risp prelude rather than in Rust: a native higher-order builtin would re-enter the evaluator on the host stack and could overflow.
-
Lexical scope in a Rust Lisp: environments, closures, and a two-path drop
A deep dive into risp's scope model — an Rc<RefCell<Environment>> chain, iterative lookup and set!, closures that capture frames by reference, and a fast/slow Drop that frees a million-deep scope chain without recursing or allocating on the hot path.
-
Writing a Lisp reader in Rust: from text to a Value tree
A deep dive into risp's reader — a Lisp-agnostic tokenizer, an iterative explicit-stack parser that can't overflow on deep nesting, reader-macro desugaring, dotted-pair handling, and an atom classifier that declines ambiguous numbers instead of guessing.
-
Building a Lisp interpreter in Rust with Claude Code
How I built risp — a zero-dependency Lisp in Rust with a tree-walker, a bytecode VM, and a Cranelift JIT — pairing with Claude Code, and the differential-testing discipline that keeps AI-written systems code honest.
-
Designing a Lisp interpreter in Rust with no stack overflows
A deep dive into risp's iterative core — the Value enum, a hand-written iterative Drop, and an explicit-stack CEK evaluator that read, print, compare, free, and evaluate a million-deep structure without overflowing the Rust stack.
-
Macros and quasiquote: code that writes code in risp
A deep dive into risp's macro system in Rust — how defmacro, demand-driven expansion, the quasiquote engine, and gensym let a Lisp grow control structures like while and unless that no function can express.