My Favorite Esolangs

Useless and impractical, yet beautiful, esoteric programming languages.

Esoteric programming languages, esolangs for short, are computer programming languages created mostly just for fun. They are usually very impractical, hard to write or even read, but always funny, lovely, weird, or in some other way interesting.

Some esolangs are meant as an exploration of alternative ways to design programming languages; many are created merely as a joke.

Esolangs can be thematic (for instance, imitating Shakespeare’s plays or cooking recipes) and tend to be minimalistic, some experiment with exotic techniques such as two-dimensional code or coding in colors.

Many esolangs are Turing-complete, but there are a lot of interesting languages that are not.

In the following text, we will explore a few that I find particularly beautiful.

Brainfuck

Brainfuck is a Turing-complete language with only eight instructions.

The minimalism of brainfuck makes it an ideal reference to prove if a language is Turing-complete or not simply by reducing its instruction set to brainfuck.

Brainfuck has many alternatives and equivalents that are created by substitution of the instructions.

Here are all eight brainfuck instructions:

  • > Move the pointer to the right.
  • < Move the pointer to the left.
  • + Increment the memory cell at the pointer.
  • - Decrement the memory cell at the pointer.
  • . Output the character signified by the cell at the pointer.
  • , Input a character and store it in the cell at the pointer.
  • [ Jump past the matching ] if the cell at the pointer is zero.
  • ] Jump back to the matching [ if the cell at the pointer is nonzero.

A brainfuck program operates on an array of cells initially set to zero. Values are interpreted as ASCII characters by the runtime environment.

This program prints out the words Hello World!:

++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.

Try it in my online interpreter!

Although brainfuck was never meant to be particularly useful, it is used for its brevity as an example language in many publications and proof-of-concept implementations, which makes brainfuck, paradoxically, pretty useful.

Check out my brainfuck compiler to WebAssembly.

Piet

Similar ideas are to be found in the code of the Piet programming language, whose programs are bitmaps that look like Mondrian’s paintings.

Piet programs are executed by moving a pointer from one continuous colored region to the next and evaluating the instructions based on the hue and brightness.

Piet program that prints Piet:

Wikipedia

Programming is genuinely an art.

Autopsy

A program moves the pointer and increases/decreases the registers based on simple rules. The program never halts. After the last instruction has been reached, the pointer returns to the first instruction.

Code in Autopsy also looks like a type of modern art:

;...;;..;;..;;..;;..;..;;..;.;;...;...;...;.;...;;..;;..;;.;;.;...;;..;;..;;..;;..;..;;..;.;;...;...;...;.;...;;..;;..;;.;;.;...;;..;;..;;..;;..;..;;..;.;;...;...;...;.;...;;..;;..;;.;;.;...;;..;;...;;...;;.;;..;;..;.............;...;...;.;;...;...;...;.;...;;..;;..;;.;;...;...;...;.;...;;..;;..;;.;;...;...;...;.;...;;..;;..;;.;;...;...;...;.;...;;..;;..;;.;;...;...;...;.;...;;..;;..;;.;;...;...;...;.;...;;..;;..;;.;;...;...;...;.;...;;..;;..;;.;;...;...;...;.;...;;..;;..;;.;;...;...;...;.;...;;..;;..;;.;;...;...;...;.;...;;..;;..;;.;;...;...;...;.;...;;..;;..;;.;;...;...;...;.;...;;..;;..;;.;;...;...;...;.;...;;..;;..;;.;;.;...;;..;;..;;..;...;...;;...;.....;.;;...;...;...;.;...;;..;;..;;.;;...;...;...;.;...;;..;;..;;.;;...;...;...;.;...;;..;;..;;.;;...;...;...;.;...;;..;;..;;.;;...;...;...;.;...;;..;;..;;.;;.;...;;..;;...;........;...;;.;;..;;..;...;...;...;.;;...;...;...;.;...;;..;;..;;.;;...;...;...;.;...;;..;;..;;.;;...;...;...;.;...;;..;;..;;.;;...;...;...;.;...;;..;;..;;.;;...;...;...;.;...;;..;;..;;.;;...;...;...;.;...;;..;;..;;.;;...;...;...;.;...;;..;;..;;.;;...;...;...;.;...;;..;;..;;.;;...;...;...;.;...;;..;;..;;.;;...;...;...;.;...;;..;;..;;.;;...;...;...;.;...;;..;;..;;.;;...;...;...;.;...;;..;;..;;.;;.

Interestingly enough, Autopsy was proven to be a Turing-complete programming language, so there is nothing to prevent you from adopting it in your codebase.

ArnoldC

ArnoldC is a joke programming language whose commands are based on those famous quotations.

Programs written in ArnoldC look really cool:

IT'S SHOWTIME
TALK TO THE HAND "hello world"
YOU HAVE BEEN TERMINATED

Action heroes code in ArnoldC for sure.

I like frog

I like frog has 16 commands all formed by a combination of the three keywords, separated by newlines.

This is how you can say Hello World! when you like frogs:

like frog i frog i like frog i like i like i frog like frog i like frog i frog i frog like i frog like i like i frog like i frog like frog i like i frog like i frog like frog like i like frog i frog like i like i like frog i like i like i like frog i frog i frog like frog i frog like i frog like frog like i frog like frog i like frog i like frog like i frog like i like i frog like i like frog i like i like frog i like i like frog

However, you may like turtles even more.

Poetic

In Poetic, programs are poems and programmers are les poètes maudits:

stranger, i confess
i have longstanding problems
i'm unprepared for

This program copies its input directly to output — it literally recites.

Unreadable

The only used characters are " and ', usually presented in a font where a double-quote is indistinguishable from two single quotes.

No spaces or newlines are allowed.

This Hello, World! program is quite uneasy to follow:

'"'""'""'""'"'"'""""""'""'"""'""'""'""'""'""'""'""'"'""'""""""'""'""'""'"""'""'""'""'""'""'""'""'""'""'""'""'""'""'""""""'""'""'"""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'"'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""""""'""""""""'"""'""'""'""'""'""'""'""'""'""'""'""'""'""""""'"""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'"""'"'"""""""'""""""""'"""'"'"""""""'"""'"'"""""""'""'""'"""'"'""'""'""'"'""'""'""'"""""""'""'"""'"'"""""""'""'"""'"'"""""""'""'""'""'"""'"'""'"""""""'"""

If you are about to leave your job anytime soon because your colleague is a total jerk, you might code one microservice in Unreadable as a farewell message. All in all, Unreadable is a Turing-complete language.

Whitespace

Whitespace’s syntax uses only whitespace; everything other than spaces, tabs, or linefeeds is simply ignored.

Let’s say Hello in Whitespace (ignore all dots):

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

Well, some types of beauty are just invisible to the eye.

Conclusion

If you liked this short excursion into the weird world of rather confusing programming languages, you are welcome to explore more. There is much more.

I sincerely recommend trying to write a simple program in one esolang of your choice if you haven’t already done so — it’s fun!

Brainfuck is a newbie-friendly esolang that is easy to start with. You can also code your own interpreter or compiler. You might learn a lot.

Besides, the list is not finished yet. It is now time to add your own esolang…

Originally published on my blog.

Software developer and occasional blogger: https://blog.ttulka.com

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store