00:42
<shu>
could a node user enlighten me on the async contexts proposal, which seems to be largely lifted from the existing node api?
00:43
<shu>
by "automatic tracking through async tasks", how is that implemented exactly?
00:44
<shu>
any time a task or microtask is posted, the entered async local storage at the point of time of posting is remembered by the task? (is it COW?)
00:51
<devsnek>
shu: its like a linked list, each resource points to a parent resource
00:52
<shu>
sorry, i don't understand what that means
00:52
<bradleymeck>
shu: talks on async hooks may be more enlightening on underlying structure of the hooks used
00:52
<devsnek>
"this promise was created in this timeout which was created in this callback from this fs function which happened in the AsyncContext.run callback"
00:52
<bradleymeck>
it creates a new link like devsnek said in a kind of tree structure every time you queue a new async task
00:53
<shu>
ah, there's a linked list that functions remember at creation time?
00:53
<bradleymeck>
the link is by id not by a transition between actual references
00:53
<shu>
no, not functions, that tasks remember at creation time?
00:53
<bradleymeck>
shu: not a real linked list, but an ordering of events that allows you to create one
00:53
<bradleymeck>
shu: well the tasks when they go through various lifecycles keep the ids around
00:54
<devsnek>
each task gets an id and via tracking init/before/after events of each task you can create a graph
00:54
<shu>
i see
00:54
<shu>
are these ids tracked by node unconditionally?
00:54
<devsnek>
no, it is somewhat expensive
00:55
<shu>
so when an AsyncContext.start or whatever is called, it tells node to start tracking task ids through tasks' lifetime state transitions
00:55
<devsnek>
yeah, and then it stores the relationships in a map somewhere
00:55
<shu>
gotcha
00:55
<shu>
okay, that helps a lot, thank you!
00:55
<shu>
this was not at all clear from the explainer
00:57
<devsnek>
👍🏻
01:01
<devsnek>
shu: https://gist.github.com/devsnek/07a61aec7d9f40d1495048790dd30a8f
01:02
<shu>
what does that module do?
01:02
<devsnek>
it does the map linked list stuff
01:02
<devsnek>
it might actually be missing some edge cases
01:03
<devsnek>
but it should give a bit of a picture
01:05
<shu>
oh, it implements the async context
01:05
<shu>
cool, thanks
03:52
<Bakkot>
devsnek: did you want to update https://github.com/tc39/ecma262/pull/1781 ? Otherwise I'll force-push up some commits myself
06:53
<mathiasbynens>
ljharb: re: https://github.com/tc39/Reflector/issues/282#issuecomment-635795520, the pdf link points to the older candidate too
06:53
<ljharb>
whoops
06:53
<ljharb>
fixing
06:53
<ljharb>
clipboard fun
06:54
<mathiasbynens>
yayyyyyyyy thanks for the fix
06:54
<ljharb>
thanks, should be fixed
06:54
<ljharb>
np, ty for catching it so fast
06:54
<ljharb>
i'm going to blame it on adobe acrobat stealing all my cpu :-p
07:10
<rkirsling>
that is one packed agenda
07:19
<ystartsev>
devsnek looks like you found the bug, but yes, we are implementing it now which is why we want to sort out the spec side of things
13:05
<ystartsev>
what is Michael Ficarra's nickname on here?
13:09
<mathiasbynens>
bterlson: could you please add Marja Hölttä (marjakh) as a delegate so she can access the Reflector? (she works on V8)
13:26
<ystartsev>
mathiasbynens: you can open an issue here and we will onboard her: https://github.com/tc39/Admin-and-Business/issues
13:27
<mathiasbynens>
ystartsev: thanks, will do. fyi https://github.com/tc39/Reflector#readme still says to ping bterlson
13:28
<ystartsev>
ooo thanks for the heads up
13:28
<ystartsev>
will udpate
14:06
<mathiasbynens>
ystartsev: cheers!
14:06
<mathiasbynens>
ystartsev: btw, good luck with the stream later! i can't wait
14:20
<ystartsev>
_internal screaming_
14:20
<ystartsev>
see you there!
14:20
<ystartsev>
or
14:20
<ystartsev>
rather
14:20
<ystartsev>
you know what i mean
15:59
<Bakkot>
ystartsev: michael ficarra is not on IRC except during meetings, alas
16:00
<Bakkot>
he's probably reachable by email though
16:05
<devsnek>
ystartsev: is there a schedule somewhere for your future streams and tc39 q/a and whatnot
17:02
<ystartsev>
devsnek: there should be a schedule here :https://www.twitch.tv/codehag/schedule
17:02
<ystartsev>
and
17:03
<ystartsev>
here: https://developer.mozilla.com/events/compiler-compiler-yulia-startsev/
17:03
<devsnek>
that twitch link just shows me your last broadcast
17:04
<devsnek>
but the second link works, thx
17:49
<devsnek>
ystartsev: iterator slides are private
17:53
<ystartsev>
devsnek: fixed
17:54
<devsnek>
thanks!
18:04
<ljharb>
ftr (unless the chairs want the notifications) yall don't need to make PRs to the agenda to add slides for anything that's not a stage advancement, or for schedule constraints, you can just commit directly to master
18:35
<ystartsev>
ljharb: _i have done horrible things when pushing to master_
18:35
<ystartsev>
thats why i make prs :P
18:37
<ljharb>
haha fair enough
18:44
<keith_miller>
Why does Set use `set` to add things and Map use `add`... ugh
18:44
<keith_miller>
😭
18:45
<Bakkot>
keith_miller to support subclassing
18:45
<keith_miller>
Can we add a Map.prototype.set and a Set.prototype.add that are just aliases of the other?
18:45
<keith_miller>
Bakkot: ?
18:45
<Bakkot>
oh, wait, the different names
18:45
<ljharb>
keith_miller: they take diff arg signatures
18:45
<Bakkot>
sorry
18:45
<ljharb>
keith_miller: also Map uses set and Set uses add, i think?
18:45
<Bakkot>
I thought you were asking about why the constructors invoke the methods
18:45
<keith_miller>
ljharb: No I mean Map.prototype.set == Map.prototype.add
18:45
<ljharb>
keith_miller: you set things in a map, you add things to a set
18:45
<keith_miller>
Bakkot: Ah, on
18:46
<keith_miller>
ljharb: You have it backwards :P
18:46
<keith_miller>
you set things in a set and add things to a map
18:46
<keith_miller>
lol
18:46
<ljharb>
`Set.prototype.add` is the method that exists right now
18:46
<ljharb>
lol i do not agree with your intuition
18:46
<keith_miller>
oh nvo
18:46
<keith_miller>
oh nvm
18:46
<keith_miller>
I just want to have the same name
18:46
<ljharb>
a set is a list, you add things to it
18:46
<drousso>
it is aggravating to have different names
18:46
<ljharb>
right but they're different methods
18:46
<ljharb>
you add one thing at a time to a set; you set a key in a map to have a value
18:47
<keith_miller>
You can add things to a map?
18:47
<Bakkot>
I also have to look this up almost every time
18:47
<drousso>
^ +!
18:47
<keith_miller>
I'm adding a new key to my map
18:47
<drousso>
yeah
18:47
<ljharb>
that doesn't make any sense to me
18:47
<ljharb>
without a value you're not mapping to anything
18:47
<keith_miller>
I'd be cool with an add that returns a boolean if it's a new key or something
18:47
<ljharb>
you don't add properties to an object either, you set them to a value
18:47
<drousso>
the functions can have different signatures, but it'd be nice to have a `Map.prototype.add`
18:48
<keith_miller>
Oh, I'm not saying it has the same signature as Set.prototype.add
18:48
<drousso>
i would argue that that's semantics, not necessarily how developers think
18:48
<ljharb>
if it has a different signature then it should have a different name imo
18:48
<ljharb>
drousso: i would argue those two should overlap
18:48
<keith_miller>
I find it more confusing that I have to figure out which name is which lol
18:48
<ljharb>
fair
18:48
<keith_miller>
100% of the time
18:49
<ljharb>
i don't think this is as universal as "putting the usb plug in the wrong way" tho
18:49
<drousso>
^ ditto
18:49
<keith_miller>
I think Map.prototype.add wouldn't be that confusing
18:49
<keith_miller>
especially if it returns a bool
18:49
<drousso>
i wish it returned a bool 😭
18:49
<ljharb>
then it wouldn't be chainable
18:49
<keith_miller>
I'm ok with that
18:49
<drousso>
i've never once wanted to chain
18:49
<keith_miller>
If you want the chaining you can use set!
18:50
<drousso>
whereas i often want to know "did this exist before" in a single step
18:50
<drousso>
heck that could be the difference between `Map.prototype.set` and `Map.prototype.add`
18:50
<drousso>
err, `Set.prototype
18:50
<keith_miller>
although the lack of chaining may be confusing between Set and Map
18:50
<ljharb>
the new method seems fine, but conflicting names isn't something i'd be ok with
18:50
<drousso>
also, there's already some weirdness with `String.prototype.indexOf` and `Array.prototype.indexOf`
18:51
<keith_miller>
Maybe we should add like item or something since that's what all the DOM containers have anyway?
18:51
<keith_miller>
although item is an awful name
18:51
<ljharb>
drousso: wait, what weirdness?
18:51
<drousso>
they share the same name, and yet they don't do the same thing
18:52
<ljharb>
drousso: in what way do they differ?
18:52
<keith_miller>
drousso: Yeah, we should have Map.prototype.indexOf :P
18:52
<shu>
drousso: boy do i have bad news for you about natural languages
18:52
<shu>
keith_miller: i am proposing to add item did you see
18:52
<drousso>
ljharb `Array.prototype.indexOf` finds an item in the array whereas `String.prototype.indexOf` finds a substring not an item
18:52
<shu>
well, tab is, i'm championing
18:52
<keith_miller>
shu: !!!!
18:52
<drousso>
shu i saw that and loved it
18:52
<shu>
keith_miller: relative indexing
18:53
<keith_miller>
Wait, for array?
18:53
<ljharb>
drousso: ah, sure, that's fair
18:53
<shu>
keith_miller: all number indexables
18:53
<Bakkot>
are we adding item to set and map?
18:53
<shu>
nah
18:53
<Bakkot>
oh :(
18:53
<Bakkot>
ah well
18:53
<ljharb>
drousso: but we're not trying to add a new thing named indexOf now :-p
18:53
<drousso>
oh yes true
18:53
<ljharb>
shu: wait, strings too?
18:53
<keith_miller>
shu: I wouldn't be opposed to adding an item to Map and Set
18:53
<keith_miller>
for consistency
18:53
<drousso>
ljharb that was more an example of "things with the same name doing different things"
18:53
<shu>
keith_miller: that... take integers? or just do something different?
18:53
<shu>
ljharb: strings, arrays, typedarrays
18:53
<Bakkot>
strings are weird for .item because they have two notions of "the nth thing"
18:54
<keith_miller>
I mean the array one presumably takes non-integers right?
18:54
<keith_miller>
Or does it error?
18:54
<keith_miller>
I would assume it toNumbers them
18:54
<shu>
keith_miller: yeah, it ToIntegers
18:54
<ljharb>
i like the proposal's semantics but am very questionable on the name "item"
18:54
<drousso>
shu love the negative value semantics especially
18:54
<ljharb>
but also yeah, weird on strings wrt code units/points
18:54
<keith_miller>
shu: So Map and Set presumably wouldn't do that...
18:54
<Bakkot>
name has to be item for reasons
18:55
<keith_miller>
but otherwise would be the same?
18:55
<Bakkot>
see proposal
18:55
<keith_miller>
e.g. it's get
18:55
<shu>
keith_miller: i'm open to that? i just haven't thought about it
18:55
<ljharb>
i saw, but i don't like those reasons
18:55
<shu>
ljharb: i'm gonna need a better reason than "i don't like it"
18:56
<ljharb>
shu: i haven't fully formed an opinion yet, but in general i don't like naming/semantics choices being made for us, especially when it's presented as "we accept this coercion, or the proposal is withdrawn"
18:56
<keith_miller>
shu: But yeah, I support item. Even if I didn't the powers on high have told me to support it :P
18:56
<Bakkot>
ljharb: that seems like one of those things you will should learn to live with
18:56
<Bakkot>
the name choice _has_ been made for us
18:56
<Bakkot>
it does already exist
18:57
<Bakkot>
you can't unmake it
18:57
<ljharb>
not on arrays etc
18:57
<shu>
yeah, i think this is the reality of working on the JS platform, which includes the web platform
18:57
<ljharb>
at times it is, yes.
18:57
<keith_miller>
I think the consequences of not having it on array is worse
18:57
<shu>
agreed
18:57
<drousso>
^ ditto
18:57
<ljharb>
i hope to hear about that during the presentation
18:57
<keith_miller>
unfortunately
18:57
<drousso>
^ ditto
18:58
<keith_miller>
I think item name was a poor choice fwiw but that ship has sailed for W3C
18:58
<shu>
ljharb: i don't get the sense you can be receptive to it if your starting point is "web platform is only part of the js ecosystem part of the time"
18:58
<ljharb>
i'm receptive to places where the spec needs to change to match web reality
18:59
<shu>
i won't be making any new arguments than what's already in tab's explainer
18:59
<ljharb>
i don't think that's the same scenario as being forced (in the general case) to broadly support design choices, good or bad, just because the web made them elsewhere
18:59
<ljharb>
like i said, i haven't fully formed an opinion, and def need to give the explainer a reread
19:01
<shu>
ljharb: also the presentation isn't "accept this name or proposal is withdrawn"
19:02
<shu>
ljharb: it's "there're actually some compat risk with naming it item, but everything would be better for the ecosystem if it _could_ be named item, so barring incompat data, strongly prefer 'item'"
19:02
<keith_miller>
shu: The upside of something like `item` over `at` is that it "nicely" extends to other container classes that have a single key
19:02
<shu>
keith_miller: ah i didn't think about that
19:02
<keith_miller>
since `at` strongly implies index whereas I don't see item in the same way
19:02
<shu>
i mean item is such a terrible java-ism name
19:03
<keith_miller>
it is *java*script!
19:03
<shu>
but it is generic like that
19:03
<shu>
one time at jsconf eu some german dude saw a bunch of us coming out of the event venue and asked us what it was about
19:03
<ljharb>
shu: the explainer says the name is a requirement; i'm sure i saw the wording i used somewhere but def not in the explainer, so ¯\_(ツ)_/¯
19:03
<shu>
someone said javascript
19:03
<shu>
and the german dude was like "yahweh script? is it religious?"
19:06
<keith_miller>
shu: I mean based on the strength of some peoples opinions on JS it's comparable to a religion! :P
19:11
<Bakkot>
prettier's official policy is to add styling options only if means avoiding taking sides in a holy war
19:12
<Bakkot>
so: tabs vs spaces, semicolons
19:13
<drousso_>
🤣🤣🤣🤣🤣
19:13
<drousso_>
that is my new favorite thing ever
19:27
<devsnek>
the problem here is that the proper name for both maps and sets is insert
19:48
<drousso>
personally, i would've been fine with that since they both had the same name
19:52
<rkirsling>
oof I'm honestly more bugged by the keys/values/entries situation in Set
19:52
<drousso>
orly?
19:52
<drousso>
what about?
19:53
<rkirsling>
keys is values and thus entries is just intentionally duplicated
19:53
<drousso>
oh
19:53
<drousso>
¯\_(ツ)_/¯
19:54
<drousso>
personally i'm ok with that cause it means there's consistency with `Map`
19:54
<rkirsling>
that is the stated motivation but I really wonder whether it's useful
19:56
<rkirsling>
the thing is that `get` is the thing you do with a populated Map but there is no `get`-like operation for a Set, so that implies that Map will have a `set` but says nothing of Set
19:57
<ljharb>
get on a Set would be `s.has(k) ? k : undefined`, i suppose
19:57
<rkirsling>
yeah
19:57
<rkirsling>
yeah I mean tbf that could exist, it just doesn't
19:58
<rkirsling>
and I could see people disliking `new Set().set`, so it doesn't surprise me that a different word was chosen
20:00
<rkirsling>
hmm I guess Rust and C++ alike use `insert` as devsnek said
20:00
<rkirsling>
for both Map and Set
20:01
<devsnek>
i think some languages also use "put"
20:07
<ljharb>
to me "put" weakly implies creation tho
20:12
<rkirsling>
wait what we're doin' Teams this time?
20:12
<ljharb>
akirose: wait, we're using teams for this plenary?
20:13
<ljharb>
why? zoom works great
20:13
<devsnek>
yay not zoom
20:13
<ljharb>
teams' UX on ios is painful :-/
20:13
<ljharb>
like, getting into the call, i mean
20:14
<akirose>
? have you tried lately? bc i just hopped onto a call from my personal computer and it was fill in name, click join
20:14
<akirose>
Zoom "works great" but a whole lotta people won't touch it with a 10-foot pole
20:14
<akirose>
because they are a garbage company
20:15
<akirose>
and their product has both privacy and security issues
20:15
<ljharb>
i tried to get on a Teams call with daniel a month or two ago
20:15
<ljharb>
so far all the issues i'm aware of that are unique to zoom can be bypassed by using the web, or the ios app, instead of the native desktop app
20:16
<akirose>
¯\_(ツ)_/¯ feel free to hop on to the tech check
20:16
<ljharb>
seems like a pretty big last minute change :-/
20:24
<Bakkot>
I for one am excited to add a new entry to my menagerie of video chat clients
20:25
<devsnek>
how long until we do plenary over discord
20:28
<akirose>
does discord have video yet?
20:29
<ljharb>
eesh, nvm, i'll stop complaining about teams
20:30
<devsnek>
akirose: it's had video for a while :P
20:30
<devsnek>
(in my experience the highest quality video too)
20:30
<akirose>
lollll look i only use it for union organizing
20:30
<akirose>
uhh.
20:30
<akirose>
i mean.
20:30
<akirose>
NOTHING.
20:31
<devsnek>
haha
20:31
<akirose>
devsnek: in that case idk i wouldn't rule anything out completely. i don't see it happening any time soon but never say never.
20:31
<devsnek>
yeah i was mostly joking but its always good to have options
20:31
<devsnek>
each channel can be its own video session which makes breakouts super duper easy
21:06
<shu>
yeah what clients do i have now... webex, zoom (which had to be uninstalled per corp policy), now teams, i guess not too many
21:09
<akirose>
fwiw rkirsling just joined from the web client and it seemed to work perfectly fine. he didn't test presenting from the web client though.
21:09
<rkirsling>
:nod:
21:10
<devsnek>
linux version is a bit odd but it seems to work
21:11
<akirose>
one gotcha with the linux client: not 100% sure but it seems like there's no "share window" option, only "share entire desktop"
21:12
<devsnek>
i think that depends on your window system
21:12
<devsnek>
i can double check
21:14
<devsnek>
yeah i'm only getting desktop option weird
22:09
<leobalter>
mathiasbynens shu: do you know any historical bug for V8 setting extra own properties (non configurable) to function objects? Basically "arguments" and "caller"
22:11
<leobalter>
ljharb just pointed me to https://tc39.es/ecma262/#sec-addrestrictedfunctionproperties
22:11
<leobalter>
I don't get where this abstraction happens. I need to go deeper there
22:11
<ljharb>
looks like there's nothing that makes them be own properties, only prototype throwers
22:12
<leobalter>
IIRC this is something that happens historically on v8 and jsc, as we can observe still happens today
22:13
<leobalter>
I'd like to find a specific bug to point it out
22:13
<leobalter>
let's see what a google search gives me (not easy with these keywords)
22:15
<leobalter>
got it! the search on v8's bug tracker is great, one would wonder why.
22:15
<leobalter>
https://bugs.chromium.org/p/v8/issues/detail?id=5047&q=caller%20arguments%20own%20properties&can=2
22:15
<leobalter>
also https://bugs.chromium.org/p/v8/issues/detail?id=6049
22:17
<leobalter>
and we do have tests: https://github.com/tc39/test262/commit/a266cfa8cb8c17f5724298f2205c03c26c7c83e0
22:19
<leobalter>
rkirsling anything related to this in jsc?
22:20
<leobalter>
https://test262.report/browse/built-ins/Object/internals/DefineOwnProperty/consistent-value-function-arguments.js
22:22
<rkirsling>
I mean I have no background on this but searching found https://bugs.webkit.org/show_bug.cgi?id=158116
22:39
<Bakkot>
there is more background in https://github.com/tc39/ecma262/issues/562
22:39
<Bakkot>
and https://github.com/tc39/ecma262/issues/877
22:39
<Bakkot>
and https://github.com/claudepache/es-legacy-function-reflection/
22:40
<Bakkot>
specifically https://github.com/claudepache/es-legacy-function-reflection/blob/master/analysis.md
23:14
<leobalter>
thanks for the links, Bakkot
23:14
<leobalter>
I'm afraid they focus more in arguments and caller inside the function rather than as properties of the function object
23:15
<leobalter>
but it's a very weird behavior that makes some mess in a quick switch from strict to sloppy mode
23:18
<leobalter>
Here is an example where this problem subtly affects other operations: https://gist.github.com/leobalter/0d67d314b66b14d34668d2d8308b9a6c
23:39
<shu>
what is the ask here?