Q for engineers (programming language)

I am a few years retired, but large-scale environmental models in meteorology and oceanography are still in FORTRAN. As others have said, many large models in many fields were started back in the 80s or even earlier. Now they have 40 years of enhancement built into them. And FORTRAN has long since become reasonably agnostic to subroutines and I/O written in other languages. It would be a huge multi-year effort to fully convert those models to another language-and there would be little benefit. And since (almost?) all FORTRAN compilers are just translators to C the maintenance of the compiler isn’t that hard. C is certainly a well-maintained language and all it takes is figuring out how to write the new FORTRAN command in C. I will say I never hired a young programmer who was thrilled to have to learn FORTRAN when he/she started… But it is a simple language to pick up for a trained programmer.

FORTRAN III and FORTRAN IV and F77 were very different languages. Also, FORTRAN was almost the only game in town: they used it to create accounting systems, and database systems, and control systems and to do circuit analysis and draw graphs and … all stuff that is done by “applications” now.

So the original quotation was in the context of a language that was used for everything, that, like my grandfathers axe, had changed in every respect except for name.

Well, as it turned out, when every comp-sci student got unlimited access to computing resources, what they all wanted to do was design a new language. Which in practice was a lot easier for kids to do than improving or modifying somebody else’s computer language. This was the era of YACC: Yet another Compiler Compiler. Not just yet another language, but yet another way of making languages.

And so after FORTRAN IV, what we got was not just Fortran 77, It was F77 and Pascal and C and BASIC and heaps of other stuff. And the only niche really left for Fortran was applications that needed either to run faster, (the newer languages ranged from slower to much slower), or to use the FORTRAN math library (no other language got an equivalent math library until years later)

To reiterate, the brother’s joke in the OP appears to be simply about the fact that Fortran is constantly being revised, thus you have Fortran 90, Fortran 95, Fortran 2008, Fortran 2018, etc. However, this phenomenon is by no means unique to Fortran: compare C78, C90, C99, C11, C18 (et rel.)

Fortran does remain the language of choice for “high-performance computing” (think supercomputers) as evinced by its use in the most basic (and important) libraries such as BLAS and LAPACK. This could be partly due to historical influence, namely that Fortran was developed in the 1950s specifically with high-performance numerically intensive computation in mind, and a lot of effort was spent on ensuring that Fortran compilers really did output efficient and optimized code, as opposed to, say, a random C compiler. These days, of course, as long as you know what you are doing you can happily prototype your algorithms in Octave or Python or whatever and the numerical libraries will be called behind the scene.

I do know one otherwise sane individual who switched from writing his numerical code in Fortran to C++, possibly under the influence of that damned Numerical Recipes book. I keep thinking that Knuth had the right idea for his Art of Computer Programming book, which was to make up his own computer language so as not to be forced to keep switching to the fashionable language du jour every couple of years. He did see fit to change it once, though.

I’m tempted to think that no one has heard much about anything that during the early 1990s was actually in a nuclear reactor.

Started with Fortran in college (it was a requirement for all engineers), with Pascal in a few CS courses. Bookstore sold special pads of papers with the special Fortran-specific fields (columns for line numbers, comment indicator, line continuation) on them. Punched cards and everything.

Shortly after graduation I picked up a copy of K&R and taught myself C. I program only in self-defense writing code for my own use, in those days usually to post-process simulation results or to do things now done with Matlab.

Now I use VB.net, mostly for writing GUIs to control lab boards that I design to evaluate my IC designs. I keep saying that I should switch to C# or C++, but I haven’t run into anything I actually need those languages for.

We had to take Fortran as electrical engineering students in about 1999. Even 20 years ago, it was made clear to us that it wasn’t widely in use and new commercial programs were not being written. However, its value, they told us, is that it’s a good introduction tool to programming in general. With that Fortran background, we’d later go on to take additional programming classes in C, C++, VHDL, assembly.

I also had the honor of taking ‘the last’ pencil & paper drafting/mechanical drawing class at two different schools. First at community college, then again after transfer to a four year institution.

