joker 2021-02-07

Something I have been wondering is whether it is possible to bundle the joker source of a script and joker itself to share standalone executables

It doesn't seem so but if I read things correctly in main.go all that would be required is to use joker as a library and to create a new ProcessReader from a reader

While I’m fairly certain that @roman.bataev won’t “promise” that the core API will be stable, it looks like a pretty neat hack to me!

Also, I’m unsure as to whether/how that interacts with the startup-time accelerator that’s usually run as part of Joker’s default build script, run.sh.

yeah, this is certainly not intended or supported use of Joker, but it is cool that you can package it up like this.

👍 2

@james-clojure you need to run run.sh in the joker source repo before being able to use it like that

Yeah, I was thinking that'd be the case! Before the gen_code tool is run (by core/object.go), via -tags gen_code to pick up the *_slow_init.go files (that aren't built into the final executable), the "static-initialization" code that Joker needs hasn't yet been generated.

My rainy sunday experiment with joker: https://gist.github.com/pyr/d5e17af9c572b681a57de52895437298 (small replacement for lein's default behavior backed by tools.deps)

👍 1