News: 1589536033

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

ALGOL 60 at 60: The greatest computer language you've never used and grandaddy of the programming family tree

(2020/05/15)


2020 marks 60 years since ALGOL 60 laid the groundwork for a multitude of computer languages.

The Register spoke to [1]The National Museum of Computing's Peter Onion and Andrew Herbert to learn a bit more about the good old days of punch tapes.

ALGOL 60 was the successor to ALGOL 58, which debuted in 1958. ALGOL 58 had introduced the concept of code blocks (replete with begin and end delimiting pairs), but ALGOL 60 took these starting points of structured programming and ran with them, giving rise to familiar faces such as Pascal and C, as well as the likes of B and Simula.

"In the 1950s most code was originally written in machine code or assembly code," said Herbert, former director of Microsoft Research in Cambridge, with every computer having its own particular twist on things. A first generation of languages, called "Autocode", existed for coding problems like equations which could then be translated into machine code, but lacked the bells and whistles of today. Worse, some had features that others lacked, making hopping between systems tricky.

"There was an Autocode for the [Elliott] 803," said Onion, "but it only supported expressions like A + B = C, so if you've got a complex equation, you have to break it down into individual single binary operations. So there was still a lot of hard work to be done by the programmer."

"Fortran," said Herbert, "emerged as the first real programming language for scientific and numeric work. That convinced people that having higher-level languages (as they called them then – they were pretty primitive by modern standards) made programmers more productive."

The overhead of compiling, and inefficiencies in the compilers themselves, meant that machine code remained king of the performance hill, but for those doing science work, the ability to churn out some code to solve a problem and then simply move on to the next was appealing.

"Fortran," Herbert continued, "was more like an autocode," before laughing, "It still is in some ways!

"And a bunch of people thought you could do better."

Enter the International Federation for Information Processing (IFIP), which Herbert recalled "had a whole bunch of committees who looked at standards and problems in computing".

One group started on the design of what was then called an "Algorithmic Language": a language for writing algorithms. The output, in 1958, described the language "ALGOL 58". However, as engineers began to create compilers for the new system, they found "all kinds of things hadn't really been thought about or worked through properly," recalled Herbert.

And so there were revisions and changes. A periodical called " [2]The ALGOL Bulletin " detailed the travails of those involved as the problems and the weaknesses in the language were dealt with (or at least attempted).

The process was not unlike an open-source mailing list today, but in paper form.

Eventually, Herbert told us, "they published the ALGOL 60 report, which is the baseline that everyone then worked to."

The committees were under pressure and also suffered a little from differing international approaches. The American side had a lot of experience in Fortran and were seeking something that could quickly be made to work on their computers, while the Europeans were a little more cerebral and had, Herbert laughed, "terrible notions like beauty and elegance in mind for the language".

"People were sorting out some of the things that we now take for granted like ideas in structured programming, data structures, data types," he added.

Seeking solutions to the problem of portability of programmers between systems and code between hardware generations as well as avoiding the pain of having to rewrite programs every time a new iteration of computer arrived, vendors embraced the language with variants cropping up over many manufacturers.

ALGOL 60 on tape (pic: Peter Onion)

Alas, those seeking a handy-dandy "HELLO WORLD" example will be disappointed. The Achilles' heel of the language that would go on to inspire so many others was that it lacked standard input/output capabilities.

"The defining committee couldn't agree on how to do input/output," said Herbert. "They decided that would be left to a library, and that library would be user dependent."

"In this case," added Onion, "the user being the compiler writer."

Oh dear. The omission pretty much did for vendor independence as manufacturers naturally went their own way, leaving large chunks of code incompatible between systems. There were also elements of ALGOL 60 that were open to interpretation, leaving it a little compromised from the start.

While ALGOL ploughed its furrow, Fortran continued to be developed in parallel. "People in the Fortran world," explained Herbert, "saw ideas in ALGOL they quite liked and brought them across." As the decades passed, Fortran remained the centre of gravity for scientific computing while ALGOL became more of an academic language, used for teaching computer science ideas.

