Hacker News new | past | comments | ask | show | jobs | submit login

> Clojure's startup time is pretty brutal for a lot of things I'd like to use it for, and no amount of REPL-driven development can make Clojure appropriate for CLI tools.

If you got the repl-driven development down, you wouldn't test your CLI by launching it, you would just evaluate the same functions as the CLI uses. Only time when you'd want to launch the CLI would be before releasing a build or for E2E tests. Once you got the code down for your repl and the startup time becomes a hassle, you compile down your Clojure program to a binary with GraalVM and now it starts up fast.

Otherwise, give babashka a try. Basically single-binary Clojure environment. https://github.com/borkdude/babashka




It's not about testing, it's about using it. I know how to use a REPL :)

GraalVM simply is not production-ready, though I follow its progress with great interest. That said, it's hard to compare the process of integrating with GraalVM against a language that actually just has fast startup.

Babashka is pretty cool, but it's another example of something that isn't quite Clojure. Nice if you can tolerate various "almost the same" languages, but Clojure itself is still weak in these domains.


I hear you, GraalVM is pretty new and while I've managed to write and deploy plenty of clis using it without any problems, it's a big hassle to deal with anything GUI or server related. So it does have a long way to go.

And while Babashka is not Clojure, it's interpreter (sci - https://github.com/borkdude/sci) is in fact a "Small Clojure Interpreter" that tries to stay as close to Clojure as possible. Unless you're using the Java interop, I've yet to hit anything I cannot do in Babashka that I could do in Clojure (I barely use Java interop)




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: