00:10
<shu>
shu: I just went through the transcript, I wasn't online anymore then, but putting aside the debate over due diligence and tradeoff judgements, I actually do not understand in which scenario a let declaration (without initialization) that occurs as the first statement of a scope can ever execute after any other code declared in that scope.
could you rephrase with a concrete code snippet?
00:10
<shu>
like, are you talking about the case where there are also no escaped, hoisted function declarations?
00:12
<shu>
but the general answer is that hoisted functions hoist above the lexical binding initialization: https://tc39.es/ecma262/#sec-blockdeclarationinstantiation
00:13
<Mathieu Hofman>
like, are you talking about the case where there are also no escaped, hoisted function declarations?
How can an escaped hoisted function execute before a let declaration that appears as first statement in the scope is my question
00:14
<shu>
ah, i don't think in that particular configuration it can
00:14
<Mathieu Hofman>
Maybe they hoist above, but their utterances cannot be in any code that is executed before the declarations
00:16
<shu>
to anticipate your next question: currently no engine fully elides all inner accesses even in that configuration, however, i imagine due to two factors
00:17
<shu>
  1. people don't actually write code like that
  2. every engine lazy compiles. the dominance information is available when compiling the outer function that contains the inner functions, but we need that information when compiling the inner functions, which occurs lazily when those functions are called. this means that we need to plumb that parse-time information and save it until those inner functions are compiled. nobody AFAIK incurs the memory cost and the complexity for plumbing this
00:17
<shu>
we could start doing it if more code were written like that
00:18
<shu>
but that creates a world where optimal performance depends on a tight coupling of what tooling does and what engines do, which is in general brittle, and undesirable for both tools and engines
00:18
<shu>
since when one or the other makes a move for whatever other reason, users might complain
00:20
<shu>
to expand more on (1), you can't do this source transform with consts because you can't emit the unutterable init= thing
00:20
<Mathieu Hofman>
My understanding from the transcript was that mark believed these semantics could be optimized by engines with a simple static pass, and you seemed to say there were cases where it couldn't be optimized, that a simply static analista was not possible.
00:20
<shu>
yes
00:21
<shu>
it's probably not possible to do in a single pass
00:21
<shu>
and we do not want to do things that require more than a single pass
00:21
<Mathieu Hofman>
Then I agree there remains a question whether such an optimization and tight tooling coupling is advisable
00:21
<shu>
since function declarations are hoisted, we won't know if mark's code pattern in fact holds until we reach the end of the block scope and know all the function declaration names
00:21
<shu>
like it's probably still fine to check if the pattern holds, not too expensive
00:22
<Mathieu Hofman>
Then I'm still confused. Why is the presence of a let declaration as the first statement of a scope not a sufficient indicator to disable tdz checks on that binding
00:23
<shu>
as a property, i agree with you that it is
00:23
<shu>
as a practical matter of implementing the elision, it is not trivial because of lazy compiling as i've described above. but also we just don't do it because we don't see code like that
00:23
<shu>
and that it does not apply as easily to consts
00:24
<shu>
any additional analyses is complexity we'd have to maintain forever and ever, so the tradeoff isn't quite there today for this
00:25
<shu>
though it is strange to me to suggest that a solution is for tooling to compile away the TDZ
00:25
<shu>
if you're okay with users not getting the runtime checks... why fight to keep it in the language?
00:27
<Mathieu Hofman>
Right this is about the feasibility of optimizing such let declarations that would be emited by tooling. Whether that's advisable is a separate question
00:27
<shu>
as a general rule of thumb, all things are feasible
00:27
<shu>
or rather, all things are possible to implement
00:27
<shu>
most of the time we just don't wanna
00:31
<Mathieu Hofman>
I personally believe that there are different authors. Some care about such performance optimizations, but I'm not sure that means the language semantics should change for them. Yet I am sympathetic with their goal and this could be a way to support it.
00:32
<shu>
fair enough, if we had accurate demographic info we could settle this more dispassionately
00:32
<shu>
alas
00:32
<shu>
like, we could have a let2 or whatever as waldemar suggested
00:32
<shu>
but personally i feel like that's a worse choice for the language
00:33
<shu>
though putting my personal feelings aside i can certainly live with that outcome
00:34
<shu>
back to the different authors point: i was hoping to show that the majority either don't care, either via ignorance or via choosing performance over runtime checks
00:36
<shu>
a nuance here is that most developers don't care about performance either! and there lies our deeper disagreement. i think web users (not authors) are better served by a language that values performance as the default, if the correctness gains are marginal. i think you and others take the other side of that polarity (or think that TDZ runtime checks aren't marginal in value)
00:38
<Mathieu Hofman>
I think that the state of web tooling means that authors don't have to make that choice or understand it, and that the tooling can make it for them
00:40
<shu>
we're already in that world, people just use vars
00:40
<Mathieu Hofman>
And the Web (or node) is not the only JS environment that should be considered when it comes to consider the impact of changing the semantics
00:42
<shu>
i don't think we, as a committee, should be okay with speccing stuff that is transpiled forever
00:42
<shu>
that's a crappy value prop for us engines and disincentivizes things in a way i think everyone would dislike
00:44
<Mathieu Hofman>
Unless we stop all syntax changes for the language, can we really ween the ecosystem off transpilation?
00:45
<shu>
that's not what i said
00:45
<shu>
what i said was, transpiled forever
00:45
<shu>
most syntax features are still incentivized for the long-tail adoption untranspiled
00:45
<shu>
transpilation itself is not going to go away because new features are going to be adopted transpiled for the initial N years
00:48
<shu>
what i'm interested in (and led with in the slides) was the adoption inflection point. if i get a whiff that that inflection can't happen because the incentives are aligned against it, then i want to change that
01:02
<Mathieu Hofman>
I guess it's a weird case this one. It probably has high adoption in authored code, but low usage in code executed by engines. The question is whether tooling should be able to keep the code as authored or need to keep transpiling it past the point all engines support it because of performance concerns.
01:04
<ljharb>
an interesting annex b change in jsc: https://bugs.webkit.org/show_bug.cgi?id=163209
01:05
<Mathieu Hofman>
Which is why I believe mark suggested a lint fix approach to this problem, which would change the author code literally at the source, but that means adding cognitive load to authors to understand the potential performance trade-offs
01:09
<ljharb>
tcq down?
01:10
<shu>
how are we gonna do queue?
01:10
<Mathieu Hofman>
an interesting annex b change in jsc: https://bugs.webkit.org/show_bug.cgi?id=163209
Ugh annex B...
01:11
<nicolo-ribaudo>
I assume Rob is going to post the spreadsheet soon
01:11
<Rob Palmer>
we have a backup: https://docs.google.com/spreadsheets/d/1Us6MFx3WB6E8K5jJ7m1j5jEa9OUOuwgx60RXwzfI7JE/edit#gid=0
01:11
<shu>
πŸ‘annex bπŸ‘isπŸ‘praxisπŸ‘
01:15
<rbuckton>
I reached out to Brian to see if he knows what's going on with TCQ, he said he'll see if he can find out what's wrong.
01:16
<Chris de Almeida>
I reached out to Brian to see if he knows what's going on with TCQ, he said he'll see if he can find out what's wrong.
I was seeing ws failures in console, not sure if that's helpful but let him know if you still have that comms channel open
01:17
<nicolo-ribaudo>
There is a "OK with or without streaming" on the queue without name, please add it
01:17
<Chris de Almeida>
app.build.js:6 WebSocket connection to 'wss://tcq.app/socket.io/?id=MypE&EIO=3&transport=websocket' failed: WebSocket is closed before the connection is established.
r.doClose @ app.build.js:6
01:18
<Chris de Almeida>
and 504.0 GatewayTimeout reloading
01:18
<Andrew Paprocki>
eventually renders ":( Application Error If you are the application administrator, you can access the diagnostic resources."
01:19
<Chris de Almeida>
if anyone wants to help DDoS TCQ, that seemed to help yesterday πŸ˜…
01:19
<Chris de Almeida>
Nmap for fun and profit
01:19
<rbuckton>
The TCQ app service is down.
01:20
<Chris de Almeida>
it's back!
01:20
<Chris de Almeida>
killing my DoS
01:20
<rkirsling>
it is indeed back
01:21
<Jesse (TC39)>
disambiguate: DeDoS vs. DDos
01:22
<Chris de Almeida>
Disk Operating System
01:24
<Justin Ridgewell>
TCQ is not back
01:24
<Michael Ficarra>
TCQ is so over
01:25
<Justin Ridgewell>
Everyone DDoS'd it
01:25
<nicolo-ribaudo>
^For the chairs in case they accidentaly reload and loose it
01:25
<Richard Gibson>
surely in this case it's a CDOS
01:26
<Michael Ficarra>
why did we stop using the spreadsheet?!
01:26
<nicolo-ribaudo>
Because it was working again 🀷
01:26
<rbuckton>
Still looking into the issue.
01:26
<Michael Ficarra>
TCQ comes back for one full second and we assume it's all roses?
01:26
<Chris de Almeida>
we've been doing that throughout the entire meeting... sadly.
01:27
<Jesse (TC39)>
TCQ comes back for one full second and we assume it's all roses?
all too human
01:27
<Chris de Almeida>
historically it was alright for a while, then craps out, wash, rinse, repeat
01:28
<Michael Ficarra>
how is usefulness of streaming supposed to imply that single-shot is not useful?
01:28
<littledan>
I don't understand the philosophical argument, I kinda think we should be prioritizing the most useful things, and not trying to design the 100% universal thing, sometimes
01:29
<ljharb>
and we definitely do chop up proposals at times
01:29
<Michael Ficarra>
littledan: especially when the former does not block us from doing the latter later
01:31
<Justin Ridgewell>
+1 to Luca
01:31
<Justin Ridgewell>
Another +1 if he mentions usabilty
01:33
<rbuckton>
If the concern is the inability to use native Base64 support in a memory constrained environment, I'm not 100% sure the solution is to spend more of that memory on a 3rd-party library or wrapper to do that for you.
01:33
<littledan>
well, I guess on Moddable that could be ROM, but most embedded JS has this stuff in RAM...
01:33
<nicolo-ribaudo>
If the concern is the inability to use native Base64 support in a memory constrained environment, I'm not 100% sure the solution is to spend more of that memory on a 3rd-party library or wrapper to do that for you.
I would assume the web would provide a web stream
01:34
<rbuckton>
I would assume the web would provide a web stream
I'm not talking about the web platform, though. I'm talking about embedded.
01:34
<nicolo-ribaudo>
Embedded can also provide their own implementation. It's better to have two different streaming primitives in different platform (XS and browsers) rather than two in the same platform (browsers)
01:35
<littledan>
I'm kinda worried about this objection in a more fundamental way--I want TC39 to be a place where we can develop these kinds of useful standard library functions.
01:35
<Mathieu Hofman>
TC39 streams ?
01:35
<bakkot>
littledan: I think it's vaguely possible we could get web streams in TC39 someday, but I don't think we should block the one-shot version of this proposal on that
01:35
<Justin Ridgewell>
Do we want to design a general-purpose sync streaming API in 262?
01:36
<littledan>
littledan: I think it's vaguely possible we could get web streams in TC39 someday, but I don't think we should block the one-shot version of this proposal on that
Agreed. I'm surprised at the length of argumentation here when there is such strong support and it's such a small API. This is what makes me worried.
01:36
<nicolo-ribaudo>
Do we want to design a general-purpose sync streaming API in 262?
Are iterators streaming, or they have different properties?
01:37
<rbuckton>
I'd like to see a streaming API at some point. I haven't been partial to the actual API design choice, since it involves creating numerous nursery objects to pass arguments in and pull arguments out, so it's not efficient for memory and/or cpu constrained environments.
01:37
<littledan>
how would the options get passed in without changing the code?
01:38
<Justin Ridgewell>
Good point. bytesToBase64(bytesIterator: Iterator<Uint8Array>): Iterator<string>
01:38
<rbuckton>
Brian said TCQ will be back up again soon, but folks will have to log in again since he needs to clear out the sessions as part of trying to resolve the issue.
01:39
<littledan>
OK if he will take Jordan's word on it, does that mean it's OK for this to proceed?
01:39
<nicolo-ribaudo>
Brian said TCQ will be back up again soon, but folks will have to log in again since he needs to clear out the sessions as part of trying to resolve the issue.
Let's use the spreadsheet until the end of this presentation
01:44
<rbuckton>
I'd much rather have a standard solution that doesn't depend on non-browser runtimes implementing more of the DOM so that their users can write portable code.
01:46
<rbuckton>
Base64 is independently useful regardless of platform. While I believe the streaming API needs work, I fully support it existing either as part of this proposal or as an independent proposal.
01:47
<ljharb>
i also support it existing. just not coupled to the one-shot.
01:48
<rbuckton>
I am concerned that splitting the proposal is an opportunity for detractors to block the streaming portion indefinitely.
01:48
<Michael Ficarra>
a "constraint" would be like "we cannot implement single-shot", not "we want extra stuff"
01:48
<ljharb>
phoddie: is moddable unable to implement the one-shot due to its constraints?
01:48
<littledan>
browsers don't have infinite buffer space either...
01:48
<Michael Ficarra>
this is an abuse of our process
01:49
<rbuckton>
It seems like the concern is that they could implement it but it wouldn't be usable in that environment due to the single-shot nature.
01:50
<littledan>
this is an abuse of our process
Yes, I think this isn't about "removing lone objectors" entirely, more like, the objection has to be for a reason (a long-standing principle that we have)
01:50
<Michael Ficarra>
I would personally just bring it back for stage 3 and, if no reasonable objections were voiced, ask for a vote
01:50
<nicolo-ribaudo>
It seems like the concern is that they could implement it but it wouldn't be usable in that environment due to the single-shot nature.
But does having the streaming api in tc39 make the single shot one more usable?
01:50
<ljharb>
I am concerned that splitting the proposal is an opportunity for detractors to block the streaming portion indefinitely.
that is a valid concern we've all had at times, but that isn't a valid reason to be a lone objector on a proposal - as i myself have relented when in that very position multiple times.
01:50
<rbuckton>
But does having the streaming api in tc39 make the single shot one more usable?
As opposed to having it in WHATWG? Having it in WHATWG doesn't help embedded at all.
01:51
<ljharb>
for example, that mindset would have blocked decorators until they worked on all functions. but that's not how we prefer to operate.
01:51
<rbuckton>
for example, that mindset would have blocked decorators until they worked on all functions. but that's not how we prefer to operate.
IIRC, decorators were held up for years for this very reason.
01:51
<ljharb>
indeed. but not indefinitely.
01:51
<rkirsling>
I agree that this feels like an abuse; I don't think the comment that this doesn't stop the proposal but simply moves it to a less appropriate standards body was taken seriously enough
01:51
<nicolo-ribaudo>
As opposed to having it in WHATWG? Having it in WHATWG doesn't help embedded at all.
The proposed options for this proposal are either to have one or both APIs. Moddable does not implement those WHATWG standards
01:52
<ljharb>
and, because it's syntax, not with the risk it'll be shipped, worse, in other standards bodies, which has happened with APIs multiple times already.
01:52
<littledan>
Decorators are completely different, as this was a widespread implementability concern. There isn't an implementability concern, more that it wouldn't be applicable enough.
01:52
<TabAtkins>
Yeah I would absolutely just recommend we do this in WHATWG, then.
01:52
<ljharb>
that will be the outcome if we do nothing, and it would be a worse one than advancing just the one-shot here
01:53
<Jack Works>
can we update tcq to the current proposal? i want to add an agenda item
01:53
<TabAtkins>
We're not TCQing for the rest of the day
01:53
<TabAtkins>
using the spreadhseet instead
01:53
<nicolo-ribaudo>
https://docs.google.com/spreadsheets/d/1Us6MFx3WB6E8K5jJ7m1j5jEa9OUOuwgx60RXwzfI7JE/edit#gid=0
01:53
<Jack Works>
oh, but i see tcq is alive now?
01:53
<rbuckton>
Looks like there is an issue with the docker container TCQ runs under, it may not be up for the rest of the session.
01:53
<Jack Works>
down again
01:53
<rbuckton>
It may be up, but docker keeps killing the application with no indication as to why.
01:54
<shu>
i think peter is being myopic here
01:55
<rbuckton>
Brian said he may be able to look into it more in a few hours, but it may not be reliable until then.
01:55
<shu>

