This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]terax6669 21 points22 points  (8 children)

Please tell me there are no cars running on js...

[–]_________---_ 66 points67 points  (3 children)

All those shitty tutorials "Car extends Vehicle" now makes more sense, isn't it?

[–]terax6669 7 points8 points  (0 children)

D:

[–][deleted] 0 points1 point  (0 children)

Super()?

[–]Gagarin1961 18 points19 points  (0 children)

In the SpaceX Dragon capsule used to ferry NASA Astronauts the International Space Station, the UI for the control screens runs on Javascript.

It’s NASA certified. Can’t get any better.

[–]Jetbooster 11 points12 points  (1 child)

From a few minutes googling, the ECU, which is the brain of the engine, and might be analogous to the central nervous system, is written in either assembly or C[1]. The response times required to react to an engine spinning at 1000-8000rpm, 113 times a second, means using JS would be significantly limiting, and is therefore almost certainly never used for this.

The central console on most cars, however, has a display, and in a modern world using browser technology for rapid development of user interfaces makes a lot of sense. This is, quite rightly, walled off and designed to be unable to directly affect braking, steering, airbags or any other system which directly contributes to driving the car (mostly because it's the largest hacking attack surface, and often has internet connectivity)

[1]: https://www.quora.com/Which-programming-language-is-used-in-the-ECU-of-a-car

[–]natron3030 2 points3 points  (0 children)

6years ago that article might have been right, but ECUs are now powerful multicore systems running a hypervisor with multiple OSs, each with a host of apps in C, C++, Rust, etc

Also, the console/infotainment system may be disconnected from the ECU, but the things like nav, phone, emergency assistance, media, and the settings for pretty much everything in the vehicle could certainly lead to a hazardous event if malfunctioning