By Marcel van der Veer
November 2016

Published in Algol 68

More on Algol 68 Genie, FORTRAN, Mainframe

Being the author of Algol 68 Genie, people frequently ask me why a physical chemist wrote an Algol 68 compiler. This is an understandable question since people associate Algol 68 with the learned group of mathematicians and computer scientists that conceived the language some fifty years ago and people recall the reputation it had of being a hard to implement language. In this post I would like to give an account of how Algol 68 Genie came to be.

Before 1982

My first experience with Algol 68 dates back to my high school years. A boyhood friend of mine who had just become a freshman at the new faculty of Computer Science at what is now the University of Twente, introduced me to Algol 68 programming using A68C on a DECsystem 10. Those were trivial exercises, but my first programming languages had been ECOL and later BASIC (the first language for many persons at the time), hence I was struck by the elegance and expressive power of Algol 68.

1982-1987

In 1982 I started as a Chemistry freshman at the University of Nijmegen. Chemists programmed mostly in FORTRAN, as was common in natural and applied sciences. However, in the new curriculum, we took first programming courses at the relatively new department of Computer Science. Our professor was Kees Koster himself, one of the authors of Algol 68.

For these courses we had to write Algol 68 programs that were compiled by FLACC on an IBM 4341. On the mainframe anything (connect time, CPU time, sheets of paper from the printer …) was budgeted using a virtual currency called accounting units. Of course we were allotted just enough to finish our exercises hence there was not much room for additional practice.

At the time I met Henk Keller, a chemist who had graduated a few years earlier and who was now working at the department of Computer Science. Years later he would play a role in the release of Algol 68 Genie under open source license.

My main research subject concerned computational chemistry. Therefore, most code I wrote in Nijmegen, was in FORTRAN 77. For some time I ranked among the "heavy users" of the university's computer center, which I thought was kind of cool. Even in FORTRAN programming, the structured approach taught by Computer Science proved valuable. Whenever there was no supervisor insisting on FORTRAN being used, I wrote my programs in Algol 68.

Allow me a digression to tell an anecdote. At the end of the 1980's hundreds of mainframes around the world were connected through the BITNET network. We used it to transfer files, but through the network we also had e-mail and could chat using Bitnet Relay which was an instant messaging system. We even had «relay parties» to bring together chat-friends from nearby countries. This was a social network avant la lettre. Later some boffin at CERN started using infrastructure like BITNET to link information at different geographical locations, which became the mechanism behind the world wide web and so the internet was born.

1987-1992

After graduation I got my first research job at the University of Twente that I had frequented in the years before. At the faculty of Applied Physics, I continued doing research, now using computational physics. The DECsystems had been replaced by a large VAX 8650, which happened to have installed an ALGOL68RS compiler under VMS, so when possible I continued to program in Algol 68. Production code for long simulations was in either C for Unix workstations or FORTRAN for supercomputers.

At home I had one of the early PCs with Pascal under MS-DOS. I whiled away many hours writing programs that would parse and evaluate expressions or analyse type expressions. This experience later proved useful while writing Algol 68 Genie.

The UT library had various documents on Algol 68. I read for instance about the strategy by Barry Mailloux to extract declarations from clauses before parsing. A smart approach, since it renders the two-level grammar LALR. These documents stimulated me to take on writing a hand-coded Algol 68 parser. At the time it appeared a worthwhile pass-time to me, not realising it would keep me busy until after military service.

1993-2001

Algol 68 was a programming language for mainframes that were located at computer centers. So after PhD graduation and military service, I had no access anymore to an Algol 68 implementation. I did have my hand-coded parser and got motivated not to stop and make an implementation myself. Hence I wrote a mode-checker, scope checker, C-code generator etcetera and at one point my still rudimentary implementation translated Algol 68 into C. I could program again in Algol 68!

By then Linux had become a serious operating system and I adopted it as my favourite development environment. For portability reasons and because I wanted a check-out implementation, I stopped translation into C and made an interpreter back-end.

Compilation became optional - if you wish, Algol 68 Genie will dynamically compile and link eligible branches in the syntax tree. In this way several elementary interpreter actions are compounded into a single complex action. Hence the implementation is a hybrid between compiler and interpreter.

2001

At the end of 2001, during a reunion of chemists in Nijmegen, I discussed with Henk Keller my pet project. In the meantime, he had become co-director of a Unix consultancy and training company. Henk convinced me to release the project under open source license. And so I did; Algol 68 Genie was born.

2001-present

To be honest, at the time I expected a number of around ten or perhaps even twenty users for Algol 68 Genie. I was wrong, off by a few orders of magnitude. Henk was right, the world had moved on since Algol 68 and the only chance my project had to get wider attention was to distribute it under an open source license.

Algol 68 Genie is available now from the repositories of major Linux distributions as Debian Stable and Ubuntu Universe, but also from OpenBSD ports. This contributed to many people using the program who provide(d) feedback in the form of bug reports, suggestions, feature requests etcetera. Without all those people the project would not be what it is today. Algol 68 Genie has even been used in the academia, so in a manner of speaking the circle is closed now. I only wish Henk were still here, so I could tell him.



All blog posts