Live data from Hacker News

Ada, its design, and the language that built the languages

iqiipi.com

201–210 of 242 posts

Re: Ada, its design, and the language that built the languages

#201
post #198

However, even if Ada is amazing and very secure, it could not help avoid at least one airspace disaster, ain't so? https://en.wikipedia.org/wiki/Ariane_flight_V88

That is a strange claim, the Ariane accident was a Systems and really a Requirements flaw.

Arguably with that spec the same could have happened if they used punched cards or Haskell instead of Ada.

Re: Ada, its design, and the language that built the languages

#202

Earlier quoted context omitted.

Ada’s failure to escape its niche is overdetermined. Given the sophistication of the language and the compiler technology of the day, there was no way Ada was going to run well on 1980’s microcomputers. Intel built the i432 “mainframe on a chip” with a bunch of Ada concepts baked into the hardware for performance, and it was still as slow as a dog. And as we now know, microcomputers later ate the world, carrying alon…

I used it a bit a Uni and remember enjoying it, but can you say what was slow about it; compilation or runtime or all of it?

[deleted]

Re: Ada, its design, and the language that built the languages

#203
post #146

Earlier quoted context omitted.

> while providing the minimum of abstraction people wanted Yes, I think this is key. I wasn't around in 1985, but on every attempt to write something in Ada I've found myself fighting its standard library more than using it. Ada's stdlib is an intersection of common features found in previous century's operating systems, and anything OS-specific or any developments from the last 30 years seem to be conspicuously abse…

To be fair, the file-handling is probably the 'crustiest' part of the standard library. (To use the posix-flags, you use the Form parameter.) The best way to use Ada, IMO, is type-first: you define your problem-space in the type-system, then use that to solve your problem. -- Also, because Ada's foreign-function interface is dead easy, you could use imports to handle things in a manner more amiable to your needs/pref…

Yes, agreed on Ada.Interfaces and the FFI, it's one of the best. The only thing "missing" is auto-import of the definitions in C header files (but there be different dragons). gcc -fdump-ada-specs works fine, but it's effectively a duplication of (non-authoritative) information. That's fine if you're targeting one system, but when targeting multiple systems a single "with Interfaces.C.Syscall_H" quickly becomes a maze of alternative package bodies and accompanying conditional compilation logic.

> The best way to use Ada, IMO, is type-first: you define your problem-space in the type-system, then use that to solve your problem

I guess that goes to the core of the argument I was trying to make: not that Ada is bad, but that the low-level abstractions in Ada's stdlib are a case of premature optimization. Luckily, I take much less issue with the Numerics and Container parts of the standard library.

> To use the posix-flags, you use the Form parameter

Do you have any examples/documentation on the use of the Form parameter? According to the RM, it's a String argument so I wouldn't have expected it to support flags.

(Also, to correct myself on the signalfd issue: there is GNAT.Signals.Block_Signal to mask signals on the Interrupt_Manager thread)

Re: Ada, its design, and the language that built the languages

#204

Earlier quoted context omitted.

Ada’s failure to escape its niche is overdetermined. Given the sophistication of the language and the compiler technology of the day, there was no way Ada was going to run well on 1980’s microcomputers. Intel built the i432 “mainframe on a chip” with a bunch of Ada concepts baked into the hardware for performance, and it was still as slow as a dog. And as we now know, microcomputers later ate the world, carrying alon…

I used it a bit a Uni and remember enjoying it, but can you say what was slow about it; compilation or runtime or all of it?

compilation. run time was good, and you could turn off things like run time range checking, if you wanted to.

Re: Ada, its design, and the language that built the languages

#205
post #104

Earlier quoted context omitted.

I had to take some course that was something like "Programming Language Theory". As a result I had to look at the specifications for dozens of different programming languages. I remember looking at the features of some languages and scratching my head trying to figure out how some of this would ever be practically implemented by a compiler. Later on I found out lots of stuff is just implemented by a runtime anyways,…

I took a course exactly like that. I wonder if we went to the same school, or it’s due to curriculum standardization. The professor was particularly enthusiastic about Ada, so I had assumed the course was largely his creation.

academics loved ada when it came out. it was a very sophisticated language for it's day.

same is true today. the spec/body separation made for an actual delineation between design and implementation.

Re: Ada, its design, and the language that built the languages

#206
post #85

Earlier quoted context omitted.

