Live data from Hacker News

Why Ada Is the Language You Want to Be Programming Your Systems With

hackaday.com

171–180 of 330 posts

Re: Why Ada Is the Language You Want to Be Programming Your Systems With

#171

Earlier quoted context omitted.

ALGOL 60. https://en.wikipedia.org/wiki/Edsger_W._Dijkstra#Compiler_co... : ”Dijkstra was known to be a fan of ALGOL 60, and worked on the team that implemented the first compiler for that language. He was closely involved in the ALGOL 60 development, realisation and popularisation.” Also: Haskell and pascal over C++ and Java ( https://www.cs.utexas.edu/users/EWD/transcriptions/OtherDocs... )

…for CS instruction. I've never come across any indication that Dijkstra wrote actual code (in the sense of something executing on a computer) after 1970 or so. The algorithms in the EWD notes are all written in ALGOL style pseudocode. Dijkstra was the CS equivalent of the Patent Law concept of a "Non-Practicing Entity", which gave him great liberty to troll all programming languages without exposing his own choices…

This nails it. Dijkstra sort of hated computers; he always hand-drew overhead projector transparencies for his lectures. He's also famous for saying we should call our field "Computing Science" because "Computer science is no more about computers than astronomy is about telescopes."

Re: Why Ada Is the Language You Want to Be Programming Your Systems With

#172

There is some overlap in the use cases between Ada-in-the-mainstream (which seems to be what the article is suggesting) and Rust. The existence of Rust will make it even harder for Ada to break out of its existing domains. 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…

Interesting, I am highly interested in convincing NASA to start using Rust for their embedded systems they use on ISS experiments and such. I would love to get more widespread adoption at the embedded system level.

Re: Why Ada Is the Language You Want to Be Programming Your Systems With

#173
post #116

Earlier quoted context omitted.

> - Easy to implement the language specification. All features should be easy to understand. I'm not sure this is at all applicable to rust. Perhaps once there are more than the one, quickly mutating, implementation, we can say that it's easy to implement the specification. > - Reliability. The language should aid the design and development of reliable programs. This one feels a touch questionable, given the built-in…

> given the built-in "succeed or die" macros that simplify code at the cost of reliability. I would consider a program that dies early to be more reliable (but less robust) than one that just soldiers on, probably doing wrong (and possibly dangerous) things. Regardless, it is the programmers choice whether to call panic!() or to try to handle an error gracefully and continue.

It depends on the situation. Ariane 5 was destroyed because its inertial reference system (written in Ada) died early instead of soldiering on, and as it turns out, it would have been fine if it had soldiered on.

Really, there's a certain amount of software, like the Ariane 5 SRI, for which the only acceptable outcome is not to have the error in the first place — there's no acceptable way to handle it once it happens. That software is very expensive to write, so you want to keep it to a minimum in the overall system, but sometimes you cannot avoid having some of it.

Re: Why Ada Is the Language You Want to Be Programming Your Systems With

#174

Earlier quoted context omitted.

What did Dijkatra like? Pascal?

He was teaching at UT Austin and Pascal was the CS department's pedagogical language of choice back then, so I presume the answer was yes. Or at least I never heard him say he hated it.

My impression of Ada via undergraduate exposure at Embry-Riddle was that it was like an industrial strength Pascal. I never thought later on that I needed Ada, but then I didn't go on to work with avionics or anything like that. And I always thought that Pascal+extensions was a pretty good way to develop applications and was disappointed when the Macintosh moved towards C and C++. I learned to write GUI applications with THINK Pascal, before Java existed.

In the version of Ada we had, it was DOS based, but I found out that you could use the interrupt API, allowing VGA graphics.

Re: Why Ada Is the Language You Want to Be Programming Your Systems With

#175

Earlier quoted context omitted.

Many of the 'programmers' of those days lacked the sophistication and education to appreciate Ada. Just the mojo required to print an integer (having to instantiate a generic) was considered complicated Ada was also very slow to compile, on the order of 10 times slower than Jovial. (my experiences) Avionics systems back then were tiny. Jovial usually ran on a 16 bit processor. Ada enabled a certain maturity and corre…

