Email or username:

Password:

Forgot your password?
Thomas 🔭✨

Just learned what the user interfaces in the SpaceX capsules run.

The capsules that provide life support for people traveling into space and have to be absolutely reliable.

The user interface that controls an explosion.

.

.

.

It runs some home-compiled version of Chromium and the UI is written in JavaScript.

225 comments
ROTOPE~1 :yell:

@thomasfuchs that is oversimplifying the situation

It also has node

SnoopJ

@rotopenguin @thomasfuchs one might also quibble about "controls" since the whole point of the craft is flight automation

That pedantic point doesn't do much to alleviate the anxiety the craft can cause in any software engineer, though. If anything, it makes things worse.

Pete Keen

@thomasfuchs "Houston, we, uh, we have a problem. The displays are all showing [Object object] again."

Jason Sando

@thomasfuchs YIKES

I've built embedded apps that run 24/7 on Chromium and would say it works great 95% of the time. And the 5% it doesn't you will have no chance to figure out where in the 35 MILLION LINES OF EXTRA CODE YOU DIDN"T NEED is the problem.

Linh Pham

@thomasfuchs @jasonsando

I hope the hardware doesn't have an FDIV-like bug layered on top of that

srslypascal

@qlp @thomasfuchs @jasonsando

Actually, node <21.2.0 uses a base64 library that crashes the process with an illegal instruction (caused by a flawed AVX support detection routine) if you're
1. running it on certain Skylake CPUs, and
2. have enabled kernel mitigations for the "gather data sampling" vulnerability.

The fix has not yet been backported to node's 18.x branch.

And Electron <27 contains an *additional* similar bug in node's simdutf because they don't use the latest node 18.x release.

@qlp @thomasfuchs @jasonsando

Actually, node <21.2.0 uses a base64 library that crashes the process with an illegal instruction (caused by a flawed AVX support detection routine) if you're
1. running it on certain Skylake CPUs, and
2. have enabled kernel mitigations for the "gather data sampling" vulnerability.

Jargoggles

@jasonsando @thomasfuchs
"Works 95% of the time" is good enough for space travel, right?

Carsten Franke

@thomasfuchs as long as the code has been personally checked by Elon we are good.

Diego Barros

@thomasfuchs “TypeError: Cannot read property of undefined”

Camilo

@thomasfuchs I’ve been telling people for years, the screens in our Star Trek future are probably all browsers running some transpiled JS

Alda Vigdís :topspicy: 🇵🇸

@cam @thomasfuchs Back in 2004, 18 year old me was working at a company that specialised in handheld tech, concentrating on Windows CE and Psion and this is what I kept telling my older and more experienced coworkers who thought it was heresy and that .Net would end up ruling the world.

A couple of years later, the iPhone came out, with its original apps being HTML/JS based widgets.

Linh Pham

@cam @thomasfuchs LCARS = Lightweight Chromium Automated Rendering Servlet

Anthony Baker

@thomasfuchs This thread is HILARIOUS. And, of course, frightening.

Infoseepage #StopGazaGenocide

@thomasfuchs Echos of the Oceangate submarine using a Logitech gamepad from a 2010 to steer and some lights purchased from camping world.

Robbie Coleman :verified:

@thomasfuchs
Nothing like having Just In Time in between a human and their life support 👍🏻

Eric A. Meyer

@thomasfuchs And the JWST runs a 20-year-old flavor of JS. Web tech is everywhere.

DELETED

@Meyerweb @thomasfuchs

Yeah scary fact, but at least they had the skills to write their own interpreter.

Abraham Samma

@thomasfuchs that's common knowledge. We've known that since the first crewed mission, and there have been many successful crew missions since then. Kudos to the team for making that happen with chromium and web technologies.

Tito Swineflu

@thomasfuchs The first time I saw the inside of those capsules and the giant screens and lack of buttons, I thought, "gee, I hope those screens aren't a single point of failure without redundancy."

Coprolite9000

@tito_swineflu @thomasfuchs
I like Canon dSLRs where, when touchscreens were added, buttons were kept as the primary input method because they're faster and more reliable.

