Fork me on GitHub
#babashka
<
2021-01-07
>
dangercoder14:01:00

Which docker-hub should I go to for future babashka updates? I found theese: https://hub.docker.com/r/babashka/babashka/ https://hub.docker.com/r/borkdude/babashka/

borkdude14:01:39

@jarvinenemil In the future babashka/babashka, right now: borkdude/babashka.

borkdude14:01:50

Only the snapshot is released to babashka/babashka right now

borkdude14:01:24

But you can use the snapshot release if you feel adventurous

borkdude14:01:48

We also released an alpine image in addition to the ubuntu one. This is mostly @rahul080327's work

dangercoder14:01:57

Yeah I'd like to have the stable ones, I thought https://hub.docker.com/r/babashka/babashka/ was the one to use so I got that one whitelisted at my company

borkdude15:01:31

yeah, sorry for the confusion, we have just migrated this during the xmas break and from 0.2.7 on it will be all babashka/babashka

👍 3
dangercoder15:01:05

No worries, I'm using the /borkdude/ repo for now. Thanks for the clarification! 🙂

pez17:01:26

What’s an idiomatic way to know if the code is run in the repl?

pez17:01:04

Also, how do I use babashka.fs? I guess I need to get it on the classpath, but I’m not sure how to go about it.

borkdude18:01:54

@pez babashka.fs is currently a gitlib only, it's quite unfinished. you can require libs in bb using babashka.deps: https://book.babashka.org/#babashkadeps How do you know code is running in a REPL: how do you do this in normal Clojure?

pez07:01:18

I had of course checked the book. 😃 But too briefly. I was wishing for a pythonic way to do it, but didn’t think of searching for python or main. Haha.

borkdude09:01:58

No problem, I'm happy to answer your questions ;)

nate18:01:12

I was curious about that too. I've taken to having this in my scripts around the "main logic":

(when-not (System/getenv "DEV")
  (let [...]
    (process ...)))
and then running bb like this:
DEV=1 bb --nrepl-server
that way, I can load my entire script in my editor and it won't trigger it actually running anything

nate18:01:53

this isn't a problem in clojure, because java invokes a main function, so evaluating my main namespace in clojure doesn't actually run anything

borkdude18:01:49

@nate we have this solution for that problem: https://book.babashka.org/#main_file

metal 3
nate18:01:10

ah! thank you

nate18:01:13

I'll switch to that

borkdude18:01:27

I need a better title for that recipe probably

nate18:01:14

oh, and the code is missing a closing paren

borkdude18:01:29

Feel free to PR a change

nate18:01:47

sure thing

nate18:01:28

man, github really does make it easy to submit a small PR, I did it all via the web UI

borkdude21:01:44

Today we released pod-babashka-aws 0.0.2 (performance improvement for big file uploads) and 0.0.3 (credential options). https://github.com/babashka/pod-babashka-aws/blob/main/CHANGELOG.md

💪 3
🚀 3
👍 3
borkdude21:01:51

This is probably most of the remaining work for this pod, so I consider it "done" unless bug reports will come in.