practically, what is going to happen here next is:

  • it becomes part of some web platform API via another body
  • they are pressured to implement it anyway for interop, because their users want it (which is a goal, as he has said)
  • they are now out of the loop for future design decisions
01:56
<shu>
and this is, to be clear, actually fine for most of us
01:56
<shu>
but it seems like a lose-lose for them
01:56
<littledan>
let's give this at least another two months to try to resolve this rather than immediately do a venue switch
01:57
<rbuckton>
This is exactly what happened with cancellation
01:57
<shu>
let's give this at least another two months to try to resolve this rather than immediately do a venue switch
kevin has said he's spent 2 years on this
01:57
<ljharb>
promise cancellation shipped in fetch during one of those 2 month gaps, without notice to tc39, and now we might never be able to have cancellation in the language as a result.
01:57
<Michael Ficarra>
We should not allow our process to fail in this way. I am fine with failing due to a lone objector, but not due to capriciousness.
01:58
<Michael Ficarra>
This is exactly the kind of scenario where we should subvert unanimous consent.
01:58
<Luca Casonato>
but it seems like a lose-lose for them
It's also a lose for web platform. I am relatively sure an in engine implementation will be significantly cheaper than a web platform implementation (because strings don't need to be exported from the engine and can instead be walked directly in engine)
01:58
<littledan>
This is exactly what happened with cancellation
Yes. With cancellation, Domenic withdrew it because he didn't like how I was advocating for it to be just library-based, without syntax extensions. In the end, it shipped in the web without those syntax extensions. So this is a good example of how doing a venue change also doesn't help get everything that you want.
01:59
<shu>
It's also a lose for web platform. I am relatively sure an in engine implementation will be significantly cheaper than a web platform implementation (because strings don't need to be exported from the engine and can instead be walked directly in engine)
eh that can be worked around. streams are implemented directly in SpiderMonkey. the fact that engine codebase lines follow standards org chart is mostly accidental, and can be worked around easily enough
01:59
<sffc>
Does XS implement atob/btoa?
01:59
<Luca Casonato>
eh that can be worked around. streams are implemented directly in SpiderMonkey. the fact that engine codebase lines follow standards org chart is mostly accidental, and can be worked around easily enough
not anymore I don't think!
01:59
<bakkot>
let's give this at least another two months to try to resolve this rather than immediately do a venue switch
I just don't see what else there is to be said, here. Several people have said streaming doesn't make sense as part of this proposal. phoddie has said that the proposal cannot advance without streaming.
01:59
<littledan>
promise cancellation shipped in fetch during one of those 2 month gaps, without notice to tc39, and now we might never be able to have cancellation in the language as a result.
kinda; it was under development for some months in WHATWG.
01:59
<bakkot>
I am willing to give it another try next meeting if there's some hope of advancement but I don't see what there is.
01:59
<shu>
oh boo, really? well, for blink, structured clone is implemented in V8, so is console, and some other weirdness
02:00
<rbuckton>
NaN again
02:00
<bakkot>
let's give this at least another two months to try to resolve this rather than immediately do a venue switch
I mean I could come back and force a vote, I guess. But I would prefer not to do that. The web streams version is independently useful anyway and it just seems more worth spending tie there.
02:01
<TabAtkins>
Outside of the terrible corner cases they are indeed negations, this is too pedantic.
02:01
<Luca Casonato>
eh that can be worked around. streams are implemented directly in SpiderMonkey. the fact that engine codebase lines follow standards org chart is mostly accidental, and can be worked around easily enough
let's talk about this during lunch. we are considering shipping some custom .tq for v8 just to handle utf8 encoding (for TextEncoder) because host calls and string exporting adds significant overhead. chrome likely has a similar overhead for TextEncoder
02:01
<shu>
sure
02:02
<sffc>
Node Buffer has base64 functions. A WHATWG proposal would just be a modernized version of atob/btoa. Then base64 can be done in both browser and non-browser environments, just with different APIs. So that's the outcome we're heading toward.
02:02
<Luca Casonato>
Node Buffer has base64 functions. A WHATWG proposal would just be a modernized version of atob/btoa. Then base64 can be done in both browser and non-browser environments, just with different APIs. So that's the outcome we're heading toward.
and likely node would implement the whatwg version
02:02
<Michael Ficarra>
I mean I could come back and force a vote, I guess. But I would prefer not to do that. The web streams version is independently useful anyway and it just seems more worth spending tie there.
I implore you to just bring it back for stage 3 and force a vote.
02:03
<rbuckton>
Yes. With cancellation, Domenic withdrew it because he didn't like how I was advocating for it to be just library-based, without syntax extensions. In the end, it shipped in the web without those syntax extensions. So this is a good example of how doing a venue change also doesn't help get everything that you want.
The AbortController/AbortSignal API has been deficient in many areas and built a dependency on the DOM that required any interoperable implementation to bring those dependencies along. And the current status of cancellation w.r.t. WHATWG is essentially that ECMA-262 can only have native cancelation if it is via a host hook.
02:03
<littledan>
yes, that wouldn't be the end of the world for this proposal, but I really want us to figure out how to get through these situations in general. That's why I'd want to bring this back in 2 months.
02:03
<Luca Casonato>
shipped that fmt change since yesterday in deno fmt and dprint: https://dprint.dev/playground/#code/IQMw9mAECWB2DOAXAhrAxgUzCSAhZATkA/language/typescript
02:04
<bakkot>
yes, that wouldn't be the end of the world for this proposal, but I really want us to figure out how to get through these situations in general. That's why I'd want to bring this back in 2 months.
if you want to put a process topic on the agenda for the next meeting, I would be ok with putting base64 on the agenda to follow that item conditional on the outcome of that discussion
02:04
<Michael Ficarra>
I would love for base64 to set precedent for how our consensus process actually works.
02:04
<bakkot>
I do not myself have the heart for leading a process discussion
02:04
<Michael Ficarra>
we don't need a process discussion
02:04
<Michael Ficarra>
I believe this to already be our process
02:04
<shu>
people other than peter disagree, though, like msaboff
02:05
<Michael Ficarra>
shu: on what grounds?
02:05
<eemeli>
I'm going to guess that changing operator precedence for in and instanceof would probably break something somewhere.
02:05
<bakkot>
it did not sound like msaboff disagreed with the utility of the single-shot version
02:05
<littledan>
if we did a vote, IMO it should be a large supermajority and only be deployed in cases where we really don't feel like the objection makes sense
02:05
<shu>
sorry, i meant, other people than peter disagree on what is already our process
02:05
<rkirsling>
I think this would be clearer if we pronounce ! as bang πŸ˜…
02:06
<shu>
i do not think msaboff disagreed with the technical parts of the proposal at all
02:06
<shu>
but he said he does not think we have a consensus process, but a single dissenter process
02:06
<shu>
which, we sometimes do imo
02:06
<littledan>
sorry, i meant, other people than peter disagree on what is already our process
yes, there would be a process discussion if someone proposes a vote
02:06
<shu>
i would support a discussion here but i am skeptical it will be productive
02:07
<msaboff>
Let me explain my comments.
02:07
<Jack Works>

