Live data from Hacker News

Build Adafruit projects right from Firefox

firefox.com

51–60 of 96 posts

Re: Build Adafruit projects right from Firefox

#51
post #44
post #30

Earlier quoted context omitted.

> do what the browser runtime is perfectly capable of: opening a project directory, executing the code comprising the build script, and outputting the build artifacts when it's done Unfortunately Firefox doesn't support the FileSystem API so to do this you need to resort to uploading the entire source code directory each time you change a source file. I understand Firefox's privacy and security first thinking on this…

> Unfortunately Firefox doesn't support the FileSystem API so to do this you need to resort to uploading the entire source code directory each time you change a source file. Right, it's so much less onerous to have people download and set up an entirely separate fickle toolchain—and needing to trust that the install triggers in the package.json of some transitive dependency won't exfiltrate your personal data or inst…

You seem very angry and I clearly don't understand what you are talking about.

> And you're not really responding to the substance of the comment anyway, which is that JS programmers—frequently writing for browser runtimes, even—are demanding that you install NodeJS, Bun, or Deno (because they hardcode the build scripts against those runtimes' APIs).

Do you mean things like the Typescript + Webpack/whatever toolchain? Because broadly speaking that seems orthogonal to the target browser.

Using tools outside the browser to build something for the browser is mostly an optimization, for both the developer and the end user.

If someone has a web app with maybe 100 NPM packages, doing things like tree-shaking offline before shipping to a browser is important.

> And you're not really responding to the substance of the comment anyway, which is that JS programmers—frequently writing for browser runtimes, even—are demanding that you install NodeJS, Bun, or Deno (because they hardcode the build scripts against those runtimes' APIs).

If they are targeting Web APIs and using runtimes to build for those APIs what is the problem?

There are plenty of tools that need version X.XX+ of GCC to build and won't build using MSVC or something. It's a bit annoying but hardly outrageous.

Re: Build Adafruit projects right from Firefox

#52

Earlier quoted context omitted.

Edge has had it for a while too.

In case you don't know, Edge is a "Chromium-based browser" like GP mentioned.

Which is why for a while Microsoft had Edge and EdgeChrome in parallel, until finally replacing one with the other.

Re: Build Adafruit projects right from Firefox

#53
post #34

what the fuck since when they are allowing webserial / webusb? I've always agreed with the reservations about browsers being able to control peripherals. I'd rather download a python script i can inspect.

It's handy for situations where you have inexperienced people needing to flash microcontrollers. Meshtastic is a great example, it's meant for a wide variety of users from people that can actually write code to people that have only maybe heard of a raspberry pi in passing. You buy a transceiver on Amazon, go to the meshtastic website, plug in the transceiver, and hit "flash". Also, I don't want to have to download y…

I'm aware it's handy. Lots of handy things have been used to distribute malware. Now we just need someone to intercept ESPHOME's flasher so that it sends a modified payload

Re: Build Adafruit projects right from Firefox

#54

WebSerial was just introduced in Firefox 151. It was already available for 5 years in Chromium based browser. It's so new in Firefox that even caniuse is not up-to-date: https://caniuse.com/web-serial .

(I submitted a PR for caniuse a few days ago :-) https://github.com/Fyrd/caniuse/pull/7523 )

Is Web USB also supported?

Re: Build Adafruit projects right from Firefox

#55
post #40
post #35

Earlier quoted context omitted.

I hope this signals a departure from us being stuck without web usb in firefox too. It's a shame that I've been stuck using chrome for it. And maybe we'll get web bluetooth too.

They were crazy overzealous about not allowing these technologies for a long time. I'm pretty sure I had many posts about this complaining over the years.

I'm delighted about this and also really hated the debate that had surrounded it.

Bring up WebSerial and WebUSB and oh no, all of a sudden, my 'document browser should not be accessing hardware' - yes we get it, you think the web is a collection of documents and are technically - in the most strictest sense possible correct. Hyper TEXT Transfer Protocol and all that.

