Have you ever wondered how programming languages come to life? Just like everything else, it starts with a problem you want to solve. When it comes to weird programming languages, it’s more down to a challenge. Some esoteric programming language creators need more tools to test an idea, and some just want to express their creativity.
Weird programming languages come to life when programmers push language design conventions, and most of them are not easy to use. Quite the opposite; try writing Chicken 20 times. To sum it up: weird programming languages are languages used to challenge one’s skills.
Weird programming languages will drive you nuts, and you will love it. Most of them started as a joke. Let’s dive in!
The psychological secret behind funny coding languages
Did you know that there is scientific proof that humor increase creativity? Laughter and humor are very complex cognitive functions that involve the entire brain. While the left brain hemisphere “sets up” the joke, the right one helps understanding it.
During research at Northwestern University, one group of people watched a comedy, while the other watched a horror movie (The Shining). After that, both groups had to solve a puzzle. Can you guess which group was more creative?
The situation is similar with sarcasm. It can increase creativity, but only if used in a safe place when trust between people exists.
Programmers have a specific type of humor. These weird programming languages boost creativity not only of people who create them but of those who read or use them. So, if you have an idea of making some funny coding language, go for it! The more you complain, the less creative you are, and the more humor you use, the more creative you get.
As you can guess, this language is made up of lolspeak, the “language” used by lolcats. All words are capitalized and meme-fied, so you can almost imagine a cat using it! LOLCODE was designed by Adam Lindsay in 2007, a researcher at Lancaster University’s Computing Department. Although you won’t be able to use LOLCODE for anything more than reading a file or writing text to the console, the hilarity, and charm of the language make up for its disadvantages. Take a look at the ‘Hello World!’ code below. You will see how adorable it is.
CAN HAS STDIO?
I HAS A VAR
IM IN YR LOOP
IZ VAR BIGGER THAN 10? KTHX
IM OUTTA YR LOOP
How would you like to call yourself a rockstar programmer? ? It sounds excellent, and because of this joke programming language, it’s possible to become one. Rockstar programming language is designed to create computer programs that are also song lyrics. One of the reasons Dylan Beattie made it is to stop recruiters and managers from referring to people as “rockstar programmers.” Now you can have a sticker on their laptop saying “CERTIFIED ROCKSTAR DEVELOPER.” That’s rock’n’roll! Moreover, adding comments to Rockstar programs is strongly discouraged because it’s up to the audience to find their own meaning.
Here is an example: Rockstar, inspired by here-document, supports a unique language feature known as poetic literals. It allows you to simultaneously initialize a variable and express your innermost angst.
- My heart is true – initialises the variable my heart with the Boolean value true
- Tommy is nobody – initialises the variable Tommy with the value null using the nobody alias
It started as a joke that this is the programming language Trump would approve of – just as he is making America great again, owners hope that this language will make programming great. Although development on this project has stopped, owners want to send a strong message. They think that this joke isn’t funny anymore and want to influence people to actually do something about severe problems in the world. For example, you can donate to charity instead of spending your time beating the “Trump is ridiculous” meme to death.
Here are several convenient features that TrumpScript uses:
- No floating point numbers, only integers. America never does anything halfway.
- All numbers must be strictly greater than 1 million. The small stuff is inconsequential to us.
- There are no import statements allowed. All code has to be home-grown and American made.
- Instead of True and False, we have the keywords fact and lie.
- Only the most popular English words, Trump’s favorite words, and current politician names can be used as variable names.
- Error messages are mostly quotes directly taken from Trump himself.
This language is made to play with your mind – it is notoriously difficult to program in. Brainf*CK is not intended for practical use but to challenge and amuse programmers. This is a minimalistic language that uses only eight commands and an instruction pointer, each made up of a single character. Creator Urban Müller was still a physics student when he made this language (in 1993). Since then, this obscure language has reached almost a cult following. Let’s see how a sample of the headache-inducing code that will print out “Hello world!” looks like:
This exciting programming language uses the source code that looks exactly like a Shakespeare play. The characters in the game are variables, and constants are decided by positive or negative nouns. For example, if Hamlet is a negative value, you can put him and another character on the stage and let that character insult Hamlet. You can add input and output by having someone tell a name to listen to their heart and speak their mind. You can see now why this program is so different from others – programming language includes characters, titles, scenes, acts, enter, and exit directives, making it look much like Shakespeare’s plays.
A piece of code in Shakespeare is broken into Acts, which contain Scenes in which characters (variables) interact:
Act I: Hamlet’s insults and flattery.
Scene I: The insulting of Romeo.
Most programming languages ignore whitespace characters, so Edwin Brady and Chris Morris created this language as an April Fools’ joke. Whitespace uses them as commands, missing non-whitespace characters instead. It understands only spaces, tabs, and newlines. Here is an example (spaces are marked with an S and tabs with a T):
S S S T S S T S S S
S S S S S T T S S T S T
S S S S S T T S T T S S
S S S S S T T S T T S S
S S S S S T T S T T T T
S S S S S T S T T S S
S S S S S T S S S S S
This exciting programming language uses MIDI files as source code: the pattern of notes determines commands. Programmer-musicians will love Velato because they can compose a musical piece that fills the constraints necessary to compile to a working Velato program. Each song has a secret message, and the program determines when it’s compiled as Velato. So, let’s make some music and code at the same time!
As crazy as this may sound, it’s the truth – this language allows only one world, and this word is “chicken”! Swedish programmer and creator of this language, Torbjörn Söderstedt, was inspired after hearing Doug Zongker’s parody of scientific speeches to make Chicken programming language. To write the whole code would take half the page and consist of nothing but the word ‘chicken,’ so here is just a piece of code:
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken
Piet is a so-called esoteric programming language, and it’s very arty! Programs are bitmaps that look like abstract paintings, and the basic building block for Piet programs is the color block. However, the colors are unnecessary, but the transitions – transitions in hue and darkness form the code. It definitely goes into a group of weird coding languages!
Piet is created by David Morgan-Mar but named after the Dutch painter Piet Mondrian. He had an increasingly abstract style – he reached a point where his artistic vocabulary was reduced to simple geometric elements. Watch the video and find out more about this funny coding language:
This unique, two-dimensional programming language was created by Chris Pressey in 1993 for the Amiga. Your code is placed on the playfield with a fixed size. As its instruction pointer moves along, it pushes or pops values to or from the stack.
There is no comment syntax in Befunge. If you want to embed documentation in the code, the programmer simply routes the control flow around the “comment” area to never execute the text in that area. This weird programming language will definitely blow your mind, mostly because it’s one of the oldest.
This is how you write “Hello, world!” in Befunge:
- 0″!dlroW ,olleH”>:#,_@
Here are some commands used in Befunge:
- — * / % Add, subtract, multiply, divide or perform modulo division of two top stack values. The bottom element is used as first operand, the top one — as the second
- ! Logical NOT
- ` Greater Than
- < > ^ v Make instruction pointer face left, right, up or down
- ? Make instruction pointer face random direction
- _ | Horizontal/vertical IF. Both commands pop the topmost element of the stack; if it equals 0, they perform > v commands. Otherwise, they perform < ^ commands
- ” Toggle string mode. In string mode, each character encountered by the instruction pointer is pushed on the stack (as its ASCII-code)
- : Duplicate top stack value
The fact is that some of these languages made programmers totally confused, but some of these ideas influence the entire industry. There are hundreds of funny coding languages like those on our list.
Some of them are made just for fun, some are meant to be just different from others, but there are few of them that want to send a strong message to the audience. Try playing around with weird programming languages, you may boost your creativity and improve your skills.