This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-11-30
Channels
- # adventofcode (95)
- # announcements (17)
- # babashka (28)
- # beginners (107)
- # calva (34)
- # clj-kondo (7)
- # cljs-dev (20)
- # cljsrn (1)
- # clojure (95)
- # clojure-europe (41)
- # clojure-italy (3)
- # clojure-nl (5)
- # clojure-spec (7)
- # clojure-uk (4)
- # clojurescript (77)
- # cursive (7)
- # data-science (1)
- # datalog (4)
- # datomic (12)
- # events (3)
- # fulcro (32)
- # graalvm (2)
- # hugsql (19)
- # introduce-yourself (4)
- # jobs (2)
- # lsp (20)
- # membrane-term (19)
- # numerical-computing (1)
- # off-topic (8)
- # pathom (3)
- # polylith (17)
- # portal (42)
- # re-frame (7)
- # reagent (32)
- # remote-jobs (1)
- # shadow-cljs (86)
- # spacemacs (3)
- # tools-deps (52)
- # uncomplicate (1)
- # xtdb (23)
fyi @borkdude - figured it might be fun to have babashka on apple silicon. Turns out graal support doesn’t seem to be there yet so I initiated some activity on the relevant graal ticket at: https://github.com/oracle/graal/issues/2666
I've been following the discussion, subscribed a while ago. Thank you for looking into it.
yeah : ) to me it seems a bit surprising that the activity level is where it is…I suspect a whole lot of devs will be getting their hands on apple silicon cpus and not having support seems just short sighted. We’ll see where it lands, at least they seem responsive
Perhaps they mostly focus on cloud -- consumer electronics isn't where the most money can be saved with native image
maybe…to me the dream of combining the eco system and languages on the jvm with the ability to build native executables is quite a lot bigger than the hype it has (not) been getting
Dominic Freeston writes about how he converted his Cryogen blog to babashka. https://freeston.me/posts/2021-11-29-new-site-generator/
is there a pattern for using babashka as in interactive part in a pipe? Meaning, you drop into a repl, manipulate the input, and then print the output for use in the next step in the pipeline. For example, say I wanted to do something with a subset of my installed brews, but I’m not 100% sure how to transform the json to a newline delimited list for xargs to process and I want to use the repl to come up with that transformation:
brew info --json=v1 --installed | bb repl | xargs ...
yeah 🙂. When I try bb drops into a repl and attempts to execute the json as if it were Clojure
there’s a utility called vipe
that drops you into vim in a pipeline with the input (e.g., ls | vipe | xargs ...
), maybe I’ll have a look to see how that works
it's probably easier to launch brew from babashka and then read the input, launch repl, etc. all from bb process
btw, it looks like vipe
is just a simple wrapper that writes stdin to a temp file, launches the editor of your choice with that file as its argument, then reads the file after the editor exits and prints it to stdout
Works like a charm:
❯ brew info --json=v1 --installed | ./bipe | xargs which
Evaluate 'stdin' to see piped input.
The last return value is piped to the next command.
Use :repl/quit to quit the REPL.
user=> (-> (json/parse-string stdin) rand-nth (get "name"))
"git"
user=> ^D
/usr/local/bin/git
Is random-uuid
not supported in nbb
? I’m getting unresolved symbol errors