HN user

RReverser

373 karma

Obsessed D2D programmer (parsers, compilers, tools & specs).

WebAssembly consultant. Ex-WebAssembly Advocadoer @Google. Previously broke the Internet more than once @Cloudflare.

Posts22
Comments86
View on HN
github.com 2y ago

Libusb 1.0.27-rc1 is out – first RC with WebAssembly and WebUSB support

RReverser
1pts0
github.com 3y ago

Cross-platform Rust library for the ASCOM Alpaca API for astronomy devices

RReverser
2pts0
github.com 3y ago

WebAssembly+WebUSB port of the SANE scanner library

RReverser
101pts26
github.com 3y ago

Show HN: Web Bluetooth remote for Canon cameras

RReverser
5pts2
github.com 4y ago

libusb now has an experimental WebAssembly + WebUSB backend

RReverser
3pts0
web.dev 4y ago

Porting USB applications to the web. Part 2: gPhoto2

RReverser
3pts0
web.dev 4y ago

Porting USB applications to the web. Part 1: libusb

RReverser
157pts124
web.dev 4y ago

Embedding JavaScript snippets in C++ with Emscripten

RReverser
2pts0
web.dev 5y ago

Using WebAssembly threads from C, C++ and Rust

RReverser
3pts0
github.com 5y ago

Show HN: An adapter for using Rust and Rayon with WebAssembly threads

RReverser
1pts0
wasi.rreverser.com 5y ago

Show HN: WebAssembly in a browser with access to a real filesystem

RReverser
2pts2
wasi.rreverser.com 5y ago

WebAssembly in a browser with access to a real filesystem

RReverser
3pts3
web.dev 5y ago

Debugging memory leaks in WebAssembly using Emscripten

RReverser
1pts0
rreverser.com 6y ago

Bringing OxiPNG to Squoosh

RReverser
1pts0
github.com 11y ago

EditorConfig for GitHub (browser extension)

RReverser
2pts0
github.com 12y ago

jBinary – JavaScript library with high-level API for handling binary data

RReverser
1pts0
trendingjs.com 12y ago

Trending.js – Your daily dish with five JavaScript projects

RReverser
2pts0
npmjs.org 12y ago

Grunt plugin for Pure minimalistic CommonJS build

RReverser
1pts0
github.com 12y ago

Pure minimalistic CommonJS builder

RReverser
2pts0
github.com 12y ago

Bootstrap package for easier creating compilers to JavaScript

RReverser
2pts0
github.com 12y ago

JavaScript HTTP Live Streaming realtime converter and player

RReverser
4pts0
rreverser.github.io 12y ago

HTTP Live Streaming JavaScript realtime converter

RReverser
3pts0
Apple vs the Law 1 year ago

Because one is annual, and the other is just total. The equivalent of GDP for corporations would be annual revenue.

With guiding you're usually aiming for 5-10 minute exposures per frame. That usually results in each frame having at least several streaks. Sure, those are technically still short and can be cancelled out, but astrophotography is already challenging enough and has plenty of other noise sources without adding more fuel to the problem.

And that's now, when we're not close to the planned tens of thousands of satellites by Starlink above, and other vendors like Amazon only starting to plan their similar programs. That's why early feedback is important - otherwise the sky will be ruined in the best case for decades to come.

For pure visual observation you might be right, but any sort of amateur astrophotography is already significantly affected and is only going to get worse because 1) it's usually more wide-field than in professional observatories, which significantly increases the chance of Starlink streaks and 2) the ~6.5 magnitude is still a lot brighter than all the interesting deep-sky objects and is only dimmer than stars visible to the human eye.

It’s possible someone could come up with something like that for WebUSB, something that constrains it to something safe.

That sounds like WebSerial and WebHID to me, which don't require similar shenanigans with Zadig on Windows or Linux permission changes, because they allow access to a limited subset of USB device functions.

