Happy New Year Folks!
It’s been a while since I have blogged and have a lot of catching up to do. Look for for updates, new tips, and much more over the next year. To get the ball rolling I wanted to start with something lighter. I was watching episode 10 of Elementary [http://en.wikipedia.org/wiki/Elementary_(TV_series)] and they mentioned a language called Malbolge. I’ve been coding for a long time but never heard of this language so decided to do some research. Apparently there is a major group of programming language I haven’t been exposed to: Esoteric Languages. I thought I would show some of these to folks who may have never seen them.
Esoteric Languages Defined
So what IS an esoteric language? Here is how Wikipedia defines them:
“An esoteric programming language (sometimes shortened to esolang) is a programming language designed to test the boundaries of computer programming language design, as a proof of concept, or as a joke. The use of esoteric distinguishes these languages from programming languages that working developers use to write software. Usually, an esolang’s creators do not intend the language to be used for mainstream programming, although some esoteric features, such as visuospatial syntax, have inspired practical applications in the arts. Such languages are often popular among hackers and hobbyists.
Usability is rarely a goal for esoteric programming language designers—often it is quite the opposite. Their usual aim is to remove or replace conventional language features while still maintaining a language that is Turing-complete, or even one for which the computational class is unknown.”
There is a thriving community of esolang people out there. The best place to start if you are interested in digging deeper would probably be the Esolang Wiki found here:
The language list at the Esolang Wiki is as complete as I have seen anywhere in my research: http://esolangs.org/wiki/Language_list
Interestingly, they separate general esoteric languages from joke esoteric languages with the distinction that joke languages “are not of any interest except for potential humor value. Generally speaking, they are completely unusable for programming even in theory, trivial and less interesting variations on existing esoteric languages, or too underspecified to determine any potential usability.” [http://esolangs.org/wiki/Joke_language_list]
Let’s take a look as some of the more interesting languages in the large list of esolangs.
Malbolge, was invented by Ben Olmstead in 1998, is an esoteric programming language designed to be as difficult to program in as possible. Seriously, that was the goal. It is modeled as a virtual machine based on ternary digits.
Below is the code for printing “Hello World!” (without the quotes of course) in Malbolge:
Created in 2003 by Edwin Brady and Chris Morris, Whitespace is an esoteric programming language that uses only whitespace as syntax. Everything other than spaces, tabs, or linefeeds is ignored. Below if a form of Hello World with highlighting of whitespace turned on for clarity.
Velato is a language which uses MIDI files as source code. Programs in Velato are defined by the pitch and order of notes. It is intended to allow for flexibility in composition, so functional programs will not necessarily sound like random notes. There is a tendency for Velato programs to have jazz-like harmonies.
Here is an example of Hello World in Velatio in sheet music format:
One of my favorites. LOLCODE is an esoteric programming language inspired by the language expressed in examples of the lolcat Internet meme. The language was created in 2007 by Adam Lindsay, researcher at the Computing Department of Lancaster University.
Here is an example of Hello World in LOLCODE http://esolangs.org/wiki/Hello_world_program_in_esoteric_languages#LOLCODE:
CAN HAS STDIO?
VISIBLE "HAI WORLD!"
Interestingly there was a .NET complier for LOLCODE made back in 2007 that can still be found here: http://code.google.com/p/lolcode-dot-net/
Check out this snippet from the Hello World example of DNA# (NOTE: the original was pretty long so I just opted for a shortened version):
Piet is an esoteric programming language in which programs look like abstract paintings. It uses 20 colors, of which 18 are related cyclically through a lightness cycle and a hue cycle. A single stack is used for data storage, together with some unusual operations. Piet was invented by David Morgan-Mar and is named after geometric abstract art pioneer Piet Mondrian.
Hello World in Piet is pretty cool, check this out:
Well, I hope you enjoyed these esoteric languages as much as I did. There is some seriously messed up stuff here and we have only scratched the surface. As an honorable mention you should probably look at brainf**k which not only has a cool name but is one of the more famous esolangs around: http://bit.ly/2cxjWL
Look for some “catch up” articles to follow this one and then a new series or two to come after that. Keep me honest (as some of you already have) and ping me when I don’t get an article out on the usual Tues/Thurs schedule.