| 02:41 | <devsnek> | is there a way we could make the website not change position when the window resizes |
| 02:43 | <jmdyck> | you mean the online spec? |
| 02:48 | <devsnek> | yeah |
| 02:49 | <devsnek> | how did you read a message from before you joined |
| 02:49 | <devsnek> | oh nvm we have logs |
| 02:49 | <jmdyck> | yup |
| 02:49 | <devsnek> | every time i resize my browser |
| 02:49 | <devsnek> | the spec jumps somewhere random |
| 02:50 | <jmdyck> | because it's reflowing the whole spec |
| 02:50 | <devsnek> | yeah i get it has to resize everything |
| 02:50 | <devsnek> | is this just like |
| 02:50 | <devsnek> | an unsolvable problem |
| 02:50 | <jmdyck> | I seem to recall reading something about it recently, but I don't remember where. |
| 02:51 | <devsnek> | on resize we could ask for whatever element is at the top of the screen |
| 02:51 | <devsnek> | and then after resize we could scroll to it |
| 02:52 | <Bakkot> | please no js-based scrolling |
| 02:54 | <devsnek> | it would only happen on resize |
| 02:54 | <devsnek> | to correct the browser's scrolling |
| 02:55 | <Bakkot> | don't care, no js-based scrolling |
| 02:55 | <Bakkot> | it is never, ever a good experience |
| 02:55 | <devsnek> | but this issue is dumb |
| 02:55 | <devsnek> | i have to permalink every time i want to resize my browser |
| 02:56 | <Bakkot> | open to finding other solutions to it as long as they do not involve scrolling the page using JS |
| 02:56 | <devsnek> | if there's a better solution sure |
| 05:02 | <ljharb> | +1 to Bakkot, js-based scrolling is terribad |
| 05:02 | <ljharb> | seems like a browser UX bug tbh |
| 11:33 | <mathiasbynens> | ^ https://drafts.csswg.org/css-scroll-anchoring/ is in Chrome 56 |
| 12:55 | <jmdyck> | Ah, that was it. |
| 12:56 | <jmdyck> | https://caniuse.com/#feat=css-overflow-anchor |
| 13:16 | <devsnek> | that proposal is in chrome and firefox and both of them scroll to random positions when the viewport size changes |
| 13:23 | <jmdyck> | hm, I guess window resize changes `width` of document, which suppresses the effect |
| 13:25 | <devsnek> | jmdyck: did you see this https://snek.dev/ecma262-multipage-demo/multipage/ |
| 13:26 | <jmdyck> | no, hadn't seen that, thanks. |
| 13:34 | <jmdyck> | "Note: Suppression triggers exist for compatibility with existing web content that has negative interactions with scroll anchoring due to shifting content in scroll event handlers." |
| 14:40 | <mathiasbynens> | devsnek: ooh multipage! nice |
| 14:40 | <mathiasbynens> | devsnek: what else is needed for upstreaming this? |
| 14:41 | <devsnek> | well i didn't do it with ecmarkup |
| 14:41 | <devsnek> | the main issue is the links are rewritten on the client side with js |
| 14:41 | <devsnek> | because apparently changing `a.href` in jsdom takes about 100ms |
| 14:41 | <mathiasbynens> | yikes |
| 14:41 | <devsnek> | times 22000 links is 40 minutes |
| 14:42 | <mathiasbynens> | holy fuck what |
| 14:42 | <devsnek> | lol |
| 14:44 | <devsnek> | i started trying to do this in ecmarkup but there's so much going on in there i wasn't sure where to even start |
| 15:11 | <devsnek> | mathiasbynens: i found a hack, `a.setAttribute('href', whatever)` is not deathly slow, no more client side js |
| 15:14 | <mathiasbynens> | devsnek: neat! (and also weird that it makes such a big difference) |
| 15:14 | <mathiasbynens> | alright so let's upstream this |
| 15:14 | <mathiasbynens> | #hype |
| 16:06 | <devsnek> | does hermes just segfault on linux now |
| 16:50 | <Bakkot> | devsnek: re, doing this in ecmarkup, the place that most of the change would be is in Spec.ts, specifically somewhere around here: https://github.com/tc39/ecmarkup/blob/40d56a311165bb974e75ab50b8803115ee560700/src/Spec.ts#L365-L383 |
| 16:50 | <devsnek> | yeah found that area |
| 16:50 | <devsnek> | mostly idk how to pull useful data out of the biblio |
| 17:06 | <devsnek> | is DateFromTime(NaN) defined? |
| 17:33 | <shu> | Bakkot: can you tell michaelficarra we got a funny problem with built-in Function#toString for legacy regexp getters |
| 17:34 | <shu> | Bakkot: right now SM prints `function $&()` and V8 prints `function get $&()` for RegExp.$&, the legacy "last match" getters |
| 17:34 | <shu> | getter* |
| 17:34 | <shu> | $& is not a PropertyName |
| 17:34 | <devsnek> | we just need to make `$&` a valid propertyname |
| 17:34 | <shu> | good luck with that |
| 17:36 | <shu> | oh maybe the spec isn't an issue here, just test262 |
| 17:36 | <shu> | the spec allows for function ["$&"]() i guess? |
| 17:36 | <devsnek> | yes |
| 17:36 | <devsnek> | so does the test ftr |
| 17:36 | <shu> | ah indeed, there's a big complex implementation of native function matcher... |
| 17:37 | <shu> | well then |
| 17:37 | <shu> | this is... unfortunate |
| 17:38 | <devsnek> | does the internet break if you change it to `['$&']`? |
| 17:39 | <ljharb> | does it even need the brackets if it has quotes? |
| 17:40 | <ljharb> | like how `'foo'() {}` is a valid class method |
| 17:40 | <devsnek> | hm you're right |
| 17:40 | <devsnek> | i didn't add that to the native function matcher though |
| 17:40 | <devsnek> | `if (!eatIdentifier() && eat('[')) { stumbleUntil(']'); }` |
| 17:43 | <shu> | devsnek: i doubt it, but why find out |
| 18:19 | <bradleymeck> | function ['foo']() {} ... tis ugly |
| 18:36 | <ljharb> | in node, `Object.getOwnPropertyDescriptor({ get '$&'() {} }, '$&').get.toString()` prints out `"get '$&'() {}"` |
| 18:38 | <devsnek> | graalvm calls it `lastMatch` |
| 18:45 | <jmdyck> | devsnek: looks to me like DateFromTime(NaN) is not defined |
| 18:45 | <devsnek> | yeah i'm seeing `new Date(NaN).setMonth(whatever)` fail |
| 18:47 | <jmdyck> | ditto the infinities |
| 18:47 | <leobalter> | I've been seeing notifications for things that might not be yet on Test262 |
| 18:47 | <leobalter> | please remember to file a bug there, it helps a lot |
| 18:48 | <devsnek> | the date thing is tested, i've just always skipped it |
| 18:52 | <Bakkot> | devsnek is it just setMonth which is bugged? |
| 18:52 | <jmdyck> | so the `new Date(NaN)` part is well-defined, but `setMonth` is making assumptions? |
| 18:52 | <Bakkot> | the others look like they all guarrd for NaN first |
| 18:52 | <devsnek> | setMonth calls DateFromTime |
| 18:52 | <devsnek> | with NaN |
| 18:53 | <Bakkot> | by comparison to setFullYear, I think setMonth should guard NaN |
| 18:53 | <Bakkot> | though, setUTCMonth has the same thing, hmm |
| 18:54 | <Bakkot> | yeah I think the month ops probably need guards |
| 18:54 | <jmdyck> | devsnek: that assumes LocalTime(NaN) = NaN, which it might, but it's unclear. |
| 18:54 | <Bakkot> | should be able to check if engines act as if the guards are there |
| 18:54 | <devsnek> | i wish there was a way to filter coverage by entrypoint |
| 18:54 | <devsnek> | i tried collecting coverage for each individual test but nyc oom'd |
| 18:55 | <jmdyck> | (new york city is out of memory?) |
| 18:56 | <devsnek> | https://github.com/istanbuljs/nyc |
| 20:53 | <devsnek> | Bakkot: so i could run this script more or less as it is written on `spec.doc` https://gist.github.com/devsnek/ef84045abae6b53688e497f101c9d2d6 |
| 20:53 | <devsnek> | but is that ideal? |
| 21:02 | <Bakkot> | no, ideally ecmarkup would do it |
| 21:03 | <Bakkot> | as part of the build process |
| 21:08 | <devsnek> | Bakkot: yeah i mean in build() i would just do a bunch of querySelectors and whatnot on the `this.doc` or whatever |
| 21:08 | <Bakkot> | ahh |
| 21:08 | <Bakkot> | hmm |
| 21:09 | <Bakkot> | not ideal but I'd take it for now |
| 21:09 | <Bakkot> | before landing it'll need to be made to support redirecting when you navigate to an anchor on a page such that the anchor actually lives on a different page, though |
| 21:09 | <devsnek> | uhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh |
| 21:10 | <devsnek> | like if you did `sec-intro.html#sec-promise.resolve`? |
| 21:10 | <Bakkot> | yup |
| 21:10 | <devsnek> | how would that even happen |
| 21:10 | <Bakkot> | specifically so that links to don't break when we reorganize stuff |
| 21:10 | <devsnek> | hm i guess |
| 21:10 | <devsnek> | can add a js script to do that |
| 21:10 | <Bakkot> | yeah, it'll need to be js |
| 21:11 | <devsnek> | css+html is turing complete |
| 21:11 | <Bakkot> | can't reasonably do it in pure HTML since it's a redirect |
| 21:11 | <Bakkot> | TC doesn't mean has arbitrary IO capabilities though |
| 21:11 | <devsnek> | *yet* |
| 21:12 | <Bakkot> | actually I think this might break the `References` thing too, as written |
| 21:12 | <Bakkot> | if the reference is in a different section |
| 21:13 | <Bakkot> | since I think those links are generated dynamically |
| 21:13 | <Bakkot> | but maybe they aren't, I don't know how that works |
| 21:14 | <devsnek> | ugh i just realized |
| 21:14 | <devsnek> | i would have to clone `this.doc` |
| 21:24 | <bradleymeck> | The year is 20XX, a timing side channel was introduced to HTML and now it has arbitrary read capabilities, no secrets are safe. This is the story of a grizzled language, JS, bringing HTML into the world of chaos that is has known all too well... *fade to title card and intro music* |
| 21:24 | <bradleymeck> | but yea TC has limitations even in HTML/CSS generally relying on tricks like focus transitions and not automatically running without input |
| 21:34 | <Bakkot> | devsnek: fwiw I think it makes sense to hold off on multipage builds until we do the SDO restructuring, since that will change layout significantly and might (not sure yet) change what sections there are |
| 21:34 | <Bakkot> | SDO restructuring is currently waiting on fixing math (2007), so that the math PR doesn't have to be rebased |
| 21:35 | <Bakkot> | which is blocked on figuring out what math to use for Dates, though I will probably just land it as editorial and assume we get consensus |
| 21:35 | <devsnek> | it's all connected |
| 21:35 | <devsnek> | I got the redirect script working |
| 21:35 | <Bakkot> | nice! |
| 21:35 | <devsnek> | like two lines of code |
| 21:36 | <Bakkot> | is it just a JSON.stringify + a JSON.parse |
| 21:38 | <devsnek> | fetch(links).then(if document.locstion in links document.location = links) |
| 21:38 | <devsnek> | behold my pseudocode |
| 21:38 | <Bakkot> | just inline the JSON, it can't be that large |
| 21:39 | <devsnek> | 7.2mb |
| 21:39 | <Bakkot> | ok dedup the json first |
| 21:47 | <devsnek> | it's unique |
| 21:48 | <devsnek> | it's just a map of "#whatever": "page.html#whatever" |
| 21:48 | <devsnek> | I guess I could remove the # and not duplicate the fragment but eh |
| 21:49 | <Bakkot> | the `page.html` part is heavily duped |
| 21:50 | <Bakkot> | you go the other way and reverse it when you load it |
| 21:50 | <Bakkot> | page -> whatever |
| 21:51 | <devsnek> | page.html: [ids] |
| 22:51 | <devsnek> | Bakkot: deployed... https://snek.dev/ecma262-multipage-demo/multipage/#sec-promise.resolve |