00:00
<waldemar>
I just stated the reason. The definition of "informative" is any text that can be removed without affecting the normative parts of the spec.
00:00
<waldemar>
An assert doesn't fall into that category if it can make a spec normatively inconsistent.
00:00
<bakkot>
Informative text being incorrect seems like it definitionally means the spec is inconsistent.
00:00
<shu>
and assert failure does not make the spec normatively incorrect, it makes it incoherent. incorrect/correct as a category doesn't even arise because it's malformed
00:01
<littledan>
this was very fast advancement for such a significant proposal
00:01
<rbuckton>
An Assertion is a statement that the asserted condition is the only possible state based on how the algorithm is used elsewhere in the specification. It is essentially informative because its absence would have no impact on the spec itself, so long as the spec is coherent.
00:01
<littledan>
(I think that's a good thing -- we're able to act efficiently when it's a good idea)
00:01
<waldemar>
Incorrect = malformed in my comment above.
00:01
<shu>
i see, well, its removal still doesn't affect the malformedness
00:01
<shu>
the spec remains malformed if the only removal is the assert
00:02
<waldemar>
Yes, it does, because the spec might become well-formed with removal of asserts.
00:02
<littledan>
interestingly, the C++ standards committee is currently working through a similar epistemological debate, but at the level of contracts in source code -- should they execute? I heard they decided that the mode is determined by compiler flags (...a very different language philosophy from ours)
00:03
<James M Snell>
excited to see immutable arraybuffers advancing. There are definitely a number of web API specs that will need to be updated to account for them. I mentioned Web Crypto crypto.randomValues() but BYOB ReadableStream is the other big one. That will need to be updated to reject immutable buffers on reader.read(buf).
00:03
<canadahonk>
I plan to use compiler flags for whether to include spec asserts or not (I have none currently)
00:04
<James M Snell>
TextEncode encodeInto is another
00:05
<shu>
i guess the nuance here is the assert tells a story about the intended property of the spec. if it doesn't hold, we say the spec is malformed in the sense that the intention doesn't hold. it could be brought back into well-formedness by changing the intent (which is necessarily not reflectable within the text, only tacit). more often, we don't change the intention, and it turns out there is a bug in the spec
00:06
<bakkot>
those fall out to SetValueInBuffer, so probably the fix is to update WebIDL to do something else? or make SetValueInBuffer fallible, though that would be a shame
00:06
<bakkot>
https://webidl.spec.whatwg.org/#arraybuffer-write is the relevant thing I think
00:06
<bakkot>
but we definitely need tests as well
00:06
<littledan>
I hope web integration can look into where immutable arraybuffers can be a benefit in some cases, e.g., by avoiding certain cloning when used.
00:07
<shu>
yes, WebIDL is good to call out to see how they want to go
00:07
<shu>
maybe they want an attribute to require buffer sources to be immutable
00:07
<bakkot>
also there are places which take a buffer as an argument and they do a defensive copy
00:07
<bakkot>
and should be updated to not do that
00:08
<shu>
though that's... mostly fine
00:08
<shu>
you can just as-if that away
00:08
<snek>
if an immutable arraybuffer can't be detached, copying it can just be implemented as not-copying it
00:08
<TabAtkins>
Like I said, Python gets by without this happening explicitly, because it has *args and **kwargs, and it's common practice for decorators to make the wrapper function they return take (*args, **kwargs) and then call the inner function with the same. That preserves passed function names, without needing the runtime to actually track function names across decorator boundaries. We'd need to add the same to JS, I think, to do named args.
00:09
<littledan>
yes, I think this is important. Even if it's formally just an editorial change, calling out in various specs where they can avoid work in the case of immutable ArrayBuffers makes it more likely that browsers will implement the optimization.
00:09
<bakkot>
I think probably this consists of finding the places which refer to https://webidl.spec.whatwg.org/#dfn-get-buffer-source-copy and updating them
00:09
<rbuckton>
Python also has explicit syntax in the parameter list to denote named vs positional arguments
00:09
<shu>
also agreed there. the amount of as-if optimizations happening on the web spec side is surprisingly little, compared to JS algorithms
00:09
<littledan>
right, people are more likely to implement line-by-line there
00:10
<TabAtkins>
only recently (by default, all args are passable by both index and name), and that doesn't affect the pattern I mentioned anyway
00:10
<TabAtkins>
(but I do think we could apply Python's lessons and go ahead and add "index only" and "name only" arglist section, like they do)
00:10
<kriskowal>
As much as I love this feature of Python when writing Python, I think I would prefer to maintain JavaScript’s rustic aesthetic, rather than rewalk the path to realizing Python needed a delimiter between positional arguments and positional arguments that are eligible to be interpreted as kwargs.
00:11
<TabAtkins>
sure, JS having just index-only and name-only is a potential future I think woudl be okay, and means there would be a syntax opt-in for named args so minifiers wouldn't need to change by default
00:12
<TabAtkins>
(you'd have to write function foo(posarg, **, kwarg1, kwarg2))
00:12
<TabAtkins>
or similar
00:13
<kriskowal>
I find it clearer to continue function foo(posarg, {kwarg1, kwarg2} = {}).
00:14
<kriskowal>
Given the degree of difference in practice.
00:14
<TabAtkins>
and that's the exact argument that's blocked it in the past ^_^
00:16
<littledan>
it's kind of annoying that keyword arguments have to take place at a particular indexed position... makes it harder to add positional arguments over time, but maybe that's OK.
00:16
<littledan>
but I'm not sure whether it'd be worth it to introduce a whole other named argument system
00:17
<littledan>
just seems like a lot of work
00:17
<Jesse (TC39 🇺🇸)>
function foo(posarg1 ;{kwarg1, kwarg2} = {} ;posarg2)
00:17
<TabAtkins>
as has been stated, the lack of named arguments is a minor blocker in a number of dimensions, but it's only a very minor improvement in the base case, so it's harder to argue for since the extra stuff can be dismissed more easily.
00:19
<Erik Marks>
This is a conspiracy by Big ESLint to add more rules to ESLint
00:20
<ljharb>
hey who told you about big eslint
00:21
<Jesse (TC39 🇺🇸)>
for fans only: look again at those semicolons
00:21
<bakkot>
fun fact for is a valid function name
00:21
<bakkot>
function for(x; y=y+1; z) {}
00:22
<nicolo-ribaudo>
Which JavaScript are you talking about
00:22
<bakkot>
jesse's thing above
00:22
<bakkot>
the function foo(posarg1 ;{kwarg1, kwarg2} = {} ;posarg2) one
00:23
<ljharb>
const f = { for() {} }['for']; :-P but function for() {} is a syntax error
00:23
<snek>
wrong javascript
00:23
<bakkot>
ugh
00:23
<bakkot>
yeah it needs to be a method not a declaration
00:23
<Ashley Claymore>
for(of of of);
00:23
<bakkot>
I always get that wrong
00:24
<snek>
this is one thing that really bothers me about rust, let me name fields if and return and such
00:24
<bakkot>
class X {
  for(x; y=y+1; z) {}
}
00:24
<snek>
not being able to have a field named type is enormously annoying. everyone uses typ or r#type
00:25
<bakkot>
I think that sailed once await became an operator which is indistinguishable from property access
00:25
<snek>
i love it and i hate it
00:26
<Richard Gibson>
feedback welcome: https://github.com/tc39/proposal-immutable-arraybuffer/pull/44
00:26
<bakkot>
it's grown on me
00:32
<bakkot>
waldemar re: "ToString is not unique" the spec does allow the last digit to vary, but I'm not sure if any implementations actually differ
00:32
<bakkot>
I think we might be able to fully specify it and thereby resolve that specific issue
00:33
<shu>
is the goal here round-tripping a string representation? and the thing that's stopping people from relying on that is because we have some leeway technically?
00:34
<snek>
it sounds like the goal is "can this string be represented as a number" but semantic misunderstanding or disagreement about what "can be represented" means
00:34
<waldemar>
The problem here is that it's impossible to define a Number-to-String conversion such that the resulting string satisfies isSafeNumeric
00:34
<shu>
yeah, if the "can this be represented" means mathematical value that is... not useful
00:35
<Michael Ficarra>
oh I remember what I wanted to say: it seems inconsistent to say that larger integral values are not "safe" for this purpose
00:35
<Michael Ficarra>
doesn't make any sense
00:36
<littledan>
these sound like reasons to iterate on the definition (significantly) and maybe add a number-to-string-safe operation, but it feels like the stated motivations hold
00:36
<bakkot>
Is it? I think if our ToString fully specified the last digit it would work. The spec previously had a bad definition of isSafeNumeric but under the MV(string) = MV(ToString(ToNumber(string)) I think it's coherent? Or at least the obvious examples like 0.1 don't fail.
00:37
<Michael Ficarra>
it sounds like the goal is "can this string be represented as a number" but semantic misunderstanding or disagreement about what "can be represented" means
yeah I think a lot of lay-people think "can be represented" means "the float represents this number only", which... just isn't the case
00:37
<bakkot>
It is very specific to our specific ToString but afaict that's what they're asking for
00:37
<littledan>
oh! yes, that didn't occur to me
00:38
<waldemar>
The definition of MAX_SAFE_INTEGER is that it's the largest Number x such that x+1 is representable exactly. But Number("0.00000000000000000000000000000025") + 1 is 1, while "0.00000000000000000000000000000025" is considered "safe" by this.
00:38
<Michael Ficarra>
these sound like reasons to iterate on the definition (significantly) and maybe add a number-to-string-safe operation, but it feels like the stated motivations hold
I think the motivations are so confused, it's hard to say whether they hold or not
00:38
<littledan>
well, I wonder what we should do about the problem space (floats are confusing with respect to value-preserving conversion to/from string)
00:39
<kriskowal>
I would want this problem to be solved with a bank of functions that apply to specific number domains, e.g., String.representsSafeInteger, String.representsSafeNumber, String.representsSafeBigInt, which is less forgiving that the corresponding constructor or parse functions.
00:39
<Michael Ficarra>
well, I wonder what we should do about the problem space (floats are confusing with respect to value-preserving conversion to/from string)
there's probably interesting things to think about here, but I don't yet see a specific problem being identified
00:39
<bakkot>
oh, yes, I think that conflating this with MAX_SAFE_INTEGER is just incoherent and that part of the proposal should be removed
00:39
<waldemar>
An example that fails: 10000000000000000 cannot be converted to any string for which isSafeNumeric, as defined in the presentation, returns true.
00:39
<littledan>
programmers definitely don't tend to think about floats as a range of underlying reals, even if that's the most sensible way to understand them. The MV tends to correspond more closely to the intuition, I think
00:39
<bakkot>
at least as I understand the proposal it is strictly about round-tripping values, not about doing arithmetic on them
00:40
<ljharb>
+String(10000000000000000) === 10000000000000000 is true, am i missing some zeroes?
00:41
<ljharb>
i 100% agree that most programmers think about numerical syntax as if they're mathematical values
00:41
<rbuckton>
string === ToString(ToNumber(string)) isn't the same as MV(string) === MV(ToString(ToNumber(string))) given that MV("1.0") and MV("1.00") are the same mathematical values but different strings?
00:41
<bakkot>
10000000000000000 > Number.MAX_SAFE_INTEGER
00:41
<ljharb>
aha, that's a fair point, decimal/trailing zero normalization, as well as leading zeroes, would be different
00:41
<ljharb>
is that the problem statement here, dealing with those kinds of things?
00:41
<rbuckton>
I think the MV is to handle that normalization.
00:42
<snek>
this is likely why they reached for MV, but MV is not exactly that
00:43
<rbuckton>
I assume the goal of isSafeNumeric is to validate that the input string can be accurately represented as a Number without loss? It can probably be specified more directly.
00:43
<Richard Gibson>
I feel like this is missing a problem statement that differentiates it from https://xkcd.com/927/
00:43
<shu>
we're debating what the champion considers "without loss"
00:43
<waldemar>
When printing a Number into a string that satisfies isSafeNumeric you also have the issue of what to print for things like 1e40 or 1e-30, since this thing rejects exponential notation.
00:44
<shu>
because as strictly read, 0.1 fails (as do 0.2, 0.3 etc)
00:44
<bakkot>
no longer true
00:44
<Jesse (TC39 🇺🇸)>
I wonder if the use cases for this proposal are basically covered by decimal, in that one would just use decimals rather than numbers, but guarded (possibly many times) with Number.isSafeNumeric
00:44
<bakkot>
that was true but they fixed it
00:44
<shu>
oh how did they fix it?
00:44
<bakkot>
it's the thing on the screen
00:44
<Michael Ficarra>
see the current slide
00:44
<bakkot>
MV(string) = MV(ToString(ToNumber(string))
00:44
<shu>
ah
00:44
<bakkot>
that passes for the string "0.1"
00:45
<shu>
yeah then i'm back to jordan's question
00:45
<Michael Ficarra>
I just don't see what passing that is useful for
00:45
<shu>
why not do the string roundtripping...?
00:46
<bakkot>
well, consider the input string ".00000000000000000000001"
00:46
<canadahonk>
import attributes has been merged into the spec 🎉 (https://github.com/tc39/ecma262/pull/3057)
00:47
<snek>
its really hard to propose any particular behavior without understanding the intention more
00:47
<ljharb>
~true, if you accept inconsistently formatted strings as input, then doing the normalization yourself is hard~ oh you weren't talking about the leading zero, nvm
00:47
<bakkot>
".00000000000000000000001" toStrings to 1e-23 so it does not satisfy string === ToString(ToNumber(string)
00:48
<shu>
i see, thanks
00:49
<bakkot>
that said if you reject "1e-23" as input I'm not sure how you're supposed to produce values which are accepted by this
00:49
<bakkot>
I guess toFixed?
00:49
<Michael Ficarra>
import attributes has been merged into the spec 🎉 (https://github.com/tc39/ecma262/pull/3057)
JSON modules incoming
00:49
<bakkot>
though it's hard to know how many digits to use
00:49
<shu>
so the thing i heard was an app would choose to represent input as a double, or to use a userland library. that seems kinda wild to me
00:50
<shu>
to choose representation at runtime like that, given floating point arithmetic
00:53
<shu>
i... don't know how to disentangle that problem statement from "i wish we didn't have floats"
00:53
<rbuckton>
Michael Ficarra: Not when validating input
00:54
<Chris de Almeida>
did Michael Ficarra press the forbidden button?
00:54
<Michael Saboff>
He jumped ahead, is that what the forbidden button does?
00:55
<Chris de Almeida>
I'm done speaking is the forbidden button. otherwise I don't know how the queue jumped
00:55
<Michael Ficarra>
I think he means as if you did the maths on reals
00:56
<Michael Saboff>
Chris de Almeida: Note that I don’t have the forbidden button on my TCQ page.
00:56
<snek>
possible tg5 topic: understanding how ieee754 works
00:56
<Chris de Almeida>
you do if you're currently the one on the queue
00:57
<Chris de Almeida>
meaning Speaking
00:57
<Michael Saboff>
you do if you're currently the one on the queue
Should I press it 😏
00:57
<Erik Marks>
Why is the button forbidden?
00:57
<rbuckton>
Slide 4 seems like the clearest example to me. 0.1234567890123456789 cannot be accurately represented in Number as it truncates to 0.123456789012345678. Similarly, 9007199254740993 cannot be represented.
00:57
<Michael Ficarra>
I'm about to adblock the button
00:58
<shu>
rbuckton: suppose you can accurately represent something. what do you do with that number then?
00:58
<Michael Ficarra>
assuming Chrome still permits me to do that
00:58
<shu>
or i suppose, what do you do with that string
00:58
<nicolo-ribaudo>
There is a race condition between you pressing it and the chairs pressing it for you. If the speed at which the chair's neurons signal to stop pressing travels from their eyes to their brain is slower than the hand movement, they are going to press it for the person after
00:58
<Michael Ficarra>
Slide 4 seems like the clearest example to me. 0.1234567890123456789 cannot be accurately represented in Number as it truncates to 0.123456789012345678. Similarly, 9007199254740993 cannot be represented.
see snek's comment above about what "can be represented" means
00:58
<rbuckton>
For me, if it can be accurately represented, the function returns true. If it can't you inform the user (hence the use case for input validation)
00:59
<shu>
if it returns true, what do you do with the input?
01:00
<rbuckton>
A better approach, were we to keep the button, would be to just notify the chair that the user is finished.
01:00
<littledan>
Should we do breakout sessions at the end of the meeting? https://github.com/tc39/Reflector/issues/552
01:00
<shu>
would it be possible to have AV support for each breakout session for remote attendees?
01:00
<rbuckton>
You use it? Beyond validating the input, its up to the developer to determine if it can then be safely used with other mathematical operations.
01:01
<littledan>
Yeah, we should be able to do that
01:01
<shu>
i am highly skeptical of that claim
01:01
<littledan>
but we'd probably keep note-taking informal
01:03
<rbuckton>
It can be used for relational comparison at the least, and serialized via JSON.
01:03
<Jesse (TC39 🇺🇸)>
I think the challenge is that you're stuck in the binary64 world; stuck in that world, things are safe and if you say things aren't safe, you have no recourse to a safe alternative
01:04
<Andreu Botella>
please everyone take a look at the transcription if you have time
01:04
<Andreu Botella>
at some points I was the only one helping with the notes, and I definitely missed a lot of stuff at various points
01:06
<Ashley Claymore>
thanks Andreu Botella !
01:07
<Chris de Almeida>
thank you for your help! if you ever find that we are not keeping up with the notes properly, please raise a Point of Order, so we can pause to rectify 🙏
01:21
<Chris de Almeida>
many thanks to our note takers today 👏👏👏👏👏👏 Andreu Botella Daniel Ehrenberg Jesse Alama Linus Groh Oliver Medhurst Shane Carr
06:17
<bakkot>
littledan or whoever else is interested: here's my doc for avoiding allocations in engines for the iterator protocol https://docs.google.com/document/d/1M5S-u3N3vQkVBGFCoaYt_ABPGl0EW16QQrvDBaY2FiE/edit?tab=t.0
08:55
<eemeli>

I missed the isSafeNumeric discussion due to being asleep at the time. If it gets a continuation, it'd be nice if it was earlier rather than later, but that's of course unlikely (mini-rant: For the last few years 4/6 TC39 meetings have been on North American timezones, with 2/6 on Pacific Time. This is not friendly to remote-participation from Europe. It'd be a little bit friendlier if at least the remote PDT meeting was moved to EDT or even further East).

So posting the comments here that I'd have mentioned out loud had I been there:

  • I'm generally positive on enabling a developer to verify that WYSIWYG applies to their numeric string.
  • I'm not sure that "safe" is the right word here, though we do already have Number.isSafeInteger. I was thinking that "precise" or "canonical" could be more apt. The attachment point could also be different, as all of the pre-existing Number.is* functions require their input to be a number.
  • This seems to correlate very highly with the goals of Decimal, which, if accepted, would also expand the set of strings for which JS can provide a "safe" numerical representation. That proposal is specifically looking to improve the representation of values coming from the real world or elsewhere, which seems like the same domain as this.
09:04
<rkirsling>
interesting. if it's not good for Europe then it'd literally only work for the Americas (...though I think you just mean that the last couple hours don't work, which is much better than the entire meeting not working)
09:44
<eemeli>

I'm on Eastern European Time, and this week's meetings start at 20:00 and end at 03:00 for me. I'm used to having plenty of calls with folks on Pacific Time, but those are all scheduled for the morning there; TC39 calls take up the whole day. Comparatively, a meeting on US Eastern Time ends at my midnight, which is still bad but not as horrible.

I do understand the benefits of running the meetings at different times, and the ones in Europe or Asia are about as much fun for North American participants, but it's the regularity of having all of the virtual meetings on North American timezones and having one of them on Pacific Time that seems a bit extra.

15:08
<mgaudet>
(Sorry for late reply just finally getting through backchannel) Sadly, no. In principle I wish they were, but public front end for this has yet to be resourced. We do have -much- public telemetry data (https://glam.telemetry.mozilla.org), but Use Counters specifically don't have a public front end (and I currently have to make my own dashboard for every use counter probe).
16:39
<Michael Ficarra>
you know, one way we might be able to resolve the "safe numeric string" proposal is for the champion to give us a large list of sample strings and whether they are "safe" and we work backwards from there to try to figure out what they mean
16:42
<Chris de Almeida>
ZiJian Liu: ☝️
17:59
<littledan>
Please nominate breakout session topics here: https://github.com/tc39/Reflector/issues/552
18:06
<bakkot>
it feels somewhat odd to use decimal numbers with imperial units
18:06
<bakkot>
no one says "1.375 inches", it's always "1 3/8 inches"
18:07
<nicolo-ribaudo>
Are those fractions always with a power of 2 as the denominator?
18:07
<snek>
no, they switch to thousandths
18:08
<littledan>
and sometimes they are thirds!
18:09
<snek>
i'm a huge fan of unit apis. durations and sizes especially in computers.
18:09
<bakkot>
usually powers of 2 though
18:09
<bakkot>
thousandths are mostly only used by machinists
18:09
<Chris de Almeida>
*machinidths
18:09
<ljharb>
i've seen thirds for volumes (like ⅓ cup, etc), but usually for lengths i think i only really see powers of 2
18:09
<bakkot>
a thousandth of an inch is pronounced a "thou" and is arguably its own unit
18:09
<snek>
i mean no one uses 128ths of inches
18:14
<canadahonk>
whoever else is doing notes y'all are killing it ❤️
18:14
<Michael Ficarra>
thousandths are mostly only used by machinists
not just used by machinists but also those who employ them, writing specs and tolerances for parts/materials
18:15
<littledan>
yeah the captioners this meeting are amazing
18:15
<Michael Saboff>
I have woodworking tools that are capable of 1/128” adjustments.
18:16
<Michael Saboff>
And I have used that precision.
18:17
<Rob Palmer>

For folk wanting to attend the SeattleJS Community event in-person on Thursday evening, please respond to this poll about the NDA requirement.
❄️

I need to provide the count and names of delegates by midday today in order to stand a chance of getting an exemption.

18:19
<Michael Saboff>
For some specialties, they’d say 20 thousandths.
18:21
<Michael Ficarra>
Measure seems more appropriate for 402
18:21
<littledan>
I wouldn't be opposed to this, but worth considering why Temporal should be in 262 and Measure in 402
18:23
<snek>
...i thought temporal was in 402
18:23
<shu>
what are the applications and developers who want to use measure?
18:24
<Michael Ficarra>
...i thought temporal was in 402
Temporal is in a proposal
18:24
<snek>
yeah i mean a proposal for 402
18:24
<littledan>
it's been proposed for addition to 262. The editors should say something if they want it to land in 402 instead...
18:24
<canadahonk>
i thought it was split between basically what needs/doesn't need CLDR
18:24
<Duncan MacGregor>
Think I’ll need to catch up on this committee meeting tomorrow via the notes. Trying to attend remotely in a different time zone is just too tiring after a full day of work.
18:24
<shu>
it's kinda split, some data-dependent stuff are in 402. bulk of it is in 262
18:25
<canadahonk>
at least with test262 there is a load of tests not in 402
18:25
<snek>
idk if this matches with what the presenters want but personally i'd love stuff like Measure("hours", 2).into("milliseconds") for passing to timers, or Measure("megabytes", 3).into("bytes") for allocating buffers. stuff like that, pretty much always as program constants.
18:25
<shu>
why do you think that should be in the language?
18:26
<bakkot>
time and bytes come up a lot
18:26
<bakkot>
meters rather less so
18:26
<Michael Ficarra>
why do you think that should be in the language?
it's a common need
18:26
<bakkot>
(also Temporal durations already do the time part of this)
18:26
<shu>
having constant number of bytes is a common need, having a general measure isn't is my hunch
18:27
<snek>
yeah i mean i'd be fine with Duration and Size classes rather than a generalized Measure thing. i'm not against Measure though, especially if there's some sort of cldr-ish data to feed in it i think its generally nice.
18:28
<ljharb>
would Measure be significantly more complex to spec or implement than Duration + Size?
18:28
<snek>
whether 'generally nice' meets everyone's bar for new apis is 🤷
18:28
<Michael Ficarra>
yeah unifying it is a nice way to organise things to allow for further expansion
18:29
<shu>
and what about units that JS apps are more likely to want to manipulate that are not physical units?
18:29
<nicolo-ribaudo>
I believe wether Measure supports custom units or not is an open question, so the answer to "what about that" is "well we could support it"
18:29
<Michael Ficarra>
I think rates are another common one: bytes/time or count/time
18:30
<shu>
what i mean is, those seem to be more useful units for the domain than grams and inches
18:30
<bakkot>
shu I feel like these would be reasonable things to put on the queue
18:30
<Chris de Almeida>
#tc39-decimal:matrix.org
18:36
<Chris de Almeida>
gentle reminder to please not use the I'm done speaking button in TCQ
18:40
<nicolo-ribaudo>
Chris de Almeida Could you push my queue item to the bottom? Ideally to 5 mins before the end
18:41
<Richard Gibson>
cf. CLDR unitConstants and convertUnits
18:43
<snek>
<convertUnit source='pinch' baseUnit='cubic-meter' factor='gal_to_m3/128*128' systems="ussystem"/>
18:44
<nicolo-ribaudo>
What operations precedence to they use there
18:48
<kriskowal>
The Measure/Amount presentation zooms out far enough that I can imagine that new Amount("1/3", "cup") is in the picture, assuming Amount is a generically typed tuple of magnitude, unit, and precision, where Amount does not imply any arithmetic, unit conversion, currency conversion, propagation of precision, or even interpretation of the composite types.
18:48
<canadahonk>
not point of order but could someone else help with notes please :)
18:48
<Chengzhong Wu>
i can help
18:49
<canadahonk>
(fine now, thanks all)
18:55
<nicolo-ribaudo>
snek Remember that for Duration we have temporal, we would probably not support time units in Measure
18:56
<kriskowal>
That suggests Measure would not support Currency if there were Currency.
18:56
<kriskowal>
And I think that’d be sensible.
18:56
<snek>
yeah i guess. it could also just be defined in terms of temporal.duration for duration units.
18:57
<snek>
i don't feel super strongly about it other than just having these things exist in some form
18:57
<kriskowal>
That is “Conversion” doesn’t mean the same thing for Measures (including Duration) and Currencies.
18:57
<shu>
yeah we can't do currencies
18:57
<shu>
err, currency conversions
18:57
<bakkot>
I am struggling to think of times when you actually need units other than time and bytes in JS applications
18:58
<bakkot>
except obviously in specific applications like a recipe site or a house planner
18:58
<bakkot>
which, those feel like they are adequately met by a library
18:58
<ljharb>
the girl scout cookie inventory system site has "cases" and "packages", but that's specific, as you said
18:58
<snek>
yeah time & bytes are the only two things i use
18:59
<Erik Marks>
Has there been a proposal for something like Currency?
18:59
<shu>
right, to complete my thought: if the answer to my question of "what about these other common units that JS apps actually use, like bytes and px and whatever" is "userland code, custom units", my response to that is "then use a userland library"?
18:59
<snek>
what does Currency do? does it have more stuff than just being a decimal type?
18:59
<bakkot>
ties a currency to a number
18:59
<littledan>
I think a lot of the time, the units are just kept implicit, people use bare numbers, and there are bugs when units are accidentally confused/mixed. But I'm not sure what would lead to a design of Measure that would ensure actual uptake to avoid those bugs.
18:59
<ljharb>
there is something to be said for having a standard object type that can hold a value and an arbitrary unit, so those libraries can interop more cleanly
19:00
<shu>
i understand that in the abstract, which is why i want to see what people do today
19:00
<littledan>
in some way, this is analogous to how the most popular representation of decimal is strings, not any of the decimal libraries.
19:00
<snek>
i think at the very least ones like time, bytes, pixels have some motivation from being units that js/dom have standard library features using
19:01
<shu>
i agree, which is why if we have a concept of built-in units, i'd care more about those being present than grams and inches
19:01
<shu>
but it seemed like the champions weren't so interested in that
19:02
<littledan>
well, the idea is, units are arbitrary, un-interpreted strings; unit conversions may be better as a separate thing, as Eemeli proposed
19:02
<bakkot>
if I am correct that people mostly only need these when building a specific application like a recipe site, then I don't think you are likely to need interop between libraries
19:02
<snek>
yeah i think i can agree with that (to shu)
19:02
<James M Snell>
well, I think this discussion is motivation for limiting the unit that are baked into the language and possibly motivating a mechanism for allowing users to specify their own unit definitions.
19:03
<James M Snell>
const myUnit = new Unit({ ...});
const measure = new Measure(1.234, { unit: myUnit });
19:04
<kriskowal>
shu: The Amount type for currencies at Agoric is a tuple of a “brand” for the currency and a value that can be a bigint, or even an array of serial numbers. We pair Amounts with a corresponding AmountMath. Amounts are very domain-specific.
19:07
<nicolo-ribaudo>
Those that mentioned weaker parts of the space carrying other parts (e.g. Michael Ficarra, but also others with similar words), what do you mean by "weak part" and "strong part"? The answer doesn't seem to be consistent across the committee
19:08
<waldemar>
cf.format(1e12) is '1M'?
19:09
<canadahonk>
fyi taking break from notes but I think others are already helping \o/
19:10
<Michael Ficarra>
Those that mentioned weaker parts of the space carrying other parts (e.g. Michael Ficarra, but also others with similar words), what do you mean by "weak part" and "strong part"? The answer doesn't seem to be consistent across the committee
like which parts do I feel are weak vs strong, or what do those words mean?
19:10
<nicolo-ribaudo>
Yeah
19:10
<Michael Ficarra>
uhh that was an either-or question @nicolo-ribaudo
19:11
<nicolo-ribaudo>
Ohh I thought you were asking what else would my words mean 😛
Which parts are weak and which are strong
19:11
<Michael Ficarra>
I don't have an opinion on which parts are weak and which are strong, just that I don't want the strong one carrying the weak one
19:15
<justingrant>
FYI, for duration, the format used in Temporal.Duration.p.toString is the same format proposed by eemeli 's stable formatting proposal. This is probably assumed by everyone, but wasn't mentioned in the presentation so figured I'd note it here.
19:16
<Michael Ficarra>
why are we not stopping the meeting for the PoO?
19:16
<nicolo-ribaudo>
Chris de Almeida I'll help with notes
19:19
<littledan>
I'd encourage people to yell out such points of order for help with notes
19:22
<snek>
why would it use "null" instead of "zxx" if its called "zxx" elsewhere
19:22
<snek>
(i ask this not knowing much about these apis in general)
19:23
<canadahonk>
add to tcq? seems fair to me but also don't know much
19:23
<nicolo-ribaudo>
Justin added it to TCQ
19:29
<TabAtkins>
in some way, this is analogous to how the most popular representation of decimal is strings, not any of the decimal libraries.
I think there's a strong argument to be made that this is due to strings being built in and those libraries not being. When math is needed on this decimal strings, the most popular behavior is also to just do a float parse and perform the bath with ordinary Number, which is terrible, but it's there and the library isn't.
19:29
<James M Snell>
Using "null" feels just slightly off given the prevalence of null returns in web apis. I'd generally prefer the use of zxx
19:29
<TabAtkins>
And both of these work reasonably well *often enough* that the pressure to use a library is light
19:29
<littledan>
exactly. For the same reason, having Measure will encourage more usage of it. (But it's true, Decimal libraries seem to be more popular already than Measure ones)
19:30
<snek>
did someone clarify the reasoning for this
19:30
<littledan>
I imagine this might be because it's sort of a layering violation for us to define something in the locale space
19:31
<canadahonk>
my other guess is maybe webcompat where zxx already behaves some way but null previously threw?
19:31
<snek>

zxx - non linguistic content, such as onomatopoeia (animal sounds)

19:31
<snek>
i guess zxx is overloaded
19:32
<James M Snell>
I can just imagine some weird intesectional edge case where someone accidentally ends up passing null because that's what another api returned and that's coerced into 'null' when that was not the intention. Not a blocking case but a possible quirk of the approach
19:34
<littledan>
that's a very funny description -- spelled-out animal sounds are clearly localized :)
19:36
<Michael Ficarra>
that's a very funny description -- spelled-out animal sounds are clearly localized :)
I bet a lot of people without much exposure to other cultures believe this though
19:36
<James M Snell>
that is until they visit france and the dogs start saying ouaf ouaf!
19:36
<Michael Ficarra>
in the same way lot of people think "there's exactly X continents" is a universal truth
19:41
<nicolo-ribaudo>
Waldemar already asked, but is it correct that cf.format(1e12) returns 1M?
19:42
<blickly>
Waldemar already asked, but is it correct that cf.format(1e12) returns 1M?
eemeli: no, it returns 1T
19:43
<Jesse (TC39 🇺🇸)>
hmm, I get "1,000,000,000,000"
19:43
<nicolo-ribaudo>
Richard Gibson: fyi, your mic volume is very low
19:44
<Jesse (TC39 🇺🇸)>
(oops, forgot the "compact" bit sorry)
20:03
<eemeli>
Yeah, sorry, that was a typo.
21:13
<ljharb>
so who makes the benchmarks, or decides which ones matter?
21:13
<littledan>
https://github.com/WebKit/Speedometer/blob/main/Governance.md
21:14
<Justin Ridgewell>
Is the main point of contention here whether this needs to be a getter/data prop?
21:15
<Justin Ridgewell>
Or is it because anything was added to a TC39 owned class?
21:15
<Justin Ridgewell>
Isn't this the same as one of the browsers adding a new API?
21:16
<ljharb>
adding a new API outside a standards process, yes
21:16
<ljharb>
in all such cases it's helpful to get broader input as early in the process as possible
21:17
<Justin Ridgewell>
But they add new APIs to the global all the time.
21:17
<ljharb>
new non-standard ones, all the time?
21:17
<Justin Ridgewell>
Not standardized here.
21:17
<ljharb>
if so, i would think that's something that should concern both tc39 and whatwg
21:17
<ljharb>
right, standardized somewhere tho
21:17
<nicolo-ribaudo>
It's common for browsers to ship APIs at the same time as creating the equivalent of a stage 1 proposal in w3c/whatwg
21:18
<ljharb>
there is a qualitative difference between something developed with multiple stakeholders, and something one private company's team unilaterally decides to do
21:19
<nicolo-ribaudo>
Or at least, for one of the browsers
21:21
<shu>
i recommend people who care about keeping abreast of all things that ship to follow intents emails on Chromium and Mozilla's email lists, and read STP notes for Safari
21:22
<Michael Ficarra>
It's common for browsers to ship APIs at the same time as creating the equivalent of a stage 1 proposal in w3c/whatwg
this sounds like a really problematic process
21:22
<ljharb>
i definitely try to do that, but that is a large firehose of information, and much of it is not relevant to javascript
21:22
<bakkot>
https://x.com/intenttoship
21:23
<bakkot>
https://x.com/search?q=from%3Aintenttoship%20capturestacktrace&src=recent_search_click
21:23
<nicolo-ribaudo>
(or https://bsky.app/profile/intenttoship.dev)
21:23
<snek>
whatwg standards don't follow the same model as tc39. tc39 honestly has something very special in terms of how much weight non-implementors have in the process.
21:23
<bakkot>
(you do have to read the notes for Safari since they're not split out)
21:23
<Michael Ficarra>
yeah there's soooo much CSS and other stuff I just don't want to hear about coming through the intents
21:26
<ljharb>
i'm glad it's rare. rare makes it notable and worth mentioning.
21:27
<bakkot>
Function.prototype.caller :D
21:27
<bakkot>
there's still a few non-standard things out there
21:27
<ljharb>
(v8 changing how captureStackTrace works a few years back was also notable)
21:30
<snek>
🫠 https://github.com/nodejs/node/blob/f6ce48636b08292baac4fd443399ab9972e1a69b/lib/internal/errors.js#L148
21:32
<Michael Ficarra>
oh fun, another use of SetterThatIgnoresPrototypeProperties
21:32
<Michael Ficarra>
I was hoping to forget that AO existed
21:33
<nicolo-ribaudo>
SetNoOverrideMistake
21:33
<bakkot>
that's this afternoon's topic
21:36
<bakkot>
speaking of non-standard features, https://github.com/tc39/proposal-regexp-legacy-features has been stage 3 for ~8 years
21:36
<bakkot>
I don't know if actually matches what browsers do
21:36
<bakkot>
or if there's tests
21:36
<nicolo-ribaudo>

This does not reflect what the implementations do, but what the editor thinks to be the least bad thing they ought to do in order to maintain web compatibility.

21:36
<Michael Saboff>
bakkot: I was thinking about that proposal during the prior discussion.
21:36
<bakkot>
ah
21:41
<nicolo-ribaudo>
ljharb It'd be great to have a note in the spec text saying that the reason those accessors are so weird is web compat, like the one at https://tc39.es/ecma262/#sec-set-iterator.prototype.constructor
21:41
<ljharb>
bakkot: fwiw DOMException is a true Error now in the web, thanks to Error.isError, if that answers your question
21:42
<ljharb>
sgtm, a PR would be appreciated :-D
21:42
<nicolo-ribaudo>
Damn I hate when asking other people to do more work backfires
21:44
<littledan>
it's slightly different
21:44
<littledan>
I think there are
21:45
<littledan>
browsers have said that they find that proposal to be very low priority, but at least Mozilla said they'd review a patch for them. I hope we can eventually make a collective decision about the proposal's future, though people didn't seem to like that idea when I brought it up in a proposal sweep
21:48
<bakkot>
(new DOMException).stack // undefined
21:48
<bakkot>
is the intention to change this?
21:48
<bakkot>
(Firefox actually has a stack here)
21:48
<ljharb>

waldemar:

> const e = new Error(), e2 = new Error();
> Error.captureStackTrace(e);
> Error.captureStackTrace(e2);
> Object.getOwnPropertyDescriptor(e, 'stack').get === Object.getOwnPropertyDescriptor(e2, 'stack').get
> true
> Object.getOwnPropertyDescriptor(e, 'stack').get.x = 1
> 1
> Object.getOwnPropertyDescriptor(e2, 'stack').get.x
> 1
21:49
<ljharb>
it's implementation-defined, so while i'd expect them to have a stack, it's up to the browser what's in it
21:49
<bakkot>
well it's actually undefined in Chrome
21:49
<bakkot>
not a string
21:49
<ljharb>
it'd have to become an empty string, i think, yes, as currently specified
21:50
<bakkot>
sgtm but that will need WPT tests
21:50
<ljharb>
sounds good, i can probably write those
21:56
<shu>
bakkot: it's weirder
21:56
<shu>
https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/bindings/core/v8/v8_throw_dom_exception.cc;l=61;drc=8b7ec5d99ad2d76762011a50ed1c14d754e3ff5f
21:56
<shu>
like, it depends on how it's thrown
21:57
<bakkot>
nice.
21:58
<Chris de Almeida>
witchcraft!
21:58
<Andreu Botella>
This would be a WebIDL PR, not HTML
21:59
<bakkot>
I'm not sure it's actually a change to any of the specs
21:59
<bakkot>
it would need WPT changes
21:59
<bakkot>
but stacks for DOMExceptions aren't spec'd anywhere afaik
21:59
<bakkot>
and this would apply to DOMExceptions as written automatically
22:00
<shu>
that's more headwinds really
22:00
<shu>
unclear how much appetite there is if it requires significant blink/Gecko/non-JSC webkit-side work
22:00
<Andreu Botella>
but stacks for DOMExceptions aren't spec'd anywhere afaik
WebIDL says that if any implementations have a stack property on errors, they must have it in DOMException: https://webidl.spec.whatwg.org/#js-exceptions
22:00
<Andreu Botella>
the stack is also structured cloned
22:00
<bakkot>
ah
22:00
<bakkot>
well
22:01
<bakkot>
browsers are not (always) doing that already
22:01
<bakkot>
oh, and structured clone would definitely need changes, if it's cloning stacks
22:01
<shu>
yeah
22:03
<bakkot>

User agents should attach a serialized representation of any interesting accompanying data which are not yet specified, notably the stack property, to serialized.

22:03
<bakkot>
... sure
22:05
<snek>
what are week numbers
22:05
<Michael Ficarra>
sometimes I think ecma262 is too informal, and then I see some of the other web specs
22:06
<bakkot>
https://en.wikipedia.org/wiki/Week#Numbering
22:06
<snek>
wild
22:06
<snek>
"first thursday of the year" just wild
22:06
<Jesse (TC39 🇺🇸)>
what are week numbers
spend a bit of time in continental Europe and you'll know
22:06
<bakkot>
scandanavian countries use them colloquially apparently
22:07
<Michael Ficarra>
timeshares in the US use them
22:07
<snek>
i guess amsterdam isn't european enough for this
22:07
<rekmarks>
Can confirm ubiquitous in Sweden
22:07
<nicolo-ribaudo>
Screenshot from our secret Igalia documents
22:07
<nicolo-ribaudo>
That's a week number
22:08
<nicolo-ribaudo>
We use it all the time
22:08
<Michael Ficarra>
Screenshot from our secret Igalia documents
hmm, what could this "...mpilers team" at Igalia be? 🤔
22:08
<Chris de Almeida>
a... weekref, if you will
22:08
<nicolo-ribaudo>
Also fun fuct we call out big company-wide meetings like TV series
22:08
<Chris de Almeida>
whoops, not TDZ
22:09
<nicolo-ribaudo>
The next one is S25E02
22:10
<canadahonk>
decompilers team
22:10
<bakkot>
I suspect I am not alone in having absolutely no opinions about minutia of week numbering
22:19
<shu>
https://chromestatus.com/metrics/feature/timeline/popularity/5209
22:19
<shu>
i can't believe it's not zero
22:19
<shu>
i want to find these sites and i want to talk to them
22:19
<Michael Ficarra>
it's looooow
22:19
<snek>
0.000007
22:20
<canadahonk>
%? yeah
22:20
<Michael Ficarra>
yeah so 2 more es
22:20
<nicolo-ribaudo>
shu Why is it not showing sample websites?
22:21
<shu>
i have no idea
22:21
<bakkot>
I know at least some people are (or were) using stamping to attach data to arbitrary objects
22:21
<snek>
probably sample is too small
22:21
<bakkot>
because of weakmaps being slow
22:21
<bakkot>
so it's probably that
22:21
<shu>
i think it only shows sample websites by correlating the use counters with crawling of HTTP archive
22:21
<littledan>
the return override thing is simply the design of ES6 classes. I get annoyed ever time I hear it referred to as a "mistake".
22:21
<Rob Palmer>
Are we also going to ban non-extensible objects from being weakmap keys to preserve the original equivalence of private fields and weakmaps?
22:21
<shu>
if there are no sites in HTTP archive that has the counter, i don't think we record other data
22:22
<shu>
my understanding is no, mark is giving up on that equivalence
22:22
<littledan>
oh but we're talking about the set thing
22:22
<nicolo-ribaudo>
I believe the reason Mark is now confident with proposing this is that we already lost that equivalence due to the window proxy
22:22
<Jesse (TC39 🇺🇸)>
sounds like an argument for decimal: being able to reliably compute extremely unpopular features in tracking dashboards
22:22
<snek>
can you install private fields on symbol instances
22:22
<shu>
the deciding factor here is in-line vs out-of-line storage
22:22
<ljharb>
on boxed ones sure
22:22
<snek>
they don't need to be boxed to be weakmap keys
22:22
<littledan>
the code that broke with the inherited Set thing is an old version of lodash. It was unclear how to fix it.
22:23
<littledan>
Allen Wirfs-Brock apparently put in the inherited Set behavior on purpose, FWIW
22:23
<ljharb>
hm, "symbols as weakmap keys" did not consider that weakable was supposed to imply field-stampable
22:23
<littledan>
(none of the rest of us were able to understand his explanation for why it was a good idea, though)
22:23
<Ashley Claymore>
can't return primitives from constructor right
22:24
<Richard Gibson>
it's independent of classes, though...
22:25
<littledan>
Right, this Set inherited non-writable thing is separate, sorry for my confusion
22:25
<Ashley Claymore>
wasn't it a custom elements thing?
22:25
<Ashley Claymore>
for the upgrade
22:26
<littledan>
well, CE was an argument for it, but it was also just an instance of keeping things kinda similar to ES5 classes
22:26
<littledan>
I guess my annoyance comes from people coming across it first in the context of fields, but it's really not because of fields
22:30
<littledan>
permanent inheritance is referred to as "immutable prototype exotic object" in the spec FWIW
22:31
<bakkot>
I would kind of like "rationalizing the behavior of" some weird web thing to generally not be a motivation
22:31
<bakkot>
it's kind of nice if we get that because of some other thing that we want
22:32
<bakkot>
but should not really be a goal in itself
22:32
<littledan>
we did consider this unbundling when immutable prototype was introduced, but concluded the same at the time, that it's not worth it to unbundle
22:33
<littledan>
How are we going to investigate whether the carveout works?
22:33
<rekmarks>
When / in which proposal was immutable prototype introduced?
22:33
<nicolo-ribaudo>
I love seeing proposal that end up being "actually, it can be reduced by 80%"
22:33
<littledan>
This was a PR to fix a Proxy security risk which delayed its shipping
22:35
<littledan>
https://github.com/tc39/ecma262/pull/308
22:35
<rekmarks>
tyvm
22:37
<bakkot>
huh, TIL it was not always immutable
22:37
<Michael Ficarra>
I refuse to believe that is new information to you
22:38
<bakkot>
I barely have room to remember the horrors we currently have in the language; no way I'm remembering the few we've actually fixed
22:40
<littledan>
I'm pretty sure you were there. IIRC this was literally the first thing I got into the language.
22:40
<Michael Ficarra>
I think it might predate Kevin by a couple meetings
22:41
<Michael Ficarra>
still, that's no excuse 😛
22:44
<Chris de Almeida>
sorry, did someone get dropped off TCQ? nicolo-ribaudo maybe?
22:45
<dminor>
I am going to drop from the call at the break, mgaudet will be representing SpiderMonkey (at least until he has to drop as well)
22:45
<nicolo-ribaudo>
Yes but Dan asked the same question
22:45
<Chris de Almeida>
ok
22:45
<rbuckton>
Isn't it only a throwing behavior in strict mode?
22:46
<shu>
oh hmm
22:46
<shu>
does it go from silent no-op to different behavior? that's scarier
22:46
<nicolo-ribaudo>
Could we just "fix the override mistake" only in strict mode?
22:47
<littledan>
IIRC the lodash thing was in strict mode
22:47
<littledan>
like that's why it caused the throw that it depended on
22:48
<nicolo-ribaudo>
I mean that we do Justin's change, but also keep setting an inherited non-writable property as a no-op in sloppy mode, to avoid going to "silent noop to different behavior"
22:48
<nicolo-ribaudo>
Re Shu's message
22:48
<bakkot>
that would give up a lot
22:48
<shu>
i'm confused now. can we hope to fix it for sloppy mode at all? sounds like no
22:48
<littledan>
I dunno if we found any compat issue in sloppy mode
22:48
<littledan>
maybe we will find one, though
22:49
<bakkot>
node (and a lot of things) would like to have frozen intrinsics and probably cannot do so if the override mistake is only fixed in strict mode
22:50
<nicolo-ribaudo>

📣 Announcement

I added a "Stage 2.7 reviewers" column at https://github.com/tc39/proposals?tab=readme-ov-file#stage-2, go there and add reviewers for your proposals or proposals you are a reviewer of

22:50
<rbuckton>
Hmm. Sloppy mode seems to actually not have the override mistake?
22:51
<nicolo-ribaudo>
object.constructor would change to be the new function
22:51
<shu>
yeah that screenshot shows sloppy mode doing a silent no-op
22:51
<shu>
so we'd be changing one non-throwing behavior to another non-throwing behavior
22:51
<shu>
so there are two web compat questions: sloppy mode + toString
22:52
<rbuckton>
Ah, yes. it's showing Object.constructor.
23:04
<nicolo-ribaudo>

shu For the use counter, I believe after step 16 of https://tc39.es/ecma262/#sec-object.prototype.tostring you'd need to add:

1. If O has a [[ViewedArrayBuffer]] internal slot and _tag_ is not "DataView", trigger the counter.
1. Else, if O has a [[SetData]] internal slot and _tag_ is not "Set", trigger the counter.
1. Else, ... (for all the types listed in that issue)
23:04
<littledan>
I don't get it; what evidence do we have that we can't apply this in sloppy mode? I thought the only evidence we had was, we can't fix the mistake in strict mode
23:04
<bakkot>
we have no specific evidence either way, but a strong general intuition that making errors into non-errors is more likely to be web compat than changing behavior of non-error paths
23:05
<rbuckton>
The issue is that sloppy mode doesn't error, so other use cases aside from lodash may not be as obviously broken.
23:05
<shu>
it's just really hard to figure out
23:05
<shu>
we have no idea what breakage means
23:06
<littledan>
similarly, fixed leaves private fields mutable, right?
23:06
<shu>
it could be something non-local eventually throws, it could mean it behaves differently and you get a load of bug reports that are just like "site broke" "video doesn't play" "button doesn't work"
23:07
<Richard Gibson>
yes, e.g. Object.fix(new Map()).set("foo", "bar").size === 1
23:07
<shu>
thanks, will think on that
23:08
<shu>
anyway i am not sure if there's consensus that we should fix override mistake in strict mode only
23:11
<rbuckton>
Are we sold on calling this "fix"? I think a name more aligned with what it's actually doing might make more sense. "Fix" seems too general of a term, especially if the "fixed" behavior we were previously discussing gets rolled into "extensible".
23:22
<shu>
i would prefer a name other than fix, yes
23:24
<shu>
is mark in this channel, i can't find him via autocomplete
23:28
<kriskowal>
MarkM doesn’t patrol Matrix, no.
23:29
<kriskowal>
For that, he has minions.
23:30
<Ashley Claymore>
I liked Stable
23:32
<James M Snell>
For that, he has minions.
MarkMinions?
23:33
<shu>
kriskowal: okay, i'll post to issue in the github
23:36
<Richard Gibson>
some possibilities raised at various points: Object.{crystallize,fix,lock,petrify,stabilize}
23:37
<bakkot>
I could also imagine an extra option to Object.freeze
23:37
<Michael Ficarra>
some possibilities raised at various points: Object.{crystallize,fix,lock,petrify,stabilize}
okay maybe fix isn't so bad
23:37
<bakkot>
Object.freeze(x, { nontrapping: true })
23:37
<shu>
i like that
23:37
<shu>
the options bag
23:37
<nicolo-ribaudo>
So many allocations
23:37
<bakkot>
do you not re-use your options bags? :)
23:37
<shu>
don't freeze where performance matters, ez
23:38
<Chris de Almeida>
it's erights ftr
23:38
<nicolo-ribaudo>
What I don't like much about fix is that even if I know it's "fixed as in it cannot move" I keep thinking that objects are then either fixed or broken
23:39
<Andreu Botella>
Object.isBroken
23:39
<snek>
always returns true
23:45
<nicolo-ribaudo>
TCQ empty -> time to ask for Stage 3 for R&T
23:48
<Mathieu Hofman>
I still don't understand why? In principle, shouldn't freeze allow more optimization ?
23:49
<bakkot>
who is going to put in the work to write those optimizations instead of more heavily optimizing the common case?
23:50
<bakkot>
I am not totally clear if this vision is still keeping ${} === ${}
23:51
<bakkot>
I am guessing no?
23:51
<snek>
i was told yes
23:51
<bakkot>
was that explained and I just missed it?
23:51
<bakkot>
hm
23:51
<bakkot>
I will ask
23:51
<Mathieu Hofman>
I think it cannot, I don't think we've gotten there yet
23:51
<littledan>
Let's continue the presentation; it answers bakkot's question
23:51
<ljharb>
it'd have to memoize the contents and keep the resulting object somewhere, so i'm not sure how it'd be practical
23:51
<bakkot>
ah, slides have an Object.equalRecords
23:52
<bakkot>
I did go through the slides and did not immediately see an answer to my question but I think the existence of equalRecords implies no
23:52
<rbuckton>
I think that may have been the next section before we broke for the queue? The slide mentioned composite keys
23:52
<bakkot>
composite keys don't have to be ===
23:52
<bakkot>
if you make the collections special case them
23:53
<Mathieu Hofman>
there are some questions about backwards compat if that happens by default
23:54
<Mathieu Hofman>
(again we're jumping ahead of the presentation)
23:54
<bakkot>
I don't see how there can be back compat questions about new syntax?
23:54
<nicolo-ribaudo>
Not really backwards compat, as these things don't exist yet
23:54
<nicolo-ribaudo>
More "mixing old and new code" might not work
23:54
<Mathieu Hofman>
right sorry
23:54
<snek>
i don't quite understand that, excited to see the slides ig
23:55
<Mathieu Hofman>
libraries using a Map assuming that putting 2 different object cannot result in the same entry in the map
23:55
<Michael Ficarra>
I really want this composite key feature built-in
23:55
<bakkot>
code often breaks when we add new concepts to the language and you try to use them with old code
23:55
<snek>
this doesn't break that assumption, unless you mean specifically due to this having typeof "object"
23:56
<rekmarks>
Isn't this already broken by typeof null === 'object' ?
23:56
<bakkot>
also: can you put one of these in a WeakMap?
23:56
<Michael Ficarra>
😠 SameValueZero
23:57
<bakkot>
I guess maybe only if it contains at least one thing which can be put in a WeakMap?
23:57
<nicolo-ribaudo>
The TC39 rule is "when somebody says typeof x === "object", pretend they said Object(x) === x"
23:57
<Mathieu Hofman>
type doesn't matter. reality is that today if a !== b, then set.add(a) is distinct from set.add(b)
23:57
<nicolo-ribaudo>
NaN enters the room
23:57
<snek>
r&t should override === imo
23:58
<snek>
just really annoying otherwise
23:58
<bakkot>
no
23:58
<bakkot>
no no no
23:58
<bakkot>
please do not add attractive nuisances to the language
23:58
<Michael Ficarra>
counterpoint: yes?
23:58
<shu>
we don't want to overload ===?
23:58
<Mathieu Hofman>
That was the feedback from implementors: no can't do
23:59
<bakkot>
well
23:59
<bakkot>
it is not totally clear
23:59
<bakkot>
I think this vision is, no
23:59
<bakkot>
though some people would like to
23:59
<snek>
or just give me a System.goodEqual function which i can transpile every === into
23:59
<ljharb>
the only way it makes sense to have it, and not overload ===, is if "same" objects are actually the same object
23:59
<rekmarks>
> const s = new Set()
undefined
> s.add(NaN)
Set(1) { NaN }
> s.add(NaN)
Set(1) { NaN }
23:59
<Mathieu Hofman>
but NaN !== NaN