00:24
<TabAtkins>
I highly, highly doubt .call is actually used that much in real code. It might be counting library code a bunch?
00:25
<jschoi>
I highly, highly doubt .call is actually used that much in real code. It might be counting library code a bunch?
I actually checked the first thousand lines of its output and they all generally seem legitimate to me.
00:25
<jschoi>
I can dump them in a Gist.
00:26
<jschoi>
Mostly stuff like _super.call(this, destination) or tryCatch(onCancelCallback).call(this._boundValue()).
00:27
<jschoi>
Oh, you’re asking if it’s double-counting dependencies.
00:27
<jschoi>
I don’t…think it should…
00:28
<jschoi>
I’ll check with uniq.
00:40
<jschoi>
Sorting the output then running uniq -d doesn’t return any duplicate lines. It doesn’t seem to be double-counting dependencies.
At most, a library might manually include the code of another library in its own source code, but that problem is probably pretty small. And it applies to all the other functions’ counts, too.
00:53
<jschoi>
…I’d upload the sorted dump, but I just realized not everyone might want to download a 75.9-MB file, and I don’t know how Matrix’s file sharing works, haha.
00:59
<jschoi>
(Fun fact: The most-downloaded NPM library that uses .call, as of 2019-09, was debug, and it uses .call twice: in createDebug.formatArgs.call(self, args) and in match = formatter.call(self, val);.)
01:00
<jschoi>
(Next up is kind-of, which uses .call once, followed by readable-stream…which uses .call nineteen times. And lodash uses .call 127 times.)
04:32
<devsnek>
jschoi: https://sourcegraph.com/search?q=context:global+.call%28+lang:javascript&patternType=literal
05:21
<annevk>
Is there a place to follow what is outstanding on https://datatracker.ietf.org/doc/html/draft-ietf-dispatch-javascript-mjs? There was a GitHub repo at some point...
06:27
annevk
finds https://github.com/linuxwolf/bmeck-ids
06:58
<jschoi>
jschoi: https://sourcegraph.com/search?q=context:global+.call%28+lang:javascript&patternType=literal
Excellent, thank you.
Though it doesn’t seem to quantify results (“500+ results”), this will still be very useful…It sure seems a lot better than GitHub’s code search; that’s for sure.
16:20
<jmdyck>
Ashley Claymore: I think it would be incorrect to call a Symbol's [[Description]] an internal slot. It's just something else ("an associated value") that happens to use the same metasyntax.
16:30
<Ashley Claymore>
thanks :D
16:37
<jmdyck>
When Symbols were first introduced in the early drafts of ES 6, they were a kind of exotic object, so at that time, [[Description]] would have been an internal slot, except that by the time [[Description]] showed up, Symbols had already changed to be a new kind of primitive.
16:47
<Ashley Claymore>
ah - that's an interesting bit of history
18:13
<ptomato>
does anyone have any background reading on the discussion from last week, that pipeline-operator and call-this are the future of writing tree-shakeable code? I would like to understand this better
21:14
<ljharb>
jmdyck: symbol descriptions are 100% an internal slot, and the getter works across realms
21:14
<ljharb>
unless you're saying primitives can't have one and that's the fudge factor?
23:49
<jmdyck>
@ljharb: I wouldn't say that primitives can't have internal slots, rather that the spec doesn't describe them as having internal slots. The spec talks about 'internal slots' only in connection with objects, and in particular does not describe a Symbol's [[Description]] as an 'internal slot'. So calling it an internal slot isn't supported by the spec.
23:49
<ljharb>
hm
23:49
<ljharb>
i mean, it has the same semantics. and on boxed symbol objects it acts just like an internal slot too.
23:55
<jmdyck>
I don't think the spec has such a thing as boxed symbol objects. You mean like Number Objects and String Objects?
23:57
<jmdyck>
Like, a Number Object is an object-box around a Number value? I don't think there's a similar object-box for Symbol values.
23:58
<bakkot>
jmdyck: there is, see 20.4
23:59
<bakkot>
or I guess better see Table 18 for Symbol
23:59
<bakkot>
https://tc39.es/ecma262/multipage/abstract-operations.html#table-toobject-conversions
23:59
<jmdyck>
that returns "a new Symbol value", not an object
23:59
<bakkot>
ToObject applied to Symbol says "Return a new Symbol object whose [[SymbolData]] internal slot is set to argument."