Computersight > Programming

Five Strangest Programming Languages

Most programming languages were designed so that the code is easy to write and understand. These were designed for the opposite reason.

LOLCODE

A Hello World program:

HAI
CAN HAS STDIO?
VISIBLE "HAI WORLD!"
KTHXBYE

What it is

LOLCODE is probably what a programming language designed by lolcats would look like. Silly and unusable, it has loops like "IM IN YR LOOP - IM OUTTA YR LOOP" and conditionals like "IZ - YARLY - NOWAI - KTHX". It has plenty of fan-written interpreters and compilers.

Brainfuck

A Hello World program:

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

What it is

Brainf*ck is the classic "Turing tarpit" - a programming language with very few instructions. Those languages are extremely hard to read, and so simple that it's hard to believe that they can do anything that other languages can do. The language has only 8 instructions - 2 that select values, 2 that increment or decrement them, 2 for input and output, and 2 that mark loops. That's it. No variables, multiplication, or even addition. You need a loop to add two values, and a complicated nested loop to multiply them. Despite this, someone actually wrote a prime factorization program in Brainf*ck - about 4,000 characters in length.

Befunge

A Hello World program:

<,_@#:

What it is

Befunge is similar to Brainf*ck in that each character represents an instruction (although it has more instructions, making it somewhat easier). The big difference lies in the fact that it is two-dimensional. It can be read horizontally or vertically in either direction, and that direction frequently changes. Whenever it encounters the characters ^<>v, it changes its direction. The code can also change itself - this makes it very difficult to compile or follow.

INTERCAL

A Hello World program: 

        PLEASE DO ,1 <- #13
DO ,1 SUB #1 <- #238
DO ,1 SUB #2 <- #112
DO ,1 SUB #3 <- #112
DO ,1 SUB #4 <- #0
DO ,1 SUB #5 <- #64
DO ,1 SUB #6 <- #238
DO ,1 SUB #7 <- #26
DO ,1 SUB #8 <- #248
DO ,1 SUB #9 <- #168
DO ,1 SUB #10 <- #24
DO ,1 SUB #11 <- #16
DO ,1 SUB #12 <- #158
DO ,1 SUB #13 <- #52

PLEASE READ OUT ,1
PLEASE GIVE UP

What it is

Intercal is short for "Compiler Language With No Pronounceable Acronym". It was designed as a parody of other languages, and designed to be as hard to program in as possible (but it is nothing compared to the next one). Instead of "GO TO" statements, it has "COME FROM" statements. The only operators present are unary and binary operators, meaning no simple addition or multiplication. As the documentation says, "Please be kind to our operators: they may not be very intelligent, but they're all we've got." Programs will not work if they're not polite enough, so you have to occasionally precede statements with "please".

Malbolge

