DEV Community

Discussion on: Joker: Flex Your Scripting Muscles In (Almost) Clojure

Collapse
 
cloojure profile image
Alan Thompson

Thank you for the review, but there is something even better available now that GraalVM is out and able to convert normal Clojure code into a statically linked executable.

Details are here: github.com/BrunoBonacci/graalvm-cl...

I just tried out the "Hello World" yesterday and it works great. Looks like it could be a game changer for resource constricted environments (startup time

Collapse
 
hlship profile image
Howard M. Lewis Ship • Edited

I'm sure GraalVM has its uses, but for actually getting things done in a tiny script, Joker is incredibly effective. Joker is a 15M self-contained executable and Joker scripts are tiny. For scripting, where you often want to iterate quickly, it's nice not to have a build process to generate a large executable.

Having fast startup via GraalVM would be terrific for, say, AWS Lambda.

For what I used Joker for, I want to be able to make changes locally and quickly and not have a build process.

A current example is our internal DevOps script, fleet; it's about 1300 lines of code, with 25 sub-commands. fleet help executes in .22 seconds - that's time for Joker to initialize, load several libraries, and the 1300 lines of code, organize a bunch of stuff, and print out the command list. Fast enough for me.