Anecdotal Fortran... :-)

I opened an issue for this (Simplify lsame · Issue #701 · Reference-LAPACK/lapack · GitHub) using iachar to bypass the need to maintain branches for different character encodings.

From what I see, the reluctance to add modern Fortran to BLAS/LAPACK is due to several legitimate reasons:

  • massive reformatting effort, which doesn’t necessarily bring any new features (i.e. note the code in my issue is both valid free-from and fixed-form, conforming with F95 and higher)
  • losing the opportunity of using F2C to provide LAPACK functionality to C users who may not have Fortran compilers available
  • using a restricted subset of the Fortran language such as F77, makes it easier to port LAPACK to other platforms such as Java or .NET via custom transpilers/compilers
  • it would raise the requirements on compiler versions, and having to dropping support/compatibility on certain platforms

The FORTRAN-hating gateway:

8 Likes

I wonder if the source code of FLPL is available somewhere, and if a modern version of FLPL written in modern Fortran would be worthwhile.

A Fortran-Compiled List-Processing Language (1959)
Authors: H. Gelernter, J. R. Hansen, C. L. Gerberich
International Business Machines Corp., Yorktown Heights, N.Y.

Abstract. A compiled computer language for the manipulation of symbolic expressions organized in
storage as Newell-Shaw-Simon lists has been developed as a tool to make more convenient the task of
programming the simulation of a geometry theorem-proving machine on the IBM 704 high-speed
electronic digital computer. Statements in the language are written in usual FORTRAN notation, but with a large set of special list-processing functions appended to the standard FORTRAN library. The algebraic structure of certain statements in this language corresponds closely to the structure of an NSS list, making possible the generation and manipulation of complex list expressions with a single statement. The many programming advantages accruing from the use of FORTRAN, and in particular, the ease with which massive and complex programs may be revised, combined with the flexibility offered by an NSS list organization of storage make the language particularly useful where, as in the case of our theorem-proving program, intermediate data of unpredicable form, complexity, and length may be generated.

The 20th September 1954 seems very early for the first FORTRAN program runs…
In the book Abstracting Away the Machine: The History of the FORTRAN Programming Language (FORmula TRANslation) , the Chapter 14 begins by:

In late 1954, with the language specs set and the development team fully assembled, there was only on small thing left to do: write a compiler that would set the standard for the next twenty years.

But yes, they say page 134 it was in September 1954 that “Harlan Herick had tested the language, running the first FORTRAN program […] despite lacking a functional compiler”.

Page 150 says that the first program written and compiled outside IBM was in mid-April 1957, by Westinghouse engineers.

1 Like

I got curious about it, but apart from the article I could not find much. I did find: Fugal, Karl A., “A Fortran List Processor (FLIP)” (1970). All Graduate Theses and Dissertations. 6861.
"A Fortran List Processor (FLIP)" by Karl A. Fugal. Surprisingly enough, the code of the library in this thesis is not in FORTRAN but in assembly. The examples are in FORTRAN.

A nice Fortran comic by cartoonist Bill Amend, thanks to MIT CSAIL for bringing it to my attention on Twitter:

5 Likes

Fortran 66 Flex Grammar (Github project)

Most compiler development tools, such as Lex and Yacc, are geared for Pascal / C derived languages, and are hard to use on older languages. In particular, it was frequently noted that it is extremely difficult to write a Lex grammar for Fortran 66. Is a Lex grammar for Fortran 66 even possible?

This project proves that such a grammar is possible. It provides a Flex grammer for Fortran 66. Flex is a GNU version of Lex, with some helpful improvements. This grammar has not been tested with Lex, but an attempt was made to avoid Flex features not available in Lex.

The World Where Fortran 66 Was Developed (TLDR)

To understand the quirky nature of Fortran 66, we need to take a quick review of the radically different nature of software development in the early decades of software programming.

3 Likes

Fortari 2600 – Fortran based development framework for the Atari 2600.

5 Likes

Mainly Python, it seems, but they do use Fortran as well, and the name is funny. Did you notice how “F” is stylized? I am pretty sure I saw something like that in at least one of the old FORTRAN manuals.
I always liked what vintage computers enthusiasts do. Now, whether Atari 2600 is a computer or not is somewhat debatable, but that only makes the project even better.

I had a Commodore 64 back then and my attempt to use Fortran (actually, FORTRAN) wasn’t very successful because it needed a CP/M cartridge. Later on I discovered there were other options for the task as well, but it was too little too late… let’s face it, the only way to natively hack vintage computers of the 80s is Assembly. C64 had an excellent assembler, which I am still using today from time to time. It even included a full-screen editor - a thing you could rarely see back then, and even when you did, it was unacceptably slow (but no, this one is lightning fast.)

Similar fonts are freely available, in case you are interested.

Another FORTRAN compiler for the C64 was Abacus Fortran-64 (manual) which covered a subset of FORTRAN 77 and runs natively, without the need for CP/M.

That was the “other option” I mentioned. Sadly, I wasn’t aware of Abacus Fortran back then, I heard about it at least one decade later. In the meantime I learned Assembly and had the excellent Turbo Assembler, still living today as “Turbo Macro Pro”.

Re: the first run outside of IBM

https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=4392947

I heard it slightly differently from some of the names listed there, but the best summary I know of.

The first release was on cards, and came with a confidence test. So the Westinghouse folks listed used to often note that technically it was not them, but the Operators that loaded Fortran that ran the first program outside of IBM.

1 Like

Languages Pre-Fortran, discussed at Hacker News

There were many languages that pre-dated Fortran. This series is based on the white paper by Knuth and Pardo published in 1976, “The early development of programming languages ”. In this paper the authors describe 20 languages, and use a generic program “TPK” described using ALGOL-60 to illustrate how each language would be formed.

1 Like

After this topic Logical intersection evaluation I remebred about mem from this quick Fortran 202x features revew:

8 Likes

I don’t know if this has been posted before. I think is interesting because it has a lot of old code, may be about 60 years old:

https://www.softwarepreservation.org/projects/FORTRAN/index.html

…first formal proposal for the language FORTRAN and lists the elements of the language which are proposed to be included in the eventual implementation together with some suggestions for future extensions….

1 Like

As a programmer, I would never do what “Fortran Committee” does in that picture - I consider a ? b : c a novelty nobody really cares about. However, I know many males who would probably do what “Fortran Committee” does in the picture - myself included. It depends on the “a ? b : c” passing by, of course. :laughing:

P.S.: “all your gotos are belong to us” is even more amusing. The article summarizes Fortran 202x features with a sense of humor, which is a very nice touch.

1 Like

You may not care about it, but this was one of the most popular suggestions from users when we were planning Fortran 2023. There were various syntaxes proposed, but in the end the “C-like” syntax won out as more committee members felt it would be more familiar to programmers, as this syntax (or slight variations thereof) is used in many other languages.

One part of this feature that was VERY popular is that it provides short-circuit evaluation, which Fortran does not otherwise have (except to a limited extent in MERGE.) The conditional expression feature can be used as an actual argument, meaning that the “effective argument” can be a NULL or something else, which you can’t do otherwise in Fortran.

As for generics and exception handling, we could not establish a direction for either in time to develop it. Generics got a head start for the next revision with a subgroup formed, and a workable proposal has already been developed. Exceptions faced a lot of resistance as we couldn’t figure out how to offer them in a way that didn’t slow down code that didn’t use them. It’s not dead, though, and I personally would like to see something happen here.

2 Likes

If the result is modifiable, then can it also be used on the left side of an assignment?

a ? b : c = <expression>

This would be the equivalent of

if (a) then
   b = <expression>
else
   c = <expression>
endif

but without repeating <expression>, which seems like would be useful.

No. As an actual argument, it’s called a conditional-argument. It’s not allowed to the left of an assignment.