This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-07-28
Channels
- # asami (1)
- # aws (9)
- # babashka (16)
- # beginners (32)
- # calva (2)
- # clj-kondo (20)
- # cljdoc (6)
- # clojure (35)
- # clojure-dev (25)
- # clojure-europe (11)
- # clojure-india (1)
- # clojure-norway (2)
- # clojure-spec (26)
- # clojure-uk (1)
- # clojurescript (41)
- # conjure (3)
- # css (9)
- # cursive (18)
- # data-oriented-programming (6)
- # data-science (2)
- # emacs (47)
- # events (1)
- # fulcro (15)
- # graalvm (30)
- # gratitude (7)
- # honeysql (27)
- # inf-clojure (4)
- # introduce-yourself (2)
- # lsp (129)
- # malli (7)
- # missionary (21)
- # nbb (17)
- # off-topic (18)
- # re-frame (6)
- # releases (1)
- # shadow-cljs (120)
- # vim (7)
- # xtdb (15)
If I were to give a 3 hour workshop about babashka, which points would you like to see covered (for an announcement page to poll interest). I've got this so far:
** Scripting: moving from bash to Clojure
** Overview of the babashka toolbox (libraries, pods)
** Starting sub-processes: babashka.process
** Managing files: babashka.fs
** Writing CLIs: babashka.cli
** Managing your project with babashka tasks
** Sharing code between clojure and babashka
** Bonus, if time permits: writing a small internal web application
Clearly babashka.fs and babashka.process for me. I'd be very much interested in a small problem approached with Unix tools / bash, compared to how it would look in babashka. Also interested in whether there are differences in error habdling.
One more suggestion: As a lib author/user of a thing thats not currently bb compatible, tips and techniques on how to make it compatible if possible?
Perhaps related or covered in other sections, but maybe something about the different approaches to organizing your babashka code? There is the --config
flag to point to bb.edn files, tasks can be re-usable/downloaded from a URL, etc.
Wonder why in bb.cli this part is named as cmd-opts
, https://github.com/babashka/cli/blob/main/README.md#subcommands:~:text=copy%22%5D%20%3A-,cmds%2Dopts,-%5B%3Afile%5D%20%3Afn, Isn’t it more of a cmd-args ?
For bb.cli, I have several commands. Each command takes a common configuration. Where shall I put it? I don’t want to initialize the config in every command. I wonder if dispatch supports a pre-invocation hook for all commands. Or not, what the following way do you recommend? 1. Define a non-dynamic var, and use alter-var-root to update the value inside the -main function. 2. Define a dynamic var and use binding.
Can I use babashka/babashka.curl
in my Clojure project instead of clj-http?
Is this something intended? Well... it has a clojars JAR.... so probably..?
Yes it would work normally on the JVM.
Nice. It also looks like the API is the same as in clj-http. So no refactoring! 😄
its intended to be a least friction switching 🙂
Other choices that are both compatible with bb + graalvm: • org.httpkit.client (built-in) • https://github.com/schmee/java-http-clj (based on java.net.http) • clj-http-lite