IRC channel logs

2026-04-22.log

back to list of logs

<zip>is cap'n proto an implementation of OCapN (ie compatible with goblins) or its own thing?
<zip>s'pose I could join the channel
<zip>oh while I'm poking around in the docs I found https://files.spritely.institute/docs/guile-goblins/0.17.0/Nonce-Registry.html and would like to gently point out that "nonce" is, in addition to being a term-of-art for "number used once", also british english slang for paedophile
<jfred>zip: Cap'n Proto isn't compatible with Goblins/OCapN; its RPC protocol is also based on CapTP, like OCapN, but it makes some different design decisions. There was initially some work from the Cap'n Proto side towards compatibility, but the person spearheading that sadly passed away :'(
<fantazo>jfred: is currently goblins only compatible with itself? I'm asking, because I don't know the current state of OCapN implementations
<zip>jfred: aha, thank you for clarifying
<jfred>fantazo: There's been recent successful interop testing with ridley's DObjects (https://codeberg.org/ridley/DObjects), and dthompson just mentioned last night that they'd just gotten interop with endojs (https://endojs.org/) too
<jfred>I haven't seen the latter yet myself but I'm eager to see what's cooking
<probie>How hard would it be to implement something in the spirit of magic-wormhole using goblins? In an ideal world, it feels like it should involve remarkably little code, but is there a reasonable choice of netlayer for OCapN?
<identity>for those unfamiliar, magic-wormhole is a way to easily and securely transfer files from one computer to another in a peer-to-peer fashion, using a rendezvous server to negotiate a connection
<jfred>probie: You might be interested in https://spritely.institute/news/goblinshare-secure-peer-to-peer-file-sharing-with-goblins.html
<zip>I'm thinking my way through talking to an API properly. Connection pools, respecting rate limits, caches, refreshing tokens, perhaps even getting a little smart with caching paginated data. I hadn't considered goblins, but I think a lightbulb is going on with respect to why actors, and why semantic web
<zip>because I kinda want an actor that manages a site and can handle rate limits, reauthentication, etc. And so at some point I don't want a function call so much as I want to enqueue a request and some way of connecting the response back to the requester, which means maybe a channel to talk back to the requester, and so on... and ah, that's actors
<jfred>yeah the more I've gotten to know goblins the more I'm occasionally frustrated when other things don't do what goblins does :P
<dthompson>hey everyone :)
<identity>hi dthompson
<kestrelwx>Hello!
<jfred>ACTION waves
<dthompson>thanks for answering questions while we were offline jfred
<dthompson>A+
<janneke>when importing json-parse ..->.. JSON: {parse (data) {return JSON.parse (data);}}
<janneke>and using (json-parse "}invalid-json{") from scheme, how do i catch the exception?
<janneke>i triet with-exception-handler and catch #t, but they don't seem to work?
<janneke>*tried
<jfred>dthompson: no prob :)
<dthompson>janneke: you have to catch the exception on the JS side
<dthompson>it's like saying how do I catch a C++ exception in Scheme? they're completely different things
<dthompson>wasm is an abstract machine running on some host. there's nothing built-in for it to know how to handle JS exceptions
<janneke>dthompson: thanks, that makes sense!
<janneke>dthompson: doesn't that mean that most every import needs to be wrapped in a javascript false_if_exception / null_if_exception function or something? most every javascript code can throw exceptions, i think?
<dthompson>janneke: in practice I haven't found it to be necessary
<dthompson>sometimes I need to handle an exception but it's rare
<janneke>dthompson: interesting...but json-parse is certainly an exception (hehe) to this rule?
<janneke>(i've seen problems with large ~1MB json strings getting truncated somewhere and then parsing fails)
<dthompson>yeah because it throws exceptions when there are parsing errors
<dthompson>so you need to catch that and return some value to scheme to indicate failure
<kestrelwx>dthompson: For `guix shell guile guile-hoot -- hoot repl`, I see https://paste.debian.net/hidden/de7320eb.
<kestrelwx>I'll file an issue/try look into it tomorrow.
<dthompson>kestrelwx: known issue. fixed in main.
<kestrelwx>I see, my bad.
<dthompson>it's my bad. I left the repl.js file out of the last release :(
<kestrelwx>I'm fixing up this WebIDL bindgen thing, still a big cludge but I think it's making proper modules now. :D
<kestrelwx>I haven't made any tests yet, so wanted to see if it works in the REPL.
<dthompson>oh cool!
<dthompson>very exciting
<cwebber>hi
<jfred>hi hi!
<cwebber>doing some python and wishing it were scheme ;)
<jfred>heheh, I'm doing some jinja-templated yaml and wishing it were scheme
<jfred>no I lied this file is erb-templated yaml
<cwebber>templated yaml is the worst
<dthompson>ah good ol' erb + yaml
<dthompson>did a lot of that back when I worked on rails apps
<jfred>the number of times I have broken a document because some templating mucked up the indentation has me really really appreciating s-expressions and quasiquoting
<jfred>hasn't happened recently but that's just because I'm traumatized and know where all the footguns are now
<dthompson>if I have to template the damn thing anyway then what is even the point of yaml? bleh
<jfred>I'm marginally more okay with template strings inside yaml values (ansible-style), because at least then the thing is overall still a yaml document you can parse
<jfred>salt unfortunately is not like that, if you can't run the template you don't have a well-formatted document to work with
<cow_2001>why not a mypy for guile?
<cow_2001>generally speaking, not anything to do with anything said here in the last 24 hours
<cow_2001> https://www.mypy-lang.org/
<cow_2001>daviwil has his own signatures for his sigil
<dthompson>someone could make such a thing. there is typed racket, etc.
<cwebber>there's def interest in static gradual typing for linting
<cwebber>for guile
<cwebber>who wants to work on it? :)
<cwebber>I think dthompson and I would love to work on it if we could fork ourselves into extra subprocesses ;)
<cwebber>we even have some ideas on how it could be done
<cwebber>btw jfred
<cwebber> https://framagit.org/tyreunom/guile-jsonld
<cwebber>which is in guix
<cwebber>so someone did an actual complete version instead of my dorky incomplete thing in pubstrate
<jfred>!!!
<jfred>wait how did I miss this
<cwebber>also oh boy I fully forgot that I published https://gitlab.com/dustyweb/guile-sjson as its own thing
<cwebber>which is really mostly dthompson's json library with fash support
<cwebber>should be updated for the hashmap library in goblins
<jfred>I swear I `guix search`ed but I did not see that library haha - okay, much much less work for me to do, that's a relief XD
<cwebber>well I did all the python I need to
<cwebber>I have a script now to extract beancount data as json so I can work with it in guile yes hahaha yesssss
<jfred>:P
<Gooberpatrol66>is there an ocapn implementation for c?
<dthompson>no
<dthompson>not yet, anyway ;)
<zip>oooh saves me implementing json-ld for my other project in the "i'll never finish it" pile
<zip>(and indeed the "i'll never start it" pile at this rate)
<zip>Today I've been implementing an interesting channel primitive https://lmax-exchange.github.io/disruptor/disruptor.html in guile. I'm sure once I can start it up it'll deadlock instantly.
<jfred>ahhhh, guile-jsonld expects documents in the format used by guile-json... which makes sense since it's widely used, but it's less ergonomic for me to work with alists directly
<jfred>still I'll take it to not have to implement the json-ld algorithms lol
<jfred>zip: I think I'm glad I generally don't find myself needing to worry about performance at that level. (Fintech stuff can be kinda wild heh)