How Clojure Works: Understanding the Clojure Runtime
summary
Explains that Clojure’s REPL magic comes from mutable vars vs dynamic vars and that the implementation pays for it: namespace bootstrap produces thousands of class constants, startup is about 30–35x slower than a comparable Java hello world, and a stock runtime generates over 100,000 getRawRoot calls during load. Shows failed approaches (ProGuard fails because of indirection), describes successful lazy-loading from Clojure-Objective-C, and proposes a static/hybrid runtime that compiles functions to static fields to eliminate var indirection.
AI-written summary · about
chapters (30)
- 0:00Remember this?
- 2:28Dynamic development
- 2:48Arthur C. Clarke
- 5:21What's the difference?
- 5:45Fun at the REPL
- 7:13Static vs. dynamic Vars
- 8:22'Hello, World!', decompiled
- 8:59The runtime cost of Vars
- 11:02Namespace mappings
- 11:19Namespaces REPL
- 12:13Creating mappings
- 14:28How you really do it
- 15:17Global namespace map
- 15:48Namespace initialisation
- 15:59A simple program
- 16:35What's going on?
- 17:15Clojure 1.5.1 startup
- 17:37Four key problem areas
- 18:56Heap use
- 19:54Indirect invocation
- 20:25Potential solution #1
- 22:16Potential solution #2
- 23:28Potential solution #3
- 23:48'Hello, World!', static edition
- 24:28Static runtime
- 25:22Long term plans
- 26:11DynamicClassLoader demo
- 27:18Multimethod demo
- 28:00Other runtime features
- 28:53Concluding remarks








