Ook# makes a monkey out of Obfuscated C

! Warning: this post hasn't been updated in over three years and so may contain out of date information.

I was listening to the latest .NET Rocks! podcast this morning. The guest was Ted Neward, and he was discussing modern programming languages. He made the comment that there was even a .NET language written for the Librarian and other orangutans called Ook#. This sent me on a search of Google and a surreal voyage of discovery into languages that make the Obfuscated C Contest seem like a stroll in the park.

The C language is infamous for its support of really nasty unreadable code and the Obfuscated C Contest is a mostly annual competition to see who can come up with the “best” examples. One such is a less than conventional “Hello World” solution:

Some years back though, the language Brainfuck was created by Urban Müller that put such efforts to shame. The Brainfuck “Hello World” solution is:

The line breaks are just for neatness on this blog BTW. They are entirely optional within the language and have no significance. The entire language has just eight operators and cannot be expanded:

These eight commands were then translated into Orangutan to give the following eight commands that make up the Ook! programming language:

A “typical” example is a program that prints “Ook!”, and it looks like this:

Both Brainfuck and Ook! have been converted to .NET languages (Brainfuck.NET and Ook# respectively) by Lawrence Pit. You can download the source code for the compilers, along with some examples, from here.

One thought on “Ook# makes a monkey out of Obfuscated C

Comments are closed.