I love this absolute example of old systems interfering with new systems, rewriting old systems.
My old man started his tech work on hot rods, then mechanical typewriters, calculators, eventually continuing into mainframe electronics and nearly followed all the transitions up to today’s AI.
The number of times I’ve scratched my head at a problem and he had a clear understanding of where the logic broke… based on a historical decision that could not physically be undone.
If you try profiling almost any program that does linear algebra (something that uses Numpy, for instance), you will see a lot of calls and CPU time in functions with names like DGETRF or SGESVX. These obscure names stand for stuff like Single-precision GEneral matrix Solve Vector eXtended; i.e., solve a linear system of equations with a full, dense matrix. Why are they so difficult to parse? Couldn't they come up with a friendlier name?
They come from Lapack, the standard linear algebra foundation library, which is written in Fortran 77. That library was first written in 1992, when the Fortran 90 standard was still new and not supported everywhere, so they stuck with the earlier version. Lapack has become the standard library for dense non-parallel linear algebra; it is still maintained and updated, but the basic math algorithms haven't changed much, so there was no need to replace it entirely. Today there are also processor-specific libraries like MKL or Apple Accelerate, but they still all follow the same Lapack API.
When Fortran-77 was standardized, they decided to keep function names at most 6 letter long, to "ensure portability". I.e., they wanted to support certain compilers and architectures that were already considered old in 1977.
TL;DR: if you can't read easily those flame graphs today, it's because of backward compatibility with certain mainframes that probably date back to the late 1960s.
In particular, 6-letter long function names may have been convenient on mainframes that used 6-bit alphanumerics in 36-bit words, the 36-bits having been backward compatible with 10-decimal-digit electromechanical calculators.
EDIT: I had thought 10 digits of precision were required for certain calculations, but the WP article points out that they may have just corresponded to the operators having had 10 digits on 2 hands, in which case we're being backwards compatible with Hox genes, specifically Hoxd, and tetrapod pentadactyly is backwards compatible to hundreds of millions of years:
Had more to do with punch cards and flexowriter tapes and octal, which predates large word sizes or even mainframes. Note the following from the MIDAS macro assembler [0]
Fortran predates this and was a different lineage than IBM, but not how six char symbols were a request
> The MACRO language had been used on the TX-0 for some three years previous to the writing of MIDAS. Hence, MIDAS incorporates
most, of the features which have been requested by users of MACRO, such as more flexible macro Instructions, six character symbols and relocation.
Note that when porting b to the pdp-11, which was ascii vs the earlier FIODEC/flexowriter 6 bit paper tapes is why c case statements fall through, they used it to allow lower case commands in ed as an example.
Flexowriters are 1940s iirc, and TX-0 through the early pdps were octal so it makes sense to grow in multiples of the 3.3 bit lines of paper tape
Also note you can count to 12 on one hand and 60 with the other. That is why the ancient Sumerians used it. Base 10 was added to Roman abacus but they still kept the uncia (12) for some functions.
IIRC that wasn’t droop until the renaissance when they read Archimedes attempt to calculate the number of grains of sand needed to fill the universe with grains of sand, he used decimal and they asserted it was superior.
At my first job circa 1990, our codebase was constrained to 6-character function names in the core libraries, which had to run on many platforms including mainframes. If I recall correctly, you could have longer names, but only the first 6 characters were significant to the linker.
Never thought about why that might be other than "yeah, memory is expensive".
That is correct, I did not mention Linpack. It had different function names than Lapack though (while the naming scheme was similar, and still constrained to 6 letters); for instance DGETRF was named DGEFA in Linpack. [1]
Yes. Lapack was the successor to linpack and I seem to recall some of the linpack routines going back much further than the eighties. MATLAB (which existed before the commercial release in 1984) was built on linpack.
Cue obligatory reference to the programmer archaeologists in Vernor Vinge's novel A Deepness in the Sky. Their job, on starships, is to safely bodge the multiple strata of software that have accreted since Mankind left Earth, centuries before.
Have seen this time and time again during my career.
Most of the time, it's something you could never conceivably figure out without having been there at the time. But after 10 seconds on the phone or a brief email from someone who was, it makes complete sense.
IBM is the undisputed king of backward compatibility. There is code running on mainframes right now that is going on 50 years old. Microsoft is a close #2 with windows.
I'd probably consider using IBM if it wasn't so goddamn weird and expensive. I suppose all that backward compatibility does have its downsides. Windows feels a bit weird in some places too, but at the same time it didn't start out life as a typewriter.
Strangely, this made me think about the recurrent laryngeal nerve in giraffes.
The nerve takes a 15-foot detour down the long neck and loops under the aorta near the heart before it travels back up because evolution needed to stay backwards compatible with previous iterations of protogiraffes as environmental selection pressure lengthened the neck.
I love this fact. If you're a fish with no neck, the route it takes is the most direct and obvious. But as evolution gradually lengthened necks the route remained the same!
For those who don’t get it: It’s referring to the ink soaked ribbon that would print characters on a piece of paper, similar to a typewriter. This is a preceding technology to digital consoles. Also why most programming languages refer to outputting a string to stdout as “print”.
It's almost the same reason Windows still uses CR LF characters for new lines.
Not one character, but two: Carriage Return and Line Feed. Literally the action of moving the printer back to the beginning of the line and then the action of making the sheet of paper go "up" by one line.
That's why those characters exist, but not why Windows uses both: Unix already used LF only, and the Apple II (and Mac, for a while) used only CR. The choice to use both was, as far as I know, Gary Kildall's, in CP/M, and various DOSes including MS-DOS inherited that decision without much examination.
It was a typewriter ribbon, and the type of terminal it was designed to be used with was a typewriter with communications circuitry, called a "teletypewriter". This is why the controlling terminal of Unix CLI/TUI processes is called a tty or pty (pseudo-tty).
Score a GE TermiNet 30 or similar teletypewriting terminal off eBay, hook it to your PC via USB-to-RS232, and Bob's your uncle. You can even do a getty to it, log in, and run shell commands: https://www.youtube.com/watch?v=-Ul-f3hPJQM
My old man started his tech work on hot rods, then mechanical typewriters, calculators, eventually continuing into mainframe electronics and nearly followed all the transitions up to today’s AI.
The number of times I’ve scratched my head at a problem and he had a clear understanding of where the logic broke… based on a historical decision that could not physically be undone.
reply