01:03 | <sideshowbarker> | FYI/help-wanted https://github.com/mdn/content/issues/11665 |
01:17 | <sideshowbarker> | in general, for anybody wanting to help out with the MDN JS docs, and looking for some low-hanging fruit, we have 4 issues labeled as needing 30 minutes or less to resolve https://github.com/mdn/content/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22help+wanted%22+label%3AContent%3AJS+label%3A%22time%3A+-30mins%22+ |
01:18 | <sideshowbarker> | …and overall we have just 34 issues for the JS docs that are labeled as “help wanted” https://github.com/mdn/content/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22help+wanted%22+label%3AContent%3AJS (out of 620 open MDN issues overall) |
13:02 | <Ashley Claymore> | FYI/help-wanted https://github.com/mdn/content/issues/11665 |
13:15 | <Ashley Claymore> | Did JSC implement them this way maybe? |
13:16 | <Ashley Claymore> | https://bugs.webkit.org/show_bug.cgi?id=142408#c4 |
13:17 | <Ashley Claymore> | https://bugs.webkit.org/show_bug.cgi?id=179929#c0 |
16:06 | <devsnek> | lack of enumeration also allowed weakmap/weakset to be polyfilled by storing the value on the key instead of in the map |
18:17 | <sideshowbarker> | Ashley Claymore: devsnek Thanks (and thanks bakkot for https://github.com/mdn/content/issues/11665#issuecomment-1004486740). If nobody else creates a PR for that in the meantime, I think I’ll end up creating a PR that just adds the content of bakkot ’s comment (about avoiding to expose GC details) to that part of the article. |
18:20 | <sideshowbarker> | meanwhile, I’m confused by a sentence at https://tc39.es/ecma262/multipage/indexed-collections.html#sec-array.prototype.lastindexof in the spec:
|
18:21 | <sideshowbarker> | The sentence I’m confused by is “If it is less than +0𝔽, it is used as the offset from the end of the array to compute fromIndex” |
18:23 | <sideshowbarker> | What confuses me is that fromIndex is an explicitly-specified value — specified as the second argument to Array.prototype.lastIndexOf() — so why does the spec then change to talking about it being computed? |
18:24 | <bakkot> | "to compute fromIndex" is a weird way of saying it |
18:24 | <sideshowbarker> | or in other words, what’s “it” in that sentence — if not fromIndex? |
18:24 | <bakkot> | it should be "to compute the position from which to start searching" |
18:24 | <sideshowbarker> | aha |
18:24 | <sideshowbarker> | OK yeah, then that makes sense, yeah |
18:26 | <bakkot> | Also it's not actually "from the end of the array" in the case of lastIndexOf |
18:27 | <bakkot> | actually, no, I guess it is |
18:28 | <bakkot> | anyway yeah these notes are bad |
18:28 | <bakkot> | indexOf has the same problem |
18:34 | <sideshowbarker> | yeah the corresponding MDN articles also have similar problems… Trying now to figure out how to re-word them |
18:38 | <bakkot> | should probably be more like (for "The optional second argument fromIndex specifies the offset from which to begin the search. If it is non-negative, it is an offset from the beginning of the array; if negative, an offset from the end. If the resulting offset is greater than or equal to the length of the array, the whole array will be searched. If it is less than 0, -1 is returned, i.e. the array is not searched. If fromIndex is not provided, it defaults to the last index of the array." |
20:04 | <sideshowbarker> | bakkot: if you’re still around and you have a few minutes to review a related, PR: https://github.com/mdn/content/pull/11731 |
20:05 | <sideshowbarker> | https://pr11731.content.dev.mdn.mozit.cloud/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/lastIndexOf#_flaws has the preview of the rendered article with the PR changes incorporated |
20:05 | <sideshowbarker> | (and/or if anybody else is around and has time to review that) |