That's because this isn't upsert. Upsert does mutation when the value already exists. This doesn't.
31.07.2025 05:15 โ ๐ 3 ๐ 0 ๐ฌ 1 ๐ 0@bakkot.com.bsky.social
That's because this isn't upsert. Upsert does mutation when the value already exists. This doesn't.
31.07.2025 05:15 โ ๐ 3 ๐ 0 ๐ฌ 1 ๐ 0Pedantry: you made a quiz about _V8_'s Date parser. Almost none of this is required by spec (although it is allowed), and several of these behave differently in other browsers. Which is even worse!
11.07.2025 21:26 โ ๐ 10 ๐ 0 ๐ฌ 0 ๐ 0A sync iterator yielding a rejected promise is not an error in the iterator, whereas an async iterators doing so is. So when lifting sync to async, we need to handle rejected promises from the iterator as if the _consumer_ had an error (by calling `.return`).
22.05.2025 20:40 โ ๐ 1 ๐ 0 ๐ฌ 0 ๐ 0Thanks! Further pedantry: "Note that in for of with sync iterators, .return() is always called after .next() throws" - not so. The bug arises because consumers aren't supposed to call .return if the iterator throws, only if the consumer does.
22.05.2025 20:38 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0So, a break/return/throw inside the loop causes `.return` to be called, but the iterator being exhausted, or throwing, does not call `.return` to be called.
22.05.2025 16:10 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0Good post! Nitpick: you say `.return` is called "when the iteration stops (due to a break, due to reaching the end of the iterator, or due to the iterator having thrown)". The latter 2 are wrong. It is called only on _early_ exits from the loop which are not caused by the iterator throwing.
22.05.2025 16:10 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0using controller = new AbortController.AutoAbort(); let pages = await Promise.all(urls.map(url => fetch(url, { signal: controller.signal })); // automatically cancels outstanding requests if any request fails
Some of that is because the lack of syntax means we don't clean up things we probably should. For example, with a [hypothetical] disposable AbortController, it would be trivial to clean up outstanding fetch requests when other requests fail. Usually JS devs just don't bother.
05.05.2025 16:37 โ ๐ 3 ๐ 0 ๐ฌ 0 ๐ 0we have almost finished working through your list
chunking is coming in proposal-iterator-chunking
ranges are making less progress
rest is done
x.com/qntm/status/...
Any pointers to which? I've previously been skeptical of adding CBOR because I thought it didn't have wide adoption yet but it's already backing web specs that would be relevant data.
31.12.2024 16:05 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0Parallelism and concurrency! respectively:
github.com/tc39/proposa...
github.com/tc39/proposa...
less exciting but still exciting (but I'm biased): native base64
github.com/tc39/proposa...