So, I recently dove into the world of esolang and weirdlang programming languages, where the creators try to take the idea of a programming language to the limit with over the top minimalism or weirdness. Here are 6 programming languages I thought were interesting – and some of the weirdest or most obscure!
Starting with a somewhat useful programming language, Jelly is specifically designed for brevity, more specifically designed for ‘Code-golf’. Where programmers try to implement challenges in a programming language of their choice and the winner is usually the one with the fewest number of bytes or smallest number of characters. Jelly is a tactic programming language – also called a point free style language. The functions in Jelly are defined as ‘Links’ which are formed into ‘Chains’, the chains are then evaluated. I won’t go into too much detail but you can read about it on the Github of the creator of Jelly (https://github.com/DennisMitchell/jellylanguage/wiki/Tutorial).
An example Jelly program that outputs an alphabet song, done in 39 bytes! By user Jonathan Allan on the code-golf stack exchange:
A is for Ant
B is for Bit
C is for Cot
X is for Xat
Y is for Yet
Z is for Zit
Now for something completely different, Chef is a stack-based language where the programs are designed to look like cooking recipes, which the creator hoped to also be delicious. However, most of the time that’s not the case, for example the creator’s ‘Hello World souffle’ where the ‘souffle’ requires 101 eggs, 32 zucchinis and 33 potatoes to serve 1 person – but it is funny to read. Mike Worth wrote a much tastier program, that you can find here (https://esolangs.org/wiki/chef) below is the program by David Morgan-Mar, which is much shorter:
LOLCODE is a throwback to 2006. Although the memes from that era are now sadly dead, LOLCODE reminds us of the time where lolcat’s were the most hilarious thing, and LOLCODE provides a dark dystopian mirror to what life would look like if lolcat overlords took over the world – maybe if they had opposable thumbs. While the syntax is funny, there is a useable language behind it and its pretty readable, but I doubt a client would find it funny.
Here is a for loop that prints 0 to 9 in LOLCODE:
IM IN YR loop UPPIN YR var TIL BOTH SAEM var AN 10
VISIBLE SMOOSH var AN " " MKAY!
IM OUTTA YR loop
Cow is a Turing-complete and cow-friendly language, surprisingly not popular with vegetarians, and is a variation of another esoteric language of a much vulgar name. But the COW programming language comes with 4 extra instructions, all consisting of variations of Moo – MoO mOO MoO – with MMM, OOO, oom and OOM being the exceptions.
If you’re not yet amoosed, (see what I did there?) here is a sample code of a COW program that generates the Fibonacci sequence:
Named after the eighth circle of hell from Dante’s Inferno and designed to be near impossible and inconvenient to program in, Malbolge features a ‘crazy operator’ which doesn’t make sense, base three arithmetic, and self-altering code. Instructions change their function depending on their location in memory – it is closer to cryptography than programming. The author himself didn’t write a program in his own language, due to how difficult it is. Only 2 years after the arrival of Malbolge, a program was written, although not by a Human - instead it was generated by a beam search algorithm designed by Andrew Cooke.
Here is a basic ‘Hello World’ program:
Released on April fools, and unlike normal programming languages, anything that isn’t a whitespace character is ignored, only space, tab and linefeeds have any meaning.
This means that any program that doesn’t depend on white space for validity (like python) can have a Whitespace program within it, making it a polyglot.
A ‘Hello world program is written below’:
Just kidding, here is a ‘Hello world’ program written in Whitespace with syntax highlighting (from Wikipedia) where blue is a tab and red is a space:
If you want to find more esolangs or weirdlangs or learn more about the ones listed, head over to https://esolangs.org/wiki/Main_Page which is a great source of esolangs!