00:00
<rbuckton>
enums-as-constants isn't orthogonal to ADT enums.
00:02
<Jack Works>
https://matrix.to/#/!vofPwuBJgbSdyEilYo:matrix.org?via=matrix.org Welcome to join the chat if you have interest in working on this together. ⭐ This is NOT a tc39 group cause it didn't reach stage 1, it's a public group but not following the ECMA policy (logged and published). I'll create an official group like pattern matching and pipeline after it reaches stage 1.
00:04
<yulia>
we can probably make it an official group if the chairs decide that
00:07
<Michael Ficarra>
rbuckton: I agree, but I also think it wouldn't do any harm to pursue it in two phases
00:08
<rbuckton>
rbuckton: I agree, but I also think it wouldn't do any harm to pursue it in two phases
Even if we pursue it in two phases, we need to consider how ADT enums need to function to ensure we don't paint ourselves into a corner with non-ADT enums.
00:08
<Michael Ficarra>
I think we have the ability to do that though
00:09
<leobalter>
Rob Palmer, yulia my coworker Jenna couldn't access the Reflector today to get the meeting info. Can you confirm her github user is ok? https://github.com/tc39/Admin-and-Business/issues/174
00:10
<ljharb>
leobalter: i just invited them; invites expire in 7 days so perhaps they didn't accept in time the first go
00:10
<rbuckton>
Which means we need to do most, if not all, of the work we would need to do for ADT enums to ensure we have consistency across multiple other language features such as pattern matching.
00:10
<leobalter>
Thanks, ljharb!
00:14
<shu>
rbuckton: i'd like a tighter story than that, because the implementation complexity and the design space of the primitive enums vs ADTs are miles apart
00:29
<jschoi>
I do recursion all the time.
To give a concrete example of this for Jordan, I invariably use recursion when I write parsers. Recursive descent parsers are my favorite type.
00:29
<jschoi>
With or without PTC…
00:36
<rbuckton>
I'm primarily interested in ADT enums for how they could possibly be optimized by engines in ways that regular objects can't (hence my comments about megamorphism earlier). Switching on node.kind in the TS compiler is often a performance cliff due to megamorphism, even if every object/shape seen by a function has a .kind. If V8 were able to optimize this case for regular objects, I'd be ecstatic. If not, and V8 instead was able to optimize for ADT enums in a similar fashion, I would happily rewrite the entire TypeScript compiler to use an ADT for Node instead of regular objects/constructors even if that meant a complete breaking API change for consumers. If there are no performance optimizations that V8 could offer for either case, then ADT enums are at least interesting to me as a data structure but not a necessity.
00:39
<rbuckton>
There's a convenience factor for ADT enums coupled with something like Scala's "Extractor Objects" and pattern matching that is extremely interesting to me, but that's nowhere near as compelling to me as possible performance benefits.
00:40
<Rob Palmer>
rbuckton: a dirty hack proposal... if the .kind property is special and you want to avoid the megamorphic de-opt, couldn't you rename it to be index zero? node[0]
00:43
<rbuckton>
Does that work? I'd happily turn kind into a getter that just reads this[0] (for API compatibility) and replace all node.kind references in the compiler if that would actually improve performance.
00:44
<Rob Palmer>
I'm not 100% sure but seem to recall the V8 object layout for elements permits direct lookups not based on the map type. If only we had someone who knew V8 here...
00:48
<shu>
by my reading keyed loads like [0] also checks receiver maps
00:51
<rickbutton>
I wonder how off the “# of kinds of nodes in ts” is from the upper limit in v8 for optimization
00:51
<bakkot>
alternatively just rewrite it in go
00:51
<bakkot>
(this is a reference to https://kdy1.dev/posts/2022/1/tsc-go, not a serious proposal)
00:52
<shu>
i think if you want speed what you want is C
00:52
<bakkot>
you never want c under any circumstances whatsoever
00:53
<bakkot>
except writing aviation code with the very constrained dialect they use plus all of their static analysis tools I suppose
00:53
<bakkot>
and even then it's less "want" than "have no legal alternative"
00:54
<shu>
it is when we are constrained by the law that we are at our most creative
00:54
<bakkot>
doubt
01:23
<Rob Palmer>
rbuckton: shu this microbenchmark suggests megamorphic access to index properties is 3x faster than the same for string properties https://esbench.com/bench/61f099d96c89f600a570158a
01:28
<Rob Palmer>
oh wow - Axel Rauschmeyer has taken Dean Tribble's Proxy trick and blogged about it within 90mins of learning it... https://2ality.com/2022/01/symbol-factory.html
01:28
<rbuckton>

We tried to improve perf by ensuring that frequently-used fields like kind, pos, end, and flags are all stored in-object:

000003E4E0E47A91: [Map]
 - type: JS_OBJECT_TYPE
 - instance size: 160
 - inobject properties: 17
 - elements kind: HOLEY_ELEMENTS
 - unused property fields: 7
 - enum length: invalid
 - stable_map
 - back pointer: 0x03e4e0e47a49 <Map(HOLEY_ELEMENTS)>
 - prototype_validity cell: 0x034eb1241659 <Cell value= 1>
 - instance descriptors (own) #11: 0x012f0b6cfb21 <DescriptorArray[11]>
 - prototype: 0x012f0b6cf441 <Object map = 000003E4E0E47779>
 - constructor: 0x013a75523b41 <JSFunction Node (sfi = 00000353F65D5C41)>
 - dependent code: 0x020140ac1281 <Other heap object (WEAK_FIXED_ARRAY_TYPE)>
 - construction counter: 6

  [0]: 00000378FA033E49: [String] in OldSpace: #pos (const data field 0:s, p: 7, attrs: [WEC]) @ Any
  [1]: 0000009B539BD2B9: [String] in OldSpace: #end (const data field 1:s, p: 1, attrs: [WEC]) @ Any
  [2]: 0000028DD0EF42B9: [String] in OldSpace: #kind (const data field 2:s, p: 3, attrs: [WEC]) @ Any
  [3]: 0000007EABDD4071: [String] in OldSpace: #id (const data field 3:s, p: 9, attrs: [WEC]) @ Any
  [4]: 0000020140AC45D1: [String] in ReadOnlySpace: #flags (const data field 4:s, p: 8, attrs: [WEC]) @ Any
  [5]: 0000036E885DE309: [String] in OldSpace: #modifierFlagsCache (const data field 5:s, p: 10, attrs: [WEC]) @ Any
  [6]: 000001B37FD2DA09: [String] in OldSpace: #transformFlags (const data field 6:s, p: 0, attrs: [WEC]) @ Any
  [7]: 0000007EABDC4B09: [String] in OldSpace: #parent (const data field 7:h, p: 6, attrs: [WEC]) @ Any
  [8]: 00000378FA0349F1: [String] in OldSpace: #original (const data field 8:h, p: 5, attrs: [WEC]) @ Any
  [9]: 000001B37FD2D511: [String] in OldSpace: #decorators (const data field 9:h, p: 4, attrs: [WEC]) @ Any
  [10]: 000001B37FD24099: [String] in OldSpace: #modifiers (const data field 10:h, p: 2, attrs: [WEC]) @ Any
01:36
<shu>
that should save you a load, yeah
01:58
<Michael Ficarra>
there's a spam comment on an ecma262 PR, what should I do?
01:58
<Justin Ridgewell>
You should take a look at closure compilers AST layout
01:59
<Justin Ridgewell>
Everything is firstchild lastchild nextchild
01:59
<Justin Ridgewell>
Can’t have megamorphic access if everything has the exact same properties
02:18
<Mathieu Hofman>
jschoi: I double checked Array.fromAsync, and since the content of the [[Iterator]] slot is never revealed to user code, the async iterator wrapper prototype is still spec internal only. It sure would be nice to have a way to explicitly note this, so that these internal only things don't get surprisingly exposed without anyone noticing in the future!
02:46
<Richard Gibson>
Mathieu Hofman: do you mean like the note at https://tc39.es/ecma262/#sec-createlistiteratorRecord ?
03:08
<Mathieu Hofman>
I suppose, but these things can be lost transitively. First, the CreateAsyncFromSyncIterator doesn't have this annotation. Second, really it seems that GetIterator creates a record for an iterator (possibly coming from user code, possibly internally built through CreateAsyncFromSyncIterator), but while that record transits through a lot of place, the iterator it contains is seemingly never exposed to user code. It's a weird invariant that is not well understood
06:06
<Ashley Claymore>
Can’t have megamorphic access if everything has the exact same properties
I though location of the initial object creation matters too; for some engines where the hidden-class graph is a forest and not a tree
14:18
<Jack Works>
Can anyone give a demonstration of ADT without using pattern matching?
that's depends on the semantics of ADT enum but it doesn't have a runtime semantics specified yet so I cannot give an example sorry
16:57
<ljharb>
jschoi: fair, but i hope you're not suggesting that writing a parser is anywhere remotely near a common use case
17:02
<Michael Ficarra>
ljharb: parsers are everywhere
17:02
<Michael Ficarra>
people are writing parsers all the time, whether they know it or not
17:03
<Michael Ficarra>
most are simple and can be expressed as a regexp or a series of regexps
17:03
<ljharb>
that sounds like either a really bold claim, or one so broad as to dissolve the context
17:03
<ljharb>
"writing a parser where recursion makes sense" is not a common use case.
17:03
<Michael Ficarra>
parsing is turning something less-structured into something more-structured
17:04
<jschoi>
Yeah. It doesn’t even have to be on text input but any sequence of values.
17:04
<ljharb>
so parsing is anything that fights the entropy of the universe, gotcha
17:04
<ljharb>
when i grow hair, i'm parsing?
17:05
<ljharb>
in the context we're discussing things, "writing a parser" such that you'd reach for recursion is simply not a common use case
17:05
<jschoi>
JSON validation is parsing, for example.
17:05
<ljharb>
i don't need recursion for that tho.
17:06
<jschoi>
Hm, is recursion not required to validate many JSON structures? After all, many JSON schemata are recursive.
17:06
<ljharb>
i'm sure a JSONSchema validator may be recursive, sure. but most people don't write those, they just consume them
17:07
<ljharb>
i'm not trying to claim that parsers don't affect a lot of devs. i'm saying that most devs don't author them.
17:07
<ljharb>
in the same way as "get intrinsics" affects a lot of devs, but most devs don't need to do that directly. and both are relevant when weighing the importance of including syntactic affordances in the language (which is why i'm not trying to pursue syntax for getting intrinsics - because it's not common)
17:08
<jschoi>
Yeah, it may be that because I’m familiar with them, I reach for them more readily than most developers.
17:08
<jschoi>
But I do know I write a lot of ad-hoc parsers to validate stuff—both textual and non-textual.
17:08
<jschoi>

Just the other day, I had to write an ad-hoc parser for some custom-formatted text file’s lines, as well as some JSON data from a hospital’s record system containing entities within entities…and, before that, the Unicode Character Database’s source text files (though recursion wasn’t necessary for the last one).

Regexes are super common, but I often need more power than regular expressions…and I often need to apply them to non-textual input.

17:08
<Jack Works>
As I can recall from some of my friends, "it's very hard to find some candidates that understand what is recursion"
17:12
<ljharb>
i have the opposite experience - i have interviewed thousands of candidates over the years who are incapable of NOT using recursion, since they were indoctrinated with it in university. our hiring panels always reject those, because recursion is often the wrong tool for the job, at least in frontend.
17:13
<ljharb>
at any rate, i'm not trying to debate the value of use cases/parsers or techniques/recursion, just that i strongly believe it's an uncommon combination.
17:15
<Jack Works>
Yeah. I agree (I think get intrinsics are useful for a very limited set of people including me, but doubt if it worth an API)
17:16
<ljharb>
to be clear, i think getting intrinsics is worth an API (hence the proposal), but decidedly not worth syntax.
17:17
<ljharb>
the context from before was about functions having an immutable binding for their own name but lacking a function.self metakeyword, or similar - as compared to class.self or similar, where i think the use case is much more common.
17:17
<ljharb>
(i'd be fine with function.self and class.self both, ofc, but i think the former would be much more rarely used)
17:19
<Jack Works>
Hmm. Inside a named function, is the name mutable?
17:30
<Michael Ficarra>
Jack Works: If you scroll up, we discussed that. Apparently it is immutable but does not error if you try to assign to it. The assignment just does nothing.
17:31
<ljharb>
even in strict mode? (edit: checked, and yes, even in strict mode; that is super weird)
17:34
<shu>
it is an ur-const
17:36
<Michael Ficarra>
all these years, I just thought it was mutable
17:43
<Rob Palmer>
"ur-const"?
17:43
<bakkot>
this behavior predates const
17:43
<bakkot>
it used to be the only immutable binding, so it wasn't inconsistent that it didn't throw
17:44
<Michael Ficarra>
Rob Palmer: https://www.oxfordlearnersdictionaries.com/us/definition/english/ur
17:44
<Rob Palmer>
i would have named it "pre-const"
17:45
<ryzokuken>
pre-const somehow sounds like something which isn't const but predates const for some reason
17:54
<ljharb>
i'm surprised that when adding strict mode, it was missed
17:57
<ljharb>
erights: was that omission intentional?
17:59
<Rob Palmer>
We start plenary in 1 minute!
18:09
<shu>
jitsi always messes with my audio for some reason
18:09
<shu>
yesterday it wouldn't detect my headphones until i open preferences, but it goes away after i close preferences
18:09
<shu>
today, everytime i join, it moves the balance all the way to the left
18:09
<shu>
wtf
18:12
<bakkot>
if it's the system audio balance, that's a Mac OS bug that triggers when the CPU is pegged sometimes
18:12
<bakkot>
it's crazy and it has been known about for like a year now
18:12
<shu>
that is wild, how does that bug arise
18:14
<Mathieu Hofman>
mac os audio subsystem is extremely buggy. Afaik, chrome had to move to a restart-able audio process to deal with macos issues. Zoom used to just ask for admin rights to be able to kill the system audio when issues were detected.
18:16
<yulia>
this is very cool
18:16
<Ben Newman (Apollo, @benjamn on GH)>
no kidding
18:20
<leobalter>
the idea one can generate test for test262 (ish) but also customize outputs
18:22
<yulia>
ok, stuff like this would be amazing to record
18:25
<bakkot>
i am reminded of Futamura projections
18:25
<yulia>
wow
18:25
<shu>
which_one_meme.jpg
18:28
<rickbutton>
wut
18:31
<rickbutton>
WHAT
18:31
<rickbutton>
this is dope
18:32
<rkirsling>
very
18:32
<Michael Ficarra>
this is why I wanted them to share it with committee 🙂
18:32
<Michael Ficarra>
I think a lot of you will find this useful
18:32
<ryzokuken>
is the ECMA-402 spec too loose to try this? Let's get this working on 402 too!
18:33
<Michael Ficarra>
they will probably have to do a decent amount more work to make it work with ECMA-402
18:33
<ryzokuken>
understandable ☹️
18:33
<ryzokuken>
but we could help!
18:33
<Michael Ficarra>
remember, their contribution involved encoding the semantics of the phrasing we use in 262
18:34
<Michael Ficarra>
reducing the variety of that phrasing will simplify things
18:34
<Michael Ficarra>
ecma-402 unfortunately has a greater variety
18:34
<ryzokuken>
yeah, that's what I was afraid of
18:34
<ryzokuken>
absolutely. That plus the fact that large parts of it are impl-defined (relatively anyway) I suppose...
18:34
<Michael Ficarra>
ryzokuken: it's all open source, so you actually can make it work
18:35
<Michael Ficarra>
seems simple enough to add support for new phrases
18:35
<ryzokuken>
cool, I'll try to get it to work 😀
18:35
<Michael Ficarra>
but I'd prefer just reducing the variety of your phrasing in 402 anyway
18:35
<ryzokuken>
that's not a bad idea either, did you have an issue or sth to track this in 262?
18:36
<Michael Ficarra>
nah, we've just been doing them one by one as we notice them
18:37
<ryzokuken>
fair, I'll kickstart something on #tc39-ecma402:matrix.org
18:39
<bakkot>
shared array buffers are going to be hard to formalize by anything similar to the way the rest of the language is formalized
18:39
<yulia>
omgm
18:39
<bakkot>
though conrad watt has a formalization somewhere I think
18:39
<shu>
depends on what the goal of mechanizing the memory model would be
18:39
<yulia>
loving this
18:40
<shu>
it's possible to "support" the memory model by just treating them as non-shared
18:40
<shu>
like, an SC execution is never wrong
18:40
<bakkot>
shu: i mean mostly that the memory model is not written in the same kind of way as the rest of the spec
18:40
<shu>
right, mechanizing that into something operational is original research
18:40
<shu>
and is unsolved last i checked
18:40
<shu>
but i'm saying they could just ignore it
18:41
<Michael Ficarra>
PEGs use ordered choice
18:41
<Michael Ficarra>
so it probably just adopts the order we wrote it in
18:43
<Rick Waldron>
shu: I'm about to enter a 3 hour block of meetings, which ends with me leaving to pick up my daughter at school (I'm EST). Since there are no slides, or other information attached to "Let's talk about test262 maintenance and contribution", I'm not sure what else you want to discuss beyond the creation of the maintainers group. I'm concerned that I'm now going to miss this topic due to obligations on my end. What can we do about that? Can we defer it to tomorrow?
18:44
<shu>
i would prefer no deferral if there are no other agenda items for Thursday
18:45
<Michael Ficarra>
ptomato: if you integrated your proposal, as you would in a PR, I don't see why it wouldn't work
18:45
<shu>
i want to discuss the role of the maintainer group, the workflow, expectations from proposal authors, and stage requirements
18:46
<shu>
Rick Waldron: is there someone else you trust to present your viewpoint? are there also specific topics you want to raise?
18:46
<Rob Palmer>
we could bring forward JS Choi's item next, and then do test262 last today - does that help Rick?
18:47
<shu>
yeah, a schedule reshuffle if possible would be ideal, i guess
18:47
<Rick Waldron>
Rob Palmer: I think the end of the day for the meeting is when I'm feeding my daughter dinner
18:48
<Rob Palmer>
end of the meeting is 14:00-15:00 PST after your 3 hours of meetings
18:48
<Rick Waldron>
My meetings end at 5, and then I have to leave to pick my child up from school.
18:50
<Rob Palmer>
ok so that won't work then
18:51
<Rick Waldron>
I'm trying to figure out how long the 4pm thing will be
18:57
<Michael Ficarra>
Ben Newman (Apollo, @benjamn on GH): that was one of the questions the editors asked in our first call with them
18:57
<Ben Newman (Apollo, @benjamn on GH)>
cool, I guess it's a natural one!
18:57
<bakkot>
editors are planning on fixing up regex chapter at some point
18:57
<Michael Ficarra>
we'll try to make more progress on it following initial integration after we finish up this completion record reform work
18:57
<bakkot>
it's already gotten a lot better thanks to jmdyck
18:59
<bakkot>
learning that the regex chapter used to be lisp definitely explains some things
19:00
<Michael Ficarra>
yep, the "ordered pairs" probably came from there
19:01
<Michael Ficarra>
why port it so literally? lol
19:01
<Michael Ficarra>
I guess we didn't have the same ambitions of running analysers on the spec back then
19:03
<Rick Waldron>
Rob Palmer: shu My 4pm meeting was canceled. So 1pm PST?
19:03
<shu>
sure, i'm flexible for whatever time that works for rick
19:03
<shu>
(though still prefer today, not tomorrow)
19:03
<Rob Palmer>
ok
19:03
<Rob Palmer>
let's see if JS Choi can go next
19:04
<Rob Palmer>
jschoi: can you go next after this?
19:06
<Michael Ficarra>
WH is right, the papers are actually pretty easy to follow
19:06
<Michael Ficarra>
and they're very nicely split up
19:07
<bakkot>
I do think we should have a central place for this though
19:07
<bakkot>
there's a lot of research, not all of it in academia, and it would be good to have it more discoverable
19:07
<bakkot>
e.g. jmdyck's ecmaspeak and WH's link from earlier are both relevant and do not have papers
19:11
<Michael Ficarra>
I support saving the final 10 minutes for after lunch
19:12
<shu>
there's some kind of sync issue
19:12
<ljharb>
https://jschoi.org/21/es-dataflow/
19:13
<rkirsling>
dang this page is pretty
19:13
<ljharb>
https://jschoi.org/21/es-dataflow/map/
19:14
<Michael Ficarra>
is there like an extreme audio delay or something?
19:15
<ljharb>
there seems to be, yes
19:15
<rkirsling>
it's certainly robot-ing here and there
19:15
<leobalter>
Now I can hear JS-Choi better
19:15
<Rob Palmer>
i think js choi's connection is having issues.
19:16
<leobalter>
yes
19:16
<waldemar>
It would be great if we could read the presentations ahead of the meeting. I'd have appreciated some time to study the map of ES dataflow proposals ahead of time instead of in real-time at the meeting.
19:16
<Rob Palmer>
but it seems to be workable now - i suspect it is js choi's upload quality/bandwith
19:17
<Rob Palmer>
waldemar: the material was published ahead of time https://github.com/tc39/agendas/pull/1106
19:18
<Justin Ridgewell>
They stopped presenting, so the audio got better.
19:18
<TabAtkins>
Yeah, the whole point of assembling the agendas is precisely to allow you to review things ahead of time if you wish, and this in particular was put on the agenda about two weeks ago.
19:22
<waldemar>
The title was on the agenda, but there were no links to anything on the agenda.
19:22
<ljharb>
waldemar: that PR contains three links
19:22
<TabAtkins>
Yes there was - the PR shows that all the linkes were there.
19:23
<waldemar>
Sorry; my bad.
19:23
<waldemar>
I was looking at the wrong item.
19:26
<Mathieu Hofman>
you can assign to it but it's immutable

the lambda scope is not mutable

I'm not following, do you have an example?

19:27
<Mathieu Hofman>
(sorry catching up on some previous discussions)
19:32
<bakkot>
Mathieu Hofman: (function f(){ f = 0; console.log(f); })();
19:33
<bakkot>
the assignment doesn't throw, but also doesn't change f
19:36
<Mathieu Hofman>
It does in strict mode, doesn't it?
(function(){"use strict"; let foo = (function f() { f = 'foo'; }); foo(); return foo;})()
Uncaught TypeError: Assignment to constant variable.
19:36
<bakkot>
yeah
19:37
<Mathieu Hofman>
it's like assignment to a readonly property in sloppy, it silently ignore it. But strict mode fixes it.
19:37
<ljharb>
oh hmm. i'm not sure why my earlier strict mode tests didn't throw then
19:38
<Mathieu Hofman>
even in strict mode? (edit: checked, and yes, even in strict mode; that is super weird)
I was confused by ^
19:38
<ljharb>
my mistake then, sorry about that
19:39
<Mathieu Hofman>
Was trying to double check things before raising this with MM ;)
19:42
<shu>
i thought it also didn't throw in strict mode
19:42
<shu>
because it's always created with S = false
19:43
<shu>
been a while though
19:45
<bakkot>
S = true means that assignments to it will throw even in sloppy mode
19:45
<shu>
ah ha, got it backwards
19:48
<shu>
let's get to the queue imo
19:51
<Justin Ridgewell>
Do we not have free overflow time later today?
19:52
<ljharb>
the hackmd says 15 minutes
19:52
<shu>
is 10 of that already filled up by this?
19:52
<Rob Palmer>
yes
19:57
<shu>
did i hear voting
19:57
<bakkot>
can we have the "what voting system" fight again
19:58
<bakkot>
my position is, we should list every subset of these proposals and then do approval voting for the subsets
20:00
<yulia>
damn it, i was getting so pumped for this
20:01
<sarahghp>
gotta stay pumped for 1h
20:01
<sarahghp>
come in kicking
20:01
<Justin Ridgewell>
Thank you for splitting the topic (if needed, please continue without me)
20:01
<Justin Ridgewell>
Have to give an interview...
20:03
<Rob Palmer>
We shall return at 13:00 PST for a 10 minute continuation of the current topic on JS Choi's dataflow discussion. Please do not be late!
21:01
<ljharb>
it occurs to me throughout this agenda item, that it might be helpful to avoid using the word "this" to describe something that's not this :-)
21:13
<SoftwareChris>
it occurs to me throughout this agenda item, that it might be helpful to avoid using the word "this" to describe something that's not this :-)
Non-Lexical use of this considered harmful
21:18
<rkirsling>
yeah, I'm interested in this, but it's a bit hard to follow with nothing to look at
21:18
<ptomato>
shu: maybe it'd be good to structure the discussion by naming a topic that you'd like to start with?
21:18
<ptomato>
there are many topics that you touched on in your initial speech
21:19
<jschoi>
sarahghp: By the way, take a look at https://github.com/tabatkins/proposal-call-this-operator and let us know in the pipe room what you think. It’s another version of bind-this but which doesn’t overlap with the pipe operator.
21:22
<rkirsling>
anba is indeed the GOAT when it comes to really weird edge cases
21:26
<rkirsling>
it's also good to remember that as an implementer, it is infinitely easier to detect spec bugs in a proposal when tests exist and I can actually interact with the breakage
21:29
<bterlson>
An idea: stage 3 entrance criteria is a documented plan for authoring test262 tests (e.g. who will be doing work and when)? This might mean in practice folks will be thinking about it during stage 2.
21:30
<yulia>
I was thinking it would be nice to have a few basic tests earlier -- this is why i added the comment about adding a branch that is for integration effectively
21:31
<yulia>
implementers who start early can land there, those tests can be reviewed at stage 3
21:31
<danielrosenwasser>
Stage 2.5 came up a few times on our side - the idea of "implement, but do not ship anywhere even flagged", and doing that sort of implies the creation of tests anyway
21:32
<ryzokuken>
yeah, I believe a good thing to have would be an existing PR/branch with tests
21:36
<leobalter>
stage 2.5 seems like a good strategy to get champions more involved with the project
21:36
<rkirsling>
I'd support it
21:37
<ljharb>
that would be awesome
21:37
<ljharb>
especially for large proposals
21:37
<ryzokuken>
yeah, in hindsight it would've been amazing for Temporal
21:37
<Rick Waldron>
I was thinking it would be nice to have a few basic tests earlier -- this is why i added the comment about adding a branch that is for integration effectively

