Fork me on GitHub
#joker
<
2019-06-22
>
didibus23:06:49

I think planck doesn't work on windows?

👍 4
didibus23:06:06

Another thing is, joker is a self contained binary, all dependencies are statically linked and included with it. Planck isn't, and so you need to install or have installed other things such as libcurl for it to work.

didibus23:06:57

For example, on openSuse, I need to build it myself in order to install it.

didibus23:06:44

Also, joker is the fastest to start Clojure-ish scripting option, faster than lumo and planck:

didibus23:06:12

$ time joker -e '(println "Hello World")'
Hello World
joker -e '(println "Hello World")'  0.07s user 0.02s system 138% cpu 0.059 total

$ time lumo -e '(println "Hello World")' 
Hello World
lumo -e '(println "Hello World")'  0.83s user 0.06s system 138% cpu 0.640 total

$ time plk -e '(println "Hello World")'  
Hello World
plk -e '(println "Hello World")'  2.09s user 0.17s system 147% cpu 1.540 total

$ time clj -e '(println "Hello World")'     
Hello World
clj -e '(println "Hello World")'  3.51s user 0.13s system 194% cpu 1.864 total

$ time ruby -e 'puts("Hello World")'
Hello World
ruby -e 'puts("Hello World")'  0.10s user 0.02s system 99% cpu 0.118 total

$ echo 'print("Hello World")' | time python - 
Hello World
python -  0.01s user 0.01s system 96% cpu 0.021 total

$ time node -e 'console.log("Hello World")'  
Hello World
node -e 'console.log("Hello World")'  0.08s user 0.02s system 99% cpu 0.101 total
Turns out planck is also the slowest of the three: joker, lumo and planck. You might even wonder if there's benefits, since at that point, clj isn't that much worse. That said, I'd expect with a lot of requires, clj would get a lot slower, and planck would stay relatively fast.

👍 8
mpenet12:06:23

Good info thanks! joker is clearly optimized for startup. I have the feeling planck is the more promising approach long term tho (I am often wrong, heh)

didibus03:06:45

I find Lumo more promising personally. I find the Node ecosystem a better target than JavaScriptCore. But if joker keeps being maintained, it will be my choice for scripting things where startup time matters (otherwise I already just use normal Clojure)

mpenet06:06:30

Depending on npm can be both a blessing and a curse. Personally for scripting I'd rather avoid npm. I guess it's good to have choices 🙂

didibus04:06:42

You don't need to depend on npm for Lumo. I mean, first you have access to all of the NodeJS standard lib + the Google Closure libs. And you can use any cljs lib.

didibus04:06:28

Also, how do JavaScriptCore JS dependencies work? Isn't it that there just isn't even an option for it? Or does JavaScriptCore have its own dependency manager?