GNAT has existed since at least the mid-90s, and in that time period plenty of companies used non-OSS compilers. In that era, the largest blocker for Ada was it ws viewed as having a lot of overhead for things that weren't generally seen as useful (safety guarantees). The reputation was it only mattered if you were working on military stuff, etc.

True, but at that time it was already too late. C/C++ had won. Moreover, for a very long time GNAT had been quite difficult to build, configure and coexist with other gcc-based compilers, far more difficult than building and configuring the tool chain for any other programming language. (i.e. you could fail to get a working environment, without any easy way to discover what went wrong, which never happened with any o…

the gnat people needed to make a living. there were several impediments to widespread use of gnat, like the runtime license.

not that it was their responsibility to provide a free compiler to the masses.

Re: Ada, its design, and the language that built the languages

#207
post #159

Ada was also ignored because the typical compiler cost tens of thousands of dollars. No open source or free compiler existed during the decades where popular languages could be had for free. I think that is the biggest factor of all.

The article gives another reason "A second answer is aesthetic. Ada's syntax is verbose in a way that programmers with a background in C find unpleasant. if X then Y; end if; instead of if (x) { y; }. procedure Sort (A : in out Array_Type) instead of void sort(int* a)." I think this should not be underestimated. There is a huge number of small C compilers. People write their own C compiler because they want to have o…

> I think this should not be underestimated.

You're right but it's broader than "C folks like terseness."

C is famously hard to read. Before Perl we used to joke that C is a write-only language: you can't understand what your own code means just weeks later.

Combine this with its lack of bounds checking, pointer arithmetic, and other dangerous features, and the result is a language that's macho for geeks: it's hard, it's dangerous, but it's small and it's fast.

It's a motorcycle for nerds. Ada is a tank.

Nerds get to establish dominance over lesser nerds by doing hard stuff in hard languages and making it fast. This bestows nerd street cred: geek cred.

Ada was used by contractors who needed stuff to work and money was no object.

C was used by hackers to do cool hacker stuff that was perceived to be fast and low level.

It's not low level: machine architectures haven't resembled the C abstractions since the 1970s.

https://queue.acm.org/detail.cfm?id=3212479

A modern low-level language would be some brain-bending combination of APL and Lisp with n-dimensional tensor algebra or something.

But C looks cool and hard and you will blow both feet off if you don't hold it just right.

And there are good free versions. So you can be poor and still demonstrate your machismo.

Result, a software industry requiring weekly multi-gigabyte online patches, keeping millions in work.

C makes programmers a cheap fungible commodity.

https://www.loper-os.org/?p=69

Re: Ada, its design, and the language that built the languages

#208
post #200
post #163

Earlier quoted context omitted.

I'd say that is even more so with Rust and Rust got popular in a very short amount of time.

I think this was a genuine generational change. I am pretty sure Rust would never have become popular 20 years earlier because the priorities back then were so different (that was the era of languages like Ruby and Pearl where conciseness and low verbosity were the most valued aspects).

not just the priorities, the overall skill and education of programmers.

in the 1980/1990's i was a dumb kid. problems of large systems were not in my mind. having to type begin/end instead of {} was, i thought, a valid complaint.

with experience, education, and hindsight, most of the advantages of the ada language were not understood by the masses. if ada came out today, it would have taken off just like rust.

Re: Ada, its design, and the language that built the languages

#209
post #151

Earlier quoted context omitted.

LLMs are weaponized Gell-Mann amnesia when it comes to writing for humans.

Unfortunately, you're right. It is LLM-written: https://www.pangram.com/history/8b17aa57-ce1f-4f46-85f4-4db0...

These tools are no more truthworthy than any other LLM slop-extruder.

Re: Ada, its design, and the language that built the languages

#210

The US Air Force intended to use ADA, but had to use JOVIAL instead because ADA took so long to be developed. Most people have never heard of JOVIAL but it still exists in the USAF as a legacy. I worked with JOVIAL as part of my first project as a programmer in 1981, even though we didn't even have a full JOVIAL compiler there yet (it existed elsewhere). I remember all the talk about the future being ADA but it was o…

JOVIAL. A blast from the past. At one time I was saving programmers manuals for JOVIAL compilers. (why? perhaps some mental defect or disease).

Late 1990's I was contacted via e-mail by someone that was looking for a JOVIAL manual. So, cool, I asked him which one? Hughes Aircraft? Boeing? Boeing J3B2?

Post reply on HN