HN
Today

Jolt: Clojure compiler implemented with Chez Scheme

Jolt is an innovative self-hosted Clojure implementation that breaks free from the JVM, compiling to Scheme for native execution via Chez Scheme or JavaScript via Gambit. This allows Clojure applications to be deployed as standalone binaries or in the browser with full Clojure semantics and real concurrency. Its promise of 'no JVM, no build step' and enhanced portability makes it a compelling exploration for developers seeking efficient, alternative Clojure runtimes.

17
Score
2
Comments
#6
Highest Rank
20h
on Front Page
First Seen
Aug 11, 4:00 PM
Last Seen
Aug 12, 11:00 AM
Rank Over Time
1069911101115172019212122222226253028

The Lowdown

Jolt presents a groundbreaking approach to running Clojure code, moving away from its traditional JVM dependency. It acts as a self-hosted compiler, written in Clojure itself, that translates Clojure into Scheme, which can then run natively with Chez Scheme or be compiled to JavaScript via Gambit for web deployment.

  • The compiler is self-hosting, written in Clojure, and emits Scheme code from a host-neutral Intermediate Representation (IR).
  • It supports a comprehensive set of Clojure features, including persistent data structures, lazy sequences, transducers, multimethods, protocols, and a full numeric tower.
  • Jolt offers robust concurrency primitives like future, agent, pmap, and core.async, leveraging OS threads for true parallelism.
  • A key feature is the ability to produce single, self-contained executable binaries using jolt build, eliminating the need for a Scheme runtime or JVM for deployment.
  • While maintaining most Clojure semantics, Jolt diverges in areas like Java interop (offering a C FFI instead), BigDecimal support, and uses a different regex engine (irregex).
  • The project provides easy installation via Homebrew or a script, along with clear usage examples for evaluating expressions, running projects, compiling binaries, and interacting with an nREPL server.

By providing a highly portable, JVM-free Clojure environment that can target native executables or browser-based JavaScript, Jolt opens up new avenues for Clojure development and deployment, appealing to those who value performance, reduced overhead, and broader platform reach.