Of course I've been watching Netflix and YouTube on my Firefox 'document browser' for years, because if I couldn't then there would literally no hope of anyone using Firefox in the real world, but WebUSB and WebSerial people are nerds who we can argue the toss about document browsers with and prove wrong.

Re: Build Adafruit projects right from Firefox

#56
post #32

Mozilla's response to "Request for Mozilla Position on an Emerging Web Specification", June 2020: > For raw device access as envisioned in a number of APIs (Web USB, Web Bluetooth, Web NFC, and Web MIDI), the risks of exposing those APIs to users cannot be reasonably conveyed. This is pretty much an intractable flaw of allowing raw, non-semantic access to devices regardless of the protocol used to do so. > The specif…

I understand and previously agreed with Mozilla's hard line privacy and security stance. Recently I've changed my mind. I've been building a thing using everything in the web platform, even if it is Chrome only and it is great . You can build apps the blend local and remote systems together in ways that make new things possible - and it is on an open-standard runtime. But as a long time Firefox user I hate that I hav…

Now with Webxxx, the user needs to make sure that it is the right URL, not a fake teanns instead of teams, so he is unsure every time he has to use it. Some random download, once it works, can be reused and you have more trust that it works after the trial was positive.

And if it is open source, you can review the code before compiling. I can't review the code of some random server, as my browser only receives a random wasm binary for example.

Re: Build Adafruit projects right from Firefox

#57
post #32

Earlier quoted context omitted.

I understand and previously agreed with Mozilla's hard line privacy and security stance. Recently I've changed my mind. I've been building a thing using everything in the web platform, even if it is Chrome only and it is great . You can build apps the blend local and remote systems together in ways that make new things possible - and it is on an open-standard runtime. But as a long time Firefox user I hate that I hav…

Now with Webxxx, the user needs to make sure that it is the right URL, not a fake teanns instead of teams, so he is unsure every time he has to use it. Some random download, once it works, can be reused and you have more trust that it works after the trial was positive. And if it is open source, you can review the code before compiling. I can't review the code of some random server, as my browser only receives a rand…

But the alternative is binary flashing software AND a binary blob to flash.

This doesn't preclude it being open source in anyway. Infact with a WASM toolchain you could even compile in the browser.

Re: Build Adafruit projects right from Firefox

#58
post #49
post #45

Earlier quoted context omitted.

So, what you're saying is that you agree with the security concerns regarding these API, but your convenience as a developer outweighs them?

No that's a mischaracterization. I'm saying I think it is important for free and open systems to be competitive with closed ecosystems, and to take advantage of the power of local systems. I believe in a world where we - as developers - can build systems that have both maximum safety and maximum utility for users. Currently there are two ways of distributing software that takes full advantage of the hardware users ha…

The web is not a software distribution platform, it's a platform for distributing thin clients to propriatory walled gardens that will break your use cases or just ban you at will. Users have absolutely no control over the web, so no I don't see it as a superior alternative

Re: Build Adafruit projects right from Firefox

#59

Mozilla's response to "Request for Mozilla Position on an Emerging Web Specification", June 2020: > For raw device access as envisioned in a number of APIs (Web USB, Web Bluetooth, Web NFC, and Web MIDI), the risks of exposing those APIs to users cannot be reasonably conveyed. This is pretty much an intractable flaw of allowing raw, non-semantic access to devices regardless of the protocol used to do so. > The specif…

I like that your comment, which is at the very top of this comment section, quotes a statement concerning Web USB, Web Bluetooth, Web NFC and Web MIDI.

The linked post is about WebSerial. The concerns about Web USB, Web Bluetooth, Web NFC and Web MIDI mostly don't apply. Most users have USB and Bluetooth devices connected, many have MIDI devices. Pretty much nobody who isn't in the specific target audience for WebSerial is going to have a serial device connected. And even if the concerns did apply, you should probably quote a statement which talks about WebSerial.

Post reply on HN