hn.today

Jolt – Clojure that speaks C

jolt-lang.net118 points43 comments
Screenshot of Jolt – Clojure that speaks C

Jolt is a self-hosted Clojure implementation built on a portable Scheme layer rather than the JVM. Its compiler, written in Clojure, analyzes programs into a host-neutral intermediate representation and emits Scheme; it can run natively on Chez Scheme or use Gambit to compile for JavaScript. The project aims to preserve Clojure semantics for most portable code, including persistent collections, lazy sequences, transducers, protocols, records, multimethods, runtime evaluation, and the full reader. It also supports concurrency through OS-thread-based futures, agents, and parallel maps, plus core.async channels and go blocks.

A central difference from JVM Clojure is that Jolt replaces general Java interoperation with native C FFI: developers can load C libraries and expose their functions as ordinary Clojure functions. Its build command ahead-of-time compiles an application, runtime, standard library, and dependencies into one standalone executable, with C dependencies statically linked. The supplied tools support expression evaluation, project execution, dependency resolution, nREPL-based live development, and native-library binding. Jolt is open source under the Eclipse Public License 1.0 and can be installed as a self-contained binary or run from a clone with Chez Scheme. It does not provide general Java interop, reflection, or Java class generation; BigDecimal is absent, and its regex implementation supports common patterns but differs from Java’s.

Read on jolt-lang.net43 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Programming

Solid 2.0

Solid 2.0

Solid 2.0 is now stable, five years after version 1.0, with a smaller API and diagnostics designed for AI agents. Its reactive graph now handles asynchronous computations, while built-in server functions support RPC calls and persistent Server-Sent Events connections. (solidjs.com)

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.