Brainf*ck

August 12, 2008

So,I decided to participate in Shaastra,the IIT Chennai techfest which spans from 1st to 5th October.

What events would I participate in?The ones in which I can show some level of competence.

What kind of events would that be?

Coding and some basic science application events.

So,I visit the website and find out that amongst others,there is this event called brainf*ck,in which the participants have to write brainfck codes for the prelims and then if they qualify to the finals,they have to write a code generator.

I decided that I’ll participate in this event,so I google brainfck and here’s what I find out:

Brainfuck is and esoteric,turing complete language,having only 8 commands.

The fact that it is esoteric means that either its a joke or that its a test of your programming boundaries as a proof of concept.

The fact that it is turing complete means that it can execute every turing computable function.For more detail on what that means:

http://en.wikipedia.org/wiki/Turing_completeness

So,the Shaastra website gave this example of a hello world program,which itself is self evident why brainfuck deserves a post in this blog.

++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.——.——–.>+.>.

“WTF man!” was my first reaction when I saw it.

The eight commands that the language follows are:

brainfuck command C equivalent
> ++ptr;
< --ptr;
+ ++(*ptr);
- --(*ptr);
. putchar(*ptr);
, *ptr=getchar();
[ while (*ptr) {
] }

Now,I am having second thoughts on participation… :-P

Entry Filed under: Uncategorized. .

2 Comments Add your own

  • 1. saber  |  August 13, 2008 at 10:28 pm

    hi
    its looking intresting competetion ,i guess
    can i get more info on this
    and can any one explain how the code given is related to hello world program i mean step by step procedure

  • 2. akshaytech  |  September 6, 2008 at 10:09 pm

    Saber,google and wikipedia are some of your best friends on the Internet.Please take as much help from them as you can.

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


Archives

Recent Comments

akshaytech on The final design
sindhu on The final design
akshaytech on How Destructive Hackers A…
Raunaq on How Destructive Hackers A…
shashank on How Destructive Hackers A…

Blogroll

Friends

Tags

Categories