Agilo's Weblog (text-based version for ancient browsers) ------------------------------------------------------------------------------- You are seeing this page in the technology best suited for your browser. Enjoy your stay here and if at any time you feel the urge to see this page in its full glory I kindly and friendly suggest you to get a better browser. ------------------------------------------------------------------------------- --- Entry title: BrainFuck. Date added: Sunday, February 27 2005, 05:24PM Written by: Agilo (agilo3@gmail.com) Entry ID: 126 --- A few hours ago, an old friend of mine gave me a link to New Order which contained a page explaining the programming language called "BrainFuck" (because it may/can cause a headache, I guess). The language itself is really easy and is much like Assembly in a way. It's a real fun language to play around in. Having read the page, I write two little programs (two exercises mentioned on the page) to test if I could actually write something myself. I first compiled the C source of the compiler, then created a little script to automate compiling: obfc $1.bf -nv -c $1.c && cc $1.c -o $1 And I created the two programs. The first one was to write out my own name (I actually already did this before I even saw the exercise). The BF code: >+++++[<+++++++++++++>-]<.++++++>++++[<++++++++>-]<.++.+++.+++.[-]++++++++++. Which will write out: "Agilo" Then the second one, to print out the ASCII table (notice I skip the first 32 characters on purpose): >++++++++++<++++++++++++++++++++++++++++++++[+.>.<] This language is really awesome, in my mind. I'll try and write some more programs as time progresses. By the way, thanks Jort! -------------------------------------------------------------------------------