5 forgotten programming languages that were never meant to be practical

5 forgotten programming languages that were never meant to be practical


Most programming languages exist to be used. They want to be readable, fast, deployable, and friendly enough that someone will actually choose them at work, like Python. However, there are a handful that never had that problem because they were never trying to be useful, just interesting.

INTERCAL forces you to be polite to the compiler

It renames normal symbols into weird words

5 forgotten programming languages that were never meant to be practical Credit: Jorge Aguilar / How To Geek

One of the first real esoteric programming languages came in 1972, the Compiler Language With No Pronounceable Acronym, or INTERCAL for short. Two Princeton undergrads, Donald R. Woods and James M. Lyon, built it as a direct joke aimed at the bloated corporate software systems and painfully rigid languages of the era, things like FORTRAN, COBOL, and ALGOL.

Their stated goal was to build something that shared absolutely nothing with any existing way of programming, purely to make things as frustrating as possible. One of INTERCAL’s most notorious quirks is that it demands good manners. Statements have to be prefaced with PLEASE or PLEASE DO often enough to satisfy the compiler, but not so often that it gets suspicious.

Use the polite keyword in fewer than about one in five statements, and the compiler throws an error telling you the programmer is insufficiently polite. Use it in more than about a third of your statements, and you get hit with an overly polite error instead. You have to find the sweet spot, which makes writing code a way to manage a compiler’s feelings.

Even the basic symbols get renamed into something barely recognizable. An apostrophe is a spark, quotation marks are rabbit ears, and a comma is a tail. The assignment operator isn’t an equals sign: it’s a left-pointing arrow that the manual calls an “angle” and a worm, read together as gets. Instead, you get 16-bit integers called “spots,” written with a period, 32-bit integers called two-spots, written with a colon, and arrays called tails and hybrids.

Chef reads like a kitchen recipe

Ingredients and mixing bowls hold your data

David Morgan-Mar created Chef, and it was like making an unusual programming language for the kitchen. The whole idea is that real, working computer programs are written to look like cooking recipes. Chef was designed so that the code could actually run on a machine while also reading like something you’d find in a cookbook.

Instead of abstract labels, every variable looks like a food ingredient. You have to use sugar, flour, and that kind of thing. These ingredients hold the numerical values the program needs to function. The units of measurement attached to each ingredient matter too. Dry measures like grams or pinches tell the program to treat a value as a regular number, while liquid measures like milliliters or dashes mean the value gets read as an ASCII character.

Memory stacks, which programmers would normally think of in purely abstract terms, become mixing bowls and baking dishes.

There are no arithmetic operators or memory commands in the traditional sense. Instead, the programmer gives cooking instructions. Put ingredient into a mixing bowl pushes a value onto the stack. Fold ingredient into mixing bowl pops the top value back off and reassigns it. Multiplying two values means telling the program to Combine something into the bowl.

Reordering the stack means stirring it for a certain number of minutes. When it’s time to produce output, the program serves the dish, which is a Serves statement at the end that prints the results based on the number of diners.

Befuge runs on a grid instead of line by line

The pointer moves around like a maze

Befunge typing hello world in a program Credit: Jorge Aguilar / How To Geek

Befunge is a genuinely odd programming language, more so than others. Instead of running code line by line from top to bottom, it operates on a two-dimensional grid. In the original specification, that grid was fixed at 80 columns by 25 rows, and the whole thing wraps around at the edges like a torus. What makes it strange is that code and data live in the same cells. There’s no separation between the two.

When a Befunge program runs, an instruction pointer moves around the grid like a cursor, and it can go in any of the four basic directions of right, left, up, or down. This all depends on directional characters in the code. There’s even a ? operator that picks a random direction, and a pair of conditionals _ and | that branch the pointer horizontally or vertically based on whatever’s on the stack.

It makes so little sense to me; it’s a maze for no reason.

Whitespace looks completely blank when you open it

Everything is made out of invisible spaces and tabs

Whitespace typing hello world Credit: Jorge Aguilar / How To Geek

Whitespace is as silly as it gets. Whitespace ignores every standard text character entirely. Where languages like C++ or Java treat spaces and tabs as meaningless formatting, Whitespace flips that entirely. Here, the only characters that actually mean anything are spaces, horizontal tabs, and line feeds.

Everything else is ignored by the interpreter and treated as one big inline comment. Open a Whitespace source file in a text editor, and it looks completely blank.

Under that invisible surface is a fully functional, stack-based programming language where developers have to build mathematical logic out of nothing but invisible keystrokes. Every command starts with an Instruction Modification Parameter, which is a specific sequence of whitespace characters that tells the interpreter what kind of operation is coming.

A single space means stack manipulation, a tab followed by a space kicks off arithmetic, and a lone line feed handles control flow. Numerical parameters follow using a binary sign-magnitude system where spaces and tabs stand in for zeros and ones, with a line feed marking the end.

Brainf*@k only gives you eight commands to do everything

A single pointer moves back and forth across memory cells

Brainfuck language writing Hello World Credit: Jorge Aguilar / How To Geek

The name Brainfuck pretty much tells you what you’re in for. This is about as stripped-down as a programming language can get, using only eight commands to do anything at all. Those commands are the characters >, , +, -, [, ], ., and the comma, which make up the whole language.

It works on a row of 30,000 memory cells, all starting at zero, with a single pointer that you move back and forth between them. You nudge the pointer left or right, bump values up or down one at a time, and that’s it. Anything else you type in the source code gets ignored completely.

Unsurprisingly, nobody is using this to ship software. There are no named variables, functions, or arithmetic operators. It doesn’t have a practical purpose, but it’s interesting to see what people can actually make with it.

Don’t use these languages

None of these languages will ever ship production software, and their creators would be the first to tell you that’s the whole point. They can technically do anything a real language can do, given enough memory cells and enough patience, but that’d be a waste of time. It turns out that having a readable syntax, separating code from data, and using recognizable symbols, are choices, not requirements for a language.



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *