00:00
<shu>
gotta bring that up at the next msft earnings call
00:28
<Michael Ficarra>
it's not even that big!
00:28
<Michael Ficarra>
like the whole spec document is pretty big I guess?
00:28
<Michael Ficarra>
but not big for computers big
00:46
<bakkot>
they must just have something quadratic in there
00:46
<bakkot>
somehow
17:17
<Michael Ficarra>
quadratic is probably optimistic, it could have far worse complexity than that
17:30
<bakkot>
quadratic is enough, in a 3000-line document
17:30
<bakkot>
*47000
18:29
<shu>
nice, look at all those closed issues
19:21
<shu>
bakkot: Michael Ficarra i'll PR HTML and WebIDL
19:22
<Michael Ficarra>
wow
19:22
<Michael Ficarra>
🥲 I am so happy
19:24
<bakkot>
shu: might be easier to build tooling, frankly
19:24
<bakkot>
I don't know if bikeshed or whatever it is that builds the html spec has any similar linting checks
19:25
<shu>
it's not bikeshed unfortunately
19:25
<shu>
it's wattsi, which is written in... like, turbo pascal or something? because hixie loved pascal
19:25
<bakkot>
oh god ok
19:25
<shu>
and i am not touching that?
19:26
<shu>
for webidl we might have tooling
19:26
<shu>
in HTML's case they also defined some AOs themselves, and some of those don't return completions
19:27
<bakkot>
they could say that ! in html means the thing it used to, I guess?
19:27
<bakkot>
but it definitely seems worse that way
19:28
<shu>
pascal is wild man
19:28
<shu>
      {$POINTERMATH ON}
      Move((@Buffer+Subindex*ElementSize)^, Temp^, ElementSize);
      Move((@Buffer+Index*ElementSize)^, (@Buffer+Subindex*ElementSize)^, ElementSize);
      Move(Temp^, (@Buffer+Index*ElementSize)^, ElementSize);
      {$POINTERMATH OFF}
19:28
<shu>
though i'd probably be positive on "use pointermath"
19:29
<shu>
bakkot: yeah for sure. i don't want web specs to diverge on as opaque a syntax as ! AO() and ? AO()
19:31
<bakkot>
oh boy it's been like 15 years since I looked at pascal
19:32
<bakkot>
you could always do it as a post-process step
19:32
<shu>
yeah
19:32
<shu>
but that's making the toolchain even weirder
19:32
<shu>
it's already super weird
19:32
<shu>
like, you compile it with a Docker image that has the right version of the turbo pascal compiler
19:32
<shu>
because obviously, nobody has a turbo pascal compiler
19:33
<shu>
well i guess it's already a docker, you can just tack more steps onto it
19:33
<bakkot>
grep for capital words which link to ecma262 and are followed by a ( and check if they're preceded by !/?/Completion or not, and whether they should be
19:33
<bakkot>
advantage of this approach is that it would be oblivious to the underlying build tool
19:33
<bakkot>
disadvantage is, like, ugh
19:34
<shu>
yes
19:35
<shu>
HTML is more inconsistent than just ? btw
19:35
<shu>
it also has the phrasing "Rethrow any exceptions.", which i presume predates ?
19:35
<bakkot>
oh fun
19:36
<bakkot>
ok but like half of the uses are in one specific algorithm, that's weird
20:14
<bakkot>
shu: the GetFunctionRealm issue I mention in https://github.com/tc39/ecma262/issues/253#issuecomment-1050185177 is gonna be fun
20:14
<bakkot>

I think it's possible to trigger it with

function wrap() {
  return Reflect.construct(HTMLButtonElement, [], new.target);
}
let protoCount = -100;
let x = Proxy.revocable(
  wrap,
  {
    get(...args) {
      console.log('get', args);
      if (args[1] === 'prototype') {
        ++protoCount;
        if (protoCount === 2) {
          x.revoke();
          console.log('revoked');
        }
      }
      return Reflect.get(...args);
    },
  }
);

customElements.define('x-rev', x.proxy, { extends: 'button' });
wrap.prototype = null;
protoCount = 0;
new x.proxy();
20:14
<bakkot>
but not 100% sure
20:14
<bakkot>
that does have an entertaining error message in chrome, though, so it probably does trigger it
20:14
<bakkot>

Uncaught TypeError: Cannot perform 'undefined' on a proxy that has been revoked

21:25
<shu>
yes it is possible to trigger with revoked proxies