Top
Best
New

Posted by rbanffy 6 hours ago

Celebrating 70 Years of Fortran(fortran-lang.org)
185 points | 81 comments
EvanAnderson 1 hour ago|
The Computer History Museum collected an oral history[0] of John Backus[1] and there's some discussion about what computing was like when Fortran was created.

I really enjoy CHM's oral histories. I'm slowly working my way thru all of them and there are some real gems in there (Ken Thompson, Dennis Ritchie, Margaret Hamilton, Gordon Moore, Fred Brooks, John Warnock, etc).

[0] https://www.youtube.com/watch?v=dDsWTyLEgbk

[1] https://en.wikipedia.org/wiki/John_Backus

obviouslynotme 2 hours 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 1 hour 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

rbanffy 56 minutes 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 47 minutes 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.

robotnikman 48 minutes ago||
>It also gave me an appreciation for JavaBeanFactoryFactory.

My favorite is SimpleBeanFactoryAwareAspectInstanceFactory

whartung 5 hours ago||
FORTRAN was a very important language for me.

Growing up on early micros, with BASIC, my father had Fortran for the TRS-80.

I took a stab at learning it, but the documentation was reference for calling the compiler, not so much learning the language. And when I found a FORTRAN book, it was quite dated and talking about things like tapes and punches and what not.

So, that effort stalled.

But, my first quarter in college, I took a FORTRAN (77) class. FORTRAN taught on the schools CDC Cyber mainframe.

This was quite a change from 8-bit PET BASIC.

But, most importantly, it was exposure to much of the same concept that an 8-bit computer has, but from a different tact.

This gave me more of a way to view things from a higher level, since I had to make them fit the two different views of how FORTRAN looked at things, how the Cyber presented things, and how BASIC and the PET were "same thing only different".

It also gave me access to a multi-user system, and all of the interesting capabilities it offers.

I remember when they put in their first lab of PCs, and how they started teaching folks Turbo Pascal on micro computers, and I just felt that the users were missing out on a bigger world. "Anyone" can access a PC or micro computer at home, but mainframe or multi user mini access, not so much. It's just a much bigger world out there, and we tend to baby duck what we first see.

Different world today, never had to use FORTRAN professionally, but I am most grateful for the experience of learning it and its environment. Very powerful medium for broader learning.

Also FORTRAN was the only notable computer thing I had "taught" to me (outside of my 20 minute introduction to BASIC by my high school teacher), pretty much everything else I self learned from books and such, even knowing the bulk of it before taking classes in school.

eichin 1 hour ago||
Heh, I used that TRS-80 (microsoft!) Fortran in high school - wrote a library for propagating error bounds and significant figures through calculations, for chemistry lab reports. (Could probably have done it in BASIC too, but I suspect I was looking for an excuse to use fortran for something :-)
rbanffy 52 minutes ago|||
> I remember when they put in their first lab of PCs, and how they started teaching folks Turbo Pascal on micro computers, and I just felt that the users were missing out on a bigger world.

I believe Alan Kay used to say the right perspective is worth 80 IQ points. We should always strive to broaden our experiences and horizons. We get a ton of wrong perspectives, but one perspective you acquired will be a perfect fit for that thing nobody else has the right experiences to figure out immediately.

otterdude 5 hours ago|||
Fortran while historically important doesn't really seem like a good choice today.

I worked with a proprietary jet engine analysis software suite written in Fortran 77 and It felt very primitive, albeit fast.

Today I feel like C is a much better choice for speed and readability.

If you really need the fastest performance I dont think Fortran gives that much of an advantage writing assembly.

jleyank 4 hours ago|||
With vector machines, Fortran yielded (much) faster code because (a) there was a whole lot of work on preprocessors for "dusty deck" code and (b) the lack of pointers and their overlap let the compilers do their stuff. C code needed a lot of #pragma's to let it know that some pointers didn't overlap and so could be optimized.

We found it best to to the front-end and I/O of the code in C and the compute in Fortran. Fastest calculations especially with those tailored libraries.

crassglassass 5 hours ago||||
Aren't most people doing this kind of work these days engineers using matlab?
mohamedkoubaa 4 hours ago|||
Fortran invented array-based programming, which arguably numpy advanced and now Julia finally perfected
Athas 3 hours ago||
Fortran had arrays since the beginning, but it wasn't really for "array-based programming" except in a trivial sense, since expressions could not produce arrays. APL is the language that invented first-class arrays, and is far more advanced at it than most of its successors, particularly including NumPy.

Modern Fortran has pretty serviceable support for array programming.

mrbonner 2 hours ago||
[dead]
dranudin 5 hours ago||
I wrote Fortran for my first job as a software developer in 2018 for simulation solvers. Still like the language! Modern fortran is very very fast and much nicer to use than C for linear algebra. So in my opinion for numerical calculations it remains the best language, even today. Happy Birthday!
kps 1 hour ago||
My second university co-op placement, which led to my first real job of 16 years, included writing a FORTRAN 77 compiler front end. It's crazy by modern standards; in some cases you have to see as far as the second-last character of a multi-line statement to determine what kind of statement it is.
kaveh808 1 hour ago||
Right out of college, I wrote my first ray tracer in Fortran in the mid-80's at the Xerox Research Centre of Canada. I remember the setup being a VAX 11/750 with a RasterTech color monitor (512x512 if memory serves). [0]

My implementation was based on David Rogers' "Procedural Elements for Computer Graphics", one of only two texts available on 3D graphics, the other being Foley and VanDam.

I remember managing my own stack in a language which didn't support recursion. I learned a lot. Good times.

[0] https://medium.com/@kaveh808/8-summer-at-xerox-in-24-bit-col...

hermitcrab 6 hours ago||
I started off programming in FORTRAN in my first job, 40 years ago. There was a lot of terrible stuff in FORTRAN from a software engineering point of view: COMMON blocks, GOTOs, ENTRY points (to enter a subroutine part way through!), but it was one of the first high level language and language designers had a lot to learn.
vegesm 4 hours ago||
At some point I was quite interested in how the very first version of FORTRAN looked like, so I wrote a FizzBuzz [1] in it.

It was a very bare-bones language, felt more like a high-level assembly macro language. One thing it did well was expressing formulas with the usual "mathematical" notations (+,-,*,/, parentheses to group operations, variables). I guess this was revolutionary at the time. But the control structures were very limited, everything was basically jumps and gotos. The IF was merely a syntactic sugar for conditional jumps. Of course, functions did not exist in the language.

[1] https://mveg.es/posts/fizzbuzz-in-fortran-1/

jmspring 4 hours ago||
An ex got me "A Fortran Coloring Book" years ago while I was working with astronomers. I was still in grad school and it gave me an excuse to learn it.
ryan_glass 6 hours ago|
In the mid 90s I used Fortran to model a distillation column in a chemical engineering plant. Here I read that it is still the go to language for nuclear engineering. I am amazed but for some reason happy about this.
More comments...