Seven Obscure Languages

(In Seven Weeks!)

Dmitry Zinoviev
5 min readOct 18, 2024

My new book about Seven Obscure Languages, an opus in software archeology, just hit the shelves of Amazon.com and, hopefully, brick-and-mortar book outlets.

As the title suggests, the book unearths seven great, semi-forgotten, semi-abandoned programming languages: Forth, APL, Occam, Simula, SNOBOL, Starset, and m4, each having its own personality. (To be honest, m4 is neither forgotten nor abandoned, but it works its way so humbly and stealthily that hardly anyone knows about it.)

FORTH 1 1 + . 2 ok

Forth is a stack-based language with a limited vocabulary. Remember Reverse Polish Notation, RPN? It’s Forth in disguise! Forth is close to the hardware; it is almost an assembler. It is fast; it is efficient; it is simple; it is small. If you have never written a Forth interpreter, don’t expect your dog to respect you. Forth was beloved by NASA, at least in 2003. I almost applied for a Forth programming position with the Hubble telescope project, but I quickly realized it was a Lisp programming position.

APL `1++/1÷(!⍳170)` Yuck, Medium does not let me properly display the APL code!

APL is A Programming Language, but not just Another Programming Language. It was designed by Kenneth Iverson, a Canadian computer scientist and mathematician, for mathematicians as a form of algebraic and algorithmic notation. APL is notorious for its notation, but the whole field of Mathematics is. By the way, the expression at the beginning of the section calculates π by expanding it into the Taylor series, and you would never guess if I didn’t tell you. Compact, precise, decadent, APL cannot care less whether you understand its expressions. It is a write-only language. Look at the list of APL commands (in addition to 52 Latin letters, 10 digits, and “normal” punctuation).

_¨¯×÷←↑→↓∆∇∊∘∣∧∨∩∪∵≠≡≢≤≥⊂⊃⊕⊖⊗⊢⊣⊤⊥⋄⋆⌈⌊⌶⌷⌹⌻⌽⌿⍀⍂⍉⍋⍎⍒⍕⍙⍞⍟⍫⍱⍲ι⍴⍵⍷⍸⍺⎕○⍝

Do you see a middle finger at the end of the list? Don’t worry; the ⍝ thing is simply a comment. /* Just like this. */

The power of APL is in its array processing capabilities. It works with scalars, vectors, matrices, 256-dimensional arrays, you name it, with the elegance and precision of an HP calculator. APL may have died, but it surely got reincarnated. Today, we call it NumPy.

OCCAM CHAN BYTE in, out: BYTE item: SEQ in ? item out ! item

Entia non sunt multiplicanda praeter necessitatem, said William of Ockham, fourteenth-century English philosopher and theologian. Yes, sir, said the Inmos Corporation and created a Transputer: a minimalistic RISC four-core microprocessor with interconnecting channels. (I am sure there was a necessity for that multiplication of entities.) Occam was the language of the Transputer, for the Transputer, and only for the Transputer. Occam supports parallel and concurrent execution, message passing, and message protocols. Think of it as an implementation of Hoare’s communicating sequential processes (CSP) running on CSP-aware hardware. (CSPware?If that ever catches on, you heard it here firs.t) Inmos is gone, Transputers are gone, and Occam was almost gone, too.

SIMULA TEXT t1,t2; t1:-Blanks(10); t:="Hello,"; t2:-Copy("World!");

Simula is a gift to humanity — and in more than one way. First, it is a superset of the venerable ALGOL60, one of the first programming languages. Learn Simula — get ALGOL60 for free. Second, it is the first object-oriented language. (No, C++ was not even the second, and JavaScript is not even a language.) Simula brought us classes, objects, references, instantiation, inheritance, method overloading, and numerous other concepts we thought were either invented by Bjarne Stroustrup or given to Moses on the seventh day of Creation, depending on who you worship. Finally, as the name suggests, Simula is a language for computer modeling simulation. It provides a discrete event simulator and event-handling classes and methods. By the way, do we all live in a simulated Universe?

SNOBOL NEXT line ("Alice" | "Bob") . match = :F(LOOP)

When a wise man asks you what was first: a chicken or an egg?, answer: it was Digital Humanities. And digital humanities were nameless and hard to do until the advent of SNOBOL, the StriNg-Oriented and symBOlic Language (sic!). Like Simula brought all things OOP, SNOBOL contributed patterns, pattern matching, and pattern-based replacement, the heart and soul of text processing. On the bitter side, SNOBOL treats numbers as strings and converts them to the arithmetic representation for arithmetic operations, which bigly affects its performance. It also does not have loops, but who needs loops when there are explicit GOTO statements? (It was before Edgar Dijkstra’s seminal Go To Statement Considered Harmful.)

STARSET WRITE (EXISTS w IN $SET)(LEN(w) >= 10);

Mathematical set theory would be just a mathematical theory if not for Starset (and its cousin SETL). Sadly, born in a quiet and ancient Russian rural town at the dusk of the Soviet Union, the language fell victim to the break-up of the USSR. When the language was designed, the Russians had more important things to worry about, such as food, jobs, and personal safety. When they got all of the above, there was no need for specialized programming languages anymore: Java and Python had taken over.

Sets and set classes are the native and primary data types in Starset. You can index, search, merge, split, save, and restore them. The more time you spend starsetting, the more everything looks like the proverbial nail. I have an intimate and personal connection to Starset, but it is another story (you can find it in the book).

M4 define(`foo', `bar')dnl

Some say m4 is not even a language. Indeed, m4 was originally released as a preprocessor: in other words, as a tool for textual substitution. However, a preprocessor can be a programming language, especially if, like m4, it is Turing complete. A clever programmer like you can use it to write loops, conditional statements, and stacks, access files, and do everything else other good obscure languages do. You can even write a simulator of a traffic light-controlled intersection as if Simula was not enough. m4 is the brain behind GNU Autoconf (a tool for producing shell scripts that automatically configure software source code packages), GNU Automake (a tool for automatically generating Makefiles), and Sendmail (a popular mail transfer agent), and yet few programmers know about its existence. I am happy to make this really useful engine a little bit more popular.

Interested? Intrigued? Want to know more about the obscure programming languages? Buy a copy of my recent book Seven Obscure Languages in Seven Weeks. Rediscovering the Tools That Built the Future as an e-book at the Pragmatic website or in softcover on Amazon.com!

--

--

Dmitry Zinoviev
Dmitry Zinoviev

Written by Dmitry Zinoviev

Dmitry is a prof of Computer Science at Suffolk U. He is loves C and Python programming, complex networks, computational soc science, and digital humanities.

No responses yet