Language

Fortran

First appeared
1957
Paradigm
Imperative, procedural, array-oriented
Toolchain
GNU Fortran 14.2
Container image
debian:trixie-20261027-slim + gfortran-14 14.2.0-19

Fortran (FORmula TRANslation) came out of IBM in 1957, and it is the oldest language on this site. It was built for numerical work and is still used for it, in weather and physics simulations, and in LAPACK, the linear-algebra library that NumPy and R build on. Here it is compiled with gfortran using the 2018 standard.

Modern Fortran works on whole arrays at once: x - mean subtracts from every element, and sum, minloc, dot_product, and matmul are built-in intrinsics. What it lacks is everything outside the numbers. There is no sort, no CSV reader, and no string splitting, so the implementations write their own. LAPACK itself is a separate library and isn’t installed here.

Quirks

Concepts in Fortran

Run the examples locally

You need Docker and Python 3. The harness builds the pinned container and runs every Fortran example:

git clone https://github.com/qnixon/dswithx.git
cd dswithx
python3 harness/run_tests.py --language fortran