04:51
<HE Shi-Jun>
Jack Works: Type annotation proposal also include as 😉
14:52
<Ashley Claymore>

Userland as would be possible with rbuckton ‘s Extractors 😃

let As = {[Symbol.unapply]: x => x};
let { a: As(b) } = …
15:00
<Kris Kowal>
What does "&c" mean?
Sorry, this is a typography nerd-snipe I use habitually. As others inferred, it's even shorter than "etc", "et cetera", "and so on", taking advantage of & historically coming from a ligature of et, meaning "and" in Latin. There’s precedent but hasn’t been common for a couple hundred years.
15:10
<jschoi>
(I use &c. in my patient notes all the time. 🥲)
15:16
<bakkot>
a question from the discourse: should /^a[^a]$/u.test('a\u{1f310}') be true or false?
15:20
<ljharb>
at first glance it seems like it should be false, assuming there’s only two code points in the string, one of which is a?
15:27
<bakkot>
note that this is a u-mode regexp, which matches by code points
16:02
<Justin Ridgewell>
true? Are char classes only speced to operate on u16 chars?
16:06
<snek>
y'all are very bold for trying to decode what a regex should do with the annex b situation
16:08
<snek>
engine262 says true
16:13
<jschoi>
Do we want the notes to say (“Ecma262” or “ECMA-262”) and (“Ecma402” or “ECMA-402”)?
16:13
<snek>
i would imagine the latter?
16:17
<Justin Ridgewell>
/^a[^]$/u.test('a\u{1f310}') === true...
16:26
<Rob Palmer>
Breakfast is served
16:26
<Rob Palmer>
(more than yesterday)
16:28
<snek>
looks delicious
16:29
<Jack Works>
I hope one day I can come to the in person meeting 👀
16:31
<Rob Palmer>
Shu and Shane have not yet arrived yet. Please shout here if you are in the visitor entrance and need a Googler to let you through.
16:34
<Rob Palmer>
Markus let us in but has the dilemma of not being allowed to leave me and Ross unattended.
16:38
<Rob Palmer>
Bradford has arrived. Meaning we now have two Googlers and can begin the accompanied shuttle service of getting folk through security. Bradford is on his way down now.
16:43
<Richard Gibson>
https://puzzlefry.com/puzzles/fox-chicken-and-corn-river-crossing-popular-puzzle/
16:54
<yulia>
should we say our name before we make a comment?
17:05
<snek>
TLA
17:05
<snek>
note that some people have two-letter acronyms (TLAs)
17:06
<nicolo-ribaudo>
At least for remote people, can we ask to put acronyms in the google meet name?
17:06
<nicolo-ribaudo>
If that's helpful
17:07
<jschoi>
Google Meet doesn’t make it easy to change your display name; it looks like you have to change your Google account personal name…
17:07
<Michael Ficarra>
you can (and should) join in private browsing mode to set a name, which should include your company name
17:08
<jschoi>
Ah, so I should join without a Google Account.
17:08
<Michael Ficarra>
for feedback, can we just use a Reflector thread instead of having a session in plenary?
17:11
<yulia>
The quality of the notes is really excellent
17:11
<Michael Ficarra>
totally agree that some of the ancient notes from like ARV's time miss a ton of nuance
17:11
<yulia>
I am watching them and it is impressive
17:12
<rickbutton>
yeah its kinda nuts
17:12
<rickbutton>
these notes are excellent
17:13
<ryzokuken>
sorry for not mentioning my TLA 😭
17:13
<Michael Ficarra>
we got you ryzokuken
17:13
<ryzokuken>
thanks 🙏 was going to the notes to help
17:14
<bakkot>
yeah, this is way better than the bot
17:16
<bakkot>
also, the bot was also not capturing summaries or anything; I think the relevant question is "is stenography a strict improvement over me running the bot" and I am pretty sure the answer is a resounding yes
17:16
<bakkot>
(except that we do need to make a point of capturing conclusions still)
17:17
<bakkot>
there are other ways that notes could be improved probably, but I think those questions need not be addressed right now
17:17
<Michael Ficarra>
to be fair to critics, I think we have way more eyes on the notes at the moment than we ever had with the bot
17:18
<Chris de Almeida>
re: speakers identifying the points they want recorded in the notes this is an undue burden on speakers, and in practice would rarely be emphasized
17:18
<ryzokuken>
to be fair to the stenographers, they're thrown right into the TC39 frying pan.
17:19
<rickbutton>
i don't see how more notes would ever be bad
17:19
<rickbutton>
as long as they are accurate ideally we write down every word
17:19
<ryzokuken>
re: speakers identifying the points they want recorded in the notes

this is an undue burden on speakers, and in practice would rarely be emphasized
importantly, this would be more relevant for verbose, quick back and forths than a long presentation or something, which is where we usually miss details
17:19
<rickbutton>
i cant imagine why we wouldnt if we can
17:19
<bakkot>
can confirm, I have tried to figure out why historical decisions were made from the notes which predate me and they are often totally unhelpful
17:20
<ryzokuken>
so we'll be asking people to pause in the middle of these discussions and specify what they'd like to be transcribed essentially
17:21
<yulia>
caridy: btw, the rational project interlinks proposals to their discussions and decisions
17:21
<yulia>
it also finds similar discussions -- so you can find similar trees that might impact your proposal
17:21
<ryzokuken>
i don't see how more notes would ever be bad
well, I suppose there's some benefit in reading summaries
17:22
<ryzokuken>
but as we talked about, summarizing things well is very hard
17:22
<yulia>
we used to have someone summarizing -- it is hard
17:22
<yulia>
but i was doing it as well, i need to catch up on recent ones
17:22
<ryzokuken>
summarizing things well during a verbose, quick discussion is nearly impossible
17:23
<ryzokuken>
so I agree that it's more practical for us to register every word
17:23
<rickbutton>
I would not trust a summary without the source material. and also, many times the summary is not what I am after, but looking for in the moment sentiment from members that aren't part of the champion group i.e. who selects the summary
17:23
<leobalter>

littledan: FWIW, if we have a professional stenographer service, I'd love for TC39 to have a transcription and a (very) reduced/concise notes from the meeting capturing only major highlights and resolutions from each topic.

Knowing we may have a full transcription, notes can be really small, and rich of actionable items looking ahead the meeting.

