A Small Scheme VM, Compiler and REPL in 4K
summary
A Scheme system that compiles to a tiny bytecode and runs a REPL with an 850‑byte VM core and a full executable between 4–8 KB depending on chosen runtime library. Implementations in C, JavaScript, Python and Scheme demonstrate portability, C uses a custom stop‑and‑copy GC and tagged integers, and the compiler includes an incremental compiler and dead‑code linking so unreferenced runtime features aren’t bundled. Supports tail calls, first‑class closures, and benchmarks roughly match small Scheme implementations.
AI-written summary · about
chapters (13)
- 0:00Introduction
- 1:18Implementations
- 2:49Virtual Machine
- 4:50How it works
- 6:37Why Scheme
- 7:13Runtime Libraries
- 8:02Ribbit
- 9:43Program Source
- 10:52Garbage Collection
- 11:28Primitives
- 12:00Example
- 13:08Performance
- 14:53Conclusion
related talks
48mOne VM To Rule Them All
44mImplementing Software Machines in Go and C
44mBuild Your Own VM with JIT Compilation for Dummies
37mStanding on the Shoulders of Giants
40mJoy of Meta-Tracing Just-in-Time Compilation: More Than Just a VM Generator
54mWhat Lies Beneath
09mCompilers for nothing, executables for free!
44mSnek: A Python-Inspired Language for Tiny Embedded Computers
