My 1992 view of the problems of computer programming in 1992
blog.plover.com66 points by speckx 3 days ago
66 points by speckx 3 days ago
I like this. Really paints a picture of what we are progressing towards. The tools we needed to build the tools we need to build. And the fact that it all boils down to getting the computer to do the thing we want it to do and trying to figure out what that is. Makes me hopeful for the future.
How did we get so much better at writing compilers? Was it a better understanding of how to make syntax trees with ADTs etc?
I think significant improvements are
- not writing compilers in assembly
- not requiring overlays
- knowing how previous compilers produced fast code (Web search doesn’t give me conclusive answers, but that Fortran compiler may have been the first to do loop unrolling and common subexpression elimination)
- having way more memory, CPU and disk available
- possibly: spending less time looking at optimizations. I expect IBM tried hard to make the output of their compiler to match the performance of hand-written assembly
The best link I could find is https://en.wikipedia.org/wiki/Fortran#FORTRAN_IV:
“In particular, the FORTRAN H compiler played an important role in the development of certain kinds of optimization approaches, such as allocating a specific set of registers to hold the values of variables while in a loop. Overall, the compiler had three levels of possible optimization, as Fortran compiler developers had learned early on that the ability to turn off optimization was a necessity, since it drove up compilation times considerability for program runs that often were not going to work anyway. Even with the larger amount of main memory available to it, the FORTRAN H compiler was still organized via a number of overlays.”
Writing an optimizing production ready compiler doesn't seem to be an easy task, even today. I mean you can fork a compiler or look at the code, but maintaining your own one alone doesn't seem to be realistic.
>> - not writing compilers in assembly
Sure, but you still generate the machine code, right? You still have to master the instructions and their specifics of the target CPUs.
> Sure, but you still generate the machine code, right? You still have to master the instructions and their specifics of the target CPUs.
You do, but self-hosted compilers tend to have two huge benefits:
1) they tend to be easier to reason about, being written in a high-level language
2) they exercise the code, and usually even seldom-used parts of the code, to make problems more noticeable
But once you have written in assembly, you could start to write the next version in the higher level language. The first version (written in assembly) doesn't necessarily have to produce the most optimal code, just good enough and correct. Most of the improvements can be done in the self hosted compiler (in a higher level language). So this period did not have to last many years.
Beautifully written but when the lack of a better compiler gets attributed to rational actions my brain glitched. That’s not fitting my mental model of how big corps operate at all!
Occam’s razor IBM didn’t invest in Fortran I because the internal political environment at the corporation didn’t have the incentives aligned to do so. This is completely orthogonal to whether they could have used a better compiler or not.
IBM has historically been heavily influenced by petty politics. Legacy programs like DOORS (an acquisition, but developed largely afterwards) continue to use UI patterns unlike any other Windows products, which I attribute to their legendary humiliations by Gates.
Letting pride outvote usability is an insane business decision.
The definition of "passable compiler" in 1992 must have been very different from what it is today; while third year students write interpreters and compilers, nobody would call them useful or passable.
Languages were simpler (except for certain ones, like C++ which was a beast even in 1992), and incredibly complex and magical optimizers weren’t yet a thing, never mind a feature expected of a "passable" compiler. One could still write a reasonable non-optimizing Pascal or C89 compiler in a weekend more or less, and it would be both faster to write (thanks to more expressive languages) and faster at compiling (thanks to itself being compiled by an optimizing compiler) than in 1992!
> The definition of "passable compiler" in 1992 must have been very different from what it is today;
It was.
Fortran H was faster than the fastest punchcard feeder of the time. That bottleneck is unfortunately long gone, without the same magnitude of improvement on the other side. (Physical limits, amazing optimisations, etc.)
Last time I was working with CCE, I was looking at blistering runtime speeds, but six or seven hour compiles. Huge codebase (40mil+ LoC), and the optimisations were great, but not exactly a fantastic dev lifestyle.
I agree with the overall point of the article, but I feel compelled to be _that guy_ and point out that most of IBM's systems programming involved various dialects of PL/I, not Fortran, and they went through a bunch of different iterations on those compilers and their code generators.
Was going to make a similar comment…most systems programming was in PL/S or PL/X on 370/390 architecture (regardless of the O/S). AIX and OS/2 were mostly in C. AS/400 in RPG. There were some oddball programs in APL. And thousands of internal "tools" in Rexx.
> Now a question: Since we're obviously thousands of times better at producing compilers than we were fifteen years ago, so much so that a single undergraduate can write a passable one in four months, why hasn't IBM invested millions of dollars and hundreds of programmer-years to produce a super FORTRAN I compiler that's thousands of times better than the FORTRAN H compiler?
s/FORTRAN I/Mythos/ for the 2026 version of this.
This article is fake.
Intel Fortran Compiler and IBM XL Fortran compilers are still developed and very well funded
This submission was made two days earlier than the one you linked to, it just came back through the second chance pool. Not a dupe.
Both are duplicates of each other.
One was submitted earlier. The other reached the front page earlier.
Beautifully written. Was this a note to self. If so amazing.
what do you think of it?