17:25
<littledan>
well, yes, summaries were already good and you, personally, did a lot of good work towards them
17:25
<littledan>
I think this is pretty orthogonal?
17:25
<littledan>
I don't think a transcriptionist changes the priority of summaries
17:25
<Chris de Almeida>
agree
17:25
<Chris de Almeida>
bottom line is that pro steno is a big improvement over the status quo, and we have yet to hear about any better concrete solutions
17:26
<leobalter>
littledan: I don't think it's orthogonal. The concise notes I'd love to have are only possible if we have a source of truth for verification (transpilation). Similar to the concern @rickbutton raised.
17:26
<littledan>
leobalter: We already try to take a source of truth. A summary is good in any case.
17:26
<leobalter>
The current source of truth demands a lot of work, as reported, right?
17:26
<yulia>
isn't that what is being solved right now?
17:27
<littledan>
bottom line is that pro steno is a big improvement over the status quo, and we have yet to hear about any better concrete solutions
how about this: we tell the note-takers to do a better job, in a way that they say they can't? (sarcastic)
17:27
<littledan>
yeah I have a lot of trouble understanding what caridy and leobalter have been arguing
17:27
<littledan>
To msaboff 's point, to take summaries on-line I think we'd need volunteers to implement it. The current people putting in the work to take notes have said it is infeasible for them.
17:27
<leobalter>
I'm supportive of the stenography but I'm confused by irony in the chat.
17:28
<rickbutton>
level up
17:28
<apaprocki>
that is very ominous
17:28
<Chris de Almeida>
git gud
17:28
<Michael Ficarra>
Kevin is definitely giving the stenographer a hard time with this speed
17:28
<littledan>
I mean, during the discussion some people made demands of note-takers, saying that this would make a stenographer unnecessary
17:29
<littledan>
and this is something that the note takers responded was inviable for them
17:29
<littledan>
so, I don't see that as a proposed solution
17:29
<apaprocki>
silly question -- has anyone considered inline // comments in the actual spec explaining decisions, possibly stable-linked back to the notes document where the discussion occurred?
17:29
<leobalter>
what I'm saying is: stenography might solve one problem. What I want is not resolved by it alone. I still want concise notes I can quickly browse. I want it to be a bit more than a summary like what we did in the past. I want it to be less verbal than notes were before (when Rick Waldron used to take them). I want the transcription so I can consult and clarify anything if necessary.
17:29
<apaprocki>
inline comments would get dropped when "rendering" the spec
17:30
<littledan>
apaprocki: Yes, this is what notes are for. Historically many people were against too many notes, now people are more in favor of more notes, and also we have "editor's notes" which can be removed/maybe collapsed. At this point it'd just be a lot of work to write the notes
17:30
<Chris de Almeida>
I think a lot of people share in those wants -- question is what are the means to those ends?
17:30
<littledan>
I think we need transcription for the base material, and then we can do these additional projects of a summary or more notes on top of that
17:30
<littledan>
I'm really confused by people positioning one thing against another
17:30
<apaprocki>
apaprocki: Yes, this is what notes are for. Historically many people were against too many notes, now people are more in favor of more notes, and also we have "editor's notes" which can be removed/maybe collapsed. At this point it'd just be a lot of work to write the notes
but the point would be more like C++ comments -- things explicitly not seen when viewing the spec outside of your editor when modifying it
17:31
<littledan>
Yeah, that could be done. It would be easy to add collapsable notes. the hard part is to write all of them
17:31
<littledan>
I think we should add such notes
17:31
<littledan>
I am also not signing up to do it
17:31
<leobalter>
@littledan I never said I'm against other positions. I'm supportive of progress for stenography, and shared my vision going further.
17:32
<littledan>
I agree with this supportive vision; I was just overreacting above due to the unexpected negativity
17:32
<apaprocki>
maybe fix it going forward? -- if decisions were made, why not make it part of the spec text and it's the champions' responsibility to record those notes/comments explaining the decision at spec text review time
17:32
<littledan>
apaprocki: Yes, I agree we should add more notes
17:32
<littledan>
there's another thing where sometimes we just disagree internally about the rationale for something
17:33
<apaprocki>
that's fine, both viewpoints could be recorded and noted
17:33
<littledan>
so, notes saying who said what is a sort of more neutral document, even if it's harder to scan
17:33
<littledan>
that's fine, both viewpoints could be recorded and noted
I think this would be a bit much to have in the main spec, but maybe would be good in some notes summary doc. It gets a little talmudic...
17:33
<Hemanth H.M>
async function* outer() { yield Promise.resolve(1); try { Promise.reject(1) } catch {throw new Error("err")}}
(await outer()).next(); // this doesn't throw on multiple calls

const x = (await outer()))

await x.next();

await x.next(); // throws 

trying to understand that behavior.

