I remember that there was a way in babashka to check on which OS bb task is run. I'm trying to find this snippet, but no success so far. Does anybody know where to look at?
@karol.wojcik same as in Java, via a Java property
$ bb -e '(let [{os-name "os.name" os-arch "os.arch"} (System/getProperties)] [os-name os-arch])'
["Mac OS X" "amd64"]
Ok got it! Thanks!
The MySQL babashka pod has gone live! You can now interact with MySQL from babashka scripts via the next.jdbc interface. Example: https://github.com/babashka/pod-registry/blob/master/examples/mysql.clj
Made a bb.edn
for a native-image based project which includes both Java and Clojure sources:
https://github.com/borkdude/trickle/blob/main/bb.edn
The benefit of this approach is probably that it works on Windows too
I’m converting my dotfiles installer to babashka
Cool!
Note that if you have a big chunk of code you could also use load-file
or paths
to move it to a .clj file (completely optional of course)
yeah, I plan to, but was actually thinking of moving more of the data to a separate edn. What’s the best way to load that?
edn/read-string + slurp
and I would love in general if you pointed out anything else I did there that you think I could improve. I am still a clj newbie!
ok. spit
has an :append true
option you could use here: https://github.com/Grazfather/dotfiles/blob/ef3ffc6dfd0de85cd1f25c89456f8790c2abce10/bb.edn#L33
oh, I thought I looked for one. Thank you!