4 ms·
However, the elephant in the room (which I also like to ignore as a Clojure enthusiast) is that the start up time of a Java based GUI app is too slow (this is e
by crispinb 6y ago
However, the elephant in the room (which I also like to ignore as a Clojure enthusiast) is that the start up time of a Java based GUI app is too slow (this is exacerbated even moreso when Clojure is involved)
I'm expecting a GraalVM rejoinder from someone. For anyone who's used GraalVM (particularly with Clojure) - what are the downsides and limitations?
- ahungry 6y agoThis is a really cool usage of it: https://github.com/borkdude/babashka https://github.com/borkdude/babashka, but last I had checked, it didn't have any GUI integration, and installing the GraalVM to begin with is a very heavyweight install.
- crispinb 6y agoYes I've installed babashka. It really is a cool project. Must look into GraalVM at some point, but, as someone new to Clojure, I'm wary of spending too much time on tooling yet. I've found in the past I can tinker so much with such things that it interferes with getting fluent with more fundamental stuff. I'd be interested to see if either now or in the future Clojure + JavaFX in GraalVM would be feasible. Edit: I don't quite get the install size issue - I thought native image was an entirely standalone executable?
- ahungry 6y agoThe GraalVM system/tooling itself, for generating native code from JVM was a big download/install - the generated binaries, I can't speak to too much.
- pjmlp 6y agoJava has had AOT compilers since 2000, they just haven't been free beer for the most part, hence why FOSS keeps ignoring them. Ironically they have to thank Oracle for doing something that Sun was religiously against, having an AOT compiler as part of the free beer Java layer.
- brabel 6y agoA JavaFX hello world app starts in around 1 second on a modern computer. Here's a small demo of a self-updating JavaFX app where you can see it being started, then built again, then re-launched with the new version: https://github.com/renatoathaydes/keepup/blob/master/docs/images/keepup-demo.gif https://github.com/renatoathaydes/keepup/blob/master/docs/im... If the author's app takes 10 seconds to boot, I am afraid they need to blame either Clojure or their own code for that.
- pjmlp 6y agoThat is a common trend on JVM guest languages, to blame Java or the JVM for their impedance mismatch with the host platform. Granted, this usually only comes from those that don't bother much to learn about the underlying platform and are sometimes even agressive against what actually made their favourite guest language possible to exist.
- uryga 6y ago> what actually made their favourite guest language possible to exist. maybe i'm arguing semantics, but i don't think it's fair to say that the JVM "made Clojure possible" -- that's like saying "C made Python possible because CPython is written in C". iirc the JVM was chosen as a backend because that's what Clojure's creator had to work/interop with. and i think that's generally the case with "guest" languages -- there's an environment you want to write code for (JVM/ browser), but you don't want to use its "official" language (Java/JS), so you create a new language and adapt it to run there. and sure, reusing the Java stdlib and other existing code can help bootstrap a language, no doubt about that, but it's a stretch to say it makes it "possible"
- pjmlp 6y agoClojure's success lies in being a Lisp that takes advantage of the JVM libraries and JVM monitoring tools, without them it would be just yet another Lisp clone like so many others since the early 60's.
- 6y ago