a \n not instanceof b

looks like we need NLTH

02:07
<sffc>
I think a process change should center more around the nature of objections rather than just allowing a majority vote to push things through. That sounds like dangerous precedent.
02:07
<sffc>
Do people think a JSON stream parsing API would have utility?
02:07
<littledan>
I think a process change should center more around the nature of objections rather than just allowing a majority vote to push things through. That sounds like dangerous precedent.
I agree that the nature of the objection should be a factor here. None of us want to go around voting all the time.
02:08
<Bradford Smith>
Is TCQ down again? I logged out of GitHub and back in again, but I still get a blank page for TCQ
02:08
<Jack Works>
Some programmers I know are looking for a JSON parse streaming API
02:08
<Justin Ridgewell>
Is TCQ down again? I logged out of GitHub and back in again, but I still get a blank page for TCQ
Yes. WE're using Sheets now
02:08
<Justin Ridgewell>
https://docs.google.com/spreadsheets/d/1Us6MFx3WB6E8K5jJ7m1j5jEa9OUOuwgx60RXwzfI7JE/edit#gid=0
02:08
<Michael Ficarra>
yes I think this is the thing we are all saying
02:09
<TabAtkins>
I think a process change should center more around the nature of objections rather than just allowing a majority vote to push things through. That sounds like dangerous precedent.
We've talked about this plenty. We're not limited solely to "unanimous, any objector can block indefinitely" and "majority wins". W3C consensus is an existing and reasonably well-working middle ground.
02:09
<Justin Ridgewell>
Some programmers I know are looking for a JSON parse streaming API
Newline Terminated JSON? How would you stream the out the result of regular JSON streaming?
02:09
<Michael Ficarra>
also as a reminder, Ecma process allows for a vote on anything, we just have an internal and non-binding TC39 agreement to work on unanimous consent
02:09
<Christian Ulbrich>
Consensus is consensus, if you want to add some kind of "mechanism to overcome minorities" it is not consensus anymore. I do not think, that idea of consensus is wrong. People have to compromise, to make consensus work. The question is, if we have explored all compromise options. I have the feeling, from Kevin's side, we did and I have the same feeling, that we did not explore all compromises on peter's side.
02:09
<msaboff>
TC39 does NOT have a consensus process. It has a single blocker process. Many of us have been on both sides of the blocking process. In this case, one member asked for an accommodation, add a streaming API and I'll support. The committee, as a whole, wasn't willing to accept the addition. The member blocked.
02:09
<rbuckton>

For context, the suggested syntax for relational patterns in pattern matching via is would have this as:

