13:33
<devsnek>
is anyone else super confused that realms are on the agenda for stage 3
13:35
<ryzokuken>
...because it's been years since they were Stage 2?
13:39
<devsnek>
no cuz it doesn't appear that they solved the issue brought up last time it was presented
13:47
<littledan>
devsnek: What do you see as the important unresolved issues?
13:47
<littledan>
I think the slide deck proposes resolutions to everything
13:48
<devsnek>
call boundary
13:48
<littledan>
we frequently have a pattern in TC39 where people raise directly contradictory points and the resolution is, "choose one over the other"
13:48
<devsnek>
i don't think this proposal solves the criteria set out for it with the call boundary
13:48
<littledan>
which criteria are unsolved by the current spec text?
13:49
<devsnek>
basically all of this https://gc.gy/89655536.png
13:49
<devsnek>
all of the examples in your explainer break of any of the functions return an object lol
13:50
<littledan>
I don't think it's very polite to lol at proposals
13:50
<littledan>
these examples can work through the use of membranes or other indirect techniques
13:50
<devsnek>
i might expect the proposal to include membranes or other indirect techniques in that case
13:51
<littledan>
well, membranes are excluded because membranes are more of a pattern that can be taken in many different directions, rather than something which only has one implementation
13:51
<littledan>
the champions have provided a membrane library that can be used with the proposal
13:52
<devsnek>
if objects make the api throw, there needs to be a built-in way to deal with that, is what i mean
13:52
<devsnek>
if recursive proxy magic is the answer, i'd want an api to create recursive proxy magic
13:56
<devsnek>
littledan: i think new Realm({ unsafeSandboxWillBeBrokenAllowObjects: true }) would be fine too
14:01
<littledan>
OK, it's true that this point was raised last time, and I just disagree with it
14:02
<littledan>
you can make internal slots work by always using an object with the internal slots that was allocated from the outside
14:03
<devsnek>
i'm just not sure how i would use this proposal for anything in its current state
14:05
<devsnek>
and the importValue api seems like a footgun considering it might give you an object or a function which returns an object
14:13
<devsnek>
littledan: do you have a link to the membrane library that can be used with this proposal? i can't find it from the repo
14:17
<littledan>
I really don't understand this concept of a footgun. It feels like everything under the sun gets accused of being a footgun
14:17
<devsnek>
i would always use evaluate instead of importValue
14:17
<devsnek>
cuz with evaluate you can wrap the function to catch its return value
14:19
<devsnek>
also proxies can't get through the call boundary
14:19
<devsnek>
do i have to pass lists of object keys as comma separated string values
14:21
<devsnek>
i'm just trying to imagine how i'd port my cloudflare worker test thing from node vm to this
14:29
<littledan>
well, evaluate and importValue both do the exact same function wrapping
14:29
<littledan>
it's just that they differ in terms of sync/async and CSP
14:29
<devsnek>
no i mean i would do function wrap(f) { return (...args) => { f(...args); } }
14:29
<devsnek>
no return value at all
14:30
<littledan>
OK, sure
14:30
<littledan>
I mean, depends on what you're trying to do
14:30
<littledan>
you can also do ,0 of course
14:30
<devsnek>
i'm not trying to sandbox bad code
14:30
<devsnek>
i'm just trying to virtualize
14:31
<littledan>
well, this Realm proposal is simply less expressive than the Node vm module
14:31
<littledan>
it doesn't aim to do everything; it aims to meet the goal of providing some kind of boundary with a little bit of integrity and separation (though not Spectre-level)
14:32
<devsnek>
sure but in that process i'm not sure how you do anything with it
14:32
<devsnek>
like one of the the examples in the explainer adds two numbers together
14:32
<devsnek>
very cool but now what if that function does something more complex
14:33
<littledan>
well, I'll find the membrane example for you
14:33
<devsnek>
also how do membranes work with importValue
14:33
<devsnek>
as far as i can tell there's no hook point there
14:34
<littledan>
no, but there's no hook point with evaluate either...
14:34
<devsnek>
with evaluate you insert makeMembrane(v) or something right?
14:35
<littledan>
you can also replace importValue with something which does the I/O and transpiles the module system (this is how all module system virtualization works today anyway)
14:35
<littledan>
or, if you're in Node, sure, you can hook it
14:36
<littledan>
I think it's quite important that we have a version of evaluating code in Realms which doesn't violate strict CSP policies
14:36
<devsnek>
i'm just thinking like, import handleRequest from a module, pass a complex request object to it, and use the complex return value
14:36
<devsnek>
curious to see how much abstraction i need for that
14:37
<littledan>
I don't understand what you mean or what you're trying to do
14:37
<devsnek>
mocking a cloudflare worker environment
14:38
<devsnek>
get an http request from node's http stack, turn it into something the cf worker understands, pass it into the worker code which is inside the realm, get the return value out, turn it into a response node understands
14:39
<devsnek>
seems like a fairly standard use case for virtualization
14:41
<devsnek>
with realms api, you could even make a version that runs in the browser
14:41
<yulia>
I am a bit lost, can you sketch out how you think this would work in realms? I thought it was pretty straight forward how you get the result out of a realm
14:41
<littledan>
yeah, basically with the callable boundary realms proposal, you have to serialize all of these operations in terms of primitives
14:42
<devsnek>
yulia: a cloudflare worker is a module which exports some functions. in the old realm proposal i think it would've looked something like const { handleRequest } = await realm.import('./cf-worker-cide') and then const r = fromFetchResponse(handleRequest(toFetchRequest(node request)))
14:43
<littledan>
right, you can't just share objects synchronously with this callable boundary realm proposal, but you can build a membrane out of it, see https://github.com/caridy/irealm
14:43
<littledan>
(and it turns out that this doesn't need symbol as weakmap key)
14:44
<devsnek>
so i can import irealm and get something more like the old proposal?
14:44
<littledan>
with this support library, yes
14:44
<devsnek>
i wonder what the perf overhead is 😰
14:45
<littledan>
well, that seems like something we can examine during Stage 3?
14:45
<littledan>
also there may be room for improvement in Proxy performance
14:45
<devsnek>
sure...
14:46
<devsnek>
i would probably just keep using node vm
14:47
<devsnek>
i'm just not sure why this is better than adding an "allow objects" option
14:47
<littledan>
it's fine with me if you keep using node vm
14:47
<littledan>
well, the presentation explains the motivation for the callable boundaries approach
14:47
<devsnek>
or for that matter moving GetWrappedValue to userland
14:47
<devsnek>
since afaict it doesn't do anything js can't do?
14:48
<littledan>
OK, I believe this has already been explained in several threads and presentations that you've read
14:48
<littledan>
so I'm not sure what I could say beyond repeating that content
14:49
<devsnek>
aight
14:49
<devsnek>
my point is just, if this is unfulfilling to the point of a case like mine not using it, it doesn't seem to match the problem the committee wanted to solve
14:50
<littledan>
well, I explained how it can fulfill your use case
14:50
<devsnek>
sure, but that's a gamble on my part
14:51
<devsnek>
if the perf can't be solved, i'm stuck being the asshole who blocks stage 4
14:51
<littledan>
because of performance?
14:51
<littledan>
I guess I'd be OK with optimizability being a Stage 4 blocker, personally
14:52
<littledan>
much of the motivation for this proposal is that it is more optimizable than creating whole iframes
14:53
<devsnek>
rereading some stuff, i didn't see anything explicitly explaining why an option on the constructor is unacceptable
14:53
<devsnek>
could've missed it
14:55
<littledan>
well, the argument against that option would be the same as the argument for callable boundaries in the first place
14:55
<littledan>
namely that it's a sort of integrity/boundary footgun
14:56
<devsnek>
i mean if the alternative is pushing people to use iframes or node vm
14:56
<devsnek>
lol
14:58
<littledan>
well, yeah, I think we will push people to iframes or node vm if we can't agree on callable boundary, since it will make it hard for the proposal to move forward at all
14:58
<devsnek>
like as one of the maintainers of node vm, i was really hoping to be able to deprecate it
14:59
<devsnek>
because it is awful
15:00
<littledan>
Node vm is really much more expressive than even the non-callable-boundaries Realm proposal
15:00
<littledan>
so it's not clear to me what it would mean to deprecate it
15:01
<devsnek>
well compartments are supposed to provide host hooks right?
15:01
<devsnek>
with those two things we could kill it
15:02
<littledan>
yes, that is possible. Similarly, sharing objects directly as a Realm constructor flag could also be a follow-on proposal
15:03
<devsnek>
i mean it sounds like you'd be against that
15:04
<littledan>
I'm not personally against it, but I understand the arguments against it
15:04
<littledan>
I don't know if we'll ever get consensus on either compartments or shared-object Realms
15:04
<littledan>
to go to Stage 3 on this, we have to be OK with the potential future where they never happen
15:22
<devsnek>
littledan: one more question i guess... what about irealm prevents it from being something we provide in stdlib
15:22
<devsnek>
is there some weird opinionated choice it makes?
15:24
<littledan>
well, maybe it could eventually be in the stdlib; I wouldn't be opposed to that, but I also don't see why we should block on it.
15:25
<devsnek>
it seems like a reasonable alternative to throw a TypeError but 🤷‍♂️
15:35
<littledan>
it adds a lot of complexity. I'm OK with starting with something simpler
17:17
<ljharb>
(i can't post in the delegates channel btw)
17:17
<ljharb>
why is matrix hijacking the Mac OS's default command-` keyboard shortcut to switch windows? can i turn that off?
17:17
<jridgewell>
Same
17:18
<ryzokuken>
why is matrix hijacking the Mac OS's default command-` keyboard shortcut to switch windows? can i turn that off?
cmd + tab?
17:18
<ljharb>
no, that's to switch apps. command-tilde switches windows within the same app
17:19
<ryzokuken>
ah, I see. Let me see why it's doing that.
17:19
<Tierney Cyren>
how do I join a space?
17:19
<Tierney Cyren>
or spaces or whatever it's called
17:19
<ryzokuken>
how do I join a space?
https://matrix.to/#/!hmsRHUEXriRovkvcin:matrix.org?via=matrix.org&via=igalia.com&via=mozilla.org
17:19
<ryzokuken>
spaces are just rooms with special flags set
17:19
<ljharb>
is there no threading, it's just quoting replies?
17:20
<ryzokuken>
yeah, no threading yet, no
17:29
<shu>
can someone give me permission to send messages in the delegates channel
17:30
<Tierney Cyren>
cc @ryz
17:30
<ryzokuken>
tab
17:30
<ryzokuken>
😛
17:30
<Tierney Cyren>
why didn't that autocomplete
17:30
<ryzokuken>
you need to hit tab manually
17:30
<ryzokuken>
sadly, I don't have access.
17:30
<ryzokuken>
cc littledan
17:33
<SoftwareChris>
can someone give me permission to send messages in the delegates channel
me as well. please and thank you :)
17:46
<yulia>
ljharb: we can't hear you
17:46
<ljharb>
hm, ok thanks
17:47
<ljharb>
brb
17:49
<yulia>
Issue and answer ljharb https://github.com/bocoup/test262-report-issue-tracker/issues/27#issuecomment-840203670
17:51
<bakkot>
does anyone know how to make the interface on element.io less noisy, or am I going to download a desktop client? I would like to be able to see more than like five lines of the chat at a time
17:52
<Tierney Cyren>
zoom out?
17:52
<yulia>
bakkot: do you mean, the spacing?
17:52
<ljharb>
ooh, i enabled "irc style layout" and it's much nicer and more compact (@bakkot)
17:52
<bakkot>
ljharb: nice! where's that?
17:53
<ljharb>
in "advanced" appearance settings
17:53
<ryzokuken>
settings > appearance
17:53
<bakkot>
yulia: yeah, I mean the the whitespace to actual content ratio
17:53
<Michael Ficarra>
@bak
17:53
<Michael Ficarra>
bakkot: the settings
17:54
<yulia>
go to this thing
17:54
<yulia>
click "show advanced"
17:54
<bakkot>
sweet, thanks
17:54
<yulia>
^ that
17:54
<bakkot>
I actually had not managed to find the settings yet
17:54
<bakkot>
they were under my username, which is not where I was expecting to find them
17:55
<littledan>
ooh, i enabled "irc style layout" and it's much nicer and more compact (@bakkot)
Oh wow this is great, thanks for the pointer
18:28
<yulia>
shu: i think we are still waiting on editor signoff is that right?
18:32
<shu>
yulia: for TLA spec?
18:33
<yulia>
yeah
18:34
<shu>
yes, still needs editor sign off before mergeable
18:34
<shu>
i need to work through your example still
18:34
<shu>
in general the TLA spec is just very difficult to understand :(
18:37
<yulia>
yeah :( i am happy to pair on it if it helps
18:38
<yulia>
i would like to refactor the module loading spec from loops to recursive calls? i think that would help?
18:38
<yulia>
like, eventually, as an editorial change
18:39
<shu>
i'm tempted to not change that stuff because we'd need to review the recursive versions again
18:39
<shu>
i'm also not excited about chasing down all the outdated spec comments in the implementation
18:42
<yulia>
fair
18:42
<yulia>
same
21:03
<Richard Gibson>
can someone grant me permission to post in Delegates?
21:04
<ryzokuken>
Aki: Robin Ricard Rob Palmer ^
21:05
<Robin Ricard>
someone should remove me admin rights
21:05
<Robin Ricard>
or can I do it to myself?
21:06
<Robin Ricard>
I removed my own admin rights
22:08
<shu>
someone should remove me admin rights
this is also how i aspire to live. please, unburden me of responsibility
22:47
<Aki>
this is also how i aspire to live. please, unburden me of responsibility
i take POLA as far as I can in every aspect of my life. everyone was shocked i took my new job after i spent months adamantly refusing the promotion
23:52
<shu>
don't get me wrong, i'm not touting my moral character here
23:52
<shu>
i'd take authority without responsibility