Fork me on GitHub
#babashka
<
2020-05-08
>
sogaiu00:05:50

saw redbush mentioned in #vim -- there's this piece for bencode in rust: https://github.com/jasilven/redbush/blob/master/src/nrepl/bencode.rs

borkdude06:05:33

I used that. See the issue in that repo

borkdude06:05:33

I asked if he could extract it into a library

borkdude06:05:43

There is one Rust example of a pod already

borkdude06:05:11

but the code is very boilerplatey. I wonder if it can be made nicer with the serde crate

sogaiu06:05:32

i had briefly looked at the examples but didn't realize it was the same code ๐Ÿ˜…

sogaiu06:05:46

i haven't resumed my rust studying yet -- currently trying to absorb c first ๐Ÿ™‚

Crispin10:05:12

I would like to make spire also a pod. Without needing a separate binary build. could there be a way to have babashka launch the existing bin with and arg, say spire --pod?

borkdude11:05:53

The command line option seems good to me

Crispin10:05:57

or maybe by babashka setting the OS environment?

jeroenvandijk10:05:16

You would wrap your spire binary with some babashka wrapper code. I think something goes wrong in the return value

Crispin10:05:42

ok cool. so there could be a pod.epiccastle.spire thatwraps and launches spire.

borkdude11:05:32

No. Spier itself can behave as a pod. Pods can declare their namespaces to babashka. No need to create a wrapper or other binary

๐Ÿ‘ 1
borkdude11:05:59

Sorry for the typo - on mobile

jeroenvandijk10:05:00

I think so. Iโ€™m a bit lost in the protocol. But Iโ€™m guessing this should be possible

jeroenvandijk10:05:23

Iโ€™m very new to this too. I was just trying something ๐Ÿ˜…

borkdude11:05:30

See doc/pods.md and the 4 examples

borkdude11:05:58

The command line option โ€”pod for spire seems good to me

borkdude11:05:20

The pod-babashka-hsqldb might be the best example since itโ€™s more defensive and propagates exceptions to babashka

borkdude11:05:47

I can help but mostly afk today

Crispin11:05:10

All good. need to have a muck around first.

borkdude20:05:35

Updated the hsqldb + clj-kondo example here to use the pod-babashka-hsqldb pod: https://github.com/borkdude/babashka/blob/master/doc/examples.md#find-unused-vars