Tip 72

Try an Esoteric Programming Language

by Ildar Akhmetov

Some programming languages are not built for everyday use, but they make you think in ways you never thought were possible.

I'm a huge fan of esoteric programming languages, or "esolangs." These languages are strange.

In Rockstar, your programs look like rock song lyrics. Variables are named things like "Tommy" and "my dreams," and a loop may look like "While the world is on fire."

In Forth, everything is a stack. You don't call functions with arguments -- you push values onto a stack and the function pops them off.

In Befunge, you code on a 2-dimensional grid (so an if statement is a visual "switch").

In Whitespace, the only available tokens are whitespace characters: space, tab, and newline.

...and YES, all of the languages above (and most esolangs) are Turing complete -- meaning you could, in principle, write any program in them. (I usually start with Hello World, then work up to binary search :-) )

There's a book that introduces esolangs: Strange Code by Ron Kneusel. Just take a look at the subtitle: "languages that make programming fun again." That's the pitch -- programming used to feel like solving puzzles, and somewhere along the way it started feeling like configuring YAML files. Esolangs bring the puzzle back.

LLMs make it easier to build, but if you miss the pure joy of writing code -- try an esoteric language. Pick up Strange Code, or take a look at esolangs.org, an esoteric programming languages wiki.

References

  • Esolang wiki (esolangs.org) -- the community wiki cataloguing esoteric programming languages.
  • Strange Code by Ronald T. Kneusel -- No Starch Press book introducing esolangs, from Turing completeness to building your own.
  • Rockstar -- the official site, with an online interpreter; programs read like power-ballad lyrics.
  • Forth -- Wikipedia overview of the stack-based language.
  • Befunge -- the 2D grid language on the Esolang wiki.
  • Whitespace -- the language whose only tokens are space, tab, and newline.
  • Turing completeness -- why "you could write any program in them" is literally true.

Related Tips

Get tips in your inbox

Two new tips every week.

Powered by Buttondown