But that will never cover all the use-cases for USB apps. For those the only choices are not to do anything at all and let closed native executables to continue dominate this space (which gives them unlimited access without even those simplest permission prompts), or to work on WebUSB and encourage devs who do need to interact with such devices over USB to switch to that instead. I don't see 3rd option or how it would be possible in our non-ideal world, and among those two WebUSB still seems like a better idea.

Limiting it to installed apps still has the problem of users blindly agreeing to something that is fundamentally super dangerous.

Same can be said about native apps. Like with other hazards, in the end it's all about balance - you can't stop users from _ever_ doing stupid things.

and I think that they were only exposing features like that to trusted code (meaning apps you deliberately installed) rather than general web content

I'd actually be pretty happy if browsers chose to implement those APIs with the same restriction in mind - that is, only for explicitly installed PWAs. I said this elsewhere in the past, and I still think that's a reasonable restriction that could provide a path forward.

or mitigating one of the two critical problems of WebUSB (that the computer trusts peripherals too much, so that one that’s hijacked can more easily become a remote code execution vulnerability)

I'm not very well-versed in the details, but I believe that's also the reason why WebUSB (or Chromium implementation of WebUSB?) doesn't allow certain classes of devices to be ever accessed via that API.

They mentioned below that they have their own devices they can control. As I understand it, for those kinds of IoT usecases the workflow is easier because, instead of overriding the driver defined by the OS, you can define WebUSB-compatible descriptor that will "just work" across all platforms.

Slightly tangential, but I still find it fascinating that it was Firefox OS was the first to introduce the idea of adding all sorts of hardware APIs accessible from JavaScript, or at least that was the first time I heard of that idea and played with it (and still have a ZTE phone from the time), but, after the Firefox OS was discontinued, they essentially stopped being interested in those capabilities altogether and started to even actively discourage others from exploring it.

I guess it makes sense from business perspective, but I still believe in the original idea of making more powerful apps with Web technologies, even though the companies that work on those ideas changed over time.

because it’s such a run-away-screaming scary idea for security

I think that's the root of our disagreement. Few years ago I've been of the same mind about giving the web new powerful features, but after watching the space and seeing the existing alternatives I've come to change my mind.

As mentioned in another thread below (https://news.ycombinator.com/item?id=30013287), vendors who need this sort of functionality, already find ways to implement it via other proprietary methods like local executables that, unlike implementations of Web APIs, are not reviewed by other teams and usually expose all sorts of critical stuff over local HTTP servers or in another insecure fashion.

In the end, it's not a question of "if" we want to expose those features to the web apps, it's "how" we can do so with minimal risks to the users, and that's where web APIs with thought-out permission models, explicit requests and history of cross-origin checks can help.

Of course, you can also say that vendors can continue to implement those things insecurely anyway even when new APIs exist, but 1) in practice when they're given a simpler way to do the same thing, they tend to go for that more often instead of inventing custom hacks and 2) that's where advocacy of the new APIs comes in, and what I'm trying to do by showing what the web can be if we let it.

As for your other arguments about potential for breaking changes if/when those APIs get adopted by other browsers, I agree I might be overoptimistic and your prediction might very well turn out to be true. Those APIs map to basic USB concepts quite closely, so I can't imagine what changes would be necessary, but, of course, I don't have enough experience with WebUSB outside this project to say that it's 100% impossible :)

In the end, it's a bit of a chicken-and-egg problem - in order for browsers to see the interest or get feedback, there have to be apps trying to build something with those APIs and reporting bugs / feature requests, and for those apps to use those APIs, there has to be at least one implementation first. This problem can be chewed from either end, and I'm trying to do my part by showing developers how those APIs can be used for porting interesting apps and libraries.

I think I already made it clear in another thread why I'm not going to interact with your comments in particular. There's no need to try and post variations of the same comment throughout the tree.

At the same time, I'm perfectly happy to respond to questions and concerns of other people like the one above who can express their thoughts without resorting to personal attacks.