My Favorite Esolangs

It’s Sunday, a perfect day to do something useless and impractical, yet beautiful, like 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

No list of esolangs would be complete without mentioning 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:

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

If you like modern art, the name Piet Mondrian should sound familiar to you. This innovative Dutch painter is famous for his abstract composition of fundamental colors and shapes.

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

The Autopsy programming language has only 2 instructions, . and ;, and 4 unbound registers.

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

As a guy born in the 80s I unconditionally adore the atmosphere and gentle humor of action movies starring Arnold Schwarzenegger. Many of his popular quotations became a part of everyday conversation and can still be heard even today.

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

To code programs in i like frog you need a keyboard with only three keys: i, like, and frog, obviously.

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

If you are a programmer and like poetry, the Poetic programming language was made precisely for you.

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

Unreadable has a clear goal: to be as unreadable as possible.

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

I saved the best for last. While Unreadable is an utter nightmare, there is at least something to read. However, there is a programming language that you literally cannot read.

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

Let’s say Hello in Whitespace:
















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

Conclusion

Esoteric programming languages are an adorable discipline of computer (pseudo)science.

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.

Happy programming!