Jolt: Clojure compiler implemented with Chez Scheme

Hacker News Top Tools

Summary

Jolt is a self-hosted Clojure implementation that compiles to Scheme (Chez natively, Gambit for JavaScript), offering standalone binaries, real concurrency, and full Clojure semantics without the JVM.

No content available
Original Article
View Cached Full Text

Cached at: 08/12/26, 08:26 AM

# Jolt — Clojure on Scheme Source: [http://jolt-lang.net/](http://jolt-lang.net/) Jolt is a self\-hosted Clojure implementation that runs on Scheme — Chez natively, Gambit for JavaScript\. No JVM, no build step — most portable Clojure runs unchanged\. - The compiler is written in Clojure and compiles itself - Persistent data, lazy seqs, transducers, multimethods, protocols — full Clojure semantics - Real concurrency:`future`,`agent`,`pmap`, and`core\.async`on OS threads - `jolt build`emits a single standalone binary — no Scheme or JVM needed to run it The terminal on the right is jolt itself — compiled to JavaScript by the[Gambit backend](http://jolt-lang.net/docs/scheme-backends.html)— evaluating live in your browser\. It runs a[reduced build](http://jolt-lang.net/docs/scheme-backends.html#choosing_how_much_of_the_language_to_build)to keep the download small, so regex is left out here and says so if you reach for it\. jolt via Gambit → JSrepl user=\> \(\-\>\> \(range 10\) \(filter even?\) \(map \#\(\* % %\)\) \(reduce \+\)\) 120 ## Why Jolt? #### Self\-Hosted Compiler Reads Clojure, analyzes it to a host\-neutral IR, emits Scheme, and runs it — on Chez natively, or on Gambit compiled to JavaScript\. The compiler is written in Clojure and compiles itself\. #### Standalone Binaries `jolt build`ahead\-of\-time compiles a project — runtime, standard library, app, and its deps — into a single self\-contained executable\. No Chez, no JVM, no source needed to run it\. #### Real Concurrency `future`/`promise`/`agent`/`pmap`run on OS threads over a shared heap, matching JVM semantics\.`core\.async`provides channels and`go`blocks\. #### Full Numeric Tower Exact integers and bignums, exact ratios \(`\(/ 1 2\)`⇒`1/2`\), and flonum doubles\.`=`is category\-aware;`==`is value\-equality\. #### Persistent Data Immutable vectors \(32\-way tries\), cons lists, and HAMT maps/sets with Clojure value semantics\. Transients are real mutable scratch collections\. #### Clojure\-Compatible Lazy/infinite seqs, transducers, destructuring, multimethods, protocols/records, metadata, namespaces, runtime`eval`, and the full reader\. ## Quick Start Install the self\-contained`jolt`binary — it bundles the runtime, compiler, and standard library, so there's nothing else to install\. ``` # Homebrew brew install jolt-lang/jolt/jolt # or the install script (Linux / macOS) curl -sL https://raw.githubusercontent.com/jolt-lang/jolt/main/install | bash jolt -e '(+ 1 2)' # => 3 ``` Or run from a clone \(needs[Chez Scheme](https://cisco.github.io/ChezScheme/)\) — no build step, the bootstrap seed is checked in: ``` git clone --recurse-submodules https://github.com/jolt-lang/jolt.git cd jolt bin/jolt -e '(+ 1 2)' # => 3 ``` ## Usage ### Evaluate an expression ``` $ bin/jolt -e '(->> (range 10) (filter even?) (map (fn [x] (* x x))) (reduce +))' # 120 $ bin/jolt -e '(/ 1 2)' # 1/2 ``` ### Run a project ``` bin/jolt run -m myapp.core # resolve deps.edn, then run -main bin/jolt -M:test [args] # run an alias's :main-opts bin/jolt path # print the resolved source roots ``` ### Compile a standalone binary ``` bin/jolt build -m myapp.core -o myapp # single self-contained executable ./myapp arg1 arg2 # runs anywhere; args reach -main # --opt for the optimized build, --dev for an unoptimized one ``` ### nREPL ``` bin/jolt --nrepl-server # auto-resolves deps.edn, writes .nrepl-port # connect CIDER / Calva / Cursive via the .nrepl-port file, then # redefine a var and the next call sees it — no restart ``` Develop against a live process: see[REPL\-Driven Development](http://jolt-lang.net/docs/repl-driven-development.html)\. Read the[documentation](http://jolt-lang.net/docs/getting-started.html)for installation, writing libraries, and host interop\. ## Differences from Clojure Jolt targets Clojure semantics but runs on Scheme, not the JVM\. Most portable Clojure runs unchanged — persistent collections, the numeric tower, lazy seqs, transducers, multimethods, protocols/records, atoms,`future`/`agent`/`pmap`,`core\.async`, runtime`eval`, and the full reader all behave as on the JVM\. The genuine divergences: AspectDifferenceJava interopNo JVM, so no general Java interop, reflection, or`gen\-class`/`proxy`— a shimmed subset of`java\.\*`is available, plus a C[FFI](http://jolt-lang.net/docs/native-interop.html)BigDecimalNot available \(`decimal?`is always false\); the rest of the numeric tower matchesRegexCompiled by[irregex](https://github.com/ashinn/irregex), not`java\.util\.regex`— common patterns work, some Java\-specific features differ

Similar Articles

Jolt: running Clojure on Chez Scheme

Lobsters Hottest

Jolt is a new Clojure implementation targeting Chez Scheme, aiming to provide a drop-in replacement with fast startup and low memory footprint, leveraging Chez's JIT and GC to avoid the JVM's overhead.

Program images and portable Scheme backends for Jolt

Lobsters Hottest

Jolt, a Lisp/Scheme language, recently added two features: program images in the style of Common Lisp and Smalltalk for full-state serialization and debugging, and a portable Scheme backend decoupled from the Chez runtime for architecture-agnostic portability.

raylib examples in Jolt

Lobsters Hottest

75 raylib examples implemented in Jolt, a native Clojure on Chez Scheme, demonstrating efficient FFI bindings for raylib's C API without a JVM.

Clojure Hosted on Go

Hacker News Top

Glojure is an open-source Go-hosted interpreter for the Clojure language, providing seamless access to Go libraries and allowing embedding within Go applications. It is in early development but used in hobby projects.