!AGetWbsMpFPdSgUrbs:matrix.org

WHATWG

961 Members
https://whatwg.org/chat — logs: https://matrixlogs.bakkot.com/WHATWG/ — Please leave your sense of logic at the door36 Servers

Load older messages


SenderMessageTime
19 Jul 2021
@domenicdenicola:matrix.orgDomenic annevk: the idea is that if your underlying source (i.e. network APIs) support it and the buffer is big enough, you write into it. E.g. for filesystem APIs were you can explicitly control how many bytes you request this works great. For network APIs you can't always control; flow control takes a while to propagate through TCP. So in that case we might have too many bytes to fit into the buffer. 17:55:37
@domenicdenicola:matrix.orgDomenicIn actuality you wouldn't need to create any JS ArrayBuffer objects like the spec does so you do save a couple of mini-allocations. And since it's all hidden behind transferrability you could avoid copying in favor of slicing up memory regions and making making the new view point to the original region. But there's no way to write 64 KiB of data from the network into a 1 KiB developer-supplied buffer.17:57:29
@annevk:mozilla.org@annevk:mozilla.orgMaybe my confusion stems from the specification using JS views and buffers17:58:10
@annevk:mozilla.org@annevk:mozilla.org Domenic: how does it work if you do read(largeView) and the network is slow? You have to wait a long time? 17:59:14
@domenicdenicola:matrix.orgDomenic annevk: no in that case you get back your buffer with however many bytes were available and a view onto only the bytes that were written into it 17:59:37
@domenicdenicola:matrix.orgDomenichttps://github.com/whatwg/streams/pull/1145 is a proposal for the "wait a long time" variant, which in some cases might be convenient.18:00:11
@annevk:mozilla.org@annevk:mozilla.orgAh okay, so you basically get each chunk or however many chunks a UA decides to combine18:00:40
@annevk:mozilla.org@annevk:mozilla.orgAnd the API is a bit different from encodeInto in that it returns a view18:01:13
@domenicdenicola:matrix.orgDomenicHmm yeah I never thought to compare with encodeInto18:01:44
@annevk:mozilla.org@annevk:mozilla.orgIn principle you only need to know how much was written, right?18:01:45
@domenicdenicola:matrix.orgDomenicYou also need to know the new ArrayBuffer object identity (same backing memory) since it went through a transfer dance18:02:51
@annevk:mozilla.org@annevk:mozilla.orgAah, thanks. I think I understand it a bit better now. I'll look into the queuing thing tomorrow I suspect, unless a lot of other things pile up.18:03:25
@domenicdenicola:matrix.orgDomenicnp, no rush on any of this I don't think18:04:01
@domenicdenicola:matrix.orgDomenicIt's slightly more near-term-relevant than it used to be because WebTransport is my impression.18:04:22
@domenicdenicola:matrix.orgDomenichttps://twitter.com/nevali/status/1416107137714040845 I can get behind this18:07:18
@timothygu:matrix.orgtimothygu annevk: what would the process be like for publishing review drafts for IDL? Would the editors be responsible for that or do you usually publish the RDs for all the specs 18:19:09
@annevk:mozilla.org@annevk:mozilla.org timothygu: we'd handle it automatically through review.py in whatwg/meta 18:21:11
@annevk:mozilla.org@annevk:mozilla.org timothygu: which effectively comes down to me / foolip / Domenic 18:21:46
@annevk:mozilla.org@annevk:mozilla.orgIf there's a build error in the main file it might involve you though18:22:03
@timothygu:matrix.orgtimothygugreat! sounds good18:22:24
@lucacasonato:matrix.orgLuca CasonatoThis might have been one of the fastest turnarounds for a new spec addition in a while: https://github.com/w3c/webcrypto/pull/266. Added to Chrome, Firefox, Safari, Deno and Node in only 17 days. Already shipped in stable latest Deno release.21:20:00
@lucacasonato:matrix.orgLuca CasonatoGranted it is a tiny addition and change, but still good to see.21:20:14
@lucacasonato:matrix.orgLuca Casonato * This might have been one of the fastest turnarounds for a new spec addition in a while: https://github.com/w3c/webcrypto/pull/266. Added to Chrome, Firefox, Safari, Deno and Node in only 17 days. Already shipped in latest stable Deno release.21:20:27
@bakkot:matrix.orgbakkotglad to see webcrypto getting some love again!22:37:24
20 Jul 2021
@annevk:mozilla.org@annevk:mozilla.org Yeah, nice work by timothygu and twiss 07:24:44
@andreubotella:mozilla.orgAndreu Botella (he/they)I didn't realize infinities were converted to 0 when cast to a WebIDL integer type07:50:13
@andreubotella:mozilla.orgAndreu Botella (he/they) I was trying to do setTimeout(fn, a ? Number.POSITIVE_INFINITY : 10 * 1000) 07:50:30
@andreubotella:mozilla.orgAndreu Botella (he/they) * I was trying to do setTimeout(fn, timeout ? 10 * 1000 : Number.POSITIVE_INFINITY) 07:50:50
@sideshowbarker:mozilla.orgsideshowbarkerhttps://github.com/validator/validator/issues/119208:56:56
@sideshowbarker:mozilla.orgsideshowbarker

per-spec should the following be a document-conformance (authoring-conformance error)?

<input type='text' autocomplete=' ' />
08:57:51

Show newer messages


Back to Room ListRoom Version: 6