(Entertainingly, many earlier Canon digital cameras ran the same OS as many NASA / JPL space probes - VxWorks. It's since been replaced with their own, tiny real-time DRYOS...)

Amanda

@thomasfuchs "Ground control to Major Tom. Your circuit's dead. There's something wrong."

kzurawel

@thomasfuchs Back in 2015, talking about NASA using Node in their new spacesuit designs, @seldo said “Someone is going to die in space because undefined is not a function” and it has stuck with me ever since 😂

Thomas 🔭✨

There’s people unironically replying that this is somehow a good thing and I just can’t

Evan Deaubl

@thomasfuchs "Tell me you've never worked on embedded, real-time, safety critical software without telling me you've never worked on embedded, real-time, safety critical software" challenge

Annie

@thomasfuchs@hachyderm.io It's like the worst idea ever. Maybe sensible as a mockup early on for the UI team to iterate on, but the actual flight software? What the fuck?

Technology Connections

@thomasfuchs I know next to nothing about the nuts and bolts of code and whatnot yet I still know this is a terrible, terrible idea.

Madopal

@thomasfuchs "Full-stack" folks gonna "full-stack", apparently, choosing to die on the JS hill

srslypascal

@madopal @thomasfuchs It's actually more "full-heap" than "full-stack".

Parts of that ecosystem are also "full-house", but those houses are houses of cards.

Jim Jones

@thomasfuchs source, please! I would love to read more on this. It's giving off Titan submarine vibes.

ROTOPE~1 :yell:

@alienghic @thomasfuchs pictured: Margret standing next to a printout of all the code and NPM dependencies that it pulls in.

Darnell Clayton :verified:

@thomasfuchs I had to look this up, too (to see if this was true) & there is manual backup with physical buttons just in case the touch display on the #SpaceX rocket 🚀 fails.

👉🏾 science.slashdot.org/story/20/

Skjeggtroll

@darnell @thomasfuchs

a) Good.

b) But then what's the point of the browser-based UI?

The advantages of a browser-based UI is that 1) they can be distributes from a central server, 2) they're quick and cheap to reconfigure and extend and 3) they can save on UI real-estate since the I/O can change depending on context.

1) isn't relevant here, and if you're making a physical button version of the controls _anyway_, neither is 2 or 3.

It just seems like an odd choice (to put it mildly).

Ganonmaster

@thomasfuchs the only way we get rid of JavaScript as a species is to launch it into space.

Simon Green

@ganonmaster @thomasfuchs But in true "task failed successfully" fashion as is tradition for the species, we keep trying to do it on a rocket that comes back.

number137

@thomasfuchs slightly off topic, but what are Tesla's main applications based on? Since the risk being fragged by Musk's N1 is probably smaller for me compared to all his killer cars let loose.

Thomas 🔭✨

@number137 no idea, but I found this story from the trenches:

Zilla

@thomasfuchs wait so Melon Husk is a real life version of Mr. Burns?

A January Sponge

@thomasfuchs That's up there with a Logitech gamepad controlling a submarine.

Evan Light

@thomasfuchs @freeformz Is it running on Windows ME? Because that would really take the cake.

DavidNelsonNM

@thomasfuchs Not a surprise - their likely moon landing simulation software? Lunar Lander. Arcade console. 😁

Evan Light

@davidnelsonnm @thomasfuchs And here I was thinking that their guidance software must be Kerbal Space Program 😂😂😂💀☠️

Dave Rahardja

@thomasfuchs [Internal screaming]

I used to write software for navigation avionics. We sweated every single line we added. We removed *every* unnecessary complexity. We wrote our own real-time task schedulers. We did not use dynamic memory, but budgeted the resource used by every algorithm up front. We managed every block of Flash memory to guarantee we will never run out of space. We time-bounded our graphics-drawing code to guarantee information displayed would never be stale. We verified that our code would not break real time contracts even if we missed *every* CPU cache lookup.

Javascript?

[Internal screaming]

@thomasfuchs [Internal screaming]

