In the dimension of programming languages, certain languages are widely regarded as proficient and effective, including TypeScript
, Kotlin
, and Rust
, among others. On the other hand, some may express reservations about languages like PHP
, Java
, and Perl
, deeming them as less favorable.
Beyond the conventional languages are a category of programming languages known as Esoteric languages. These are languages invented seemingly to make developers cringe at the mere mention of their names.
Can you imagine a programming language that only recognizes eight characters? Anything else written in this language, apart from the recognized characters < > [ ] , . + -
, is considered a comment. It might seem impossible! One notable example is Brainfuck, a language that executes only the characters mentioned; any other character used in coding is treated as a comment.
In this article, we will delve deeper into Esoteric programming languages (esolangs for short)
. We'll explore five examples of the most bizarre Esolangs out there, and, to top it off, we will attempt to write hello world
in some of these languages, if it's possible. Are you curious to learn more about Esolangs? Put on your helmet, and let's ride together because it's going to be a long but exciting journey.
What are Esoteric Languages?
These are programming languages created for fun, code obfuscation, or as an experiment in pushing the boundaries of programming.
Esolangs are designed to be nothing like the conventional languages developers are used to. They are the outlaws of the programming dimension that are intentionally created to have features that deviate from the normal
programming languages, either as a joke or just to push the boundaries of programming languages a little further. The intention of esolang designers is not for these languages to be used in mainstream programming, although some of these languages have led to emphasis and conversations about some mainstream programming language features.
Time to get our hands dirty. Let's dig into some of the most popular and interesting Esolangs out there.
1. Compiler Language With No Pronounceable Acronym (INTERCAL)
Imagine a scenario where including the keyword Please
in your code is mandatory; otherwise, the compiler deems it impolite and rejects the code. Striking a balance is crucial because too few Please
might be interpreted as rudeness, while an excess of politeness might also lead to rejection. Think it's impossible? Allow me to introduce you to the Compiler Language With No Pronounceable Acronym
, abbreviated as INTERCAL
βa name chosen for reasons only known to its creators, Don Woods and James M. Lyon.
INTERCAL was created in 1970 to be nothing like the conventional programming languages. It intentionally contains puzzling and redundant features; it defies the norms of typical programming languages, which make it impossible to understand.
Hello World in INTERCAL
DO ,1 <- #13
PLEASE DO ,1 SUB #1 <- #238
DO ,1 SUB #2 <- #108
DO ,1 SUB #3 <- #112
DO ,1 SUB #4 <- #0
DO ,1 SUB #5 <- #64
DO ,1 SUB #6 <- #194
PLEASE DO ,1 SUB #7 <- #48
DO ,1 SUB #8 <- #26
DO ,1 SUB #9 <- #244
PLEASE DO ,1 SUB #10 <- #168
DO ,1 SUB #11 <- #24
DO ,1 SUB #12 <- #16
DO ,1 SUB #13 <- #162
PLEASE READ OUT ,1
PLEASE GIVE UP
2. EMOJICODE
If you've ever imagined coding in emojis, then Emojicode is for you! Emojicode is a Turing complete Esolang consisting of emojis that was designed by Theo B. Weidmann. He came up with the idea after receiving texts with lots of emojis and his mind automatically started interpreting them as codes. This language uses C-style syntax for coding, but with emojis as functions.
To create an Emojicode source file, you use the file extension .π or .emojic
ππ
π
This is the basic structure of every Emojicode. The π is the special keyword[key-emoji] every program written in this language must start with. Every block of code must start with π and end with the π.
Hello World in Emojicode
π π
π π€Hello World!π€βοΈ
π
A string in Emojicode is defined as the characters positioned between any two instances of the emoji π€. To illustrate, we invoke the print function using the grinning face with big eyes
emoji π, passing the identified string as an argument. The βοΈ denotes the termination of the list of arguments supplied to the print function.
3. Whenever
Whenever
lacks control flowβthe aspect of every programming language that makes your code run in a systematic and well-structured order. This absence results in the language executing any part of the code whenever it wants, not in the order specified by the programmer. Whenever does not just lack control flow; it also lacks variables and data structures, which makes it impossible for Whenever
to be used in mainstream programming.'
Hello World in Whenever
To write 'hello world' in Whenever is done similarly to Python, with the only difference being the mandatory inclusion of a line number and a semicolon.
1 print("Hello, World!");
If we decide to write 1 print('hello');
and 2 print('World')
on different lines, we will sometimes get 'Hello World' outputted to the console or 'World Hello' at other times.
4. WHITESPACE
Unlike most programming languages that assign little or no meaning to whitespace characters, the only recognizable characters in Whitespace are the whitespace charactersβtab, space, and line feed; anything else is ignored by the language. For this very reason, a Whitespace
program looks like nothing but whitespace until you highlight the characters in the document.
The language was released on April 1, 2003, as an April Fool's joke by Chris Morris, and it is not intended to be used for mainstream programming. Obviously, who would want to use a John Cena form of programming language?
Hello World in Whitespace
5. BrainFuck
Brainfuck is not merely the name of a programming language; it also characterizes your mental state following your initial encounter with this unique language. Brainfuck exclusively acknowledges eight characters: < > [ ] , . + -
. Anything outside these recognized characters in the code is treated as a comment.
Urban MΓΌller developed Brainfuck in 1993 with the goal of creating the smallest-ever programming language compiler, measuring only 296 bytes. This endeavor followed Wouter van Oortmerssen's creation of the False language
, which had a compiler size of 1024 bytes.
Hello World in BrainFuck
>++++++++[<+++++++++>-]<.
>++++[<+++++++>-]<+.
+++++++..
+++.
>>++++++[<+++++++>-]<++.
------------.
>++++++[<+++++++++>-]<+.
<.
+++.
------.
--------.
>>>++++[<++++++++>-]<+.
Conclusion
Esolangs represent the unconventional form of programming that decides to deviate from the rules of the programming dimension. They are not meant for mainstream coding but just to push the boundaries of the programming field.
As we delve into esolangs, you begin to appreciate the importance of mainstream languages that make our everyday coding efficient and effective.
Hey Devs, g.elvisπ here and its peace out.β
Top comments (4)
Usher in brainfuck2.0 you only get to use 1 character π
Could be your final year project ππ
Great job, Elvis. Keep it up bro.
Thank you. Really appreciate this