© 2021 CyberNews - Latest tech news,
product reviews, and analyses.

If you purchase via links on our site, we may receive affiliate commissions.

Code in the words of Shakespeare? Why not


Being very good at something can become very dull, very quickly. Some ease this burden with creativity. That is how troves of peculiar programming languages, dubbed esoteric, were born. Take a look at some of the most audacious ways to over complicate a simple task.

There is an entirely different world of programming beyond your usual Pythons and Javas. A group of languages aptly named esoteric cater to connoisseurs searching for ways to experiment with the weird, the difficult, and the funny.

Esoteric programming languages or esolangs, as the community of users calls them, are perfectly workable yet very strange, funny, or both. Some, like Befunge, are meant to test one’s ability to crack the most challenging syntax. While others, for example, Whitespace, seem to be crafted to make fun of the very field they’re supposed to be used in.

A community website for esolangs claims that the term ‘esoteric’ was coined by the godfather of esolangs Chris Pressey, who created the infamous Befunge language. However, the title of the earliest known esolang is attributed to INTERCAL, a programming language developed by Donald R. Woods and James M. Lyon in 1972.

The design goal was to make a language with beautiful source code that resembled Shakespeare plays. There are no fancy data or control structures, just basic arithmetic and gotos.

The language employs the use of statements that are followed by DO, PLEASE, or PLEASE DO. If anything, the use of these particular terms provides the code with a touch of comic relief akin to a Monty Python sketch. Coincidentally, one of the most popular languages of all, Python, took its name from the same legendary TV show.

Esolangs, however, were thrust closer to the mainstream in the early ’90s, with Befunge and Brainfuck capturing the attention of early programmers and playing into aesthetics set up by the cultural phenomena such as the Church of the Subgenius – going against the mainstream.

There are different reasons why capable people dedicate time and effort to craft a programming language that is unlikely to go outside the community. Esolang fans recognize several reasons for creating a new language: minimalism, conceptuality, weirdness, brevity, fun, etc.

Currently, hundreds if not thousands of esoteric languages exist, and we’ve decided to pick some of the weirdest for you to explore.

Whitespace

Hello, World!

[LF][Space][Space][Space][LF]
[Space][Space][Space][Tab][LF]
[Tab][LF][Tab][Space]
[Space][Space][Space][Tab][LF] 
[Tab][Tab][Tab]
[Tab][LF][Space][Space]
[Space][Space][Space][Tab][LF]
[LF][Tab][Space][Tab][LF]
[LF][Space][LF][Space][LF]
[LF][Space][Space][Tab][LF]
[LF][LF][LF]

The name is self-explanatory as only white space is used for syntax, which means that everything other than spaces, tabs, or linefeeds is ignored. Edwin Brady designed the language in 2003 to correct the injustice in the programming world.

“Most modern programming languages do not consider white space characters (spaces, tabs, and newlines) syntax, ignoring them, as if they weren’t there. We consider this to be a gross injustice to these perfectly friendly members of the character set. Should they be ignored, just because they are invisible?,” explains Brady.

Thus, Whitespace is a language that seeks to redress the balance, and any non-whitespace characters are ignored. The funniest part of Whitespace is examples of what it looks like, which is, well, an empty space.

Shakespeare

As the name implies, this esolang is derived from the famous English writer William Shakespeare. The language was created in 2001 by Karl Hasselström and Jon Åslund. Each program is equipped with a title, acts, scenes, and other requisites necessary for  a Shakespearean play.

“The design goal was to make a language with beautiful source code that resembled Shakespeare plays. There are no fancy data or control structures, just basic arithmetic and gotos,” explain the creators of the language.

And precisely, that decision makes all the difference. For example, a simple ‘Hello World!’ program looks like an excerpt from a quality play.

Piet

'Hello, World!' program in Piet programming language. Image source

The artsy member of the esolang family, Piet was invented by David Morgan-Mar and named after a pioneer of abstract art Piet Mondrian. The language is color-based, which makes programs resemble a pixelated painting.

“I would have liked to call the language Mondrian, but someone beat me to it with a rather mundane-looking scripting language. Oh well, we can’t all be esoteric language writers, I suppose,” claims the author of the language.

Piet is a stack-based language that uses 20 colors. The language is often used to set puzzles in various competitions.

Befunge

Hello, World!

64+"!dlroW ,olleH">:#,[email protected]

The legend goes that the name of the infamous programming language was born out of a typo. Supposedly, someone tried to write ‘before’ on a BBS chat, but since it was 4 AM, only ‘befunge’ came out. Parley took the mistake and ran with it, creating one of the most notable names in the esolang universe.

Programs in the language are arranged in a two-dimensional grid. Befunge (now called Befunge-93 due to many later modifications) is a reflective stack-based language, allowing the program to alter itself. Presumably, the key objective of Befunge was to create a language that was extremely difficult to compile.

Brainf*ck

Hello, world!

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

Another legendary esoteric language that saw the light of day in 1993 is Brainf*ck. Designed by Urban Müller, it was intended as an attempt to make a language for which the author could write the smallest possible compiler using the Amiga OS. Over the years, it inspired dozens of new esolangs and numerous modifications.

The somewhat offensive name of the language is no accident since it’s meant to illustrate that not everyone might find the experience soothing. All characters other than ><+-.,[] are considered comments and are ignored. It is famous due to its extreme minimalism.

The author created a compiler that used only 240 bytes, but fans of the Brainf*ck managed to push the number down to 100 bytes eventually.

Ook!

Hello, World!

Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook! Ook! Ook? Ook! Ook? Ook.
Ook! Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook?
Ook! Ook! Ook? Ook! Ook? Ook. Ook. Ook. Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook! Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook! Ook. Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook! Ook! Ook? Ook! Ook? Ook. Ook! Ook.
Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook? Ook! Ook! Ook? Ook! Ook? Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook.
Ook? Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook! Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook.
Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook!
Ook! Ook. Ook. Ook? Ook. Ook? Ook. Ook. Ook! Ook.

One of the funnier iterations of the Brainf*ck is a joke esolang named after a sound an Orangutan might make. David Morgan-Mar created the language, and it includes only three syntax elements: Ook., Ook? and Ook!

LOLCODE

Hello, World!

HAI 1.2
    VISIBLE "Hello, World!"
KTHXBYE

True esolang enthusiasts will scoff at the inclusion of LOLCODE since the language is not two-dimensional and uses standard procedural language. With that in mind, the language itself looks weird enough to be on the same list.

LOLCODE was created in 2007, around the same time when various iterations of the LOLCATS meme stormed the internet. Thus, the language employs typical meme syntax, for example, using all caps and terms that most of the internet dwellers are familiar with.

Type ‘HAI [version]’ to introduce the program, ‘CAN HAS [library]’ to include a library, or ‘GIMMEH [var]’ to command the program to read a string from the standard input stream into the variable.

Want to know more about esoteric languages? In that case, we suggest diving into a Wikipedia-based Esolang community page that holds one of the most comprehensive libraries on various esolangs and their iterations.

Leave a Reply

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