"It was quite heavily used in the scientific community," Herbert said. "Most mainframe manufacturers supported it."

Some of the team behind ALGOL 60 stayed with the project and went on to come up with ALGOL 68, which, as far as Herbert is concerned, "nailed all the things that ALGOL 60 had left a bit vague".

Indeed, it was hard to avoid in the 1970s for those taking computer science courses. This hack has fond memories of the successor language, while the grandfather of Reg sub-editor [3]Richard Currie had a hand in [4]the development of ALGOL 68-R and RS.

"It had the world's most exotic input output system," Herbert laughed.

It was also, sadly for its enthusiasts, a bit of a dead end. Despite ALGOL 68-R becoming widely used in (particularly British) military applications for a time, it would take until the 1970s for a full implementation of ALGOL 68 to become available.

The [5]last edition of The ALGOL Bulletin was published in 1988, with its editor noting: "ALGOL 68 as a language is very stable. It is used and loved by those who understand its benefits, and ignored (or misquoted) by the rest."

The story of ALGOL 60 is not so much of the language's eventual fate, but also of those that it inspired. ALGOL W, based on a proposal for ALGOL X, by Niklaus Wirth and QuickSort creator Tony Hoare would go on to inspire Wirth's Pascal and Modula-2. Pascal's influence continues to be felt today.

ALGOL 60 also heavily influenced the Combined Programming Language (CPL), developed in the 1960s but not implemented until the following decade. CPL in turn led to Basic CPL (BCPL), from which B descended. The B language was further developed to become C.

Tony Hoare was responsible for the implementation of ALGOL 60 on the [6]Elliott 803 computer , an example of which remains operational at The National Museum of Computing, although compiling and running a program on that hardware is a little different to the development environments to which coders are now accustomed.

First, the compiler must be loaded from paper tape. The ALGOL program itself is then fed into the tape reader and "it sort of chunters away," remarked Onion, "for anything between 30 seconds to perhaps 15 or 20 minutes during the compilation."

[7]Behold the chuntering

Once compiled, a program would be free to use the space originally occupied by the compiler. Doing so would, however, not win the programmer any popularity awards since the next user would have to reload the compiler again. Leaving it in memory meant that multiple programs could be run.

"That made it very popular for teaching," said Herbert, "because you can have a line of students, each with their paper tape with their programme in their hand and you basically march up to the machine, the machine's got the ALGOL system loaded, you run your programme, it produces gibberish, you go away and think about it and the next student runs their programme."

With paper tape being king, Onion observed that the experience of programming taught a bit of focus: "When your edit, compile, edit, compile cycle starts to get above about 10 minutes, you start to pay an awful lot of attention to your source code…"

The National Museum of Computing has two Elliott machines in its [8]collection , a 1962 803B (which was donated after spending 15 years lurking in a barn following its decommissioning) and a 903. Both are fully operational and can be seen running once the museum is able to open its doors once again.

The 803B, which is maintained by Onion, also features a Calcomp drum plotter as well as some additional input/output features.

The Lorenz attractor plotted by an ALGOL program (pic: Peter Onion)

As for taking the ALGOL 60 itself out for a spin today, there are a few options for those not fortunate enough to have an Elliott 803 or 903 to hand. [9]MARST will translate ALGOL 60 to C or one can get a feel for the whole 803 experience [10]via a simulator .

Although as ALGOL 60 turns 60, you could just fire up a modern programming language. Lurking within will likely be the ideas of ALGOL's designers. ®



[1] https://www.tnmoc.org/

[2] http://archive.computerhistory.org/resources/text/algol/algol_bulletin/

[3] https://search.theregister.co.uk/?q=&advanced=1&author=richard+currie&date=the+dawn+of+time&results_per_page=20

