Fork me on GitHub
Dimitar Uzunov06:08:47

Hi guys, is it possible to use a REPL with the bb.edn file? I mean some expressions obviously can be used, but I can’t eval the whole file for example. It is not a big deal as bb starts fast.


@dimitar.ouzounoff yes, see tasks docs, can link when I’m back at keyboard

👍 2
Dimitar Uzunov07:08:16

is the key part that it starts within a task, rather than the whole file? it should be fine as usually I’m working at one task at a time 🙂


Tasks are always running in some context, eg as a dependency of some other task, so the ability to start a REPL at any point is useful there. The alternative is to start a REPL yourself and then invoke your tasks with run

Dimitar Uzunov07:08:34

Thanks, will try it out. I was just used to opening the file in emacs and evaling the whole thing but it makes sense now


If you'd like to be able to pull up a socket repl on the result of any task e.g. bb foo bar -> bb repl foo bar , does this nicely


is there a recommended way to check for the platform in babashka e.g. if you’re running on linux or macOS? I have´ bb -e "(defn macos? [] (-> (babashka.process/\$ uname) deref :out slurp (clojure.string/includes? \"Darwin\"))) (macos?)" right now but wondering if there’s something better.


(System/getProperty "") usually


thank you!

👍 1

Can I just say that Babashka is the most exciting clojure thing in ages! Thanks to all involved!

babashka 19
❤️ 4
gratitude 3