Live data from Hacker News

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

gautiersblog.blogspot.com

31–40 of 72 posts

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

#31

Earlier quoted context omitted.

The only exception I can think of is early versions of mac os, which was still primarily assembly. Even then i recall people went out of their way to use C despite needing pascal calling convention for system calls. They basically immediately regretted using pascal and started a march towards C and basically gave up on pascal before the powerpc. So Pascal had one mainstream OS for about 10 years, most of which time i…

> which os was written in Pascal? most were written in assembly in that era, you are talking about some obscure research or toy. Your first claim: Every OS was written in C. Your new claim: Most were written in assembly. Pick a position. If most were written in assembly then it would not have had any impact on the adoption of Ada so why make the original claim? I would respond to your question but you substantially e…

[deleted]

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

#32
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.

Doesn't Rust lack a serious language specification? How can compilers be certified without a definitive record of how the language is meant to behave?

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

#33
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 failed because the C family is far superior - in mindshare and commodity dev experience. Ada may end up with a win to some degree if it plays to a narrative that all software needs to be mission-critical, no matter what the domain. Maybe in degrees, but that's actually true these days.

I did some consulting at a major US car manufacturer, and helped with a coding seminar, mostly in java. A fair chunk of those developers struggled with a fizzbuzz exercise. All I can say is this: don't leave your baby in the back seat of an autonomous car just to get out and recharge unless you have consequential trust reciprocation with the manufacturer tantamount to shutting them down if anything tragic happened. Of course, even that price is too low.

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

#34
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.

The popularity contest.

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

#35
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.

> I know the history of why Ada failed, Do you have sources you could point to? I once read that it's a great language mired by a designed by committee ecosystem. I really liked the language when I tinkered with it a bunch around 2010 but moved on after work pushed me to other languages like C# for GUI stuff. First language I used with simple built in concurrency.

> mired by a designed by committee ecosystem

Can you point to a production language today that doesn't have a committee leading it's development?

C, C++, Rust, Javascript, Python, etc. All have committees leading their development. The only difference with Ada was that, for a long time, that committee was in the DoD (which has plenty of fine engineers, given it's practical achievements) instead of ISO/ANSI. And instead of being focused on general purpose, they had a clear domain they prioritized. That's different now, but it's hard to erase a few decades of heritage.

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

#36
post #24

Earlier quoted context omitted.

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

Every former DoD engineer I've spoken to has worked pretty extensively in Ada. From the Phalanx, to the F-15/F-16. C++ didn't start becoming popular in those domains until the mid-00s. The first fighter jet to use it extensively was the the F-35[1], which many of the engineers attribute to it's early issues[2]; not because C++ was bad, but because so much well-tested and hardened code had to be replaced. So, wherever…

> because so much well-tested and hardened code had to be replaced.

Not just software, entire systems. They built their own datalinks instead of aiming for compatibility with existing datalinks or pushing those existing datalinks to a newer version that could meet their needs.

In principle, that should have been their first (flight test ready) version. Just get the planes talking to an existing datalink network even if they had some next gen datalink target. But this is also a classic DOD project management problem. They aim for the full system instead of staging out a series of iterative versions.

And LM, in their infinite wisdom, hired more developers when they were late and ran their development in shifts. Because everyone knows the best way to get a late project back on track is to hire more people...

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

#37
post #27
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.

Failed in the sense that it doesn't appear to be used anymore. C and C++ are still used pretty frequently. I wouldn't say that they failed, but if someone wrote an application in Ada in 2025, I would find that a bit anachronistic.

Forgive, but that smells of youth and recency bias. How do you judge lisp and k/qdb? Is C# the best language? Is Nim anachronistic? How would you write a desktop app using your exact same codebase on Win, Linux, Mac? That would be Free Pascal. Or maybe the desktop is now anachronistic, even though it still produces a richer UX.

Many languages have their great qualities. Whether or not they're outdated is a determination full of biases. Measure the language choice against resources and potential revenue. I'd be happy to write an app in Ada to proclaim its advantages as a sales pitch.

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

#38

Earlier quoted context omitted.

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

Doesn't Rust lack a serious language specification? How can compilers be certified without a definitive record of how the language is meant to behave?

A language specification is not required to be qualified. The behavior of the compiler needs to be described.

https://rust-lang.github.io/fls/

This is effectively a fork of the Rust Reference, made by Ferrous, and laid out in a way that allowed the compiler to be qualified. It now lives at this URL, because it's being adopted by upstream as the spec.

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

#39
post #37
post #27

Earlier quoted context omitted.

Failed in the sense that it doesn't appear to be used anymore. C and C++ are still used pretty frequently. I wouldn't say that they failed, but if someone wrote an application in Ada in 2025, I would find that a bit anachronistic.

Forgive, but that smells of youth and recency bias. How do you judge lisp and k/qdb? Is C# the best language? Is Nim anachronistic? How would you write a desktop app using your exact same codebase on Win, Linux, Mac? That would be Free Pascal. Or maybe the desktop is now anachronistic, even though it still produces a richer UX. Many languages have their great qualities. Whether or not they're outdated is a determinat…

Maybe "failed" is a strong word.

I just don't see Ada used a lot anymore. This isn't a value judgement on it being "good" or "bad", lots of bad languages (like PHP) end up getting very popular, and lots of cool languages (like Idris) kind of languish in obscurity. Don't mistake me saying popularity is proper metric for how "good" something is.

When I say "anachronistic", I don't mean it as a bad thing either, just that it's not used a lot anymore. I've literally never heard of anyone writing an Ada application in the last twenty years outside blogs on HN.

Post reply on HN