This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-03-07
Channels
- # announcements (19)
- # babashka (19)
- # beginners (76)
- # bitcoin (2)
- # calva (1)
- # chlorine-clover (1)
- # cider (7)
- # clara (1)
- # clj-kondo (1)
- # cljsrn (1)
- # clojars (4)
- # clojure (139)
- # clojure-dev (65)
- # clojure-europe (2)
- # clojure-uk (2)
- # clojurescript (7)
- # community-development (3)
- # conjure (15)
- # core-async (5)
- # cursive (11)
- # data-science (9)
- # duct (6)
- # fulcro (4)
- # honeysql (12)
- # jobs (3)
- # jobs-discuss (3)
- # keechma (1)
- # malli (31)
- # meander (14)
- # midje (1)
- # off-topic (21)
- # pathom (6)
- # practicalli (3)
- # quil (7)
- # re-frame (10)
- # reitit (6)
- # slack-help (4)
- # tree-sitter (6)
- # xtdb (1)
Are people using babashka to make command-line apps (i.e., more than just personal scripts, ones that are shareable, versioned, etc)? I just came across https://github.com/nubank/docopt.clj, and the first example shows usage babashka. It seems really cool, but it got me wondering how to distribute a util made with babashka. Sharing a gist is the first thing that came to mind 😅 but is there a way to share it as an actual app/executable?
@kiraemclean Welcome! Babashka nowadays has the ability to set the classpath from within a script. Here is an example for camel-snake-kebab: https://github.com/babashka/babashka/blob/master/doc/projects.md#camel-snake-kebab
I was also wondering about how to share/distribute Babashka scripts.. in practice I'm basically trying to decide between making a cli with Clojure and building a native image vs. making a Babashka script (I think I can do everything I want with it, but not actually sure yet). Is that an intended use of Babashka, though? I guess my real question is, is there a good way to package a distribute a Babashka "app", or is that not really what it's for?
apologies for probably missing an obvious answer.. I'm just starting to use Babashka a little bit, but so far only for personal things (which is already amazing!)
It's a very good question. So far people usually put their scripts in a git repo which you can then just clone on your machine, and possibly put it to your $PATH
This is a recent example: https://github.com/robertfw/bunpack
I've been thinking if we should maybe have some central repo for all kinds of scripts that people can contribute to and selectively install from, but I haven't really thought deeply about it
interesting! that could be cool for sure. I guess at the end of the day if you want a platform-agnostic executable you'll have to just make a native image.. I suppose it could still use Babashka though, or just have it as a dependency that could be managed by brew or other package managers..
interesting.. anyway, just got me thinking. I usually put off thinking about how people are actually going to use my code until too late and then regret not making different decisions early on 😆 trying to force myself to finally learn the lesson..
it totally makes sense not to go crazy with packaging/deployment concerns for experiments.
People sometimes also use gists. Here is one for an http server a la python -m http.server: https://gist.github.com/holyjak/36c6284c047ffb7573e8a34399de27d8 But gists are generally a bit difficult to work with if you want to collaborate