Never messed with FORTRAN, or COBAL. They are dead. If you are still using it, you have a lot of catching up to do.

There are plenty of languages that can deal with complex math. Shit, Python can do it. While I’m not an astrophysicist I am a GIS programmer. Spatial analysis is one of the most difficult things that is presented to humans. We build the mathematical formula, and ship it to a computer that can do the millions of calculations.

It’s easy. :wink:

The worst part of this is how all of their array references were 1-based instead of 0-based, using various pointer hackery to pull this off. Ugh. Even as a college freshman, ignorant that the FORTRAN version was the original, I knew something was very wrong with their coding style.

I was curious, so I jumped over to Monster.com and did keyword searches for a few computer languages. Some of these are probably irrelevant/bad matches, but for what it is worth:

FORTRAN: 461 jobs
COBOL: 1597 jobs
PL/1: 266 jobs
Java: 81984 jobs

The obscure language I am an expert in, CLIPS, did not appear to have any job postings.

So it looks like a few places are still looking for experts in these obsolete languages.

C++ had a number of new features specifically to make it closer to Fortran in speed. And the standard math library for c did eventually appear, making it possible to write example c++ programs that gave the same answer to everybody.

There must be an awful lot of zombies out there, considering COBOL is up to 2014 and Fortran to 2018. If you don’t use COBOL, then you are not a business programmer, and if you don’t use Fortran, then you are not a numerical analyst, but in each case plenty of people are.

You should tell the BLAS and LAPACK teams the good news. And try implementing some of the HPC Challenge benchmarks and LINPACK benchmarks in pure Python and see how you rank.

ETA: of course in the end it’s performance that counts and you can’t argue with results, whether they be obtained via Fortran or C++ or Python or some other means. Also things like trading a few percent performance hit in exchange for having to write 50% fewer lines of code…

Yep; I’m one of those numerical analysts DPRK mentioned. I use finite element analysis software called ANSYS, which has been around since the 1970s.

Stranger On A Train mentioned NASTRAN, another FE code of the same vintage. (ANSYS and NASTRAN are basically direct competitors in the high-end FE space). Like NASTRAN, ANSYS’s solvers are all written in FORTRAN. ANSYS also has its own language, but that’s basically FORTRAN as well. And ANSYS shares with NASTRAN punchcard-rooted terms like “input deck.”

Enipla, it’s silly to claim that “FORTRAN is dead” just because you don’t know what it’s used for. When you need to manipulate matrices as fast as possible, FORTRAN is a great choice.

People write FE codes all the time using interpreted languages like Python, but they’re typically 1-3 orders of magnitude slower than the fastest FORTRAN-based solvers. When you’re modeling things like simultaneous fluid/structural/electromagnetic interactions or nuclear weapon detonations, solutions to large models can take weeks even with FORTRAN-based solvers. A 5% speedup via solver optimization can save days of solve time. That’s one reason why FORTRAN isn’t dead yet.

Since I feel like this thread is mostly giving people a chance to talk about Fortran, it’s probably giving a pretty false sense for how much usage there might be of the language.

I’ve been working as a programmer for ~17 years and I’ve never seen a line of Fortran. I’ve worked at a dozen companies, from startups to businesses that are regularly in the headlines, globally. Now that said, I’ve never worked in the military nor on the East Coast of the US, but I suspect that even there’s likely no new Fortran development, just legacy maintenance.

Mathematical processing seems to be mostly done via R or Python (using C-based libraries that do the hard processing).

Outside of that, I’m unaware of any particular use of R. Python is used for scripting (build systems, deployment systems, etc.)

Most code written these days is probably Java.

Website code is pretty common as well, so JavaScript, Ruby, etc. are quite popular.

But it is true that a language can change drastically and continue to be called the same thing. C++ is pretty different from the original. Perl 6 is just Perl, despite being a drastically different beast (though, they took so long to develop the language that the point might be moot as it’s probably been replaced by Python/Ruby/etc.). PHP is still PHP.

Seriously?

