A Modern Take On An Old Language

Some old computer languages are destined to never die. They do, however, evolve. For example, Fortran, among the oldest of computer languages, still has adherents, not to mention a ton of legacy code to maintain. But it doesn’t force you to pretend you are using punched cards anymore. In the 1970s, if you wanted to crunch numbers, Fortran was a good choice. But there was another very peculiar language: APL. Turns out, APL is alive and well and has a thriving community that still uses it.

APL has a lot going for it if you are crunching serious numbers. The main data type is a multidimensional array. In fact, you could argue that a lot of “modern” ideas like a REPL, list types, and even functional programming entered the mainstream through APL. But it did have one strange thing that made it difficult to use and learn.

[Kenneth E. Iverson] was at Harvard in 1957 and started working out a mathematical notation for dealing with arrays. By 1960, he’d moved to IBM and a few years later wrote a book entitled “A Programming Language.” That’s where the name comes from — it is actually an acronym for the book’s title. Being a mathematician, [Iverson] used symbols instead of words. For example, to create an array with the numbers 1 to 5 in it and then print it, you’d write:

⎕←⍳5

Since modern APL has a REPL (read-eval-print loop), you could remove the box and the arrow today.

What Key Was That?

Wait. Where are all those keys on your keyboard? Ah, you’ve discovered the one strange thing. In 1963, CRTs were not very common. While punched cards were king, IBM also had a number of Selectric terminals. These were essentially computer-controlled typewriters that had type balls instead of bars that were easy to replace.

Continue reading “A Modern Take On An Old Language”

The IBM 5100, image from December 1975 issue of BYTE.

Bringing APL To The Masses: The History Of The IBM 5100

The 1970s was a somewhat awkward phase for the computer industry — as hulking, room-sized mainframes became ever smaller and the concept of home and portable computers more capable than a basic calculator began to gain traction. Amidst all of this, two interpreted programming languages saw themselves being used the most: BASIC and APL, with the latter being IBM’s programming language of choice for its mainframes. The advantages of being able to run APL on a single-user, portable system, eventually led to the IBM 5100. Its story is succinctly summarized by [Bradford Morgan White] in a recent article.

The IBM PALM processor.
The IBM PALM processor.

Although probably not well-known to the average computer use, APL (A Programming Language) is a multi-dimensional array-based language that uses a range of special graphic symbols that are often imprinted on the keyboard for ease of entry.

It excels at concisely describing complex functions, such as the example provided on the APL Wikipedia entry for picking 6 pseudo-random, non-repeating integers between 1 and 40 and sorting them in ascending order:

x[x6?40]

Part of what made it possible to bring the power of APL processing to a portable system like the IBM 5100 was the IBM PALM processor, which implemented an emulator in microcode to allow e.g. running System/360 APL code on a 5100, as well as BASIC.

Despite [Bradford]’s claim that the 5100 was not a commercial success, it’s important to remember the target market. With a price tag of tens of thousands of (inflation-adjusted 2023) dollars, it bridged the gap between a multi-user mainframe with APL and far less capable single-user systems that generally only managed BASIC. This is reflected in that the Commodore SuperPET supported APL, and the 5100 was followed by the 5110 and 5120 systems, and that today you can download GNU APL which implements the ISO/IEC 13751:2001 (APL2) standard.

We’ve previously looked at the Canadian-made MCM/70, another portable APL machine that embodied the cyberdeck aesthetic before William Gibson even gave it a name.

Top image: The IBM 5100, image from December 1975 issue of BYTE.

Thanks to [Stephen Walters] for the tip.