x is not in y // true if 'x' does not match 'in y'
x is not y // true if 'x' does not match 'y' via custom matcher semantics.
// optionally:
x is not instanceof y // true if 'x' does not match 'instanceof y', but is probably unnecessary 
02:10
<eemeli>
if we did a vote, IMO it should be a large supermajority and only be deployed in cases where we really don't feel like the objection makes sense
Procedurally, in different forums votes like this sometimes need to pass in two separate meetings. Which would give time for useful offline discussions.
02:10
<shu>
TC39 does NOT have a consensus process. It has a single blocker process. Many of us have been on both sides of the blocking process. In this case, one member asked for an accommodation, add a streaming API and I'll support. The committee, as a whole, wasn't willing to accept the addition. The member blocked.
i do not think the first sentence itself has unanimous agreement within committee
02:10
<bakkot>
here is the thread from two years ago on streaming https://github.com/tc39/proposal-arraybuffer-base64/issues/13
02:10
<bakkot>
I am not convinced that more time for discussions is the thing needed, here
02:10
<msaboff>
You just made my point.
02:11
<shu>
...wat
02:11
<TabAtkins>
(W3C consensus is that single objectors can block, but the WG can choose to override the objection. It requires escalation to W3C management with an explanation of why the override was necessary.)
02:11
<littledan>
Consensus is consensus, if you want to add some kind of "mechanism to overcome minorities" it is not consensus anymore. I do not think, that idea of consensus is wrong. People have to compromise, to make consensus work. The question is, if we have explored all compromise options. I have the feeling, from Kevin's side, we did and I have the same feeling, that we did not explore all compromises on peter's side.
Can you elaborate on what you think hasn't been explored?
02:11
<Jack Works>
Newline Terminated JSON? How would you stream the out the result of regular JSON streaming?
no idea, maybe emit by enter-leave (enter key a, enter array item 0, ... leave key a)?
02:12
<Luca Casonato>
Consensus is consensus, if you want to add some kind of "mechanism to overcome minorities" it is not consensus anymore. I do not think, that idea of consensus is wrong. People have to compromise, to make consensus work. The question is, if we have explored all compromise options. I have the feeling, from Kevin's side, we did and I have the same feeling, that we did not explore all compromises on peter's side.
What compromises did we not explore?
02:12
<Luca Casonato>
The compromise was "add a streaming api" which the committee as a whole did not accept. As such, what else can the champions do to advance this?
02:13
<littledan>
Consensus is consensus, if you want to add some kind of "mechanism to overcome minorities" it is not consensus anymore. I do not think, that idea of consensus is wrong. People have to compromise, to make consensus work. The question is, if we have explored all compromise options. I have the feeling, from Kevin's side, we did and I have the same feeling, that we did not explore all compromises on peter's side.
also, we do unavoidably draw lines about what we mean by consensus. We actively seek out community feedback and support, but we do not consider non-members as possible objectors to proposals. We have also defined things around what constitutes a meaningful objection, e.g., we don't permit blocking Stage 4 because you disagree with the design.
02:14
<shu>
i invite other delegates to read about a historical instance of a single-veto process: https://en.wikipedia.org/wiki/Liberum_veto
02:15
<sffc>
Newline Terminated JSON? How would you stream the out the result of regular JSON streaming?
More like, a parser that remembers where it is in the ECMA-404 grammar and can take more chunks and then stops reading chunks once it reaches the end of the grammar
02:15
<Justin Ridgewell>
I still don't understand
02:16
<Justin Ridgewell>
The usefulness of streaming is that you can get partial responses out, I don't see how this can work with JSON objects becasue you have to wait for a closing }
02:16
<littledan>
streaming also relates to streaming things out without holding everything in memory, something which doesn't make sense for json
02:16
<Jesse (TC39)>
request from note takers: speakers, please add conclusions to your talks
02:16
<bakkot>
sometimes you don't want the whole result
02:17
<sffc>
The usefulness is that you don't need to store the whole buffer in memory in order to parse it, though a partial-result API is worth exploring
02:17
<ljharb>
let's say i want engines.node from package.json; once i know i've parsed the "node" property in the "engines" object i can stop parsing json, there's no need to wait for anything else
02:18
<Justin Ridgewell>
But what are you getting out of the stream?
02:18
<Jack Works>
The usefulness of streaming is that you can get partial responses out, I don't see how this can work with JSON objects becasue you have to wait for a closing }
it can optimistically parse it. for { a: [1, 2] } it can be a stream of event: enter "a"; start array; enter 0, value 1; enter 1, value 2; end array; end "a";
02:18
<Christian Ulbrich>
Can you elaborate on what you think hasn't been explored?
As many others, I do not get it, why "the single shot one" has to be "objected" to, if there is not a "streaming one". Advancing the singleShot one would not prevent another new take at the streaming one in the future. Why is this compromise not being explored, or at least given some thought to reconcile on this in some weeks...
02:18
<Jesse (TC39)>
streaming makes sense even for a syntax that requires a closing bracket
02:18
<ljharb>
But what are you getting out of the stream?
{ "engines": { "node": "something" is all i need to extract engines.node
02:18
<shu>
As many others, I do not get it, why "the single shot one" has to be "objected" to, if there is not a "streaming one". Advancing the singleShot one would not prevent another new take at the streaming one in the future. Why is this compromise not being explored, or at least given some thought to reconcile on this in some weeks...
it has been considered and explicitly object to by moddable, i'm confused
02:19
<shu>
what is "more exploration" here?
02:19
<littledan>
As many others, I do not get it, why "the single shot one" has to be "objected" to, if there is not a "streaming one". Advancing the singleShot one would not prevent another new take at the streaming one in the future. Why is this compromise not being explored, or at least given some thought to reconcile on this in some weeks...
Could you give an example of a hypothetical compromise? I think this is what bakkot has been working on for 2 years...
02:19
<Christian Ulbrich>
it can optimistically parse it. for { a: [1, 2] } it can be a stream of event: enter "a"; start array; enter 0, value 1; enter 1, value 2; end array; end "a";
This looks like good-olde SAX!
02:20
<sffc>
A use case I have for JSON streaming is that I get JSON objects through a WebSocket and I want to pipe chunks to the parser and get notified once a whole object has been consumed
02:20
<Christian Ulbrich>
Could you give an example of a hypothetical compromise? I think this is what bakkot has been working on for 2 years...
No, as I've said, on Kevin's side there are no more compromises to be made any more. He did everything he could do. It is the other side.
02:21
<Jack Works>
the use case I heard is they're dealing with GB-size of JSON so I think they'll need parse a single JSON in stream, not many JSONs concated
02:21
<rbuckton>
If I am correct, bakkot indicated that if the proposal was split, they would not be taking up the streaming API portion as champion. phoddie, would you be willing to champion the streaming API independently if the proposal was split?
02:21
<nicolo-ribaudo>
I have my own json streaming parser because some JSON files are too big to be stored in a string in V8
02:22
<Jack Works>
I have my own json streaming parser because some JSON files are too big to be stored in a string in V8
is it on github?
02:22
<littledan>
Christian Ulbrich: I am having trouble understanding what you meant by "Why is this compromise not being explored, or at least given some thought to reconcile on this in some weeks..." -- do you see a potential compromise besides the two options (including or excluding a streaming API) that either side could take?
02:22
<nicolo-ribaudo>
is it on github?
https://gist.github.com/nicolo-ribaudo/c5b09c43a10a99fd92c90e81e60732ec
02:23
<Michael Ficarra>
neat
02:23
<ljharb>

breaking news: https://github.com/tc39/proposal-arraybuffer-base64/issues/13#issuecomment-1738345569

I understand your position to be that the one-shot APIs are sufficient because they can be used to implement streaming with reasonable efficiency and without significant future compatibility concerns. If that is indeed the case, I will withdraw my objection.

02:23
<littledan>
I have my own json streaming parser because some JSON files are too big to be stored in a string in V8
interesting that the object then does fit in memory
02:24
<nicolo-ribaudo>
interesting that the object then does fit in memory
You need the magic Node.js flag to increase memory limit :P
02:24
<littledan>

breaking news: https://github.com/tc39/proposal-arraybuffer-base64/issues/13#issuecomment-1738345569

I understand your position to be that the one-shot APIs are sufficient because they can be used to implement streaming with reasonable efficiency and without significant future compatibility concerns. If that is indeed the case, I will withdraw my objection.

yay!
02:24
<Christian Ulbrich>
Christian Ulbrich: I am having trouble understanding what you meant by "Why is this compromise not being explored, or at least given some thought to reconcile on this in some weeks..." -- do you see a potential compromise besides the two options (including or excluding a streaming API) that either side could take?
Quite frankly, I have the impression, that someone is not open for a compromise and if we reach this point, consensus becomes very hard. There are possible compromises, as rbuckton has for example suggested.
02:25
<littledan>
you mean splitting the proposal? yeah, that's what most of the committee was advocating for.
02:26
<Christian Ulbrich>
You need the magic Node.js flag to increase memory limit :P
I have a wrapper for node, that sets --max-old-space-size=16384 all the time, to consume my GB-JSON's! :)
02:26
<waldemar>
There are people who don't use kelvin for temperature?
02:26
<ljharb>
I have a wrapper for node, that sets --max-old-space-size=16384 all the time, to consume my GB-JSON's! :)
you can set that in NODE_OPTIONS and not need a wrapper ftr
02:27
<Christian Ulbrich>
you can set that in NODE_OPTIONS and not need a wrapper ftr
I know! :)
02:27
<TabAtkins>
There are people who don't use kelvin for temperature?
Of course I don't, I use the reasonable Degrees Temp system xanthir.com/b58m0
02:28
<Jack Works>
https://gist.github.com/nicolo-ribaudo/c5b09c43a10a99fd92c90e81e60732ec
oh but it does not emit JSON as stream
02:28
<Christian Ulbrich>
Jack Works: You are looking for a SAX-parser for JSON
02:29
<ljharb>
Of course I don't, I use the reasonable Degrees Temp system xanthir.com/b58m0
climate change means that 100F is no longer a reasonable upper limit for day-to-day temps tho :-/
02:29
<rkirsling>
tabperature
02:29
<shu>
does someone have a link to these slides?
02:29
<shu>
i missed the rationale for why this is worth doing in TC39
02:29
<TabAtkins>
climate change means that 100F is no longer a reasonable upper limit for day-to-day temps tho :-/
Luckily 100T is 108F, so we're still good fo9r a bit
02:29
<Chengzhong Wu>
does someone have a link to these slides?
it was not posted in the agenda
02:29
<Christian Ulbrich>
Something like -> https://stackoverflow.com/questions/4373233/is-there-a-saxparser-that-reads-json-and-fires-events-so-it-looks-like-xml although I have not checked it all...
02:29
<shu>
yes, that's why i'm asking
02:30
<littledan>
i missed the rationale for why this is worth doing in TC39
This affects Intl's locale data model
02:30
<littledan>
I mean, the rg idea at least
02:30
<littledan>
new APIs would probably come from the web (I think Ben said this already)
02:32
<littledan>
also, mu isn't part of Intl.Locale yet
02:33
<rkirsling>
would love to know how mu ended up being the key (evidently "measurement unit" but that doesn't suggest temperature at all...)
02:33
<shu>
what is the addition then? is it to 402?
02:33
<Michael Ficarra>

While the freezing point is pretty rando, it does at least mean that the 0 point is roughly as cold as it gets in temperate parts of the world. (And measuring subzero is basically just for fun anyway; below that it's all "lethally cold" and the precise number doesn't matter anyway.)

This is very SF bay centric. Many parts of the US regularly see entire months where the temperature doesn't go above 0 Fahrenheit. They're not Antarctica. This is just wrong.

02:34
<littledan>
In fact, Ecma leadership has in the past encouraged us to not apply the single-objector model and use a more flexible consensus interpretation, as other TCs do
02:34
<Richard Gibson>
would love to know how mu ended up being the key (evidently "measurement unit" but that doesn't suggest temperature at all...)
I think the intention is to allow future extension beyond temperature
02:34
<rkirsling>
fair enough
02:35
<shu>
wait why fahrenhe
02:35
<rkirsling>
eight chars
02:35
<shu>
it's already so long, what's 2 more characters
02:35
<shu>
there's some hard limit on 8?
02:35
<Richard Gibson>
e.g., "en-GB-u-fahrenhe-horsepow"
02:36
<littledan>
this is the BCP47 grammar
02:36
<Jesse (TC39)>
OH horse pow
02:36
<shu>
i see
02:36
<Richard Gibson>
there's some hard limit on 8?
yes: https://unicode.org/reports/tr35/#Unicode_locale_identifier
02:36
<TabAtkins>
Yeah but as I said at the end of that quoted section, it doesn't really matter. Those temps are all lethal and without major differences in effect.
02:36
<Michael Ficarra>
lethal like if you're outside naked?
02:37
<TabAtkins>
yeah, if you're exposed without protection
02:37
<Michael Ficarra>
I definitely notice a difference between when it's 0 and -20 and -40
02:37
<sffc>
would love to know how mu ended up being the key (evidently "measurement unit" but that doesn't suggest temperature at all...)
It was decided recently in https://unicode-org.atlassian.net/browse/CLDR-15933. I pushed back against the accepted syntax but didn't die on the hill. The idea is that you can eventually stick arbitrary units in -u-mu not just temperature units.
02:37
<Michael Ficarra>
hmm, I don't think being outside naked is the most practical basis for measure
02:37
<littledan>
yes: https://unicode.org/reports/tr35/#Unicode_locale_identifier
https://www.rfc-editor.org/rfc/rfc5646.html#section-2.1 is also related right?
02:37
<TabAtkins>
good thing i'm not basing it on that?
02:38
<Michael Ficarra>

below that it's all "lethally cold" and the precise number doesn't matter anyway

02:38
<Michael Ficarra>
this sentence is only true for naked people
02:39
<Michael Ficarra>
if you're going for a practical system, you should assume people can use clothing and/or technology to compensate for the weather in the place they live
02:39
<TabAtkins>
No, incorrect. You said you feel a difference between -20 and -40. That's not "a precise number"! Those are very large increments and reasonable to be detectable.
02:39
<TabAtkins>
people can and do care about small differences, a mere few degrees, across most of the 0-100 range
02:40
<Michael Ficarra>
πŸ€” hmm okay
02:40
<TabAtkins>
i care about the 0-100 range covering a useful temperature range (tho at a lower priority than the other numeric reasons)
02:41
<Michael Ficarra>
if I was designing a temperature scale, I guess the size of the unit, and not the bounds, would be the most important thing to get right
02:41
<TabAtkins>
for the same reason that people set up % ranges so that 0%-100% are the useful range, even if numbers outside of that range occur
02:41
<Jesse (TC39)>
but what about -0?
02:42
<Richard Gibson>
yes, that's the reason. RFC 5646 is part of BCP 47, which UTS #35 explicitly aligns with. And the specific RFC text is "All subtags have a maximum length of eight characters."
02:42
<TabAtkins>
Yeah, the size is important, and I think F has a better size than C. T has a similar degree size to F.
02:42
<Michael Ficarra>
like if I wanted to change the thermostat by integral amounts, those integral amounts should be the minimum increment that I would want (something like 0.25 degrees F)
02:42
<TabAtkins>
10F differences roughly correspond to significant changes in clothing
02:42
<TabAtkins>
...you want to adjust the temperature of a room in quarter degrees?
02:42
<Michael Ficarra>
and 0.25F differences are about the minimum you can detect in air temp
02:43
<Michael Ficarra>
no, I want them to be whole numbers
02:43
<Michael Ficarra>
meaning my temperature system would choose unit sizes of about 0.25F
02:43
<Michael Ficarra>
and the bounds would be less important
02:43
<Richard Gibson>
that's a lot of confidence in heating and cooling systems
02:43
<TabAtkins>
i was surprised at the fineness of the difference you apparently want to control, not the way they are expressed
02:44
<Michael Ficarra>
yes, I've read that that's about the limit of human differentiation in air temp
02:44
<TabAtkins>
yeah, that's a degree of precision that's not realistically obtainable, and i'd say not actually meaningful even if it were obtainable
02:44
<TabAtkins>
"ah, I prefer the room to be at 72.5, 72.25 is just too chilly"
02:45
<Michael Ficarra>
hey, maybe we will one day have better technology
02:45
<TabAtkins>
(Even expressing single F degree preferences is on the edge of silliness imo. I think 2-degree increments is about right.)
02:45
<Michael Ficarra>
history shows we will
02:45
<TabAtkins>
So C degrees are about the smallest meaningful unit for room temperature, I think
02:45
<ljharb>
1 degree F makes a very big difference in my household
02:45
<bakkot>
I have occasionally found going to turn the thermostat down by a single degree, then after a while going to turn it up by a single degree, and so on
02:45
<bakkot>
it is possible this is just my own internal regulation being off but it is also possible that I really do want a finer level of control than 1 degree F
02:45
<TabAtkins>
sure, thermo systems have hysteresis and overshoot
02:46
<Michael Ficarra>
it may not be overshoot
02:46
<ljharb>
i'm saying that the precise difference of 1Β°F is indeed perceivable and matters
02:46
<ljharb>
i hate thermostats in celsius because it's much harder to get the precise control i want
02:46
<Michael Ficarra>
yes, a thermostat's interval should be somewhere between 0.25 and 1.0 F
02:47
<TabAtkins>
i agree it's perceivable. i don't agree it matters to most people, especially not enough to affect the degree size such that the useful temperature range would be 300-400 degrees wide ^_^
02:47
<Michael Ficarra>
TabAtkins: maybe the temperature system is fine-grained around room temp and coarse as it goes out from there?
02:47
<Michael Ficarra>
like floating point where 0 is room temp
02:47
<TabAtkins>
omigod no
02:48
<Michael Ficarra>
... maybe yes though
02:48
<Christian Ulbrich>
The best scale should preferably get rid of fractional units, because then it would work flawlessly in the browser!
02:48
<TabAtkins>
get that experimental metric system nonsense out of here ^_^
02:48
<TabAtkins>
non-linear measurements are completely out
02:48
<Michael Ficarra>
hey, don't knock it until you've tried it
02:48
<TabAtkins>
I have!
02:48
<Michael Ficarra>
and it was great?
02:49
<TabAtkins>
it's not a vector space, no it's terrible
02:49
<Michael Ficarra>
now I want to try it
02:49
<TabAtkins>
the concept of a temperature range is completely destroyed. you can only talk about specific endpoints
02:49
<TabAtkins>
"10 degrees" is a meaningless expression
02:50
<TabAtkins>
it would also completely destroy the other pillar of my proposal, which is "trivial conversion between human-relative and absolute"
02:50
<Christian Ulbrich>
Just add Β° C and it becomes useful!
02:50
<TabAtkins>
Christian you're fired
02:50
<rkirsling>
but instead you could ask people to turn up the thermostat by a "major third" :P
02:52
<snek>
did the negated in/instanceof operators get stage 1
02:52
<Christian Ulbrich>
The temperature setting in my not-so-cheap car is definitely broken. 20Β° C is cold and 21Β° C is too hot. TabAtkins you should probably come over to Germany to get your ideas into ACs in German cars!
02:52
<ljharb>
yes
02:52
<TabAtkins>
(an exponential range is reasonable in some contexts, like decibels, but it needs specific reasoning)
02:53
<littledan>
did the negated in/instanceof operators get stage 1
I thought so
02:53
<snek>
nice
02:53
<TabAtkins>
yeah everyone had to say "i support this" in the spreadsheet
02:53
<snek>
when you say spreadsheet do you mean hackmd or something else
02:53
<TabAtkins>
the tcq-replacement spreadsheet
02:53
<littledan>
the TCQ replacement
02:54
<Michael Ficarra>
snek: google docs spreadsheet
02:54
<rkirsling>
I kind of feel like the imminent problem got resolved but the meta discomfort lingers
02:54
<snek>
i might be blind but i don't see a link to that in the reflector issue
02:54
<Christian Ulbrich>
phoddie: Thanks for giving this more thoughts.
02:54
<nicolo-ribaudo>
https://docs.google.com/spreadsheets/d/1Us6MFx3WB6E8K5jJ7m1j5jEa9OUOuwgx60RXwzfI7JE/edit#gid=0
02:54
<TabAtkins>
the meta discomfort has lingered since i first started showing up to these meetings and was dismayed by the "we say consensus but mean unanimity" process
02:54
<bakkot>
i might be blind but i don't see a link to that in the reflector issue
"draft schedule", second bullet on the page
02:54
<Michael Ficarra>
well broad use of floats implies it's broadly useful
02:55
<bakkot>
or, sorry
02:55
<bakkot>
that's the agenda not the queue
02:55
<shu>
we need to still talk about the process imo
02:55
<TabAtkins>
that's why we use exponential ranges, in fact, to avoid fp errors for large numbers
02:55
<bakkot>
possible but I am personally not willing to drive such a discussion
02:55
<TabAtkins>
"that's 120 decibels" rather than "that's 10^12 units"
02:56
<TabAtkins>
(assuming a context where bel is a x10, it depends on usage)
02:56
<shu>
like, kevin is still being asked to prove something that only peter cares about? companies care about "culture", and this is a... dispreferred, let's say, part of our culture
02:57
<ljharb>
that's something that's asked all the time
02:57
<Chris de Almeida>
yeah everyone had to say "i support this" in the spreadsheet
look, I just wanted to be clear ok? πŸ˜…
02:57
<ljharb>
i've been asked to prove the utility of Symbol.isRegisteredSymbol, for example :-p
02:58
<ljharb>
i think this is a fine and reasonable outcome for the base64 proposal
02:58
<Christian Ulbrich>
Sometimes people need to be convinced and cared for, one by one, that's a consequence of consensus.
02:58
<shu>
okay i will fight some of you at lunch then
02:58
<ljharb>
(ΰΈ‡'Μ€-'́)ΰΈ‡
02:58
<rkirsling>
definitely down for a lunchtime chat
02:58
<snek>
i'm alright with advancement by cage match
02:59
<Michael Ficarra>
➑️ #TDZ
02:59
<shu>
i've been asked to prove the utility of Symbol.isRegisteredSymbol, for example :-p
i don't think we're at an impasse though, but i also asked for use cases, not like... a lot of extra work?
03:00
<ljharb>
sure, fair, i was mostly just ribbing with that particular example
03:00
<ljharb>
we had to do that for RegExp.escape too tho, and that research was a lot of extra work that kevin did
03:00
<snek>
peter did say he would help with the work
03:00
<shu>
very well
03:01
<snek>
i do kind of agree with you shu, but i don't think this particular instance was too unreasonable
03:01
<shu>
i'm not looking at the outcome
03:01
<TabAtkins>
okay i will fight some of you at lunch then
One-on-one fights, no ganging up.
03:02
<shu>
i'm looking at how the process to reach the outcome involves, invariably, undue emotional labor
03:02
<shu>
this incentivizes behaviors and the kind of people the committee attracts
03:02
<rkirsling>
that sounds like a reasonably stated concern
03:04
<bakkot>
we had to do that for RegExp.escape too tho, and that research was a lot of extra work that kevin did
it wasn't just Mark who had that opinion, tbf
03:04
<bakkot>
Michael Ficarra e.g. also felt that the "no context escapes" thing was important
03:04
<bakkot>
I did too actually
03:05
<ljharb>
also very good points
03:05
<Bradford Smith>
How can test262 use cleanupSome when it is only stage 1? I'm confused
03:06
<ljharb>
it's stage 2, and it was stage 3
03:06
<Christian Ulbrich>
I think, albeit is was a bit rough, consensus worked today. I would not questioning consensus, whenever there is heat in a discussion.
03:06
<snek>
tests were written with it before it was split into a separate proposal
03:06
<Bradford Smith>
Ah, it's listed as stage 1 on the agenda
03:07
<Chris de Almeida>
tcq is... "back"...
03:15
<Chris de Almeida>
we're going to give TCQ a whirl in the next session... be prepared to quickly revert to the spreadsheet though. big thanks to Brian Terlson for stepping in to turn it off then on again (and write+host TCQ in the first place)
04:08
<snek>
if something isn't currently supported
04:08
<snek>
but could be supported in the future
04:08
<snek>
isn't throwing a reasonable thing to do still
04:08
<snek>
as like a placeholder
04:09
<TabAtkins>
Yes.
04:10
<TabAtkins>
Usually better than hoping that a behavior change is web-compatible. (It usually isn't.)
04:12
<rbuckton>
Except for the override mistake. Throwing there hasn't made it easier to change to a behavior that does not throw
04:13
<littledan>
Except for the override mistake. Throwing there hasn't made it easier to change to a behavior that does not throw
there have been several cases of this (e.g., adding literally anything at all changes a throw into a no-throw), it's just that our default assumption is that it's OK.
04:13
<snek>
i hope we don't go too far into this specific example, it sounds like a reasonable answer was already given
04:20
<TabAtkins>
Disagree; I think we should have those debates.
04:20
<TabAtkins>
And having an explicit guidance for defaults is good.
04:21
<snek>
yeah i suspect people want to argue about whether these intl apis should throw
04:24
<TabAtkins>
Agree -0 is fine, you very very rarely want to distinguish it.
04:26
<snek>
this one is much spicier
04:26
<snek>
my chaotic user side wants this to remain but my implementer side wants this to go away
04:27
<Michael Ficarra>
listen to your implementer side
04:27
<rbuckton>
If we do reach a point of also erroring when outside of the domain of int32/uint32 we should consider ramifications within the ecosystem. Many packages tend to do the same kind of rounding that ECMA-262 does, mostly because they end up forwarding arguments to ECMA-262 functionality that performs the same rounding. If we opt to restrict inputs to the domain of a 32-bit signed or unsigned integer, we may want to consider adding MAX_INT32/MIN_INT32/MAX_UINT32 to Number so that library authors can more easily validate that domain as well. (i.e., not everyone will know to reach for x === (x | 0) or x === (x >>> 0) to validate the domain).
04:28
<rkirsling>
definitely can't not support this as an implementer
04:29
<rbuckton>
I'd be wary of not coercing to boolean. truthiness/falsiness is too ingrained into the community at this point.
04:29
<rkirsling>
er yeah
04:30
<rkirsling>
bool is special
04:30
<snek>
like if we have stdlibFunction(v: bool), it should accept objects?
04:31
<rbuckton>
like if we have stdlibFunction(v: bool), it should accept objects?
Possibly, yes.
04:31
<hax (HE Shi-Jun)>
if bool is special, numeric string might also special??
04:31
<rkirsling>
well it just kind of feels like you can compare if (...) and foo(...) here
04:32
<rbuckton>
Possibly, yes.
Unless you expect to overload the API with a boolean or an object, perhaps.
04:33
<rbuckton>
I would prefer we validate booleans, but I'm not sure how realistic that is.
04:33
<hax (HE Shi-Jun)>
It seems people sometime write "x.foo = true" to mean "x.foo = {}" (though I don't like it)
04:34
<ljharb>
in what context do they do that?
04:34
<Jesse (TC39)>
this is adding detail to shu 's point earlier: how much time has been sent writing test262 tests for weird stuff...which is still incomplete in its coverage!
04:34
<shu>
how can someone use true to mean {}?
04:34
<shu>
i'm pretty confused
04:34
<hax (HE Shi-Jun)>
in what context do they do that?
I guess they mean x.foo will be the default config (something like that)
04:35
<ljharb>
i'm not sure why true would be a reasonable stand-in for an object literal, unless it's an explicit part of the api
04:35
<Michael Ficarra>
that sounds like weird DOM setters?
04:35
<hax (HE Shi-Jun)>
it just like x.fooEnabled
04:36
<nicolo-ribaudo>
Rollup has some options that accept either true or an object, for example treeshake: true or treeshake: { thatThing: true, theOtherThing: true }
04:37
<nicolo-ribaudo>
But it's an explicit API overload
04:37
<hax (HE Shi-Jun)>
i'm not sure why true would be a reasonable stand-in for an object literal, unless it's an explicit part of the api
because it works today in most apis. So someone might use that pattern. I myself don't use that pattern.
04:37
<nicolo-ribaudo>
Not accidental
04:38
<ljharb>
it seems really weird to me to have a config API where an empty object has an effect (i say that while maintaining a project that has that weird api, and i don't like it there either)
04:39
<hax (HE Shi-Jun)>
It may be not intentional, it just works if u don't check boolean and rule out them.
04:39
<nicolo-ribaudo>
In the rollup case, an empty object is equivalent to not specifying the option I believe (i.e. each sub-option gets its default value)
04:39
<Andrew Paprocki>
i'm not sure why true would be a reasonable stand-in for an object literal, unless it's an explicit part of the api
What about passing JSON.parse() output as an "object" parameter?
04:40
<hax (HE Shi-Jun)>
The code is like function (config) { if (config) { ... } }
04:40
<danielrosenwasser>
It seems like the whole point of this presentation is to say "if you're doing a coercion, just please say why"
04:40
<ljharb>
i'd expect config to be strictly validated Β―\_(ツ)_/Β―
04:40
<danielrosenwasser>
so if you think it's convenient to have a boolean coercion, just say why
04:41
<Jesse (TC39)>
i'd expect config to be strictly validated Β―\_(ツ)_/Β―
I guess it's a philosophical difference
04:41
<ljharb>
ok, but that kind of feels like "i've been badly burned, so my philosophy is to not touch fire"
04:41
<hax (HE Shi-Jun)>
But if that, tuple&record might not work (the motivation is it just work to replace object)
04:44
<Bradford Smith>
Re: GetOption are we talking about an AO in the spec here or a JS API?
04:46
<ljharb>
an AO
04:46
<shu>
Bradford Smith: it's a 402 AO
04:47
<rkirsling>
the Date constructor is famously evil
04:47
<Chris de Almeida>
the constructor whom'st've must not be named
04:51
<rbuckton>
The upshot of disallowing implicit coercion is that we can more easily replace primitive arguments with options bags in an overloaded API, should we need to add more functionality to an existing API (for any API that "exists" following adoption of this rule).
04:57
<Michael Ficarra>
you'd think "this API needs a string, I'll give it a string" would be... common sense?
04:57
<Michael Ficarra>
can't believe that's not how all people work
04:58
<danielrosenwasser>
But what if you might want to pass in a { [Symbol.toStringTag](): string }?
04:58
<Michael Ficarra>
get out
04:58
<Michael Ficarra>
straight to jail
05:01
<TabAtkins>
I mean, disagree about coercion functions - they don't coerce as argument handling. They take a specified type and, internally, convert it. ^_^
05:02
<Jesse (TC39)>
can't believe that's not how all people work
I wonder if there's a class of programmers who probably think of this, but backwards: only a string can be accepted, so I can pass in whatever (omit the check for whether my value is a string), secure in the knowledge that the implementation will convert my values to a string
05:02
<ljharb>
i'm sure there is a class but i suspect it's a very tiny one
05:02
<TabAtkins>
For a few cases in Python that is indeed how I think - particularly string interpolation.
05:03
<ljharb>
string coercion in template literals is a critical part of the functionality, true
05:03
<Michael Ficarra>
am I the only one who interpolates only strings?
05:03
<ljharb>
it'd be really annoying to pass in a number and get an exception. so yes, i think you are
05:03
<ljharb>
but interpoliterals are a special case, most APIs needn't be like that
05:03
<Jesse (TC39)>
am I the only one who interpolates only strings?
same
05:03
<Michael Ficarra>
I rarely want to think about what the "default" string representation of the thing is
05:03
<Michael Ficarra>
I want to just choose one
05:04
<ljharb>
tbf i probably only pass strings and numbers
05:04
<littledan>
I would be interested in learning more about how sffc's libraries take advantage of the power of coercion.
05:04
<rbuckton>
am I the only one who interpolates only strings?
tagged templates don't even coerce interpolated arguments. That said, I frequently use numbers and things that have a useful .toString(), like URL.
05:04
<ptomato>
haha, not only do I interpolate non-strings, I use interpolation to convert things to strings, rather than ""+
05:04
<Michael Ficarra>
even numbers, you probably want toFixed, not toString
05:05
<ljharb>
same; using a template literal to coerce to a string is actually more correct than simply concatenating to one, and is undeniable, unlike String()
05:05
<Jesse (TC39)>
what about decimals? I wouldn't trust the generation of a digit string
05:05
<littledan>
what about decimals? I wouldn't trust the generation of a digit string
huh? why not?
05:05
<Jesse (TC39)>
huh? why not?
I would use toFixed to ensure a certain number of digits
05:06
<Michael Ficarra>
exactly
05:06
<Jesse (TC39)>
probably reflects a certain kind of paranoia
05:06
<rbuckton>
True. when we talked about explicit coercion like +x, the immediate "explicit coercion to string" mechanism that came to mind was `${x}`
05:06
<Michael Ficarra>
I have been called paranoid once or twice...
05:07
<nicolo-ribaudo>
${x} and ""+x have different behaviour, right?
05:07
<nicolo-ribaudo>
${x} is like string.concat
05:10
<TabAtkins>
I don't know what you mean there.
05:11
<rbuckton>
Tab, you are unmuted
05:12
<Chris de Almeida>
Tab muted before you sent that
05:13
<TabAtkins>
Okay I'm reading the MDN for string.concat and wtf
05:16
<ljharb>
yep, template literals and string.concat are correct; + to a string is not
05:16
<ljharb>
babel had the wrong behavior there and switched to using string concat at one point
05:16
<shu>
sffc: https://googleprojectzero.blogspot.com/2015/08/attacking-ecmascript-engines-with.html
05:16
<shu>
search for "Conversion operators"
05:16
<shu>
this has been known to be a problem for a long time
05:17
<ljharb>
i dunno, writing tests sometimes is more effort than implementation i think :-)
05:18
<sffc>
I would be interested in learning more about how sffc's libraries take advantage of the power of coercion.
I'll make a post on GitHub with examples.
05:18
<rbuckton>
It's hard to validate tests without an implementation of some kind to verify your assumptions are correct.
05:18
<ljharb>
btw can someone advance the queue?
05:18
<littledan>
ljharb: Try refreshing
05:19
<ljharb>
i did twice, still says "stop coercing things" at the top, with kevin's name
05:19
<littledan>
oh right me too
05:19
<littledan>
oops
05:19
<ljharb>
there we go
05:23
<bakkot>
I updated https://github.com/tc39/how-we-work/pull/136
05:23
<bakkot>

sffc: thoughts on my wording here?

Some APIs intentionally round non-integral inputs, for example as an attempt to provide a best-effort behavior, rather than because the API fundamentally only makes sense with integers. This guideline does not apply to those cases.

05:25
<sffc>
sffc: https://googleprojectzero.blogspot.com/2015/08/attacking-ecmascript-engines-with.html
The two CVEs on that page under "Conversion Operators" are bugs in engines, both use-after-free. It's not a bug in user code. It seems unconvincing that bugs in engines of the nature that code linting tools can catch (ASAN) should carry a large amount of weight in changing long-standing spec precedent.
05:26
<shu>
definitionally, all bugs due to conversion operators are engine bugs
05:26
<shu>
the point of this precedent is to remove that class of bugs from being possible
05:27
<shu>
indeed, ASAN can catch stuff like this if fuzzers can generate the right case
05:27
<shu>
but this is all part of the broader "economic cost vs gain" tradeoff
05:28
<bakkot>
pretty sure V8 does run under ASAN and therefore emperically it is not sufficient to catch all bugs of this class
05:28
<shu>
i'd like to see explicit demonstrated value in the ecosystem first, because we know there is economic cost from the complexity
05:28
<shu>
sffc: why do you find the engine bugs to be unconvincing?
05:29
<TabAtkins>
definitionally, all bugs due to conversion operators are engine bugs
No, conversion operators can definitely be author-level bugs; that's what I was pointing out with my comment. Being forced to be explicit about coercion makes me realize that an API wanted a string in the first place, rather than the object I thought it was asking for, for example.
05:29
<sffc>
I was thinking of bugs like "an attacker was able to run malicious code that changed the definition of Symbol.toPrimitive on some object in order to capture m credit card number"
05:30
<shu>
sffc: exploits are always chained, i don't know if i can find you an example end-to-end that results in stealing a credit card. it also seems an overly high bar to set here, when it is known conversion operator paths are used as gadgets in exploit chains
05:31
<shu>
security == simplicity
05:32
<sffc>

it is known conversion operator paths are used as gadgets in exploit chains

Can you share examples of such exploit chains?

05:34
<sffc>
sffc: why do you find the engine bugs to be unconvincing?
This is mischaracterizing my position. Potential for engine bugs is absolutely the type of thing that should be weighed in pros and cons. I only said that it's not convincing to me that this particular class of engine bug is a compelling motivation for bakkot's proposal on its own.
05:35
<Jesse (TC39)>
"false" --> true --> "true" --> true
05:35
<Jesse (TC39)>
should be explotable
05:37
<sffc>
It's also the case that linting tools have become much, much more sophisticated in the last 10 years since the cited CVEs were filed. Both ASAN for C++ code and policies to use more Rust in new components.
05:39
<shu>
here is one where valueOf is used to trigger an ArrayBuffer detach, which invalidates assumptions, and ends up triggering arbitrary code execution: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-7288
05:39
<shu>
i am happy to put you in touch internally with V8 security folks and Project Zero (natalie) who has long history battling this
05:40
<bakkot>
I don't think we're anywhere near using Rust to implement major parts of any of the JS engines in the big three browsers
05:41
<shu>
i'm sorry, i strongly disagree with the hypothetical that "some library would like to ship coercible objects" is in the same ballpark as "please staff a team to rewrite production software in a new language"
05:41
<shu>
in terms of funding the two things like 2, 3 orders of magnitude off
05:41
<shu>
at least
05:42
<ljharb>
sffc: are there any libraries you know of with significant usage that have implicit coercion as a major part of their API? and of those, which would be impacted by new builtins no longer implicitly coercing, and why?
05:42
<shu>
It's also the case that linting tools have become much, much more sophisticated in the last 10 years since the cited CVEs were filed. Both ASAN for C++ code and policies to use more Rust in new components.
you also don't see new bugs in this area because we spent years hardening this area! it'd be nice if we stop adding new APIs so we don't also need to spend years hardening those code paths
05:46
<Justin Ridgewell>
Stages have a name?
05:46
<Richard Gibson>
they used to
05:48
<Justin Ridgewell>
…What are the stage names?
05:48
<Richard Gibson>
removed by https://github.com/tc39/process-document/pull/31
05:48
<Richard Gibson>
Strawperson β†’ Proposal β†’ Draft β†’ Candidate β†’ Finished
05:49
<rkirsling>
wow
05:49
<Chengzhong Wu>
multiple persons are speaking simultaneously so note are not going to be correct
05:49
<rkirsling>
I did not realize we retired the names; I used them in a presentation last year
05:49
<Chengzhong Wu>
please correct notes after you've done speaking
05:52
<ljharb>
eemeli's Stage e suggestion isn't bad tbh, because it's 2.7 something
05:52
<Chris de Almeida>
the transcription quality has degraded (that's not a slight against our helpers -- the professional transcriptionist quality has deteriorated significantly)
05:55
<rkirsling>
Stage e is sounding increasingly good, I agree
05:56
<ljharb>
it does sound a lot like "stage 3" tho, so maybe not for that reason
05:56
<Justin Ridgewell>
We're gonna be presenting at some community event and everyone is going to mishear "Stage e" as "Stage 3"
05:56
<rkirsling>
valid
05:56
<Justin Ridgewell>
And we're gonna have to say "E as in Echo" constantly
05:56
<rkirsling>
"2.8 final chapter prologue" it is then πŸ˜‰
05:56
<Christian Ulbrich>
How about stage T :)
05:56
<bakkot>
"stage pre-3"
05:56
<bakkot>
(serious suggestion)
05:56
<eemeli>
"e as in test"
05:57
<rkirsling>
Yeah, pre-3 was my serious suggestion
05:57
<ljharb>
i don't want anything with "3" in it
05:57
<ljharb>
post-2, but not pre-3
05:57
<Jesse (TC39)>
e isn't even a digit, definitely suggests something off
05:57
<Pablo Gorostiaga>
2T? T for tests
05:57
<Justin Ridgewell>
Stage t3st
05:59
<bakkot>
I feel like "pre-3" fairly clearly indicates "not 3"
05:59
<bakkot>
so ljharb can you say more about why you don't want "3" in the name?
05:59
<ljharb>
because it still suggests you can use it
05:59
<Willian Martins>
3 and 3 complete?
05:59
<rkirsling>
I agree in that "pre-3" feels different than "3 <something>"
05:59
<ljharb>
in this new stage it still must not be used/shipped
05:59
<Christian Ulbrich>
we need to get away from the stage wording. How about something with "phase ..."
06:00
<rkirsling>
Stage 2 Act 2
06:00
<bakkot>
because it still suggests you can use it
.... does it?
06:00
<sffc>
I like "Stage E"
06:00
<bakkot>
I feel like it communicates "not yet stage 3"
06:00
<bakkot>
which specifically means "not ready"
06:03
<sffc>
"Stage β„―"
06:03
<Christian Ulbrich>
that's a small e!
06:03
<ljharb>
yes, like in math
06:03
<ljharb>
e is the math constant. E is just Math.E which is weird
06:03
<sffc>
U+212F
06:04
<Christian Ulbrich>

"Last time I found such a small Ξ΅, that if divided by 2, it became negative!"

06:04
<bakkot>
because it still suggests you can use it
I am still confused about how "pre-3" suggests you can use it
06:04
<rkirsling>
stage 2.62
06:04
<bakkot>
also if it does not go in babel's stage 3 preset, or int typescript, which it won't, then... you can't
06:04
<littledan>
We very much can teach the community things, it's just sort of a cost/benefit tradeoff. It's cheaper to tie into existing understandings of Stage 3
06:04
<Michael Ficarra>
eemeli: yes I would object and I can't believe that needs to be explained
06:05
<ljharb>
I am still confused about how "pre-3" suggests you can use it
i am claiming that people will gloss over the "pre" and see "3" and think "stage 3". because people's reading comprehension is … inconsistent
06:05
<Christian Ulbrich>
So it would be Stage Ξ΅
06:05
<Chris de Almeida>
stage 2+
06:05
<bakkot>
i am claiming that people will gloss over the "pre" and see "3" and think "stage 3". because people's reading comprehension is … inconsistent
ok but as long as tool authors don't make that mistake we don't have to care
06:05
<ljharb>
specific polyfill authors not in this room will make it, so we do have to care
06:06
<ljharb>
i am happy to discuss specifics privately if needed.
06:06
<bakkot>
we can just ask the core-JS guy to not ship stuff
06:06
<bakkot>
it's fine
06:06
<ljharb>
that has been asked and rejected many times. so no, it's not fine.
06:06
<bakkot>
our choice of naming cannot force him to ship or not ship things
06:06
<ljharb>
nope but it affects the likelihood of it.
06:06
<Chris de Almeida>
we can just ask the core-JS guy to not ship stuff
sir. you cannot simply.. stop the rock
06:06
<bakkot>
ok but I think "pre-3" is fine
06:06
<bakkot>
in terms of likelihood that he will ship a thing
06:07
<bakkot>
like, if he is willing to ship a thing called "pre-3" he will ship other things
06:07
<ljharb>
yes, i get that. i don't think it's fine. we have lots of other alternatives
06:07
<bakkot>
we do not appear to have lots of other alternatives which are actually viable
06:07
<littledan>
2 + (1-epsilon)
06:07
<bakkot>
so if concerns about whether that one specific person will ship a thing is the only blocker, I think that is the least of the concerns
06:07
<rkirsling>
so like "e" is nerdy and fun but "2.62" is nerdy and relevant
06:07
<rkirsling>
so I actually think I'm serious about 2.62 πŸ˜…
06:08
<Christian Ulbrich>
2 + (1-epsilon)
That is pretty close to 3!
06:08
<eemeli>
2 + (1-epsilon)
2.9Μ…
06:08
<waldemar>
I'm disturbed by the claims of the community being unteachable
06:08
<ljharb>
so if concerns about whether that one specific person will ship a thing is the only blocker, I think that is the least of the concerns
it's not just that. that's just one example.
06:08
<Chris de Almeida>
it's not so much they are unteachable.. they are more.. unreachable ?
06:08
<ljharb>
I'm disturbed by the claims of the community being unteachable
it's that their teachability is not predictable.
06:08
<bakkot>
it's not just that. that's just one example.
what other examples are there?
06:08
<Jesse (TC39)>
I thought there are sites like proposal.es that are well known in the JS community (at least, those who track things)
06:08
<littledan>
I'm disturbed by the claims of the community being unteachable
it's not that anyone is unteachable, it's that it's a give and take, rather than a waterfall model coming from us
06:09
<bakkot>
if he ships something, but no other tool does, no one is going to be able to use the thing
06:09
<bakkot>
which is the desired outcome
06:09
<ljharb>
stage 2.62 is cute
06:11
<Christian Ulbrich>
So we agree on a stage between 2 and 3 but we seem to not to be able to agree on a name for it? So how about Stage ?
06:12
<bakkot>
ok just don't call it a stage
06:12
<bakkot>
just say "consensus on the design"
06:12
<shu>
yeah that's fine with me
06:13
<shu>
ship it
06:13
<ljharb>
see, i told you this is the fun part :-p
06:14
<ljharb>
but yes it'd be good to move on
06:16
<Jesse (TC39)>
here's a list: https://www.proposals.es/stages/stage3
06:17
<ljharb>
we have our own list, https://github.com/tc39/proposals :-)
06:17
<Jesse (TC39)>
see, this stuff leaks!
06:17
<rbuckton>
I'd agree with waiting a meeting at least. If I'd realized that tests were going to be a requirement for something like throw to remain at Stage 3 if it reached it this meeting, I would have written the tests prior to the meeting.
06:17
<ljharb>
i mean we kind of did explicitly broadcast it by using the terms publicly, tweeting about them, etc
06:17
<ljharb>
I'd agree with waiting a meeting at least. If I'd realized that tests were going to be a requirement for something like throw to remain at Stage 3 if it reached it this meeting, I would have written the tests prior to the meeting.
we don't actually have the new stage yet, so everyone has time
06:18
<ljharb>
and if this topic motivates people to write their tests (faster/sooner), then great
06:18
<bakkot>
"consensus on the normative content"?
06:18
<bakkot>
if that more precisely captures "all of the details"
06:19
<bakkot>
or even "consensus on the specification"
06:19
<eemeli>
Was the queue captured at the end of the first part of this?
06:22
<Chris de Almeida>
yes!
06:22
<Chris de Almeida>
it's above but I will repost
06:22
<rkirsling>
does anybody have a clear memory of why the names were removed from the process doc though?
06:23
<shu>
i have no memory of us removing them
06:24
<sffc>

sffc: thoughts on my wording here?

Some APIs intentionally round non-integral inputs, for example as an attempt to provide a best-effort behavior, rather than because the API fundamentally only makes sense with integers. This guideline does not apply to those cases.

Can you tag me on the issue and I'll take a closer look soon but not right now?
06:24
<Chris de Almeida>
does anybody have a clear memory of why the names were removed from the process doc though?
https://github.com/tc39/notes/blob/main/meetings/2021-07/july-14.md#renaming-strawperson-to-concept-or-something-better
06:25
<bakkot>
Can you tag me on the issue and I'll take a closer look soon but not right now?
done
06:25
<sffc>
does anybody have a clear memory of why the names were removed from the process doc though?
I remember a discussion a couple years back where we decided to remove them because the names suggested interpretations of the stages which were not necessarily correct.
06:25
<Chris de Almeida>
i have no memory of us removing them

SYG: I want this to be narrowly about removing the name column from the process document, not about how we as delegates in engaging with the community.

06:25
<ljharb>
reading the notes has me recalling the discussion now
06:25
<shu>
dang
06:25
<shu>
wasn't expecting to be called out like this
06:26
<Chris de Almeida>
sorry!
06:26
<rkirsling>
thanks!
06:28
<bakkot>
eemeli: do expressions are still potentially a thing but are almost universally felt to be too clunky for this specific case
06:33
<Chris de Almeida>

SYG: I'm concretely proposing that we say stage 0, stage 1, stage 2, stage 3, stage 4.

JHX: I think most of us are in China only use "stage 1" or 2, 3, just like that.

so. 1. this is good! this was an improvement

and 2. relevant for us when bikeshedding the new stage name to remember SYG's rationale from this meeting to avoid mnemonics

06:34
<eemeli>
bakkot: Really? To me, do { throw x } feels pretty ergonomic.
06:34
<bakkot>
Β―\_(ツ)_/Β―
06:35
<nicolo-ribaudo>
Function expressions were not in the first version??
06:35
<ljharb>
no but they were added over 20 years ago and when a much smaller group of people used JS
06:36
<rkirsling>
and 3. underscores the importance of not changing the existing numbers
06:36
<Christian Ulbrich>
I really like IIAGFEs!
06:37
<eemeli>
bakkot: Really? To me, do { throw x } feels pretty ergonomic.
In particular when considering cases where something more needs to be done that just throw x, do expressions feel like a pretty good potential solution.
06:37
<littledan>
What if we made a function like Error.raise instead of adding syntax?
06:37
<bakkot>
In particular when considering cases where something more needs to be done that just throw x, do expressions feel like a pretty good potential solution.
yeah but a lot of cases don't need that
06:37
<bakkot>
a lot of cases
06:37
<ljharb>
would that have the right stack frames and call site?
06:37
<eemeli>
Sure, and for them the "plain" do { throw x } works pretty well.
06:38
<Jesse (TC39)>
would that have the right stack frames and call site?
why not? seems we could specify it to behave just like throw (and hence inherit whatever ehavior throw has)
06:39
<ljharb>
because we don't specify stack frames at all. and we can't specify API to behave like syntax, which is why import() isn't a function, it's syntax
06:39
<Jesse (TC39)>
right but then new syntax might have any advantage
06:39
<Jesse (TC39)>
*might not
06:40
<nicolo-ribaudo>
Well we can also not specify throw new Error() to not add a new random stack frame anyway :P
06:41
<bakkot>
Michael Ficarra: yes, alternative 2 is safe in that way
06:41
<bakkot>
that is why I suggested it
06:41
<Michael Ficarra>
bakkot: okay then I would like to express my support for that reason
06:42
<snek>
we can specify Error.raise instead of syntax if we want
06:42
<nicolo-ribaudo>
Erorr.prototype.throw
06:42
<nicolo-ribaudo>
As a getter
06:42
<nicolo-ribaudo>
new Error().throw like await in rust
06:43
<Jesse (TC39)>
eww
06:43
<ljharb>
then you can't throw a non-error that way, it'd have to be static
06:43
<snek>
import is syntax instead of a function for static analysis, not because we are inherently unable to add functions
06:43
<snek>
you shouldn't throw non-errors
06:43
<snek>
i think it is a mistake that you can
06:44
<Bradford Smith>
I may have missed it. Did anyone suggest that throw should have approximately the same precedence as yield? You would just define the rule so that its production is
ThrowExpression ::= throw ShortCircuitExpression
06:44
<ljharb>
no, it's because the import site needs to know where it's being imported from. you can do static analysis with globals just fine.
06:44
<Michael Ficarra>
ljharb: Object.getOwnPropertyDescriptor(Error.prototype, 'throw').get.call(anything)
06:44
<Michael Ficarra>
it's beautiful! 😍
06:44
<snek>
no, it's because the import site needs to know where it's being imported from. you can do static analysis with globals just fine.
it can know where its being imported from if its a function
06:44
<snek>
there's nothing preventing that
06:45
<ljharb>
ljharb: Object.getOwnPropertyDescriptor(Error.prototype, 'throw').get.call(anything)
Reflect.getIntrinsic('get Error.prototype.throw')::(anything) is nicer :-p
06:45
<snek>
we even have the machinery in the spec to do that, its very simple
06:45
<ljharb>
no it can't, because of some principle about how functions can't behave differently based on where you call them. that was a hard blocker.
06:46
<nicolo-ribaudo>
then you can't throw a non-error that way, it'd have to be static
We can put it on Object.prototype and it works almost everywhere :)
06:46
<snek>
what does behave differently mean
06:46
<ljharb>
not on null objects :-p
06:46
<snek>
from my perspective it behaves the same
06:46
<ljharb>
it means the function can't know from where it was called. and dynamic import resolves differently based on where it was called
06:46
<nicolo-ribaudo>
The official name is "no dynamic scoping"
06:47
<ljharb>
bare specifiers in node can resolve to different things based on position in node_modules; relative URLs based on the current URL, etc
06:47
<Bradford Smith>
And (continuation) replace the production ConditionalExpression ::= ShortCircuitexpression with ConditionalExpression ::= ThrowExpression instead
06:48
<Bradford Smith>
I believe my suggestion prohibits the assignment expressions as is desired Nevermind - it's been too long since I looked at the grammar carefully.
06:48
<Bradford Smith>
without lookahead
06:48
<ljharb>
rbuckton: how dare you presume that arbitrary percentages people say in plenary have data to back them up
06:49
<nicolo-ribaudo>
Imagine the day we'll see a 99.9% percentage backed by data
06:56
<eemeli>
Rob Palmer: I hope we'll still have time for incubation calls?
06:57
<Michael Ficarra>
we also need to find out about 2024 meeting schedule Rob Palmer
06:57
<ljharb>
the first two 2024 meetings are on the agenda already
06:59
<Michael Ficarra>
I only see Jan?
06:59
<rbuckton>
I may have missed it. Did anyone suggest that throw should have approximately the same precedence as yield? You would just define the rule so that its production is
ThrowExpression ::= throw ShortCircuitExpression
throw with the precedence of yield would require parenthesis in pretty much all cases where it would be used.
06:59
<ljharb>
oh right sorry, just the first one, my bad
07:00
<nicolo-ribaudo>
throw with the precedence of yield would require parenthesis in pretty much all cases where it would be used.
With the additional drawback that that would be forever
07:00
<rbuckton>
correct.
07:00
<bakkot>
then you can't throw a non-error that way, it'd have to be static
I don't like the getter option but I am ok with saying you can't use this feature to throw a non-error
07:00
<bakkot>
you can still do that in other ways but we don't have to make it easier for you
07:00
<ljharb>
the same's true for throw expressions themselves, you can already (function () { throw e }()) :-p
07:01
<Michael Ficarra>
in hindsight, it seems like a lot of work to go through to avoid a couple extra tokens
07:01
<bakkot>
the same's true for throw expressions themselves, you can already (function () { throw e }()) :-p
the point of throw expressions is to make it easier to throw errors; that it also lets you throw non-errors is incidental
07:01
<rbuckton>
I would place my preference for not requiring parens around throw expressions at at least the same level that @bakkot has placed his concern about reader confusion compared to ThrowStatement.
07:01
<ljharb>
(() => { throw e })() is shorter i think
07:02
<Michael Ficarra>
same number of tokens?
07:03
<nicolo-ribaudo>
(_ => { throw e })()
07:03
<bakkot>
I would place my preference for not requiring parens around throw expressions at at least the same level that @bakkot has placed his concern about reader confusion compared to ThrowStatement.
my concern about , is held fairly strongly but my concern about 0, throw a ? b : c not throwing a is even stronger, to be clear
07:03
<bakkot>
that just can't throw a
07:03
<bakkot>
it can't
07:04
<nicolo-ribaudo>
that just can't throw a
(+ only to that specific part :) )
07:04
<Michael Ficarra>
rbuckton: add me as reviewer for throw expressions, I have some ideas on the specifics for how we accomplish alternative 2
07:04
<Bradford Smith>
How does one now get on the list to be invited to an incubator call?
07:04
<Bradford Smith>
Shu's old repo isn't used anymore, right?
07:05
<Michael Ficarra>
uhh yeah I think that's the place
07:05
<rbuckton>
rbuckton: add me as reviewer for throw expressions, I have some ideas on the specifics for how we accomplish alternative 2
I'd appreciate it, though I believe alternative 2 is the (almost) worst case.
07:05
<Chris de Almeida>
it should be used
07:05
<Michael Ficarra>
Bradford Smith: https://github.com/tc39/incubator-agendas
07:05
<Bradford Smith>
ok, I just thought since shu isn't doing anymore...
07:05
<Michael Ficarra>
I'd appreciate it, though I believe alternative 2 is the (almost) worst case.
sounds like the best tractable case though
07:06
<Bradford Smith>
it would have moved to the tc39 team area
07:06
<Chris de Almeida>
it would have moved to the tc39 team area
indeed it is
07:06
<Chris de Almeida>
unless I'm missing something?
07:06
<Bradford Smith>
I see, the label on my bookmark is wrong
07:10
<rbuckton>
Well, I got my hopes up in July that the trailing infix punctuator ban would be sufficient. I should have tempered my expectations a bit.
07:10
<Bradford Smith>
I guess I'll have to leave myself a reminder to check back on the incubator-agendas repo next week, once folks have had a chance to add issues representing their calls?
07:11
<Chris de Almeida>
I guess I'll have to leave myself a reminder to check back on the incubator-agendas repo next week, once folks have had a chance to add issues representing their calls?
or a reminder to prod the folks to add issues representing their calls πŸ™‚
07:12
<rbuckton>
sounds like the best tractable case though
Waldemar's comments seemed to indicate otherwise.
07:13
<rbuckton>
But I'd appreciate any suggestions you have.
07:16
<bakkot>
waldemar did not like that alternative but I was hoping he would be willing to accept it as a compromise position
07:16
<bakkot>
we ran out of time to discuss it before I got clarity on that though
08:33
<bakkot>
wrt the negated-in proposal, I see Luca Casonato has gotten prettier updated https://github.com/prettier/prettier/pull/15468