Wednesday, July 2, 2008

Now I know I've lost my mind

Yep - it's gone. I've gone off the deep end into the esoteric world of geekdom. Even true geeks now laugh at how far gone I am.

I love learning new computer languages, I should do it far more often than I do. Practicality often gets in the way of my true self. I of course almost always learn with some form of a hello world. If you don't know what that is, quit reading. Seriously, you will only find yourself in pain from this point forward. Just quit.

While waiting for a backup to finish tonight, not particularly wanting to do anything else, I stumbled upon a Brainfuck page. I had actually been here before after linking there from Eric Raymond's (ESR) INTERCAL webpage (don't ask - it's easier that way).

So - I decided to write a hello world in Brainfuck...and I enjoyed it. I'm sick. Here it is:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
++++++++++++++++++++++++++++++++
>
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
+++++++++++++++++++++++++++++++++
>
+++++++++++++
>
++++++++++
>
<<<<<<<<<<<<<< [.>]
Hopefully Blogger doesn't screw up the format. You'll probably think it did anyway, it basically just looks like line noise. I kid you not though, compile this bad boy (here's a link to the compiler I used), and it will output "Hello World!\r\n" (rendered appropriately by your terminal).

Only after I was finished did I go check out the wiki for Brainfuck, and see that they had their own version of a hello world.

Anyway, if you are sick like me, seek help. Otherwise, follow these steps to validate I'm not lying to you:

1. Download the compiler from the link above. Rename from bf.asm.txt to bf.asm.
2. Look at the assembly source and verify there is no voodoo trickery going on - it really is a compiler.
3. Run "nasm bf.asm" to create the bf executable (your compiler). Make it executable.
4. Copy my source into a file named HelloWorld.b or something similar.
5. Run "cat HelloWorld.b | bf > hell.elf
6. Run "./hell.elf"
7. Run screaming from the room as you realize what you have become.