what if we had another branch for implementers to land pre-stage 3 tests that can help prove out the feature?

test262 has always allowed early landing as long as there's a feature flag

(during stage 2)

21:38
<ptomato>
I disagree, it would've been unfeasible for Temporal, and I can talk about that in the meeting if people would like to hear about it
21:38
<yulia>
ye..es but
21:38
<ljharb>
i would love to hear about why it would have been unfeasible
21:38
<ljharb>
given that the suggested 2.5 above includes "implement it but only behind a flag", which matches temporal's current implicitly agreed state
21:39
<yulia>
if we take the example of iterator helpers, which -- yes, was incomplete, but the student working on that was told it won't be landed because we don't land until stage 3, i feel like this was not communicated
21:39
<ryzokuken>
I suppose it won't be a problem for smaller proposals because we can skip straight to stage 3, right?
21:40
<ryzokuken>
it'd be a shame to wait for 2 extra months to just get a tiny proposal through
21:40
<ljharb>
sarahghp: is the maintainers' meeting on the tc39 calendar?
21:40
<ljharb>
ryzokuken: eg we could maybe even agree in plenary that a proposal is "2.5 now, but will be 3 once tests are landed and one implementer implements without finding normative issues" (something creative we all had consensus on, iow)
21:41
<rkirsling>
thereby justifying the .5 designation
21:41
<sarahghp>
sarahghp: is the maintainers' meeting on the tc39 calendar?
I have to find out how to do that.
21:41
<ryzokuken>
oh, without needing to come back to plenary?
21:41
<sarahghp>
Can you help?
21:41
<ljharb>
sarahghp: yep! i can add stuff to the cal; DM me date/time/url/invitees
21:41
<ljharb>
ryzokuken: yes, we've given "conditional stage 3" a number of times before, usually "pending editor approval of the PR" or "pending tests being merged"
21:42
<ryzokuken>
sounds good, then
21:42
<rkirsling>
ohh. that's really unfortunate if we're not even making it adequately clear how to contribute 😔
21:43
<ryzokuken>
I have a slight preference for actual tests (PR/branch) over a plan, but I support stage 2.5 (modulo naming bikeshed /s)
21:43
<bterlson>
Point of order: queue entries are still good when the queue is empty because it allows folks to reply to your topic
21:43
<ljharb>
we can decide anything we want as a group; 2.5 entry requirements could include "a complete non-draft tests PR must exist", eg (like how the stage 4 requirements already include "an editor-approved 262 PR")
21:43
<bterlson>
(brief placeholders are fine)
21:44
<bakkot>
nit: stage 3 requires spec text, not pr
21:44
<bakkot>
stage 4 requires editor-approved PR
21:44
<ljharb>
oh right thanks, updated
21:45
<ljharb>
it's been years since i had to cite the process document every plenary, so i guess its entirety no longer has residence in my brain :-p
21:46
<ryzokuken>
so to be clear, the current stage 3 requirements will become 2.5 requirements and new stage 3 requirements will be the current + <something test related>?
21:46
<ljharb>
something like that, i guess? someone would have to take the time to write up a process doc PR for it, if it's something we want to do
21:46
<rkirsling>
I think I must've missed whatever earlier stage there was regarding a maintainer group here, post-Bocoup
21:46
<ptomato>
that seems like it would've been more likely to work in the case of Temporal, though still not ideal
21:47
<ryzokuken>
ptomato: I think we already had a stage 2.5
21:47
<ryzokuken>
like the whole "spec is frozen" thing
21:47
<shu>
can i get a time check?
21:47
<ryzokuken>
that was our stage 2.5, wasn't it?
21:47
<ljharb>
ptomato: what about that would have been less than ideal?
21:47
<ptomato>
per that definition, Temporal is in stage 2.5 currently?
21:47
<ljharb>
yes
21:48
<ljharb>
(not that it'd necessarily change just because 2.5 is created)
21:48
<ljharb>
but it'd also mean that "stage 2.5" would signify the same thing "stage 3" currently signifies, but without the connotation that it's yet a stage 4 candidate.
21:48
<ryzokuken>
yeah, I think existing stage 3 proposals don't need to be reevaluated
21:49
<ryzokuken>
I just think we're reifying in process something that already kinda exists?
21:49
<ptomato>
I'm happy to add a queue item if people want to talk about this - but tl;dr it would mean a large delay in the proposal's progress towards adoption, while we bottleneck on writing test262 tests
21:49
<ryzokuken>
as a sort of TC39 social contract?
21:49
<ljharb>
in general there's a notable difference between a proposal being "entering the stage" vs "ready to exit the stage", but it's only in stage 3 where that difference is particularly impactful
21:49
<rkirsling>
I just think we're reifying in process something that already kinda exists?
exists "when all goes well"
21:50
<ljharb>
ptomato: nobody's shipping it unflagged, specifically to inhibit adoption; who's adopting it now?
21:50
<ryzokuken>
like I think there's already a slightly blurry period where this is the reality
21:50
<ryzokuken>
but we just don't have it in the process yet
21:50
<ptomato>
I mean progress towards adoption into 262
21:51
<ptomato>
currently, implementors are implementing it behind flags. I'm thinking with a stage 2.5 they'd be more reluctant to do that until stage 3. maybe not?
21:51
<ljharb>
it wouldn't change the actual work that needs to be done prior to the PR being merged - it would just more accurately "milestone" the work
21:51
<ljharb>
i'd expect not; i think the implementers who are already hesitant to ship during stage 3 would have no problem shipping flagged during 2.5
21:51
<ryzokuken>
I agree, delays to proposals that shouldn't be affected is my concern too
21:52
<ryzokuken>
but if we can skip 2.5 when it's not needed it's fine, right?
21:52
<ljharb>
iow i think it would actually help have more impls ready to unflag in stage 3, if we added 2.5
21:52
<ryzokuken>
"can you please write tests for X? we don't want to implement it without tests"
21:52
<ljharb>
ryzokuken: sure, we could. but if it's really not that needed than it could also get 2.5, and come back the next day, and get 3 :-p (because the work to get from 2.5 to 3 would be so trivial)
21:52
<ptomato>
"can you please write tests for X? we don't want to implement it without tests"
yes, it's that kind of chicken and egg problem I'm concerned about
21:53
<ryzokuken>
hm, that's true. It's hard to write tests without impls
21:53
<ryzokuken>
but I think the way test262 tests are usually written, they don't NEED an implementation? leobalter ptomato feel free to correct me here.
21:53
<ljharb>
that's right
21:54
<ljharb>
i think that i've found myself in all of the positions of "tests first", "tests at the same time", and "tests after", depending on which thing it is, so i think a blanket statement's best avoided
21:54
<ryzokuken>
since they test lines in spec instead of edge cases, you're technically writing tests for the spec
21:54
<ljharb>
that's the whole point
21:55
<ljharb>
you're supposed to write tests for the spec, and run them against implementations
21:55
<ljharb>
otherwise you're coupling tests to the implementation details
21:55
<ljharb>
(and when that process exposes deltas, it likely indicates either an impl "bug", or a spec "bug")
21:56
<Rick Waldron>
yulia: 👏
21:56
<bakkot>
maybe we'll get automatic reference implementations from the KAIST work! at least for some proposals
21:56
<yulia>
yeah ,thatt would be awesomme
21:56
<ljharb>
that would certainly make "writing tests" much easier :-D
21:56
<ryzokuken>
+1
21:57
<rkirsling>
I thought implementation-contributed was a historical artifact?
21:57
<ljharb>
and polyfills! i'm very interested in using KAIST's work, with es-abstract, to generate polyfills
21:57
<rkirsling>
not that it can't be done, but I didn't think the existing thing was meaningful
21:57
<leobalter>
The many times we tried to make the review process stricter the gatekeeping flag has been frequently raised. There is actually a strong motion to loose the review process to land Test262 tests. Yet, in the meeting today I heard the tests are not carefully reviewed.
21:57
<ryzokuken>
I mean, the spec text is not the easiest format to read I'd say so I sympathize with people who prefer polyfills/impls before formalizing tests
21:58
<yulia>
Rick Waldron: we can also prune the implementer tests using code coverage if we want to? maybe
21:59
<Rick Waldron>
yulia: that used to be a job description at bocoup 🤣
21:59
<shu>
it is a fact that many tests are not carefully reviewed. this comment is not a personal slight: it is a fundamental difficulty in reviewing tests testing a giant specification with many hairy corners, in using reviewers who are not proposal authors or champions, in having ad-hoc process, etc
21:59
<shu>
and that's what i want to address
21:59
<Rick Waldron>
Part of becoming a test writer included reviewing and "up lifting" tests in the "implementer contributed" bucket.
22:00
<shu>
it is decidedly not a comment about any past failings or complaining about how previous maintainers were doing anything less than a stellar job
22:01
<rkirsling>
Part of becoming a test writer included reviewing and "up lifting" tests in the "implementer contributed" bucket.
ohh that explains why that bucket always seemed "somehow not relevant" from a single engine's perspective
22:03
<Rick Waldron>
We had an automated server that was collecting tests from https://github.com/WebKit/WebKit/tree/main/JSTests and https://github.com/v8/v8/tree/master/test/mjsunit for a couple years
22:03
<Rick Waldron>
But the server was shut down 🤷
22:03
<Rick Waldron>
By "we" I mean my previous employer
22:04
<ljharb>
i presume there's no chance the code for that is easily resurrectable in some cloud provider?
22:05
<yulia>
it looks like there are quite a few past task that the new maintainer group can discuss, and bring in those that are reasonable for this point in time. Personally speaking -- that sync would have been useful recently
22:05
<leobalter>
all I can say is that I did my job in good faith and in my bias I tried my best to review things carefully. Some things pass because it's still hard to have a base of tests where you often don't have a sample to run them or the size of everything. This includes indications to keep the flow running to avoid frustrating contributors. It's upsetting to see all of this reduced to "not carefully reviewed"
22:06
<SoftwareChris>
i think that i've found myself in all of the positions of "tests first", "tests at the same time", and "tests after", depending on which thing it is, so i think a blanket statement's best avoided
I've yet to see "tests first" being pragmatic. test cases / acceptance criteria first, sure, but not actual written tests.. just my exp; open and curious to situations demonstrating otherwise
22:06
<ljharb>
SoftwareChris: that is generally my experience as well, but there's a lot of TDD adherents who would debate that. in test262's case tho, the spec comes first, and then the tests, so the spec is kind of the "implementation" here :-)
22:07
<SoftwareChris>
I don't tie TDD to tests-first but I don't want to get into a flame war
22:07
<yulia>
the tests are well reviewed enough that i generally can rely on them. on occasion things slip through -- and those moments are certainly more obvious than the times things are working smoothly
22:07
<yulia>
i think we can all say that the test suite is something we rely on, and that speaks to its quality
22:08
<yulia>
there are places that can be supported, such as more eager acceptance of browser tests in a controlled fashion, as they will be able to iterate and catch eachohers problems more quickly
22:08
<leobalter>
in my experience, when tests are written after the implementations is where you often find inconsistencies and gaps to meet web compatibility.
22:09
<leobalter>
my experience with TypedArrays was salvage
22:09
<yulia>
the "complete" test suite also has significant benefits, it highlights specific segments of the spec that are being tested in case there are issues either with implementations or the spec. We have a high resolution view into what is changing in the language this way
22:09
<leobalter>
also, tests often helped improving the specs, with or without implementations ready
22:10
<rkirsling>
I definitely don't think there's any question that the work you did was phenomenal, Leo
22:10
<shu>
leobalter: i implore you to not take what i said as a personal attack. it can be both true you did a great job, and not all tests were adequately reviewed
22:10
<leobalter>
rkirsling: as I mentioned, I know I lot of people recognizes this work and I'm always grateful for that.
22:11
<leobalter>
shu: I took that as offensive because it was an over simplification of a work I did for so long in good faith.
22:12
<leobalter>
I hope no one at TC39 has their work oversimplified to hear such a note. Not carefully reviewed seems like saying the work was poor.
22:17
<SoftwareChris>
in my experience, when tests are written after the implementations is where you often find inconsistencies and gaps to meet web compatibility.
in this situation, I agree. having a functional specification is sort of like having an implementation, like ljharb mentioned. so this is not an example of what I am thinking of when talking about test-first development. more reason not to generalize about these things
22:20
<leobalter>