I just mentioned that ANSYS writes their solvers in FORTRAN, and they make significant changes to those solvers once or twice a year. They spend a ton of money trying to speed up their solvers. I mean. I’ve spoken their FORTRAN developers before. They’re not imaginary.

As I said in my previous post, FORTRAN is still robust anywhere people need to perform very large linear algebra operations very quickly. Numerical simulation is a prime application.

You’ve been a programmer for 17 years and haven’t come across any FORTRAN? I’m not surprised, but how do you get from “I haven’t used it” to “I suspect no one uses it?”

I’m not a programmer, but I’ve been a mechanical engineer for 16 years and I was tweaking FORTRAN code in grad school; since then, I’ve seen tens of thousands of lines of FORTRAN. (I specialize in numerical simulation).

It’s horses for courses, isn’t it?

Fortran is a specialty language used specifically in scientific and numerical programming. A programmer working on, say, business enterprise applications, operating systems, or graphical applications would never use Fortran, but that doesn’t mean that it isn’t out there. As EdelweissPirate noted, multiple finite element codes are based on Fortran, as are many common numerical simulation codes that are in use today. The same is true for global climate circulation models such as MPAS and CESM. While a clean sheet development effort today would probably not start with Fortran, these codes have legacies going back into the ‘Seventies and ‘Eighties, and upgrading them requires at least interfacing with and often modifying Fortran code. Just because you have not personally worked on a project using Fortran does not mean that it is not still in use.

At my undergraduate university, the Fortran class (then required for all engineering and hard science majors) was taught by the Computer Science department, but was the only strictly Fortran-based class that CS offered (although we were allowed to use it in Numerical Methods), which tells you everything you need to know about the audience Fortran was intended for. It is not a clever language which appeals to computer scientists trying to implement new programming paradigms; it is a very straightforward and simple—the less charitable would say, “crude”—language designed for crunching matricies. It is an ugly language to read (though I would argue that Java is uglier) and is intended to keep the user from tripping over his or her shoelaces versus a language like C++ where the unwary are likely to unintentionally strangle themselves with them.

Java may be very popular in general (though less popular than its hayday, and hopefully to be replaced by Scala) but it is not a language I would ever use for scientific or numerically intensive programming. And whileI would probably use something like Python to do a lot of the busywork, if I’m doing heavy lifting numerically there is likely a Fortran-based library doing the actual number crunching.

Stranger

And a C library. I know of no Fortran library for bupkis in use by anyone or any language generally used on the West Coast. I have never heard of such a thing.

If Google doesn’t use it, Amazon doesn’t use it, Facebook doesn’t use it, Hadoop doesn’t use it, SSL implementations don’t use it, cryptocurrencies don’t use it, 3D shooters don’t use it, etc. it ain’t that integral to doing math nor math in bulk.

If it is still widely used on the East Coast in banking, in the military, or whatever then I grant (and said as much) that that’s outside of my scope of knowledge. But I would doubt that the West Coast model won’t take over given that the tools for massive data mining is pretty attractive to all comers.

Sorry; what on earth does your east-coast/west-coast dichotomy have to do with the price of apples?

It doesn’t. At this point, Sage Rat is just trying to “win the argument” rather than listen to evidence or reason, such as that the Fortran-based BLAS and LAPACK are still widely used in numerically-intensive scientific computing or that ISO/IEC released a new standard in 2018 for Fortran (1539:2018), nor that all major general circulation models in use today are written in Fortran, as are the major finite element packages, hydrocode simultations, et cetera. He is fixated on the fact that Fortran is not in use as a general programming language by Amazon, Google, or Facebook, which is true as far as it does (for data processing and manipulation scripting languages like Matlab or Python/NumPy/SciPy have taken over for ease of use and extensiveness of their libraries and modules for specific applications) but the statement that there is “no Fortran library for bupkis” is provably false.

Stranger

who makes a FORTRAN compiler now? I assume there could be very old ones still out there but nothing new from the last few decades.

GNU, Intel, IBM, Cray, AMD, Nvidia, NAG, etc.- take your pick. Start here for some links.