babashka

https://github.com/babashka/babashka. Also see #sci, #nbb and #babashka-circleci-builds .
benny 2020-11-04T18:20:20.176100Z

@borkdude Is graal8 still generally supported? I've not updated for awhile but the latest release for both babashka and clj-kondo doesn't build with graal8 and based on my quick reading of the build scripts you don't seem to test graal8 builds

borkdude 2020-11-04T18:37:16.176700Z

@b babashka and clj-kondo only support compiling with one GraalVM native-image version, currently both are on 20.2.0 JDK11

borkdude 2020-11-04T18:41:17.177700Z

clj-kondo should probably work with native-image jdk8 as well, since it doesn't do anything JDK11 specific and the dependency should work on jdk8, just not with the build script in the repo - that one is specifically made for the distributed binary

benny 2020-11-04T18:49:13.179100Z

I will be upgrading to graalvm11. If it's not something you're looking into supporting then bisecting the actual places where both stopped working on graalvm8 20.2 is not necessary for me 🙂

benny 2020-11-04T18:49:58.180100Z

it's been a few months and I'm still very excited for babashka and now with nrepl support (may be a few months old already) I'm really enjoying playing with it

borkdude 2020-11-04T18:50:48.180900Z

babashka has quite some classes now that only work on JDK11. theoretically it could support JDK8, but since the primary way of using babashka is via the binary, I don't think a lot of people would benefit from it

benny 2020-11-04T18:52:42.181700Z

yeah this is mostly me realizing this because I try to maintain the babashka and clj-kondo packags on NixOS and graalvm8 was what I started with

Mitch 2020-11-04T19:53:18.184300Z

Is there a way to keep the bb repl open when piping from stdin? for example, I would like to pipe some edn into the repl that I open and bind it to something like *input* to explore it. currently, it will just insert stdin as the first expression to eval at the repl

❯ echo '{:a 1}' | bb
Babashka v0.2.3 REPL.
Use :repl/quit or :repl/exit to quit the REPL.
Clojure rocks, Bash reaches.

user=> {:a 1}
user=> %                                                                                                                                                                                                 

borkdude 2020-11-04T19:56:57.185300Z

I don't think that works, since you can't switch from pipe stdin to REPL stdin mid process

borkdude 2020-11-04T19:57:49.186300Z

you could pipe the EDN to a file and then read the file as edn

Mitch 2020-11-04T19:57:51.186400Z

ah, my lack of understanding is showing. that makes sense. thanks again

Mitch 2020-11-04T19:58:26.187600Z

yeah, there are a few ways around it, could also just run my command through babashka.process or something similar and play with the result there

borkdude 2020-11-04T19:58:32.187800Z

btw, it is possible to start a REPL in a script, using (clojure.main/repl), but that won't help you here

😲 1
Mitch 2020-11-04T19:59:49.189200Z

yeah, I was just looking for a lightweight way to explore the output from cli's that output json/edn. I'll find some way like the one you mentioned to make it work

Mitch 2020-11-04T20:00:53.190100Z

actually, starting the repl inside of the script might be exactly the way to do it