babashka

https://github.com/babashka/babashka. Also see #sci, #nbb and #babashka-circleci-builds .
dangercoder 2021-01-07T14:58:00.024200Z

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/

borkdude 2021-01-07T14:58:39.024600Z

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

borkdude 2021-01-07T14:58:50.025Z

Only the snapshot is released to babashka/babashka right now

borkdude 2021-01-07T14:59:24.026100Z

But you can use the snapshot release if you feel adventurous

borkdude 2021-01-07T14:59:48.026800Z

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

dangercoder 2021-01-07T14:59:57.026900Z

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

borkdude 2021-01-07T15:00:31.027500Z

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

πŸ‘ 1
dangercoder 2021-01-07T15:15:05.028700Z

No worries, I'm using the /borkdude/ repo for now. Thanks for the clarification! πŸ™‚

pez 2021-01-07T17:47:26.029600Z

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

pez 2021-01-07T17:49:04.030800Z

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.

borkdude 2021-01-07T18:15:54.031500Z

@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?

borkdude 2021-01-08T09:03:58.042Z

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

nate 2021-01-07T18:34:12.033200Z

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

nate 2021-01-07T18:34:53.034Z

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

borkdude 2021-01-07T18:35:49.034400Z

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

🀘 1
nate 2021-01-07T18:37:10.034700Z

ah! thank you

nate 2021-01-07T18:37:13.034900Z

I'll switch to that

borkdude 2021-01-07T18:37:27.035300Z

I need a better title for that recipe probably

nate 2021-01-07T18:38:14.035700Z

oh, and the code is missing a closing paren

borkdude 2021-01-07T18:38:29.035900Z

Feel free to PR a change

nate 2021-01-07T18:38:47.036100Z

sure thing

nate 2021-01-07T18:42:06.036300Z

done

nate 2021-01-07T18:42:28.036800Z

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

borkdude 2021-01-07T18:42:55.037Z

:-D

borkdude 2021-01-07T19:53:34.037400Z

@pez btw, clj-commons/fs also works with bb: https://github.com/babashka/babashka/blob/master/doc/projects.md#clj-commonsfs

borkdude 2021-01-07T21:02:44.038300Z

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

πŸ‘ 1
πŸ’ͺ 1
πŸš€ 1
borkdude 2021-01-07T21:03:51.039100Z

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

borkdude 2021-01-07T21:06:01.039500Z

And here is the news of december 2020: https://github.com/babashka/babashka/blob/master/doc/news.md#2020-12