5 ms·
No real mention of why. So, why?
by bmitc 4y ago
No real mention of why. So, why?
- rob74 4y agoBecause JavaScript is a really widespread scripting language, so it's very well suited for this task?
- bhedgeoser 4y agoWhy not? They aren't using npm, so security/stability isn't an issue. I guess it was either lua or js, and the devs didn't like 1 based indexing.
- sph 4y agoThey had delays, a rapidly looming deadline and not enough personnel, so NASA had to resort to hiring React developers.
- dpedu 4y agoIt is explained in the article, but not very clearly: > The JWST isn’t running a web browser where JavaScript directly controls the Mid-Infrared Instrument — it’s more like when a manager is given a list of tasks (in this example, the JavaScripts) to do and delegates them out to their team. The way I interpret this is that JavaScript programs are used to coordinate missions - meaning, in the script, it is specified what instruments to use and how to configure them. Maybe even a `for` loop to sweep an instrument across a range. But the instruments themselves don't run JavaScript. Since it's a simple language (at least, compared to the embedded languages the instruments actually run) it presumably makes it easy and safe to configure the satellite. Think of it more as a configuration file written in JavaScript. You could compare this to video games written in C++ that expose to the user a Lua scripting engine such as World of Warcraft or Garry's Mod. This comment links to a paper with more info: https://news.ycombinator.com/item?id=19738151 https://news.ycombinator.com/item?id=19738151 > ScriptEase JavaScript allows for a modular design flow, where on-board scripts call lower-level scripts that are defined as functions. > The script interpreter is run by the flight software, which is written in C++. The flight software operates the spacecraft and the science instruments. > The flight software will execute the command sent by the calling on-board script and return telemetry, which will be evaluated in real-time by that on-board script. The calling script will then send status information to a higher-level on-board script, which contains the logic to skip forward in the observing plan in response to certain events
- bmitc 4y agoNone of that explains why JavaScript.
- brent_noorda 4y agoBecause JavaScript happened to be the language we at Nombas implemented in our "robust and predictable" engine. If a, e.g., python or TcL engine were as solid at the time for a can't-fail embedded engine, they could have happily used that.
- bmitc 4y ago