by wireprotocol · 7y ago · 0 comments
Both seem to have good ecosystems, but quite different. Ada has more high-assurance tooling and practices. Rust has more in terms of packaging and general-purpose high level libraries.
With Ada, it's pretty hard to shake the feeling that it's not as welcoming. Either you are building a spacecraft, or "what are you doing here?". Not that anyone actually says that, and in my limited experience playing with the language, everyone seemed nice. It's just a feeling that's hard to escape. I wish it weren't so, because I think Ada has a lot going for it and it could be good in more donains.
One kind of cool thing is that it's designed to get by without so many heap allocations, and it does some interesting things to allow/encourage more stack allocations. It also has more sophisticated runtime checks, like contracts, that are kind of between a unit test and a compile-time check.
Rust is great at managing complexity. I keep holding out hope that Ada can somehow give us some simplicity back while still making useful software.
There's significantly more attention provided to things like Wasm than there is to things like embedded use cases for example.
The two languages, ecosystems, and communities seem to have largely non-overlapping objectives despite having overlapping technical capabilities.
I keep thinking servers should be written a bit more like embedded thingies. (Though I suspect the actual trend is in the other direction).
Both kinds of software deeply interested an asynchrony and concurrency (though not necessarily parallelism). And both also tend to talk over networks to other gadgets as part of a complex system. And since my job often revolves around putting out fires when severs OOM, I'd also like to see a lot less malloc().
It would be nice if software could place hard upper limits on how many resources (including RAM) it takes to serve a request and then reject requests early. With real-world languages and frameworks, we can only do very primitive approximations to this. But a framework written from the bottom-up with a malloc-is-evil mentality () might be able to do it.
Layered on top of that we can also ensure that if at runtime your device memory configuration is sufficiently different from what your assumptions were at compile-time, then we don't allow the device to boot so that you don't end up in a dangerous resource exhaustion situation by accident.
We use this for no_std embedded shaped use cases, but you could also use this library and programming model to create a special heap in your normal programs which have statically tracked allocations to create some region of your program context that you want to have assurances like that.
We have 3-4 things kind of in that vein in our pipeline to open source, and I think that's number 3.
Rust is a language developed by its users. The reason less things happen in Rust embedded domain, is because less companies pay people to work on embedded Rust than they do on WASM rust.
Things might be better, but last time I checked rust's compiler was a lot slower than C and the binaries were several times bigger. That last one is a big deal for embedded.
In terms of real impact on developers I never felt it was dramatic. The rust language support in editors is so good that you will catch most errors before compiling. So once everything is dealt with you usually compile and it just works.
Binary size is also one of these areas they are dealing with atm.
"Code is read more often than it is written". Reading Ada is so unambigous, and clear. If you mean if then, you have the keyword then, when you want to say procedure you say procedure and you can read that. Rust? fn, because is it fun, or functor, so fuck you.
Cd is rd m thn it is wrtn, it is esr to rd function thn to prse fn rclnt function and cont rdn.
The problem is that "fn" is optimizing the WRONG things: not only is your code going to be read more than it is ever written, but this abbreviated form is actively hostile towards domain-level subject-matter experts that you may want to audit or verify your code. Now, instead of him jumping into code that reads like English (Ada), now he has to 'decode' Rust BEFORE AND DURING his evaluation of the code, distracting him from his purpose.
Yes, I do want to read out what I type and possible speak it to collegues without sounding like I have a fn seizure.
Do people think part of missile software includes “npm install wordpad”?
EDIT: on a second read, it's not clear whether the article is saying we should use Ada the next time we are building a rocket, or the next time we are building an OS.
The biggest challenge is to prove that it works. The space software community historically is very conservative and risk-averse, and mostly for good reason. As Kubos (and hopefully others) get more flight heritage with Rust on the flight segment, it'll be a much easier sell.
That's the biggest obstacle I think. Someone will have to break the seal and establish that "Rust in Space" actually succeeds consistently, then larger "trad space" organizations will follow.