obviouslynotme
4 days ago
I used to work on software that still uses Fortran from the 50's and is still in maintenance and use today. IIRC, it had ~700kloc of Fortran. It may be the oldest and largest Fortran codebase still in use.
My first project there was removing all of the Hollerith from the code. Since Fortran predated strings, you had to manipulate them as integers. When you tied that to the original Fortran dynamic memory system, Dynosour, which used equivalenced arrays as pointers, it was a disaster.
It also gave me an appreciation for JavaBeanFactoryFactory. The original Fortran limited identifiers to six characters, the first of which indicated whether the variable was an integer, logical (bool), or real (float). I will take a 100 character name over ILBNK1 every single time.
GOTOs were surprisingly not a big problem, but structured code is definitely a bit easier to read, especially since it brought the practice of indentation with it.
Overall, it was a great experience but I wouldn't want to do it again, even if the work was interesting.
shakna
4 days ago
That certainly might be one of the oldest Fortran codebases still in use I've heard of, but not quite the largest. (Character came in '77 wasn't it?)
E3SM [0] is still maintained today, and somewhere around 2mil LoC of F90.
Modern Fortran has a lot of niceties that it brings to the table.
[0] https://e3sm.atlassian.net/wiki/spaces/DOC/overview | https://github.com/E3SM-Project/E3SM
user
4 days ago
kristianp
4 days ago
Removing Hollerith refers to the way strings were originally written in Fortran: https://en.wikipedia.org/wiki/Hollerith_constant
robotnikman
4 days ago
>It also gave me an appreciation for JavaBeanFactoryFactory.
My favorite is SimpleBeanFactoryAwareAspectInstanceFactory
nocman
4 days ago
WOW. I went googling, sorta hoping this was a joke, but nope, there it is:
https://docs.spring.io/spring-framework/docs/current/javadoc...
I've been away from that world for a while, but still.
At least it was the "Simple" version. LOL.
dimaaan
3 days ago
How about ReflectiveProcessorBeanFactoryInitializationAotProcessor?
kflynn5
4 days ago
Also love AbstractSingletonProxyFacgoryBean
rbanffy
4 days ago
> It also gave me an appreciation for JavaBeanFactoryFactory
If nothing else, short variable names create an incentive to keep functions small enough you can easily figure out what ILBNK1 means.
obviouslynotme
4 days ago
You would think, but that isn't what happened at all. Half the code was very nice and readable but half was giant subroutines doing complex mathematics. The largest subroutine was over 10kloc.
The best part is that the code was originally punched onto cards, so most of the early code's comments and documentation were on paper in filing cabinets, if you could find them.
rbanffy
4 days ago
> The largest subroutine was over 10kloc.
I wonder when the first FORTRAN 77 linter happened.
> The best part is that the code was originally punched onto cards, so most of the early code's comments and documentation were on paper in filing cabinets
And then to spend a card on a comment line...
bbatha
4 days ago
Besides the short names, common blocks and computed gotos were the bane of my existence maintaining primordial Fortran. My first and intern project was translating a punch card era (early 60s was the best bet) code base that had been textified and could compile in f77. Fortunately I didn’t have to really deal with any strings
GJim
4 days ago
> I used to work on software that still uses Fortran from the 50's
Gnnnnnnaaaaaaaaaaaaaa!!!!!
Online conversation about Fortran is invariably domniated by people who waffle about Fortran 77, FORTRAN and bloody punch cards!
Yet modern Fortran versions are actually rather spiffing. Not to mention they can be used with the old libraries which are utterly bombproof.
There is a reason Fortran is still used for mathmatical modelling. It's simple to use, and you can really trust it.
dboreham
4 days ago
Nuclear weapons simulation?
defrost
4 days ago
Linear Algebra libraries, geomagnetic world models, tidal models, navigation ephemerides, ...
There's a lot of classic old school FORTRAN stuff from the 1950s that still exists albeit ported forwards.
In the nuclear DOE domain its more likely to be encoded decay tables of daughter products for coarse statistical back of envelope (with 1950s computation) guesstimates.
It wasn't until much later the US decided it could stop physical testing (above / below ground detonations) and move to sufficiently scaled and detailed digital nuclear simulations.
jhallenworld
3 days ago
Fortran was the most portable language before C, so people wrote compilers in it. Using Hollerith character constants.. and without strings..
ipdashc
4 days ago
> the original Fortran dynamic memory system, Dynosour
I can't find anything about this online except for this comment. What does it refer to?
obviouslynotme
4 days ago
Here's a link to one of the papers: https://dl.acm.org/doi/10.1145/954654.954661
You call into C or assembly to reserve memory and return an out-of-bounds index to a global one member array. That index is generated from the pointer to the new memory as an offset.
You may have had trouble finding it since I misspelled DYNOSOR (no U).
ipdashc
2 days ago
Ah, makes sense. Thank you!