[4] https://mraths.org.uk/wp-content/uploads/2018/08/1970-Algol_68_v7_resize.jpg

[5] http://archive.computerhistory.org/resources/text/algol/algol_bulletin/A52/P1.HTM

[6] https://www.tnmoc.org/elliott-brothers-computers

[7] https://www.youtube.com/watch?v=AIxZ1i8pvZI

[8] https://www.tnmoc.org/large-systems-gallery

[9] https://www.gnu.org/software/marst/marst.html

[10] http://elliott803.sourceforge.net/

No love for CORAL 66?

Raymond Berenger

Back in the day, in order to get a military application running, I had to take the assembler output of a Coral 66 program and basically rewrite it completely in proper assembler, because the compiler wasn't merely not optimised, it seemed positively designed to waste as many CPU cycles as possible. It used the 9989 microprocessor, and completely ignored the 9989's register windowing system, instead creating boilerplate functions every single time.

Kids today...I'm the one feeding the punched tape repeatedly through the reader to get the floating point libraries to work. Arguments over bracket syntax, tabs versus space and to semicolon or not are really a sign that nowadays there is very little to complain about.

Re: No love for CORAL 66?

AndyMulhearn

Spookily my first programming experience was of Coral 66 running on a PDP 11/44 so way more congenial than yours. Those were the days.

Re: No love for CORAL 66?

Persona

On my first day of employment as a graduate I was handed a Coral 66 manual and told to learn it. We used it to compile code for Intel 8080 processors. It was a truly horrible language so I transitioned us to using "C" on Zilog Z80's in ~1981.

Re: No love for CORAL 66?

JacobZ

We used to call that the Pessimizing Compiler

Re: No love for CORAL 66?

Graham Cobb

My second professional programming job was in Coral 66 (actually, PO Coral). If I remember correctly, I had to write the code on a George III system (doing my editing on a teletype as the team only had one VDU and as the most junior I was never allowed to use it). It was then compiled a while later by a batch job and I had to walk to the computer centre after a while to collect my tape to load into the SystemX prototype I was working on (and often had to cajole the operators into loading a tape, which they had ignored for the last hour, so the job could finish and I could collect my tape to take to the lab).

When I fixed the trivial bug I would find in my testing, I had to do the whole process again. About two iterations a day was fairly typical.

(My first professional programming job was in APL - that was quite fun).

Re: No love for CORAL 66?

big_D

DEC's FORTRAN compiler was much more efficient..

I've told this here before, but we had a data centre full of VAXen and we were looking at possibly replacing some of them with a mainframe from a well known manufacturer. They actually delivered a test machine for us to try out, a whole room-full of big boxes!

The salesman gave us a tape with a FORTRAN program on it, which would "run for about a week" on the mainframe and several weeks on our test VAX. We should "load it, compile it, run it and call me in about a week, when the mainframe finishes its run".

He then left us to it. The ops put the FORTRAN tape through both machines, compiled the program and hit run simultaneously on both machines...

The salesman had a message to call us back, by the time he had returned to his office. The VAX had finished in about a second, his mainframe was still chundering away.

It turned out the FORTRAN compiler on the VAX was actually quite clever. It analysed the code: no input -> create a huge array -> fill array with random numbers -> no output. The compiler decided if there was no input and no output, there was no point running the bit in between, so it made an empty program stub. The mainframe compiler was not so clever...

.. never used .. ?

John Thorn

I wrote my first Algol program in 1965. I can't tell you what for as I think I'm still bound by the Official Secrets Act.

On the same theme I recall a cartoon when PL/I (remember that?) was launched. Mummy COBOL and Daddy Fortran are crooning over their new child PL/I. Driving off in the background is the ALGOL milkman.

Re: .. never used .. ?

Simon Harris

When I was studying Electronic Engineering in the early 1980s, ALGOL was the first language we were formally taught - I remember the ALGOL-68R language guide was a Ministry of Defence book.

