babashka

https://github.com/babashka/babashka. Also see #sci, #nbb and #babashka-circleci-builds .
grazfather 2021-04-08T13:16:37.434400Z

I dreamt about babashka last night :face_with_rolling_eyes:

borkdude 2021-04-08T13:29:34.434700Z

Tell us more

😄 1
solf 2021-04-08T13:36:00.434900Z

Maybe it's a typo and he meant he dreamed about @borkdude

2021-04-08T14:08:08.436400Z

If you are using github CI the `setup-babashka` action now supports using CI builds from babashka in addition to normal releases: Example from the tests: https://github.com/turtlequeue/setup-babashka/blob/fff96c154d5aec91d5bbfbb201c5b20f96653084/.github/workflows/check_url.yml#L15-L17

👍 3
2
borkdude 2021-04-08T15:26:42.437100Z

Please note that if you are going to use links from CircleCI directly, these expire after a while, unless github caches these somehow. A workaround for this may be to make your own github project and upload the binaries under a release or something

👍 1
1
borkdude 2021-04-08T15:26:54.437300Z

cc @wilkerlucio

grazfather 2021-04-08T15:27:24.437500Z

I dream about work all the time, but in weird ways that I work on a problem but it’s so separated from reality that it doesn’t work

grazfather 2021-04-08T15:27:43.437700Z

in this case I had a dream that I was porting our makefiles to bb tasks

grazfather 2021-04-08T15:28:02.437900Z

but something about one of the tasks that did something in real life?

richiardiandrea 2021-04-08T18:05:24.439800Z

Question, if I uberjar .bb scripts and I wanted to embed pod binaries in it as well would adding them to resources work and pods/load-pod be able to load from the resources?

borkdude 2021-04-08T18:06:52.440400Z

@richiardiandrea afaik you can't load binaries from a .jar. most projects I know handle this by writing the binary to a temp directory first and executing it from there

richiardiandrea 2021-04-08T18:07:27.440900Z

I see, I liked the idea of self contained jars

richiardiandrea 2021-04-08T18:07:45.441300Z

but I guess that is a bigg-ish feature 😄

borkdude 2021-04-08T18:08:16.441800Z

well, pods are OS-specific too, so you also have that issue

borkdude 2021-04-08T18:08:29.442Z

but it can be done using the way I described.

richiardiandrea 2021-04-08T18:11:55.442500Z

yep I am running in a container, I will just expose some sort of PODS_PATH env var

2021-04-08T18:20:01.442600Z

grzm 2021-04-08T18:37:20.444400Z

I’m seeing an issue with Babashka and protocol method implementations when I use the same name arguments in a multi-arity method implementations. Here’s an example:

grzm 2021-04-08T18:39:32.444700Z

Note that when some-protocol-method is implemented with the same named args (`, in this case as I’m ignoring the args) returns nil`, instead of the constant value passed into the constructor. When they’re named differently (`, and v`), it works as expected.

borkdude 2021-04-08T18:39:50.445Z

Thanks, looks like a bug to me!

grzm 2021-04-08T18:41:45.445300Z

Would you like me to drop this in an Github issue?

borkdude 2021-04-08T18:42:02.445600Z

I will do it now

grzm 2021-04-08T18:42:14.445800Z

Awesome. You rock, @borkdude!

grazfather 2021-04-08T19:07:31.446400Z

Thanks @borkdude

3
grazfather 2021-04-09T13:27:50.458200Z

Yeah… how did that work? Until I saw NL I though the envelope must have been dropped off by hand

borkdude 2021-04-09T13:29:59.458400Z

PostNL (the Dutch mail service) sells stamps that you can activate by hand-written codes they provide online

grazfather 2021-04-09T13:33:02.458600Z

hah! that is cool. I bet it confused even the american mail carriers

borkdude 2021-04-08T19:10:04.446800Z

Did you notice the hand-written stamp?

borkdude 2021-04-08T19:20:51.447Z

Should be fixed on bb master

grzm 2021-04-08T19:30:00.447800Z

Did I mention you rock? 🎸

borkdude 2021-04-08T19:30:08.448200Z

🤘

grzm 2021-04-08T19:30:22.448600Z

Thanks, @borkdude

borkdude 2021-04-08T20:12:05.452400Z

The main open questions for "bb run": 1) Should :depends be dynamic? e.g. :depends (if (System/getenv "FOO") '[x y] '[x]) 2) (How) should (command line) args be passed down to dependent tasks? E.g.:

{x (println *command-line-args*) 
 foo {:depends [x]
bb run foo 1 2 3
3) The way it looks right now bb.edn is going to be "code" heavy which is odd a for .edn file. Maybe this belongs in a .clj file somewhere else? 4) Because the above reason, maybe I shouldn't allow any dependencies between tasks and just make this a "shortcut" system and not a half-featured build system? https://github.com/babashka/babashka/discussions/779

2021-04-08T20:26:01.452800Z

...or wait until how we see how the new keyword argument map shakes out and changes programming habits

2021-04-08T20:26:42.452900Z

hint: I think it will make it even more data-centric

borkdude 2021-04-08T20:47:50.454200Z

@heow yeah. btw, the latest bb already supports that keyword argument map thing (in most cases, fully when I bump clojure to its latest alpha). but even clojure -X:foo:bar:baz :foo 1 '[:bar :baz]' 2 is asking for some kind of "hide this behind a shortcut" solution

borkdude 2021-04-08T20:55:13.455500Z

Btw, would it be wrong of me to bump clojure to the latest 1.11 alpha in bb for the keyword args map feature?

👍 3
1