Fork me on GitHub
#nbb
<
2022-06-29
>
skynet18:06:23

is it possible to use babashka pods in nbb?

borkdude18:06:53

That's an interesting idea but currently not. Which pod would you have liked to use?

skynet18:06:19

well, it's related to the TUI interface I was thinking about. it looks like there are tons of great tools for making that in JS, but the interface is for a big stateful Clojure app I have so I'm trying to figure out if pods is a good sort of IPC interface from a nbb/JS cli frontend to the backend Clojure/graalvm native image app

borkdude18:06:27

in that case maybe trying to do it Clojure makes more sense then

skynet18:06:20

from a practical view that makes sense. but I'm not in a hurry and have been running into this issue of IPC protocol in general. would it be possible in theory to have a nodejs babashka pods client? otherwise maybe I just do some socket based approach

borkdude18:06:50

> would it be possible in theory to have a nodejs babashka pods client? Yes, in theory that is possible and would be cool to have.

👍 1
borkdude18:06:02

You can see how someone did it in common lisp and python here, kind of: https://github.com/rorokimdim/stash#babashka-pod-support

borkdude18:06:28

I think the pod function invocations would have to become async though due to the nature of Node.js

skynet18:06:55

thanks, I'll take a look at that project. I love the concept of pods in terms of a structured interface between processes. I always feel dirty parsing raw text output

borkdude18:06:19

There is already an nREPL server in nbb which uses the bencode format: https://github.com/babashka/nbb/blob/deacd88a9fe711ee40ee551a40ed2a6f60011635/src/nbb/impl/nrepl_server.cljs#L280 That might help somewhat in implementing

👍 1