Fork me on GitHub
#babashka
<
2021-01-08
>
pez08:01:12

That pythonic way of checking if I am running in the REPL works perfectly. Thanks!

borkdude10:01:34

Print API breakage warnings using a 75-line bb script: https://gist.github.com/borkdude/ba372c8cee311e31020b04063d88e1be

😎 18
jeroenvandijk12:01:07

Would be interesting to have a registry for these "one time" scripts. Clojure toolbox needs a modern successor maybe

jeroenvandijk14:01:10

Cool, that’s useful!

wilkerlucio15:01:36

@borkdude awesome thing on the API breakage! man, I just wanna say I'm very thankful for all the work you have been doing with kondo, babashka, sci, etc... fews like a new Clojure era, getting improved in exponential rates, and I can't live without all of them anymore! so thank you very much 🙏

❤️ 9
☝️ 9
tomc21:01:30

@borkdude Hi! Babashka and clj-kondo are really useful tools and I appreciate the work you've put into them!

tomc21:01:28

I've been poking around a bit and haven't been able to figure this out: I'm making a bb script that wraps psql; I'd like the script to start an interactive psql session. Using clojure.java.shell, the script runs psql but then exits immediately. Is there documentation for how to do this type of thing?

borkdude21:01:09

@tomc yes, you can start an interactive process using babashka.process. clojure.java.shell isn't really suited for this. https://github.com/babashka/process

tomc21:01:32

Thanks, I'll take a look at that.

borkdude21:01:20

For full interactivity, start the process with (process ["psql"] {:inherit true})

borkdude21:01:03

And then you might want to deref the result of that, else the script will exit immediately, since process isn't blocking

borkdude21:01:02

Note that there is also a postgresql pod for babashka: https://github.com/babashka/babashka-sql-pods/ available in the pod registry for easy download: https://github.com/babashka/pod-registry

borkdude21:01:35

And honeysql also works with bb as a lib, if you want to do that kind of thing

tomc21:01:43

using bb/process worked right away, thanks again.

tomc21:01:25

pods are great too btw, I used the aws one in this script and it was so easy :thumbsup:

👍 6