The 10 Weirdest Programming Languages

Programming languages are supposed to be easy to use and learn. They should give you structure and allow you to solve real problems. Their syntax should be clear and understandable, and their implementations bug-free and fast. Sometimes programming language designers create a language that goes against these principles, either as research or for fun. Here are 10 of the most weird and impractical ever created.

1) LOLCODE

Few programming languages are infused with the internet age as much as LOLCODE. It was created in 2007 by Adam Lindsay, researcher at Lancaster University. The keywords of the language are all capitalized and meme-fied. You can almost imagine a cat using it in production!

HAI
CAN HAS STDIO?
I HAS A VAR
IM IN YR LOOP
   UP VAR!!1
   VISIBLE VAR
   IZ VAR BIGGER THAN 10? KTHX
IM OUTTA YR LOOP
KTHXBYE

As with most of the languages in this list, there is no standard library to speak of. This means that you won't be able to use LOLCODE for anything more than reading a file or writing text to the console. If you need a more powerful version, check out LOLPython, which is inspired by LOLCODE and gives you access to all of Python's powerful libraries.

For more code and examples, see this Wikipedia entry.

lolcode.jpg

2) Glass

Glass is an esoteric programming language developed by Gregor Richards in 2005. It combines an unintuitive postfix notation with heavy object-orientation, requiring extensive juggling of a main stack combined with its object-oriented structure. According to the author no other language is implemented like this, because it would be idiotic.

Here is an example of a program that outputs a Fibonacci sequence:

{F[f(_a)A!(_o)O!(_t)$(_n)1=,(_isle)(_n)*(_a)(le).?=/(_isle)^\(_n)*(_a)
s.?(_t)f.?(_n)*(_a)s.?(_t)f.?(_a)a.?]}{M[m(_a)A!(_f)F!(_o)O!(_n)=(_nlm)
=/(_nlm)(_n)*(_f)f.?(_o)(on).?" "(_o)o.?(_n)(_n)*(_a)a.?=(_nlm)(_n)*
(_a)(le).?=\]}

See more examples and notes in this esolang wiki page.

glass.jpg

3) Brainfuck

Brainfuck is the superstar of obscure languages, reaching almost a cult following. It is notoriously difficult to program in, with only eight simple commands and an instruction pointer. It is designed to challenge and amuse programmers, and was not made to be suitable for practical use. It was created in 1993 by Urban Müller. Here is what a "Hello world!" program looks like:

++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.
<<+++++++++++++++.>.+++.------.--------.>+.>.

Read more about it here.

brainfuck.jpg

4) Chicken

Chicken is not only the name of the language, but also the only keyword that is allowed in it! The number of repetitions and new lines determines the opcode which is executed. An example program follows. Can you guess what it does?

chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken

Read more about it in this article.

chicken.jpg

5) Whitespace

Whitespace is a remarkable programming language. It understands only spaces, tabs and new lines, and ignores everything else. This makes it possible to have a regular program written in another language like JavaScript, the indentation of which is a program in whitespace! Here is an example that prints out "Hello, world!" (spaces are marked with an S and tabs with a T):

S S S T    S S T   S S S 
T   
S S S S S T T   S S T   S T 
T   
S S S S S T T   S T T   S S 
T   
S S S S S T T   S T T   S S 
T   
S S S S S T T   S T T   T   T   
T   
S S S S S T S T T   S S 
T   
S S S S S T S S S S S 
T   
S S S S S T T   T   S T T   T   
T   
S S S S S T T   S T T   T   T   
T   
S S S S S T T   T   S S T   S 
T   
S S S S S T T   S T T   S S 
T   
S S S S S T T   S S T   S S 
T   
S S S S S T S S S S T   
T   
S S

Learn more here.

whitepsace.jpg

6) ///

/// is a minimalist language that consists of only one operation - string substitution in the form /source/replacement/. It was invented by Tanner Swett in 2006. The language is very limited, but some clever programmers are able to turn the string substitution operation into fully working programs that loop and output data. Here is a simple "Hello, world!" program:

/ world! world!/Hello,/ world! world! world!

Learn more here.

shash-slash-slash.jpg

7) Befunge

