News for hackers. Stuff that matters.
Re:Schrödinger's Firefox OS by empressplay on Saturday January 09, 2016 @09:55PM (#10873931)
I'm still struggling to understand how an interpreter is any good for IoT uses? Isn't using a language that can compile to bare-metal much more efficient?

And if we're talking about the UI on say the front of your fridge, isn't there a squillion other toolkits out there already for that?

I just can't see this working.

Re:Schrödinger's Firefox OS by hardwaresofton on Saturday January 09, 2016 @11:02PM (#10874083)
Valid concern! JS is not your traditional choice for embedded systems, but in many ways, it's becoming (is, I think) "good enough".

- JS can achieve some serious speed with the enormous amount of work and JIT smarts that have gone into the various JS engines.

- Size/memory constaints on embedded devices are only going to get looser, and I think the kind of IoT devices that the FFOS is targeting are the type to have more than a simple microcontroller

- I'm not sure what you meant by toolkits out there for fridges... Do you mean the OSes that run on the smart-fridges? If so, in my other comment I noted how FFOS's web-apps-are-apps approach is fantastic -- exposing a simple, unified, easy to use javascript API is an extremely easy way for people to write webapps that target things like fridges, without having to learn some random new platform.

Re:Schrödinger's Firefox OS by chris_wot on Sunday January 10, 2016 @09:09AM (#10875326)
There are already numerous choices in the embedded marketplace for an OS. The issues on embedded devices appear to me to be considerably lower level than the browser.

I think your average embedded systems engineer might be very surprised to hear that Javascript is "good enough" for their microcontroller...

Re:Schrödinger's Firefox OS by hardwaresofton on Sunday January 10, 2016 @03:02PM (#10876910)
I did not say to put javascript on a microcontroller -- this is precisely why I mentioned form factors that have MORE than a simple microcontroller, which would make JS more viable.

Also, the numerous choices in the embedded marketplace also imply numerous specialized choices for display, sandboxing model, API conventions, etc. I think FFOS has an edge in this area because it just reuses the work people have already done pushing the web forward.

Re:Schrödinger's Firefox OS by sunfish on Saturday January 09, 2016 @10:43PM (#10874050)
JS isn't just about interpreters these days, but at the same time, IoT isn't just about efficiency. It's also about integrating with ecosystems, so that each IoT device isn't an island of itself, but can join a bigger picture.
Re:Schrödinger's Firefox OS by epoch1970 on Saturday January 09, 2016 @11:58PM (#10874243)
> It's also about integrating with ecosystems, so that each IoT device isn't an island of itself, but can join a bigger picture.

So why is JavaScript critical for this?

C, C++, Go, and pretty much every other language out there seeing use today is capable of working with JSON, making HTTP requests, and so on, in addition to supporting communication far beyond those technologies.

How are they any less capable than JavaScript in this case?

Re:Schrödinger's Firefox OS by hardwaresofton on Sunday January 10, 2016 @12:08AM (#10874266)
Javascript isn't strictly critical for IoT, but it does benefit for being the language of the web. FFOS is in a great position to take advantage of this, because FFOS's "apps" are what we generally call web apps.

Mozila doesn't have to reinvent wheels (though they will of course have to extend what we think of as the web) to handle mechanisms that have already been discussed/implemented/proven on the web.

I think if you wanted to do stuff with those other languages, you'd have to build up a little bit of tooling, libraries, and other odds and ends, and you can skip at least a little of that by using JS+HTML+CSS

Re:Schrödinger's Firefox OS by Sanddancer on Sunday January 10, 2016 @02:01AM (#10874520)
MS's IoT platform lets you use JS where it's appropriate, but at the same time, doesn't pin you down to it. You can also write things in C#, C++, etc, even mix as needed. The problem with Firefox OS is that it's just javascript, no escape hatch, no way to talk to the rest of the non-web enabled world.
Re:Schrödinger's Firefox OS by soapdog on Sunday January 10, 2016 @04:49AM (#10874825)
JS on Firefox OS can talk to non-web enabled world. You have APIs to do TCP, Bluetooth and USB. Also APIs to do GPIO and I2C from JS are being developed. You can talk to more things than just http servers.
Re:Schrödinger's Firefox OS by hardwaresofton on Saturday January 09, 2016 @11:07PM (#10874095)
I agree, many of the IoT devices are certainly large enough to have at least a raspberry pi form-factor device in them (if not bigger) -- I would expect a bunch of the "smart-home" related IoT devices to have decent specs, at least ODROID or raspberry pi level.

Also, the web as a platform is obviously very very well-known and popular. Mozilla just has to craft and expose the right APIs, and support the right devices (and handle the fragmentation), and they could have a great easy-to-use, robust platform almost overnight.

Re:Schrödinger's Firefox OS by ndesaulniers on Saturday January 09, 2016 @11:10PM (#10874110)
> Isn't using a language that can compile to bare-metal much more efficient?

Let me introduce you to my friend, WebAssembly.