Live data from Hacker News

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

astrecipes.net

31–40 of 66 posts

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

#31
post #27

Earlier quoted context omitted.

25 MB almost fits on a floppy disk! That's acceptable to avoid dynamic linking or external dependencies. And that 25 MB is a fixed-cost (a JVM-subset, libraries, etc) and as the app adds functionality the fixed 25 MB cost becomes less as a percentage. It's not viable for built-in Linux tools, etc. But for a custom tool where performance matters, it's a great solution.

A floppy is 1.44MB, so off by more than an order of magnitude

I was being a little silly, but there are "floppies" with capacity up to 240 MB: https://en.wikipedia.org/wiki/Floppy_disk#Sizes,_performance...

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

#32
post #29

If you really want to script in Clojure you should probably use Lumo https://github.com/anmonteiro/lumo . Starts up almost instantly (including a repl!). Still wouldn't recommend. But it's workable.

Looked into it, but the big thing of my scripts is that they often use JDBC or http-kit, so cljs would not be as good.

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

#33

"So you have no excuses not to build your CLI tools in Clojure now." Except that the toy program is 25MB and takes multiple minutes to compile...

That and you are using proprietary Oracle tech.

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)

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

#34

Earlier quoted context omitted.

That and you are using proprietary Oracle tech.

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.

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

#35
post #30

Earlier quoted context omitted.

That and you are using proprietary Oracle tech.

The CE?

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.

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

#36

"So you have no excuses not to build your CLI tools in Clojure now." Except that the toy program is 25MB and takes multiple minutes to compile...

That and you are using proprietary Oracle tech.

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 platforms including Linux, Mac OS, Windows.

https://www.azul.com/downloads/zulu/

And Zulu for Raspberry PI:

https://www.azul.com/downloads/zulu-embedded/

Open JDK Build:

https://github.com/ojdkbuild/ojdkbuild

(click the 'releases' link)

Adopt Open JDK:

https://adoptopenjdk.net/index.html

(offers choice of HotSpot or IBM's Open J9 technology)

There's also Red Hat, for free, but you must create an account.

And IBM makes their own builds, but they are typically bundled with some other product such as Eclipse, so a bigger download.

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

#38
post #36

Earlier quoted context omitted.

That and you are using proprietary Oracle tech.

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.

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

#39

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.

[deleted]

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

#40
post #30

Earlier quoted context omitted.

The CE?

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.
Post reply on HN