Fork me on GitHub

Not sure if there's a better channel for this - recently on HN there was an interest in no-build-system web apps/pages. In the SCI-land, there's scittle, but recently there was also cherry and squint that might be in the same land? I thought a blog post detailing how you could do zero-build web apps with Clojure would be interesting 😉


The squint/cherry compiler can run inside a browser, but it still does a source -> source transformation, so it depends on your definition of build-less. I think babashka + scittle comes closest. E.g. this one: or Babashka + HTMX:


Hey Guys. What a fun with babashka ! @borkdude thanks for your effort here ! Wasn't aware, but now I have covered all 3 important areas for me: frontend (cljs), browser-free (clj) and YAY :female_superhero:my bash (zsh) as well ! It's really fun! Thanks!

🎉 12
❤️ 10
Matthew Twomey17:02:56

I’m working with the babashka process library and I’m having trouble capturing the error message output from a command. As a simplified example, I’m trying this here:

(try (:out (shell {:out :string} "ls nofile"))
         (catch ExceptionInfo e (-> e print)))
How can I capture the error message? The excpetionInfo doesn’t seem to have it?
"nofile": No such file or directory (os error 2)

Matthew Twomey17:02:43

Oooh - no sooner do I ask than I figure it out:

(try (:out (shell {:out :string :err :string} "ls nofile"))
(catch ExceptionInfo e (-> e ex-message print)))


so thats probably written to stderr. try with {:err :string}as well

Matthew Twomey17:02:08

Yep - just realized that 👍 ty

Jeffrey Bay19:02:25

has any thought been given to incorporating readline type support into the babashka repl? it is pretty painful to use without it. we've been wrapping the basic call to bb in rlwrap, which works for that use case, but we're starting to find reasons to hit the repl from within a program, and it would be much easier to use if it was just built into the repl itself...


@U03A0EGF82E The babashka console REPL is as basic as the clj REPL. If you want to have a better experience, you should probably just start the nrepl-server and connect from your favorite editor

Jeffrey Bay19:02:48

i guess that's fair.


You can also get a long way with load-file and (require '[foobar] :reload) and then edit the files in your editor, but reload the evaluation of that file in the console REPL

Jeffrey Bay19:02:29

no, this all makes sense. the idea is to stop after generating a complex data structure and drop the user into a repl. i think i can do that by starting nrepl-server and pausing so they can connect to it, and get the desired functionality.


You can programmatically start the nREPL server as well

Jeffrey Bay19:02:37

hmm - i just tried to use

Jeffrey Bay19:02:41


Jeffrey Bay19:02:05

weird, my editor can't find it but it executes fine. Looks like it should work 🙂 thanks


$ bb -e '@(:future (babashka.nrepl.server/start-server!))'
Started nREPL server at


the reason is probably that your editor is looking for an .nrepl-port file or so - bb doesn't write that by default


You can see some snippet here which does that:

Oliver Marks19:02:21

trying to use the babashka/babashka container but getting java not available please set JAVA_HOME, its a simple script with a bb.edn, is this because its using java to handle the bb.edn file initially ? seems i should not need java as I am using babaska


Java is only used when you have :deps in bb.edn to download them and construct the classpath


If you want to run in a container without java, it's probably better to construct an uberjar first

Oliver Marks19:02:36

ah okay, I was hoping to have a simpler script but, it explains the errors so that's very helpful cheers


@U02DXJUS5JA outside of the container:

bb uberjar foo.jar
Then copy foo.jar into the container and do:

Oliver Marks20:02:34

oh that's neat cheers