2020-06-01 [17:24:37.0000] (whining aside though, it'll probably be beneficial to have a more structured schedule for a bit, lol) [19:09:26.0000] devsnek: congrats! Don’t stress out to much, it will probably be better to focus on the onboarding and take some rest if necessary instead of much of TC39 stuff. Don’t let the FOMO take out your energy. [07:47:10.0000] morning all [07:51:45.0000] mornin' [07:55:01.0000] TCQ: https://tcq.app/meeting/KfmX [07:56:41.0000] meeting info link in the topic is outdated. should be https://github.com/tc39/Reflector/issues/279 [07:58:28.0000] thank you Rob :) [07:59:33.0000] did anyone create notes docs already? happy to update the short URLs again [08:01:36.0000] mathiasbynens they're in the reflector, yeah [08:01:49.0000] also reminder to all not to link the notes here, in this publicly logged channel [08:02:11.0000] i don't see them in https://github.com/tc39/Reflector/issues/279 [08:02:34.0000] i see, #294 [08:06:48.0000] good morning everyone :-) [08:08:31.0000] Good morning! :) [08:08:45.0000] if you call on me next, I can give my standard IPR disclaimer [08:08:55.0000] I imagine Istvan's thing is not what was being asked about [08:09:09.0000] akirose: ^ [08:09:15.0000] akirose: your headphones 😂 [08:09:22.0000] so fetch [08:09:38.0000] +1 [08:10:00.0000] littledan: you kind of look like you're interrogating us with that light :p [08:10:16.0000] heh I don't have my awesome coworking space setup [08:10:49.0000] my partner is planning on building a nice planter behind me and hanging up some of his art so it can show up in my video calls, but I guess we didn't plan for the light [08:11:51.0000] that sounds nice though :) [08:13:30.0000] did you just say mancy [08:13:43.0000] mancy [08:36:25.0000] i'm confused about this slides sharing [08:36:31.0000] *i* can control the slide? [08:36:55.0000] oh no [08:37:00.0000] deep powerpoint integration probably [08:37:02.0000] that is too much power [08:37:06.0000] wait when i'm jumping around [08:37:13.0000] am i making it jump around for other viewers, or just myself [08:37:14.0000] it's not jumping for us [08:37:15.0000] ok [08:37:17.0000] whew [08:37:23.0000] you can peek ahead [08:38:15.0000] I assume that doesn't work for Google Slides [08:38:50.0000] I would assume that yes [08:39:05.0000] you can always export your slides in ppt [08:40:20.0000] presumably one would need to actually have ppt lying around for that to do you any good [08:40:29.0000] I don't think I have used a machine with ppt since high school [08:41:11.0000] oh, teams is a ppt viewer apparently, neat [08:45:16.0000] fwiw i literally just uploaded Istvan's ppt that he had emailed to the chair straight to the teams client [08:45:26.0000] no ppt.app launched [08:46:43.0000] phew, irc is working again [08:46:47.0000] (for me) [08:48:33.0000] draft schedule link added to reflector#279 [08:54:36.0000] these editorial improvements are awesome! [08:55:41.0000] +1 [08:56:22.0000] +1 [09:01:53.0000] thanks littledan :-) [09:23:35.0000] akirose: *green heart emoji* been feeling similarly [09:23:55.0000] 100000% [09:26:32.0000] is tcq showing everything or just stuff for today [09:26:43.0000] everything [09:26:51.0000] we chew through as much of it as we can [09:27:03.0000] it may not yet be fully populated but that is the intent [09:27:36.0000] cool [09:27:53.0000] do we have that hackmd schedule this time around [09:28:03.0000] this channel is public and should not have the notes doc linked in it [09:28:17.0000] devsnek: we do [09:28:22.0000] robpalme ^ [09:28:23.0000] devsnek: the hackmd is on the reflector issue for the meeting, its at the top, "Draft Schedule" [09:29:26.0000] robpalme: Bakkot should we move today's notes to another URL? [09:29:39.0000] ehhhh it's probably not worth worrying about [09:29:48.0000] i can move it [09:29:51.0000] either at lunch or eod [09:30:07.0000] thanks [09:30:13.0000] any preference? [09:34:07.0000] yeah, I agree that late agenda items should be deprioritized [09:35:02.0000] Isn't today a holiday in parts of Europe? [09:35:42.0000] ryzokuken: it is [09:36:03.0000] that's likely the issue, I guess 😅 [09:44:55.0000] jridgewell I am glad/impressed you know those NamedEvaluation details off the top of your head [09:45:00.0000] I just reviewed this change and I still don't [09:45:07.0000] note that ease for polyfill doesn't correspond to ease for impl [09:45:24.0000] shu: to clarify, chrome is shipping it with or without the inferred name? [09:45:44.0000] ljharb: without currently, because it's not in the spec [09:45:49.0000] thanks [09:45:54.0000] ljharb: if it is added, there is plenty of time to add it in before it hits stable [09:46:28.0000] gotcha [09:46:38.0000] drousso: you had thoughts on the issue thread btw [09:46:47.0000] ya [09:46:53.0000] i don't feel strongly [09:47:15.0000] i am slightly towards "no" because of the short circuiting behavior [09:47:46.0000] short circuiting behavior actually leans towards yes, I think [09:48:10.0000] because with short circuiting it desugars to `a && a = function(){}`, which gets named [09:48:43.0000] the tricky part is that while that is the desugaring, it's not the current code you would write [09:48:47.0000] or `if (a) { a = function () {} }` which also gets named [09:51:10.0000] +1 to what rkirsling [09:51:11.0000] said [09:51:19.0000] personally, I don't see the size of the Babel output, or the desugaring, as a very strong argument one way or another [09:51:39.0000] it's more about the general pattern that, in these sort of direct syntax assignment cases ending in = or :, you do name assignment [09:51:56.0000] (sorry for caucusing before...) [09:52:31.0000] yeah, agreed with littledan [09:53:55.0000] sorry, the conclusion was yes, go ahead with named evaluation? [09:54:29.0000] sounds like yes, infer the name, as long as implementors can commit to implementing that [10:08:45.0000] petition to consider shorter lunch breaks the next three days [10:09:06.0000] esp considering we're not all eating lunch at the same times when remote [10:09:07.0000] I just had breakfast, so I'm not going to eat lunch, so I'm just sitting around [10:16:16.0000] is iterator helpers happening now [10:16:33.0000] It's a tech check [10:16:52.0000] We're on break till the new hour [10:17:06.0000] ah ok [10:18:15.0000] ***Note-takers and Note-readers*** Today's notes have been migrated. Please find the new link here: https://github.com/tc39/Reflector/issues/279 [10:29:53.0000] i'm gonna mention this when we reconvene, but… we have way, way more time on the agenda than we have meeting time. use that information as you will. [10:33:50.0000] folks in the breakout room feel like a one-hour lunch break doesn't really make sense under all-remote conditions [10:36:57.0000] rkirsling: as in, it's too long? [10:37:16.0000] yeah [10:38:08.0000] as in, like, even if you're in the appropriate time zone you might not need that long of a block of time when you're connected remotely anyway [10:38:24.0000] I dunno, I just finished cooking lunch, don't have that much time to eat :-P [10:40:35.0000] The difference being it's ok to mute yourself and eat as presentations are going on [10:40:44.0000] It's a little different than when we're in person [10:40:57.0000] shorter break time sgtm [10:41:27.0000] Also the side discussions are much louder in-person, so having a long lunch break was nice [10:50:39.0000] michaelficarra: are you around? [10:56:24.0000] Is anyone here well-connected enough to get us an invitation to Clubhouse for the hallway track? https://www.wired.com/story/what-is-clubhouse-why-does-silicon-valley-care/ [10:58:29.0000] "a new social network more exclusive than Berghain" AHAHAHAHAHAHAHAH [10:58:40.0000] we are restarting in 1 minute! [11:02:03.0000] starting now! [11:04:56.0000] if there are questions about iterator helpers stuff i can address i'm watching the channel here but not actively listening to the call [11:07:11.0000] ppt integration seems much worse than the share-screen integration [11:11:35.0000] akirose: `Intl.DurationFormat` is today according to https://hackmd.io/@tc39-chairs/rylG45f2L#1300-CDT, but it's not on the agenda. [11:11:36.0000] yep.. [11:12:02.0000] these slides are really good [11:13:31.0000] Upstream iterator was never started either though [11:13:42.0000] enclosing finally blocks around the current yield pause point are called by generator return FWIW [11:14:13.0000] eesh, i didn't realize the slides were advanced, i was stuck on slide 5. guess i'll open the link myself [11:14:14.0000] iterators don't get started [11:14:18.0000] generators get started [11:14:23.0000] ... I think [11:14:35.0000] iterator is just a protocol [11:14:41.0000] there's no behaviour [11:14:49.0000] but the protocol doesn't involve a "start" phase, I think [11:14:59.0000] right [11:16:07.0000] Sure, but depending on .return to close upstream iterators isn't guaranteed either [11:16:18.0000] s/close/"return" [11:17:19.0000] not guaranteed, but it seems very strange to have a builtin which unconditionally prevents you from doing that [11:17:28.0000] rather than deferring to the upstream [11:18:51.0000] Bakkot: Well, you might think of the first .next() call is more or less a "start" phase [11:20:03.0000] ryzokuken: working on it. bterlson & robpalme are debugging something [11:20:21.0000] littledan: sure, but I wouldn't really expect that [11:20:25.0000] you can call .return before .next [11:20:42.0000] so it is reasonable to implement an iterator which is opened when it is obtained [11:20:46.0000] not when it is first queried [11:20:48.0000] right, this case is weird [11:20:52.0000] and the builtins should work with that [11:20:54.0000] akirose: thanks. [11:21:16.0000] (I wouldn't expect to have .return/.throw at all, and have previously proposed that we remove all that from the iterator protocol, but maybe it's too late now) [11:21:33.0000] there are many more slides [11:21:43.0000] To me its inconsistent to have a built-in that differs in behavior from what a user could normally accomplish with a generator. [11:21:44.0000] whatwg streams make use of them, I think [11:22:11.0000] rbuckton why? generators are a convenient way of creating iterators, but not the only way [11:22:33.0000] Of course, generators are essentially "lazy" since no code runs until the first call to `.next()`. [11:22:43.0000] jridgewell: it's iterator helpers, not iterable helpers [11:23:10.0000] There's a constructor, no? [11:23:23.0000] `new IterableHelpers(set)` [11:23:24.0000] Bakkot: I thought that was pretty new/not universally shipped. But iterator .return/.throw has been shipped everywhere for years [11:23:32.0000] michaelficarra: I still think targeting *iterator* and not *iterable* is the wrong abstraction. [11:23:33.0000] jridgewell: no [11:23:34.0000] rbuckton: every iterator-producing method in the spec already differs in that behavior. [11:23:36.0000] littledan yeah, it's new. seems useful though! [11:23:43.0000] jridgewell: set.values().map() [11:23:50.0000] ES6 itself wasn't consistent between iterator-producing methods, and "what generators do" [11:23:57.0000] re: "spec will be long", fwiw we could cut down the duplicate spec text the way we do for typed arrays and errors [11:24:13.0000] jridgewell: no, though there is Iterator.from [11:24:22.0000] Bakkot: i tried that, its still very long [11:24:28.0000] because each one has very different logic [11:24:28.0000] I would have almost preferred `new Iterable(set.values()).map()`. [11:24:55.0000] Does `Iterator.from` call `@@iterator`? [11:24:59.0000] yes [11:25:01.0000] yep [11:25:04.0000] 👍 [11:25:28.0000] Removed myself from the queue [11:25:51.0000] devsnek: hm, that's surprising to me [11:25:55.0000] Yield macro just calls GeneratorYield or AsyncGeneratorYield [11:25:59.0000] no new machinery there [11:26:02.0000] devsnek were you using abstract closures? [11:26:12.0000] Bakkot: i considered abstract closures [11:26:19.0000] i didn't come up with anything fantastic there [11:26:35.0000] because with abstract closures you would just specify a State record and an abstract closure and .next would just invoke the abstract closure [11:26:47.0000] it's only flatmap which would be more than that, I think [11:27:08.0000] i don't want to make something that needs special cases [11:27:13.0000] meh [11:27:14.0000] I don't hate option 1: is there really a need to forward return/throw? [11:27:15.0000] just from a principled perspective [11:27:17.0000] I wrote package that essentially has these helpers over iterables: [11:27:17.0000] ```js [11:27:17.0000] const { from } = require("iter-query"); [11:27:17.0000] from(set.values()).map(...) [11:27:17.0000] ``` [11:27:18.0000] It makes a lot more sense to me at that level, though I understand the want to attach these to `%IteratorPrototype%` for convenience. [11:27:18.0000] it's editorial [11:27:21.0000] i think we need good ways to add stdlib behaviour [11:27:26.0000] without special casing everything [11:27:42.0000] I don't really think we should be optimizing for the spec being short [11:27:56.0000] s/don't really think we should/strongly believe we should not/ [11:27:58.0000] agreed [11:28:08.0000] I'm personally a fan of something like Option 1 (or at least, that uses `[@@iterator]`) [11:28:08.0000] it's not about being short as much as its about being consistent [11:28:24.0000] as long as the user-observable behavior is consistent, I don't know why we would care that much [11:28:32.0000] option 3 is polyfillable btw [11:29:25.0000] michaelficarra it seems important that `.throw` and `.return` forward to the underlying iterators, personally [11:29:45.0000] like `iter().map(x => x)` should be as close as possible to `iter()` [11:29:58.0000] option 3 doesn't directly forward but it keeps the state consistent [11:30:10.0000] it will call the methods, i mean [11:30:27.0000] what is the difference between 2 and 3 other than editorial? [11:30:52.0000] in 2 they are plain objects that are iterators [11:30:57.0000] in 3 they are actual generators [11:31:10.0000] ah, but specced using spec machinery instead of JS code? [11:31:14.0000] yeah [11:32:39.0000] personally I like option 3 the best, and agree with this goal of avoiding special-casing. [11:33:11.0000] (just because we used one-off solutions each time in the past does'nt mean we need to keep doing that forever in the future...) [11:33:17.0000] I really don't think the presence of the methods should be conditional [11:33:21.0000] ljharb ^ [11:33:24.0000] +1 [11:34:26.0000] is bradford on IRC? [11:34:28.0000] michaelficarra: i can understand that position for sure. but also APIs that consume iterators might be checking for the presence of those methods now, and taking simpler code paths when they're absent, so it might have an impact [11:34:55.0000] agreed it might have an effect but I agree with michaelficarra anyway [11:36:48.0000] Bakkot: what do you think about async abstract operations [11:36:52.0000] abstract closures* [11:37:08.0000] devsnek hmmm [11:37:12.0000] no inherent problem with them I guess [11:37:20.0000] would need to be defined [11:37:28.0000] from outside, it'd just be a regular one that returned a promise [11:37:30.0000] seems fine to me also [11:37:46.0000] no, more than that [11:37:58.0000] but that part of the spec could use our going over anyhow [11:38:07.0000] the part that actualy does the continuation wrapping in a promise [11:38:25.0000] it would definitely require spec work [11:39:28.0000] I still wish the helpers went through `[@@iterator]` so they could be copied to other objects that are iterable. For all built-in iterators as well as generators, `[@@iterator]()` just returns `this`. Just depending on the presence of a `next` method makes me think of all of the issues with `then` we've had in the past. [11:40:08.0000] shu: i know it'd need lots more for "inside" the async abstract closure - i meant like from the callsites [11:40:24.0000] unfortunately I don't think we're going to come to a clear decision before this timebox is over :-( [11:40:52.0000] rbuckton: the main concern is preventing people from getting into patterns that rely on @@iterator being reusable when it isn't [11:40:58.0000] ystartsev: Wait so would something like Symbol.generatorInitialize solve option 1? [11:41:13.0000] what is Symbol.generatorInitialize [11:41:15.0000] that is called when the generator function is first called [11:41:26.0000] robpalme sorry got dropped [11:41:27.0000] to validate args and stuff? [11:41:31.0000] what were you asking me? [11:41:32.0000] keith_miller: how would i do that syntactically tho with regular generators [11:41:33.0000] yeah [11:41:33.0000] ping jorendorff for that [11:41:37.0000] pinging* [11:42:43.0000] You'd have to have something like (function* myGenerator() { ... })[Symbol.initializeGenerator] = function init() { validate(arguments[0]); } [11:42:50.0000] not saying it's pretty [11:43:00.0000] ljharb: but it would let you do stuff [11:43:30.0000] oh no that wouldn't solve it actually [11:43:34.0000] at the risk of making all calling of generators slower? [11:43:36.0000] Ah, ok [11:43:40.0000] because you wont be able to forward properly [11:43:46.0000] I think you just write a function which invokes and generator and returns it [11:43:58.0000] ystartsev: the initialize could set up the forwarding [11:44:04.0000] function f(){ validate(); return function*(){}(); } or whatever [11:44:13.0000] ljharb: I mean initializing generators is already crazy slow [11:44:13.0000] lol [11:44:13.0000] that's what option 3 does [11:44:19.0000] right [11:44:25.0000] and I think userland code would do the same thing if they want this [11:44:29.0000] yep [11:44:35.0000] would do this? [11:44:53.0000] Or would make their equivalent of the polyfill? [11:44:57.0000] well actually what i want is a way to create a generator that has no initial yield [11:45:24.0000] I mean sure, this is just a hacky way to get that [11:45:28.0000] I don't think complicating generator functions even more is a good solution to this [11:45:40.0000] oh no i don't think we should do that as part of this [11:45:50.0000] none of these options ask for that [11:46:38.0000] I mean option 3 is effectively asking VMs to do it [11:46:45.0000] Options 2 and 3 seem to be regular functions that could return generator instances, which seems a better solution [11:46:51.0000] so... for me there's no difference but I'm an implementor [11:47:17.0000] Giving more magic to generator functions makes the transform muchhh more complicated [11:47:36.0000] did we get consensus to use option 3 there? [11:47:37.0000] I already don't want to maintain the regenerator transform [11:48:03.0000] we didn't really get a conclusion here right? [11:48:10.0000] yeah that was weird [11:48:18.0000] wow how did we get this far down on the agenda? [11:48:30.0000] time constraints? [11:48:53.0000] afaik the point of that presentation was to get consensus on how we should proceed [11:48:55.0000] I'm not sure how option 3 forward the arg of first next call (which function.sent need)? [11:49:09.0000] haxjs: StartIteratorHelper calls .next() once [11:49:20.0000] which is why %SyncMap% starts with a Yield() [11:51:02.0000] Can't find it in https://gist.github.com/jorendorff/35504c2553170be98fc2810ccf60c608 🤔 [11:51:15.0000] haxjs: the value is lost there [11:51:22.0000] that's not option 3 [11:51:28.0000] That's Option 1, I think [11:52:09.0000] Iterator.prototype = { [11:52:09.0000] map(mapper) { [11:52:09.0000] let it = SyncMap(this, mapper); [11:52:09.0000] it.next(); [11:52:09.0000] return it; [11:52:10.0000] } [11:52:10.0000] }; [11:52:29.0000] haxjs: more or less, yeah [11:56:34.0000] re: iterators [11:56:39.0000] i have opened this issue: https://github.com/tc39/proposal-iterator-helpers/issues/97 [11:56:45.0000] keith_miller: re your queue item; they already can't, because they're inside an expression position [11:56:56.0000] ljharb: ?? [11:57:15.0000] I'm saying it's the same result as an eval [11:57:15.0000] do you all think we could revisit this for 5 min on thursday? [11:57:34.0000] keith_miller: ah, k [11:59:58.0000] brad4d: an IIFE wouldn't necessarily preserve `super`, `arguments`, `this`; nor `await`, and it would make control flow questions complicated [12:01:13.0000] an arrow iife preserves `super`, `this`, `arguments` [12:01:30.0000] is it really desirable to return / break from a do {} expresssion? [12:01:35.0000] yes [12:01:43.0000] imo no, but some folks think yes [12:01:51.0000] Arrow won't preserve `yield` [12:01:55.0000] or `await` [12:02:11.0000] i really want control flow from do expressions [12:02:25.0000] You can use `await async () => { await x }` [12:02:27.0000] bradleymeck: control flow non-local to the do block is contentious [12:02:54.0000] But not for `yield`, because we still don't have arrow generators [12:04:51.0000] shu: did you mean to ping me on that? [12:05:05.0000] bradleymeck: nope, sorry :) [12:05:07.0000] brad4d: ^ [12:05:35.0000] shu ack [12:07:34.0000] i think control flow has utility in various positions that are annoying to deal with otherwise but not fatal to be missing [12:10:04.0000] there are some really odd things you can do though, like `do {continue}` on a destructuring default assignment to skip a loop [12:12:05.0000] does return/break/continue inside eval already work in an expression position? [12:12:14.0000] no [12:12:19.0000] you mean `let {x = do {continue}} = obj;` would continue a loop if `obj` doesn't have an `x`? [12:12:43.0000] I think that is harmful to readability. [12:13:03.0000] to me that's a linting concern [12:13:20.0000] there are places (outside of destructuring declarations) where continue can be useful [12:14:14.0000] that's how zkat initially wrote those proposals iirc—pattern matching + do expressions intended to move through committee side-by-side [12:14:21.0000] devsnek could you point me at a use-case where flow-control inside a `do{}` would be beneficial? I can't seem to come up with one on my own? [12:14:47.0000] ljharb: the coupling with pattern matching would be a nice thing to discuss in incubator(ish?) calls [12:15:03.0000] idk Mark's irc handler if any [12:15:10.0000] leobalter: agreed; we're still pretty far from being ready for that tho (mpcsh) [12:15:11.0000] it's been discussed in the pattern matching calls [12:15:28.0000] brad4d: there was one in the slides [12:15:37.0000] Lol [12:16:04.0000] /me sees myself to TDZ [12:16:13.0000] ljharb leobalter Bakkot: should we try to get both of these proposals on an incubator call? [12:16:23.0000] leobalter: happy to invite you to the next pattern matching call if you're interested [12:16:39.0000] yes, please [12:16:54.0000] mpcsh: yes, but i think after i've got the PR ready to update the proposal :-) [12:17:24.0000] 👍 [12:18:22.0000] I've seen a fair amount of Kotlin code that does continue/break/return in expression positions: [12:18:22.0000] ```kotlin [12:18:22.0000] for (x in list) { [12:18:22.0000] val y = x?.y ?: continue; [12:18:22.0000] ... [12:18:23.0000] } [12:18:23.0000] ``` [12:19:08.0000] There's a goog internal server language that has `or exit` all over the place. [12:19:08.0000] I share Bakkot 's intuition about blocking return, continue and break from expressions breaking some kind of invariant that we have [12:19:14.0000] rbuckton: I don't think it'd be contentious without the visible boundary of `do {}` [12:19:28.0000] so, I guess this is what exceptions are for? [12:19:53.0000] same; flow control doesn't belong in expression position [12:20:21.0000] rkirsling: which wouldn't be contentious? `x?.y ?? continue` or `x?.y ?? do { continue; }`? [12:20:27.0000] there is no such invariant in how we have specified the language [12:20:37.0000] in fact completion values help allow it [12:20:42.0000] devsnek: sure, i didn't say they can't be. i said they shouldn't be. [12:21:01.0000] dan said there was an invariant [12:21:04.0000] which i strongly disagree on [12:21:07.0000] oh [12:21:18.0000] well, the invariant is that you currently can't do any non-throw flow control in expression position [12:21:23.0000] rbuckton: the former wouldn't be, is my argument. "everything is an expression" doesn't induce confusion where "crossing the border between worlds" does [12:21:26.0000] it may or may not be intentional, but it remains an invariant [12:21:30.0000] I'm totally +1 to do expressions. Although, a spec draft would make it easier for an overview [12:22:07.0000] hmm, I'm not sure why you'd have to care so much about the microtask ticks... I'd hope not many developers have to think in those terms [12:22:18.0000] people often think about overhead [12:22:30.0000] devsnek: Well, it's currently an invariant; we can disagree about the priority of preserving it [12:22:41.0000] like, it's currently a fact about JS that that doesn't happen [12:23:04.0000] that's not an invariant its just a hole [12:23:05.0000] rkirsling: I have an issue on the do-expressions repo that suggests dropping `do {}` and updating ParenthesizedExpression to allow most statements. Then you would have `x ?? (continue)`. The parens are necessary to preserve precedence of `,`, which was one of Bakkot's concerns about throw expressions. [12:23:16.0000] the JS spec notation allows all kinds of stuff that we have decided we won't do [12:23:17.0000] that's like saying %Iterator%.prototype.map not existing is an invariant of the language [12:23:39.0000] and indeed, it is right now [12:23:46.0000] so, in general, I think that assertions of things being "invariants" are value judgements, and I'm comfortable calling my claim a value judgement [12:23:50.0000] devsnek: but i think there's a categorical difference there that you surely are aware of [12:23:55.0000] it's a statement about what we want in the future [12:24:22.0000] drousso: what about the dev tools/repl? [12:24:29.0000] value judgement seems like a better term [12:24:39.0000] ljharb i don't think those people think of that as "completion" [12:24:44.0000] I'm confused by the non-specific confusion [12:24:44.0000] drousso: and yet that's what it is [12:24:57.0000] drousso: so would it be more palatable if do expressions were explained as "like in the dev tools"? [12:25:09.0000] the goal is to continue preserving "ignorance is bliss" around completion values, was my understanding [12:25:12.0000] drousso: since that's something virtually every dev already understands? [12:25:15.0000] ljharb im not convinced that developers even know what's going on in the console [12:25:27.0000] drousso: they figure it out very quickly. they type `3` and the result is `3` [12:25:44.0000] or `if (true) { 3 }` and the result is `3` [12:25:53.0000] it doesn't work exactly like the devtools tho [12:25:54.0000] i just don't get like [12:26:11.0000] drousso: aside from "devtools exposes internals" and whatnot, how does it differ? [12:26:20.0000] why can't we just say some people don't like control flow there, and leave it to linters [12:26:37.0000] oh wait i was thinking of something different [12:26:44.0000] yes it does work the same as devtools [12:26:56.0000] i don't think that that's a good way of explaining it though [12:27:03.0000] as that doesn't clarify anything about what's happening [12:27:11.0000] it just provides a "if you want to see it in action, use devtools" [12:27:21.0000] it doesn't explain what's actually happening [12:27:26.0000] s/it/devtools [12:27:34.0000] drousso: the explanation isn't needed tho, if everyone already intuits how it's supposed to work [12:27:41.0000] Younies is unavailable for his presentation so Record & Tuple is next. [12:27:41.0000] i disagree with that [12:27:44.0000] vehemently [12:28:24.0000] can you give specific examples of what the people you spoke to thought the basic cases should do instead? [12:28:49.0000] the function declaration [12:28:54.0000] +1 for banning too :) [12:29:03.0000] many i spoke to thought that that would result in the function declaration being used [12:29:08.0000] I disagree with the notion that a proposal like this would need to add new capabilities (like return/break/continue from an expression) to carry their own weight; I'm not sure if waldemar was alluding to that [12:29:24.0000] waldemar said this proposal isn't worth it without control flow [12:29:33.0000] drousso you get a syntax error; I think "what does this code do? oh it's a syntax error" is not that big of a deal [12:29:44.0000] I think many devs only want some sugar for IIFE. [12:29:54.0000] i certainly won't use it as much as i was planning to without control flow [12:30:01.0000] haxjs: why does that mean they shouldn't get it? [12:30:03.0000] i don't think syntax errors are a good way of teaching a developer how to use something [12:30:40.0000] in fact i've spoken with many developers who find JS errors often unhelpful [12:30:48.0000] that's more on engines [12:30:54.0000] unfortunately we don't specify error messages, that's on the browsers [12:30:58.0000] * browsers/engines [12:31:04.0000] engines don't even bother to implement parsers which support reporting multiple errors [12:31:08.0000] drousso: we had pretty strong support internally for this, its interesting that your front end developers have such a strong issue with this. Are there certain patterns that they are using that makes it more difficult? [12:31:25.0000] ljharb so any other capabilities just add confusion even they are powerful :) [12:31:38.0000] and also, yes -- engines cannot really improve their error messages due to web compat [12:31:43.0000] haxjs: i agree that return/continue/break in do expressions are powerful and also add confusion, yes [12:31:44.0000] that is true [12:31:44.0000] we tried and had to back it out [12:31:50.0000] im not saying that's the fault of this situation [12:31:58.0000] or that it's up to this proposal to fix it [12:32:07.0000] just that i believe errors are not a good way to teach things [12:32:26.0000] brad4d +1000 [12:32:28.0000] drousso: i think it's very unlikely devs will even try to do these things in the first place tho [12:32:32.0000] brad4d completely agree [12:32:36.0000] drousso: iow, i think that most devs won't ever run into it. [12:32:51.0000] ljharb if that's the case, why add it in the first place? [12:33:02.0000] I will say that I too originally expected that `return` would serve as an early out _for the do expr_ [12:33:02.0000] or wait do you mean these "edge cases" or `do` in general? [12:33:06.0000] drousso: because they *will* try to use all the non-error cases in a block in expression position [12:33:09.0000] drousso: i mean the edge cases [12:33:18.0000] drousso: tons of people will immediately try to use the non-edge-cases in a ton of code [12:33:19.0000] (but obviously it's moot if it's banned) [12:33:40.0000] drousso: especially in the react community inside jsx, not that i think that needs to be a motivation [12:33:52.0000] rkirsling: well, i'm saying i don't think they'll even run into the bans [12:34:03.0000] rkirsling: i think most users won't ever discover those are missing because they'll never think to try it [12:34:15.0000] But, I also think banning everything controversial not really solve the problems, for example how can we break a loop and return a value (it seems it will be banned as slide) [12:34:44.0000] haxjs: same way you do now: return a sentinel value, and then check it in the main loop body [12:35:08.0000] Back when I presented throw expressions I was asked by many in the committee to investigate converting other statements to expressions, especially `return`, `continue`, `break`. I'm actually surprised at the number of people in favor of banning those statements in a `do {}` expression. [12:35:10.0000] re: iterator helpers issue: https://github.com/tc39/proposal-iterator-helpers/issues/97 [12:35:18.0000] please comment so we can get to a solution! [12:35:26.0000] ljharb: no right now you just `return` [12:35:28.0000] ljharb: so i guess dev would expect iife which can return a value directly :-P [12:35:36.0000] if anything not allowing control flow is a refactoring hazard [12:35:38.0000] devsnek: not if the value comes from an IIFE, or another function [12:36:01.0000] haxjs: they'll expect their do expression body to be able to produce a value; i'm saying they won't expect it to be able to force the containing function to return [12:37:21.0000] @devs [12:37:44.0000] devsnek allowing flow of control is a refactoring hazard if you're inlining a function [12:39:39.0000] `do{}` expressions would make function inlining much easier if they really act like inline functions [12:39:41.0000] ljharb: what I'm talking is code like `do { while(...) { if (...) { 1 ; break } } }` [12:40:06.0000] haxjs: that would work fine, because the loop you're breaking is fully inside the `do` [12:40:11.0000] haxjs: i think [12:40:21.0000] haxjs: ohh right but it wouldn't because of ending in a loop [12:40:43.0000] haxjs: so then `do { let v; while (…) { if (…) { v = 1; break; } } v; }` [12:41:05.0000] yeah, this is why i say devs may like iife sugar... [12:42:38.0000] gotcha, agreed [12:43:02.0000] well, i see what you mean anyways. i don't think they actually want a function invocation [12:43:25.0000] As i understand, basically current minimal proposal just have very similar power or even less power of iife. [12:43:39.0000] and less overhead [12:44:16.0000] yeah, so maybe iife sugar is what we need? [12:44:47.0000] current proposal lets you do something you can't with IIFE, which is await/yield [12:45:04.0000] await you can do with a microtask tick, yield... you just can't do, I think, at least without a bunch of wrappers [12:45:21.0000] ^ that [12:45:31.0000] yeah! so it's iife + await async iife sugar :-P [12:46:30.0000] bterlson/other chairs: voice jorendorff ? [12:47:27.0000] I'll figure out my mic [12:47:29.0000] go to the next speaker [12:49:39.0000] I'll follow up on GitHub and/or in the hallway track [12:50:01.0000] Bakkot: on it [12:52:38.0000] thank you [12:55:23.0000] complex numbers don't have -0, bah [12:56:36.0000] haha [12:57:40.0000] during the editor update I misspoke: it's actually caiolima doing the work to fix the number types in the spec. mea culpa. [12:58:27.0000] time is over for today, but we have someone logged in as Guest in the call, I believe we should avoid that tomorrow. [12:58:48.0000] indeed [13:03:41.0000] SameValue makes sense if we want to follow pattern with `includes`, right? [13:04:16.0000] well ... it seems more directly applicable to look at what `===` does, than `includes` [13:04:24.0000] leobalter SameValueZero, technically [13:05:00.0000] `[-0].includes(0)` and `[NaN].includes(NaN)` are both true [13:06:00.0000] I am opposed to shortening lunch, for the record. the hallway-track social time is nice [13:08:40.0000] mpcsh: I don't think we necessarily need to decrease break time, perhaps just rearrange it [13:08:57.0000] Ujjwal and I are in the hallway track; would be nice to have more [13:09:23.0000] I feel we should keep consistency with normal `===`. The weirdness of `===` is coming from IEEE float, developers are inevitable to learn it, add an exception rule for tuple/record just make things worse and never really solve anything. [13:09:37.0000] I have some thoughts about Record/Tuple that I'd like to discuss with the champions [13:10:11.0000] did we fall back to hubs? [13:10:19.0000] lets use online town for today [13:10:24.0000] kk [13:10:24.0000] and tomorrow switch to hubs [13:10:38.0000] online town has some issues with distance that hubs didnt [13:10:47.0000] i think having any value fail to ever be === if a sub component is NaN is... highly surprising [13:12:36.0000] sffc: do you want to chat now? I'm free, or via email? [13:13:23.0000] I'm in the town, plus 5 others now [13:13:31.0000] oh right [13:13:35.0000] will be there shortly [13:14:16.0000] Chairs discussed shorter lunch break and we will stick with 1 hour for now. Delegates with free time should consider joining us in the hallway track! /cc Bakkot [13:14:34.0000] akirose bterlson how hard would it be to change my initials in the notes? I'd rather go with LFB (to reflect my actual initials), but I don't wanna cause too much work [13:14:57.0000] leobalter: I switched mine from MCN to MPC a little while ago, it's not bad [13:15:37.0000] just do a find & replace for today's notes, and submit a PR for old notes [13:19:10.0000] Bakkot: How are complex numbers avoiding -0? [13:25:57.0000] TabAtkins the traditional definition of complex numbers does not include two distinct 0s [13:26:04.0000] (or four, I guess) [13:26:13.0000] Well sure, but the traditional definition of the reals doesn't either. [13:26:29.0000] Complex-in-JS would probably have some -0s in it [13:27:39.0000] (Probably... 3? If they're just a pair of Numbers.) [13:28:08.0000] 0,0, -0,0, 0,-0, -0,-0 is four [13:28:17.0000] I guess just three -0s though [13:28:20.0000] 0,0 is a positive zero, yeah ^_^ [13:32:31.0000] jorendorff: hopping into the hallway track if you wanted to chat now [13:33:38.0000] @Bakkot believe it or not I think Brendan Eich exposed -0 to JS based on advice from Guy Steele that had to do with complex numbers [13:33:39.0000] does css have a -0 which is observably different from 0? [13:33:46.0000] jorendorff fascinating [13:33:58.0000] in my hearing he only ever explained it far too fast for me to follow [13:34:10.0000] /me looks for the hallway-track link [13:34:17.0000] it's in the reflector I think [13:34:19.0000] "far too fast": checks out for brendan! [13:37:53.0000] got it [13:39:16.0000] Bakkot: CSS grew a -0 that is *slightly* observable, to preserve IEEE semantics and JS compatibility. It gets censored into a plain zero the moment is would escape a math function. [13:39:46.0000] But yeah, `margin-left: calc(1/0);` is different from `calc(1/-0)`. [13:43:24.0000] good times [13:43:36.0000] -0 was a terrible idea [13:43:41.0000] I will die mad about that [13:44:22.0000] can't wait for some brave new language to just say no [13:46:31.0000] what... do i do for the rest of my day [13:46:46.0000] Bakkot: but how else can i express the limit of an integral approaching zero from the negative direction [13:46:51.0000] Oh jeez I forgot it was 3pm Central, I was waiting for the meetig to start again [13:46:58.0000] ljharb: OH easy, don't [13:47:11.0000] my calculus teacher would be horrified [13:47:12.0000] ljharb: 0 [13:47:15.0000] shu: sleep [13:47:40.0000] how do you express the limit of an integral approaching 1 from the negative direction? :P [13:48:17.0000] touché [13:49:26.0000] ljharb: suppose we go with option 2, to me the most obvious way to do that would be different iterator types for map, filter, take, drop, etc. [13:49:42.0000] ljharb: so, different internal slots for each [13:49:49.0000] and every method has a brand check [13:50:52.0000] Bakkot: +1 re -0 [13:51:25.0000] so many NaNs and yet two zeroes is too many [13:51:41.0000] *two 0s [13:52:23.0000] jorendorff: sure, seems right to me [13:52:42.0000] jorendorff: altho it also seems doable as a single object type [13:52:50.0000] ljharb: ok, right, I'm thinking about that now [13:53:13.0000] it might get weird with some of the types tho [13:53:15.0000] they do all have something in common, which is that they all have a single source iterator... except there's `Iterator.prototype.flatMap()`, the sole exception [13:53:24.0000] that doesn't have a source iterator? or it has multiple [13:53:41.0000] (those were questions, not statements) [13:54:10.0000] I think you'd have an abstract op which returned a list of values to yield, and everything except flatmap would return a list of length exactly 1 [13:54:14.0000] boom, no more special case [13:55:07.0000] ok, so if we do this, we can have a common implementation of throw and return shared by all the iterator helpers [13:55:14.0000] the common thing needs a name [13:55:35.0000] and the common thing would just be "innerIterator?.return()` etc? [13:55:36.0000] if they're different objects, the common thing would be spec-internal, right? [13:55:41.0000] Bakkot: wait, actually I didn't follow that [13:55:43.0000] so the name doesn't matter so much [13:55:45.0000] or sorry `innerIterator.return?.()` [13:55:51.0000] IteratorHelperReturn or whatever [13:56:26.0000] Bakkot: "abstract op which returned a list of values to yield" I don't understand when this abstract op is used [13:56:41.0000] I... don't think I understand this scheme at all actually [13:57:03.0000] jorendorff the idea is that each helper would define such an abstract op, and the `next` would know how to invoke the abstract op [13:57:06.0000] we can talk about it more tomorrow [13:57:10.0000] hard to talk about it without code [13:57:44.0000] ok, and the helper would have abstract ops for `throw` and `return` too? [13:58:18.0000] the helper would specifically be the implementation of `.next` [13:58:31.0000] but yeah maybe? [13:58:38.0000] not sure [13:58:41.0000] have to write it out [13:59:12.0000] ok, let's meet up tomorrow and talk about it more, maybe sketch some things out? [13:59:17.0000] y [13:59:34.0000] ljharb: are you free tomorrow afternoon at 2PM Pacific time to chat? [13:59:41.0000] return/throw may also have to touch logic in the helper itself [13:59:57.0000] which is why i mentioned that it isn't ideal to have them just be methods that call the inner iterator [14:00:06.0000] jorendorff: yep, works for me [14:00:28.0000] devsnek what logic in the helper do they need to touch? [14:00:32.0000] idk [14:00:35.0000] other than "mark as stale", I guess [14:00:48.0000] flatMap is one [14:00:52.0000] ljharb: thanks very much, let's all meet here 2PM Pacific tomorrow, then we'll set up a video chat [14:01:05.0000] there could be more in the future [14:01:10.0000] I think flatMap is the only one; the others all do the same thing for throw (forward it) and return (forward it0 [14:01:16.0000] right, the only one at present [14:01:19.0000] what does flatmap need to do specially? [14:01:23.0000] close two iterators [14:01:38.0000] ah, yeah, sure [14:01:45.0000] we could have more in the future [14:01:49.0000] flatmap is `for (let iterable in this) for (let value in iterable) yield value;` [14:02:01.0000] i'd rather do the work now to have a proper way to specify generators in our stdlib [14:02:07.0000] than keep having to make weird iterator things forever [14:02:22.0000] I kind of prefer making weird iterator things forever, even if we had a proper way to specify generators [14:02:23.0000] If the goal is to produce a common type of iterator that shares some implementation details with other iterators, with common throw/return methods, [14:02:41.0000] ease of spec isn't really a priority [14:03:06.0000] i want consistency [14:03:16.0000] of how our systems behave [14:03:17.0000] that doesn't expose implementation details, [14:03:20.0000] weird iterator things forever is the consistent thing [14:03:20.0000] ...then the exact thing we are talking about as an ideal end state is... a generator [14:03:30.0000] ^ [14:03:45.0000] right, if that's the goal [14:03:49.0000] I agree weird iterator things forever is consistent with existing practice [14:03:49.0000] I don't really share that goal [14:03:56.0000] I don't object to it, but don't see why it's valuable [14:04:15.0000] ease of spec is not what I'm concerned with [14:04:17.0000] i don't want generators for the sake of generators, i want them because they handle all the reentrancy and cleanup and whatnot properly [14:04:25.0000] ease of using and understanding the spec matters to me [14:05:14.0000] i'm more concerned with ease of understanding but i also have to write all these methods so... [14:05:55.0000] anyway -- we should talk more tomorrow. thanks again for your time [14:06:41.0000] Bakkot: oh, btw - you mentioned today that you don't think programmers will try to use break/return from within do-expressions [14:07:15.0000] i feel like half of all js code is early returns [14:07:33.0000] Bakkot: i think they will :( because there are lots of expression languages, most notably Ruby and Rust but I think it's not even uncommon these days [14:08:00.0000] jorendorff did not mean to imply that [14:08:02.0000] expression languages that have weird control flow stuff like `return` [14:08:12.0000] (Smalltalk too) [14:08:14.0000] I think people won't try to end their do-exprs with declarations [14:08:23.0000] and yeah I've used the feature in ruby [14:08:24.0000] and rust [14:08:30.0000] oh, that I agree we can just call it a SyntaxError [14:09:00.0000] my comment is limited to break/continue/return [14:09:13.0000] yeah, like I say I didn't mean to imply people won't try that [14:09:17.0000] if I did say that i misspoke [14:09:36.0000] i probably misheared, i don't mean to put words in your mouth! [14:10:00.0000] The TypeScript source heavily utilizes function declarations that trail the source code that uses them. I could see function declarations at the end of a `do {}` tripping people up if they're refactoring. [14:10:26.0000] sounds like a good reason for that to be a syntax error! [14:10:42.0000] if some people are actually going to expect to get the before-declaration value [14:10:43.0000] No, that still would trip them up. [14:10:45.0000] instead of the function itself [14:11:05.0000] it would be better if function declarations don't contribute to the resulting value [14:11:09.0000] People getting tripped up on things being a syntax error is the least bad kind of people getting tripped up. [14:11:11.0000] Strong disagree. [14:11:18.0000] agree with "least bad" [14:11:40.0000] if `do { 1; function f(){} }` results in `1` and not a function, that's... not... correct [14:11:44.0000] why do you disagree? [14:11:46.0000] yeah that'd be more bad [14:11:57.0000] @chairs - can you inform the delegates of the decision of lunch break duration before tomorrow, so that I can adjust my schedule accordingly? I'm trying to fit in non-TC39 meeting during the lunch break. [14:12:07.0000] definitely more bad [14:12:09.0000] To me that argues for explicit syntax for the return value. [14:12:23.0000] sffc bterlson said above they will stick with 1 hour [14:12:27.0000] I have a slight preference for 60-minute break because of that reason (ability to schedule a meeting during prime time) [14:12:46.0000] rbuckton how so? [14:12:55.0000] You can get the return value you want by putting an expression as the last statement. [14:12:57.0000] sffc: confirm, 1 hr lunch will continue [14:13:08.0000] and putting a declaration as the last statement gives a syntax error [14:13:19.0000] Sounds good, thanks [14:13:25.0000] so you can do the things you want, and the surprising cases you can't run into [14:13:54.0000] Bakkot: separate weird comment: `yield` expressions can already return ... you just ... don't have any control over it [14:13:56.0000] Having to move the function is a mess WRT refactoring tooling [14:13:59.0000] or at least, you'll run into them immediately at dev time [14:14:05.0000] jorendorff yeah I was avoiding bringing that up [14:14:05.0000] I'm not sure what to conclude from that [14:14:15.0000] it is true but obscure and also very strange [14:14:16.0000] probably for the best [14:14:29.0000] i would conclude that making rules about what can occur in do expressions is dangerous [14:14:30.0000] i mean, it means that the spec-internal wiring [14:14:32.0000] rbuckton but at least you get an error instead of the wrong thing! [14:14:41.0000] so you know your refactor needs to change [14:14:42.0000] Consider this code: [14:14:42.0000] ```js [14:14:42.0000] const fn = (x) => { [14:14:42.0000] // 1 [14:14:42.0000] return x.map(visit); [14:14:43.0000] // 2 [14:14:43.0000] function visit(y) { ... } [14:14:44.0000] }; [14:14:44.0000] const a = fn(b); [14:14:44.0000] seems fine to me [14:14:45.0000] ``` [14:14:45.0000] If I use tooling to inline `fn` as a `do` expression, the tooling would have to move `visit`, but does it also move `// 2` with it? [14:14:46.0000] for returning from an expression, already exists and works [14:15:25.0000] rbuckton probably yes; most tooling considers comments to attach to the following statement, which is decent heuristic [14:15:55.0000] rbuckton but also I don't think "tooling which is automatically rewriting code will need to make a call about how to handle comments" is an argument which should have much weight [14:16:22.0000] ``` [14:16:22.0000] const fn = (x) => { [14:16:22.0000] // 1 [14:16:22.0000] return x.map(visit); [14:16:23.0000] // long explanation of what visit does [14:16:24.0000] // even more text... [14:16:24.0000] function visit(y) { ... }; [14:16:25.0000] }; [14:16:25.0000] ``` [14:16:29.0000] comment attachment is definitely already an intractable problem imo [14:16:48.0000] tooling usually considers all of the comments between statement A and statement B to be attached to B, unless they occur at the end of line A, in my experience [14:16:54.0000] rbuckton: if `visit` requires that much explanation, then why isn't it extracted into a separate tested module? [14:16:54.0000] so the long explanation would get moved [14:16:58.0000] I disagree, tooling is an important consideration, which is why there's a monthly tooling call [14:17:04.0000] I agree that tooling is important. [14:17:29.0000] how about if do expressions allows control flow i'll write the eslint rule to disallow it for you [14:17:37.0000] I disagree with the specific claim that "tooling which is automatically rewriting code will need to make a call about how to handle comments" is an argument which should have much weight [14:17:43.0000] that is more specific than "tooling". [14:18:52.0000] devsnek: first you'd have to convince eslint core to add the rule, under their new rules policy [14:19:13.0000] what's that policy [14:19:21.0000] devsnek I will continue having to read other code bases [14:19:27.0000] more to the point, so will everyone else [14:19:40.0000] and they will read my beautiful code that uses control flow [14:19:47.0000] and say "wow bakkot's code is lacking in this amazing pattern" [14:19:48.0000] :P [14:19:49.0000] they will read your code that uses control flow [14:19:53.0000] that part I agree with [14:20:40.0000] devsnek the policy is that they do not accept rules which just ban syntax, if you could write it with the forbidden syntax rule [14:20:41.0000] Comparison: [14:20:41.0000] ``` [14:20:41.0000] // no cf [14:20:41.0000] for (const x of ar) { [14:20:41.0000] const y = x.y; [14:20:42.0000] if (y === null || y === undefined) continue; [14:20:42.0000] ... [14:20:43.0000] } [14:20:44.0000] // with cf [14:20:44.0000] for (const x of ar) { [14:20:45.0000] } [14:21:03.0000] ``` [14:21:04.0000] // with cf [14:21:04.0000] for (const x of ar) { [14:21:04.0000] const y = x.y ?? do { continue; } [14:21:04.0000] } [14:21:04.0000] ``` [14:21:21.0000] rbuckton that example does not make me want to allow control flow [14:21:23.0000] oi (code fragments in irccloud can be a pain) [14:21:24.0000] why is that better? [14:21:32.0000] rbuckton: yeah i may be having the opposite reaction you want [14:21:37.0000] rbuckton: which is that with cf is less readable [14:21:43.0000] i agree that it's terser [14:21:51.0000] i agree with that ^ [14:22:13.0000] and the === null || === undefined is contrived [14:22:19.0000] if the intention is to test for nullish, == undefined is fine [14:22:31.0000] shu: Its concise, same reason we have `??` now instead of `x !== null || x !== undefined ? x : y` [14:22:49.0000] `== undefined` is not fine because of `document.all` [14:22:52.0000] rbuckton: that concision did not cross statement/expression boundaries [14:22:58.0000] rbuckton: fair enough for document.all [14:23:03.0000] the point about ?? is that it is consise _and clearly expresses intent_ [14:23:22.0000] having a `const y =` which is also sometimes a `continue` does not, to me, clearly express intent [14:23:28.0000] no but motivating examples should not be this ... extremely specific [14:23:34.0000] It seems strange to be able to do `x ?? do { throw ... }` but not `x ?? do { continue; }` [14:23:40.0000] why? [14:23:44.0000] expressions can throw, that's normal [14:23:48.0000] expression can't continue [14:23:54.0000] exceptions are exceptional [14:23:55.0000] a statement is a statement. [14:24:17.0000] I don't think that's a distinction users really think about. [14:24:24.0000] `if` is a statement, but does something exprsesions can do [14:24:25.0000] that's fine [14:25:15.0000] i can sympathize with the desire to check all the boxes for all the statements, even though i disagree [14:25:44.0000] i also have an additional reason to ban, which is i don't really think it's worth either spec authors' time nor implementers' time to work through the corner cases like loop headers [14:27:12.0000] there's a lot of edge cases, yeah [14:27:30.0000] Bad alternative: [14:27:30.0000] ``` [14:27:30.0000] const sContinue = Symbol(); [14:27:30.0000] for (const x of ar) { [14:27:30.0000] try { [14:27:31.0000] const y = x.y ?? do { throw sContinue; } [14:27:31.0000] } [14:27:32.0000] catch (e) { [14:27:32.0000] if (e === sContinue) continue; [14:27:33.0000] throw e; [14:27:33.0000] } [14:27:34.0000] } [14:27:34.0000] ``` [14:27:43.0000] yeah, people can write bad code if they want [14:28:02.0000] so the desire to have universal availability of statements at least has a caveats that the corner cases need some explanation. we can of course define _something_, but i reckon in the end it'll be more surprising that not. we can selectively ban, but that's an equally careful task to carry out, one that i am not happy to allocate staff to [14:28:12.0000] I don't find "people can use this bad alternative" a good reason to allow a thing [14:28:19.0000] I do not expect people to actually write that in practice [14:28:30.0000] instead of your first non-cf example [14:28:57.0000] you can do arbitrary non-structured control flow if you reloop your code today, is that a reason to add goto? [14:29:01.0000] i mean i would personally love goto [14:29:15.0000] At least with banning we can relax that later if there is enough interest in community. I'm not going to die on the hill of `break/continue/return` in `do{}` as I don't have a strong opinion. [14:29:20.0000] shu: as far as `return` is concerned, I don't think there are necessarily any new corner cases to work through; since `yield` already exists, anything to do with expressions returning has already been sorted [14:29:56.0000] jorendorff: i don't follow [14:30:01.0000] rbuckton: i think that you wouldn't be alone in jumping on board an immediate follow-on proposal to relax the ban [14:30:13.0000] shu: The only `goto` I want would be to jump to a specific falling switch case (as in C#). [14:30:20.0000] s/falling/following [14:30:44.0000] jorendorff: mechanically being like return doesn't mean programmers think about them similarly, and my impression is that they're not thought of similarly [14:31:11.0000] shu: was in response to the specific point that it wasn't worth spec authors' or implementors' time to work through special cases [14:31:19.0000] But in C#'s case it's `goto case ...` [14:31:23.0000] jorendorff: ah, okay, and for return you're saying that's not true [14:31:27.0000] jorendorff theere is one new edge case, which is `return` in parameter expressions [14:31:35.0000] but yeah it's not nearly as bad as `break` [14:31:42.0000] Bakkot: fantastic [14:32:02.0000] Bakkot: yield is simply banned there, suggesting the same for return [14:32:19.0000] yeah, it's not too bad [14:33:15.0000] Banning `break`/`continue`/`return` is purely banning syntax. If they weren't banned the existing spec machinery would already cover how their handled. The downside of banning them is that it makes the spec more complex rather than less. [14:33:50.0000] rbuckton: i don't think it would? because it could happen from a bunch of new places [14:33:53.0000] You also have to ban break/continue/return in eval in a `do` [14:33:58.0000] i'm not sure the spec says clearly what `for (do {break};;)` ought to do [14:34:02.0000] rbuckton: yeah, part of the reason I'm advocating for just banning `break/continue/return`, instead of e.g. having `return` mean "provide this value from the `do`", as some have suggested, is so that the restriction can be relaxed later if there is enough community and implementor interest and someone works through all the edge cases [14:34:24.0000] rather, i'm not sure it does what we would want [14:34:28.0000] rbuckton they are already banned [14:34:39.0000] you cannot `break` out of an `eval`, even a sloppy direct eval [14:34:51.0000] or return, sads [14:35:00.0000] fair [14:35:29.0000] (presumably for the same reason as I am proposing not to let you `break` out of a `do` :P) [14:36:02.0000] /me registers doubt [14:36:28.0000] Bakkot: by that you mean this? `for (...) do { break; }`? [14:36:59.0000] or this: `do { break; /*early exit from the do itself*/ }`? [14:37:03.0000] first one [14:37:07.0000] k. [14:37:17.0000] heh: `do { it: break it; }` [14:37:25.0000] that was one of my examples! [14:37:30.0000] actually slightly more complicated [14:38:24.0000] ...can you `yield` within a parameter expression [14:38:35.0000] banning break/continue is would just be changing how labeled evaluation works, correct? Or are you going to try to make `break`/`continue` syntactically invalid in the grammar? [14:38:36.0000] Ah, jorendorff seems to be saying they're banned there, ok [14:39:23.0000] rbuckton: i was imagining early error static semantics [14:39:36.0000] i was also imagining EESS [14:40:15.0000] banning the control flow in loop headers and function parameters is fine [14:40:17.0000] That's fine, just concerned about grammar complexity. [14:40:57.0000] rbuckton the grammar is already set up not to allow an unlabeled `break` outside of a loop, or a `break l` out side of an `l` [14:41:31.0000] making it so that there are no labels or loops visible to the `do` is actually easier than propagating that information through all expressions [14:41:33.0000] (by a lot) [14:41:45.0000] not really [14:41:51.0000] you have to explicitly ban it using early errors [14:41:58.0000] The grammar for `do {}`? Because there's no grammar restrictions in the spec: https://tc39.es/ecma262/#prod-BreakStatement [14:42:10.0000] or a parameter [14:42:13.0000] devsnek you'd have to explicitly allow it, too [14:42:18.0000] no you wouldn't? [14:42:27.0000] there is an early error for `break` outside of loops [14:42:37.0000] but not one for break inside blocks [14:42:43.0000] to allow `for (;;) { (do { break;} ) }` you need to make the error not trip [14:42:52.0000] nothing explicitly allows `x: { break x; }` [14:42:56.0000] er [14:43:09.0000] `x: { { break x; } }` [14:43:29.0000] you don't need to add anything for `x: { do { break x; } }` to work there [14:43:49.0000] yes, you do [14:44:01.0000] you need to modify `ContainsUndefinedBreakTarget` to not error in that case [14:44:03.0000] currently it would [14:44:30.0000] (ok it might not, but it certainly would for e.g. `x: if(do{break x;}) ;` [14:44:31.0000] ) [14:44:31.0000] LabelledEvaluation doesn't apply to expressions, so the labelSet wouldn't be populated. [14:44:36.0000] right [14:44:37.0000] so [14:44:38.0000] it would error [14:44:52.0000] ok true labelled evaluation would need to be updated [14:45:19.0000] labelled evaluation is runtime semantics [14:45:24.0000] you'd also need to update the static semantics [14:45:25.0000] indeed [14:45:51.0000] are you sure about the if statement? [14:45:57.0000] devsnek: a different example might be this: `switch (x) { case 0: do {break; } }` since it would have passed the `ContainsUndefinedBreakTarget` check [14:46:18.0000] Or `do { do { break; } } while (true);` ;) [14:46:27.0000] lol [14:46:29.0000] got it [14:46:55.0000] devsnek I am not sure if it would error. But either it would error, or `x: if(do{break y}); ` would not. so it would need to be updated one way or the eother. [14:47:25.0000] you'd definitely to propagate the about labels/breaks through expressions, where currently and with my proposed semantics you do not need to do that. [14:47:44.0000] i'll write up the changes for that if you want [14:47:46.0000] so, yeah, like I said; it's actually strictly simpler to spec my propose semantics. not that this should have much weight [14:47:48.0000] nah [14:47:55.0000] I don't think spec difficulty should matter, like I say [14:48:09.0000] this was just a response to rbuckton's concern about the spec difficulty of my proposed semantics [14:52:04.0000] devsnek: Other iterator prototypes have a toStringTag, like . [14:52:07.0000] devsnek: is it intentional that %WrapForValidIteratorPrototype% does not? [14:52:51.0000] no [14:53:06.0000] ok, i'll ask adam if he can file a PR to add it [14:55:20.0000] rbuckton: so i think i can be convinced that selective banning may be the desirable solution as a follow-on, especially if a version without control flow is shipped first [14:55:31.0000] and we get to see what the uptake is like [15:47:10.0000] hmm. are do-expressions already in any of the compile-to-js languages? [15:47:27.0000] curious to know what the uptake is like already [15:48:26.0000] Babel? [15:48:52.0000] jorendorff: lots of us do a lot of strong advocacy for people to never use pre-stage-3 proposals, so it may not be that clear a picture [15:48:57.0000] @jorendorff jridgewell https://babeljs.io/docs/en/babel-plugin-proposal-do-expressions [15:49:46.0000] babel's is broken-ish though [15:50:01.0000] but still popular with jsx, I think [15:50:42.0000] Yah, I think JSX expressions is the biggest usecase [15:51:41.0000] [Repl](https://babeljs.io/repl#?browsers=ie%2011&build=&builtIns=false&spec=false&loose=true&code_lz=MYewdgzgLgBCMF4YBN4G8BQMYEsBmMAFFAE4CuApgJQybbamVYwC-MFANhBbc9ngEMuFZiwwsgA&debug=false&forceAllTransforms=false&shippedProposals=false&circleciRepo=&evaluate=true&fileSize=false&timeTravel=false&sourceType=module&lineWrap=true&presets=stage-1&prettier=false&targets=&version=7.10.2&externalPlugins=) 2020-06-02 [07:56:30.0000] akirose: damn that's a nice ecma mug [07:56:50.0000] my coffee is too hot to drink 😭 [07:57:04.0000] but yes it sure is an Ecma mug [07:57:10.0000] 🥳 [07:58:04.0000] when i was in geneva last year a couple of us raided the swag closet [07:58:08.0000] i got an umbrella too [07:58:23.0000] there’s umbrellas?! [07:59:24.0000] yep [07:59:28.0000] we are all jealous [08:00:58.0000] my inner rihanna must have one [08:03:34.0000] My computer had a forced update. I’ll join the meeting soon [08:07:54.0000] we are about to start String#replaceAll [08:10:35.0000] that was in july last year, right? [08:11:01.0000] 👏 [08:11:56.0000] 👏 [08:12:12.0000] congrats on the Stage 4 (pending editors)! [08:13:23.0000] i hope we all reviewed before this meeting, we try to anyway [08:18:26.0000] jridgewell: btw logical assignment will be stable by 85 *with* NamedEvaluation, was a trivial patch [08:24:25.0000] not everything we do has to set a precedent [08:24:43.0000] and yet, everything we do tends to [08:25:19.0000] this same topic came up yesterday with iterator helpers [08:25:55.0000] @jridgewell, can you complete your question in notes? [08:26:54.0000] ystartsev: What does l,34 mean in the notes doc? [08:27:07.0000] msaboff: i had the same question [08:27:32.0000] mathiasbynens: ^^ [08:27:58.0000] mathiasbynens: me too, no idea who added it or what it means [08:28:15.0000] is Philip Chimento here? [08:28:27.0000] pipobscure, no? [08:28:36.0000] robpalme: can I take a message? [08:28:59.0000] for more info, if you wonder how the AggregateError ctor order is observable, see the last test case here: https://chromium-review.googlesource.com/c/v8/v8/+/2139571/34/test/mjsunit/harmony/aggregate-error.js#1 (the last test, AggregateErrorCreation) [08:29:07.0000] enquiring if he is able to present Temporal now (after the current topic) [08:29:27.0000] robpalme: that's the plan 😇 [08:29:33.0000] Let me make sure he's in the meeting. [08:30:10.0000] specifically after Promise.any and *before* Unicode [08:30:31.0000] oh, right. I'll let you know in a sec. [08:31:50.0000] shu: 🙌, thanks! [08:31:57.0000] robpalme: yes, they can do it 😄 [08:32:25.0000] thank you - we'll make it next and unicode will follow it (they are swapped) [08:32:48.0000] great, thanks for the heads up. [08:33:17.0000] First convert to list, then call super, then assign errors? [08:34:01.0000] rbuckton: that would be fine with me, but the impl pushback was "prefer not to run any code before calling super" [08:34:42.0000] the issue is https://github.com/tc39/proposal-promise-any/issues/14 [08:38:54.0000] shu I'll add that AggregateError change to my schedule for tomorrow, should be super quick [08:39:27.0000] rwaldron: +1 awesome [08:46:53.0000] What is the phone number for today's Teams call so I can call in for audio? (please DM it to me) [08:48:06.0000] sffc: dm sent [08:48:51.0000] rwaldron: both changes? :) [08:50:15.0000] mathiasbynens any test changes necessary to address https://docs.google.com/presentation/d/1juwk662pDATPCPqPxlE8M9rBGeA9zAp0_sJBoxu3eMc/edit#slide=id.g8753e62b92_0_16 [08:50:27.0000] Unless you're referring to something else? [08:50:46.0000] Looks like you an I are literally "on the same page" [08:50:54.0000] rwaldron: yeah those are the two changes [08:51:24.0000] rwaldron: just wanted to double-check you heard both discussions (since you said “change” not “changes”) [08:51:41.0000] rwaldron: \o/ thanks! [08:53:10.0000] rwaldron, afaics the order in which the aggregateerror ctor does stuff is not tested in test262, but it could be (see the link i posted above) [08:53:35.0000] the tests in AggreagateErrors/errors must be rewritten, pretty much [08:55:06.0000] marja_ thanks [08:55:28.0000] should be, imo [08:56:01.0000] how do you overflow bigints? [08:56:02.0000] oh [08:57:21.0000] a BigInt value in an internal slot? [08:57:30.0000] that makes no sense, they could just use mathematical values [08:58:00.0000] they may be thinking in terms of the polyfill [08:58:18.0000] oh, dumb question - what would mathematical values mean here? [08:58:29.0000] like, spec only values? [08:58:32.0000] that [08:59:02.0000] I'm glad temporal continues the legacy of copying java by adopting their builder pattern [08:59:56.0000] ^ this definitely reads as sarcasm but I'm not 100% sure it is? [09:00:32.0000] I mean, there's definitely enough factory functions in there. [09:00:37.0000] so guilty as charged, I guess [09:01:56.0000] +1 to defaulting to the iso calendar. bug potential isn't worth the heavy cost of specifying a calendar before every operation when 99%+ of all temporal usage will be in the iso calendar [09:02:36.0000] michaelficarra: The BigInt mattered because they were talking about the return value of `.valueOf()`, it's not just internal [09:04:10.0000] right, plus `Date` and friends can return a number. [09:04:45.0000] but then it'd make comparisons almost instantly fail once you mix with something with `Time`. [09:05:02.0000] TabAtkins: it's easy to make a BigInt from a mathematical value in valueOf [09:05:59.0000] michaelficarra: Yes, there was no problem with producing a BigInt. "Return a BigInt" was just one of the presented options (the other was throwing) [09:06:42.0000] TabAtkins: my comment was in reference to their statement that a BigInt was used in an internal slot, before we started talking about valueOf [09:06:51.0000] Ah kk [09:07:58.0000] see line 10 from this topic's notes if you want to read back [09:16:02.0000] sffc: isn't adding a day calendar-dependent if you're crossing a year or month boundary? [09:18:03.0000] ljharb: The day still advances the same for all calendars, no? The displayed value in a given calendar can care, but it's still a 24-hour advancement [09:18:26.0000] ah, i see [09:18:32.0000] what about over leap days? [09:18:35.0000] oh lol i was joking, i regret bringing up martian days [09:18:36.0000] leap days are 23 or 25 hours [09:19:02.0000] ljharb: Hm, that's a good point [09:19:08.0000] ljharb: worth bringing up [09:19:10.0000] I'll do so [09:19:21.0000] thanks [09:19:23.0000] ... by "leap days" do you mean "days on which DST changes"? [09:19:33.0000] Feb 29 is normally 24 hours [09:19:35.0000] oh duh sorry [09:19:36.0000] yes [09:19:46.0000] daylight savings days, not leap days. early morning brain hiccup [09:44:25.0000] is chris garrett here? [09:48:41.0000] michaelficarra: adding the prose as non-normative would still addresses some of your concerns, right? [09:49:58.0000] mathiasbynens: that prose would be an improvement regardless [09:53:21.0000] that’s what i thought, but when michaelficarra said he’d be “fine” with it i wasn’t sure anymore [09:57:22.0000] well it's a nice improvement, but it doesn't actually address the concerns I had [09:57:48.0000] same [09:58:00.0000] what's the next step of decorator? [09:58:05.0000] As far as I can tell, nothing has changed yet with decorators, this primarily was providing information on the type of analysis that has been ongoing. [10:00:38.0000] re longer lunch break, i appreciate the 1 hour break to be able to help out with kids; assuming it's similar for other folks who have whatever outside responsibilities [10:12:39.0000] For whatever reason I can't get Edge or Chrome to pick the correct webcam to use on spatial.chat [10:29:55.0000] rbuckton: same, using firefox prompted me for the webcam to use [10:46:19.0000] took me this long just to cook my food [10:46:26.0000] so i am ++ on hour lunches [10:46:36.0000] also, it's bad, but i'll take that to TDZ [10:51:16.0000] Is the schedule on hackmd.io still up to date? [11:02:37.0000] we are starting Function Impl Hiding now [11:05:27.0000] sffc: close [11:05:36.0000] i still need to catch up on what i missed before lunch [11:06:07.0000] I assume Intl.NumberFormat v3 is moved up to 2pm local time, and Intl.DurationFormat up to 2:20pm local time? [11:07:19.0000] assuming Function Implementation Hiding sticks to exactly 60 min, yeah? i think so? [11:18:55.0000] fyi we'd be fine with being able to disable statically (for example, with a startup flag). I guess for this to be possible the feature would need to be optional? [11:19:31.0000] you could just have a non-conforming implementation when the flag is on [11:19:59.0000] right [11:25:57.0000] when is the library call? I'd like to join too [11:26:46.0000] I actually really like the "hide from stack traces" aspect [11:26:53.0000] i really like both :-( [11:27:15.0000] ystartsev: really glad you said all that, I assumed that it was too much of a done deal to speak up at this point [11:27:28.0000] i'm very surprised that this is a common sentiment [11:27:33.0000] Using Error helpers pollutes my error logging a ton [11:27:35.0000] stage 2 is supposed to mean "we are planning to put this in the language" [11:27:49.0000] i need to look at how this was moved into stage 2 [11:27:54.0000] what is the expectation when reporting errors on libraries with stack hiding? wouldn't it make harder for authors to debug issues? [11:27:56.0000] We had to build a GitHub bot that stripped out the useless crap from error reports to focus on the actual code [11:27:59.0000] if multiple delegates/implementors had this opinion much prior to now, then it shouldn't have been stage 2 in the first place. [11:28:00.0000] but i think we were under the impression that it would also have a performance improvement [11:28:14.0000] ystartsev really well spoken and thought out :) [11:28:18.0000] ystartsev: is that something knowable prior to implementations and stage 3? [11:28:26.0000] yes [11:28:30.0000] here's the notes from that outreach call: https://docs.google.com/document/d/1vvL357Z6r9IYTItvNwBf0wRH-uT4J_bAFIqnbQb-13I/edit#bookmark=id.xscidqxjp5nf [11:28:31.0000] we know that this will not have an improvement [11:28:32.0000] k [11:28:46.0000] I believe that some of the use cases *were* blackboxing (but it's possible I misunderstood people) [11:29:04.0000] that question should have been a new topic i guess [11:29:08.0000] yes that is how i understood it as well [11:29:59.0000] hiding source also would have prevented angular 1 from making "changing argument names" a breaking change. [11:30:39.0000] I don't think it would? [11:31:09.0000] That requires the angular user to be proactive, though [11:31:10.0000] I think we discussed the Angular and lack-of-memory-improvement issues when proposing this for Stage 2, but IMO if Mozilla has serious concerns now, we shouldn't discard them at this point. [11:31:13.0000] jridgewell: true [11:32:45.0000] i take yulia's point, and am a "weak accept" on "hide source" in that it doesn't seem to hurt, but i have serious concerns about "sensitive" [11:34:19.0000] shu: i'm a strong +1 on hide source and also have concerns about "sensitive", fwiw [11:34:53.0000] Note, there's a separate tools call, but we haven't discussed function implementation hiding as far as I can tell in the notes https://docs.google.com/document/d/1RlnAnMa4QzQUK_tNOHdWfnske2X9KZ_e90VBG-DWqUo/edit [11:35:14.0000] i am really sorry michaelficarra. let's keep talking about it and i will join thosee other calls [11:35:48.0000] ystartsev: I understand it's not personal [11:37:39.0000] /me this is what I really like about this committee, maturity and mutual respect! 🙏 [11:37:51.0000] i am not understanding leo's point [11:38:11.0000] blocking the proposal overall vs blocking the stage advancement request? [11:38:45.0000] rickbutton: the latter [11:38:55.0000] I don't think the former is actually a thing [11:39:07.0000] right, I believe LBR's comment was to specify specifically the latter [11:39:29.0000] unless I misunderstood [11:41:17.0000] shu: my purpose was disambiguation in the notes. As I said, my topic was a meta discussion on the wording we use. It was easily fixed as we all had the context fresh [11:41:18.0000] for the people questioning the security implications of stack inspection, please review my slides here: https://docs.google.com/presentation/d/15IWa2HM4sYUWmN_orRGFZ4H1D0AsZO4IcNliY68FwBE/edit [11:41:35.0000] this is Intl.NumberRange for Stage-2 [11:42:23.0000] robpalme: yes, but Intl.NumberFormat **V3** for Stage 2 [11:43:04.0000] michaelficarra: our security stance is based on the situation with spectre, anything that is presented as a security feature without taking into consideration spectre is considered to... basically not fulfill the security requirement. I know you have a different stance here and I respect that. From the browser perspective I don't think this will change any time soon [11:43:22.0000] good clarification leo [11:44:18.0000] leobalter: thanks [11:45:10.0000] michaelficarra: chrome basically agrees with that view re: "security" in context of JS [11:45:40.0000] because JavaScript can't be made secure on systems affected by spectre, it can't be be made secure on any systems? that seems backwards to me [11:46:02.0000] preventing info leaks via a side channel that JS execution itself attempts to lock down is not that compelling, in that we aren't in a position to dictate to all present and future web APIs that they must respect this [11:46:08.0000] plus, timing is the primary side channel still [11:46:54.0000] michaelficarra: i don't think anyone claimed something that general [11:47:16.0000] but favoring systems that are not affected by spectre is a theoretical concern from my POV [11:47:22.0000] s/favoring/securing [11:48:11.0000] It comes down to whether the feature is worth implementing. Security would not be a benefit here, and could potentially harm users and developers alike on the web due to false assumptions [11:48:20.0000] I continue to be sad about the loss of a scale option. It'd be really useful! [11:48:49.0000] it might benefit the few systems that are not exposed to spectre, but those are few and do not have as significant an impact on users as something the scale of the web [11:49:00.0000] since this has this double edge, it would be better not to introduce it [11:50:12.0000] My understanding from the framework notes was that people sort of wanted this for blackboxing... then, it sounded like omitting the stack frames from reflection APIs was more of a minus than a plus [11:50:20.0000] maybe I misunderstood; michaelficarra could clarify [11:50:26.0000] so because of spectre, we've given up on allowing untrusted code to execute in the same realm following trusted code? how are websites supposed to integrate third party modules? [11:51:44.0000] I am much more surprised by this backpedaling on the security goal than I am the rejection of "hide source" [11:51:49.0000] the security model that the web is following now is around process isolation and same origin sources (which, i am sure you know, but in case anyone wasn't aware) [11:52:27.0000] so, third party modules are seen as the responsibility of the site that runs them [11:52:33.0000] michaelficarra: because of spectre, features that enable "safer" execution same-process non-isolated JS code shouldn't be advertised as having "security benefits" [11:52:41.0000] ^ exactly [11:53:01.0000] This isn't a backpedaling, its been an established position of browsers for some time now [11:53:03.0000] that's quite the renouncement of SES, then [11:53:22.0000] i am surprised you are surprised by my opinion on SES [11:53:31.0000] ystartsev: I see it as backpedaling because we acknowledged the problem when we moved my initial proposal to stage 1 [11:53:43.0000] SES has a much higher bar now, yes. [11:54:19.0000] I think SES attempts to limit side channels like timing, fwiw [11:55:59.0000] can invited experts be reviewers? [11:56:09.0000] It might have been a mistake but i thought blocking something from stage 1 could only be for very specific things that had been discussed before? [11:56:20.0000] chicoxyzzy: I don't see why not [11:56:23.0000] chicoxyzzy: yes afaik [11:56:41.0000] ystartsev: blocking stage 1 means you don't think it's worth committee time to keep discussing it [11:56:53.0000] I'd like to be a reviewer if possible [11:56:59.0000] (and really this isn't "blocking", it's "not agreeing to advancement", regardless of how we phrase it) [11:57:00.0000] ystartsev: stage 1 acknowledges the problem, stage 2 agrees on a general solution, stage 3 solidifies a solution and asks for implementation [11:57:28.0000] ok, i don't think that was the case for stage 1. its not like it was something that we didn't need to discuss and at the time there was more of an argument in favor of the proposal [11:58:16.0000] sure, I understand that our strategy for security on the web has shifted since the initial move to stage 1 [11:58:21.0000] still surprised me though [11:58:39.0000] yes, it is unfortunate that this came as a surprise, and i am sorry for that [11:59:22.0000] I do think it was time well spent at committee, and i think a lot of good work came out of this [12:00:16.0000] chicoxyzzy: That'd be great! I think you should be able to be a reviewer. I am happy to answer any questions [12:00:55.0000] cool! thank you Daniel! [12:02:34.0000] chatting with waldo, I might review shadowing him [12:02:50.0000] cc sffc (so you might have a "joint mozillian review" there) [12:03:15.0000] 😊 [12:03:18.0000] littledan: sffc: should I leave a comment somewhere? [12:03:49.0000] maybe we should have a Stage 3 review issue, and we can collect the list of reviewers there [12:04:06.0000] also ryzokuken and I might jointly do the Igalia review [12:04:31.0000] extra points for the prince of persia screenshot [12:04:38.0000] so that's three reviews [12:04:54.0000] robpalme: indeed [12:05:01.0000] I love the work being done in 402 [12:05:02.0000] Thanks, everyone! Also note that we will also need reviewers for the Intl.DurationFormat proposal. I'll make sure everyone here is mentioned in the meeting notes. [12:05:23.0000] sffc: I will review DurationFormat [12:05:34.0000] (and I can't volunteer for that one 🙈) [12:05:38.0000] michaelficarra: thanks! [12:07:09.0000] Was the spec text for Intl.DurationFormat up prior to the meeting? I recall looking yesterday and the spec link on the repo was empty [12:08:19.0000] It's been in a PR [12:08:35.0000] is there still another reviewer needed for Intl.DurationFormat? any requirements to be a reviewer? [12:08:37.0000] A couple people have left feedback on the PR [12:08:55.0000] Ah, I didn't see the PR, thanks! [12:09:03.0000] rickbutton: last year i did a "shadow review" with domenic, it was really helpful [12:09:05.0000] rbuckton: yeah, it was a PR that was finalized and merged recently. Sorry for the delay. [12:09:14.0000] i want to do it a couple more times just to find my feet [12:09:23.0000] so, might be a nice way for you to ramp up also? [12:09:31.0000] ystartsev: that sounds like a great idea [12:10:10.0000] i think that might be a good way to expand our pool of reviewers, *looks at other members of the committee who are nervous about reviewing. * [12:12:06.0000] ✋ [12:12:20.0000] don't be afraid [12:12:22.0000] it's fun [12:12:52.0000] we should mark "good first reviews" and pair people up [12:13:07.0000] I'm already doing this for Intl.Segmenter [12:16:00.0000] segmenter would be fun [12:19:28.0000] sffc: waldo and i are pairing on the review, i will add it to the notes [12:21:04.0000] I'm happy to review as well but Ron beat me to it :P [12:21:11.0000] lemme know whether a third is desired [12:21:23.0000] rkirsling: I don't see why not! 😄 [12:21:48.0000] I'll make a PR to the explainer adding you three. Thanks everyone! [12:21:57.0000] 👍 [12:24:21.0000] this is Symbols as WeakMap keys for Stage 1 [12:28:35.0000] … and now we consider SES again? [12:31:05.0000] petition to move on from this topic [12:31:21.0000] (meaning the "box" thing, in particular) [12:31:29.0000] guess we now are moving on [12:31:50.0000] Bakkot: are you suggesting we think outside the box [12:32:02.0000] also Fiddler is definitely not obscure [12:32:25.0000] sffc: you sound like you're in a different room [12:32:32.0000] and screaming into our room [12:32:56.0000] is your device maybe using the wrong mic? [12:33:06.0000] BoxMaker reminds me of Monads. [12:33:37.0000] i think you mean "the container that must not be named" [12:34:17.0000] ^ nods [12:34:51.0000] feeling a huge compulsion to argue about whether monads are containers [12:35:10.0000] oh noes [12:35:16.0000] /me points at tdz [12:35:19.0000] march, mister. [12:35:19.0000] ^ [12:35:23.0000] um, call ended? [12:35:30.0000] no [12:35:33.0000] weird, must just be me [12:35:42.0000] maybe i accidentally pushed the button on my airpod [12:35:56.0000] ha, airpods [12:36:39.0000] Bakkot: would love to hear more! [12:36:51.0000] due to the fact that Dan invited clarifying questions during his presentation, pls lmk if any of y'all feel strongly that your queue items should interrupt (or just use the "clarifying question" button) [12:37:30.0000] akirose: i added a topic because mine's "more of a clarifying comment" [12:37:38.0000] /me nods [12:39:08.0000] akirose: it says I'm muted on Teams [12:39:46.0000] We muted you [12:39:51.0000] yes it does. [12:39:59.0000] Oops, sorry about that [12:40:19.0000] all good [12:40:21.0000] I got up to get a drink [12:40:28.0000] and was talking in the other room [12:40:50.0000] ljharb I'm not claiming this isn't motivated without records [12:40:56.0000] just that it is not _worth it_ without records [12:41:08.0000] I am aware of the motivation; you can read the existing discussion on github [12:44:20.0000] gotcha [12:44:58.0000] even without records, the template use case could still be a deeply frozen object, combined with a weakmap [12:48:50.0000] can anyone help me to find the definition for Temporal.Date.compare? [looking into the ployfill] [12:49:21.0000] howdoi: the docs are https://github.com/tc39/proposal-temporal/blob/main/docs/date.md#temporaldatecompareone-temporaldate-two-temporaldate--number [12:49:22.0000] https://github.com/tc39/proposal-temporal/blob/61b88049ea2f8e099121ceb762b6465a8c161c10/polyfill/lib/date.mjs#L156 this? [12:49:46.0000] Yeah, that looks like it [12:49:52.0000] cool, thanks [12:50:05.0000] howdoi: yep, that's it. [12:50:09.0000] but actually, also not. [12:50:12.0000] we have a PR [12:50:18.0000] for adding calendar logic. [12:50:31.0000] I think the compare method doesn't delegate to the calendar [12:50:37.0000] oh [12:50:38.0000] because we always compare in ISO space [12:50:41.0000] wait, yeah [12:50:48.0000] oof, my bad. you're right. [12:51:35.0000] Relevant discussion: https://github.com/tc39/proposal-temporal/issues/625 [12:51:57.0000] I am massively in favor of this, I literally ran into this problem last night [12:52:00.0000] what is the name for the tdz chat? couldn't find it in a quick look through how-we-work / how-to-attend-meetings [12:52:06.0000] *compiling to wasm [12:52:09.0000] brad4d: temporaldeadzone [12:52:54.0000] > Comparison and equality of dates with different calendars [12:52:54.0000] Exactly was my next question! [12:53:51.0000] I'm vaguely +1 on this proposal [12:54:16.0000] would be useful, if the user could define a custom comparator? sffc ryzokuken [12:54:39.0000] well, you could always convert all dates to a single calendar and then compare... [12:54:46.0000] The comparator is literally only the compare method. You have to call the method to use it [12:55:00.0000] we also considered allowing comparison if one of the calendars was ISO [12:55:11.0000] For example, you have to pass Temporal.Date.prototype.compare into Array.prototype.sort [12:55:36.0000] The comparator is not implicitly used anywhere [12:56:00.0000] I think that's how it works at least [13:39:58.0000] Temporal types now have a compare prototype member? Last I checked it was just a static compare [13:40:25.0000] rbuckton: just static compare indeed [13:40:50.0000] sffc: might've mistyped [13:41:06.0000] it's just `Temporal.Date.compare`, no prototype [13:41:38.0000] oooh, btw, dunno if you noticed, but we added a `.d.ts` 😇 [13:43:26.0000] I am working on a draft for adding `@@equals`, `@@hash` (for use with Map/Set/user-defined equality comparisons), and `@@compareTo` for relational comparisons. Note that neither has anything to do with operator overloading and doesn't affect equality or relational operators. Its based on what I did here: https://esfx.js.org/esfx/api/equatable.html, and here: [13:43:26.0000] https://esfx.js.org/esfx/api/collections-hashmap/hashmap.html#_esfx_collections_hashmap_HashMap_class [13:44:00.0000] rbuckton: like for a proposal? or for your library [13:44:19.0000] A proposal. My library consists of things that I'd eventually like to propose [13:44:22.0000] rbuckton: you may want to wait for the "generic comparison" proposal on thursday [13:46:06.0000] I've talked briefly (at least in the irc) about alternatives to some of the proposals for handling equality in Map keys, such as providing an "equaler" (object consisting of an `equals(left, right)` and a `hash(value)` method), the HashMap class I point to above is based on that design. [13:47:27.0000] The design is inspired by `IEquatable`, `IComparer`, `EqualityComparer`, and `Comparer` in .NET, but designed around ES symbols rather than interfaces. [13:48:39.0000] Either way, I'd love to have a `Temporal.Date.prototype.compareTo` method, at least as a convenience. [13:49:03.0000] that could be a simple shorthand... [13:49:37.0000] `Temporal.Date.p.comareTo = (other) => Temporal.Date.compare(this, other);` [13:50:23.0000] Honestly, I'd like to see both static and prototype versions of both `equals` and `compare`. The prototype methods make it easier to interact directly with objects, and that static versions are highly useful when passed as callbacks. [13:50:50.0000] right. [13:51:26.0000] I'm averse to attaching members to a prototype like that that aren't part of a spec, don't want to run afoul of the issues with "flatten" [13:51:31.0000] rbuckton: I don't think that'd be too complicated either, spec-wise or otherwise. It's just a question of "is it important enough to increase the API surface?" [13:51:57.0000] which is likely less important here, since we have a ton of stuff in the API anyway. [13:52:22.0000] ryzokuken: I also bring it up because I have a library that is based on the temporal proposal because I wanted to experiment a bit. I've been updating it to the latest version of the proposal recently. [13:52:49.0000] Oh yeah, that's been a shifting goalpost for a while. [13:53:06.0000] But we'll reach a good point after the npm release in a few days. [13:53:39.0000] It uses the `@esfx/equatable` APIs so that I can use `Date`, etc. as keys in a `HashMap` from `@esfx/collections-hashmap` [13:54:01.0000] imo a prototype method implies that directionality matters [13:54:02.0000] oh wow [13:54:12.0000] or rather, matters beyond inverting the result [13:54:23.0000] ljharb: I mean, that way, `equals` should be static too. [13:54:26.0000] like, `(a, b)` and `(b, a)` should either both be zero, or both be opposite signs [13:54:52.0000] ryzokuken: yes, probably true. but for equals they should always be commutative, so that doesn't feel as necessary to imply to me [13:55:30.0000] Most of `@esfx` grew out of wanting to have a shared core API, and includes things like "collection" interfaces via symbols that can be shimmed onto builtins so that you can generically access members of an `Array`, `Map`, `Set`, etc. without having to special case for each type. [13:56:11.0000] that doesn't make much sense to me as a general goal; they often have different semantics [13:56:31.0000] https://esfx.js.org/esfx/api/collection-core.html, basically has `Collection`, `FixedSizeIndexedCollection`, `IndexedCollection`, `KeyedCollection` [13:56:55.0000] Yeah, true, but you can add items to an Array and a Set, but for Array its `push` and for a set its `add`. [13:57:43.0000] With those (and with the relevant shim), you just do `obj[Collection.add](value)` [13:58:32.0000] Or `obj[Collection.size]` rather than `Array.isArray(obj) ? obj.length : obj.size`, etc. [13:58:37.0000] and Map is more like a record/struct/object, where array and set are more like Lists [13:58:46.0000] Correct [13:58:59.0000] tbh it makes me feel that treating them generically is a category error [13:59:06.0000] However they still share common characteristics. Both have an inherent size. [13:59:11.0000] so do strings [13:59:16.0000] jorendorff ping [13:59:17.0000] Yep [13:59:26.0000] Bakkot: Good afternoon! [13:59:32.0000] but making strings iterable was a mistake :-) [13:59:42.0000] time to talk about built-in generators? [13:59:57.0000] ljharb, Bakkot, michaelficarra, devsnek, avandolder: would a Zoom meeting be OK? [14:00:02.0000] wfm [14:00:31.0000] yup yup [14:01:09.0000] ok, let's try https://mozilla.zoom.us/j/95168117347 [14:01:23.0000] A lot of popular mainstream languages work similarly for the various collection classes as well, and I've found a fair amount of use for the design even just within my own projects. [14:12:12.0000] reminds me of rust traits [14:43:24.0000] Thanks again, iterator helpers [14:43:40.0000] oops, is that a team name, do I need to order t-shirts [14:43:56.0000] t-shirts should be a stage 2 requirement [14:44:00.0000] niiice [14:44:15.0000] * should be in tdz, whoops [15:12:20.0000] I posted my understanding of our discussion in https://github.com/tc39/proposal-iterator-helpers/issues/97#issuecomment-637833039 [15:12:35.0000] devsnek in particular: take a look? [15:13:11.0000] will do [15:31:39.0000] Aww right now was supposed to be the newcomer’s event [15:40:34.0000] oh noo [15:40:48.0000] I didn't realize that was happening at all [15:41:09.0000] (or do you mean, if this were in person?) [15:41:21.0000] we could still do one 2020-06-03 [18:01:23.0000] i was writing a logical assignment test in C++ and tripped C++ trigraph warnings for ?? [18:01:59.0000] nice [18:02:01.0000] if i had known at the time of proposing nullish, who knows what my opinion would've been [18:09:55.0000] shu i actually ran into the same thing 🤣 [18:12:16.0000] drousso: beset by legacy features no matter where we work [18:12:23.0000] 😭 [18:42:10.0000] we should add trigraphs to js [18:43:07.0000] by which I mean the c ones [18:43:58.0000] shu i don't think the test262 tests for `AggregateError.prototype.errors` has been removed [18:44:23.0000] oh wait i just found the PR [18:44:27.0000] sorry 😅 [18:44:34.0000] oh what was the conclusion on that [18:45:07.0000] it should be an own property instead of a prototype accessor [18:45:18.0000] im trying to change this in JSC right now [18:45:26.0000] nice [18:47:23.0000] damn, Yusuke reviewed it before I even knew it existed [18:47:25.0000] lol [18:48:57.0000] rkirsling i asked him :P [18:49:14.0000] rkirsling also, i think i have a fix for the `foo ??= function() {}` change :) [18:49:41.0000] yeah I'm teasin', I know he reviewed the original (and gave lots of comments I wouldn't've been equipped to give) [18:51:12.0000] was it decided that it should get the name [18:51:45.0000] yeah [18:52:30.0000] woo [18:52:56.0000] I think by saying "woo" now you just expressed the most energetic sentiment there [18:53:29.0000] people seemed to be pretty meh on the whole whether agreeing or disagreeing 😅 [18:54:28.0000] i genuinely could go either way on this lol [22:23:00.0000] yikes. guess it's good we switched away? https://twitter.com/NicoAGrant/status/1268020841054269440 [22:38:57.0000] personally i'd prefer name inference not exist, but i'm a -0 on adding it in new places [22:39:24.0000] rkirsling: i mean, that kind of presumes microsoft and google don't cooperate with law enforcement [22:40:26.0000] perhaps [22:40:29.0000] just seemed poorly put [22:41:18.0000] well sure, zoom is a garbage company. but their product is miles ahead of everyone else, and there's sadly not many companies that don't cooperate with law enforcement; we just don't hear about most of them. [22:41:29.0000] (also we'd be using a premium zoom account if we used it) [22:42:45.0000] fair enough... [08:11:15.0000] I'm very excited about the extensibility of module attributes [08:12:47.0000] has Chrome expressed a position on module attributes? [08:12:53.0000] I feel like someone from the chrome team was opposed to them [08:13:00.0000] domenic, maybe [08:13:01.0000] michaelficarra: the syntactic extensibility, or the host-carte-blanche extensibility? [08:13:11.0000] ljharb: syntactic [08:13:15.0000] gotcha, thanks [08:13:49.0000] I think littledan is missing the biggest reason why these must be in-band: import-site-specific metadata vs resource-specific metadata [08:14:07.0000] i'm confused; the queue item says "for stage 2" but the slide intro said "status update". is this proposal seeking advancement today? [08:14:26.0000] ljharb: I'm sure littledan will clarify that for us shortly [08:14:29.0000] kk [08:14:48.0000] oh I should stop mentioning his name while he's presenting, sorry Daniel! [08:14:56.0000] Bakkot: i am for the most part for them [08:16:43.0000] shu neat, thanks [08:17:18.0000] Bakkot: this is a bottleneck for non-JS assets for web apps [08:17:36.0000] not for wasm tho? [08:17:41.0000] Bakkot: and given that i've been convinced that non-syntax alternatives are strictly technically worse, i'd prefer this get through [08:17:44.0000] yes, also for wasm? [08:17:51.0000] i mean, it affects wasm [08:17:52.0000] hm, can you help me understand that? [08:17:57.0000] i don't understand what your question is [08:18:02.0000] right but i mean, the motivating concerns don't apply to importing wasm, as i understand them [08:18:06.0000] only to non-code assets [08:18:15.0000] (json, css, html) [08:18:46.0000] that's not how i understand it [08:19:13.0000] what's your understanding? :-) [08:19:32.0000] the original motivating security concern from apple included both "noexecute" and "wrong parser" [08:19:45.0000] wasm falls in "wrong parser" [08:21:06.0000] the function does run differently depending on how you call it [08:21:33.0000] "wrong parser" can be solved without syntax tho on the web - it can use headers [08:25:19.0000] why did my question disappear from the queue? Was it inappropriate in some way? [08:25:34.0000] brad4d: hm, i never saw yours on there [08:25:42.0000] brad4d: reload the page? [08:26:01.0000] weird, refresh brings it back, thx [08:26:09.0000] brad4d: sometimes the tcq is buggy [08:26:35.0000] ah lol yes i see it now that i refresh too [08:26:36.0000] Or, sometimes 2 people click "delete" on the same row at the time time [08:33:03.0000] i have done that before [08:33:52.0000] do you mean both click delete on their own item at the same time? [08:34:05.0000] 'cause I don't think anybody can delete anybody else's [08:35:58.0000] i mean as a chair [08:36:44.0000] or like someone clicks "i'm done speaking" at the exact same time as i click "next speaker" bc i think they forgot and they did forget _until that exact moment_ [08:37:11.0000] i did click "done speaking" on myself [08:38:39.0000] robpalme: i'm still on the queue (i had 2), and if you refresh you may see that i'm "speaking" right now :-) but i can go after bradley [08:44:49.0000] msaboff: you can't try/catch imports [08:45:01.0000] I know [08:53:50.0000] I have the same concerns about ignored vs rejected unknown attributes, but I also think it wouldn't kill this proposal either way; if it ends up being a problem, those attributes just unfortunately won't be added [08:54:58.0000] ljharb: to answer your question on here [08:55:33.0000] ljharb: i think the pressure to align isn't going to prevent aligning on a strictly worse solution, like a DSL inside module specifier [08:56:42.0000] How would an envaluator work if you have two imports with different evaluators do you get different modules? [08:57:05.0000] Because that would be wild [08:57:17.0000] I agree with Shu, they will just do something worse for the other attributes [08:57:31.0000] shu: out-of-band is also a viable option [08:57:56.0000] ljharb: i do not have the energy to be the middle man currently for this entire space [08:58:00.0000] ok [08:58:07.0000] timebox, y'all. i'm about to start snapping like an impatient suburban mom [08:58:13.0000] akirose: this is an important proposal [08:58:25.0000] i believe extension is worth while [08:58:35.0000] yes it is. and so are all the other things on the schedule. [08:58:46.0000] no, i believe this is more important than other things on the schedule [08:58:58.0000] cool down period and come back to this topic? [08:59:00.0000] ljharb: Limit the allowed keys of the `with { }` to just the one we care about for now? [08:59:10.0000] @bterlson akirose robpalme MylesBorins ? [08:59:13.0000] rbuckton: which is just "type", yes, i'd be happy with that for now [08:59:17.0000] I agree with Shu, can we take a break and come back to this later or tomorrow? [08:59:28.0000] ditto [08:59:38.0000] that's fine [09:00:03.0000] littledan please include me in the offline module attributes discussion [09:01:17.0000] I also encourage people to choose less restrictive timeboxes for time sensitive proposals like this [09:01:25.0000] sorry aboutthat [09:02:00.0000] I guess we can start this offline discussion during lunch [09:02:59.0000] Great example of something to do in the hallway track [09:03:27.0000] littledan: i'll need 10m to make lunch but will hop in after that [09:03:32.0000] OK good [09:03:41.0000] I'm in favor of shorter timeboxes to identify conflicts, followed by hallway track to resolve those conflicts out of band [09:04:00.0000] Since we are over-subscribed this meeting and I'm still hoping we can get to Intl.Segmenter, which fell off the end [09:09:25.0000] sffc: if it's any consolation, overflow from previous meetings precede other proposal agenda items [09:10:11.0000] though I don't necessarily agree with that ordering [09:10:39.0000] what is the argument for BuiltInModule being preferable to just having globals [09:10:54.0000] devsnek I am about to ask that question [09:11:08.0000] wsdferdksl: you run the shimming Script first, and then later Modules are affected by it [09:11:34.0000] hasModule = name in global, import = global[name], export = global[name] = v, freezeModules = Object.freeze(global)? [09:12:32.0000] Or, `import 'shim.js'; import 'main.js'`, and `shim.js` will run before imports [09:12:41.0000] Object.freeze(global) has a lot of other effects [09:12:45.0000] which you really don't want [09:13:16.0000] Bakkot: some application of removing configurability and writability then [09:13:50.0000] Oh, maybe linking in `main.js` happens before execution of `shim.js` [09:14:06.0000] +1 to Thomas Levy's question (not sure IRC handle) [09:14:08.0000] I'm not 100% sure, since this would be the first time you could muck with it [09:14:20.0000] jridgewell: yeah you'd need `import 'shim.js'; await import('main.js')` i think [09:14:46.0000] would be nice to hear from implementations on that last point [09:14:49.0000] rkirsling: just like now, where applications must always choose to freeze the env if that's what they want, they must choose to freeze builtin modules [09:15:01.0000] they already have pretty reasonable accessor apis for lazy object creation [09:15:02.0000] rkirsling: (is how i understand it) [09:15:24.0000] more specifically I'm wondering if this becomes the new way to begin a JS file [09:15:28.0000] devsnek msaboff is an implementation [09:15:37.0000] er wait not file [09:15:38.0000] ... implementor [09:15:39.0000] app [09:15:43.0000] rkirsling: SES.lockdown() isn't the way to begin a JS file now :-) [09:15:57.0000] Bakkot: ah ok, the way he phrased that made it sound otherwise [09:16:11.0000] ljharb: I mean I can take your word for that but I'm not familiar with SES envs [09:16:38.0000] first-hand [09:16:46.0000] rkirsling: it's definitely the way to start any app that wants that kind of lockdown, sure [09:17:06.0000] I mean I guess once-per-app is reasonable [09:17:20.0000] I dunno why I thought once-per-file [09:20:45.0000] oh... this is a new topic that jumped the queue [09:20:52.0000] :-/ [09:21:21.0000] so the only reason this is better than adding new apis to the global is because engines can lazy load? [09:21:41.0000] rkirsling: you don't freeze in prod due to perf [09:22:00.0000] perf goes down in a non-trivial way for frozen stuff in engines [09:22:23.0000] v8 does not really have much of a penalty once frozen [09:22:30.0000] but I think locking down was for security _in prod_ [09:22:36.0000] *thought [09:22:45.0000] robpalme: has that been fixed? last i saw it still devolved into dict mode [09:22:48.0000] robpalme: it did until about last year [09:23:13.0000] bradleymeck: Yes, they fixed it very recently [09:23:13.0000] yay [09:23:23.0000] bradleymeck: it causes a deoptimization but everything can reoptimize again [09:23:34.0000] not locked to dict anymore [09:23:35.0000] so likely it is just a comms issue for that [09:23:35.0000] @bradleymeck we did a lot of benchmarking and could not find anything worth investing in fixing, so i's "good enough" [09:23:49.0000] ohh I didn't realize we skipped ALL the replies [09:23:58.0000] I too didn't recognize voices 😓 [09:24:30.0000] mea culpa [09:24:37.0000] I believe this is the public doc: https://docs.google.com/document/d/1X6zO5F_Zojizn2dmo_ftaOWsY8NltPHUhudBbUzMxnc/edit [09:25:04.0000] ^ "Fast frozen & sealed elements in V8" [09:27:11.0000] is freezeModules shallow? [09:27:21.0000] do you have to call freezeModules if your app is esm [09:27:52.0000] freezeModule doesn't freeze the module, just the module map. [09:28:01.0000] devsnek: i'm not sure how the BuiltinModules object would be made unavailable inside ESM [09:28:13.0000] devsnek: so i'd say yes [09:28:42.0000] well i wouldn't want anything to not be made available [09:28:57.0000] so if this is shallow, can't bad code still do bad things [09:29:10.0000] like i can't replace Temporal but i can replace Temporal.prototype.whatever [09:29:16.0000] i don't understand how shallow/deep applies to freezing the module map [09:29:25.0000] that doesn't do any freezing to things inside the module [09:29:31.0000] right so i'm asking [09:29:33.0000] what's the point of it [09:29:35.0000] devsnek: I think that applies to global objects, too [09:29:40.0000] This shouldn't be any different [09:29:59.0000] my understanding was freezeModules implies some sort of security [09:30:04.0000] no [09:30:18.0000] ok so what's it for [09:31:06.0000] it just means that the module namespace object can't be replaced any further [09:31:12.0000] replaced/modified [09:31:18.0000] right but why does someone want that [09:31:36.0000] what would be my motivation to call freezeModules() [09:31:49.0000] to have guarantees about the semantics of the rest of your application [09:31:53.0000] some of them [09:31:58.0000] what guarantees [09:32:14.0000] that `import * as ns from 'builtin module'` will always provide the `ns` you expect [09:32:27.0000] you certainly may also want to freeze the contents of that ns [09:32:39.0000] so its just like... a consistency thing [09:32:52.0000] you say "just" but i prioritize that pretty highly :-) [09:33:05.0000] i mean if we don't allow mutating the map in the first place [09:33:26.0000] sorry scratch that, if we don't have the distinction [09:33:55.0000] of application before freeze and application after freeze [09:34:11.0000] like with the global, you can apply whatever constraints you want [09:34:17.0000] at whatever point [09:35:30.0000] heads up on scheduling: the next topic (deep-path properties) is 25min (11:45-12:10 CST) so will eat into lunch. meaning lunch will be 50min instead of 60min. [09:44:56.0000] this font is not the greatest font in the world, it is just a tribute [09:46:11.0000] robpalme: to tdz with ye [09:46:39.0000] @rkisling soory of course [09:47:31.0000] (oh I'm not chastising so much as inviting lol) [09:49:33.0000] that nestd spread mess is used all over our codebase today, when we attempt to be immutable without a lib [09:50:12.0000] couldn't you theoretically do something like `newObj = (someFunction(immutableObj).deep.path.property = newValue)`? [09:50:25.0000] michaelficarra: i was thinking the same thing [09:50:50.0000] getters/setters solve the problem [09:50:51.0000] it would be unique for assignment to not return rhs though [09:50:54.0000] no, that gives you newValue [09:51:15.0000] Yah, that's the same as `newObj = … = newVal` [09:51:15.0000] Bakkot: it could not though [09:51:19.0000] Whic his just `newVal` [09:51:30.0000] devsnek yeah, I assumed the question was about using existing language features [09:51:37.0000] even when a setter is invoked, assignment returns the RHS? [09:51:40.0000] yup [09:51:42.0000] aww [09:51:53.0000] like i said, unique [09:52:08.0000] Yah, just like with `x = (uint8array[0] = 999)` [09:52:12.0000] You get `999` [09:52:28.0000] Even though `uint8array` will do a setter-like thing [09:52:30.0000] how about [09:52:34.0000] shu: Do you or V8 have performance concerns with tuples generally? [09:52:37.0000] walrus operator [09:52:47.0000] Since there's going to be a lot more object allocations [09:52:54.0000] `newRecord := oldRecord.x.y.z = 5` [09:52:58.0000] keith_miller: i haven't looked too deeply yet. i have vague anxiety, i guess [09:53:01.0000] lol walrus [09:53:25.0000] keith_miller: the default implementation technique means a lot more interning too [09:53:34.0000] and it's hard to do escape analysis in JS, which is pretty important generally for other languages that have tuples. [09:53:37.0000] ljharb: i thought i was kidding but now i think i'm serious [09:54:10.0000] keith_miller: well yeah, and v8 at least wants things to be fast in the interpreter nowadays, we can't really lean escape analysis or scalar replacement and the like even if it were easy [09:54:11.0000] so you can't do the normal just use the same cell [09:54:20.0000] I want walrus operator just for the name. [09:54:20.0000] lean on* [09:54:26.0000] right [09:54:34.0000] python has tuples and is hard to escape-analyze [09:54:37.0000] Eg, `||=` should forever be known as the mallet operator [09:54:45.0000] Bakkot: python is famously slow [09:54:57.0000] Bakkot: true, but python's performance demands is mostly offshored to C [09:54:59.0000] https://github.com/tc39/proposal-logical-assignment/blame/master/README.md#L6 [09:55:02.0000] jridgewell: ||= doesn't look like a mallet tho unless it's `||=` :-/ [09:55:05.0000] in those FFI modules, is my understanding [09:55:24.0000] the turbofish operator <>:: is literally why i first looked at rust [09:55:55.0000] what does it mean for this proposal to advance to stage 1 when records/tuples is not stage 4? [09:56:21.0000] michaelficarra: stage 1 just means we're going to talk about it more [09:56:33.0000] because we agree there's a problem that needs to be solved [09:56:43.0000] how can there be a problem if there's no feature? [09:56:44.0000] stage(deepPathProperties) ≤ stage(recordsAndTuples) [09:57:13.0000] i feel like this should either be part of the more general object proposal [09:57:13.0000] michaelficarra I think it's fine to say that we're advancing this to stage 1 with an eye towards a problem which does not yet exist but might in the future [09:57:16.0000] or the record/tuple proposal [09:57:35.0000] wait isn't stage 1 acknowledging "there's a problem" and stage 2 "that we're interested in solving" [09:57:41.0000] michaelficarra: See NilSet's comment [09:57:44.0000] > that nestd spread mess is used all over our codebase today, when we attempt to be immutable without a lib [09:58:09.0000] I think that means we have a larger issue than just record/tuple? [09:58:13.0000] akirose stage 2 is "that we are interested in solving _with something like this solution_" [09:58:31.0000] stage 2 implies a particular approach to solving the problem [09:58:49.0000] (just with details omitted) [09:58:58.0000] ^ [09:59:59.0000] stage 1: we agree that there's a problem, stage 2: we've agreed on the important bits of our solution, stage 3: we've nailed down all the details of our solution [09:59:59.0000] All of the mutations could be packed into a single result if the mutations within the same `{}` are tracked? [10:01:12.0000] nowObj = delete lens(oldObj).deep.property.name [10:01:19.0000] *newObj [10:02:10.0000] michaelficarra fwiw we usually treat stage 1 as more like "we are not willing to declare that there is definitely not a problem" [10:02:30.0000] agreed, the bar for stage 1 is low [10:02:40.0000] and I think that's the right way to operate [10:03:05.0000] we should really add descriptions like these to the process document [10:03:08.0000] request that we refrain from arguing about these details, given the timebox [10:03:15.0000] the ones being discussed on the call, that is [10:10:57.0000] Is "lenses" just codewords for proxy? [10:11:49.0000] jridgewell: all you could ever want to know about lenses: https://hackage.haskell.org/package/lens-tutorial-1.0.4/docs/Control-Lens-Tutorial.html [10:12:14.0000] it's basically recreating property access in a pure FP setting [10:12:29.0000] but I wasn't prepared to try to envision this in a JS setting [10:13:03.0000] OH wow, this was apparently not the morning for me to skip the pre-lunch parts of the meeting, if we're getting into lenses already [10:13:11.0000] Can you translate into a normal language? [10:13:13.0000] Lol. [10:13:31.0000] Question: What is a lens? [10:13:32.0000] Answer: A lens is a first class getter and setter [10:13:42.0000] TabAtkins: lol. you missed it by a couple of minutes [10:13:46.0000] sounds to me like yes its codeword for proxy [10:14:03.0000] No, it's quite different from a proxy, but for ~mysterious reasons~ [10:14:22.0000] or rather you could implement a lens with a function that returns a proxy [10:14:54.0000] oh like using a proxy as a view [10:15:18.0000] I'm busy this morning trying to untangle the HTML spec's use of GOTO in algorithms into nested loops [10:15:21.0000] for real wtf [10:15:26.0000] oh no [10:17:45.0000] TabAtkins: link? [10:18:31.0000] the one i'm working on right now is https://html.spec.whatwg.org/multipage/parsing.html#reconstruct-the-active-formatting-elements [10:18:53.0000] i lost it at "rewind" [10:20:12.0000] reverse reverse [10:22:02.0000] ljharb: are we talking about module attributes? [10:26:44.0000] michaelficarra: https://tools.ietf.org/html/rfc3986#section-3 [10:27:05.0000] To answer the builtin modules discussion earlier: [10:27:06.0000] gibson042: huh? [10:27:08.0000] https://gist.github.com/jridgewell/8428f797ef85346d3081c99518fa9fce [10:27:17.0000] shu: i'm here in the hallway track just now; littledan? [10:27:27.0000] That will execute `shim.js` (which defines `js:foo`) before `main.js` links `js:foo` [10:27:37.0000] jridgewell: what if shim.mjs imports main.mjs [10:27:40.0000] ljharb: stepped away for a sec, omw [10:27:49.0000] That would break it [10:28:01.0000] scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." ) [10:28:15.0000] sorry, that was for jridgewell [10:44:07.0000] jridgewell: in your gist the whole graph is lined prior to entry being ready to evaluate (and thus before shim) [10:44:12.0000] linked* [10:44:29.0000] so shim wouldn't execute prior to main linking [10:45:23.0000] This behavior is msaboff's intention [10:45:41.0000] ah [10:45:59.0000] cycles would have to be isolated, that seems... hard [10:47:19.0000] If the shimming happens in a script loaded before a module that imports the shimed module, We propose that the shimmed module is the one that would be linked. [10:48:17.0000]