my personal take on TDD'ish:

  • no test is good before documentation (or specs)
  • tests first is useful when you have multiple implementations relying on the same base.
  • I support experimenting with implementation regardless of tests but also writing a test when you know the expected outcome but the implementation feels more complex.
22:21
<leobalter>
so I break myself the rules for TDD in general, and yet I like tests being written at any point that feels comfortable to the developer. For test262, very often you have a very clear map of what you need.
22:22
<leobalter>
in general programs you should be able to explore more in the units to serve a final functional layer.
22:23
<ljharb>
TabAtkins: how could i use houdini outside of a browser?
22:26
<rkirsling>
er that second Japanese linebreak is invalid though
22:26
<rkirsling>
推計 is a word
22:27
<ljharb>
shu: yes, anything i want to do in the browser wrt segmenting text, i want to do in node, for server rendering (re your queue item). also for email generation, and for producing PDFs.
22:27
<leobalter>
I won't be able to attend the remainder of this meeting, but the Bloomberg team should be good for the Symbols as WeakMap keys.
22:29
<bakkot>
sorry the bot went down; my network dropped for a minute
22:29
<ryzokuken>
no worries 👍️
22:31
<HE Shi-Jun>
I can't hear anything, is it only me?
22:32
<yulia>
sound is on
22:32
<yulia>
for me
22:33
<HE Shi-Jun>
ok, close and rejoin fix my problem.
22:50
<Justin Ridgewell>
assert.equals(Symbol.iterator, iframe.contentWindow.Symbol.iterator)
22:50
<ljharb>
Mathieu Hofman: Symbol itself is mutable (as is global.Symbol) but Symbol.iterator, eg, is nonconfigurable
22:51
<Mathieu Hofman>
True
22:51
<Mathieu Hofman>
I guess you can still remove Symbol global tho
22:51
<Mathieu Hofman>
or recreate it
22:52
<Bradford Smith>
why are people still talking about well-known symbols, when the main issue is registered symbols?
22:53
<rickbutton>
remnants from the conversation before it
22:53
<Rob Palmer>
the good news from the temperature check on symbols as weakmap keys is that everyone wanted the feature - and wanted some form of symbols to be permitted (either all or some)
22:53
<Mathieu Hofman>
sorry I just wanted to clarify why we considered well known to be equivalent to registered.
22:55
<Mathieu Hofman>
shu: yes it was me, I talked about forgeability, and registered symbols is one such value. All strings and numbers obviously, and in the future, records/tuples which do not contain symbols
22:56
<TabAtkins>
Re: "the Houdini API doesn't work with non-HTML"; the current spec (which hasn't been touched in years) has a method signature that explicitly addresses the non-HTML case and would work in non-browser environments: https://drafts.css-houdini.org/font-metrics-api/#measure-api
22:57
<bakkot>
i feel like node core's use case is not one you'd want to put into a weakmap, and is if anything a good reason to not allow registered symbols
22:58
<Rob Palmer>
on the poll, no one voted for "no progress"
22:59
<Rick Waldron>
i presume there's no chance the code for that is easily resurrectable in some cloud provider?
I wouldn't bother.
22:59
<bakkot>
I agree with MM here
22:59
<bakkot>
well known ought to be treated like registered but I don't care enough to block
23:07
<bakkot>
i am inclined to trust browsers about what things are likely to be web-compat
23:08
<Mathieu Hofman>
possible, but this is surprising to me
23:08
<ljharb>
same
23:08
<bakkot>
fwiw this is also the expectation I have
23:09
<ljharb>
and this argument kind of says we should never add the predicate, and should keep letting people do it themselves, thus causing their predicate to become wrong as the language evolves
23:09
<bakkot>
from interacting with so much garbage code on the web at a whole
23:09
<bakkot>
ljharb: how does it say we should never add the predicate?
23:09
<shu>
the predicate should not change answers, it's fine for it to not give answers for things that don't exist yet
23:09
<ljharb>
because once we add the predicate that means "can you add this to a weak container?", how can we ever change what values pass that predicate?
23:10
<shu>
we... can't
23:10
<bakkot>
shipping amounts to an agreement that we are decided we're never going to change the can-be-used-in-weak-collection state of any existing value
23:10
<bakkot>
seems fine
23:10
<ljharb>
right, it would mean we can never allow something existing, to start being accepted
23:10
<ljharb>
which is precisely what "symbols as weakmap keys" is trying to do
23:10
<shu>
could not parse
23:10
<bakkot>
i definitely do not want to have this discussion ever again
23:10
<ljharb>
like, let's say we'd shipped, with ES6, a "WeakMap.canBeKey()" predicate or something
23:10
<bakkot>
then we couldn't have this proposal
23:10
<ljharb>
does that mean, in that timeline, we'd never be able to add symbols?
23:10
<ljharb>
wow, ok
23:10
<shu>
in that counterfactual, we can't have this proposal at all
23:10
<shu>
yes
23:11
<ljharb>
that's very surprising to me.
23:11
<bakkot>
but, once we allow non-registered non-well known symbols, we have added all of the things it is even coherent to add
23:11
<bakkot>
so it is fine for things to be settled at this state
23:11
<shu>
we make decisions like this all the time
23:11
<ljharb>
i don't agree with that tho (that there's never anything else coherent to add)
23:11
<shu>
there literally is not, for the predicate that says "is forgeable or not"
23:11
<bakkot>
what other things currently in the language would be coherent to add?
23:11
<shu>
it is literally exhaustive
23:15
<bakkot>
ljharb: i have in the conclusion "JHD does not immediately rescind previously expressed blocking objection to not allowing registered symbols"; does that capture your position at this moment in time correctly?
23:15
<ljharb>
that's fine, i'll review the notes anyways
23:15
<bakkot>
23:16
<jschoi>
https://github.com/tc39/Reflector/issues/416
23:16
<Bradford Smith>
I guess this is the chat where I claim kudos for participating in note taking? Rob Palmer
23:16
<Rob Palmer>
yes!
23:16
<Bradford Smith>
😁
23:16
<Rob Palmer>
thank you Bradford Smith !
23:17
<Rob Palmer>
who else took notes?
23:17
<ptomato>
I did yesterday
23:17
<Rob Palmer>
I think sarahghp did notes
23:17
<Rob Palmer>
thank you ptomato !
23:17
<SoftwareChris>
I helped with notes for like.. 20 minutes at the end yesterday. and just randomly here and there a few times
23:17
<Rob Palmer>
that is much appreciated SoftwareChris !
23:17
<yulia>
thank you all of the note takers, Bradford Smith ptomato sarahghp SoftwareChris Robin Ricard (i think also did a lot?)
23:17
<Rick Waldron>
I invented tc39 notes.
23:17
<rickbutton>
Robin Ricard and Ashley Claymore took many many notes
23:17
<Rick Waldron>
🤷
23:17
<yulia>
and anyone who did it invisibly
23:18
<rickbutton>
Rick Waldron: LMAO
23:18
<yulia>
and thank you Rick Waldron
23:18
<ryzokuken>
thanks to bakkotbot also
23:18
<Rick Waldron>
and thank you Rick Waldron
Take that back
23:18
<Robin Ricard>
I did slack a bit, Ashley Claymore did not
23:18
<Rick Waldron>
;)
23:18
<Rob Palmer>
Rick Waldron: the OG of notes
23:18
<HE Shi-Jun>
so we will not have meeting tommorow?
23:18
<bakkot>
HE Shi-Jun: correct
23:19
<Rob Palmer>
Correct HE Shi-Jun - plenary has finished one day early
23:19
<sarahghp>
Ha I can barely take notes, everyone else is so fast
23:19
<Rick Waldron>
I love not taking notes. I love that other people love to do it now and are proud of the notes they took. I am proud of them.
23:19
<jschoi>
HE Shi-Jun: We do have a non-plenary continuation of the dataflow-proposal talk tomorrow though.
23:19
<jschoi>
If you can come, please leave a comment on tc39/Reflector#416.
23:20
<HE Shi-Jun>
jschoi: happy to know that, I'm not sure I can be there tomorrow, but I will leave comments in the issue, if I can't attend. Thank u!
23:25
<shu>
all hail bakkotbot!