I used to write software for navigation avionics. We sweated every single line we added. We removed *every* unnecessary complexity. We wrote our own real-time task schedulers. We did not use dynamic memory, but budgeted the resource used by every algorithm up front. We managed every block of Flash memory to guarantee we will never run out of space. We time-bounded our graphics-drawing code to guarantee information displayed would never be stale. We verified that...

David

@thomasfuchs If it was TypeScript transpiled into JavaScript, it shouldn't be a problem.

Eric

@thomasfuchs not sure what js they're using. Like react would be scary. And that hand compiled chrome scares me. But html is the most rock solid ui platform.

don Elías (como los buses) 🥨

@thomasfuchs

JS in life critical applications, especially aerospace, is beyond scary, it's:

"b" + "a" + +"a" + "a" + "s";

spacer

@thomasfuchs I work with that kind of stack, and this terrified me

Aaron

@thomasfuchs Years ago was talking shop with a programmer who was strongly pro-Javascript, a big fan of Node.js and Atom and the like, and then insisted I was obsolete because I don't code in Javascript.

I retorted something to the effect of "When you can go to space with just Javascript, get back to me."

I guess I'm officially obsolete now.

voxpopsicle

@thomasfuchs I remember reading that Tesla's internal software (on the car) was held together with shell scripts and that killed any dream of owning one

railmeat

@thomasfuchs
An unpredictable language on an incomprehensible platform doesn’t seem like a good idea for mission critical use.

What do other projects use?

StarkRG

@thomasfuchs "I think it's suggesting my grandmother knows how much fuel is left. I don't know why it capitalised the last letter of 'Nan' though."

MegatronicThronBanks

@thomasfuchs Javascript/Truescript is the fastest spreading virus on this planet.

sleepfreeparent

@thomasfuchs are they somehow exempt from DO-178C? How?! Oh, it's probably a corrupted state issue...

Laurent Sansonetti

@thomasfuchs you’re making a big deal out of this, I’m sure the entire source code has been printed out and reviewed by Elon himself

Matt Palmer

@thomasfuchs @jwz *crosses out "tourist trip to the moon" from the bucket list*

chapapoom

@thomasfuchs honestly I don't see anything wrong with that. JavaScript is used everywhere and there are far worse choices for building a desktop app.

shine

@chapapoom @thomasfuchs I wouldn't really think about spaceship controls as a "desktop app" in a first place.

Tucker Teague

@thomasfuchs I'm okay with this as long as only billionaires ride in the thing.

Duncan Midwinter

@thomasfuchs that's how I'd do it if I were making a film about an imaginary space ship on an imaginary mission

Danielle Pond

@thomasfuchs many things run on js and the world hasn't ended yet... with that said it does make me uncomfortable.

craftycat

@pforpond @thomasfuchs I mean, many people drive drunk and the world hasn't ended yet, doesn't mean I'll let someone who downed a bottle of vodka 5 mins ago drive me home 😂

Florian 'floe' Echtler

@thomasfuchs WTAF how did they ever get a flight certification for that??!?

Skyr

@thomasfuchs the UI in the astronauts' capsule (control for the docking maneuver, etc) does so, too.

AnEthernetCable

@thomasfuchs So if we plug in a keyboard and hit Ctrl+W...

SuperIlu

@thomasfuchs as someone who runs #Javascript on #MSDOS that is no surprise 🤣
That thing is everywhere 😝

Evert Pot

@thomasfuchs what would be a better option in your opinion?

FredPlus10

@thomasfuchs I agree that there are technologies which are prone for instability, but you can even create memory leaks in Rust even though it has great memory management or a Null pointer exception in Kotlin even though it has null-safety.
On the other hand, there are strict JS analysis tools, which, combined with good testing, can lead to stable applications.

FredPlus10

@thomasfuchs I personally hate JS as well, but it doesn't mean that their code is bad. Conversely, even the shiniest tool cannot prevent you from writing shitty code.

0x10f

@thomasfuchs "3 Billion – Sorry, 2,999,999,999 – Devices Run JavaScript"

