logoalt Hacker News

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

182 pointsby marcingasyesterday at 5:52 PM50 commentsview on HN

Let-go is a Clojure-like language (~90% compatible with JVM Clojure) written in pure Go. It ships as a ~10MB static binary and cold boots in ~7ms - that's about 50x faster than JVM and 3x faster than Babashka. It has decent throughput on algorithmic workloads - within ballpark of the GraalVM-backed sci.

I started this project in 2021 as an elaborate practical joke: I wanted to have an excuse for writing Clojure while pretending to write Go.

Jokes aside, it turned out to be pretty decent: it feels like real Clojure, it has an nREPL server (supported in Calva, CIDER, etc.), it's easily embeddable in your Go programs (funcs, structs and channels cross the boundary without fuss). It's good for writing CLIs, web servers, data processing scripts and even doing some systems programming - I used it to write a deamonless container runtime. Oh, and it runs on Plan9.

Under the hood there is a fairly simple compiler and a stack VM, both handcrafted specifically for running Clojure-like code. The compiler can work in AOT mode producing portable bytecode blobs and standalone binaries (runtime+bytecode).

This is not a drop-in replacement for Clojure in general - it does not load JARs, it does not have all Java APIs and it most probably won't run your exiting Clojure projects without modifications. At least not at the moment.

Take it for a spin, tell me what you think. Issues and PRs are welcome!


Comments

ingyyesterday at 10:49 PM

Try out this Wasm browser REPL https://gloathub.org/repl/

Gloat is a Glojure AOT automation tool. I worked with James Hamlin to get Glojure AOT going last summer and have been moving it forward since. I've also been working with marcingas (nooga) to get Gloat/Glojure/let-go all cooperating.

veqqtoday at 3:09 AM

Nice! I recently played around with a Lisp syntax for Go semantics: https://codeberg.org/veqq/Joe

As far as JVM-free Clojure-like, Janet is really nice. I've been using it in production for a while: https://janet-lang.org/ There's also Fennel if you want the Lua vm and libraries.

show 1 reply
boguscodertoday at 3:34 AM

Micro nit: it says 7ms cold start and then 6ms just few lines lower.. maybe it gets faster as you read README

bjconlanyesterday at 10:48 PM

This is the kind of clojure port that I always was looking for. Mostly because I thought go's core library and channels abstractions hits a simpler/nicer base API which would with the core & async apis (not to mention scratches my big beautiful binary itch)

Thanks for your work will definitely check it out again once I get over renewed love for cpp (26)

Edit how did glojure go under my radar also a great project from the looks

show 2 replies
lsh0today at 4:35 AM

An alternative is Joker: https://joker-lang.org

I think it is brilliant and completely underappreciated :)

lenkitetoday at 8:02 AM

I wish this had a better language name than just "lets-go". How about "clogo" ?

phplovesongtoday at 9:36 AM

There seems to be a surge in compile to Go projects recently. To me this signals that the runtime / stdlib of Go is one of the best out there (when going the GD'd route), but the surface level (syntax) is too simple/verbose and lacks the expressiveness developers want.

So far Lisette (http://lisette.run) seems to be the best/most active version of a compile to Go language out there.

chr15myesterday at 11:35 PM

PR most welcome for https://github.com/chr15m/awesome-clojure-likes

show 1 reply
faangguyindiatoday at 1:51 AM

I am finding i need "Rails" but i like single binary deployment of Go and fast/low resource usage like Go.

Is it possible for now?

show 1 reply
achenettoday at 8:36 AM

This is beautiful, makes me wish I'd made it.

Excellent work, thank you for sharing it with us ^_^

show 1 reply
immanuwelltoday at 10:57 AM

jvm clojure's startup tax is exactly why it never cracked the serverless/cli niche, and this pure-go implementation is the kind of unhinged side project, good luck

show 1 reply
dmitrygryesterday at 10:11 PM

You should see how fast libc gets mmaped() into the VM and the first instr runs :)

show 1 reply
brazukadevyesterday at 10:33 PM

do you know about Glojure?

https://github.com/glojurelang/glojure

show 2 replies
j3stoday at 12:48 AM

absolutely sick of reading through obviously AI-slopped READMEs. it's your project, take a little pride and tell me why i should like it quickly instead of asking your agent to rattle off a list of features -- it's severely boring & offputting.

show 1 reply
asdfasd323fyesterday at 11:19 PM

obviously vibecoded

show 4 replies