Re: .. never used .. ?

Peter Gathercole

Strictly speaking, it was PL/1 (Pea El One). although the 1 was oflen written as an "I" as in the Roman Numeral. But I get a bit upset when someone pronounces it as Pea El Eye, which people are prone to do.

But yes, it tried to be all things to all people, a scientific language, a business language, a control language and in some of it's incarnations (like PL/C which I used when learning PL/1 as a formal language in 1978), a teaching language.

It had many unusual features. The one that I found most interesting were implied loops in I/O statements that allowed whole or even part arrays to be written out in a single PUT statement.

The other language I was formally taught was APL (literally A Programming Language) of which I used to say (somewhat repetitively) "It's all Greek to me!"

Neither of them helped me with my first job, which was as an RPG2 programmer! Thank goodness I had taught myself C while at University. And I had no problem teaching myself Pascal at my second job.

Re: .. never used .. ?

Phil O'Sophical

implied loops in I/O statements that allowed whole or even part arrays to be written out in a single PUT statement.

Borrowed from Fortran, I remember using those!

John Thorn

There was one particular feature of Algol that made for some interesting programming..

If a procedure was called with an expression as one or more of the parameters the expression was re-evaluated every time the parameter was referenced in the procedure (not just as the procedure was called). Nest that down a few levels and debugging was a nightmare.

coconuthead

"Call by name".

ALGOL lives !

dbayly

I learnt ALGOL 60 on a Elliot 503 in Oz in the 60s , and moved on from there to a long career of systems programming in ALGOL variants on the Burroughs machines, then Unisys A series. The OS is still written in ALGOL variant, all the compilers are ALGOL programs , including the ALGOL compiler.

And the I/O conundrum was solved handily by Knuth, who wrote an I/O library (largely in ALGOL) quite early on.

ALGOL lives still, though is a rare skill these days

"notions like beauty and elegance in mind for the language"

LDS

You can still see that difference in languages from Europe compared to languages from US...

Re: "notions like beauty and elegance in mind for the language"

Warm Braw

Sometimes those minds can be [1]too twisted for their own good ! [PDF]

Still, it could be [2]worse .

[1] https://www.dropbox.com/s/h7vxi2mddtdbdd9/p50-baker.pdf

[2] https://www.dangermouse.net/esoteric/chef.html

Anonymous South African Coward

Started to program in Turbo Pascal in the early 1990's - and did Turbo C, and Assembly Language as well.

Then I switched over to a Network Engineer course, and is now a BOFH.

Sadly, programming skillz is not much anymore. Maybe it is time for a refresher and revival...

It started my career move...

steamnut

We had an Elliott 803 at Rugby College (later absorbed into Lanchester Poly). Although I was studying Applied Physics, the computer part of the course fired me up and I went into computing from that point on. I remember the console speaker that, although abused to play music, did give you a sense of what your program was doing. Later on, in my 6800/8008/8080 hobby days, I used a transistor radio for the same thing.

There were two no-no's: The first was to remember how little memory you had to play with so large arrays were not possible and, if attempted, resulted in a subscript overflow message (iirc - SUBSCROFLO). The second was to make sure your plotter programmes completed. The plotter involved an extra paper tape load for the operator. If your plot failed then the whole machine had to be restarted. The plotting code was probably an early form of overlay.

Before we had magnetic tape installed the paper tape reader was something to behold. The output from the reader had to be caught in a basket as the speed was so high. The computer operator was a very smart young lady too.... Happy days. ;-)

Re: It started my career move...

PeterO

The Algol Plotter Package (Library Tape P104) was a precompiled tape which contained the output of pass one of the compiler (called Own Code) and various bits of compiler state. It was a binary dump of the Own Code so loaded faster than running pass one on the corresponding source code. Your source was then read in and its Own Code appended that already in store. Pass two then read the combined Own Code to produce the executable in core.

