Live data from Hacker News

Writing a competitive BZip2 encoder in Ada from scratch in a few days (2024)

gautiersblog.blogspot.com

51–60 of 72 posts

Re: Writing a competitive BZip2 encoder in Ada from scratch in a few days (2024)

#51
post #14

Earlier quoted context omitted.

For my safety-critical automation software for a machine that will operate around people and overhead, I’m choosing Ada/SPARK2014. Its decades-long track record in high-integrity domains like aerospace, defense, and medical systems ensures reliability for applications where human safety is paramount. SPARK2014’s formal verification tools mathematically prove the absence of runtime errors, aligning with standards like…

Incidentally, Rust does have an ISO 26262 qualified compiler, though DO-178C isn't here just yet.

That's for automotive. We're shooting for a bunch of various relevant standards. There is no formal language spec. Who did that compiler? AdaCore's been around for a long time, so I am quick to use theirs if I were to chose Rust. I'm also following the Ironclad kernel project with its complementary OS called Gloire. Ada/SPARK for both with partial formal verification progress.

Re: Writing a competitive BZip2 encoder in Ada from scratch in a few days (2024)

#52
post #51

Earlier quoted context omitted.

Incidentally, Rust does have an ISO 26262 qualified compiler, though DO-178C isn't here just yet.

That's for automotive. We're shooting for a bunch of various relevant standards. There is no formal language spec. Who did that compiler? AdaCore's been around for a long time, so I am quick to use theirs if I were to chose Rust. I'm also following the Ironclad kernel project with its complementary OS called Gloire. Ada/SPARK for both with partial formal verification progress.

Automotive is the first industry that’s really taking up Ferrocene! They’re adding more stuff as more industries have demand for it.

Ferrous and AdaCore were originally collaborating, but then they parted ways. In my understanding they’re both largely the upstream codebase, I know that the Ferrous folks religiously upstream almost everything, no clue if AdaCore does as well.

Re: Writing a competitive BZip2 encoder in Ada from scratch in a few days (2024)

#53

Why did Mozilla reinvent the wheel with Rust when we had Ada/SPARK?

Glibly, because they’re not the same language.

I don’t think I’ve ever heard Graydon comment on Ada specifically, but early Rust was very different than today’s Rust. Funny enough, I’d argue that early Rust was much closer to Ada than the Rust we ended up with.

One thing that makes Ada and current Rust different is that Ada does a lot more checks at runtime than rust does, and is more okay with features that have more of a runtime than Rust is.

Another is that Ada doesn’t guarantee memory safety at compile time, or at least, it did not at that time. I believe that with the new Spark features that are inspired by Rust that recently landed may bring parity here, but I haven’t had time to investigate those yet.

But really, they're just very different languages from each other. There's no reason they can't coexist.

Re: Writing a competitive BZip2 encoder in Ada from scratch in a few days (2024)

#54
post #24
post #17

Earlier quoted context omitted.

Failed what? In its domain, it succeeded in its goals: a high reliability platform for aerospace, defense, and other mission critical domains. It was mandated by the US DoD for all software in the nineties and used in Airbus avionics and aboard the ISS, etc. Its syntax and concepts were considered solid and so was selected as the basis of the VHDL hardware description language, also successful in its domain.

> was mandated by the US DoD Vanishingly little was written in Ada as waivers were too easy to get.

As an intern I worked in Ada at a defense contractor, it seemed matter of fact for everyone around me who had worked in the field for decades. I'm not sure "vanishingly" is the correct adjective here.

Re: Writing a competitive BZip2 encoder in Ada from scratch in a few days (2024)

#55
post #5

I know the history of why Ada failed, but it always seemed like such a neat language that shouldn't have failed. It seemed like it should have been the standard for a lot of desktop applications for the 90's and 2000's.

It was held back by all of the compilers being commercial for a long time. Also the main advantage it has over C is safety, and nobody really took that seriously until recently (and it doesn't really have an answer for use-after-free which is a huge class of bugs).

The GNU Ada compiler has been out for decades and was integrated into GCC by 2002.

Re: Writing a competitive BZip2 encoder in Ada from scratch in a few days (2024)

#56
post #46

Earlier quoted context omitted.

It was held back by all of the compilers being commercial for a long time. Also the main advantage it has over C is safety, and nobody really took that seriously until recently (and it doesn't really have an answer for use-after-free which is a huge class of bugs).

The same thing happened to Bertrand Meyer's language Eiffel.

Two separate classes in my University course was entirely done in Eiffel, I came out with the view it ran businesses everywhere and then never heard it again in the 25 years between then, and reading your comment above.

Re: Writing a competitive BZip2 encoder in Ada from scratch in a few days (2024)

#57
post #46

Earlier quoted context omitted.

The same thing happened to Bertrand Meyer's language Eiffel.

Two separate classes in my University course was entirely done in Eiffel, I came out with the view it ran businesses everywhere and then never heard it again in the 25 years between then, and reading your comment above.

My university's intro course was in Eiffel. For my year they switched to java

Re: Writing a competitive BZip2 encoder in Ada from scratch in a few days (2024)

#58
post #46

Earlier quoted context omitted.

The same thing happened to Bertrand Meyer's language Eiffel.

Two separate classes in my University course was entirely done in Eiffel, I came out with the view it ran businesses everywhere and then never heard it again in the 25 years between then, and reading your comment above.

My intro course at university was also done in Eiffel, this was at the ANU in early 2000's

Re: Writing a competitive BZip2 encoder in Ada from scratch in a few days (2024)

#59
post #17
post #5

I know the history of why Ada failed, but it always seemed like such a neat language that shouldn't have failed. It seemed like it should have been the standard for a lot of desktop applications for the 90's and 2000's.

Failed what? In its domain, it succeeded in its goals: a high reliability platform for aerospace, defense, and other mission critical domains. It was mandated by the US DoD for all software in the nineties and used in Airbus avionics and aboard the ISS, etc. Its syntax and concepts were considered solid and so was selected as the basis of the VHDL hardware description language, also successful in its domain.

I would say that it failed in its primary goal - to be a single language used for government software.

That doesn't say anything about the quality of the language, just that the goal for it was unrealistic. If the DoD had pressured Microsoft to support Ada in the same way they supported C++, Visual Basic, and vbscript, they might have been able to pull it off. But with the COTS directive and the utter lack of Ada support from commercial vendors, it was just never going to happen.

Re: Writing a competitive BZip2 encoder in Ada from scratch in a few days (2024)

#60
post #5

I know the history of why Ada failed, but it always seemed like such a neat language that shouldn't have failed. It seemed like it should have been the standard for a lot of desktop applications for the 90's and 2000's.

As used in zillions of aircraft, defense, and aerospace systems, it succeeded wildly. It's not Javascript because not every language needs to serve all stakeholders. Tools in the toolbox, not all-or-nothing religious factions that only "matter" if they ride a hype popularity train. There are many critical technologies all around that are little known.
Post reply on HN