17:33
<Michael Ficarra>
we should let the stenographers know they don't need to record the like "can you hear me?" and other chair-related meta-content
17:34
<apaprocki>
my main pain point in the past was that there was no link between recorded spec text and the notes documents/meetings where they were discussed
17:34
<apaprocki>
you had to waste time going around fishing for what meetings were involved
17:34
<apaprocki>
hope your grep would find it
17:34
<leobalter>
littledan: FWIW, I can't ask anyone to capture highlights and resolutions in the meeting in a separate document if people are already overwhelmed doing transcription or reviewing the bot transcription.
17:35
<yulia>
leobalter: but isn't the proposal to hire people to do the transcription? so that we are no longer doing that? That would mean people are no longer overwhelmed
17:35
<ryzokuken>
my main pain point in the past was that there was no link between recorded spec text and the notes documents/meetings where they were discussed
I think we still never link from the spec to the notes, we just include some notes in the spec
17:35
<leobalter>
Michael Ficarra: we should not worry about it (if they do it or not) for the sake of clear transcriptions.
17:36
<Michael Ficarra>
leobalter: it might help them catch up, we are going a little fast for them it seems
17:36
<apaprocki>
I think we still never link from the spec to the notes, we just include some notes in the spec
yeah.. curious if there's an active reason why that isn't done or if we just haven't discussed it
17:36
<rbuckton>
I've always thought the pass-through of value in for-await was a mistake
17:37
<leobalter>
yulia: I'm supportive to this, what I want is a really small doc, done in parallel with said transcription, with only highlights. By highlights I mean 3 bullet points + and other bullet points with resolution.
17:37
<Luca Casonato>
On my way.
17:37
<yulia>
yulia: I'm supportive to this, what I want is a really small doc, done in parallel with said transcription, with only highlights. By highlights I mean 3 bullet points + and other bullet points with resolution.
I see, great -- Sorry my attention is split
17:37
<littledan>
So, to tie this together, it'd be great to get professional support for transcriptioning so that we can put the notes effort into this higher level work of creating summaries of rationales and linking them to the spec.
17:38
<rbuckton>
I would expect "delivering a promise" here to require wrapping it.
17:39
<leobalter>
yulia: and to repeat myself: I don't think it's fair to ask anyone to capture those highlights if we are already doing a lot with the current notes we have today. The stenographer transcription would work great supporting this highlight document and any other summary people would eventually write.
17:39
<rbuckton>
Would we expect Array.fromAsync to also pass through a Promise in value?
17:39
<Kris Kowal>
I would expect "delivering a promise" here to require wrapping it.
That’s odd because async iterators transport T, not Promise<T>. The promise is Promise<IterationResult<T>> not Promise<IterationResult<Promise<T>>>
17:40
<yulia>
yulia: and to repeat myself: I don't think it's fair to ask anyone to capture those highlights if we are already doing a lot with the current notes we have today. The stenographer transcription would work great supporting this highlight document and any other summary people would eventually write.
great, thanks for clarifying -- it wasn't clear from what i managed to glean glancing back and forth
17:40
<jschoi>
My plan is to match for await, whatever happens. (Note that if a mapping function is provided, it is considered an async function and its results are always awaited.) See also https://github.com/tc39/proposal-array-from-async/issues/19#issuecomment-1179810964.
17:40
<littledan>
So, to tie this together, it'd be great to get professional support for transcriptioning so that we can put the notes effort into this higher level work of creating summaries of rationales and linking them to the spec.
leobalter: OK, does this comment summarize your thoughts then?
17:40
<rbuckton>
The fact that a manually crafted sync iterator's value is awaited but a manually crafted async iterators is not is inconsistent
17:41
<Robin Ricard>
So, to tie this together, it'd be great to get professional support for transcriptioning so that we can put the notes effort into this higher level work of creating summaries of rationales and linking them to the spec.
Re: stenography - as note takers we are able to add more value to the notes that way: for instance we can also describe what the speaker is currently showing, adding more context: for instance KG is showing that issue, we could add it to the notes instead of playing catch up with the bot
17:41
<leobalter>
littledan: not only the given effort but having the transcriptions functioning as the source of truth for said summaries. This is important if anyone wants to verify info.
17:42
<littledan>
(so is that a yes?)
17:42
<Chris de Almeida>
I think we're in violent agreement
17:42
<littledan>
great
17:42
<snek>
the best kind of agreement
17:43
<leobalter>
let's agree to agree
17:44
<Hemanth H.M>
/cc bakkot
17:45
<snek>
you mean cc bakkot?
17:46
<snek>
you didn't yield the Promise.reject though
17:46
<Hemanth H.M>
ha, yes.
17:47
<rbuckton>
Not entirely thrilled with the direction (removing an implicit await in yield*), but won't block. I'll have to test this change in my own projects, as I may have code that could break with this change given assumptions about yield* today
17:49
<littledan>
rbuckton: It'd be great to hear about the results of that
17:51
<littledan>
RegExp subclassing was a horrible mistake and the committee should've accepted my proposal to remove it
17:52
<Michael Ficarra>
can't we still?
17:54
<littledan>
It'd take some investigation into how frequently the full case comes up, to understand whether it's web-compatible
17:54
<yulia>
i mean, our implementation uses v8's implementation so... really they should chime in ;)
17:54
<littledan>
well isn't this change at a higher layer to the part where you hook into V8's implementation?
17:54
<snek>
is that irregexp
17:54
<ljharb>
also all the current metrics-gathering approaches browsers use to determine web compatibility would need to be able to separate out "core-js" and "everything else", since core-js has a ton of regexp feature tests that serve as false positives.
17:55
<yulia>
is that irregexp
yup
17:55
<littledan>
XRegExp also presented some issues with web compatibility of shipping RegExp subclassing; IIRC we made some tweaks due to that
17:55
<littledan>
in retrospect we should've just pushed back harder
17:56
<snek>
i'm sad that v8's experimental regex interpreter didn't pan out more
17:57
<ljharb>
wait, so is safari's output for String.prototype[Symbol.iterator].toString() compliant? (starts with function [Symbol.iterator]() {)
17:58
<littledan>
ryzokuken: bterlson Rob Palmer Could we add a 10-minute agenda item tomorrow to draw a conclusion on the stenography question?
17:59
<bakkot>
Yeah, that could be done. It would be easy to add collapsable notes. the hard part is to write all of them
fwiw I think the git log is good enough for this already that the additional work is not worth it
17:59
<bakkot>
git blame + useful PR messages goes a long way
17:59
<yulia>
If i were to restate the change here -- are we making the spec more permissive here?
18:00
<jschoi>
Safari 15.5 returns "function [Symbol.iterator]() { [native code] }".
18:00
<ljharb>
right, i'm asking if that's compliant
18:00
<zbraniecki>
iain from Mozilla has been working on ICU4X backed I18n aware RegExp particularly to target ECMA-262/ECMA-402 RegExp needs
18:00
<littledan>
fwiw I think the git log is good enough for this already that the additional work is not worth it
Well, so maybe this is just an ecmarkup frontend thing then, to make the blame more accessible in the UI
18:00
<zbraniecki>
I'm not sure what the latest status on that is, but dminor or yulia may have the latest )
18:01
<snek>
right, i'm asking if that's compliant
https://github.com/tc39/test262/blob/main/harness/nativeFunctionMatcher.js
18:01
<bakkot>
littledan: searchfox exists and is great
18:01
<ljharb>
lol this doesn't help me
18:01
<ljharb>
seems like no?
18:01
<bakkot>

