Fork me on GitHub
#babashka
<
2020-11-04
>
benny18:11:20

@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

borkdude18:11:16

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

borkdude18:11:17

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

benny18:11:13

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 🙂

benny18:11:58

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

borkdude18:11:48

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

benny18:11:42

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

eval-on-point19:11:18

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=> %                                                                                                                                                                                                 

borkdude19:11:57

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

borkdude19:11:49

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

eval-on-point19:11:51

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

eval-on-point19:11:26

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

borkdude19:11:32

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

😲 3
eval-on-point19:11:49

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

eval-on-point20:11:53

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