HN
Today

Show HN: I made a Clojure-like language in Go, boots in 7ms

A new project called 'let-go' introduces a Clojure-like language implemented entirely in Go, boasting incredibly fast boot times (7ms) and a tiny memory footprint. This unique blend of Lisp's power with Go's efficiency, stemming from a 'practical joke' to use Clojure at a Go job, has garnered significant attention for its technical prowess and impressive benchmarks. It positions itself as a robust option for Go developers seeking functional programming paradigms and ultra-lightweight binaries for various applications.

77
Score
19
Comments
#5
Highest Rank
14h
on Front Page
First Seen
May 9, 10:00 PM
Last Seen
May 10, 11:00 AM
Rank Over Time
65677111213141314141817

The Lowdown

Let-go is a fascinating new project that brings a dialect of Clojure to the Go ecosystem, aiming for a high degree of compatibility with JVM Clojure while leveraging Go's performance characteristics. Born from a desire to write Clojure within a Go environment, it delivers on its promises with impressive speed and efficiency.

  • Core Implementation: It's a Clojure-like language (~90% compatible) written entirely in pure Go, featuring its own bytecode compiler and stack VM.
  • Performance: Achieves a cold boot in approximately 7ms, ships as a ~10MB static binary, and consumes only 14MB of idle memory. These metrics significantly outperform JVM Clojure, Babashka, and Joker across various benchmarks.
  • Key Features: Supports standalone executables, WASM web apps (with nREPL in browser), core.async channels (using real goroutines), HTTP server/client, JSON, Transit, and extensive OS utilities.
  • Go Interop: Provides seamless two-way interoperability, allowing Go structs to map to let-go records, and Go functions/channels to be invoked directly.
  • Ecosystem Integration: Can load Babashka pods, extending its capabilities with a wide array of existing plugins.
  • Developer Experience: Includes an nREPL server for easy integration with tools like CIDER and Calva, and offers clear documentation for compilation and embedding.
  • Limitations: While highly compatible, it's not a drop-in replacement for full Clojure. It currently lacks features like Refs/STM, deftype, reify, clojure.spec, and certain numeric tower behaviors, and uses Go's re2 regex engine.

Overall, let-go presents a compelling option for developers looking to combine the conciseness and power of Clojure-like syntax with the performance, small footprint, and deployment advantages of Go, especially for CLIs, web services, and embedded scripting.

The Gossip

Gopher Grooves and Glojure Gripes

The discussion quickly turns to 'Glojure,' another Clojure-in-Go project, with users asking how 'let-go' compares. The author confirms awareness of Glojure, noting it's included in 'let-go's benchmarks. One commenter also highlights the collaboration between the 'let-go' author and the Glojure/Gloat community, indicating a cooperative spirit in this niche.

Milliseconds Magic and Measurement Methods

The impressive 7ms cold boot time sparks a user's humorous inquiry about the exact definition of 'boot' for such a rapid startup. The author clarifies that this measurement encompasses the full initialization of the compiler, loading of all standard library namespaces, and computation of all vars, effectively representing the 'time to running your code.'

AI Allegations and Authorial Authenticity

A brief but pointed exchange arises when a commenter suggests the project is 'vibecoded,' implying it was extensively generated by AI. The author directly addresses this, acknowledging the use of AI to 'boost Clojure compat and fill out some blanks' but firmly stating the runtime itself was manually written, with all commits visible on GitHub. Other users defend the author, questioning the accuser's low-effort criticism, while the accuser persists in their claim, citing the README's style and a perceived 'vibe' in the code.