5 ms·
Node.js for Embedded Systems
- crimsonalucard 8y agoI hear they use embedded systems on airplanes, rockets and space vehicles. Javascript on embedded systems makes it so that your average front end developer can now make the software that controls auto pilot or Nuclear Power Plants! Javascript is taking over!
- kbumsik 8y ago> Javascript on embedded systems makes it so that your average front end developer can now make the software that controls auto pilot or Nuclear Power Plants! You must be kidding, or you want to see everyone dies, right? JS does meet realtime constraints. Maybe someday when nodejs has event priorities, it would be much more interesting to use in that field. I mean software development skill is only a small part of embedded system development used in autopilot and power plants. You need related engineering expertise (e.g Math) much more than writing C or JS.
- sct202 8y agoSome embedded systems are maintained or coded with GUI's like RSLinx (it's all visual), so using JS instead might be a step up in some scenarios.
- crimsonalucard 8y agoI think GUIs and touch screens are the future of all embedded systems. No more buttons. Imagine the cockpit of a boeing 747 with all levers buttons and knobs removed. Just a giant LCD touch screen GUI coded by a bootcamp graduate in React + redux. The plane would be more useable by the pilot as touchscreens are more versatile than old fashioned buttons. Also you would be more safe because if a lever or button fails on a flight you are pretty much screwed but if a touchscreen fails you can just reboot the touchscreen and you're good.
- EugeneOZ 8y agoWhy use one of the trashiest languages, when we have so many good and effective languages outside of web browsers?
- todd3834 8y agoOne man’s trash is another man’s treasure.
- EugeneOZ 8y agoCome on, I also use JS for web, it doesn't mean I have to love it. Even it's creator admits low quality of his creation - it was made in a hurry. Try to be objective - if not monopoly in web browsers, JS would never exist or gain popularity.
- qaq 8y agomodern js and ts are very usable plus you get access to a huge ecosystem.
- EugeneOZ 8y agoModern TS is usable, agree. But I'm talking about non-browsers world, where we have not just "usable" languages, but languages with much better characteristics, much better suited for the Embedded Systems. And they have even bigger ecosystems.
- todd3834 8y agoWho said _you_ have to love it? Some people do love JS. Those people will appreciate using it in embedded systems.
- msla 8y ago> Why use one of the trashiest languages This isn't about C++. ECMAScript has garbage collection.
- 8y ago
- dna_polymerase 8y agoSome men just want to watch the world burn.
- priansh 8y ago"Saying that JavaScript is good because it works on all platforms is like saying anal sex is good because it works on all genders." It's great for use on the web, just please keep it there!
- manigandham 8y agoNeat stuff. What's all the hate is about. Not every embedded system is running real-time sensitive industrial machinery or medical equipment. Many things like general consumer electronics can run fine with Node. The runtime is incredibly well-tested at this point, JS is easily learned and scriptable for extensibility, the single-threaded nature is easy to work with and fast enough, and managed memory makes it easy to crash and recover from failures.
- deleted 8y ago[deleted]
- partycoder 8y agoThe choice of node.js means putting developer convenience in front of everything else. The end user does not care about developer convenience, cares about a working product that is reliable.
- manigandham 8y agoIs it though? I'd prefer many other languages that are more convenient to code in that dealing with the quirks of JS, but I don't see why Node must be unreliable either. I think for simple devices this works just fine.
- vvanders 8y agoMost of the 'hate' has to do with the fact that the language isn't suited to platforms with memory constraints. Specifically there's semantics around closure capture that make it pretty easy to leak variables. I've worked on platforms where we wrote the same logical code in JS and Lua, closures and all. The JS version leaked like a sieve while the Lua version was memory steady. You can totally use gc'd, interpreted languages in the embedded space. I've used Lua on a product with 8mb of system ram in a 400kb block and it worked like a charm.
- kbumsik 8y agoI think it is somewhat related to the hate around Electron. You can develop great Eletron apps like VSCode but people hate most of Eletectron apps taking much memory and CPU load. This is mainly because of the developers who don't care about rhe differences between the desktop environment and the broswer environment e.g. users can click the refresh button in the browser when it's slow while it's not the case in the desktop environment. I think the hate is not about JS language itself but about some offensive people who believe JS enough to develop everything and who are not willing to learn appropriate knowledges/languages in the field.
- chrisbennet 8y agoA friend of mine did some sort of medical device for diabetes or transfusion (or something like that) using node.js a few years back.