Null

@thomasfuchs@hachyderm.io as someone who used to write safety critical real time software for a living: Jesus fucking Christ.

@jacquiharper

@thomasfuchs But are they piloting with a Logitech controller?

Ken Tindell

@thomasfuchs @Gerhardf The chief genius engineer made them do it, I’m sure. The crew should count themselves lucky all the buttons don’t have “X” written on them.

Oliver Schafeld

But you can play Tetris while you wait for life support to run out…

#SpaceTrashla

✨メッツォ✨ :sabakan: :mastodont:

@thomasfuchs "Move fast and break things", amirite :neocat_cool_fingerguns:​

(Naturally, I'm being sarcastic.)

Troed Sångberg

@thomasfuchs If you use untyped languages you can't risk using the wrong type by mistake! We all learnt this from Ariane 5.

Kickstink

@thomasfuchs just out of interest, does anyone have some info on how NASA or SpaceX competitors write their spaceship software?

Primal Anomaly

@thomasfuchs I mean… has Chromium ever once failed to load a locally hosted web UI? And if somehow it did fail, you could just… hit refresh? As thoroughly tried-and-tested tech goes, you could do a hell of a lot worse. Just saying 🤷‍♂️

Phil Picton 💀

@thomasfuchs oh shit …. I mean I love JS but people like me shouldn’t be writing mission critical systems that lives depend on 😂😂

Rainer König

@thomasfuchs So Elon redefined the term "rocket science"...

Well, compared to the computer power of the lunar lander module back in 1969 this his high tech. But compared to what would be possible this is terrifying.

Möchtegern

@thomasfuchs Didn‘t Armstrong or someone from that era already comment that they were sitting on a huge explosive device which was built bit for bit by the lowest bidder? 😅

lord pthenq1

@thomasfuchs
Man, now all the JavaScript zombies will be proud! 😭😭

Sir David Nielsen

@thomasfuchs @lisamelton Electron in Space…. Or rather slightly closer to space, then really the afterlife as their shit exploded… again.

Kim Spence-Jones 🇬🇧😷

@thomasfuchs This is entirely consistent with a “move fast and break things” ethos. Though I’m not sure that mantra is supposed to include breaking multi-million dollar manned spacecraft. 🤦

Nils Ballmann

@thomasfuchs in those cases I usually like to cite this toot: mastodon.social/@rodhilton/109

>

He talked about electric cars. I don't know anything about cars, so when people said he was a genius I figured he must be a genius.

Then he talked about rockets. I don't know anything about rockets, so when people said he was a genius I figured he must be a genius.

Now he talks about software. I happen to know a lot about software & Elon Musk is saying the stupidest shit I've ever heard anyone say, so when people say he's a genius I figure I should stay the hell away from his cars and rockets.

@thomasfuchs in those cases I usually like to cite this toot: mastodon.social/@rodhilton/109

>

He talked about electric cars. I don't know anything about cars, so when people said he was a genius I figured he must be a genius.

Then he talked about rockets. I don't know anything about rockets, so when people said he was a genius I figured he must be a genius.

Mensch, Marina

@thomasfuchs I certainly wouldn't trust a Musk enterprise with my life. There are priorities that are all wrong. Not life-supportive. No matter which company.

Zeraph

@thomasfuchs Likely cheaper to find a random web developer than a proper program dev.

After all, we want to keep expenses to the bare minimum!

But yeah, no, that's unironically really worrying lmao

Carighan Maconar

@thomasfuchs I'm more bewildered that you assume any professional device is any different. 😂

Marcel Schindler

@thomasfuchs As the old fuck that I am who learned JS for Netscape-Navigator (<layer>) and Internet-Explorer (<div>) I am quite sure, that this is a bad idea.

I still think, Javascript is just for eye-candy and nothing more.

Leonid 🇮🇱

@thomasfuchs as long as you can sell something, an Musk sells shit all the time, nobody cares about the technology and the problems with it. People believe Musk is a tech messiah, so everything his companies do must be perfect.

Go Up