If you want to explore how the specification was written, you can also view the source with its history in searchfox [https://searchfox.org/ecma262/source/spec.html].

18:02
<bakkot>
I don't think I can possibly do a better job than searchfox
18:02
<bakkot>
and don't want to duplicate the work
18:02
<littledan>
well, a nice-to-have would be to have the blame links integrated with the rendered spec. But I don't want to do this work either.
18:02
<iain>
well isn't this change at a higher layer to the part where you hook into V8's implementation?
Confirmed: all the species stuff happens outside irregexp
18:03
<yulia>

If you want to explore how the specification was written, you can also view the source with its history in searchfox [https://searchfox.org/ecma262/source/spec.html].

The searchfox implementation is very good. We might be able to do some additions, but i think pretty much everything you want is there
18:03
<snek>
ljharb: it is valid
18:03
<yulia>
i think there was a project that did blame links inline in the spec
18:03
<yulia>
i can't remember who did it
18:04
<bakkot>
aria probably
18:05
<yulia>
you know what would be scary. If someone was depending on the toString value as a way to sniff implementations, and making whitespace standard would result in web compat breakage
18:05
<bakkot>
cough
18:05
<yulia>
why do i feel like that is eerily likely
18:05
<bakkot>
https://arai-a.github.io/ecma262-compare/
18:05
<bakkot>
there we go
18:05
<ljharb>
angular 1?
18:05
<jschoi>
My dream is someday to make a website that does something like this, except it’s for every Unicode character, linking to whatever Unicode L2 proposals involved it.
18:06
<yulia>
https://arai-a.github.io/ecma262-compare/
of course it was arai !
18:06
<Rob Palmer>
ryzokuken: bterlson Rob Palmer Could we add a 10-minute agenda item tomorrow to draw a conclusion on the stenography question?
we have 50mins free time, so yes, 10 mins has been allocated for stenography continuation
18:07
<littledan>
of course it was arai !
But does this give you a blame of the spec?
18:07
Hemanth H.M
idea: like searchfox but for notes
18:07
<littledan>
I mean, that would correspond to what apaprocki is requesting
18:08
<yulia>
But does this give you a blame of the spec?
Hm, looks like not this project. I distinctly recall that someone did this
18:08
<yulia>
One of the issues was it was quite chunky and slow
18:09
<yulia>
i would suggest trying out the searchfox version. once you get used to searching through it, it gets really fast and easy to find what you want
18:09
<yulia>
and, additionally you can go back in time
18:09
<yulia>
if we wanted to do that , we would need to have a render of every change to the spec hosted somewhere
18:09
<bakkot>
the "going back in time" part is the bit I am most impressed by and most do not want to replicate
18:09
<bakkot>
if we wanted to do that , we would need to have a render of every change to the spec hosted somewhere
well, no, ecmarkup is JS and can run client-side
18:10
<yulia>
well, no, ecmarkup is JS and can run client-side
true... but it would be a bit slow
18:10
<yulia>
we have everything for search fox already cached
18:10
<bakkot>
yeah
18:10
<littledan>
Yeah, I'm happy to learn about searchfox; I guess the concern was about how to make this all really accessible
18:10
<yulia>
that is what makes it so fluid to work with
18:10
<bakkot>
I will make a note to remind people about searchfox in the next editor update
18:11
<bakkot>
it's linked from the main 262 readme but no one is going to read the readme every day
18:11
<yulia>
that would be great -- if there are things we would like to make better about it, let me know
18:11
<yulia>
we also cache the html spec and a few others
18:11
<littledan>
oh yeah I missed that in the readme
18:11
<yulia>
and its actively developed by mozilla
18:11
<yulia>
i can't guarantee we would get everything but i can ask
18:12
<littledan>
but I imagine this works better for smaller PRs and less well for understanding the motivation of details of larger proposals
18:12
<yulia>
yes, thats correct -- we don't track proposal prs
18:13
<yulia>
since there is less history in those, im usually able to use git blame for that. But -- we could also host our own instance of searchfox and cache proposals ourselves
18:13
<yulia>
i don't think mozilla would be able to do it for all proposals though, so that would be work we would be doing
18:14
<yulia>
i do think that due to the much smaller history on most proposals, that this likely won't be worth it
18:14
<littledan>
right, I'm not asking you to do it, just trying to say that I doubt searchfox meets apaprocki 's documentation request
18:14
<yulia>
ah, got it -- sorry, again flipping back and forth
18:26
<apaprocki>
maybe minority opinion: Ecma should pay for this to be done, just like steno
18:27
<ryzokuken>
you misspelled majority /s
18:27
<littledan>
We actually made a funding request for this already. We agreed on it as a committee, and the editors sent a letter to the secretariat asking for this support. Things kinda got stalled in the phase of selection of a contractor.
18:27
<Michael Ficarra>
apaprocki: I think Ecma did pay for this to be done
18:28
<snek>
wait littledan you asked for funding this before asking the rest of the committee!?!?!?!?!?!? 🤯
18:28
<littledan>
Yeah, Allen has been an Ecma contractor before; maybe he was a contractor for this as well (as Ecma VP, I have no transparency into Ecma's contractors)
18:28
<littledan>
wait littledan you asked for funding this before asking the rest of the committee!?!?!?!?!?!? 🤯
We did discuss this in committee IIRC
18:28
<ryzokuken>
they were going to pay PDFReactor
18:29
<bakkot>
i am happy to put some work into automating this, though I'll need allen's documentation
18:29
<ryzokuken>
not sure if they paid Allen to work on this, but I have a feeling that they didn't
18:29
<bakkot>
I am not willing to spend a week of my life producing a pdf though
18:29
<ryzokuken>
every year*
18:30
<ljharb>
i'm barely wiling to spend the hour it takes to make it with print-to-pdf plus manual adobe acrobat tweaks
18:31
<ljharb>
sffc: are there issues with text searching in 2020 or 2021? at some point i switched to Acrobat over Preview so i'd expect that to have been solved
18:33
<Michael Ficarra>
these are not the contractors the editors asked for btw
18:33
<Michael Ficarra>
we asked for human typesetters who lay out books for a living, not a software license
18:33
<littledan>
we asked for human typesetters who lay out books for a living, not a software license
Maybe say this to the committee?
18:33
<Michael Ficarra>
not interested in bringing that back up
18:34
<littledan>
please? I am not the right person to say so as I'm not an editor
18:34
<littledan>
I want to help move this through
18:34
<littledan>
OK, so our action item is to either find someone to volunteer for this two weeks per year of work, or find a contractor given that the Ecma secretariat was not able to find one
18:34
<sffc>
My question about text serching was in reaction to one of the earlier drafts of the 2022 PDF where text searching didn't work
18:34
<Michael Ficarra>
I got quotes from FOUR typesetting companies!
18:34
<bakkot>
littledan: honestly I don't think we can get an action item without allen documenting his process
18:35
<bakkot>
if it's 95% automatable, and just needs an hour to do the edge cases, that sounds feasible for the editors to deal with
18:35
<bakkot>
if not, then we'd need better options
18:35
<littledan>
well, he was the one to characterize it as two weeks of work, but maybe it will be less
18:36
<littledan>
Let's see how this comes out but if we need support, let's schedule a call with the editors, me, and Ecma secretariat, so this doesn't keep falling on the floor
18:36
<littledan>
we ended up talking past each other in email threads, i think
18:36
<bakkot>
right but I don't know how much that work was stuff I could automate
18:36
<snek>
every time stuff like this comes up i feel like the apparent situation is that someone got 90% of the way there and then got stuck on bureaucracy :(
18:37
<littledan>
bakkot: well, yeah, it sounds like you're falling into the "maybe volunteer" column, so, great, we can try that and see if you want to finish that or fall back to the other column
18:37
<littledan>
seems like the decision tree still maps?
18:38
<littledan>
every time stuff like this comes up i feel like the apparent situation is that someone got 90% of the way there and then got stuck on bureaucracy :(
well literally I was talking with the secretariat about this, then I took 8 months off, and now I'm back; I'd like to move this kind of thing forward
18:39
<bakkot>
seems like the decision tree still maps?
sure I guess I just wanted to be clear what amount of volunteering I was up for. writing automation: yes. an hour of work per year: yes. more than that: no. unclear if this would be enough
18:40
<bterlson>
point of order: it's pronounced eck-markup
18:41
<Richard Gibson>
wait, so is safari's output for String.prototype[Symbol.iterator].toString() compliant? (starts with function [Symbol.iterator]() {)
ljharb: this is compliant, and the relevant specification sections are https://tc39.es/ecma262/multipage/text-processing.html#sec-string.prototype-@@iterator (defines the initial "name" property as "[Symbol.iterator]"), https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#sec-createintrinsics and https://tc39.es/ecma262/multipage/ecmascript-standard-built-in-objects.html#sec-ecmascript-standard-built-in-objects (describes use of that name in CreateBuiltinFunction arguments), https://tc39.es/ecma262/multipage/ordinary-and-exotic-objects-behaviours.html#sec-createbuiltinfunction and https://tc39.es/ecma262/multipage/ordinary-and-exotic-objects-behaviours.html#sec-setfunctionname (uses those arguments to set [[InitialName]] and the "name" property to "[Symbol.iterator]"), and https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-function.prototype.tostring (requires that the substring of the output matched by nonterminals between function and ( equals the value in [[InitialName]]—i.e., "[Symbol.iterator]").
18:43
<snek>
proposal so delayed that saying chakracore was relevant
18:43
<littledan>
sure I guess I just wanted to be clear what amount of volunteering I was up for. writing automation: yes. an hour of work per year: yes. more than that: no. unclear if this would be enough
Did the conclusion that I stated map to what you're saying?
18:43
<bakkot>
littledan: yup, thanks
18:52
<bakkot>
do we have any registered symbols currently?
18:52
<bakkot>
I think no?
18:52
<jschoi>
FrankYFTang has had his hand raised in Google Meet for a while, but he might not be aware of the TCQ queue?
18:53
<jschoi>
Wait never mind, he’s on it.
18:57
<Richard Gibson>
bakkot: we do not, but it's not observable anyway AFAIK
18:57
<bakkot>
well it would be observable in that you could Symbol.keyFor something from the spec, but otherwise yeah
18:58
<bakkot>
(or do Symbol.for(x) and get a thing from the spec, equivalently)
18:58
<bakkot>
hm, turning this around actually, I wonder if we could make the existing well-known symbols be registered
18:58
<bakkot>
probably, right?
18:59
<bakkot>
though Ashley Claymore 's concern is valid
18:59
<snek>
what implications would this have for weakmap keys i wonder
18:59
<littledan>
Was anyone proposing that we make more use of Symbol.for?
18:59
<Richard Gibson>
Symbol.for does not provide such a signal, but you're right that Symbol.keyFor would
18:59
<bakkot>
I had understood that to be markm's proposal?
18:59
<littledan>
I see
19:00
<bakkot>
Richard Gibson: doesn't it? Symbol.for(str) === thingFromSpec would become true for some str
19:00
<Richard Gibson>
only if thingFromSpec were also reachable in some other way
19:00
<littledan>
Yeah I share the concerns that others have raised that this causes forward compatibility risk
19:01
<bakkot>
the symbol.for space is just another shared global namespace
19:01
<bakkot>
not totally clear to me why we thought it was good to add more of those
19:01
<littledan>
I think "web reality" is not well-defined when browsers disagree, but yes going with the majority is good
20:11
<Michael Ficarra>
yeah that presentation was nice and thorough
20:17
<bakkot>
for the notes, who is the spidermonkey person?
20:17
<bakkot>
oh dlm apparently, nvm
20:34
<bakkot>
what's the type of the result of d.total?
20:34
<bakkot>
number or bigint?
20:34
<bakkot>
because if it's bigint I don't like Infinity here
20:34
<apaprocki>
number
20:35
<bakkot>
ok good
20:36
<apaprocki>
should there be a way to get a total (that can not have a fractional part) as a bigint?
20:39
<bakkot>
mostly I'm thinking about long durations and nanoseconds but frankly I'm not super worried about it
20:39
<bakkot>
if it comes up we can add it later
20:39
<apaprocki>
yeah that's what I was wondering
20:41
<ryzokuken>
serenityos is fully implemented IIUC
20:41
<ryzokuken>
cc littledan
20:42
<littledan>
those people are so impressive
20:42
<rkirsling>
oh yeah there are definitely more normative changes to Temporal yet to come but
20:42
<rkirsling>
that's not really necessary to discuss right here haha
20:42
<ryzokuken>
those people are so impressive
I'd hoped to get invited by this one, but it was too close to June.
20:49
<waldemar>
Regarding the current discussion: The US tried year-round DST in 1973. It lasted less than a year before getting repealed.
20:50
<waldemar>
So the rules will just keep changing…
20:50
<bakkot>
dunno if philip is in the chat, but if so, can you capture the exact list of what we got consensus on in the notes?
20:50
<ptomato>
certainly
20:51
<bakkot>
I don't want to say "everything presented" because the presentation is ephemeral
20:51
<bakkot>
thanks
20:58
<ptomato>
added
21:09
<Michael Ficarra>
I don't see what the motivation to not reject unrecognised strings is
21:10
<Michael Ficarra>
like, who wants that?
21:10
<apaprocki>
yeah seems like that shouldn't have been done
21:10
<bakkot>
it's because it was originally a boolean
21:10
<bakkot>
and so it just used ToBoolean
21:11
<bakkot>
and now they're trying to expand the space
21:11
<bakkot>
and it turns out some people are already passing strings
21:11
<littledan>
so I guess the alternative would be to give up on this property and make a new one
21:11
<bakkot>
so you gotta not break them
21:11
<apaprocki>
yeah
21:11
<littledan>
I'm fine with either approach
21:11
<apaprocki>
keep that a boolean, add something that provides better representation
21:12
<yulia>
uhh what was said by ross?
21:12
<rkirsling>
oops
21:12
<yulia>
i did not hear it at all
21:12
<ryzokuken>
was that captured in the notes? it was very quiet
21:12
<rkirsling>
sorry
21:13
<Rob Palmer>
oh he did not have a mic
21:13
<Rob Palmer>
Yusuke thanked Shane for the proposal
21:13
<rkirsling>
I can say it again if needed but technically I didn't need to speak
21:14
<Robin Ricard>
rkirsling: maybe just add it manually to the notes
21:14
<rkirsling>
Kevin kindly did so for me 😅
21:15
<Robin Ricard>
Yep just looked it up!
21:19
<rkirsling>
yeah that last argument was quite strong, I think
21:22
<Rob Palmer>
resume at 14:32
21:22
<ryzokuken>
I'll mute elastigirl
21:22
<yulia>
ill head off for the day, cheers folks
21:34
<Robert Pamely>
For useGrouping, did "true" and true used to resolve to different options before v3?
21:34
<Robert Pamely>
I see now "true" -> "auto", and true -> "always"
21:40
<Michael Ficarra>
can elastigirl mute when others are speaking? we are getting feedback on the call
21:40
<rbuckton>
The symbol approach feels a lot like https://esfx.js.org/esfx/api/collection-core/readonlycollection-interface.html#_esfx_collection_core_ReadonlyCollection_interface, so I like it.
21:41
<Rob Palmer>
can elastigirl mute when others are speaking? we are getting feedback on the call
it's hard to do this when we have an in-room presenter
21:42
<Michael Ficarra>
that is so much better, thank you
21:45
<Rob Palmer>
it requires me to stand at the podium and predict transitions well
21:46
<rbuckton>
Is the presenter able to mute/unmute themself at the podium?
21:46
<Rob Palmer>
yes - i can encourage more use of the podium for that purpose
21:46
<Rob Palmer>
is the echo still there?
21:47
<jschoi>
No echo right now.
21:47
<Rob Palmer>
(but it also transfers the burden to the presenter, which is a bit of an impediment for an active presenter)
21:47
<jschoi>
…There is an echo now when WH talks.
21:47
<Rob Palmer>
i turned down the in-room volume
21:48
<Rob Palmer>
what about now? volume is lowest feasible
21:48
<rbuckton>
(but it also transfers the burden to the presenter, which is a bit of an impediment for an active presenter)
The presenter is more able to determine when they are about to speak, however. 🤷
21:48
<rbuckton>
There was still an echo just now.
21:49
<Rob Palmer>
the mute is for the whole room, so the presenter needs to guess for local speakers
21:49
<Rob Palmer>
i will enforce this is remote folk really need this
21:49
<rbuckton>
I was able to understand Philip despite the echo, so that may have helped a bit.
21:50
<Rob Palmer>
still bad with waldermar?
21:50
<ptomato>
it's definitely noticeable
21:50
<rbuckton>
It's unfortunate the podium mic doesn't have a self-mute.
21:51
<jschoi>
I don’t hear an echo with WH at all anymore.
21:51
<jschoi>
…Well, sometimes I slightly hear one.
21:51
<Robert Pamely>
It could be the table mics echoing too
21:51
<littledan>
the mute is for the whole room, all or nothing, Rob is diligently manning the mute booth.
21:51
<littledan>
Is it working?
21:52
<Robin Ricard>
Rob is currently switching
21:52
<Robin Ricard>
Looks like we have less complaints with active rob mixing
21:52
<rbuckton>
Do we need @@setHas/@@setSize or do we need @@keysIterator?
21:53
<jschoi>
Looks like we have less complaints with active rob mixing
This sounds like a big hassle for him, maybe not sustainable in the long run; in the meantime, thank you, Rob.
21:54
<rbuckton>
Alternatively, intersection could be generic and merely require the presence of size, has, keys.
21:55
<rbuckton>
(or size, has, entries)
21:56
<Michael Ficarra>
I kinda really like this idea
21:59
<Michael Ficarra>
I think the idea was more like: why can't we ask the argument to convert itself to a set?
21:59
<Michael Ficarra>
for sets, they would just return themselves
21:59
<Devin Rousso>
yeah
21:59
<Devin Rousso>
it seems like adding all of these extra methods is a bit overkill
22:00
<Devin Rousso>
like i dont see how a method is gonna make this any more efficient in the case that the arg is an array
22:00
<Michael Ficarra>
Devin Rousso: to be clear, they are not new methods, just aliases of the existing built-ins
22:00
<Devin Rousso>
Michael Ficarra: the arg.has i mean
22:00
<Robin Ricard>
DRO: I mispasted the q you asked ont ça in the notes
22:00
<Robin Ricard>
Can you please restate it here?
22:00
<littledan>
Yeah, this whole proposal seems like overkill; I'd kinda prefer that we just don't try to be generic in terms of permitting an argument which does not have [[SetData]] (but maybe we rejected that in the past?)
22:00
<Robin Ricard>
(Sorry for the bad autocorrect)
22:01
<Devin Rousso>
Robin Ricard: it was something along the lines of "why cant we just convert the arg to a Set?"
22:01
<littledan>
I'm fine with it going forward in this state but it's not my preference
22:01
<Robin Ricard>
Thanks
22:02
<Michael Ficarra>
littledan: we talked about reaching into internal slots vs calling public methods at the last meeting (for 2 hours)
22:02
<rbuckton>
Yeah, this whole proposal seems like overkill; I'd kinda prefer that we just don't try to be generic in terms of permitting an argument which does not have [[SetData]] (but maybe we rejected that in the past?)
I've written custom set implementations that could in theory work fine with this assuming a generic enough implementation of intersection.
22:02
<littledan>
what was the conclusion?
22:02
<littledan>
sorry will check notes
22:02
<ljharb>
slots on receiver, methods on arguments, iirc (i think it's the first slide also)
22:03
<littledan>
but, maybe it sounded easier in the abstract, and now it turns out to be complicated?
22:04
<Devin Rousso>
in what scenario would something like arg.has not be worse performance than creating a Set from the arg (not including if it already is one)?
22:04
<Michael Ficarra>
littledan: notes here: https://github.com/tc39/notes/blob/main/meetings/2022-03/mar-31.md#extending-built-ins
22:04
<ljharb>
"already is a set" is the problem, because you can't do an internal slot check on a Proxy around a Set. meaning, if you pass in a proxy to a builtin Set, the performance of .has would be much better
22:04
<Michael Ficarra>
littledan: no, I think it's actually what we want to do
22:05
<Devin Rousso>
ljharb: ah i see
22:05
<ljharb>
hence, slots only on receiver, not arguments, so that you can pass a Proxy if you want
22:05
<Devin Rousso>
it just seems like we're effectively saying to developers "we should have a Array.prototype.has = Array.prototype.includes so that you can use it here too"
22:05
<littledan>
oh, I see, this was in March, that's why I don't remember it
22:05
<ljharb>
but, slots on receiver so you can maximize perf and minimize observable lookups
22:06
<jschoi>
(The conceptual parallel between Sets and Maps is a very important point.)
22:07
<littledan>
https://github.com/tc39/notes/blob/main/meetings/2022-03/mar-31.md#extending-built-ins
22:09
<littledan>
I guess no conclusion was recorded
22:09
<rbuckton>
there are echos
22:09
<ryzokuken>
there is echo
22:09
<jschoi>
There is still echo.
22:12
<littledan>
I'd note that a lot of the previous discussion was with Shu; he's out today, so it's probably worth discussing this with him offline if you haven't done so already
22:12
<rbuckton>
I'm not opposed to symbols for this, since symbols often are to JS what interfaces are to statically typed languages. They convey a very specific intent and avoid collisions with same-named methods with different intentions. To Devin Rousso 's point, we could potentially have a @@toSet symbol that returns a { size, has(), @@iterator() } that a Set could just return this.
22:13
<Devin Rousso>
i think my overarching point is that it seems like a lot of work just to make a Proxy of a Set work 😕
22:13
<littledan>
we're talking about symbols just for the argument, not the receiver, right?
22:13
<Devin Rousso>
which id imagine is probably one of (if not the) least common arguments that will be used for this
22:14
<rbuckton>
If I were to pass a Proxy for a Set to intersection, I would definitely expect it to go through the proxy's size, has, etc. rather than work directly against [[SetData]].
22:14
<Devin Rousso>
part of me also is wondering why we dont just require that the arg actually be a Set
22:15
<Devin Rousso>
given how much some delegates dislike extending builtins
22:15
<rbuckton>
I mentioned above, I have classes like HashSet and SortedSet that do not inherit from Set, but could easily participate in Set.prototype.intersection
22:15
<Devin Rousso>
or if not a Set then maybe we just require that the arg has a has method
22:16
<littledan>
rbuckton: Ah OK I see
22:17
<Devin Rousso>
rbuckton: IMO as long as your HashSet/SortedSet has a has then i would kinda expect that that'd be enough (at least for intersection)
22:17
<rbuckton>
I wouldn't be opposed to adding either a @@setSize/@@setHas or @@toSet to those types. In fact, they already use the ReadonlyCollection.size/ReadonlyCollection.has symbols I publish in @esfx/collection-core.
22:21
<Michael Ficarra>
part of me also is wondering why we dont just require that the arg actually be a Set
That's actually the opposite of what we would do based on our recommendation to not extend builti-ins. Our recommendation in lieu of that is to build something (possibly a wrapper) that provides the Set API. For that to work, we need to not require that the argument is a Set.
22:21
<Devin Rousso>
that's fair
22:22
<littledan>
OK, thanks for recapping the motivation
22:24
<Michael Ficarra>
littledan: yeah I think the powerful takeaway from the extending built-ins discussion is that language users don't "own" the internal slots for built-ins, we do
22:24
<Michael Ficarra>
so if they want to like gate access to those slots, it is inappropriate to extend/override methods, because we may provide additional access to those slots in the future through new methods
22:25
<Michael Ficarra>
instead, they should build something that wraps the built-in and expose access to the built-in with their desired lmiitation/extension
22:25
<littledan>
right I was not picturing that we'd provide extensibility through subclassing, but rather that we just don't provide any compatibility with different types for arguments at all
22:25
<bakkot>
again, can we just make the well-known symbols registered
22:25
<bakkot>
i like that option
22:25
<bakkot>
give them long names no one is going to have used, maybe
22:26
<Michael Ficarra>
HMAC their name with a secret only known to TC39
22:26
<littledan>
we also could've just used longer strings for these names, like "__iterator__"...
22:26
<ryzokuken>
that seems quite python-y
22:28
<bakkot>
@@iterator, reify the spec thing
22:31
<rbuckton>
If we use a stringy-enum, I'd like to find a term other than "unique".
22:32
<Michael Ficarra>
I don't know how nobody in the ES2015 timeframe noticed the incredible irony of sticking the well-known symbols on Symbol, creating a string-based namespace
22:32
<rbuckton>
TS uses unique symbol in type-space to denote a Symbol tied to a declaration for static typing purposes. It wouldn't affect runtime, but would be very confusing for our users.
22:32
<littledan>
I think everyone just wanted ES2015 to ship despite it not being perfect (understandable)
22:33
<littledan>
it has a lot of things that were understood at the time to be a compromise among committee members, and a lot of things which were only discovered to be problematic later (e.g., during implementation, but that was considered too late back then)
22:34
<littledan>
Symbols were initially supposed to be a path to private state! But then people felt like there need to be reflective interfaces for them...
22:34
<Michael Ficarra>
it was like it was rushed out at the end
22:34
<littledan>
yeah, I think so, but it's easy for us to say that, as we weren't in the debates for four years
22:34
<bakkot>
I agree with ljharb that these APIs are more ergonomic than the mechanisms mark wants, but I don't think this comes up often enough for it to be worth optimizing for ergonomics very hard
22:34
<Michael Ficarra>
yeah, we only saw the last like 3 or 4 meetings of ES2015
22:35
<littledan>
in my very first TC39 meeting, they voted to finalize ES2015
22:36
<rbuckton>
I never felt that was the case, and thought that "private symbols" was supposed to be what you are talking about. I always looked at symbols as a means to emulate interface in static languages so as to avoid collisions due to the same name/different intent.
22:37
<ryzokuken>
Robin Ricard: you're sharing your screen
22:38
<littledan>
I never felt that was the case, and thought that "private symbols" was supposed to be what you are talking about. I always looked at symbols as a means to emulate interface in static languages so as to avoid collisions due to the same name/different intent.
Yes, both of these
22:38
<littledan>
I didn't say that that was the only intention of symbols, but it was also a major one
22:38
<littledan>
The return override trick is a beautiful solution to how custom elements can use private fields!
22:38
<rbuckton>
Robin Ricard: still sharing
22:39
<Robin Ricard>
thnaks
22:43
<Michael Ficarra>
wait so if you can add private fields to fozen/preventExtensions objects, how is that not a communications channel nightmare?
22:44
<Michael Ficarra>
erights: ^
22:44
<Kris Kowal>
Mark’s not in this channel. I’ll forward.
22:44
<ljharb>
you can also put frozen objects in a WeakMap. it's the same thing
22:45
<ljharb>
if you have access to a private field, you already can have a side channel
22:45
<rickbutton>
you can prevent the communication of the private field itself
22:45
<rickbutton>
exactly
22:45
<ljharb>
the point is that you can't hand the object to someone else and have them get access to the private field, or the weakmap, unless you give them the weakmap (or a lens around the field)
22:45
<ljharb>
ie having the object doesn't grant any capabilities unless you also have the "other piece"
22:46
<Michael Ficarra>
okay that makes sense
22:50
<snek>
didn't we have explicit consensus about "legacy" items being the new way annex b happens
22:51
<snek>
i really don't want to argue more about annex b lol
22:52
<Michael Ficarra>
snek: no, Legacy just means icky
22:52
<snek>
normative optional + legacy rather
22:52
<Michael Ficarra>
https://tc39.es/ecma262/#sec-conformance
22:52
<snek>
except this is a host hook, so normative optional doesn't really matter
22:54
<Michael Ficarra>
"I have to skip past this unrelated part" is not the same as "I have to know to look in Annex B any time I read anything"
22:54
<Michael Ficarra>
one is WAY MORE burdensome
22:54
<snek>
this is legitimately annoying me i'm gonna go burn down my github notifications
22:56
<rbuckton>
one is WAY MORE burdensome
Though we do have a bunch of "NOTE This section is extended by Annex B..." throughout the spec, at least.
22:57
<Michael Ficarra>
also, is this not 100% an editorial concern? shouldn't we trust the editors to organise the spec in a way that benefits the considered readers the most?
22:58
<Michael Ficarra>
if anyone is not aware, the editor group spends a lot of time considering how the different readers of the spec will be impacted by even very minor wording/presentation things
22:58
<Michael Ficarra>
and we consider all sorts of readers
22:58
<littledan>
Note that much of Annex B is shipped outside of browsers (but this probably doesn't need to be)
23:19
<bakkot>

sorry, I should have made the constraints here clearer:

  • we want to accept things which are not actually Sets for reasons discussed at length in the previous meeting, most significantly that we consider the only good way to modify the behavior of a Set to use composition, rather than inheritance, which means Set-like things will come up in real life
  • just invoking the string-named has directly (and using Symbol.iterator) runs into this problem with Map where doing that will work as if you'd passed the Set of the map's keys only if the map is larger than the set, which is extremely painful behavior for an API to have
  • using has and keys (rather than Symbol.iterator) happens to work ok for maps, but one could have a List data structure which has a has method which does list membership but for which keys gave indices as it does for Array
23:22
<Ashley Claymore>
interface Setish {
  hasKey(k): boolean;
  size: number;
  keys(): Iterator;
}
23:23
<rbuckton>

sorry, I should have made the constraints here clearer:

  • we want to accept things which are not actually Sets for reasons discussed at length in the previous meeting, most significantly that we consider the only good way to modify the behavior of a Set to use composition, rather than inheritance, which means Set-like things will come up in real life
  • just invoking the string-named has directly runs into this problem with Map where doing that will work as if you'd passed the Set of the map's keys only if the map is larger than the set, which is extremely painful behavior for an API to have
The map issue is related to iterating over its entries by default, as opposed to explicitly mapping over .keys. Your point about incompatible has and keys stands, but is just as applicable to has and size
23:24
<Ashley Claymore>
so size might also need some namespacing?
23:25
<bakkot>
rbuckton: yeah, true; the fundamental thing is that you need these methods to have a specific relationship to each other, and that relationship is not obvious for {string/well-known-symbol}-named methods
23:25
<rbuckton>
It's unfortunate you can't intersect with an array, which instead has length and includes, and whose keys are indices, but you have to draw the line somewhere I suppose.
23:25
<bakkot>
interface Setish {
  hasKey(k): boolean;
  size: number;
  keys(): Iterator;
}
we could do something like that but that seems way worse than symbols
23:26
<bakkot>
It's unfortunate you can't intersect with an array, which instead has length and includes, and whose keys are indices, but you have to draw the line somewhere I suppose.
honestly I'm OK with that, since using includes would make it O(n^2), which would be very surprising
23:26
<Ashley Claymore>

This was why I suggested putting the whole protocol behind one symbol, so that serves as a single namespace for everything.

interface Setish {
  [Symbol.Setish](): {
    size: number:
    has(v): boolean;
    values(): Iterator;
  }
}

Set.prototype[Symbol.Setish] = function() { return this; }
23:26
<bakkot>
I'm considering the possibility of falling back to Symbol.iterator in intersection in the case that the argument lacks has/setHas; not sure how I feel about that yet
23:27
<bakkot>

This was why I suggested putting the whole protocol behind one symbol, so that serves as a single namespace for everything.

interface Setish {
  [Symbol.Setish](): {
    size: number:
    has(v): boolean;
    values(): Iterator;
  }
}

Set.prototype[Symbol.Setish] = function() { return this; }
yeah; this implies an extra property access, though, and I don't see any benefit over just having more symbol-named methods (though maybe I am missing what the benefit is?)
23:27
<snek>
someone may have asked this but we have a pattern of keys/values/items on things, can we just always ask for keys?
23:27
<rbuckton>
We could have symbols to produce a "view" over an object, ie, @@setView() returns a Set-like representation.
23:28
<rbuckton>
Then even an Array could produce a set-like view
23:28
<bakkot>
again, making Array set-like makes intersection O(n^2), which seems bad
23:28
<rbuckton>
Or at least, a read-only representation.
23:28
<Ashley Claymore>
cost is one single prop access per method call (seems low). Benefit is the protocol itself can be string based which is nicer to type. And also that it's low impact to implement the interface (only need one unique symbol)
23:29
<bakkot>
yeah but it means the protocol is a lot more complicated; for anything for which it was not just return this; it would be a lot more work overall
23:29
<rbuckton>
again, making Array set-like makes intersection O(n^2), which seems bad
And if you need that, you'd just be doing set.intersection(new Set(ar)) anyways
23:30
<bakkot>
and this is not something we expect people to be doing very often - at most once per new set-like you implement, which, I don't do that very frequently. so not something I think it's very important to optimize for ergonomics very much
23:31
<Ashley Claymore>
yeah but it means the protocol is a lot more complicated; for anything for which it was not just return this; it would be a lot more work overall
only more complicated for things that want to implement multiple conflicting protocols (because they can't return this). The other approaches don't support being able to support multiple conflicting protocols at all.
23:31
<bakkot>
if the protocol is entirely symbol-based, then there's no such thing as a conflicting protocol?
23:32
<bakkot>
that claim confuses me
23:32
<Ashley Claymore>
only if all the symbols are unique to that protocol. e.g. don't use something generic like Symbol.iterator
23:32
<bakkot>
and to be precise, your proposal is more complicated for anything which wants to use has in a way that is inconsistent with how the Set protocol uses it, which is not the same as "implementing multiple protocols"
23:33
<bakkot>
yes, and as I said, if we think that people might want to do iteration in multiple inconsistent ways then we would not use Symbol.iterator in the set protocol
23:33
<bakkot>
we would instead only use set-specific symbols
23:33
<bakkot>
(if we aren't concerned about that, of course, it's not relevant)
23:34
<Ashley Claymore>
I guess what I'm trying to get but also avoid is: Symbol(setHas) Symbol(setSize) Symbol(setValues)
23:34
<bakkot>
right, and, why are you trying to avoid that?
23:34
<bakkot>
that's what I'm missing
23:34
<Ashley Claymore>
its a lot of symbols ¯\_(ツ)_/¯
23:35
<bakkot>
so it is but I am still not seeing the problem
23:35
<Ashley Claymore>
ha! fair, it's not really a problem. But a subjective thing
23:36
<bakkot>
I think symbols are good and should be encouraged, and intermediate objects are bad and should be discouraged, is my general feeling
23:37
<bakkot>
incidentally are people still hanging around the office somewhere?
23:37
<rbuckton>
I'm somewhat partial to parts of Michael Ficarra's protocol proposal, which provides an easy way to group related symbols by a namespace.
23:37
<bakkot>
yeah, I was talking to him about this
23:38
<bakkot>
had we settled on the choice of using symbol-named things, I was going to propose that we put these symbols under Set.protocol
23:38
<Ashley Claymore>
i feel like I miss understood that proposal, as it didn't seem to namespace the protocols?
23:38
<bakkot>
so Set.protocol.has = Symbol(), etc
23:38
<bakkot>
Ashley Claymore: the protocols themselves are just values which hold symbols
23:39
<rbuckton>
There were parts of that proposal that seemed very disconnected, but I emulated the namespacing aspect in a lot of my @esfx/* packages.
23:39
<Ashley Claymore>
My reading of the README was that the fields are symbols but the methods were strings
23:40
<bakkot>
nope
23:40
<Ashley Claymore>
protocol ToString {
  tag;

  toString() {
    return `[object ${this[ToString.tag]}]`;
  }
}

Object.prototype[ToString.tag] = 'Object';
Protocol.implement(Object, ToString);
23:40
<bakkot>
cc Michael Ficarra ^ I told you this was misleading
23:40
<bakkot>
Ashley Claymore: yes, that's what the readme says, but the readme is misleading on this point
23:41
<Ashley Claymore>
How do I call the toString
23:41
<bakkot>
please just ignore that example
23:41
<bakkot>
that is a bad example
23:41
<Ashley Claymore>
will do :)
23:41
<rbuckton>
I didn't like the bit of declaring both named symbols and non-symbol methods together, it was very confusing.
23:42
<bakkot>
the proposal it doesn't allow you to declare non-symbol methods
23:42
<bakkot>
only to require they exist
23:42
<Ashley Claymore>
Would be nice if the README had an example of calling the protocols too. I think that's what I'm missing
23:42
<rbuckton>
See toString in the example above.
23:42
<bakkot>
the toString example is bad
23:42
<bakkot>
it is bad and wrong
23:42
<bakkot>
please ignore it
23:42
<bakkot>
Michael Ficarra: please fix it
23:43
<rbuckton>
If it's just Namespaced symbols, I like it because I can attach type info to it in TS. Mixing in implementations in the same namespace is confusing.
23:45
<rbuckton>
I'd be fine with a version that let you specify a default implementation of a symbol method, but the last version I saw seemed like it was also trying to handle mixins as well