Live data from Hacker News

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

gautiersblog.blogspot.com

41–50 of 72 posts

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

#41
post #26

Earlier quoted context omitted.

I am curious, knowing that history, why do you think that it shouldn't have? I have my own thoughts that I'd be happy to share, but I don't want to spoil your opinion with them. (This goes for basically anyone who's interested in talking about it, I think it's a fascinating bit of history.)

I just feel like it emphasized safety in a way that C doesn't, while still being fairly high performance. It always seemed like a neat language.

it's not like we didn't know about safety back then, but computers were slow, memory was limited, compilers had to be small, optimization was rare, and C was screamingly fast.

At the same time, when major compiler vendors couldn't even get their Ada compilers out the door in project overruns measured in years, Mitch Kapor's 1-2-3 was written and took over the spreadsheet market (dethroning the incumbent Visicalc) and it was written in assembler, not even C, and barely had memory to spare on user machines (memory? there was barely address space left to spare). The tradeoffs were authentic, and there was zero enthusiasm for Ada among programmers or entrepreneurs looking to get products launched. The mainframe world could have been different but the personal computer software market was exploding in a way larger systems never did.

(oh and let me add, all the undefined behaviors back then were very clearly defined (perhaps over a small field of options) and extremely useful, and should have been left that way; shoot out a compiler warning or error if they get your panties in a bunch)

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

#42

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

SPARK 2012 was what made SPARK viable for a broader audience. Earlier versions of SPARK were not really properly integrated into Ada (SPARK annotations were in comments). SPARK also restricts what is expressible to what is provable within SPARK (which expands over time), this has some important consequences for concurrency and parallelism (using the "concurrency is not parallelism" distinction). So it would have been hard for Graydon Hoare to use SPARK 2012 in 2006 when he started on Rust, and the limitations around concurrency in SPARK 2012 would have been a non-starter for the objectives of Rust as adopted by Mozilla.

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

#44

Earlier quoted context omitted.

http://www.adapower.com/index.php?Command=Class&ClassID=Advo... Specifically, I think these three paragraphs near the end are critical: > I'm reading a great book now called Why People Believe Weird Things, by Micheal Shermer, in which the author explains what rational thinking is, and how skepticism is a process. Basically, people believe something because that want to, not because of any scientific arguments you ma…

"Am I out of touch? No it's the children who are wrong." This argument eats itself. It's just an accusation that people who disagree with you are irrational, and their arguments are in bad faith. It's not a valid argument because it doesn't even depend on any context or facts of the actual discussion which he's using it. It's the definition of cope. In the end, even if we can't be sure why Ada failed, it failed spect…

People who didn't like C's unreliability in the 1990s used Java. That relegated Ada to a niche where GC wasn't wanted.

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

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

>> if someone wrote an application in Ada in 2025, I would find that a bit anachronistic.

I suppose that Nvidia's use of Ada and SPARK for self-driving vehicles is anachronistic:

https://www.eenewseurope.com/en/nvidia-drives-ada-and-spark-...

https://nvidia.github.io/spark-process/process/introduction....

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

#46
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 same thing happened to Bertrand Meyer's language Eiffel.

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

#47

Earlier quoted context omitted.

This claim is false (when considered in context of the 1980s when the first Ada spec was released): > every single OS was written in C. No, they weren't. In fact, some were written in Algol-like languages such as Pascal.

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…

> They basically immediately regretted using pascal and started a march towards C and basically gave up on pascal before the powerpc.

Nonsense. MPW Pascal and Think Pascal were well supported developer tools, and a lot of third-party developer code was written in them during the 80's. Photoshop (1987) was originally written in Pascal! Apple's Pascal dialect had object extensions that made OOP simpler than with C or standard Pascal.

Pascal started to leave the building circa 1991, when C++ became viable for OOP. Even then, Metrowerks CodeWarrior supported native Pascal compilation for PowerPC in 1993/4.

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

#48
post #39
post #37

Earlier quoted context omitted.

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

I think the bias noose has tightened a lot over the years, so we don't avail ourselves to experiement like we used to - no chance for critical mass now that the profession has become so commoditized. It was wide open when I first started and devs were using all kinds of toolchains. The most money I've ever made selling applications (in today $) was from a TP (DOS) then later Delphi (Windows) codebase. Way back in 1991 I remember having a cigar with a client in SF and the dude wrote me a 70k check right there on the bar. What a huge thrill for me that was. Wild west of price and value discovery, which has totally disappeared.

One thing I do believe: the quality of software from MSFT has gone down, in part because their business model has gone from providing products to monetizing the users. Their products are just stagnant honeypots to collect data. This is opening a door for the small time dev to try new things, maybe with unpopular toolchains. I've got something that would be great for highlighting Ada's mission critical rep. Price and value discovery aren't dead (yet).

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

#49

Earlier quoted context omitted.

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…

fred books, head of ibm 360 mainframe hw n os proj, wrote famous book - mythical man month.

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

#50
post #49

Earlier quoted context omitted.

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

fred books, head of ibm 360 mainframe hw n os proj, wrote famous book - mythical man month.

Yes, that's what I was alluding to there. Apparently the LM F-35 managers had not read it.
Post reply on HN