This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-09-27
Channels
- # announcements (2)
- # asami (25)
- # babashka (124)
- # beginners (46)
- # calva (55)
- # cljdoc (70)
- # clojure (68)
- # clojure-australia (2)
- # clojure-dev (63)
- # clojure-europe (38)
- # clojure-nl (1)
- # clojure-spec (1)
- # clojure-uk (8)
- # clojurescript (56)
- # community-development (4)
- # conjure (1)
- # copenhagen-clojurians (1)
- # core-async (1)
- # cursive (3)
- # datahike (5)
- # datomic (183)
- # depstar (2)
- # figwheel-main (10)
- # fulcro (20)
- # honeysql (2)
- # hyperfiddle (1)
- # integrant (68)
- # jobs (6)
- # jobs-discuss (5)
- # juxt (1)
- # malli (13)
- # off-topic (8)
- # pathom (2)
- # rdf (10)
- # reagent (11)
- # remote-jobs (1)
- # rum (1)
- # shadow-cljs (69)
- # spacemacs (1)
- # sql (5)
- # tools-build (51)
- # tools-deps (6)
- # xtdb (24)
Is there a limit to the number of threads running inside babashka? If yes, is there a way to increase it?
Sure, I am trying to call multiple command line programs concurrently using babashka
think of calling a function with 10 parameters, but that could be handle asynchrnously.
I am currnetly usuing the future
function for acheiving asynchronousy
but babashka only launch 3 function calls at the time.
Is it clearer?
Have you tested this with normal Clojure? I doubt this is specific to bb. It's not limited to 3 threads by default.
Nope, I could try.
I use process and fuure
really just (future (process "some args"))
You don't need to use futures with babashka.process btw, processes are already their own process
thanks ð
Install a bb script as a brew-installable CLI: https://gist.github.com/borkdude/1a53bfff44fa3d4f262148e9e995a226
Perhaps something similar is possible for scoop as well @UBLU3FQRZ? ;)
This is relatively close: https://github.com/littleli/scoop-garage/blob/master/say-hello.json
not really. In scoop the philosophy is that project should be fairly "enclosed" that's why you would have to distribute bb along with your script(s)
then I don't understand. when you install the clojure CLI which needs java, you can depend on the other java package. why not the same for bb
if you want to make a shim, that's a single executable. this program needs to sit in the same directory as the package
I understand. But when you install the clojure CLI, surely it won't install its own internal java?
Perhaps we can write a documentation page how to package your bb script as a brew/scoop CLI :)
I made: https://github.com/babashka/neil Feel free to add a scoop for it with a .bat shim which depends on bb and preferably re-uses it
we may need to add neil.cmd
or neil.bat
with command supporting windows. Then I can actually make a nice manifest with dependency and shim which just run babashka I think.
btw I have a feeling there is something spinning up here ð do you plan to do a whole bunch of small useful utilities?
ok, if this should somehow spin off to a shape of a bigger thing (collection of scripts) let me know if you like to spin off a dedicated scoop bucket
hmm, you may want to do (github) releases. That makes checkver + autoupdate work for you.
checkver is checking for the new version... there is also a PS script checkver.ps1 and autoupdate basically do the automatic manifest update
then I can make a shim which will make it accessible the same as babashka itself is available
@UBLU3FQRZ Actually I did this for brew: https://github.com/babashka/homebrew-brew/blob/6ef53a05896337ead6adc890059b34bf7c5de268/Formula/neil.rb#L5 No need for release, you can directly get a zip from a commit
@UBLU3FQRZ What is a bank holiday?
bank holiday refers to all public holiday... we have Czech Statehood day https://en.wikipedia.org/wiki/Public_holidays_in_the_Czech_Republic
So the behavior I was seing is that I am creating a list of argument with products between two sets (for [a [1 2] b ["a" "b" "c"]] (process [a b])
and then process was executing the first group 1 x ["a" "b" "c] first, before executing the 2 x ["a" "b" "c].
I circumvent the behavior by making a flat list of arguments and then use map over that list.
I don't understand why that happens though.
could also be related in how you dereference the processes (if you're doing that). it's hard to say without seeing the program
I use process/check to deref
Interesting ð
Yes, it is intended to block once the process have been launched.
@borkdude looks like babashka can not be installed on the default raspberry pi OS (formerly raspian) or is there a trick Iâm missing? Happy to help improve the docs also when I figure it out. https://github.com/babashka/babashka/issues/241