3 ms·
Clojure doesn't need JVM. You can run it with GraalVM either directly [1] or via Babashka [2]. Both are great options for get into Clojure since there's almost
by fuzzythinker 4y ago
Clojure doesn't need JVM. You can run it with GraalVM either directly [1] or via Babashka [2]. Both are great options for get into Clojure since there's almost no startup time like JVM and you don't have to be burdened with learning and heaviness of JVM stack.
[1] https://github.com/oracle/graal https://github.com/oracle/graal
[2] https://github.com/babashka/babashka https://github.com/babashka/babashka
- avmich 4y ago> Clojure doesn't need JVM. You can run it with GraalVM... Hm. https://en.wikipedia.org/wiki/GraalVM https://en.wikipedia.org/wiki/GraalVM "GraalVM is a Java VM and JDK based on HotSpot/OpenJDK, implemented in Java..." https://en.wikipedia.org/wiki/Clojure https://en.wikipedia.org/wiki/Clojure "Other implementations of Clojure on different platforms include: - Babashka,[82] Native Clojure scripting language leveraging GraalVM native image and Small Clojure Interpreter.." I guess you mean that some particular implementation of JVM isn't needed. But in general Clojure has "j" in its name, it wouldn't make sense without JVM at all.
- LesZedCB 4y agowell, there's also ClojureScript and recently, ClojureDart - neither dependent on the JVM
- fuzzythinker 4y ago"a Java VM" =/= the JVM most people's understanding of the word.
- didibus 4y agoNo, you don't need GraalVM either, it is only built with GraalVM, but it is usable as a single static native binary with no other dependencies. Think how say CPython needs GCC to build itself, but to use Python as a user you don't need GCC, only the compiled CPython interpreter. This is the same for Babashka Clojure, you only need GraalVM to build it, but as a user you only need the compiled Babashka interpreter. There's also Self-hosted Clojurescript which only needs a JS VM. And there is Clojure CLR which only needs a CLR VM. And you've got Clojerl that only needs BeamVM. But Babashka is probably the one you'd want to try, since it is dependency free, just download the binary and put it on your PATH.