2 ms·
I find this very interesting, because it seems the programming landscape has changed quite a bit since Rich Hickey's world where he conceived Clojure. How he d
by didibus 6y ago
I find this very interesting, because it seems the programming landscape has changed quite a bit since Rich Hickey's world where he conceived Clojure.
How he describes information systems, in that world, JVM is an amazing piece of technology that can hardly be surpassed.
But today, the programming landscape goes far beyond that. ML and Data Science, infrastructure automation, serverless, etc.
I also work in the world of enterprise information systems, so I'm always surprised about people saying the JVM doesn't work well for them. For me the JVM is the best piece of tech out there, only matched by the CLR. Even Go isn't up to par yet.
But I reckon, other use cases value different execution characteristics. Low memory footprint is more important than raw performance. Throughput is more important than latency. Binary size is more important than portability. Startup times is more important than runtimes. Etc.
Well the good news is that Clojure is meant to be hosted. And the JVM is only one of its many hosts. ClojureScript can run on NodeJS, eventually Deno, it can run on JavaScriptCore and in the browser. All these offer alternative execution models which can meet a new set of requirements.
Clojure CLR is still real and robust, while it hasn't seen much use, it is ready at any time to take over. If the CLR provides to fulfill alternative execution characteristics it would be an option. Right now, the CLR has pretty much the same characteristics as the JVM though, which is why its use in Clojure hasn't seen a lot of popularity.
Babashka and Joker are Clojure based runtimes, interpreters really, so exactly the same as what Python and Ruby offer. Babashka especially is picking up pace, and already starting to offer a really compelling set of alternate execution characteristics, specifically one where startup time trumps all.
I'm also quite fascinated by Clojerl, a Erlang hosted Clojure. While less official, the maintainer is very active, and I feel it's actually now ready to be used in production.
And there are more, smaller ones, but I'll skip those.
What this shows is the landscape of possible runtimes is vast and will just keep expanding. Right now lots of experiment in having a Clojure hosted on Go, on Common Lisp, on Rust, etc.
This a testament to Rich's hosted design. Clojure is easy to build on top of other runtimes. This ease really helps it grow and reach more use case.
And there's the fact that the JVM is only getting better. GraalVM already offers native binaries with a small memory footprint, small binary, fast startup and still pretty fast performance. There are so many new garbage collectors coming along. Some for large heaps, small heaps, no heaps, tuned to throughout, latency, low memory, large memory, etc.
P.S.: Also, I really urge you to reconsider a JVM. The truth is, it's such a powerful piece of technology that it can be hard to navigate and understand even what all it can do. I believe a lot of people are turned off by that and choose to use Go or Python because they have only one easy mode of operation. But the JVM can do so much, it's a worthy investment, it's very possible it has what you actually need.
For example, you no longer need to install a JVM. Apps are self-contained. The user doesn't have to install a JVM, and the bundle contains only what the app uses, not the whole JVM. And as mentioned, compiled native binaries are also a possibility now.
- JBiserkov 6y agoYou mentioned ML, so I just had to link to the awesome libraries by Dragan Djuric like ClojureCUDA, ClojureCL, Neanderthal, Fluokitten, Bayadera and recently Deep Diamond https://github.com/uncomplicate https://github.com/uncomplicate