> Just the mojo required to print an integer (having to instantiate a generic) was considered complicated That sounds complicated to me, in 2019 with 25 years of C++ experience. (And of course C++ error message sprouting mysterious stdlib templates also seems complicated to me).

It isn't more complicated than printf, which is also close to being a generic.

    PutLine("The number is " & num);

    printf("The number is %zu\n", num);

Re: Why Ada Is the Language You Want to Be Programming Your Systems With

#176

Earlier quoted context omitted.

It's interesting to see how Verilog & C both took over there in the industry. There's probably a chasm where the extra typedness isn't worth the velocity cost at the beginning of a project and when it's valuable the weight of switching can be too great. I think the middle ground is a language where you can relax some of your rules but then as pieces mature you can start enforcing stricter typing rules. I observe the…

I tend to disagree: strong typing is very valuable in the hardware design space - it's just that you couldn't convince hardware devs of this. If they had exposure to a programming language it was C (and possibly some assembly language) so they wanted something closer to what they were familiar with. When I worked in EDA I was given a project to get rid of linting errors in our generated HDL code. We generated both VH…

It's very valuable but not worth acquiring for most developers. I write relatively lot of C, I don't enjoy the familiarity, it just gets the job done for me in 90% less time because the tooling is there, the IDE is there, the documentation and support is good, the libraries are there - it matters a lot in what languages I find tolerable I've noticed. I like PLPGSQL, it's also has all that I've listed, I didn't like Ada and it doesn't have what I listed, because I had to "invent the wheel" so much. In the end, why spend 50-90 % more time to get that last x% of some foggy benefit?

Re: Why Ada Is the Language You Want to Be Programming Your Systems With

#177
post #172

There is some overlap in the use cases between Ada-in-the-mainstream (which seems to be what the article is suggesting) and Rust. The existence of Rust will make it even harder for Ada to break out of its existing domains. 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…

Interesting, I am highly interested in convincing NASA to start using Rust for their embedded systems they use on ISS experiments and such. I would love to get more widespread adoption at the embedded system level.

We came to the same conclusion at Kubos, and moved from C to Rust for most of our flight segment/application code (embedded Linux on the satellite OBC).

https://www.kubos.com/

Re: Why Ada Is the Language You Want to Be Programming Your Systems With

#178
post #172

Earlier quoted context omitted.

Interesting, I am highly interested in convincing NASA to start using Rust for their embedded systems they use on ISS experiments and such. I would love to get more widespread adoption at the embedded system level.

We came to the same conclusion at Kubos, and moved from C to Rust for most of our flight segment/application code (embedded Linux on the satellite OBC). https://www.kubos.com/

Awesome, do you think it’s a hard sell for old school government contractors? I am passionate to write embedded systems with Rust, but I worry it will be too hard of sale to d school contractors with stacks already written C, and C developers on staff.

Re: Why Ada Is the Language You Want to Be Programming Your Systems With

#179

Earlier quoted context omitted.

I understand what you're getting at here I tbink, but one of the ecosystem challenges we run into is that while Rust is abstractly a fantastic choice for the domain of systems development that would often be served by Ada (in fact we think it's a lot better in some respects because we can do more statically ahead of time, that Ada does dynamically at runtime, by abusing the Rust type system and borrow-checker), the R…

> 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 t…

We have a crate internally that uses type-level programming to do statically tracked memory allocation (technically the method can be used for other kinds of resource management too), so that we can have compile-time guarantees that allocations will always succeed and we'll never allow memory to be allocated from inappropriate regions (e.g. mapped registers).

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.

Re: Why Ada Is the Language You Want to Be Programming Your Systems With

#180
post #165

Earlier quoted context omitted.

Wasn't the ill fated code itself written in Ada? That is essentially all that goes on boeing aircraft. I don't think a lack of software engineering rigor is to blame for the design mistake.

Possibly; I don't work for Boeing or their subcontractor. But I was getting at more of the general sense that as aircraft become more and more computerized we need more rigour and standardization of the sort that gave rise to Ada, and less of the aerospace equivalent of hacking things together in perl.

[deleted]
Post reply on HN