Live data from Hacker News

Command-line apps with Clojure and GraalVM: 300x better startup times

astrecipes.net

41–50 of 66 posts

Re: Command-line apps with Clojure and GraalVM: 300x better startup times

#41
post #36

Earlier quoted context omitted.

If you are referring to Java, I would point out: Oracle's JDK is based on Open JDK. Open JDK is licensed under GPL + the classpath exception. (eg, the Open JDK is under GPL, but when used as a runtime for other software, then that other software does not come under the scope of the GPL.) There are multiple other sources to get pre-build binaries for the Open JDK without going to Oracle. Azul Zule built for multiple p…

> If you are referring to Java [...] I'm not.

What proprietary Oracle tech are you referring to?

Re: Command-line apps with Clojure and GraalVM: 300x better startup times

#42
post #40

Earlier quoted context omitted.

Yes. It's not like it's donated to the OpenJDK community or anything even though they are going to start shipping with it. It may not affect you and you may not mind, but I personally avoid software owned by that company when I can (which is of course not always). I am also always wary of developer languages/libraries that use the freemium model.

GPL + classpath exception seems to be about as free as it gets.

If you're responding to my comment about the owner, we cannot tell what the future will hold, we can only judge by the owner's past conduct. If you're responding to my comment about freemium, the concerns aren't the current license of the free version, but the decisions that come about when there is a monetized and non-monetized version. While it's often reasonable in other forms of software, in developer languages/libraries I think it is dangerous to build reliance on anything with that kind of conflict.

Re: Command-line apps with Clojure and GraalVM: 300x better startup times

#44
post #41

Earlier quoted context omitted.

What proprietary Oracle tech are you referring to?

GraalVM. Sorry that wasn't clear from my initial statement.

That's GNU GPL 2 https://github.com/oracle/graal/blob/master/LICENSE

Re: Command-line apps with Clojure and GraalVM: 300x better startup times

#45
post #3
post #2

Generally speaking, startup times for Java / JVM based apps should be worked on next by the teams behind it; in the container age, fast startup is a good thing. I know the JVM itself starts up fast enough, but then going with e.g. Spring on top of that just adds a minute of startup time - and I've no clue what it's doing, I wouldn't think loading config, registering services and opening up a servlet thingy would take…

For Clojure, there is a complex set up of vars in the core namespaces - see e.g. https://dev.clojure.org/display/design/Improving+Clojure+Sta... - but GraalVM kills it. It's even worse for serverless!

So, are we saying that really, Graal should be used for Datomic Ions?

Re: Command-line apps with Clojure and GraalVM: 300x better startup times

#47

Earlier quoted context omitted.

It's Open Source: https://github.com/oracle/graal I made a very small contribution (removing 4 incorrect quote characters from some sample JSON code)

> It's Open Source: https://github.com/oracle/graal Sure. That doesn't change my statement though.

> Proprietary software is non-free computer software for which the software's publisher or another person retains intellectual property rights—usually copyright of the source code...

https://en.wikipedia.org/wiki/Proprietary_software

Re: Command-line apps with Clojure and GraalVM: 300x better startup times

#48

Earlier quoted context omitted.

> It's Open Source: https://github.com/oracle/graal Sure. That doesn't change my statement though.

> Proprietary software is non-free computer software for which the software's publisher or another person retains intellectual property rights—usually copyright of the source code... https://en.wikipedia.org/wiki/Proprietary_software

Which is the case here for Graal (there are differing definitions of "free"). From your link:

> While most proprietary software is distributed without the source code, some vendors distribute the source code

Source code available, or even under an open source license, does not change whether it is proprietary.

Not sure this is the best place to discuss the nuances of these terms. Essentially, they retain the IP, have shown a willingness to go after those doing things like re-implementing it, and in general should give people pause about using tech owned by them.

Re: Command-line apps with Clojure and GraalVM: 300x better startup times

#49

Earlier quoted context omitted.

Long JVM startup time is a big reason why I went with Elixir instead of Clojure when I decided to move off Ruby to do webdev. (Another reason was easily triggering nasty Java stacktraces.) My Elixir test suites fire up instantly and finish in seconds (if that) and this fast-as-possible feedback loop is extremely important to stay productive, IMHO.

With Clojure you get that feedback loop by running everything in an open repl. No startup time needed.

so you rerun tests in a REPL? what happens when something is redefined?

Re: Command-line apps with Clojure and GraalVM: 300x better startup times

#50
post #22
post #21

Earlier quoted context omitted.

Clojure startup time is only partly related to JVM startup time, which is ~60ms[1][2]. The reason Clojure startup is slow is because Clojure requires a very elaborate initialization. OTOH, the Erlang VM (BEAM) is much, much, much slower than the JVM (Hotspot, at least). [1]: https://blog.ndk.io/clojure-bootstrapping.html [2]: http://clojure-goes-fast.com/blog/clojures-slow-start/

Cant you just have a system clojure process started up and then fork from there?

Forking is easiest and safest in a functional-data-structure immutable language (where it's basically trivial). Mutable languages? Not so much.
Post reply on HN