Fork me on GitHub

When an exception gets thrown and I catch it, I get a stacktrace that seems to only point to babashka / sci internals (see for an example stacktrace). Is there something I can do to get the location in my code where the exception occurred? Babashka itself does this if I don't catch the exception, but I want to catch it so I can print a nicer error message before exiting. Apologies if this has already been asked and answered; I tried searching this channel, but "in:#babashka exception" turns up a lot of hits. πŸ˜…

βœ… 2

Amazing! Thanks! πŸ™‚


Here is an article for how to enable vulnerability scanning on dependencies bundled in a native image, like babashka: If someone would like to enable this and show that it works, feel free


Hello, everyone. I want to share something that I made with Babashka and follow up with a question. So I made this middleware function and a main so that I can have live reload just with babashka to serve html (or htmx) using a lot of mechanisms that htmx provides (websockets client, swapping html fragments). With some patches here and there, it works... surprisingly well! (for my use case, at least) I also managed to make CSS changes play nicely even using tailwindcss. the video below is that code in action So I decided that I want to β€œshare” this code, so at least that I can use the same code in several of my projects, and others that might want to use it as well. How do you distribute code like this? also other than babashka, I also have been using this code in Clojure JVM with just small changes, but the way I use it is to copy the source and put all in my extra-classpath and deal with code differences, which is not ideal I think, so how do I approach this? Any pointers would be appreciated.


A smallest example that you can try with just cloning and babashka is here the video above is my code playground that uses the same live reload (you can see the project here, need tailwindcss here)


Looks super great! Sharing code is usually done by making a library


You can make a library (both for bb and JVM clj) by putting code in a github repo and adding a deps.edn, that's it


Then you can use the library by adding it to bb.edn (for bb) or deps.edn (for JVM clj) by e.g. {:deps {io.github.keychera/panas.reload {:git/sha "..."}}}


Thanls for the pointer @U04V15CAJ! I'm gonna try it as soon as I got the chance


just wanna report back here a little, I just tried it and it work seamlessly, kinda feels like magic honestly, just like my overall experience with clojure anyway, just also wanna say thanks again @U04V15CAJ

❀️ 2

whats my best bet for simple http with simple routing hhtp kit http-server ? how about routing ?


yes, httpkit http-server is built-in


if your goal is to simply server static files, then you can use:


I basically want a single url which checks for the existence of folders


I saw http-server and http-kit but thought they basically did the same thing, I will take a look at ruuter cheers


http-server uses http-kit


but it implements a file browser


kibit-style linter that can run with babashka

😍 2