This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-04-18
Channels
- # announcements (1)
- # babashka (39)
- # babashka-sci-dev (59)
- # beginners (60)
- # calva (14)
- # circleci (1)
- # clj-kondo (16)
- # clj-on-windows (1)
- # clojure (95)
- # clojure-europe (5)
- # clojure-norway (2)
- # clojurescript (34)
- # conjure (2)
- # core-async (55)
- # datomic (4)
- # emacs (54)
- # holy-lambda (5)
- # hyperfiddle (2)
- # interop (4)
- # lsp (8)
- # malli (3)
- # nrepl (4)
- # off-topic (34)
- # polylith (5)
- # reitit (3)
- # releases (2)
- # shadow-cljs (85)
- # specter (2)
- # testing (8)
- # tools-deps (12)
How do you plan to use it?
In a lot of cases whenever I've felt the need for socat, i got around it by adding a bb script to do stuff on the socket 😄
i'm writing a really cool thing, part of whose draw is that I can drop babashka scripts in to do various tasks, service discovery, metrics proxy etc. This one is a hybrid zincati-consul bridge that is a fleetlock server and also bridges the unix socket metrics to http-kit
so, I just need to read the socket. (shell/sh "socat" "-" "UNIX-CONNECT:/run/zincati/public/metrics.promsock")
would reading the socket with babashka curl suffice? we ship curl in the image
something like https://github.com/babashka/babashka.curl#unix-sockets and streaming the output might work?
I know you can make an http request to a unix socket with curl, dunno about anything lower level than that though
yeah its just a scheme that curl needs, inst really important
its essentially talking to the socket
yeah if it being an in/outputsream suffices would be great
also if we update to graalvm 17 we could enable the unix socket support java.net.Socket in bb. cc @U04V15CAJ
yeah I think I need some kind of socket API. socat would be nice though, it's a pretty common tool.. same with netcat
for now having your own derived image should work i guess? we can have a think about this one til then.
yup, just made a derived image for this. https://github.com/nivekuil/zincati-consul
Is there some special trick to make bb work with vim-fireplace? I had followed the setup here: https://github.com/rwstauner/jirazzz/blob/main/bb.edn It seems I can connect. But I can't evaluate anything.
are you seeing some errors? in :messages
?
Yeah. It's just this:
Vim(return):E716: Key not present in Dictionary: "response, 'value', [])"
Not sure, maybe fireplace expects something more out of the nREPL impl we have, could try in #vim? I dont use fireplace but a quick look online seems to not give promising experience with fireplace and bb nREPL
I tried #vim already. It's the same nrepl that's in cider, right? Which works fine. I guess I need to open a bug report.
did we try fireplace before @U04V15CAJ, i vaguely remember some conversation long time ago and having issues?
yeah me too for fireplace, not sure how its implemented
> It's the same nrepl that's in cider, right? Which works fine is this true for the bb nREPL?
or does cider add in some middleware too?
this question: https://clojurians.slack.com/archives/CLX41ASCS/p1650373626533409?thread_ts=1650319050.969279&cid=CLX41ASCS
yeah thats why im thinking its something fireplace specific, @U02UHTG2YH5 could you open up an issue in the fireplace repo too?