Befunge is a two dimensional programming language. Your code is placed on play field with a fixed size. Each cell of the playfield can hold either code or data, and your program can replace any cell it wishes with either. The interpreter starts at the top-left cell and continues to the right. You can control the direction which the interpreter takes with special directional instructions. For example this is an infinite loop:

>v
^<

And this is a "Hello, world!":

0"!dlroW ,olleH">:#,_@

Learn more here.

befunge.jpg

8) Piet

Piet is a programming language in which programs are bitmaps which look like abstract paintings. The basic building block for Piet programs is the color block. It supports 20 distinct colors, with some implementations having support for more. The compilation is guided by a "pointer" that moves around the image, from one continuous colored region to the next. Here is a "Hello world!" program:

Piet_Program_Hello_World.gif
Hello World in Piet

Learn more on the language's homepage.

piet.jpg

9) Malbolge

Malbolge is a programming language invented by Ben Olmstead in 1998, named after the eighth circle of hell in Dante's Inferno. The name was not chosen randomly - the language was specifically designed to be impossible to write useful programs in. A few years after its introduction, weaknesses were found in the design which make it possible to write Malbolge programs. You still have to be a cryptography scientist to write a meaningful program in it, though. Here is what 'Hello World!" looks like in Malbolge:

('&%:9]!~}|z2Vxwv-,POqponl$Hjig%eB@@>}=<M:9wv6WsU2T|nm-,jcL(I&%$#"
`CB]V?Tx<uVtT`Rpo3NlF.Jh++FdbCBA@?]!~|4XzyTT43Qsqq(Lnmkj"Fhg${z@>

Learn more here.

malbolge.jpg

10) ~English

~English is a programming language that attempts to imitate natural sounding language. Its syntax is very loose to give the writer a greater freedom of expression. No functions can be defined by the programmer - he may only use the built-in ones. Here is an example program:

Display "Hello world!" and a newline.
Stop the program.

Learn more about the language here. You might also be interested in Shakespeare.

english.jpg

Honorary mention: JavaScript

JavaScript is the most popular programming language today. The side effect of this is that every idiosyncrasy of the language, however subtle it is, causes bugs in the code of thousands of programmers every day, which earns JS a place on this list. There is an entire website dedicated to JavaScript's weirdness, but to give you an example, here are two small JS snippets that are perfectly valid (you can try them out in your console):

// This prints 10:
alert(++[[]][+[]]+[+[]]);

// And this "fail":
alert((![]+[])[+[]]+(![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]);

See these StackOverflow questions for more info: 1, 2.

javascript.jpg

Conclusion

Esoteric languages like those included in this collection, are a way to propose and validate new ideas. Sometimes these ideas influence the entire industry. Most of the time, though, they are so impractical that they remain niche and esoteric. You just learned about 10 of them, but there are hundreds more.

Bootstrap Studio

The revolutionary web design tool for creating responsive websites and apps.

Learn more

Related Articles

Facebook has been created in LOLCODE :D

At least you could have used extensively older CL's such as LISP or TCL. Though most people seem to think that C:'s don't go further back then 1997 :(

Muhammed AK

Only JS :(

I would add one more : goto++ !
The manual page for this one is french only, but it is really a cool one :-D
See by yourself : http://www.gotopp.org

A great list!
But I'm shocked and surprised that Intercal wasn't mentioned.
In any list of 10 such languages, I think you should allow for Intercal as number 11.

This is so far the most entertaining article that i've come across in any technical forums.. awesome collection...

Awesome collection. Did not know such languages existed. Thanks for sharing.

Sasha Zinevych

This is so funny! Are those languages actually used by anyone?

Taylor Hunt

I'm actually writing something in Chicken as we speak.

You appear to have missed the original esoteric programming language, INTERCAL. INTERCAL brought us trits instead of bits, a compiler that likes polite code (a certain number of lines have to start with PLEASE DO instead of just DO) but hates brown-nosing (not too many PLEASEs), a COME FROM statement (instead of GOTO), and no arithmetic as standard.

And if this is too normal for you, there's also Quantum INTERCAL, in which it's perfectly valid to say:

PLEASE DO ABSTAIN FROM ABSTAINING WHILE REINSTATING IT

Wow, So I have more to learn.

Abhishek

Taxi is also pretty cool.

http://bigzaphod.github.io/Taxi/

try chicken programming language , like a boss !