News for hackers. Stuff that matters.
Re:What computer and software is used by the Falcon 9? (2015) by davedx on Sunday May 31, 2020 @06:51AM (#23368657)
Why not Javascript? I would argue that a good usable UI in a spacecraft is a good thing, and Javascript is a great language for building UIs
Re:What computer and software is used by the Falcon 9? (2015) by fdw on Sunday May 31, 2020 @07:25AM (#23368823)
> Javascript is a great language for building UIs

I disagree. It is easy to build something presentable with HTML and browsers, and there have been many JS frameworks that lower the barrier. However, that is not because JS is a good language for it; it is because JS is the only language available in that environment.

In fact, there are at least two other languages that transpile to JS, because you need JS to be able to run in a browser. But JS the language is not good enough, so you want two write your code in something else.

Building a UI in a completely different language, without a browser, is definitely harder, but you might have several advantages in the other, non-UI parts.

Re:What computer and software is used by the Falcon 9? (2015) by davedx on Sunday May 31, 2020 @08:40AM (#23369192)
You haven’t made any arguments about why Javascript isn’t good for building UIs there. Here’s mine for why it is:

- first class functions (callback style is a good fit for UI programming)

- async/await and single threaded - many components of UIs are async by nature, Javascript supports you well here while keeping things simple with its single threaded model

Re:What computer and software is used by the Falcon 9? (2015) by heavyset_go on Sunday May 31, 2020 @03:40PM (#23372050)
Sharing the UI thread with logic is something to be mitigated when building UIs, it's not a feature.
Re:What computer and software is used by the Falcon 9? (2015) by davedx on Monday June 01, 2020 @08:33AM (#23377759)
In theory, maybe. In practice, your UI thread very rarely has to do the kind of heavy lifting that would block it so badly you actually have problems.

I have encountered this -- for example parsing very large incoming JSON payloads -- but very rarely. And if you really need to mitigate it, there are webworkers.

Re:What computer and software is used by the Falcon 9? (2015) by vertex-four on Sunday May 31, 2020 @10:52AM (#23369928)
There's... a large number of languages with both of those features.
Re:What computer and software is used by the Falcon 9? (2015) by scotty79 on Sunday May 31, 2020 @04:35PM (#23372495)
Could you name few better than js?
Re:What computer and software is used by the Falcon 9? (2015) by vertex-four on Sunday May 31, 2020 @05:45PM (#23373054)
In the context of writing reliable software for a spacecraft? Pretty much anything with a reasonable type system, for a start. Maybe C#, or some reasonable subset of C++20, or Rust. Maybe Reason or OCaml.
Re:What computer and software is used by the Falcon 9? (2015) by errantspark on Sunday May 31, 2020 @07:28PM (#23373988)
I mean very clearly the good people at SpaceX have heard of these languages and decided against it. I think JS and Chromium are the best UI kit I can think of in terms of man hours to get X done. If you're careful the only thing I've ever had issues with is latency, but in space if you're in a situation where missing a frame or two is important you're already beyond fucked.
Re:What computer and software is used by the Falcon 9? (2015) by zeroc8 on Monday June 01, 2020 @03:27AM (#23376097)
From my experience, Qt/QML is way better for things like that. I mean, the UI does not need to be responsive, does it?

Maybe they couldn't afford the Qt license.

Re:What computer and software is used by the Falcon 9? (2015) by davedx on Monday June 01, 2020 @08:40AM (#23377809)
Many people are using TypeScript these days, it works very well.

I like C# and Rust too. I've built UI's in C++ and MFC/OpenGL/DirectX. It remains my fairly strong opinion that JavaScript is well suited to UI development.

Re:What computer and software is used by the Falcon 9? (2015) by Wilem82 on Sunday May 31, 2020 @09:11AM (#23369357)
Javascript is a bad language period. For anything. It's used for UIs for historical reasons, not because it's good.
Re:What computer and software is used by the Falcon 9? (2015) by yoz-y on Sunday May 31, 2020 @11:14AM (#23370053)
Javascript has also evolved quite a bit and there is also TypeScript that improves on that. The language is not perfect by any means, but it gets better.
Re:What computer and software is used by the Falcon 9? (2015) by dmitriid on Sunday May 31, 2020 @10:49AM (#23369913)
I would expect the UI in a space ship to be soft realtime. Chromium and JS are anything but.
Re:What computer and software is used by the Falcon 9? (2015) by adrianmonk on Sunday May 31, 2020 @12:15PM (#23370492)
The only thing that's self-evident to me is that Javascript is a popular language for building UIs.