babashka

m3tti 2026-02-25T10:04:56.201809Z

lets say i want to create a babashka "app" so a native compiled thing with my scripts added how would i do that?

m3tti 2026-02-25T10:09:25.087179Z

sorry rtfm -.-

borkdude 2026-02-25T10:09:56.010119Z

no problem!

m3tti 2026-02-25T10:37:33.821199Z

wow @borkdude this is amazing what you did there this is so crazy 😄 i love that. its so KISS man and you get so much out of that. mind = blown !!!

💯 1
2026-02-25T10:38:13.753479Z

He always goes above and beyond 😆

m3tti 2026-02-25T10:39:10.276109Z

one more question just hypothetically. If i do this stuff and want to just add some lets say libraries to babashka would that be also passible i don't mean pods but just simple deps

m3tti 2026-02-25T10:39:30.303389Z

and furthermore how would i invoke the babashka repl again so i can extend babashka 😮

borkdude 2026-02-25T10:41:06.382059Z

since you build an uberjar first, they can contain "simple deps", they would just be bundled into the standalone binary

borkdude 2026-02-25T10:41:19.101959Z

if you want to expose the babashka REPL to your users, just do so via the main function of your uberjar

borkdude 2026-02-25T10:42:03.391199Z

(clojure.main/repl)
Just put that behind your command line logic somewhere

m3tti 2026-02-25T11:12:45.841649Z

wow so that would mean if i would add stuff like ruuter to the debs and create a main calling this function my new created babashka binary would have ruuter in it right 😮

borkdude 2026-02-25T11:13:06.818849Z

yes

m3tti 2026-02-25T11:13:22.149469Z

ok this is crazy 😄

m3tti 2026-02-25T11:36:40.422239Z

wow even pods work 😮 ok you have to load them via your script not the bb.edn but man thats cool

m3tti 2026-02-25T11:45:31.159819Z

or is there a diffrent way to include the pods so that i can use it the babashka project style

borkdude 2026-02-25T11:48:04.280369Z

Yes you can include the bb.edn in the uberjar. I think it's documented in the page . You have to put it somewhere in META-INF

m3tti 2026-02-25T11:59:02.105209Z

but somehow it doesn't load the pod

m3tti 2026-02-25T12:00:06.726599Z

./bb uberjar taskrunner.jar -m uber
{:warning "clashing jar item", :path "META-INF/bb.edn", :strategy :noop}

m3tti 2026-02-25T12:00:45.380039Z

{:paths ["./.scripts" "resources"]
 :pods
 {huahaiy/datalevin {:version "0.10.5"}}
 :tasks
 {:requires ([taskrunner :as t]) 
...
}}

seancorfield 2026-02-25T14:21:42.799519Z

Just been reading the docs for Cream and noticed that it lists java.sql but not javax.sql (where DataSource and its relatives live) -- per Babashka's impl/classes.clj. Is there a specific technical reason that javax.sql isn't included?

borkdude 2026-02-25T14:22:15.757239Z

No reason

borkdude 2026-02-25T14:24:57.267719Z

can add it. as it stands the binary is 300mb now. I will add stuff to make stuff run but at the same time I also want to add testing so I can remove superfluous stuff. PR welcome though

borkdude 2026-02-25T14:25:37.000789Z

have you actually tried running anything yet? it might be that it even works now when you set JAVA_HOME

seancorfield 2026-02-25T14:26:09.618189Z

No, I was asking about Babashka here. Cream was incidental insofar as that's how I noticed javax.sql was missing from bb 🙂

borkdude 2026-02-25T14:26:48.314109Z

Oh that wasn't clear to me. So you're asking to add stuff to bb?

seancorfield 2026-02-25T14:29:36.105359Z

Well, I was asking why it wasn't included really. Mostly curiosity. But it made me wonder if bb could then run next.jdbc if those classes were added -- although I guess you'd need to be able to run certain JDBC drivers too...

borkdude 2026-02-25T14:31:13.983229Z

Bundle size mostly. I had a version of babashka once with next.jdbc and postgres included but I quickly removed it since it felt arbitrary to me to just support postgres. Including all drivers for all databases would bloat bb. There's a feature flag for it though: https://github.com/babashka/babashka/blob/master/doc/build.md#feature-flags And we have sql pods which use next.jdbc

seancorfield 2026-02-25T14:32:41.600879Z

Yeah, and the drivers can be pretty wild... I guess my next question is "why include java.sql then?"

borkdude 2026-02-25T14:34:24.701039Z

we only have java.sql.TimeStamp and java.sql.Date - these were included because some libraries used them, although they weren't doing any db stuff

lread 2026-02-25T14:42:19.030539Z

Out of curiosity, I tracked down the https://github.com/babashka/babashka/commit/b93198c9653bc8cf8409218ef6ec64b2fdceb506 when java.sql.TimeStamp was added, if that helps, @seancorfield.

borkdude 2026-02-25T14:43:03.373629Z

> Compatibility with fipp and puget

borkdude 2026-02-25T14:43:12.698869Z

thanks @lee :)

🫡 1
seancorfield 2026-02-25T14:45:45.928669Z

Ah, that makes sense! Yes, quite a few libraries know about those two SQL types (and sometimes java.sql.Time too) but have otherwise nothing to do with JDBC. That's the whole "every class is its own DSL" thing Rich complained about I guess 🙂 Especially since all three of those java.sql types extend java.util.Date 😞