A Hello World program:

 (=<`:9876Z4321UT.-Q+*)M'&%$H"!~}|Bzy?=|{z]KwZY44Eq0/{mlk**
hKs_dG5[m_BA{?-Y;;Vb'rR5431M}/.zHGwEDCAA@986543W10/.R,+O<

What it is

This is the hardest language to program in, hands down. Using it is more like cracking a code than writing a program. The meaning of every character depends on its position and the preceding characters. All variables are in ternary. The only operation is the "crazy" operation, which changes a number using a seemingly random table of values. Accomplishing anything in this language is a programming nightmare.  To write a "Hello World" program, one programmer had to use a genetic algorithm that worked for hours before making a program that wrote "HEllO WORld" - that was the best it could do. It took a cryptanalyst to find "encryption weaknesses" - ways to make an instruction change in a predictable way - to finally make it possible to write simple programs in Malbolge.

89
Liked It
I Like It!
Comments (22)
#1 by wing, Dec 15, 2008
what about shakespaere and whitespace?
#2 by Moo!, Dec 15, 2008
What about MOO?
#3 by Timmy Jose, Dec 15, 2008
You forgot APL ;-)
#4 by Michi, Dec 15, 2008
Shakespeare is rather simple, just with a fancy surface. And Whitespace is just a simple stack machine, similar to Brainf*ck.

I might back up APL, but it has the benefit of being a rather interesting take on programming language, and more than "just" strange.
#5 by ?!, Dec 16, 2008
lolcode? WEAK!

Piet and HQ9+? Seriously, you're missing out.
#6 by Vren, Dec 16, 2008
Thought this was going to be a bit more detailed. 20 years back, I unfortunately had to program in something called \"D\". It was column programming where each of up to 32 columns (I think), were essentially do this or don\'t switches. It was annoying of sin, and ^2 that, when you needed 33 columns. In 20 years time, I will be talking about how stupid javaScript was, and...

Actually.... why the hell am I still in computers
#7 by wjv, Dec 16, 2008
No mention of Unlambda?
#8 by Ukion, Dec 16, 2008
Where is COBOL here?? It is the strangest!

Ukion
www.detector-pro.com
#9 by jima00@gmail.com, Dec 16, 2008
What about color forth (you even need a special editor to colour your keywords)

http://www.colorforth.com/

Or tol (time oriented language), where you can program with a time base algebra and (at least in the past) = was for mathematical identity (so if you did a=true, b=false, a=b --> true=false)

http://www.tol-project.org:8081/

?
#10 by Kabloc.com.br, Dec 16, 2008
http://www.roesler-ac.de/wolfram/hello.htm

This link shows the \"Hello World\" program in more than 400 different languages !!!!

#11 by iMonad, Dec 16, 2008
Unlambda is something strange that can not be explained easily.
Also my language Arbol :)

http://www.madore.org/~david/programs/unlambda/
http://imonad.com/arbol/
#12 by pete, Dec 16, 2008
This is a pretty lame list. I mean, LOLCODE over APL?
#13 by Sharona, Dec 18, 2008
Scratching the surface of programing is where I am at, this article is interesting. Please write more of them. GREAT!
#14 by  A Wallbank, Dec 18, 2008
So much for the simpler the better, eh!
#15 by  Johanan Rakkav, Dec 18, 2008
"The simpler the better" is a distortion of Occam's Razor. :) Our explanations of reality (to paraphrase Einstein) should be as simple as possible, but not simpler. The same goes for programming languages, which should not be so simple as to leave so many fundamental elements of reality unaccounted for.

(Yeah, yeah, I know, the authors of some of these programs at least are just being major screwballs. :D )

In Malboge:

> "The meaning of every character depends on its position and the preceding characters."

Well whaddaya know...someone has reinvented medieval neumes! In a sense, musical notation is a programming language (that's why programs like Finale and Sibelius can emulate it so well), and some medieval neumes seem almost as confusing as Malboge.

In the Mainz Troper:

> "The *virga* signifies that the note is higher *either* than the one preceding it *or* than the one which follows, and the *punctum* or *tractulus* can show either a lower note or a repetition of the same pitch. The choice of meaning depends on the context in which the sign occurs. This is another important difference between neumatic notations and modern music notation, where the significance of each note can be understood in isolation: neumes are very dependent on other neumes around them in order to be properly understood."

-- Nicholas Bell, MUSIC IN MEDIEVAL MANUSCRIPTS (The British Library, 2001), pp. 13, 16.

Also neumes generally do not indicate the rhythm of the music, and they only indicate pitch relative to each other, not against an absolute standard of pitch (ibid., p. 12).

Thankfully *ancient* neumes were a lot clearer, representing exact pitch values (cf. Suzanne Haik-Vantoura, THE MUSIC OF THE BIBLE REVEALED, 1991, several chapters, and my Web site http://www.rakkav.com/biblemusic).
#16 by P, Dec 24, 2008
The befunge program is incorrect. (It only writes a null char and exits.)

This is a Befunge-program (that is also Unefunge-98 compatible):

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

I actually like Befunge, the programs gets really interesting when they are bigger.
#17 by jose, Dec 30, 2008
I think i have a programming code that's very easy to understand and also very hard "banjuka"

%40%::
kill## for 1
^**(Hello)
strangest code for Hello program............
#18 by  Ashley Fisher, Jan 5, 2009
I was glad to notice someone on Triond writing an article about strange programming languages, though I think I would've put Chef on the list if it was me...

KTHXBYE
#19 by , Jan 14, 2009
hahah assembles is a girl game compared to that
ahahhaah nice article!
#20 by Cact, Jan 22, 2009
Some one forgot piet!!
#21 by CraZy675, Mar 7, 2009
Wow got stumbled! Lucky trinod user.
#22 by phaoloo, Jun 30, 2009
It's the first time I see them indeed. Now I love C# so much cos it is friendlier than these haha
Post Your Comment:
Name:  
Copy the code into this box:  
Post comment with your Triond credentials?
Inside Computersight

Communication & Networks

 /

Computers

 /

Hardware

 /

Operating Systems

 /

Programming

 /

Software


Popular Tags
Popular Writers
Powered by
Computersight
About Us
Terms of Use
Privacy Policy
Services
Submit an Article
Advertise with Us
Contact

© 2006-2009 Copyright Stanza Ltd. All Rights Reserved.