The Bizarre World of Esoteric Programming Languages

A standard programming language like Python or C++ is often characterized by a well-defined syntax, bug-free and fast nature, and ease in understanding the language. What if there exists a set of languages that challenge such norms of programming languages?

Enter esoteric languages.

Esoteric programming languages, or esolangs, are a class of languages that push the conventions of language design. They represent a rather wacky and exciting side of programming languages and computer science. There isn’t a strict definition for a programming language to be considered esoteric; however, those regarded as esolangs are usually not designed for actual functionality, unlike our typical languages, along with the fact that they defy the rules of traditional programming in some form or the other.

Examples of Esoteric Languages:

Esolangs come in a wide variety of flavours and varying ranges of wackiness. From languages that use pixel art to ones that take inspiration from PM Modi’s speeches, there are a lot of interesting esolangs out there, some of which are listed below: 

  • Brainf***

A rather NSFW title for a language, this esolang stays true to its name. Designed by Urban Muller, it is a language created with the intention to implement the smallest possible compiler and is known for its extreme minimalism. It has only eight commands, a data pointer, and an instruction pointer. Even though the language is a headache to use, it is a Turing-complete language (language used to simulate a Turing machine).

A “simple” Hello World program
  • Piet

If you like programming and abstract art, this language will probably interest you as it combines both worlds into one language. Piet, taking inspiration from the Dutch painter Piet Mondrian and created by David Morgan-Mar, is a stack-based language in which programs look like abstract art. The language uses 20 colours, arranged according to hue and brightness, with black and white being used for control flow. As the program flows between different colour blocks, the block’s hue and brightness determine the type of the command. It is also Turing-complete.

Hello World in Piet
  • ArnoldC

ArnoldC is an esolang that takes famous quotations of the Terminator himself and uses them as actual lines of code. Designed by Lauri Hartikka, who developed the language using Scala, commands are replaced by famous movie quotes of Arnold Schwarzenegger, enabling one to write code using his one-liners.

“Hello World” in ArnoldC

The Purpose of Esolangs

Looking at the above examples, and as mentioned earlier, esolangs are not usually well-suited for writing proper programs. It is rather difficult for programmers to use these languages for serious functionality, unlike common languages like C++ or Python. However, “not designed for serious functionality” doesn’t necessarily mean esolangs do not have any purpose at all. Some of their objectives are as follows.

  • Minimalism: Languages like Brainf*** and Lazy K aim to have as few instructions as possible. As a result of this, even if the language is theoretically Turing-complete, they often become complicated to use, as we’ve seen earlier. (Such languages are known as Turing Tarpits)
  • Obfuscation: Languages like Unreadable, JSF**k (which is an esoteric form of JavaScript), and many esolangs, are designed in a way that makes it difficult to read code. It can be used to code and protect it from potential attackers, bypass security features or confuse people. For example, a program in Piet would look like a piece of art to most people, but it is, in fact, an executable piece of code.
  • Exploring new concepts: Esolangs can be used to explore alternative ideas and ways to design languages. For example, Befunge is a language where a two-dimensional grid forms the basis for the code, and execution can happen in any direction, which pushes the limits on how a program will compile.
  • Conciseness:  Some concise esolangs like Pyth and GolfScript see their usage in “code golf,” where people compete to solve programming tasks with concise code.
  • Just for fun and randomness: Some esolangs exist for the sole purpose of making it nearly impossible for people to code in (e.g., Malbolge). Some of them showcase the personal interests of the creators (e.g., ArnoldC, Shakespeare), while some function as a joke (e.g., COW – where most instructions are some form of “Moo”)

Conclusion

To sum it up, esoteric languages break new ground in programming language design. Esolangs can indeed cause a decent amount of pain to understand and use; however, as annoying as esolangs are, they are exciting and offer a fresh perspective into the world of programming languages.

-By Sudarshan Sundarrajan, Third Year Department of Computer Science Engineering

Leave a Reply

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