Ingvar Stepanyan

Results 1089 comments of Ingvar Stepanyan

> The dirty secret of `libusb_cancel_transfer` is that it doesn't actually support cancelling specific transfers on platforms other than Linux. Oh lol okay. I'd never guess this from the API...

I wonder if WebUSB trying to do best-effort thing on unsupported platforms would help: if it knows there's only one in-flight transfer, it can use the proper underlying cancellation mechanism...

> Being able to detect this scenario (timeout) and act upon it (cancel all transfers, or maybe in my case close the connection entirely and alert the user) would be...

> The last time I took a look this seemed very heavy-handed compared to what I actually need to do. Ah. Well, without knowing the specifics, you did mention that...

> The spec doesn't say "new" here so I read it as referring to the object that was previously created when the device was first detected. Yeah it doesn't say...

No, this definitely wouldn't be sound since enum tags can be optimised by using nested niches too. Consider what happens when you put such `Option` into another one and get...

> is not legal, you can have `[foo as number] = 42` and `(foo as number) = 42` Huh, these are weeeird. But that would still make them PatternLike (or...

Hm perhaps the stdlib changed implementation as it's been a while, or perhaps it's different on those CPUs... Hard to say without further digging.

This PR looks reasonable, and I wanted this functionality myself in the past, but I wasn't (stil am not) sure if we should have coroutines / promises in Embind behave...

> Side note: I just noticed that coroutine frames are leaking, couldn't find `handle.destroy()` call anywhere, will add to this PR. Do you actually see the leaks or do you...