An optimized fork of Joker (Clojure-like Lisp interpreter) for inclusion in gi, a self-hosted coding agent. Five execution tiers — native integer codegen, WASM native via wazero JIT, typed IR with zero-boxing, boxed IR for collections, and tree-walker for full Clojure semantics — selected automatically per expression. Mandelbrot runs ~4200× faster than upstream; fib(35) in 0.5s via native codegen.
The compiler analyses each expression and emits to the fastest viable tier: pure-integer recursive functions compile to native Go closures (53× faster, zero boxing), pure numeric loops compile to WASM bytecode executed by wazero's JIT (~0.2ms), primitive/string/cursor loops use a typed IR stack with zero boxing (~2–8ms), collection-heavy code uses a boxed IR interpreter (~10–40ms), and everything else falls through to the tree-walker for full macro/special-form/I/O support.
Pure-integer recursive defn bodies compile to fixed-arity native Go closures. fib(35) in 0.5s (53× faster).
Pure integer/float loops compile to native code via wazero. ~0.2ms for Mandelbrot.
Primitive, string, and cursor loops on an irValue stack — no interface{} boxing overhead.
O(1) append/assoc for builder patterns — auto-promoted from persistent collections.
Ring-style HTTP server with WebSocket and SSE/streaming extensions. Bottle-style router with path params, middleware, and CORS.
Protocols, records, hierarchies, tagged literals, sorted collections, atom watchers, chunked seqs, unchecked arithmetic.
joker.imaging (image processing), joker.svg (SVG + raster), joker.pdf (PDF), joker.random, joker.log, joker.http, joker.http.router.
disassemble, analyze, wasm-diagnostic, escape-analysis, profile, benchmark, mem-stats, gc — all from Joker scripts.
Mathematica-style EDN notebooks with Observable-style dependency metadata. Local browser UI (CodeMirror + ECharts + Mermaid, no CDN), headless execution, Markdown export, and self-contained inline outputs for agent/debug reports.