2019-08-01 [18:00:40.0000] devsnek: at long last!! https://bugs.webkit.org/show_bug.cgi?id=200199 [18:00:48.0000] woo [18:01:11.0000] I didn't expect that the redo would take me a week lol [18:01:15.0000] so you went with a stack [18:01:20.0000] yep [18:01:32.0000] very nice [18:01:45.0000] I had it working with passing the label down, but I realized I created a ton of cruft in the process [18:01:51.0000] its kinda scary how much stuff you have to change though [18:01:56.0000] like instead of the patch doubling, it had tripled [18:02:37.0000] haha yeah [18:03:00.0000] in v8 i just emit the two JumpIfs and it magically does it all from there [18:03:48.0000] I actually sunk a day by making an seemingly-innocuous refactor that 100% broke JIT in debug [18:04:08.0000] like I would hit an debug assert just by checking 1+2 === 3 in a loop lolol [18:04:09.0000] such is life :) [18:05:00.0000] yeah I'm excited and relieved to reach the conclusion [18:05:44.0000] i wonder if sm has a patch yet [18:06:21.0000] hmm doesn't look like it does https://bugzilla.mozilla.org/show_bug.cgi?id=1566143 [18:07:29.0000] I'll make a GH thread [18:14:20.0000] https://github.com/tc39/proposal-optional-chaining/issues/115 [18:14:58.0000] i don't see anything from chakra yet [18:21:08.0000] also wow your impl is so different [18:21:22.0000] and by that I mean wow V8's bytecode generator is so different [18:22:24.0000] diverse implementations :) [18:22:30.0000] love looking at how different engines do things [18:23:15.0000] indeed [18:23:34.0000] if they're all the same it's kind of just a monoculture in disguise :P [11:11:42.0000] apologies if this is considered to be in poor taste, but: my (small) team at Shape Security (which is on tc39) is hiring people with esoteric web platform knowledge: https://twitter.com/disnet/status/1156982795501092864 [14:42:10.0000] /me takes a drag off the File API [14:51:08.0000] bradleymeck: careful, this ain't the APIs we grew up with [15:08:30.0000] devsnek: oh wow I just realized if I collect all the labels and emit them at once at the very end then that solves the single-use problem [15:10:17.0000] oh I thought you were already doing that with the stack lol [15:12:54.0000] haha [15:13:27.0000] I hadn't actually investigated that part [15:13:49.0000] incidentally I tried seeing what happens when you reuse a label and it produced a lovely infinite loop [15:13:50.0000] lol 2019-08-02 [14:24:10.0000] I was going to ask for a status update on private fields in TypeScript but I see the PR was reviewed 12 minutes ago. https://github.com/microsoft/TypeScript/pull/30829 2019-08-05 [20:40:06.0000] devsnek: wowsers, apparently I still wasn't doing `a?.b?.()` (combined optional access and optional call) correctly [20:40:26.0000] what was it doing [20:42:13.0000] I had it parsing as FunctionCallValueNode > OptionalChainNode > DotAccessorNode, but that runs into the same "loss of this" problem that I originally faced for `a.b?.()` [20:42:40.0000] i.e. for `a = { b() { return this.c; }, c: 42 }`, `a?.b?.()` would be undefined [20:43:25.0000] not sure how JSC-specific this problem is [20:44:24.0000] it's not hard to fix but I have to basically introduce an `OptionalChainType::CombinedAccessAndCall` case where I reach for the *second* label on the stack :( [20:45:06.0000] rkirsling are you implementing `?.` in JSC? =D [20:45:42.0000] drousso: https://bugs.webkit.org/show_bug.cgi?id=200199 :D [20:46:24.0000] the two places Darin requested extra coverage both had edge-case bugs lol [20:46:35.0000] best kind of review :chefkiss: [20:46:44.0000] aaaawwwwweeeeessssooooommmmmeeeee [20:46:53.0000] i cant wait to use that in Web Inspector =D [20:47:26.0000] :D :D :D [20:51:25.0000] rkirsling: every time you talk about jsc internals it scares me more and more [20:52:20.0000] lol it's really just the function node menagerie [20:52:59.0000] what is `a.b()` in V8? [20:55:04.0000] Call { expression = Property { base = ..., name = "b" } } [20:59:33.0000] ahh yeah it would sure be nice to have "function call" be a singular concept from the perspective of the bytecode generator [20:59:35.0000] hehehe [20:59:56.0000] in the bytecode generator it just branches based on what `expression` is [21:00:18.0000] and then you end up with a `callee` register and a `receiver` register [21:00:50.0000] i can't even find the parser in spidermonkey [21:07:41.0000] lol it's https://searchfox.org/mozilla-central/source/js/src/frontend/Parser.cpp and vicinity [21:14:36.0000] oh i thought the frontend folder would have like [21:14:40.0000] devtools or smth [21:15:28.0000] haha yeah it's quitehard to find the first time [07:54:45.0000] oh hey. qq. Has there are been a proposal or suggestion for something along the lines of array.protoype.difference? [08:05:51.0000] MylesBorins: comes up on esdiscuss everyone once in a while [08:11:01.0000] devsnek do you have a link? [08:11:57.0000] someone from the node project was pinging me about wanting to push forward a proposal for it... but wasn't able to find prior discussion [08:14:08.0000] I could find them in a bit [08:14:16.0000] iirc esdiscuss.org is searchable [08:14:47.0000] I wish we could translate old threads into discourse [08:41:21.0000] MylesBorins: What's the semantics of an array difference? Diffing has a lot of possible impls... [08:44:31.0000] TabAtkins what was pitched to me is a function that would return items that don't exist in both arrays [08:44:37.0000] e.g. [1, 'a', 3.14].difference([2, 'a', 3.145]) // returns [1, 3.14] [08:44:44.0000] [1, null].difference([2, null]) // returns [1] [08:44:45.0000] So that's a Set difference [08:45:07.0000] slightly different [08:45:10.0000] as per example 2 [08:45:21.0000] Ah, that's a Set minus. [08:47:38.0000] if those set methods happen, engines can probably optimize new Set(x).difference and new Set(x).minus [11:16:03.0000] MylesBorins: it seems like you'd almost always just want to be using sets in that case, and converting to a set and back would probably be clearer [11:16:44.0000] Bakkot so would it then be a good idea to explore making those set methods? [11:16:58.0000] MylesBorins: https://github.com/tc39/proposal-set-methods [14:49:01.0000] rkirsling (or anyone else who works on JSC): are you in a position to tell me if the rdar link at the botton of https://bugs.webkit.org/show_bug.cgi?id=38970 has had any progress? [14:49:09.0000] just for my own curiousity mostly [14:49:42.0000] unfortunately as a non-Appler, I have no idea what's on the other side of that protocol :( [14:50:23.0000] that's where they keep the apples [14:50:48.0000] alas [14:51:01.0000] devsnek: šŸ‘ [14:52:13.0000] I always assume that any discussion of consequence would appear publicly but I could be wrong [14:53:44.0000] maybe drousso could confirm :p [15:01:14.0000] ljharb: gonna bring globalThis for stage 4 sometime? [15:38:51.0000] also: is there anyone around who remembers why `super` works the way it does? https://github.com/tc39/ecma262/issues/1654 [15:43:09.0000] ouch. [16:37:22.0000] Bakkot: when I’m ready for everyone to yell at me on twitter and github again [16:37:30.0000] hah, fair enough [16:37:42.0000] i've still got that that pr to fix extending null :( [16:40:07.0000] devsnek: is that ready for review again? if it's good to go, and I think it looks right, I can bring it before the committee in October [16:40:21.0000] i don't remember anymore [16:40:24.0000] (https://github.com/tc39/ecma262/pull/1321, for everyone else) [16:40:48.0000] oh right the argument about how super is allowed 2019-08-06 [17:16:58.0000] devsnek: it seems important to fix, if you and Bakkot can agree on what should go to the committee :-) [02:40:07.0000] /me trying to find some pattern -> https://twitter.com/GNUmanth/status/1158673972801593344 [07:26:33.0000] Is there a PDF, or downloadable (offline) version of the specification? [07:45:08.0000] Someone should add a service worker [07:54:51.0000] I would love that, happy to add! [07:57:18.0000] lol wouldn’t that make it slower tho [08:01:45.0000] Why would it be slower? It’s just a cache [08:01:56.0000] And only kicks in when you’re offline [08:03:21.0000] airbnb tried service workers but their mere presence on the page had large enough perf consequences that we yanked them out [08:04:37.0000] :( do you know what exactly was causing the problem? They shouldn’t be slowing down the browser [08:06:00.0000] I can be on trains/planes sometimes so it’s good to be able to read the spec without needing a constant internet connection. If there’s a way for me to try it without impacting the site I’m happy to spend time on it [08:06:29.0000] nope, but google’s sw team worked with the airbnb engs on it and couldn’t figure out how to solve it. [08:06:59.0000] the spec is already offline tho, once you load it once - i just keep a tab always open and it’s offline for me [08:07:45.0000] Haha that does not work well on tablets, on a pc sure but the page is so big my iPad constantly kills it and forces me to reload the page. [08:08:14.0000] Keeping the tab open isn’t an option for me [08:08:27.0000] ah, true [08:11:10.0000] Is it possible to experiment with a new path on the TC39 website that does this? Then we can compare the 2? I don’t know how the site is hosted currently but I remember it’s statically generated [08:31:04.0000] couldn't we auto-generate a PDF after auto-rendering the HTML, as part of CI? [08:32:52.0000] we already have stuff to generate PDFs for ecma [08:38:14.0000] if by ā€œstuffā€ you mean [08:38:22.0000] ā€œjordan prints to pdf on his Macā€ [08:39:07.0000] after a year of manually fixing styles i at least tweaked the print stylesheet so i didn’t have to do it every time [08:40:45.0000] oh lol, i thought we had a script [08:42:44.0000] we do, it’s just written in dna and takes a very inefficient amount of energy to run :-p [08:48:08.0000] hard to invoke dna from ci [08:53:24.0000] I've raised https://github.com/tc39/tc39.github.io/issues/166 [08:57:10.0000] we used to have a sw on the nodejs docs [08:57:12.0000] but it got removed [08:57:23.0000] i wonder if it was for the same reason [09:01:06.0000] JaseW: shouldn't that go to ecma262? the website repo is literally just the website [09:01:30.0000] an org admin can move the issue [09:01:36.0000] bterlson: akirose: ^ [09:01:48.0000] oh nice I didn't know that feature existed! [09:01:56.0000] it's fairly recent [09:02:09.0000] i use it like once a day to move issues from nodejs/node to nodejs/help lul [09:02:40.0000] @rkirsling oh ok nice, wasn't aware of that [09:03:04.0000] good idea regardless though :D [09:03:19.0000] I've moved it https://github.com/tc39/ecma262/issues/1656 [09:03:42.0000] oh i guess delegates can do that too [09:03:48.0000] ljharb: do you still want me to move that css into a separate file [09:13:36.0000] yeah that’d be nice [10:40:36.0000] ljharb: I have been meaning to see if I can get ecmarkup to generate LaTeX. It's probably doable, yeah? [10:43:15.0000] Bakkot: that's much more bterlson's domain than mine, and i'm not that familiar with authoring latex (only reading all my calculus assignments made with it), but it seems like it should be doable [10:43:26.0000] bterlson ^ [10:56:01.0000] seems like it'd just be a matter of doing it [10:57:33.0000] a lot depends on the extent to which the spec contains raw HTML or (especially) CSS, and the extent to which ecmarkup's auto-linking facility is tied to the HTML representation [11:09:08.0000] Why do people keep insisting on these legacy formats... [11:09:13.0000] Use web pages. [11:10:16.0000] web pages are way more ephemeral and always will be [11:10:47.0000] cf fraction of wikipedia citations to urls which are now untraceable vs fraction of wikipedia citations to books which are now untraceable [11:19:31.0000] always cite via web.archive.org [14:54:20.0000] devsnek: wow, turns out adding a "jump if undefined or null" op to JSC was really easy [14:54:27.0000] nice [14:54:34.0000] after my initial CL lands i'm planning to add one to v8 [14:54:56.0000] yeah I can't really submit it until my existing patch lands [14:55:21.0000] seems like the Applers are busy of late [15:01:58.0000] rkirsling / devsnek: would strongly recommend adding a comment explaining why that operation is not suitable for `== null`; I know V8 has had at least one bug where someone assumed those were equivalent [15:02:16.0000] a comment to what [15:02:35.0000] oh the op [15:02:37.0000] hehe [15:02:39.0000] Bakkot: Yusuke had already added an OpIsUndefinedOrNull to address an IsHTMLDDA bug in ArraySpeciesCreate [15:03:15.0000] I'm just fusing it to `jtrue` / `jfalse` [15:03:56.0000] there's another fixme in here that leads me to believe I'll have also fixed a RequireObjectCoercible bug by doing this, but I'll find out shortly :D [15:07:44.0000] that said a comment might be good but I'm not quite sure where I'd put it; if they look up the definition, they'll see it's quite different, but yeah šŸ¤” [15:22:03.0000] hmm, guess there's no test262 case for something like `let { 0: x } = document.all;` [15:23:54.0000] but I did just fix that, heh. [16:01:49.0000] lol devsnek (/ Bakkot) it turns out the patch didn't technically conflict so I just submitted it separately: https://bugs.webkit.org/show_bug.cgi?id=200480 [16:02:37.0000] jsc scares me [16:03:04.0000] jsc's optimization is pretty rad. [16:10:22.0000] i like v8's layers [16:10:23.0000] fascinatingly the various "jump if " ops are just a bytecode thing [16:10:27.0000] like an onion [16:11:39.0000] so they apply for direct interpretation and baseline JIT, but for the higher stages of JIT, there's just a single "Branch" node in the dataflow graph [16:12:44.0000] so I didn't have to add anything there [16:14:15.0000] devsnek: how do you mean layers? [16:14:47.0000] devsnek: you were never involved in the crankshaft days, yeah? [16:14:59.0000] there used to be like half a dozen different backends [16:14:59.0000] it was so painful [16:15:04.0000] turbofan + ignition is much nicer [16:15:05.0000] i started using js around the time crankshaft was removed [16:15:23.0000] i only started contributing to v8 like last year though [16:15:58.0000] rkirsling: like in order to add a new opcode in v8, you build on primitives that may or may not translate into machine code [16:16:29.0000] ah hmm [16:16:33.0000] JumpIfUndefinedOrNull can be two WordEqual() calls which then get handled by each architecture's backend [16:16:55.0000] interesting [16:16:57.0000] actually i could probably use a bitmask [16:17:24.0000] I mean to be fair I'm not having to thing about individual architectures there [16:17:48.0000] that's a whole separate, and to me far scarier, area [16:17:53.0000] or series of areas even [16:18:07.0000] yea the only time i've ever touched that part was to delete stuff :P [16:18:08.0000] *think about [16:18:33.0000] I had to fix Win64 JIT at one point [16:18:55.0000] it took weeks and I think I would've been screwed entirely had a coworker not helped me out [16:19:05.0000] i still have no idea how a lot of v8's jit works [16:19:20.0000] learned a thing or two about calling conventions though 🤷 [16:19:38.0000] oh yeah had to dig into that for a wasm change i'm working on [16:19:46.0000] optimized way to call C from wasm [16:29:16.0000] but yeah the undefined or null check there is based on the fact that undefined is 0b1010 and null is 0b0010, so you just clear the undefined bit and see whether you're left with a null value [16:31:29.0000] it's eqnull that bakes in all the document.all checks -- my understanding is that they get optimized away, but still a burden for the interpreter 2019-08-07 [17:53:50.0000] aw man, V8 decided to call ?? just "the nullish operator", huh [17:53:54.0000] this is unfortunate [17:54:49.0000] ooo [17:56:13.0000] what a weird implementation [22:13:54.0000] wow devsnek your design doc is so thorough o_o [22:14:05.0000] what is `Star` anyway? get value? [22:14:25.0000] store accumulator in register [22:14:42.0000] and Lda is load accumulator [22:14:53.0000] right I figured it must be store in register right after typing that question [22:15:08.0000] i'm glad someone likes my doc [22:15:09.0000] couldn't remember what A was in either case though šŸ˜… [22:15:17.0000] i thought it was rather skimpy [22:16:14.0000] if it were me I would've just linked the README and called it a day lol [22:16:50.0000] v8 requires design docs for everything [22:16:53.0000] (I mean in addition to typing out a general description like I did in the WK changelog) [22:17:07.0000] often helpful, sometimes superfluous, like in this case [22:17:08.0000] guess I didn't realize [22:18:08.0000] one interesting thing is how the bytecode generator reorders stores and loads [22:19:06.0000] jumps after stores [22:19:13.0000] i assume thats for cache locality or something [22:20:03.0000] hm hm [22:20:27.0000] but yeah in your case all the more you'd want that new jump op [22:22:20.0000] is this a thing https://gc.gy/32860336.png [22:22:29.0000] or did someone just make an account named anonymous nyan cat [22:22:34.0000] lol whaaa [22:22:56.0000] oh no its actually a thing [22:23:01.0000] I think it's me though? which means it's a thing [22:23:14.0000] I just happened to open it in incognito for no particular reason [22:23:56.0000] apparently there's also an anonymous kraken, pumpkin, and ifrit [22:24:12.0000] `An ifrit is an enormous winged creature of fire,` [22:24:37.0000] and more importantly a perennial FF summon [07:15:25.0000] I'm using entirely too many super override classes for private fields [08:00:20.0000] mmm trying to figure out if this is a v8 bug or proper spec... if I have a super override to init private fields, it seems like calling super(o); twice will initialize the private fields twice and thus throw errors, so the fix is to try/catch before calling super and return if o already has them installed? [08:02:28.0000] calling super twice sounds dangerous [08:03:48.0000] devsnek: its a hell of a drug [08:04:06.0000] also only real way to do private fields in a sharable way for now :-/ [08:04:25.0000] moving off weakmaps and seeing speed gains :choo choo: [08:05:03.0000] latest chrome seems to differ from node on this [08:07:51.0000] https://codepen.io/bradleymeck/pen/GVQaNv?editors=0012 works, but is... ugly? [08:10:15.0000] that try/catch makes me so irrationally angry [08:10:31.0000] the hasInstance one I mean [08:10:54.0000] haha [08:11:03.0000] i'd love `has` [08:11:39.0000] https://www.npmjs.com/package/@snek/private [08:11:45.0000] this is what I've been using [08:11:48.0000] no thanks ;p [08:12:12.0000] this works pretty well even if it looks gross it means I don't have a C++ dep [08:12:31.0000] which is something i'd like to keep for distribution issues [08:12:53.0000] yeah probably not ideal for libraries [09:27:34.0000] leobalter: very exciting to see TLA tests šŸ‘šŸ» [09:27:50.0000] nice :) there are more to come today [09:49:51.0000] leobalter: I think we also need tests for `09.1_1` and `09e1_1` being errors [09:51:09.0000] rkirsling would you open a PR for this, please? [09:51:22.0000] sure! [10:20:47.0000] devsnek: guess that answers my feature flag question šŸ˜Ž [10:21:00.0000] hmm? [10:24:45.0000] oh that evidently it is flipped on in Safari TP [10:25:49.0000] nullish coalescing? [10:26:04.0000] yup! [10:50:38.0000] i really wish we had a way to consume a stream of JSON values [10:51:36.0000] i think whatwg had an async json or json streaming thing [10:55:18.0000] i know .json() theoretically allows off thread allocation to happen [10:57:16.0000] i wonder if for unknown values, parse off thread and copy is better than parse on main thread [10:57:32.0000] using serdes [10:58:57.0000] serdes would need to do the allocations into the vm heap still, probably won't beat existing stuff speed wise. also does serdes preserve key ordering?? [11:00:09.0000] if main thread is janking or has a queue for jobs its probably safe to start off thread since it would require a new tick to actually make the value available to user code [11:00:17.0000] serdes is how engines do structured cloning [11:00:31.0000] postMessage and such [11:00:49.0000] afaik they all just copy memory from one heap to another [11:01:29.0000] but thats full serialization, that removes the refs and hydrates them on other end for things like Array.prototype and Object.prototype? [11:02:20.0000] i don't see serdes in v8's default serializer at least [11:02:34.0000] i mean the intermediate bytes are basically just a memory copy [11:03:23.0000] in v8, they can also get away with not modifying prototypes and stuff because they all share root prototype maps [11:05:53.0000] would be nice [11:07:06.0000] i think they had a blog post about sharing intrinsics at some point [11:11:24.0000] thats the mem refs for the code of intrinsics, but the object refs on heap are still unique and allocated [11:12:14.0000] i just mean like, in every heap, the object for array's prototype has the same offset [11:12:27.0000] otherwise Object.freeze in one thread would affect other threads [11:12:35.0000] not that they share objects [11:12:39.0000] ah, yes [12:01:35.0000] devsnek WDYT? https://github.com/tc39/test262/pull/2274/commits/31d9a7ae2b28971876597fbc4f2adbab6f556fa6 [12:03:45.0000] devsnek nevermind, some stuff to fix in there :P [12:06:51.0000] leobalter: if you want, somewhere in engine262's commit history there should be an implementation of TLA [12:06:58.0000] might be on the experimental branch [12:07:23.0000] I removed it back in December so the memory is fuzzy [12:11:12.0000] devsnek this one is correct... https://github.com/tc39/test262/pull/2274/commits/db51745742bf91eb09df8bd7bf7954388b2d4568 [12:11:26.0000] devsnek hopefully it's back soon :) [13:40:24.0000] MylesBorins devsnek rkirsling this is ready for reviews if anyone is interested. https://github.com/tc39/test262/pull/2274 [13:41:43.0000] the deeply-nested ones made me laugh šŸ˜‚ [13:52:59.0000] mfw 200 files [13:53:22.0000] https://gc.gy/32916200.png [14:20:29.0000] well, there is a lot of tests for syntax and we end up with files matching each production [14:21:08.0000] the one on the pic: lots of Blocks and an Object literal at the end :P [14:28:43.0000] https://github.com/tc39/test262/pull/2274/files#diff-c11ccae7ea60da1e6dc9af0edb170779 [15:07:29.0000] devsnek: grats sir [15:07:42.0000] šŸ‘šŸ» [15:07:50.0000] I'm a little sad you beat me to the punch :p [15:08:07.0000] well, i don't know if mine passes test262 yet [15:08:17.0000] i have to do that in a separate change [15:09:30.0000] āˆ€ test ∈ āˆ… ... lol [15:10:19.0000] all tests that are a member of the empty set? [15:11:37.0000] yeah I mean it'll pass test262 so long as there's nothing to check :p [15:11:45.0000] oh haha [15:11:50.0000] oh wait a few were merged weren't they [15:11:56.0000] yeah two days ago [15:12:37.0000] but apparently if i want to update test262, i have to also triage *every failure* that happens as a result of it [15:12:58.0000] you sure do! :p [15:13:04.0000] so i figured i'd leave that to someone with a bit more comfort in v8 [15:13:19.0000] yeah I lucked out with my early ref error abolishment patch [15:13:43.0000] in that if I updated juuuust to the sha hash I needed then I didn't incur any new irrelevant failures [15:59:17.0000] chicoxyzzy: looking into how a feature flag can be flipped [15:59:31.0000] I too was misled by the announcement :sad_panda: 2019-08-08 [20:11:21.0000] ljharb? [20:11:59.0000] hi [20:12:58.0000] In 1376 you changed lots of old-style intrinsics to new-style, but didn't change all. [20:13:38.0000] I was wondering why not all, what the criterion was. [20:14:29.0000] jmdyck: i changed all the ones that were accessible off of other ones - which did i miss? [20:15:05.0000] jmdyck: like, `%ArrayPrototype%` is `%Array.prototype` because `%Array%` exists, but i didn't change things like IteratorPrototype etc [20:15:14.0000] if there's more that can be changed to use the new style, that'd be great [20:15:34.0000] I found about 67 [20:16:48.0000] E.g., a bunch of %GeneratorPrototype% that could be %Generator.prototype% [20:17:18.0000] basically i was only thinking about the user-observable ones [20:17:29.0000] but yeah you're right, those should be changed too [20:17:35.0000] if you make a PR, great, otherwise i'll do it tomorrow :-) [20:18:03.0000] yeah, I've got the search-and-replace commands set up. [20:18:13.0000] sweet, appreciate it [20:18:37.0000] just need to be sure to keep the old style ones for layered specs; i'll remove all of those once i've updated html and intl to use the new style. [20:19:08.0000] There are some where the new-style is a bit round-about, e.g. %AsyncGenerator% -> %AsyncGeneratorFunction.prototype%, you still want those to change? [20:19:11.0000] hey while you two are here -- is https://github.com/tc39/ecma262/pull/1658 actually meant to be normative? I thought it was just making explicit what was already assumed [20:19:38.0000] (oops, come back to me if I'm interrupting) [20:20:09.0000] jmdyck: its about making them more readable, so im fine with your judgement call there [20:20:30.0000] rkirsling: i’m not really sure [20:21:00.0000] rkirsling: if it changes observable requirements, even if it’s a spec bug that nobody we know about has implemented spiritually wrong, it’s still normative [20:21:13.0000] re old style for layered specs: sure, they're all in table 7, I'm not touching that. [20:21:13.0000] right that's fair [20:25:31.0000] ljharb: turns out %AsyncGenerator% was the only such example. I'll leave it as is. [20:29:43.0000] sgtm [20:34:30.0000] ljharb: I also found some things that shouldn't have been changed, so have commits to change them back. [20:34:42.0000] O.o like what? [20:35:40.0000] %AsyncIteratorPrototype% -> %AsyncIterator.prototype% [20:36:02.0000] latter assumes %AsyncIterator%, which doesn't exist [20:36:08.0000] oops, thanks then [20:36:52.0000] (Maybe it should exist, I don't know.) [20:37:14.0000] the iterator helper proposal can address that :-) [20:41:26.0000] ^ iterator methods poposal says it exists [20:54:20.0000] Dang. [20:56:29.0000] E.g., if I change "This function is the %Promise_all% intrinsic object." to new-style, then the %Promise_all% in Table 7 won't get auto-linked. [21:21:54.0000] right, that’s why i left those [21:23:50.0000] Although it's weird, some get linked correctly anyway. [21:24:38.0000] E.g. FunctionPrototype and ObjectPrototype in table 7 link to the right place, even though the has the new-style reference. [21:31:00.0000] So if I keep the s to old-style, then the old-style refs (in table 7) get auto-linked, but new-style references (anywhere) don't. [21:33:56.0000] Given that trade-off, I think I'd vote the other way. [21:35:58.0000] i.e., let the old-style refs in Table 7 go unlinked. (The new-style ref in column 3 will get linked, so there's still a link on the row.) [21:37:15.0000] Note that this is only talking about cases where old-style and new-style differ, not the 'base' ones like %Array%' and '%String%'. [23:05:31.0000] devsnek: does Chrome Canary give you a way to pass your V8 feature flag, btw? [01:37:43.0000] rkirsling, yeah, --js-flags="" [08:57:43.0000] Does the language have any built-in setters [08:58:48.0000] Domenic: __proto__ [08:58:57.0000] lol --_-- [08:59:26.0000] Domenic: also function.prototype.caller and function.prototype.arguments [08:59:41.0000] oh and arguments.callee [08:59:54.0000] oh and all the properties of a mapped arguments object [09:00:06.0000] i think that's everything [09:00:12.0000] so its basically all legacy stuff [09:04:07.0000] Yeah [09:24:12.0000] gsathya: cool! seems like Safari TP might not have an equivalent thing 😄 [09:29:51.0000] does nullish coalescing have the restriction requiring parens [09:39:46.0000] Don't forget RegExp friends $0-$9 [09:40:03.0000] RegExp in general... [09:41:35.0000] devsnek: yes [09:42:05.0000] bradleymeck: is that in the spec? [09:42:10.0000] like i know it exist [09:42:12.0000] exists* [09:42:15.0000] but i can't find it [09:44:01.0000] whats this channel about [09:44:11.0000] I know tc39 [09:46:44.0000] devsnek: it doesn't seem so, but it probably should be listed XD [09:47:07.0000] satoriprints: we discuss javascript here [09:49:49.0000] devsnek: yeah mixing is prevented from being a valid production [09:50:40.0000] see, say, https://github.com/tc39/proposal-nullish-coalescing/issues/44 [09:51:49.0000] rkirsling: does the grammar in the spec restrict it? [09:52:04.0000] i was wondering after referring to the actual text [09:52:16.0000] maybe i'm just bad at reading spec text [09:52:46.0000] yeah, notice where it's BitwiseOR [09:53:01.0000] those are blocking logical ops [09:53:18.0000] oh i see [09:53:28.0000] it can go to LogicalOR or Coalesce [09:53:37.0000] it all makes sense now [09:54:23.0000] mhm. was a really nice simplification 😃 [09:57:24.0000] one nitpick I'd been meaning to make is that LogicalExpression is an unfortunate name since "logical" means "truth(iness)-oriented", though the only countersuggestion I can come up with is like ShortCircuitExpression [09:57:55.0000] well logicaland and logicalor are truthiness oriented [10:03:58.0000] but coalescing is nullish-oriented, so unless we mean ternary logic... šŸ˜› short circuiting is really the thing that they have in common [10:07:52.0000] I phrased JSC's error message like this: https://github.com/WebKit/webkit/blob/master/Source/JavaScriptCore/parser/Parser.cpp#L3932 [10:31:32.0000] does jsc integrate with its own debugger via CLI or just lldb? [10:47:43.0000] bradleymeck: how do you mean CLI? lldb would be the command-line approach but you can use Xcode or Visual Studio [10:52:41.0000] rkirsling: d8 for example can be debugged using chrome devtools if you are shifty, XS has XSBug [10:52:49.0000] gui devtools basically [10:55:31.0000] oh yeah you can inspect a JSContext [10:56:54.0000] you do `run-jsc --remote-debug`, open Safari, and choose Develop > > JSContext [10:57:09.0000] :huzzah: [10:57:22.0000] šŸŽŠ [11:15:23.0000] reading https://github.com/WebKit/webkit/blob/master/Source/JavaScriptCore/jsc.cpp it doesn't seem to have a "break-on-start" flag? [11:24:43.0000] oh yeah I was having trouble with that too [11:25:12.0000] I think there's a bug there but I didn't get to digging super deeply [11:25:13.0000] also seems i cant actually connect if the code is too tight [11:30:13.0000] tight? [11:35:23.0000] i can't "break" in the debugger [11:35:34.0000] but loops etc. are still print() ing [12:29:01.0000] hmmmm [12:29:20.0000] fwiw there's a #webkit-inspector channel ;) [13:21:27.0000] has this sort of thing been discussed/proposed? https://gc.gy/33000678.png [13:21:55.0000] instead of `\u{2771}` [13:26:12.0000] hmm [13:26:13.0000] hmmm [13:26:15.0000] I don't think so [13:26:20.0000] cc mathiasbynens [13:26:28.0000] are those specified to be usable as identifiers? [13:26:36.0000] like, guaranteed not to change ever? [13:27:09.0000] yeah [13:27:11.0000] https://en.wikipedia.org/wiki/Unicode_character_property#Name [13:27:23.0000] > Starting from Unicode version 2.0, the published name for a code point will never change. In the event of a misspelling in a publication, a correct name will later be assigned to the code point as a Character Name Alias. Within the whole range of names, an alias is unique too. [13:27:39.0000] interesting...that's good to know. [13:27:41.0000] yeah they're totally stable, python even uses them for this kind of escape [13:27:50.0000] unicode is usually pretty good about this sort of thing [13:28:03.0000] obviously some names are rather long [15:13:30.0000] devsnek: lol I see what you mean about the adding the jump to V8 being simpler [15:13:41.0000] :D [15:57:31.0000] wasn't there a decorators proposal that had decorators for like everything, even expressions? [15:58:55.0000] 🤢 [15:58:59.0000] unsure [15:59:12.0000] but in theory any `@x y` can become `x(y)` [16:07:32.0000] rkirsling: oh yes [16:07:44.0000] gimme that meta programming juice, om nom [16:07:56.0000] its what the perfs crave [16:08:11.0000] šŸ˜‚ [16:08:36.0000] i like the composability of the more generalized decorators [16:08:37.0000] electrolytes.js [16:09:30.0000] cause im looking at infix bang after the realms call and is infix bang really just an expression decorator? [16:09:58.0000] infix decorators [16:09:58.0000] specialized to be remote method objects, but generalizing the problem out a bit [16:10:03.0000] ugggg [16:10:11.0000] i would generalize it to proxies [16:10:14.0000] not decorators [16:10:32.0000] proxies don't work for pipeline [16:10:44.0000] neither does infix anything [16:10:47.0000] x.y.z would need to be converted and eagerly sent off before .z happens [16:11:17.0000] i'd somewhat agree with infix being a problem with the solution, but the use case is pipelining for remote objects [16:11:33.0000] i mean... `a.b.c` works just fine [16:11:41.0000] and if you could remap all the Meta Object Protocol in an expression seems like that would work [16:11:46.0000] are you saying you want to support `a |> b |> c`? [16:11:51.0000] or c b a [16:11:53.0000] or whatever [16:12:03.0000] promise pipelining, not pipeline operator [16:12:04.0000] pipeline is an overloaded term now [16:12:14.0000] like you can do `a.b[c](d)` [16:12:23.0000] where those are all your custom graph builders [16:12:31.0000] which is how capn proto works today [16:13:26.0000] `await rpc.doX(rpc.doY())` as an example [16:13:31.0000] thenables + proxies [16:13:42.0000] kind of, the await bit breaks pipelining [16:13:47.0000] how so [16:14:00.0000] i pass rpc.doY directly to rpc.doX [16:14:24.0000] then await folds that into a request for doY applied to doX [16:14:32.0000] (await a!b)!c <-- needing the await [16:14:54.0000] how is that not just a.b.c [16:15:10.0000] it is message passing and not doing .gets [16:15:21.0000] a is a target for messages rather than a direct reference [16:15:27.0000] or it gets turned into one really [16:15:30.0000] i mean i don't understand [16:15:44.0000] why a.b is applied out [16:16:57.0000] what happens if i use .then in capn proto? /reading [16:17:07.0000] x!then() == ? [16:17:12.0000] pipelining doesn't solve that [16:17:15.0000] x.then would be the commit [16:17:20.0000] i'm just reading this lib for now [16:17:40.0000] nothing on top of promises solves thenables being strings instead of symbols [16:18:23.0000] a syntax for applying chains of promises sounds nice though [16:19:00.0000] `fetch()!.json()!.something` [16:20:19.0000] a syntax for dealing with specialized forms of MOP alternatives in general seems to be a lot of proposal [16:20:23.0000] s [16:20:39.0000] optional chaining for example [16:20:54.0000] it seems like a more general problem than we have been treating it [16:25:15.0000] @awaitAllGets( fetch().json().something ) [16:25:51.0000] that breaks locality to me [16:30:08.0000] how so? [16:30:21.0000] it encapsulates what it meta-programs [16:30:31.0000] i wouldn't assume it could reach inside of functions [16:30:42.0000] but the 2 `.`s in it seem fine to modify [16:32:01.0000] it makes it feel like the dots are magically awaiting [16:32:05.0000] and you can't control which ones [16:34:14.0000] move it outside the decorated expression? [16:34:36.0000] then you might have to nest the decorated expressions [16:34:40.0000] make a goofy rule like preceding _ awaits and $ doesn't? [16:34:51.0000] plenty of ways to work around [16:34:58.0000] i guess [16:35:02.0000] nesting expressions is common place though [16:35:07.0000] i mean like [16:35:31.0000] `@x { @x { a.b }.c }.d [16:35:34.0000] does that even work [16:35:42.0000] `a!.b.c!.d` is the goal [16:35:43.0000] idk, don't have a proposal [16:36:03.0000] could make it so only !. are visible to be altered? [16:36:24.0000] too much bikeshed in here, I'm off to the dollar movie theater [16:36:30.0000] /me flees [16:39:03.0000] have fun 2019-08-09 [00:20:30.0000] re: `\N{LATIN CAPITAL LETTER A}`, it came up every now and then when discussing property escapes and more recently with sequence properties. IMHO it only adds minimal value and doesn't pay for the increase in binary size it would require, and I'd not be in favor of such a proposal [10:34:15.0000] mathiasbynens: the size could trivially be eliminated by minifiers, and it seems like a pretty big win in terms of readability [10:34:24.0000] is the size overhead your only concern? [10:35:50.0000] the size in the engine, or in code? [10:36:10.0000] Yeah by "binary size" he means engine size [10:36:25.0000] ohhhh, sure, ok. [10:37:03.0000] you wouldn’t necessarily have to ship the strings tho [10:37:17.0000] maybe I will make a babel plugin for it at some point [10:37:32.0000] if for any given set of long names, there’s a deterministic computable small value for it, it’d work [10:37:42.0000] like how php used to key on function names’ lengths :-p [10:38:10.0000] *computable and unique [10:38:52.0000] NamesList.txt is 1.5 megabytes; Chrome is currently... what, 400 megs? [10:39:00.0000] I guess that's not trivial, but really does not seem that bad [10:39:20.0000] "It's just a third of a percent" is how we got to 400mb in the first place [10:39:46.0000] also it gzips doesn to 400k [10:39:56.0000] *gzips down, not entirely sure how I made that typo [10:39:59.0000] That doesn't help the binary while running ^_^ [10:40:15.0000] ... sure it does, you don't need to hold the whole thing in memory at any point [10:40:52.0000] Are you proposing a disk access every time the parser encounters a \N{...}? [10:41:30.0000] oh, and that's with all the commentary too, hm. I wonder how much it would actually end up being if you stripped all that. one sec... [10:41:47.0000] why on earth would you ship the actual list of names [10:41:58.0000] generate a perfect hash at build time [10:48:28.0000] about a meg, uncompressed, without all the redundant stuff [10:48:50.0000] devsnek: that would mean that random other strings would end up being valid, which is probably no good [10:49:26.0000] hmm [10:49:32.0000] anyway, yeah, I guess that's a lot for browsers to ship if they aren't already [10:49:33.0000] cpython uses a tree structure of some sort [10:49:48.0000] i think this can be compressed a lot smaller than a meg [10:50:22.0000] Domenic: no, I was proposing that you hold the compressed thing in memory, and query it without completely decompressing it [10:50:30.0000] Ah OK [10:50:59.0000] Still this is just not worth it, I'd give like a 5-10 KiB max budget for a feature of this importance [10:51:16.0000] Is gzip usable that way? I know there are compression schemes that allow you to work on the compressed form. [10:54:23.0000] TabAtkins: kind of - it holds directory structure up front, IIRC, so you could e.g. split the table into files by first two letters of the character name and then only decompress the file which matched. but it would definitely not be the right choice for the kinds of query which would be relevant here; it was just an easy first approximation for compressed size. [10:55:08.0000] Domenic: seems reasonable. it would make sense as a babel plugin though! [10:55:34.0000] 5-10 kib isn't enough to store the values of the mapping [11:26:33.0000] mathiasbynens: do you know if browser's unicode data includes names 2019-08-10 [00:19:14.0000] devsnek: it does not [00:19:29.0000] hence my binary size argument [00:23:11.0000] Bakkot: relatedly, I’m still waiting for someone to create a JS minifier for property escapes, e.g. `/\p{Script_Extensions=Inscriptional_Pahlavi}/u` → `/\p{scx=Phli}/u` [07:00:40.0000] @mathias that shouldn't be hard if i had a mapping to patch in [07:01:14.0000] do you have a preferred minifier? cause I'll only do 1 PR then it becomes an arms race [07:26:40.0000] seems like a simple babel transform? [07:41:24.0000] the regexp parsing will be bad, regexp doesn't have an AST in babel [07:41:32.0000] not terrible, but not pleasant [07:43:21.0000] also few people use babili [07:43:29.0000] err... @babel/minify [07:59:16.0000] sure i don’t think it’d be minifying specifically, just a normal transform. but fair point on the regex parsing. [08:31:56.0000] you can use regexp-tree [08:32:17.0000] you can really see in the download graph when babel started using it [08:33:36.0000] bradleymeck: https://github.com/DmitrySoshnikov/regexp-tree/tree/master/src/optimizer/transforms [08:34:04.0000] yea i see it but i'm poking at it in repl a bit [08:34:20.0000] seems to have a slightly undocumented AST format XD [08:35:46.0000] lol [09:17:47.0000] @mathiasbynens http://unicode.org/Public/12.1.0/ucd/ScriptExtensions.txt doesn't show that extension? [09:36:48.0000] bradleymeck: it’s in Scripts [09:37:24.0000] bradleymeck: this is something that could be patched into regexpu-core (which babel already uses anyhow), or separately into regexp-tree [09:37:59.0000] bradleymeck: yeah, the mappings are available and I keep them up to date: https://github.com/mathiasbynens/unicode-property-aliases-ecmascript and https://github.com/mathiasbynens/unicode-property-value-aliases-ecmascript (+ see other regexpu-core deps) 2019-08-11 [10:20:09.0000] should we have a way of specifying sync and async generators directly in the spec [10:20:21.0000] like how we can specify regular builtin functions [10:24:37.0000] that way is pretty gross Rn, and needs revamping [10:25:42.0000] ljharb: wdym [10:26:24.0000] it takes a lot of boilerplate, and internal slots, to do what is very concise to express as a closure in js [10:27:30.0000] i mean what is "that way" [10:28:25.0000] defining algorithm steps, then using CreateBuiltinFunction and assigning internal slots [10:29:23.0000] i think this looks pretty nice though https://gc.gy/33249528.png [13:20:29.0000] ljharb: so instead of assigning internal slots you'd rather reference aliases from an outer operation-scope? [13:32:40.0000] jmdyck: i don’t have a ā€œratherā€ necessarily, I’m just not a fan of the current approach [13:53:30.0000] ok [14:00:21.0000] there's an open issue about it i think, from a few years back 2019-08-12 [19:11:46.0000] jmdyck: do you know if this note from built-in function's Call slot is ever relevant? "When _calleeContext_ is removed from the execution context stack it must not be destroyed if it has been suspended and retained by an accessible generator object for later resumption." [20:27:19.0000] hm [20:36:50.0000] devsnek: Sorry, don't know. [20:37:05.0000] jmdyck: no worries, i couldn't find anything either [20:37:18.0000] but it makes me feel better about my pr :) [20:37:29.0000] Does the condition described in the note not convince you? [20:37:46.0000] convince me of what [20:38:20.0000] convinceyou of the relevance of the note, i suppose. [20:39:08.0000] i just meant, i couldn't find a condition in the current spec where calleeContext would be suspended and retained by a generator [20:40:20.0000] ah, okay. slightly different question than i thought you meant. [20:41:04.0000] perhaps its used in the web spec or something [21:02:13.0000] I'm wondering if "suspend" is ambiguous in that sentence. [21:16:07.0000] devsnek: So is this what you're saying?: It's common that a generator object would suspend and retain an execution context for later resumption, but what you're wondering is how such a context could be _calleeContext_ in that [[Call]] method? [21:16:26.0000] yeah [21:16:30.0000] as far as i know that never occurs [21:16:39.0000] well with my pr it will happen, but not in the current spec [07:39:24.0000] ljharb: I don't think prototype iterators are compatible with generators [07:45:36.0000] devsnek: user ones, sure, but why not builtins? [07:46:35.0000] I guess you could change regexpstringiteratorprototype.next to call GeneratorResume or whatever [07:46:46.0000] but that seems like complexity [07:46:59.0000] i'm trying to get rid of complexity [07:47:22.0000] wait, regular generators tho already make an iterator whose next resumes the generator [07:47:41.0000] literally the only difference here is what kind of object IterationResult or whatever creates [07:47:43.0000] yeah but regexpstringiteratorprototype has its own next method [07:49:05.0000] i guess I’m not clear on why having it call GenratorResume with the receiver would be more complex than the current state [07:52:02.0000] I dunno [07:52:08.0000] I haven't explored it that much [07:52:47.0000] I'll take a look in engine262 and see if it still passes test262 [08:39:12.0000] ljharb: the prototype needs to implement both RegExpStringIteratorPrototype and GeneratorPrototype [08:39:14.0000] slots of both, etc [08:40:08.0000] sure, resiP could inherit from GP, which inherits from IP? [08:41:19.0000] no i mean you need something that has both [[GeneratorState]] and [[IteratingRegExp]] [08:45:29.0000] maybe you could put a [[RealGenerator]] slot on RegExpStringIteratorPrototype instances [08:45:40.0000] and then next does GeneratorResume(this.[[RealGenerator]]) [08:46:14.0000] this seems really complex though [08:47:52.0000] hmm [08:48:12.0000] it just seems like the value of this change is to take all the places that make an iterator, and express them more clearly/closer to js [08:48:27.0000] and if we can only do that for new cases, it doesn’t seem very compelling [08:48:41.0000] i think its still extremely compelling for new cases [08:48:52.0000] it turns thousands of new steps into tens of steps [08:50:01.0000] and it plays nicely with implementations too [08:51:51.0000] here's what i came up with for matchAll, and it works, but its kinda meh https://gc.gy/33330024.png https://gc.gy/33330074.png https://gc.gy/33330109.png [08:57:09.0000] devsnek: so is the idea that all the iterator-helper functions would use %GeneratorPrototype%? [08:57:16.0000] Instead of a new prototype for each kind? [08:57:19.0000] Domenic: yes [08:57:24.0000] OK [08:57:37.0000] I've asked implementers which they would prefer and they never get back to me [08:57:39.0000] So I'm OK either way [08:58:08.0000] i see it as using less memory, and suspending is a lot easier to lower since you have fewer functions to compare with the state of the prototype [08:59:26.0000] ljharb: i could add a third element, "steps for creating the initial return value of a built-in (async) generator" [08:59:38.0000] but that seems messy [09:27:24.0000] `Await` calls `! PerformPromiseThen(promise, onFulfilled, onRejected)`, but `PerformPromiseThen` never returns a CompletionRecord in that context, i.e., except `undefined`. Then, why is it prefixed with `!`? [09:28:15.0000] cpplearner: it's an assertion that PerformPromiseThen never returns an abrupt completion. As you can see, the assertion is correct. Which is good, because incorrect assertions are spec bugs. [09:29:33.0000] Oh, I see. I was a bit worried that I'm missing something. Thanks for the clarification. [10:40:48.0000] cpplearner: also, every abstract operation gets automatically wrapped in a complen rtcord [10:41:04.0000] *completion record [10:45:31.0000] Oh, that I didn't know. 5.2.3.1 certainly states the implicit case. Thanks for the reminder. [10:45:45.0000] =) [10:46:26.0000] ljharb: do you still want to try to migrate old methods that return iterators [10:47:37.0000] devsnek: to me that's the primary goal [10:48:02.0000] devsnek: as for having GeneratorPrototype over a bunch of new individual kinds, i like that too, but old ones couldn't do that, as you say [10:48:22.0000] ok so basically [10:48:35.0000] we need some way to override the return value [10:49:20.0000] with `ObjectCreate(%RegExpStringIteratorPrototype%, [ [[IteratedRegExp]], [[RealGenerator]] ])` [10:49:29.0000] and then some way to set [[RealGenerator]] [10:55:59.0000] you could set that slot and use it unconditionally [10:56:09.0000] it's just be cyclic for the ones that didn't have their own prototype [12:18:42.0000] TDZ doesn't guard against early reads in patterns? [12:19:54.0000] nm, miswrote the code [12:41:10.0000] ok so in `a.b?.c`, `a.b?.c` is an OptionalExpression, and `b?.c` is an OptionalChain, is that right? [12:49:09.0000] devsnek: `?.c` is the OptionalChain [12:50:00.0000] what is `b?.c` [12:50:30.0000] nothing at all, actually [12:50:39.0000] `a.b` is a MemberExpression [12:50:57.0000] so you're cutting across the tree [12:51:29.0000] so `(a.b)?.c` [12:51:35.0000] in terms of tree [12:51:40.0000] the spec grammar works for the spec but it doesn't correspond to something implementable, as it turns out :p [12:51:41.0000] yeah [12:51:56.0000] well i'm trying to implement it in engine262 [12:52:01.0000] *directly implementable [12:52:04.0000] hmmm [12:52:10.0000] which tries to correspond to the actual steps in the spec [12:52:27.0000] right [12:53:08.0000] the reason I said that is purely based on not being able to view `.b` as a thing in itself [12:53:23.0000] yeah [12:53:35.0000] in a.b?.c.d, is that `a.b` member expression, `?.c` and `.d` are optional chains? [12:54:21.0000] `?.c.d` is the OptionalChain there; that's actually the motivation of having OptionalChain be a thing [12:54:35.0000] oh and then `?.c` is an optional chain inside that [12:54:49.0000] right [12:54:58.0000] this is almost making sense lol [12:55:09.0000] i need to get a whiteboard [12:55:14.0000] because in `a?.b.c?.d.e`, there are two optional chains, is the idea [12:55:33.0000] it works well to achieve the short-circuiting behavior in the spec [12:55:51.0000] but it's a bit mind-boggling on very first read [12:59:05.0000] https://gc.gy/33344943.png [12:59:22.0000] aside from messed up indentation, does this look right? [13:00:17.0000] oh i messed up three times [13:00:58.0000] oops yeah OptionalChains on the interior of the latter example [13:01:46.0000] https://gc.gy/33345106.png [13:02:43.0000] in the third one there's actually a nested OptionalExpression [13:02:55.0000] where's that [13:03:09.0000] since an OptionalChain has exactly one ? [13:03:15.0000] connecting `?.c.d` and `?.e.f`? [13:03:20.0000] Yeah exactly [13:04:04.0000] is that a sole child of the first OptionalChain [13:04:09.0000] or does it replace the first OptionalChain [13:05:44.0000] OptionalExpression [13:05:45.0000] OptionalExpression [13:05:45.0000] MemberExpression a.b [13:05:45.0000] OptionalChain ?.c.d [13:05:45.0000] OptionalChain ?.e.f [13:06:07.0000] oh [13:07:57.0000] I don't blame you for finding it confusing though šŸ˜“ [13:08:24.0000] its funny to know how optional chaining works well enough to implement it but at the same time have no idea how the spec for it works [13:08:29.0000] right? [13:08:37.0000] I tried to make this note clearer: https://tc39.es/proposal-optional-chaining/#sec-optional-chains [13:08:45.0000] but I don't know if it's enough [13:09:08.0000] i'm writing out a bunch of AST examples to help myself [13:09:18.0000] seems good [13:09:50.0000] so i could have a parseOptionalChain which is a sub of parsing member expressions that stops when it hits a ? [13:09:59.0000] and then the caller calls parseOptionalChain again [13:17:50.0000] think so [13:20:28.0000] I guess if you make the refactors for EvaluateStaticPropertyAccess etc. first then it should work out okay [13:21:32.0000] (where by "it" I mean "implementation of the evaluation part as a whole") [14:14:22.0000] rkirsling: what's the grammar for ?.x.y.z [14:14:49.0000] oh nvm i'm dumb [14:14:55.0000] that's two optional chains [14:54:10.0000] devsnek: it's one OptionalChain but nested three levels deep [14:54:14.0000] yeah [14:54:34.0000] i just couldn't figure out what production covered the `.z` [14:54:47.0000] its passing all the tests now :) [15:12:30.0000] nice [15:13:15.0000] > Optional chains are hard okay? [15:13:16.0000] lol [15:14:32.0000] I've not dug through the code in engine262 before but `this.eat` made me laugh [15:14:41.0000] so direct compared to `consume` [15:19:26.0000] eat comes from acorn [15:19:37.0000] so esprima, babel, etc, all use it [15:27:17.0000] that was my guess hehe [16:21:24.0000] So, question: Is `const a = {def\u0061ult: 12}` supposed to have a syntax error or not? In chrome and safari it does, while in firefox and chakra it does not. [16:21:51.0000] Secondary question: is there a test262 test covering a keyword with an escape used as an identifier name? [16:24:46.0000] in https://tc39.es/ecma262/#sec-source-text it says "string literals, regular expression literals, template literals and identifiers" [16:24:56.0000] doesn't explicitly call out keywords [16:26:10.0000] and then again in https://tc39.es/ecma262/#sec-names-and-keywords [16:27:14.0000] weswigham: I was just about to reply to your WK bug but note that all engines agree on `const a = {def\u{61}ult: 12}` being an error [16:28:08.0000] I can't find a test262 case for the object key context [16:28:09.0000] those are both allowed by my parser, so I assume it's legal :P [16:28:46.0000] just these for declarations [16:28:46.0000] https://test262.report/browse/language/identifiers/val-default-via-escape-hex.js [16:28:46.0000] https://test262.report/browse/language/identifiers/val-default-via-escape-hex4.js [16:28:57.0000] after jumping around the spec, i haven't found anything specifically saying this is allowed or not [16:29:12.0000] so i would assume its not allowed [16:29:36.0000] it's allowed; the relevant production is PropertyName -> LiteralPropertyName -> IdentifierName, which allows both kinds of unicode escape sequences [16:29:38.0000] but then the variable declaration calls out IdentifierName but not ReservedWord and object literals don't? [16:29:44.0000] rkirsling all engines don't agree, afaik - edge and firefox (chakra and spidermonkey) both don't error [16:30:04.0000] oh we're talking about object keys [16:30:22.0000] rkirsling: "default" is not a legal variable name, but is a legal property name (as all engines agree) [16:30:28.0000] weswigham: they do, I'm looking at it :p Chakra/SM behave differently with the hex4 notation [16:30:38.0000] Bakkot: yeah I do see that [16:30:43.0000] in an object key i would expect this to work [16:31:07.0000] it may well be that all engines are wrong if there's no test for it though [16:31:36.0000] ick, irc escaped what I input, but it was supposed to be `\` `u` `0` `0` `6` `1` - not the extended escape pattern [16:31:53.0000] though from what I'm seeing, the extended escape style also doesn't cause an error in firefox... [16:32:04.0000] yeah, I know there's some tests for escape-sequence-in-keywords, but it makes sense that escape-sequence-in-keyword-in-property-name can have been missed [16:32:05.0000] https://www.irccloud.com/pastebin/EAhPZYqO/ [16:32:19.0000] argh [16:32:22.0000] wrong ne [16:32:24.0000] *one [16:32:47.0000] https://tc39.es/ecma262/#sec-reserved-words : "A code point in aĀ ReservedWordĀ cannot be expressed by aĀ \Ā UnicodeEscapeSequence." [16:32:49.0000] rkirsling variable name vs object property key [16:32:57.0000] object property keys allow `default` [16:33:03.0000] that part is important [16:33:22.0000] yeah I understand [16:33:38.0000] apparently I was off on that though [16:33:43.0000] checking too many things at once [16:33:50.0000] so `def\u0061ult` doesn't match ReservedWord, and therefore does match Identifier [16:34:11.0000] Propert names use IdentifierName, though [16:34:23.0000] which have _no_ ResveredWord restriction [16:34:37.0000] right [16:34:39.0000] does anyone know why v8 might have an explicit token for "enum" [16:34:54.0000] gibson042: you perhaps meant "therefore does match IdentifierName"? [16:34:56.0000] devsnek: because it's future reserved? [16:35:01.0000] Identifier is "IdentifierNamebut notĀ ReservedWord" [16:35:06.0000] so yes to both [16:35:08.0000] (as opposed to "... does match Identifier") [16:35:13.0000] rkirsling: it has a category for future reserved, but an explicit separate token for enum [16:35:32.0000] wacky [16:36:02.0000] weswigham: anyway I think we agree that it is legal per the spec and all the engines you tested just have bugs [16:36:03.0000] maybe it used to do something [16:36:13.0000] probably test262 should get some new tests [16:36:23.0000] yeah I would start with test262 [16:36:32.0000] because XS is also following JSC/V8 [16:38:48.0000] I will open an issue for it [16:39:05.0000] (if no one else is already doing so) [16:40:11.0000] šŸ™‡ā€ā™‚ļø [16:40:43.0000] so `{ def\u0061ult: 5 }` should be allowed? [16:40:53.0000] yes. [16:41:00.0000] well, in expression position. [16:41:30.0000] aye [16:42:02.0000] I can open the issue if you haven't already [16:45:35.0000] rkirsling: `({ def\u{61}ult: 0 })` appears to work in SM, actually [16:46:00.0000] yeah I was evidently juggling too many cases, sorry [16:46:10.0000] convinced myself of something that wasn't true [16:46:27.0000] weswigham: almost don writing it [16:46:31.0000] Too late: https://github.com/tc39/test262/issues/2285 [16:47:53.0000] sigh [16:48:06.0000] opened https://github.com/tc39/test262/issues/2286 before seeing your message [16:53:47.0000] Bakkot: I don't see the divergence in behavior between Ch/SM that you mentioned [16:54:06.0000] rkirsling: yeah I can't read [16:54:10.0000] unless I haven't ran `jsvu` in a while [16:54:19.0000] *run [16:54:21.0000] okay cool 2019-08-13 [17:19:19.0000] devsnek: seems like there's pretty broad consensus that Iterator should be a class [17:20:07.0000] something along the lines of [17:20:18.0000] When the Iterator function is called, the following steps are taken: [17:20:19.0000] 1. If NewTarget is either undefined or the active function, then [17:20:20.0000] a. Throw a TypeError exception. [17:20:20.0000] 2. Return ? OrdinaryCreateFromConstructor(NewTarget, "%Iterator.prototype%"). [17:20:27.0000] Bakkot: yes, now its more about whether it should be directly constructable [17:20:36.0000] devsnek: seems pretty broad agreement on that too [17:21:23.0000] at least, I found Domenic's comment in https://github.com/tc39/proposal-iterator-helpers/issues/30#issuecomment-520537582 convincing, and I haven't seen anyone else disagree [17:21:29.0000] ok [17:21:52.0000] i was about to say, i was confused who was agreeing, cuz you and domenic had different viewpoints [17:22:00.0000] good to know the consensus is [17:22:17.0000] sorry, I guess I ought to have more explicit than just +1'ing his comment [17:22:48.0000] i will write up a constructor that throws on ~~Math.random() > 0.5~~ NewTarget being the current function [17:23:13.0000] (consensus among the ~5 people who have looked at this anyway; I can't guarantee the rest of the committee will go for it) [17:24:08.0000] we shall see [17:31:17.0000] Domenic: this is what you had in mind right? https://gc.gy/33361267.png [17:35:28.0000] devsnek: since presumably it should also not be callable as a function, you would want to check for undefined as well [17:35:35.0000] oh good catch [17:35:45.0000] also it's spelled %Iterator.prototype% now [17:35:49.0000] (I wrote this a few lines above) [17:36:46.0000] should i just s/%IteratorPrototype%/%Iterator.prototype/ [17:36:58.0000] presumably yes (cc ljharb) [17:50:33.0000] devsnek: since `%Iterator%` exists, yes [17:50:44.0000] cool [17:50:55.0000] i wonder how hard it will be to add suspendable builtins to v8 [17:51:03.0000] so wait, what will `new Iterator()` do? [17:51:08.0000] throw a type error [17:51:17.0000] but `new class extends Iterator {}` will work? [17:51:20.0000] yes [17:51:22.0000] SGTM [17:51:25.0000] šŸ‘šŸ» [17:51:44.0000] altho tbh `new class extends Iterator {}` is kind of silly to require when `new Iterator` could work ĀÆ\_(惄)_/ĀÆ [17:51:59.0000] a lot of things *could* work [17:53:22.0000] ljharb: at that point you would presumably just write `Object.create(Iterator.prototype)` [18:03:30.0000] (or `Iterator.from({ next })` I guess) [18:13:14.0000] Can someone point out text making `let def\u{61}ult` an error? The closest I see is "All interpretations ofĀ IdentifierNameĀ within this specification are based upon their actual code points regardless of whether or not an escape sequence was used to contribute any particular code point.", but that seems to be trumped by "A code point in aĀ ReservedWordĀ cannot be expressed by aĀ \Ā UnicodeEscapeSequence." (a note, but one that is only [18:15:06.0000] gibson042: it's a good question -- I don't really see what's enforcing the note [18:17:46.0000] oh wait [18:18:33.0000] I think it's that 11.6.2.1 is listing out the keywords exactly as they're expected to appear in the source text? [18:19:13.0000] yeah that has to be it. [18:21:10.0000] I'm considering that, and still not seeing anything to justify rejecting non-export use [18:26:01.0000] Bakkot: unless you were doing a generic `new IteratorType()` thing, and the default was `Iterator` [18:26:14.0000] Bakkot: iow it kind of seems like a useless inconsistency to disallow `new Iterator` [18:28:31.0000] gibson042: Identifier has an Early Error reading [18:28:38.0000] > It is a Syntax Error if StringValue of IdentifierName is the same String value as the StringValue of any ReservedWord except for yield or await. [18:28:56.0000] is the thing making that an error. [18:30:18.0000] ahh [18:30:26.0000] this applies because `def\u{61}ult` is an Identifier via `Identifier : IdentifierName but not ReservedWord` (ReservedWords, like other tokens, are specified as sequences of SourceCharacter elements, and do not have alternatives allowing unicode escapes) [18:31:04.0000] (also "default" is a ReservedWord because it is a Keyword, is the remaining part of this) [18:35:12.0000] Thank you. And that means that `({ def\u0061ult: true })` is a syntax error, right? [18:35:44.0000] gibson042: no, it's legal, because the production for PropertyName is IdentifierName, not Identifier, and so that Early Error does not apply [18:36:09.0000] (specifically, the production for LiteralPropertyName, which is the relevant case of PropertyName) [18:36:39.0000] why does that not track to Identifier via IdentifierReference? [18:36:47.0000] https://tc39.es/ecma262/#prod-PropertyDefinition [18:37:04.0000] ah, n/m [18:37:09.0000] gibson042: IdentifierReference is not the relevant production, because it is not followed by `:` [18:37:12.0000] yep [18:37:35.0000] /me wipes brow [18:37:37.0000] (`({ def\u0061ult })` is forbidden and, I guess, should probably also have a test, if it doesn't) [18:37:57.0000] ljharb: Iterator.prototype does not have a `next` method, so `new Iterator` is not ever going to give you a useful thing [18:38:03.0000] so it seems reasonable to forbid it [18:38:17.0000] anyway, feel free to comment on https://github.com/tc39/proposal-iterator-helpers/issues/30#issuecomment-520537582 [18:56:09.0000] Bakkot: ah yeah, that's a fair point. but then it'd error when you tried to iterate it, no? [19:00:59.0000] incidentally *only* V8 throws on `foo = {}; foo.def\u{61}ult = 3;` [19:01:54.0000] probably ought to add that to the issue [19:02:04.0000] v8 unconditionally considers escaped keywords to be syntax errors [19:02:33.0000] the only reason they even parse them is to have a custom error message instead of "unexpected token" [19:20:13.0000] Bakkot: wait a sec [19:20:35.0000] is there even a meaningful way to test `({ def\u0061ult })` if you can't make a bound identifier named `default`? [19:27:29.0000] assign to global [19:27:32.0000] or object+with [19:28:09.0000] with probably is a bad idea cuz of strict tests [19:32:01.0000] rkirsling: actually, `({ default })` apparently isn't valid syntax [19:37:14.0000] gah. [19:59:40.0000] er rather on the contrary [20:01:49.0000] in an identifier context there's no case where adding the escape changes whether it is or isn't an error, right? [20:11:24.0000] right (I think), assuming "adding the escape" = "replacing a character with the equivalent Unicode escape sequence" [20:18:05.0000] yeah [20:40:06.0000] for anyone writing tests for nullish coalescing, engine262 has an implementation now, if that helps at all [07:10:18.0000] is chrome still the only browser with SAB enabled [07:11:27.0000] think so [07:11:55.0000] so sad [07:12:21.0000] SAB can let me add stepped evaluation to engine262 [07:13:34.0000] that should be able to be gated on feature detection though right? you are just using the Atomics [07:13:44.0000] but Atomics.wait is banned on main thread of browsers [07:13:54.0000] :themoreyouknow: [07:14:12.0000] I only use wait on the worker thread [07:14:58.0000] there's no way to pause evaluation in engine262 so I just block the onNodeEvaluation callback [08:26:12.0000] devsnek: please help fix dependencies of https://bugzilla.mozilla.org/show_bug.cgi?id=1477743 [08:26:41.0000] oh wow this is big [08:28:54.0000] annevk: how does something like 1562506 block SAB [08:29:08.0000] 1565206* [08:29:29.0000] 1565205* [08:30:51.0000] devsnek: Spectre [08:32:44.0000] devsnek: https://docs.google.com/document/d/1zDlfvfTJ_9e8Jdc8ehuV4zMEu9ySMCiTGMS9y0GU92k/edit might help [08:34:05.0000] oh ok this makes more sense now [08:35:07.0000] glad to hear that [13:12:14.0000] devsnek: did you test cases like `foo?.(a?.b)` perchance [13:12:28.0000] rkirsling: in engine262? [13:13:39.0000] rkirsling: why would that work? [13:13:43.0000] nah V8; I figure it wouldn't've been a likely oversight in your own engine [13:14:08.0000] rkirsling: `a.(b)` is a syntax error; you can't parenthesize in the middle of a chain [13:14:17.0000] ohhh it's a call, nvm [13:14:18.0000] ignore me [13:14:27.0000] yay confusing [13:14:33.0000] haha I was confused by your confusion there [13:14:37.0000] but yes [13:14:52.0000] https://gc.gy/33432290.png [13:15:04.0000] I reckon there will be plenty of that in the community for a bit šŸ˜… [13:15:25.0000] i've held back on writing a lot of tests because i know bcoe is working on them [13:15:55.0000] devsnek: yeah I did a doofy thing 'cause I had all jumps targeting the same label even in a case like that [13:16:10.0000] oh heh [13:16:26.0000] so if foo is a function and a is nullish then the call wouldn't happrn [13:16:30.0000] *happen [13:16:58.0000] should be an easy fix after lunch here [13:49:33.0000] Huh? Shouldn't `foo?.(a?.b)` desugar to `foo == null ? undefined : foo(a == null ? undefined : a.b)`, in which nullish a can affect the _arguments_ but not prevent the attempted invocation of a non-nullish foo? [13:50:26.0000] gibson042: yes, that's the bug rkirsling was saying he was fixing [13:53:30.0000] yeppers [13:53:49.0000] was a silly oversight on my part [13:54:23.0000] just made me wonder what kind of oversights V8 might be susceptible to ;) [13:55:03.0000] cool, got it [13:56:25.0000] the short-circuiting behavior of optional chaining is not going to feel intuitive for a long time, if ever [13:58:01.0000] it feels intuitive to me [13:58:35.0000] i think its like pipelining, it either makes sense to your or it doesn't [13:58:38.0000] yeah I do like that part [13:59:02.0000] my brain refuses to think in terms of pipelines [13:59:05.0000] I worry about the syntax like anybody else but I've gotten used to looking at it so hopefully others will too before long? [13:59:22.0000] devsnek: really? have you done any Haskell or the like? [13:59:27.0000] yeah [13:59:30.0000] and elixir [13:59:43.0000] i really like haskell and elixir too [13:59:45.0000] ah alright then I have nothing to say XD [13:59:48.0000] or, like, bash [13:59:58.0000] ^ true [13:59:59.0000] i was writing bash scripts yesterday [14:00:08.0000] how is it still so hard to move files from travis to a branch in github [14:00:24.0000] #atleastitsnotjenkins? [14:00:52.0000] lol [14:01:22.0000] Yeah, that could be. But `foo?.(++i)` still looks to me like the increment should always happen, even though it won't if foo is nullish (but *will* if foo is non-nullish and non-callable). [14:01:58.0000] i just try to avoid update expressions in odd places [14:02:18.0000] cuz that's not a problem unique to optional chaining [14:03:31.0000] no, but exacerbated by it [14:03:53.0000] worth noting that the most popular JS styleguide bans pre and postincrement [14:04:26.0000] ljharb: `foo?.(i += 1)` is valid too [14:04:41.0000] devsnek: it also bans assignments in expression position [14:04:53.0000] oh good [14:04:53.0000] I'm using it as a specific example of side-effecting. Feel free to substitute update expressions/console interactions/internal state manipulation/etc. [14:05:04.0000] side effects are always risky, though, and it's not like we're catering to them [14:07:08.0000] e.g., `foo?.(arr.pop())` [14:07:36.0000] `foo?.(purchaseCar())` [14:07:41.0000] lol [14:15:46.0000] ljharb: 6.1.7.4 uses both %ArrayPrototype% and %Array.prototype% [14:15:54.0000] for all of them [14:15:57.0000] which should actually be used [14:16:43.0000] devsnek: link? [14:16:52.0000] https://tc39.es/ecma262/#sec-well-known-intrinsic-objects [14:18:09.0000] i mean there's a thing about accessing properties [14:18:11.0000] devsnek: the table has to have the old one [14:18:17.0000] devsnek: but all new instances should use the new dot style [14:18:20.0000] ok [14:18:33.0000] i was just trying to figure out if i should update engine262 to use them or not [14:18:56.0000] yes please [14:20:04.0000] whee https://gc.gy/33436198.png [14:21:17.0000] shouldn't %AsyncGenerator.prototype% actually be %AsyncGeneratorFunction.prototype.prototype% [14:21:43.0000] since %AsyncGenerator% is its own thing, nah [14:22:11.0000] well it says that %AsyncGenerator% should be referred to as `%AsyncGeneratorFunction.prototype% [14:22:23.0000] hm [14:22:35.0000] the main ones i was trying to get rid of are the underscored ones [14:22:44.0000] i think it's fine to keep the top-level one [14:23:06.0000] ok [14:33:49.0000] Hey! Would be nice if you could check my proposal to add "Array.prototype.chunk" : https://github.com/fernlop/Array.prototype.chunk [14:35:52.0000] fernlop: what JS libraries have this kind of functionality, what do they call it, what are their semantics? [14:36:05.0000] fernlop: any other languages besides php? [14:36:33.0000] fernlop: (also for future reference, https://github.com/tc39/template-for-proposals and click "use this template") [14:37:41.0000] ljharb: if you want people to use that template it maybe should not ask people to ensure they are members of tc39 before using it [14:38:13.0000] Bakkot: that is a good point [14:38:16.0000] i'll tweak that [14:38:57.0000] I think it can be deleted outright, right? [14:39:15.0000] rkirsling: mostly https://github.com/tc39/template-for-proposals/commit/76bb1c4d3b7431a6e6a04a62dfa4273c131109f1 [14:39:20.0000] since the author can be anybody -- they'll need a champion but not before setting pen to paper [14:39:30.0000] ahh seems good [14:39:49.0000] when i originally made the template i was assuming stage 0 proposals wouldn't really have a repo yet; in practice that's not been the case. [14:39:59.0000] yeah, repos are nice [14:41:28.0000] im sorry if i made any mistakes but it was not cleary documented how and where to put proposals in the "idea" stage.. just tell me how to fix it and i will try my best [14:41:55.0000] fernlop: making a repo like this and linking it in this channel is a good way to get started [14:42:23.0000] i.e., the thing you did was right [14:42:57.0000] now there is the followup part, which is where people ask about motivation and details, e.g. what do languages other than PHP do, or other JS library [14:44:08.0000] fernlop: you def didn't make a mistake :-) just giving you a heads up for the future [14:48:39.0000] okay thanks! i will continue with more details [15:06:41.0000] TIL that template repos are a thing [15:09:14.0000] it's pretty new [15:10:50.0000] its pretty cool [15:43:31.0000] revisiting the iterator methods proposal, and reminding myself that people keep asking for these methods to be on iterables, I'm realizing I don't actually understand what is being asked for [15:44:04.0000] specifically, if we had a `filterIterable` function, what would `filterIterable(new Map([['a', 0], ['b', 1]]), foo)` return? [15:44:56.0000] would it be a Map? (how - is the assumption we'd simultaneously introduce a Symbol.fromIterator?) a "lazy iterable"? an array? [15:45:32.0000] people don't want filterIterable(map) [15:45:41.0000] they want Iterable(map).filter [15:45:48.0000] devsnek: on the contrary, rauschma asked for that explicitly [15:45:56.0000] hmmmm [15:46:00.0000] anyway, even in that world, what does that return? [15:46:03.0000] oh for chaining i guess they did [15:46:05.0000] yeah i dunno [15:49:08.0000] C# just returns generic enumerables, I guess [15:50:47.0000] i wish this zloirock fellow would open some PRs [15:50:52.0000] lots of issues [15:51:02.0000] PRs are a lot more work [15:51:35.0000] edit button on github does the job [15:51:57.0000] yeah, but you gotta, like, figure out the correct spec text and formatting and etc [15:52:26.0000] and follow up if there are problems [15:52:28.0000] since raising issues is a volunteer thing anyway, it seems a lot to ask for a full PR too [15:52:46.0000] i guess [15:53:16.0000] Bakkot: my preferred interpretation is that they want map.filter(foo) to return a map. And we should totally do that. And for Set. They're just separate proposals. [15:54:40.0000] Domenic: those are useful, but I don't think it is actually what rauschma etc were asking for [15:54:47.0000] Maybe in most cases you could mentally model `someCollection.someMethod(...args)` as `new SomeCollection(someCollection[Symbol.iterator]().someMethod(...args))`. (Although I think we should not spec them that way.) [15:55:28.0000] though I guess, like I said, I'm not really sure what they were asking for [15:55:50.0000] Yeah, I'm not sure what else it could really be [15:56:53.0000] possibly "put wu.js in the standard library" [15:57:36.0000] isn't wu also iterable(x).map().filter() [15:57:43.0000] devsnek: yes 2019-08-14 [16:03:21.0000] Bakkot https://github.com/tc39/test262/pull/2295 I believe I addressed your feedback here, https://github.com/tc39/test262/pull/2295 [16:03:28.0000] oops, double link [16:03:50.0000] leobalter: neat, will take a look in a bit [16:03:55.0000] thank you! 2019-08-15 [19:11:24.0000] leobalter: do you have a list of all the escaped tests [06:32:34.0000] devsnek there is the PR 2295 but there are other tests here and there [06:32:42.0000] like for await and yield [09:10:53.0000] Hey! I'm working on a proposal for a few days and need help with creating the ecmarkup specs and would he happy to get some feedback about my idea. https://github.com/fernlop/Array.prototype.chunk [09:31:42.0000] fernlop: this might help a bit https://timothygu.me/es-howto/ [09:38:48.0000] Thanks! At which stage should i look for a champion supporting my idea and most importantly, how? :) [09:39:26.0000] fernlop: it needs a champion before it has any stage [09:40:53.0000] Yes i know, i meant at which stage of developing the idea, not proposal stage, sorry [14:23:20.0000] how do functions declared in modules get the proper ScriptOrModule slot [14:26:36.0000] GetActiveScriptOrModule is always null in InitializeEnvironment [14:27:56.0000] i think this might be a bug carried from how scripts work [14:28:15.0000] they push scriptCtx onto the stack before doing GlobalDeclarationInstantiation [14:42:23.0000] devsnek: why would `GetActiveScriptOrModule` not return the active module [14:42:31.0000] ljharb: there is no active module [14:42:35.0000] iow that seems like a bug in GetActiveScriptOrModule, not something FunctionInitialize would need [14:42:44.0000] its not [14:42:45.0000] the name of that abstract op suggests there should be [14:42:54.0000] active means on the execution context stack [14:43:06.0000] there is no active module during InitializeEnvironment [14:43:36.0000] and when are these abstract ops called, from a module, during InitializeEnvironment? [14:44:22.0000] InitializeEnvironment -> InstantiateFunctionObject -> FunctionCreate -> FunctionInitialize -> GetActiveScriptOrModule [14:44:40.0000] but there's no module on the stack [14:44:42.0000] so it returns null [14:45:55.0000] devsnek: ahhh so you're saying that an exported function declaration will get its slot set to null [14:46:09.0000] when it conceptually should be set to "the module it's exported from"? [14:46:09.0000] any top level function declaration [14:46:13.0000] yeah [14:46:34.0000] dynamic import and import.meta rely on the ScriptOrModule slot on functions [14:46:40.0000] otherwise they lose context [14:46:55.0000] devsnek: ok so could this line https://github.com/tc39/ecma262/pull/1670/files#diff-3540caefa502006d8a33cb1385720803R22614 instead of passing `module` and plumbing that through everything, could it somehow *set* the active module, such that `GetActiveScriptOrModule` now returns it? [14:47:01.0000] ie, making a change in two places instead of in like 7 [14:47:11.0000] (my relevant metaphor is, react context instead of react props) [14:47:42.0000] that seems okay too [14:47:48.0000] well [14:47:50.0000] actually that seems iffy [14:47:53.0000] how so? [14:48:13.0000] we could set it as a slot somewhere, and clear it when initializeenvironment is done [14:48:57.0000] cuz it breaks the current definition of active [14:49:26.0000] how so? if `GetActiveScriptOrModule` can't ever return a module, it seems already broken [14:49:52.0000] it can [14:49:57.0000] it works fine during evaluation phase [14:50:20.0000] the issue is just that uh [14:50:31.0000] scripts have their context on the stack when they do GlobalDeclarationInstantiation [14:50:33.0000] and modules don't [14:50:41.0000] should they? [14:50:50.0000] the context doesn't exist yet [14:50:58.0000] its created during evaluation [14:51:18.0000] it has a lexical environment tho [14:51:23.0000] shouldn't that have a reference to the module? [14:51:45.0000] not an execution context though [14:52:04.0000] right, i'm convinced why gASoM can't return it [14:52:13.0000] i'm open to other ways of solving this [14:52:21.0000] but in the event that returns null, could we then get the module off the `scope` lexical environment? [14:52:25.0000] i just think patching GetActiveScriptOrModule is messy [14:52:31.0000] hmmm [14:52:46.0000] surely the scope knows which Module it's in [14:52:58.0000] let me see [14:53:26.0000] we could add a ScriptOrModule slot to module environments maybe [14:53:35.0000] assert that scope is a module environment [14:55:19.0000] that sounds like it'd work [14:57:08.0000] these tables should be autonumbered [14:57:32.0000] lol the text "table 15" links to #table-16 [14:58:41.0000] probably should be named instead of numbers, since numbers change but names don't [15:07:48.0000] ljharb: https://gc.gy/33611864.png [15:09:46.0000] devsnek: looks nice and simple to me [15:15:42.0000] Domenic: what was the reasoning behind having two callbacks for import.meta 2019-08-16 [14:03:53.0000] seems like we lack test262 cases for using Promise#finally with thenable objects [14:04:15.0000] (https://trac.webkit.org/changeset/248793/webkit was just landed but we already pass all tests: https://test262.report/browse/built-ins/Promise/prototype/finally) [14:21:30.0000] rkirsling I'm going into a 10 days vacation, so I might take a little while until I'm into Test262 [14:21:41.0000] I'll be happy to add these tests if they are still necessary [14:22:09.0000] no worries, I'll make an issue [14:22:10.0000] rkirsling: https://github.com/tc39/test262/tree/master/test//built-ins/Promise/prototype/finally/this-value-non-promise.js [14:22:23.0000] rkirsling: that should have been failing if you brand-check for Promise [14:22:52.0000] since "IsPromise" checks internal slots, which don't go through proxies [14:23:19.0000] I think we only missed one specific path [14:23:28.0000] this was the test that was added WK-side: https://github.com/WebKit/webkit/blob/master/JSTests/stress/promise-finally-should-accept-non-promise-objects.js [14:24:16.0000] it'd be great to add that to test262, and also to https://github.com/es-shims/Promise.prototype.finally/blob/master/test/tests.js :-) [15:44:07.0000] but yeah ljharb if it looks like WK is doing something observably derpy wrt proxies feel free to file a bug, I really just noticed Yusuke's patch and wanted to make sure stuff got conveyed back here [15:45:34.0000] I’m not really sure how IsPromise works in wk [15:47:55.0000] hmm https://github.com/WebKit/webkit/blob/master/Source/JavaScriptCore/builtins/PromiseOperations.js#L29-L35 [15:50:53.0000] that seems legit: https://tc39.es/ecma262/#sec-ispromise [15:51:24.0000] (but my proxy foo is weak) [16:09:05.0000] rkirsling: that check should always return false on a proxy [16:09:21.0000] rkirsling: how does `@getByIdDirectPrivate` work? [16:10:32.0000] seems to just be `.` for stuff that can't be accessed from userland, but the interesting thing is that we do pass basically everything non-realm-related under built-ins/Proxy [16:10:54.0000] is this really so unique? šŸ¤” [16:12:12.0000] (er, "do pass every test262 test that's ..." if that mid-sentence context-switch was confusing) [16:25:34.0000] someone made this pr to node https://github.com/nodejs/node/pull/29101 [16:25:56.0000] i think it looks useful enough to exist in the language [16:54:29.0000] devsnek: can you tldr it? [16:55:30.0000] is it a new type, ArrayBufferView, that lets you make a DataView on an ArrayBuffer instead of on a TypedArray? [16:55:37.0000] %TypedArray%.createView(something) for either arraybuffer or another typed array in which case it uses the backing array buffer and offsets and all that [16:55:56.0000] typedarrays are views [16:56:05.0000] perhaps a confusing naming scheme [16:58:02.0000] oh right [16:58:57.0000] devsnek: so `new DataView(buffer)` can't do this? [16:59:32.0000] no [16:59:35.0000] its not the same goal anyway 2019-08-17 [17:00:18.0000] its mostly just a shorthand for `TypedArray.from(b, b.byteOffset, b.byteLength)` [17:05:46.0000] tbh that seems like what the default behavior should have been of TypedArray.from when byteOffset and byteLength were omitted [17:06:24.0000] probs [17:09:49.0000] motivating example is basically this https://gc.gy/33705580.png 2019-08-18 [06:38:24.0000] mathiasbynens: does the asmjs frontend check the 4kb limit before passing it to wasm? 2019-08-19 [17:28:39.0000] devsnek: feels like it'd be awfully neat to optimize `a?.b ?? c` such that we don't load undefined and check whether it's nullish [17:29:13.0000] I think I might need to learn how to read higher-level JIT dumps before I can achieve that though... [17:32:03.0000] (by that I mean: I think this might beyond the level of bytecode manipulation? but then for all I know maybe data-flow analysis automatically achieves something similar already? too noob to know at this moment.) [17:41:18.0000] https://www.irccloud.com/pastebin/1fDBP0M4/ [17:41:33.0000] ^ what I mean in pseudo-bytecode [17:41:57.0000] also maybe we should form an cross-engine implementers channel šŸ˜… [17:42:25.0000] rkirsling: I don't know what the implementation of nullish coalescing looks like in V8, but if it emits reasonable bytecode it should be optimized for free [17:42:37.0000] yeah that's the thing [17:42:51.0000] X expression always returns null [17:42:59.0000] and Y expression is jumpifnull [17:43:41.0000] I was gonna start by investigating that (in JSC) but it turns out reading the dumps is gonna take some patience/practice [17:44:16.0000] er s/was gonna start by/started to/ [17:44:17.0000] it would be interesting to see if neighboring expressions could be combined [17:44:23.0000] for better performance in the interpreter stage [17:45:05.0000] JSC's bytecode generator does deal with stuff like `!x ? y z` [17:45:08.0000] ahem [17:45:12.0000] `!x ? y : z` [01:13:09.0000] hi guys. i was reading ecma262 and in section 5.15 i found a section which is particularly unclear to me. the section starting "References to nonterminals on the right-hand side of a production can also be parameterized. For example:" [01:13:25.0000] 5.1.5* [01:14:25.0000] it gives two examples with a [+In] and a [~In] without explaining the logic, and then a sentence after "A nonterminal reference may have both a parameter list and an ā€œoptā€ suffix. For example:" [01:14:38.0000] which implies it can occur in a list, but there is no hint at what the logic would be if it was a list of more than one element [01:15:08.0000] it follows a section where every combinatorial combination of items from a list was used, but the examples given seem to indicate that this is not the case here [01:15:17.0000] but the language kind of implies it's the same [04:59:44.0000] aradesh: re "it gives two examples with a [+In] and a [~In] without explaining the logic". There isn't really 'logic' involved. It's just saying that, on the right-hand-side of a production, e.g. ExprStmt[+In] 'expands to' ExprStmt_In and ExprStmt[~In] to ExprStmt. [05:04:01.0000] The whole passage about grammatical parameters is just saying how you can expand uses of them into conventional BNF notation. [05:07:07.0000] (which is probably the easiest way to specify them, but possibly not the best way to think about them when looking at productions) [05:49:27.0000] but that seems kind of redundant? if writing [+In] is literally equivalent to writing _In and [~In] is literally equivalent to writing nothing. it later mentions "parameter list" which implies maybe we'd see things like [+In, +Return] what would that expand to? if that isn't a legitimate thing, then the statement "parameter list" should be changed [05:50:37.0000] in the previous section Stmt[In, Return] converts to four different things: Stmt, Stmt_In, Stmt_Return, Stmt_In_return [05:51:03.0000] and the way the text reads give the impression that what follows in analogous to the previous section [06:17:52.0000] Foo[+In, +Return] would expand to Foo_In_Return, according to the given scheme. [06:19:28.0000] Stmt[In, Return] expands to 4 things because it's on the left-hand-side. [06:21:11.0000] or, maybe a better explanation: Stmt[In, Return] expands to 4 things because "In" represents (the possibility of) both +In and ~In, and similarly for "Return". [06:21:33.0000] okay. [06:22:03.0000] Foo[+In, +Return] asserts specific settings for each parameter, so only expands to a single thing. [06:22:58.0000] On the right-hand-side, Foo[?In, ?Return} would expand to 4 things [06:24:12.0000] (or: would cause the containing production to expand 4-fold) [06:25:36.0000] thanks. i'll read along and check this all makes sense with what i see later. it could be explained a bit more clearly though imo. the way it's written just makes me feel like i've missed something [06:28:13.0000] I agree it's unclear, but it's not obvious to me how to make it clearer. [06:29:20.0000] perhaps an example along the lines of Foo[?In, +Ret, ~Bar] [06:36:15.0000] Perhaps. I worry that it might just give some readers more to be confused about. [06:43:08.0000] or perhaps start with the ? notation, and then indicate that if one of the choices is specified, you identify it with a + or a ~ [06:43:18.0000] restricting it to that one [06:45:15.0000] I don't think you can start with '?', because it only makes sense in the context of the left-hand-side notation. i.e., you can't have [?X] on the rhs unless you have [X] on the lhs [06:52:28.0000] oh [11:46:54.0000] devsnek: why do you say the module's context doesn't exist until evaluation? It seems to be set up during Link() [11:49:59.0000] I see, context vs. environment [12:19:12.0000] Domenic: I have a change locally that is less invasive, of the suggestion from ljharb [12:20:03.0000] as long as I'm refactoring it though, I like Allen's comment [15:48:07.0000] devsnek: so this was way easier than I was originally thinking: https://bugs.webkit.org/show_bug.cgi?id=200875 [15:49:15.0000] nice 2019-08-20 [20:44:15.0000] devsnek: fwiw i'm loosely down for whatever solution; it just feels like plumbing an argument through a pile of abstract ops is the wrong approach [11:39:21.0000] ooh, i get why the [+In] notation etc, on the right hand side of productions is used... because in the left-hand side they will be parameterised, and you want a way to show which left-hand version is being used on the right, in a similar notational way [11:40:05.0000] so if it was notated as [In] on the left, and _In on the right... it would be less natural 2019-08-21 [02:48:12.0000] hi guys. i found a mistake in ecma-262. with the signed definition of mod given here, it makes the definition of floor immediately following it incorrect https://i.imgur.com/wlKhLyb.png with the floor definition becoming the same as ceiling if x < 0 [02:48:18.0000] (end of chapter 5) [02:48:32.0000] oh sorry [02:48:35.0000] i misunderstood [02:48:37.0000] scratch that [02:48:41.0000] same sign as y not x :) [02:48:59.0000] funny how you notice your own mistakes once you share with someone... 2019-08-22 [20:16:08.0000] how come the tests for html comments aren't in the annex b folder [20:16:32.0000] oh nvm this is a must fail test [13:44:58.0000] ljharb: it would be good to get https://github.com/tc39/ecma262/pull/1464 reviewed / merged, if it's not waiting on anything [13:49:04.0000] Bakkot: tbh it's waiting on waldemar's review; i mentioned it to him at the last meeting but will ping him again at the next one [13:49:11.0000] √ [13:49:41.0000] (i very much prefer not to merge grammar changes without someone i feel is an expert on that part of the grammar signing off; and that's almost never going to be me) [13:50:32.0000] I got the impression jmdyck was happy with it, who I'd consider an expert [13:50:41.0000] but I guess there's no formal approval [13:51:27.0000] yeah he also still had outstanding changes; i rerequested his review as well 2019-08-23 [19:54:15.0000] is it valid to have a production like `MultiLineComment HoistableDeclaration` [20:24:17.0000] will this magically take the needed precedence https://gc.gy/34235651.png [22:09:35.0000] devsnek: does any production have DocumentedClass on the rhs? [22:09:44.0000] jmdyck: no [22:10:01.0000] my goal here is just to introduce new runtime semantics for `MultiLineComment ClassDeclaration` [22:10:09.0000] if such a production ever occurs [22:10:42.0000] the only reason i created "DocumentedClass" was because just having `MultiLineComment ClassDeclaration` was rendered with a `:` in the middle [22:11:27.0000] hm [22:12:33.0000] Comments don't survive to the syntactic level [22:12:42.0000] that's what i was worried about [22:13:51.0000] i mean a human reading this would know what's supposed to happen... but it would be good for it to conform to all our grammar invariants and whatnot [22:15:33.0000] I don't think the spec has any way to bring those two things together. [22:16:56.0000] one could promote multilinecomment from scanning to parsing [22:16:59.0000] which is what babel does [22:17:04.0000] but would that break all the productions [22:17:16.0000] yup [22:17:41.0000] this is still our own magical language to describe syntax right? [22:18:33.0000] ? [22:18:50.0000] like we can just specify new ways that productions match source text [22:19:30.0000] what's the goal? [22:19:49.0000] we can add productions, but we don't have new ways that they can match source text [22:19:59.0000] ljharb: docstrings [22:20:16.0000] why would they need to be parsed as anything but a comment [22:20:40.0000] jmdyck: i mean why can't we just say "productions can match nodes removed in scanning" [22:21:06.0000] ljharb: comments are removed before we build the syntax [22:21:11.0000] they're just whitespace [22:21:34.0000] so atm they can't be used in syntactic productions [22:21:48.0000] why would we want them to tho [22:22:18.0000] devsnek: we could maybe say that, but we'd have to be way more precise about what it means. [22:22:47.0000] jmdyck: i mean we would definitely want to use more formal language [22:23:48.0000] (there is some vagueness at the syntactic/lexical boundary, but not in a way that would help this effort, I don't think) [22:24:27.0000] jmdyck: do you think i'm going about this the wrong way [22:24:49.0000] lol i'm still missing why you're going about this [22:25:03.0000] ljharb: cuz i want docstrings [22:25:15.0000] you already have them [22:25:25.0000] why does the language spec need to know about them [22:25:39.0000] for runtime shenanigans [22:25:45.0000] such as? [22:25:50.0000] have you seen python's help function [22:26:06.0000] i have not [22:26:25.0000] but why would "not the engine" need access to source text level stuff? [22:26:44.0000] python has a meta __doc__ string made from comments on functions [22:27:00.0000] which is used in repls and stuff to provide better completions and whatnot [22:27:27.0000] a repl is the engine tho, that has superpowers, no? [22:28:00.0000] i mean not just the built-in repl [22:28:42.0000] but doing it at the spec level also means all the various tooling will bother to understand it [22:28:56.0000] better docs in browser consoles, maybe in error output, etc [22:28:59.0000] devnek: Not sure re "going about this the wrong way". Tough to see any way to fit it into the current spec 'architecture'. [22:29:03.0000] that kind of presumes docstrings are a good thing tho, when they don't enforce anything [22:29:20.0000] afk [22:29:27.0000] ljharb: they're generally prose [22:29:32.0000] i'm not talking about jsdoc [22:29:36.0000] prose isn't parseable [22:29:42.0000] its just a string [22:29:47.0000] the source of a multiline comment [22:29:55.0000] ok, so like `value[Symbol.details] = 'some string'`? [22:30:03.0000] like if we want something at runtime, let's make it a runtime value [22:31:01.0000] ljharb: it's a runtime value [22:31:11.0000] that's what you're suggesting comments be made into [22:31:16.0000] so far i just define Symbol.documentation [22:31:20.0000] if the runtime can read them, they're a runtime value [22:31:24.0000] yes [22:31:26.0000] https://gc.gy/34235651.png [22:31:47.0000] you can do whatever you want with that, override it [22:31:51.0000] delete it [22:32:23.0000] well sure but why turn comments into that [22:32:32.0000] that would also break like, every minifier [22:32:38.0000] if someone wants it runtime-available they'd write it as a string directly [22:33:04.0000] and in Python it _is_ a String, no? [22:33:16.0000] ya [22:33:23.0000] just `fn.__doc__` [22:33:25.0000] a normal string [22:33:58.0000] er yeah accessible as such, but I mean also directly written as such [22:34:29.0000] oh yeah [22:34:32.0000] it's a multiline string [22:34:48.0000] but they don't have multiline comments in python [22:34:54.0000] so multiline strings are double-duty [07:13:04.0000] i think this is mostly about being able to position the property assignment in the common comment position, not necessarily needing them to be a comment [07:13:17.0000] the problem* [14:12:08.0000] what is the dangling else problem? [14:15:16.0000] it's a classic [14:15:55.0000] oh its not specific to ecma262 [14:15:58.0000] i see now [14:16:05.0000] if (C1) {...} if (C2) {...} else {...} [14:16:23.0000] so our actual grammar is ambiguous about this? [14:16:27.0000] yup [14:16:31.0000] i mean i can see that its always ambiguous to humans [14:16:48.0000] but different implementations could have different associativity? [14:16:53.0000] Disambiguated by prose: "Each else for which the choice of associated if is ambiguous shall be associated with the nearest possible if that would otherwise have no corresponding else." [14:17:20.0000] i mean wouldn't that just be the default [14:17:40.0000] going left to right, the current IfStatement would associate with the `else` token before the outer one does [14:18:25.0000] CFGs don't have an idea of 'default'. [14:18:49.0000] nor does the LR parser construction algorithm. [14:19:06.0000] by default i mean the normal interpretation of a source text [14:20:09.0000] huh https://en.wikipedia.org/wiki/Dangling_else [14:20:09.0000] i would've thought something that associates `if a (if b c) else d` would just be doing it wrong [14:20:22.0000] ^ ditto, I've never thought about it [14:20:49.0000] The prose disambiguation does correspond to what you think of as "normal interpretation" I guess, [14:20:49.0000] outside of a rec-dec viewpoint [14:21:06.0000] but it's still ambiguous from a CFG point of view. [14:21:11.0000] interesting [14:21:25.0000] (er, rec-desc...? so much for trying to say it cool and short lol) [14:21:31.0000] from a LR point of view, you get a shift-reduce conflict, i think. [14:21:47.0000] do you know what waldemar's fix for it is [14:22:43.0000] i don't know for sure, but the wikipedia page that rkirsling linked to has some possibilities. [14:23:05.0000] Is waldemar's visible anywhere? [14:23:19.0000] (his code) [14:23:25.0000] not that i'm aware [14:23:38.0000] if there exists a programmatic way to validate grammar it'd be super to add it to CI [14:24:10.0000] https://en.wikipedia.org/wiki/Dangling_else#Avoiding_the_conflict_in_LR_parsers [14:25:10.0000] just split the entire grammar in half along the boundary of the if statement production lol [14:26:16.0000] The ES grammar could probably do it with a grammar parameter. [14:28:46.0000] (On second glance, my original example was wrong. Read wikipedia instead.) [14:29:08.0000] grammar hurts my brain [14:32:30.0000] "The trick ... is not minding that it hurts." (https://www.youtube.com/watch?v=TvQViPBAvPk) [14:33:48.0000] ljharb: what's needed to add something to ecma262 CI? [14:36:11.0000] jmdyck: make a PR that adds a travis job (or i suppose, a github action) that will fail when something is wrong and won't fail when things aren't wrong :-) [14:36:37.0000] adds it where? [14:36:39.0000] jmdyck: we can add jobs that lint for all the things you keep having to editorial-fix too, if we can find a reliable linter [14:36:58.0000] for travis, to `.travis.yml`; for a github action, i think anywhere in the `.github` folder [14:37:34.0000] jmdyck: tbh if you even just open a PR that adds an `npm run-script` to package.json for a verification/validation command, i can add that to travis easily [14:42:59.0000] so .travis.yml invokes scripts/auto-deploy.sh which invokes update-branch, which invokes "npm run build-travis", which invokes ecmarkup somehow? [14:45:17.0000] jmdyck: oh that's just the one job [14:45:23.0000] jmdyck: but yes that's how it works [14:45:50.0000] jmdyck: you can add multiple jobs in a matrix, and each one can do its own thing - i typically use https://github.com/inspect-js/is-callable/blob/master/.travis.yml [14:47:36.0000] and failing is a non-zero exit code or what? [14:48:06.0000] ljharb: are any of your remaining comments on https://github.com/tc39/ecma262/pull/1525 blocking? [14:52:25.0000] jmdyck: yep [14:53:42.0000] devsnek: i suppose not, but they're small changes ĀÆ\_(惄)_/ĀÆ i'll ping kevin in the next editor's meeting about it [14:53:50.0000] šŸ‘šŸ» [14:59:49.0000] github actions appears to be in beta. Is tc39 participating? [15:00:05.0000] yes [15:00:25.0000] https://github.com/tc39/ecma262/actions [15:01:48.0000] ah, 'actions' isn't an actual directory in repo [15:02:32.0000] or it will be if someone adds an action? [15:02:53.0000] it will be `.github/workflows/.yml` [15:03:12.0000] https://github.com/tc39/ecma262/new/master?filename=.github%2Fworkflows%2Fmain.yml&workflow_template=blank [15:07:35.0000] yes, i asked toi add the tc39 org to the beta [15:07:52.0000] totally fine to stick with travis for now tho [15:41:56.0000] without using beta software in production I don't think we're really acting in the spirit of the js ecosystem 2019-08-24 [17:54:26.0000] So does Waldemar convey validation results at TC39 meetings? I don't recall him ever doing so in a PR. [19:03:17.0000] jmdyck: not that I am aware of [19:03:37.0000] k [19:51:50.0000] jmdyck: i assume that he uses the results to form his prose spec reviews, and proposal feedback 2019-08-25 [10:03:04.0000] ljharb: is there a way to break from an inner loop in spec language [10:25:07.0000] devsnek: just use a condition variable, like you would in a language without labelled breaks [10:25:24.0000] Bakkot: that's what i did for the moment [10:25:32.0000] but it makes me sad [10:53:27.0000] devsnek: there’s a break and continue completion [10:53:42.0000] ljharb: i mean from a `Repeat` [10:53:45.0000] not sure if that works tho [10:53:48.0000] ah, no [10:54:06.0000] 😢 [12:20:51.0000] ljharb: can you put something into CI that doesn't pass/fail, just generates a report/analysis/warnings? [14:25:39.0000] <3 [16:17:05.0000] jmdyck: technically that's always passing [16:26:13.0000] sure, but I haven't seen an example of generating a report [16:26:36.0000] just generating the html rendering [16:28:11.0000] you can set it up to post a comment or something [16:30:12.0000] like post it to a PR's 'conversation'? [16:33:45.0000] yea [16:34:02.0000] you can also use the output logs i guess [16:34:06.0000] but that's less visible [16:35:02.0000] where do output logs appear? [16:35:30.0000] depends on what you're using [16:36:04.0000] on travis you have to go to a page like this https://travis-ci.com/engine262/engine262/builds/124497875 [16:36:34.0000] with github actions you get it directly on the github site https://github.com/devsnek/slither/runs/179049832 [16:43:09.0000] Each PR page has a 'Checks' tab. Not yet really clear on how that fits in. [16:43:48.0000] neither am i 2019-08-26 [20:29:17.0000] jmdyck: yes but generally posting comments on PRs is annoying; and programmatically editing comments, even the OP, can have race conditions with actual edits [20:29:42.0000] jmdyck: i prefer things that fail, until you click ā€œdetailsā€ and ack the report explicitly (which then makes it passing) [20:30:03.0000] yeah, i didn't think comments on the PR was a good idea [20:32:34.0000] I was reading about GitHub Checks, which seems nicely integrated, but the instructions for setting up such a thing don't make sense to me [21:14:26.0000] ljharb: can you point me to something with a clickable "details"? [21:31:41.0000] jmdyck: every travis-ci run on github [21:31:45.0000] oops, he left [23:53:06.0000] devsnek: did you implement ValidateAndApplyPropertyDescriptor in engine262? (re https://github.com/tc39/ecma262/pull/1677 ) [06:22:26.0000] ljharb: okay then can you point me to a travis-ci run on github? I thought ecma262 used travis to generate the html rendering, but I don't see a "details" to click on. [06:28:53.0000] ljharb: as far as i know, engine262's implementation matches the spec [06:29:58.0000] https://github.com/engine262/engine262/blob/master/src/abstract-ops/objects.mjs#L119 [06:36:05.0000] ljharb: wouldn't removing those lines let non-configurable properties be overridden [07:22:33.0000] devsnek: i believe it only lets "writable" be set to `false`, which is allowed when nonconfigurable [07:23:26.0000] ljharb: test262 runs perfectly with and without the change [07:23:33.0000] and i assume that's because there's no test for NaN [07:23:59.0000] jmdyck: ecma262 only uses it on master branches. here's one: https://github.com/ljharb/es-abstract/pull/51 [07:24:33.0000] devsnek: where in that function do you apply the descriptor? [07:24:49.0000] wdym [07:25:01.0000] devsnek: you're missing step 9. [07:25:05.0000] huh [07:25:05.0000] in http://www.ecma-international.org/ecma-262/8.0/#sec-validateandapplypropertydescriptor [07:25:13.0000] and that step is the one that the early return trues bypass [07:25:22.0000] like the actual *application* of the descriptor [07:25:49.0000] (when current isn't undefined) [07:26:33.0000] i'm not entirely sure what you're saying [07:26:35.0000] ljharb: tx [07:28:25.0000] devsnek: when `current` is undefined, Desc is applied to O in steps 2.c.i and 2.d.i. when `current` and `Desc` aren't both data, or both accessors, it's applied in steps 6.b.i and 6.c.i. when they're both data, or both accessors, it's applied in step 9. your implementation lacks step 9. [07:28:44.0000] devsnek: ie, overwriting an existing descriptor without flipping its type between data and accessor [07:28:57.0000] https://github.com/engine262/engine262/blob/master/src/abstract-ops/objects.mjs#L213-L233 [07:29:00.0000] step 9 [07:29:52.0000] oh lol it's right there [07:30:03.0000] my bad [07:30:24.0000] ok so then perhaps test262 is missing tests, because i can't see how setting an array's length property to be unwritable would work [07:30:46.0000] defineProperty(array, 'length', { writable: false })? [07:31:58.0000] yes [07:32:20.0000] iow `ValidateAndApplyPropertyDescriptor([], 'length', true, { Writable: true, Configurable: false, Value: 0, Enumerable: false }, { Writable: false })` [07:32:39.0000] that's supposed to set writable to false, but it returns without applying, i believe [07:34:40.0000] https://engine262.js.org/#code=MYewdgzgLgBAhjAvDA2gXQNwCgAOAnASzCgAoB5AIwCsBTYKAOgHMaoyB3MABTxBxrxQAngBEaEYIRxQQeEnAA0MAOQAbGmCZQAFsoCUe7JVr0GAExoAzIjR58Bw%2BUrUatupQG8Y7QlDgV1AC4YSzhVCBoYAF9DXEJicmo6RhY2Tjt%2BQVFxSQJpWScVdU0dfUMgA [07:35:43.0000] hmm [07:37:58.0000] so the two lines i'm trying to remove; the implication is that they're only hit when applying the descriptor would be a noop? [07:38:11.0000] i'll take another look at my impl [07:40:05.0000] ljharb: it gets to 7.a [07:40:11.0000] but current.Writable is true [07:40:16.0000] so then it ends up at step 9 [07:40:25.0000] sets writable to false [07:41:34.0000] devsnek: ohhh right because current writable is true, it falls down to step 9 in your impl [07:41:48.0000] i mean hopefully this is just a bug in my impl, but i still can't find it :-) i'll keep looking [07:46:58.0000] alright, i think i found the issue; and it's indeed the implication i mentioned above. i'll close the PR. thanks for helping me work through it! [07:48:41.0000] šŸ‘šŸ» [09:20:53.0000] Are private methods "bound"? [09:21:19.0000] i.e. will `const x = this.#x; x()` work for `class Y { #x() { ... } }`? [09:25:06.0000] Domenic: i don't think so [09:25:39.0000] would be kind of limiting i think [09:39:31.0000] Hmm hmm [09:39:46.0000] It's weird because they're "per instance properties" conceptually? But not bound, I guess? [10:33:59.0000] Domenic: HasOwnProperty(this, #x) is true? [10:49:19.0000] I dunno, I'm just repeating what I was told [11:16:07.0000] Domenic: they aren't bound [11:18:34.0000] Domenic: they're conceptually per-instance, though i expect implementations to share private methods among all instances of the class (v8 does) [11:27:07.0000] shu: #x is an own property of the instance? [11:27:16.0000] not on the prototype? [11:27:45.0000] devsnek: well, private fields and methods aren't properties and aren't reflectable via HasOwnProperty [11:27:56.0000] shu: i know [11:28:05.0000] i'm not sure what the question means then [11:28:14.0000] is #x mounted to the prototype or the instance [11:28:24.0000] in the spec? [11:28:26.0000] in the spec [11:29:38.0000] they're in [[PrivateFieldValues]] of objects iirc, let me see [11:29:53.0000] of the instance [11:30:21.0000] man classfields are weird [11:31:14.0000] they're definitely not on the prototype because #-name lookups never cause a prototype lookup [12:30:26.0000] sorry for maybe some mistakes... irc some new for me... [12:30:26.0000] ok then: want discuss my idea - i write here: [12:30:26.0000] https://esdiscuss.org/topic/async-class#content-25 [12:30:26.0000] irc seems fine only with texts or not? [12:30:26.0000] i wrote some wrapper and you can find more info there in url up [12:30:26.0000] but for simple explanation - just proposal syntax: [12:30:30.0000] async class PromiseClass { //return Promise [12:30:32.0000] constructor() {}//async()=>Promise object [12:30:35.0000] }//class [12:30:37.0000] async class AsyncClass extends PromiseClass{ // can ext Class|PromiseClass [12:30:39.0000] constructor(){ await super();} //async()=>Promise object [12:30:41.0000] }//AsyncClass [12:30:43.0000] again sorry for all, i try my best, but not always get) [12:31:26.0000] hm no multiline support or i do something wrong? [14:41:11.0000] devsnek: I am confused why you keep directing people who want to discuss normative details of the iterator helpers proposal to the ecma262 repo [14:41:22.0000] uhh [14:41:39.0000] i mean with or without the generator stuff, the iterator methods will exist [14:41:57.0000] i'm seeing it more as a separate design choice [14:42:53.0000] that being said i've been trying to use language like "encourage" [15:03:10.0000] devsnek: the design choice of whether the methods appear to users as generator functions or not is a choice which your proposal will need to make; your proposal is the right place to discuss it [15:03:41.0000] well if my ecma262 pr was approved, i wouldn't go against it in proposals [15:03:50.0000] and if it wasn't proposed, i wouldn't go against the current pattern [15:03:56.0000] wasn't approved* [15:04:23.0000] your PR appears to just be about how things are written down [15:04:28.0000] that is irrelevant to the question of which they are [15:04:55.0000] my pr is specifying all future iterators as built in generators [15:05:20.0000] which comes with new ways of writing things down and visible changes to the objects [15:05:28.0000] ... that's not something you can do in the spec? you can't constrain what future writers are going to write. [15:05:56.0000] in theory no, but its kind of about introducing a pattern [15:06:15.0000] you'd be introducing the pattern by choosing a particular path in your proposal [15:06:22.0000] the right place to discuss that is your proposal [15:06:52.0000] since it is the first place we'll need to make that choice [15:07:13.0000] personally i don't see it that way [15:07:53.0000] but people are free to send messages to the proposal repo or the pr [15:07:53.0000] it seems like everyone else who's commented on the topic does, no? [15:08:11.0000] i assumed most people just weren't aware of my pr to ecma262 [16:37:59.0000] devsnek: for me, the spec PR only exists to make existing iterator-producing functions simpler to spec/write/read [16:38:11.0000] devsnek: i'm not on board with making future ones observably be generators [16:39:03.0000] ljharb: still the issue with toStringTag? [16:39:50.0000] devsnek: also `[].values().__proto__` vs `(function *() {}()).__proto__`, and a number of other small things [16:40:17.0000] what about that vs is the problem specifically [16:40:35.0000] that they're not the same kind of thing, and so changing the former to be the same kind of thing as the latter is observable and thus not ok [16:41:01.0000] i don't follow [16:41:02.0000] and making future iterator-producing functions all the same while leaving the old ones specced the same and also "being" the same creates a big inconsistency [16:41:09.0000] like type those two into chrome's repl [16:41:25.0000] like i understand they're different objects [16:41:36.0000] you're considered about the consistency of future ones vs what we currently have? [16:41:37.0000] and different prototype chains and whatnot. [16:41:38.0000] yes [16:41:46.0000] both observably, and in terms of spec text [16:41:53.0000] that's fair [16:42:24.0000] originally i was excited about this generator spec text thing because i thought it'd allow us to much more ergonomically express all past and future iterator-producing functions [16:42:34.0000] i wasn't thinking of it as making them actually *be* generator functions [16:43:02.0000] from my perspective, i'd rather get the 30+ ones we're about to do "right" (not that right is objective) and call the four we currently have mistakes [16:45:20.0000] ljharb: i remember last meeting you mentioned wanting to keep things very consistent, and i generally agree, but perhaps this is a disagreement of the layering of this [16:46:01.0000] i see generators as consistent with the current design because i don't think the exact prototype stuff matters that much at runtime [16:46:14.0000] like you can still call next and all that 2019-08-27 [17:28:53.0000] how strange this chat work... ok no matter... sorry for offtop [17:28:53.0000] I need time to get used to it... [17:30:36.0000] esdiscuss.org work strange too... but ok... my main thought: i create new wrapper [17:32:02.0000] some comments and code here: [17:32:03.0000] https://gist.github.com/goloroden/c976971e5f42c859f64be3ad7fc6f4ed#gistcomment-3008872 [17:35:54.0000] Dimitrian: you can already return promises from constructors [17:36:01.0000] omg that timing [17:47:46.0000] devsnek: already? yes, but my proposal - native AsyncClass [17:48:56.0000] Dimitrian: is that just allowing await in the constructor? [17:49:54.0000] Dimitrian: generally the ecosystem has moved to a pattern where if you have async logic, you'd have a static method [17:50:13.0000] `new X() instanceof X` generally being considered bad [17:52:25.0000] devsnek: idea simple Class return obj, Async return promise same like async func [17:52:35.0000] Dimitrian: i see the idea [17:54:08.0000] i'm saying i think a better pattern is a separate function for the async behaviour [17:54:21.0000] "factory" as they called it on the mailing list you linked [17:54:40.0000] devsnek:i will use my ugly wrapper and seems not only i have pain without async [17:55:32.0000] personally i've done `static async create() { const x = await xyz; const y = await xyz; return new this(x, y); }` [17:55:44.0000] and then your public api is `Thing.create()` [17:56:21.0000] yes i know this way, but how you extends then? [17:56:55.0000] you don't [17:57:07.0000] but i'd consider that safer [17:57:23.0000] extending something that returns a promise means your `this` value is now a promise instance [17:57:27.0000] but my wrapper can) but this all not native... [17:58:21.0000] in the extends case, i'd suggest https://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function/ [18:00:08.0000] try simple repeat my wrapper with you method [18:00:16.0000] *sample [18:01:57.0000] i think my way is more simple and near native... [18:04:21.0000] but however not native and ugly anyway [07:39:36.0000] It seems that GitHub pages serves up different content depending on whether you request via HTTP vs HTTPS. [07:40:48.0000] I added a file to my gh-pages branch, pushed it up, and then tried to access it on github.io, got 404. [07:41:20.0000] Eventually, I discovered that I had to request it via HTTPS. [07:42:58.0000] Hmm, *now* http works. [07:43:13.0000] hrmph [07:44:39.0000] It's like there's a cache, and https forces a cache-refresh, and http doesn't. [09:39:02.0000] jmdyck: you should check the box in repo options that disallows http anyways [10:55:33.0000] ljharb: Done. thanks. [11:50:43.0000] here always so quiet... i wrote some thouths in esdiscuss https://esdiscuss.org/topic/async-class#content-31 [11:51:58.0000] repeat here main: seems my idea not bad, just need help with good semantic [11:52:39.0000] maybe another main word? like not async => promise_class 2019-08-29 [17:01:17.0000] going back to the commit that introduced harness/sta.js into Test262, apparently it stands for "simple test APIs" [17:01:29.0000] talk about needless obscurity lol [17:15:36.0000] rkirsling: gotta keep it simple [17:15:41.0000] comma stupid [03:02:27.0000] m 2019-08-30 [06:48:41.0000] I think engines have a bug with IteratorClose (no real surprise), but I'm having trouble reading https://tc39.es/ecma262/#sec-runtime-semantics-forin-div-ofbodyevaluation-lhs-stmt-iterator-lhskind-labelset [06:49:09.0000] It seems in 6.k.iv.2. It should never continue the loop. [06:49:22.0000] since it escapes the Repeat in 6. [06:53:29.0000] so what's wrong with that? [06:58:11.0000] jmdyck: something is screwy with https://gist.github.com/Fishrock123/d430d3cb6ba5ce152b44e8de6e2e61d0 [06:59:36.0000] the yield* keeps pumping out `1` when you reenter the generator, but https://gist.github.com/bmeck/fc2be113116e2282248b1a11c90929b8 shows what I would expect without the recursive yield* [07:00:25.0000] I'm not entirely sure why the first 1 would infinite loop [07:30:51.0000] and that behavior is consistent over implementations? [07:40:39.0000] jmdyck: it seems so [08:08:40.0000] bradleymeck: you think its a bug in the implementations, not the spec? [08:09:14.0000] Unclear [08:10:02.0000] that first gist prints 1 followed by infinite 2's in engine262 [08:30:23.0000] does test262 have any fp conformance [09:03:35.0000] devsnek: it does print 2s but where do the 1s go? it seems like they are being... swallowed? [09:04:12.0000] i'm not sure [11:58:10.0000] what revision is https://www.ecma-international.org/ecma-262 generated from? [11:58:18.0000] it seems to be missing stuff merged back in april [11:58:39.0000] shu: merged in april means it's in 2020 so it wouldn't appear on ecma's website [11:58:51.0000] shu: es2019 was all stuff merged in january or earlier [11:58:51.0000] ah, should i be visiting somewhere else for generated-from-HEAD [11:58:58.0000] shu: always only github :-) [11:59:00.0000] wait [11:59:06.0000] i pasted the ecma-international site [11:59:10.0000] shu: https://tc39.es/ecma262/ [11:59:17.0000] shu: that's supposed to be generated from latest master [11:59:29.0000] my bad!! i thought i was on tc39.es [11:59:39.0000] šŸ‘ no [11:59:41.0000] prob [12:02:13.0000] maybe we should use a slightly different hue of orange so i am constantly reminded in my old age :) [12:03:19.0000] it would be super great if we could convince ecma to put a banner at the top of all their specs pointing to the non-obsolete version, but i doubt that'll fly [12:20:15.0000] OBSOLETE [12:34:31.0000] you forgot to get people's attention 2019-08-31 [07:22:48.0000] who wants to try and champion Function.create(fnWithTheCode, prototype); ? [07:24:29.0000] it basically just is a Reflect.apply / Reflect.constructor branch and a setPrototypeOf [08:16:24.0000] i don’t understand what it would do [14:58:08.0000] surprising amount of bugs found in engine262 from the new json tests šŸ˜“ [14:59:50.0000] probably the most embarrassing was that the "is array index" algorithm didn't check that the number was an integer [15:02:13.0000] devsnek: spec bug, or impl bug? [15:02:17.0000] impl [15:02:46.0000] only noticed it because the keys in expected json output had the wrong order [15:03:06.0000] it sorted 0.3 between 0 and 1 [15:05:27.0000] gotcha [15:25:37.0000] https://github.com/tc39/test262/blob/master/test/built-ins/TypedArray/prototype/sort/sorted-values.js#L30 [15:25:45.0000] should this be -0, 0, 1, 2? [15:29:03.0000] perhaps this needs separate tests for signed and unsigned arrays?