4 ms·
I worked on radars. We used Ada. The knock on it is that its slow, and didn't have a huge ecosystem. but 20 years later at least slow is not really much of a
by acomjean 5y ago
I worked on radars. We used Ada. The knock on it is that its slow, and didn't have a huge ecosystem. but 20 years later at least slow is not really much of a problem. You kinda got used to the fact if the software compiled it probably would run. It had some neat features (like constraining values, eg this variable will be between 0 and 10. Of course you'd have to deal with things when you ended up outside that range.. ). Really quite reliable.
https://learn.adacore.com/courses/intro-to-ada/chapters/strongly_typed_language.html https://learn.adacore.com/courses/intro-to-ada/chapters/stro...
They tested a lot (some of the testing was delivered with the software even, to run anytime...).
- jollybean 5y agoI interned in IT on Space Systems and looking back I'm basically amazed we ever put 'software' in space. There were some organizational attempts to control for such issues, but there were no real solutions other than a bunch of guidelines. Some of the code written for the space station was done in long, sleepless 'power-coding' binges. I thought that was 'cool' now I think it's 'insane'. I do remember learning a bit about Ada, but it's been so long, and it's probably out of the range for most things today. Even Rust is a bridge to far for most projects, I really wish there were ways to 'back off' from Rusts ultra-hard principled approach because I think what most projects need is '65% Rust', not '100%' which is the only current option.
- acomjean 5y agoRust is very low level. When I looked at Go (I haven't really learned it beside some simple things), it seemed the most Ada like of languages I've looked at. I'm not sure how safe it is, but considering some of these govt. projects were moving to c++ from Ada, it might be reliable enough. > the space station was done in long, sleepless 'power-coding' binges Yikes. I grew to appreciate Ada. We would disable the interupts on some cpus and the software had to be reliable as if the code crashed or got stuck, you were rebooting the machine.
- stouset 5y agoI would be very, very surprised to see Go in this space and not at all surprised to see Rust. Go has a garbage collector, which fundamentally introduces nondeterminism. Due to implicit interfaces, it can't enforce exhaustive typeswitching. Every pointer type is nullable, which means entire classes of runtime bugs which can't be caught at compile time. And the type system requires far too many escape hatches (resorting to `interface{}` and typeswitching) to have the kinds of type safety guarantees necessary. And lack of sum types means functions return errors and values instead of errors or values which—in my experience—has been an unending source of foot-guns in production code. OTOH, Rust has none of these drawbacks and many, many other strengths that enforce static guarantees about safety at compile time. It's not perfect, but it's an extremely worth successor to Ada and just about the only feature from Ada I wish it had was the ability to specify tighter domains on types (for instance, numeric ranges on integer types).
- jollybean 5y agoYes, there are no 'garbage collectors' in space. In fact, in my experience, there's not even any dynamic memory allocation! You allocate your memory on boot and work from it. Rust has some nice pointer advantages, but it's not specifically suited to those kinds of system, and would have some big cultural baggage to overcome. Rust has performance and perfect non-null safety in mind, not necessarily perfect logical safety. Space systems would be 'totally ok' with extra overhead that checked parameters, pointers, memory etc. before certain operations. That said, I can see Rust happening in space some day.