Especially because of the effort it would take to get this working on a "dead" language. Like who are you? How did you decide to work on this for the pure joy of it? Why not Cobol? Why a web framework?
One day I wondered if there was a Fortran server, did some Googling, and found a tutorial from 8-10 years ago (http://flibs.sourceforge.net/fortran-fastcgi-nginx.html). I started out updating the tutorial, requesting some missing files and missing instructions from the authors (almost every Fortran info on the web assumes that you already know how to compile and run your program). Once I was halfway down the rabbit hole, updating this tutorial, it felt right to keep it going
Yours is a nice improvement. If you want to add to the prank, then maybe do a modern-style app or clone of popular one that would definitely delight people. Relatively small app to not take too much time. Offer them a link to the source in case they want to check it out. Let them find out it's Fortran on thdir own. Observe the reactions while recording the best ones. ;)
$ telnet em.prirun.com 8001
Connected to em.prirun.com.
Escape character is '^]'.
Welcome to the Prime Computer 50-series emulator, running Primos rev 19.2!
Login as user guest, password pr1me
After logging in, use the Prime HELP command for assistance.
You are welcome to create a directory under GUEST for your files.
The line erase character is ?
There are other Primos revs running on ports 8001-8007
Prime manuals at: http://yagi.h-net.msu.edu/prime_manuals/prirun_scans
To report bugs or contact the author, send email to email@example.com
Enjoy your time travels! -Jim Wilcoxson aka JIMMY
GUEST (user 2) logged in Wednesday, 22 Jun 16 16:39:52.
Welcome to PRIMOS version 19.2.
Last login Sunday, 12 Jun 16 16:37:20.
The FOR loop become a hint that tells the compiler it can take extraordinary measures on the nested instructions.
You could do the same thing in C if you use compiler directives, or in other languages like Pascal, but there's a critical mass of Fortran code, so that's where vendors put the effort.
If memory serves, they had a trick to create simulated pointers, by declaring a one element array somewhere in memory, and then indexing way outside of its bounds in order to point into other areas of memory.
I don't remember the details, but I seem to remember there was a statement ("EQUIVALENCE"?) that facilitated this magic.
IF (QQQ .LT. RIX70) THEN
CALL IXNARF( I, J, R1, R7, XL23 )
oh and there was like three comments in the whole several thousand lines, including my favorite at the top of one of the main loops:
C CHUGGA CHUGGA CHUGGA
Then there was the proposal for a Fortran COME FROM statement.
I laughed way harder at this that it warranted.
It is impossible inside the loop, even in F77.
But if a global variable is used as a loop counter, and the variable is altered in a subroutine, then the code altering the variable is not inside the loop. At least not in the eyes of the Fortran compiler.
$ cat test.f08
do i = 1,3
i = 3
end subroutine sub
end program test
$ gfortran --std=f2008 test.f08
There are popular compilers, like gfortran and the Intel compiler.
My point had nothing to do with popularity. My point is that non-standard-conforming programs can have anything happen when they execute, including starting World War III (see https://www.google.com/search?q=fortran+"start+world+war"), and showing output from one compiler doesn't prove anything.
Not so long ago, supercomputers typically had Portland Group, Cray and Pathscale compilers installed. Nowadays it's pretty much Intel and gfortran.
And, inertia isn't the only reason for Fortran remaining popular. Put simply: if you tell a mech.eng./physicist/whatever to write code in Fortran, whatever is produced will likely be fast and relatively readable. Do the same with C/C++, and it will be significantly slower and a horrible mess. Templates-all-the-way-down type of stuff.
Sure, a software engineer could write a C/C++ version that was elegant and as fast/faster than the Fortran code. But scientists don't have the money to hire software engineers. You're lucky if these projects are even under version control.
In practice, what you do is look at the assembly of your inner loops, scratch your head, and try putting "restrict" in various places that seem like they'd make sense, and then look at the assembly of your inner loop. Which requires building a mental model of what the assembly of your inner loops ought to look like, and then actually looking at it, and then running it to see if your idea of what the assembly out to look like was actually a good one.
If your expertise is in numerical methods first and assembly-level optimization second (or, like, nth), Fortran can save you a lot of ballache.
Numpy will compile f2py (to allow running fortran code in python) and I think it uses the Fortran lapack bindings in some cases if a Fortran compiler is present. However, both of those are optional. Numpy deliberately avoids requiring Fortran in any way.
Scipy, however, uses quite a bit of Fortran in addition to C and requires a Fortran compiler to build.
At any rate, as you noted, it's hardly dead. Modern Fortran is a domain-specific language, for the most part, but it's quite popular within that domain (scientific computing and HPC).
So yeah Fortran is not dead by any means. Tons of people are using it every day, but perhaps not writing code in it. Just like your OS and browser are written in C/C++ but your applications might not be.
I wrote the 'fortran+fastcgi+nginx' thingy. It has evolved into https://github.com/rlcarino/heeds. Production live runs (and a little blog post about it) may be found at http://heeds.csu.edu.ph. Some students from a university connect to the runs with their Android phones without cell data cost via Facebook's Free Basics which is available in that part of the world. Usage instructions for students are in the FAQ of https://www.facebook.com/groups/csuheeds/.
Why do it? Somebody pays for it.
> Various NumPy modules use FORTRAN 77 libraries
$ pip show tensorflow theano
Requires: six, protobuf, wheel, numpy
Requires: six, scipy, numpy
In the world of traditional engineering, you will still encounter senior PE's that pump out Fortran. Luckily, it usually isn't fixed form.
Also revisiting older projects can also mean visiting Fortran, and sometimes that can be fixed form (looking at you, wind hazard modelling of tornadic winds for nuclear powerplants).
That's basically it. Scientific programmers are from a different era and a different culture.
When discussing pull requests and changes, having less ego involved makes a big difference.
My freshman year I asked my professor why we had to do this one program in Fortran, and after that response, I will never refer to Fortran as "dead" without quotes.
It is proprietary, but very fast and the backend code is much simplified over COBOL.
Writing to a log file looks like:
fd ?logthis-txt reclen 80
def logthis-usr gp 80
logthis-date an 10
logthis-time an 8
open extend logthis using '/var/log/logfile.txt'
on error next sentence
else display date lj upon logthis-date
call GETIME using logthis-time
move usrid to logthis-usr
Why do it? It is a consulting gig.
Some comparisons are dated. However, I think the older variants still have advantages in readability, more clear semantics, semantics closer to algorithm itself (esp mathematical functions), less guessing by compiler for optimizations, and maybe a few others. Those I listed seem to still be advantages over C in general or as it's commonly used.
Fortran is a really good language for number crunching. Academics who don't know how to code can build very fast number crunching tools without really any CS or hardware knowledge. This the target use case and target audience.
If you want to do low level system things with it, it'll be painful.
 Some fortran70 compilers had limited support for recursion it wasn't added to the official language standard until 20 years later tho.
This is the feature, not a bug. The purpose of fortran and why it is a fast efficient tool for scientists to write software is is exactly that it hides implementation details and is a bad systems language.
It allows you to define the important math parts of your program and hides the implementation part exactly so the compiler has a lot more power to optimize.