Live data from Hacker News

Build Adafruit projects right from Firefox

firefox.com

41–50 of 96 posts

Re: Build Adafruit projects right from Firefox

#41
post #38

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 .

That makes me curious. It would not be quite as seamless as having serial support included out of the box in the browser, but couldn't you get most of the way there by writing a native application that provides provides a network interface to the serial ports and then a JavaScript library for use in the browser than talks to that application over the network (maybe even making the JavaScript library API match the Web…

You could do that, but then either you're asking users to install a native app, which isn't very "webby," or you're shipping something with Firefox that isn't based on web standards*, which absolutely isn't webby.

*Unless you're thinking of something I'm not, the API couldn't exactly match the Web Serial API because of same-origin policy, and if you made an exception to that policy to make the polyfill work, you'd punch a giant security hole in the browser.

Re: Build Adafruit projects right from Firefox

#42
post #38

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 .

That makes me curious. It would not be quite as seamless as having serial support included out of the box in the browser, but couldn't you get most of the way there by writing a native application that provides provides a network interface to the serial ports and then a JavaScript library for use in the browser than talks to that application over the network (maybe even making the JavaScript library API match the Web…

Workflow for what you described:

1. I go to your site 2. I download your service for my platform (that now has to be developed and shipped for N platforms your site wants to support 3. I install said service and make sure it's running 4. I go back to site and it's connected (or it's not and now you have to support a whole host of troubleshooting docs based on platform.

Web serial version that's now in Firefox and has been in chromium: 1. I go to your site. It works

What you described is something that has been done for awhile. Most recent thing I've used I can think of is Lenovos Driver install utility (you install their connector app, go to their support page, it connects to your app and then shows what drivers you need)

Re: Build Adafruit projects right from Firefox

#43

Earlier quoted context omitted.

What makes it aggressive?

[flagged]

> [...] the website tries to aggressively make me download Firefox, with multiple links on the site for it.

> What makes it aggressive?

The parent comment already contained the answer to your question (the multiple links are what makes it aggressive, in GP's opinion). Your comment might have been seen as more constructive if it engaged with that directly.

Re: Build Adafruit projects right from Firefox

#44
post #30
post #6

That's a start at improving something. But it won't rid itself of the Playskool/Fisher-Price gimmick factor or have any lasting effect until we can convince JS developers to write their own tools in a standards-compliant dialect and use standardized APIs so that contributors can use the runtime they already have installed instead of being cajoled and browbeaten into installing NodeJS or Bun or Deno or whatever to do…

> 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 install some nefarious ineradicable background service onto your system, versus the two extra clicks you'd have to subject yourself to if you wanted to re-run the build.*

Wait, no.

> people [are] forced to ship "Chrome-based only" features

No they're not. By your own admission they could make their build scripts work with the standardized HTML5 APIs that are well-supported in all major browsers. They choose not to.

And you're not really responding to the substance, anyway—which is that JS programmers (frequently writing for browser runtimes, even) require that you install NodeJS, Bun, or Deno (because they hardcode the build scripts internals against one of those runtime's APIs). If programmers really were writing build scripts that you could run in Chrome but unfortunately not Firefox, then even that would be an improvement over the status quo. But that's not what we're talking about, because that's not happening.

* most of which are destined to be one-shot executions, anyway

Re: Build Adafruit projects right from Firefox

#45
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…

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

Re: Build Adafruit projects right from Firefox

#46
post #45
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…

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

I think it is uncharitable to say "your convenience". It's more like "your vision as a creator". We're talking about developer intent that isn't possible otherwise. You can say "good, it shouldn't be", but don't characterize it as convenience.

Re: Build Adafruit projects right from Firefox

#48

Earlier quoted context omitted.

[flagged]

> [...] the website tries to aggressively make me download Firefox, with multiple links on the site for it. > What makes it aggressive? The parent comment already contained the answer to your question (the multiple links are what makes it aggressive, in GP's opinion). Your comment might have been seen as more constructive if it engaged with that directly.

I don't remember that being there, maybe it was edited. But 2 buttons are not "aggressive". C'mon. Really dude? You believe that shit?

Re: Build Adafruit projects right from Firefox

#49
post #45
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…

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 have:

1. AppStores, with centralized, permission based certification of developers in an attempt to make apps safe.

2. Binary downloads, relying on the operating system to make them safe for users.

I believe there should be a third way - a platform that sandboxes users from the worse things that are possible and breaks reliance on cloud platforms.

I think the web platform is the closest to achieving this. I think the security and privacy concerns are valid and well-founded, but I think the trade-offs in pushing permission-based systems are worthwhile.

Take this project as an example. The alternative to web-serial is to download a random executable binary and firmware written by who knows to your computer, with full read/write permissions. I think that is a riskier outcome for users than enabling this API.

Re: Build Adafruit projects right from Firefox

#50
post #7

On iOS the page promotes the App Store version of Firefox, which is based on WebKit and doesn’t support Web Serial.

Blame Apple for that.

Not a full time apple user but how does third party orion browser supports Firefox addons on apple but Firefox itself doesn't support their own addons?
Post reply on HN