Jolt – Clojure that speaks C jolt-lang.net · 13 points · 0 comments · HN thread ...
HN Best 200 @best
Jolt – Clojure that speaks C jolt-lang.net · 13 points · 0 comments · HN thread
TL;DR Jolt is a self-hosted Clojure implementation that compiles Clojure to Scheme and runs on Chez Scheme natively or on Gambit compiled to JavaScript, with no JVM. It offers a C FFI via defcfn and a jolt build command that produces a single standalone binary with C dependencies linked statically.
- Runs Clojure through a host-neutral IR that emits Scheme, targeting Chez natively or Gambit compiled to JavaScript; the compiler is written in Clojure and compiles itself.
- Any C shared library can be bound with defcfn, which turns C functions into ordinary Clojure functions; the db and http-client libraries reach SQLite, Postgres, OpenSSL and zlib this way.
- jolt build ahead-of-time compiles a project and its dependencies into one executable with C dependencies linked statically, requiring no Chez, JVM, or source to run.
- future, agent, pmap run on OS threads over a shared heap, and core.async provides channels and go blocks.
- Stated divergences from the JVM: no general Java interop, no BigDecimal (decimal? is always false), and regex uses irregex rather than java.util.regex.
- Installable via Homebrew or an install script, and includes an nREPL server for CIDER, Calva and Cursive.
Discussion The Hacker News thread has no comments yet, so there is no community discussion to summarize. The story was posted with 13 points.