Esoteric Programming: Only Total Squares Use ASCII

Why let yourself be bound by the western conventions of using “words”, or “understandable commands”, or “characters you can make with your keyboard”?  Try being more like the languages in the next part of our tour — languages that transcend the limitations of what our puny brains conceive of as ‘source code’.  And are therefore a huge pain to program in.

Ook!

Oh, this might be my favorite.   One of several esoteric languages written by David Morgan-Mar, who we’ll be hearing more from on this tour, and who is now my favorite person in the world.   Ook! is a porting of Brainfuck to a language that Orangutans can understand. There are only three commands:

Ook.
Ook?
Ook!

From these three commands, we build up everything else we need.  Sure, it’s a little inefficient, having to build up other commands in terms of just three elemental sounds.  But boy is it compelling.

Hello World in Ook!:

Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook! Ook! Ook? Ook! Ook? Ook.
Ook! Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook?
Ook! Ook! Ook? Ook! Ook? Ook. Ook. Ook. Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook! Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook! Ook. Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook! Ook! Ook? Ook! Ook? Ook. Ook! Ook.
Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook? Ook! Ook! Ook? Ook! Ook? Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook.
Ook? Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook! Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook.
Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook!
Ook! Ook. Ook. Ook? Ook. Ook? Ook. Ook. Ook! Ook.

Whitespace

Holy crap, this one’s weird — in this language, whitespace (e.g. spaces, tabs, line returns) encodes the program, not the letters. Letters and spaces flip their roles — all the text you write is ignored except for the spaces. For example, space-space-space-tab-space-tab-tab-return is the binary number for the integer 11.  You know what this means? You could, if you wanted, hide your whitespace program inside the source code of another program. Nobody would be the wiser. Over at the whitespace homepage, Jeremy James wrote a whitespace program that has the same program written in C in the whitespace’s “spaces”. My brain hurts…

Hello world in Whitespace:  I was wondering how the hell to show you what “Hello world!” looks like in whitespace, but fortunately the folks at wikipedia solved the problem — below is their pic showing a color-coded source code, for spaces, tabs, and line returns:

whitespace

“Hello World” in the programming language “Whitespace”

Velato

This is a cool one, one of several written by Daniel Temkin.  A programming language that uses music as the source code. Specifically, it takes in MIDI musical data files as source code.

Hello World in Velato:

HelloWorld_Velato

Keep in mind that Temkin’s Velato doesn’t actually operate on sheet music — it takes in MIDI files, which are digital representations of music.  So it’s not like it’s capable of decoding a picture of sheet music.  It would be insane to make a language that somehow operated on an image, right?  I mean come on, that’s ridic–

Piet

Oh, this is a cool one, also written by David Morgan-Mar. Instead of written-out code, in the Piet language your computer program is an image. Specifically, an image made to kinda look like the abstract artist Piet Mondrian. Instead of code written out using letters and numbers, you design an image, and the program reads the pixels of your image one at a time to figure out what commands to execute. The program roams around, reading off the color of the current pixel, using defined rules to decide what to do and where to go next. (It doesn’t necessarily have to go right-to-left — the program is free to roam around in 2D on the image, depending on what commands you’ve encoded by the picture you made.) Commands are encoded into the size of a block of fixed color, and by the difference in colors at a color change.

Did I say Ook! was my favorite?  Forget that — this one is my favorite.

Hello World in Piet:  Here’s a “Hello World!” program written by Morgan-Mar:

Piet_helloworld

Not all of ’em look quite like Piet Mondrian works — in fact it’s hard enough to get a working program look decently aesthetic, that looking like a Mondrian is a bonus.  Check out other examples I’m borrowing from Morgan-Mar’s website:

This program prints out “Piet”:

Piet_printsoutpiet

And this one is a prime-number tester:

Piet_primenumbertester

You just gotta check out the rest of the Piet community stuff that Morgan-Mar posts about at his site.  These are just the tip of the iceberg.

Alright, we’ve had our fun with pretty pictures.  It’s time to get serious.  Drink a couple raw eggs and let’s move on — Try Programming in These
© 2011 TimeBlimp Thith ith a pithy statement. Suffusion theme by Sayontan Sinha