I've used Algol-60 at school

anthonyhegedus

I did my AO-Level Computer Studies in 1983 it 1983 or 1982 (can't remember!) and I did my project in Algol-60. Because that's what we ran on our Research Machines 380Zs. It was a program to solve the N-Queens problem, using the process of making different permutations of the numbers 1-N, and I did it using recursion (because I could). Little did I realise at the time that it was really out of date, and there's no reason we couldn't have done it in Pascal or C. But that's all we had.

Re: I've used Algol-60 at school

Alan J. Wylie

Me too.

Probably 1973/4. We wrote out programs out on coding forms, making sure that our 0/O and 1/I were distinguished (I can't remember any more which one had a slash through it). It was sent off to, IIRC, Lancaster Uni, where it was typed onto punched cards and put through the batch system. A week or two later, we got the output. It took a long time to get anything that would compile. I think mine did run eventually, busily calculating digits of pi until it hit its CPU limit.

Ugh! PASCAL

Antron Argaiv

We used it in school (UMASS/Amherst) as a teaching language. Too "wordy" for me, especially the IO statements. But it did get the job done.

When I started working, it was at Data General, who had an Algol-like language called DG/L, which I absolutely loved. It was my language of choice for little utility programs on our AOS and AOS/VS systems.

Then, of course, came the Sun workstations, with UNIX and C.

Game over.

Bonus for the CALCOMP drum plotters. I worked part time at the comuter center in school, we had one (3 or 4 foot wide). The number of aborted plots due to pen failure was astounding, as was the pen budget!

Re: Ugh! PASCAL

Phil O'Sophical

Bonus for the CALCOMP drum plotters

I remember a friend at uni mapping out the Adventure Colossal Cave and having it plotted on one of them. It was on the wall of the terminal room for quite a while.

Algol 68 is not ALGOL 60

coconuthead

Algol 68 is basically a different language from Algol 60—and the Algol 60 designers, most notably Djisktra, were less than impressed by it, and along with others on the committee issued a "minority report" disowning Algol 68. Syntax aside,and leaving out the object-oriented stuff, Algol 68 actually bears a distinct resemblance to C++. Algol 60, on the other hand, begat Pascal. So really they are different languages sharing part of a name.

I never got to use Algol 68 because it was difficult to write a compiler for and nowhere I worked had one. Burroughs Algol (a variant of ALGOL 60), on the other hand, was available. Time pressure, and perhaps a desire not to be seen to know too much about the "old iron", meant I never did write any Burroughs Algol. That was perhaps my loss. I don't think I missed anything by not writing Algol 68.

BTW Burroughs Algol was implemented in hardware. It was a stack machine with display registers and hardware support for resizing arrays.

I used it.

Anonymous Coward

Once. 45 years ago.

dirtygreen

ALGOL 60 was the first language I learned, at school in the Computer Club. Turn round was a bit longer than ten minutes. We used to write programs on coding sheets, which were then taken to the nearby university and typed up by data prep ladies, run by the operators on the ICL1909, and the coding sheets, pack of cards and printout was returned to us a week later. That did make you concentrate fairly hard on program correctness; my first program calculated primes and I've still got the output somewhere. After a while a friend and I learned that we could get off the bus on the way home, walk up to the university and punch our own cards on IBM 029 punches, and then watch while the operators ran the program. That made things a lot faster and meant we could write bigger programs - my favourite was a linear regression program for the results of our physics experiments. It made them look much more 'official' :)

And then we discovered the unversity had a free access PDP-8 so we learned BASIC on DECtape and the joys of typing into an ASR-33 and Friden Flexowriters. And then ...

... the university got a copy of the POP-2 compiler. Still my favourite language ever! Programs to synthesise English using Chomsky's grammars etc etc. Machine Intelligence 1, 2, 3 ...

The only winner in the War of 1812 was Tchaikovsky.
-- David Gerrold