IRC channel logs

2023-06-20.log

back to list of logs

<KrisKowal[m]>Or, 'get as it were, in the local idiom.
<Zarutian_iPad>how does that jive with pass-by-copy things like structs that gets stuffed over the wire wholesale?
<KrisKowal[m]>I may have misspoken.
<Zarutian_iPad>that is, get eventually stuffed over
<KrisKowal[m]>pass-by-copy reference might have to be awaited to initiate transfer.
<KrisKowal[m]>s/reference/references/
<KrisKowal[m]>They might not, though. I need to ask around.
<Zarutian_iPad>ACTION has finally gotten https://api.val.town/v1/express/zarutian.ocaps_ink working enough for others in the ocap community to see but the ink script needs quite the work and additions.
<Zarutian_iPad>ask around I think js`E.get()` was made precisely to avoid the await
<KrisKowal[m]>That can’t be the whole story, since decomposing a remote record is useful without the await.
<KrisKowal[m]>But I’m asking around :-)
<Zarutian_iPad>oh, yes I think there is more to it.
<Zarutian_iPad>in the same vein I made async_ops that can make many programmers a bit temporal queazy.
<KrisKowal[m]>You do not need to await a remote pass-by-copy to cause it to be marshalled.
<Zarutian_iPad>you thought I was under that impression?
<KrisKowal[m]>Your question made me question my assumptions.
<Zarutian_iPad>presumably to our gain? ;þ
<KrisKowal[m]>And I’m not clear what impression you had, in any case.
<KrisKowal[m]><Zarutian_iPad> "ask around I think js`E.get..." <- That is, I do not know what await E.get avoids.
<KrisKowal[m]>In this example, the `await` is not avoided.... (full message at <https://libera.ems.host/_matrix/media/v3/download/libera.chat/6efdb83a3444bc8a2a01d679fe467691bf7d95c1>)
<Zarutian_iPad>I think of E.get is the promise pipelinable equiv to javascript [] accessor
<KrisKowal[m]>That is true.
<KrisKowal[m]>E.get(far)[name] would be equivalent to far~[name].
<KrisKowal[m]>But all awaits are conserved :-). Where once you got a field from a record, now you get a promise for a field from a promise for a record.
<KrisKowal[m]>Or rather, an ERef
<Zarutian_iPad>aha! There I disagree with you. On the awaiting part that is.
<Zarutian_iPad>if Boolean.prototype had .pick() that works like the ? : trinary operator, plus equiv for numbers/bigints there is little you can not loadshift onto the other remote vats
<KrisKowal[m]>Thank you to everyone here who helped me make this argument expressible https://github.com/ocapn/ocapn/issues/54#issuecomment-1597880841
<juliana[m]><isd> "juliana: do you just mean the..." <- I should have been clearer. Guile has a unique `undefined` that is non-standard. It's equivalent to the hack of `(define void (if #f #f))` - the value Guile returns from `(if #f #f)` is `undefined`.
<KrisKowal[m]>I suppose that makes Guile in particular uniquely qualified among Schemes to round-trip JavaScript’s undefined.
<KrisKowal[m]>Which suggests it was a good choice to use #f instead of undefined in the actor function application convention.
<KrisKowal[m]>(I think Agoric uses undefined)
<KrisKowal[m]>(But I suspect that we’d handle false gracefully if we received it)
<KrisKowal[m]>((That might be too strong of a claim. We use === undefined a lot because coercion in JavaScript is not pretty.))
<jfred>Hm. Coming to this as a user, but some of the Goblins code I've written uses Goblins objects as a thin wrapper around lambdas for the purpose of making them available to objects in another vat. Requiring methods feels like it would make that messier
<jfred>This line in my Horton implementation, for example: https://gitlab.com/jfrederickson/guile-horton/-/blob/5ea8b8fc61829e383f857b182c49bb16738d66e7/horton.scm#L189
<KrisKowal[m]>I am not proposing that we require methods.
<KrisKowal[m]>I am proposing that we forbid mixed-mode actors that are both objects and functions.
<KrisKowal[m]>I’m also proposing that method names are always symbols in Scheme and always strings in JavaScript.
<Zarutian_iPad>I take it they will be the same bytewise?