[home] [<-back] [index] [next->]




 ____________________________________________________________________

[17:. - [ brainfuck ]                                      [tefx] :. ]
                                                   [tefx@b0g.org] :. ]
 ____________________________________________________________________



its a self descriptive langauge really. it does fuck your brain up.

it was designed to be a turing complete language with the smallest
possible compiler. Brainfuck was created by a weird german guy,
called Urban Mueller. Originally for the amiga, it has graced other
platforms too.

brainfuck is a minimalist langauge, it has 8 commands. these
commands
work on a char array, and a counter.

 Cmd  Effect                                 Equivalent in C
 ---  ------                                 ---------------
 +    Increases element under pointer        array[p]++;
 -    Decrases element under pointer         array[p]--;
 ]    Increases pointer                      p++;
 [    Decreases pointer                      p--;
 [    Starts loop, counter under pointer     while(array[p]) {
 ]    Indicates end of loop                  }
 .    Outputs ASCII code under pointer       putchar(array[p]);
 ,    Reads char and stores ASCII under ptr  array[p]=getchar();

if you're wondering what turing complete is, it means that it can
solve
any solvable mathematical problem.(I hope). Someone has written a
primes
program, two people have written quines in brainfuck. a quine is a
program
that prints its source code. But this is not comparable to the guy
who has
written a brainfuck interpreter in brainfuck.
see:http://home.wxs.nl/~faase009/

trying to write programs in brainfuck will really screw with your
brain.

after seeing lines of code that are
++++++++++[]++++++++++++]++++++++++[[-]]----.]+.+.[++++.
                                     you get a small headache.
                                     
but when you get bored you end up producing stuff like this :
++++++++++[]+]+++]++++++++++]++++++++++++]++++++]++++++]+++++]
+++++++++[[[[[[[[-]]]++]-----]++++]++]]---]++[[[[[[.].....[...
]....[...]....[..]..[..]..[[.]]].[.[...].].[[.]].[[..]..].[[.]
].[[..]..].[[.]]]]]].[[[[[[.]]]]]].[.[[[[[.]]]]].[[[[[[.]..]].
[[.]].[[...]].[[..]..].[[.]].[[..]..].[[..]]].[[[..]]]].[[[[[.
]..]].[.].[[...]].[....].[[.]].[.].[[....]]]]].[[[[.]]]].].[[[
[[.]]]]].[[[[[[[.[
                  social life, what social life?
                  
Before you run off to write an interpreter, some other sad people
have done
it for you.

I was told that this interpreter was written by mr brainfuck himself

char
m[9999],*n[99],*r=m,*p=m+5000,**s=n,d,c;main(){for(read(0,r,4000);c=
*r;
r++)c-']'||(d]1||(r=*p?*s:(--s,r)),!d||d--),c-
'['||d++||(*++s=r),d||(*p+=c==
'+',*p-=c=='-',p+=c==']',p-=c=='[',c-'.'||write(2,p,1),c-
','||read(2,p,1));}

so have fun, and watch those hours fly by as you try and debug
brainfuck.

some other people have written compilers for brainfuck, however I
have only seen it
for dos.
   see:
http://www.mines.edu/students/b/bolmstea/randlang/index.html#brainf



b0g!#@!b0g!#@!b0g!#@!b0g!#@!b0g!#@!b0g!#@!b0g!#@!b0g!#@!b0g!#@!b0g!#@!
b0g!#@!b0g!#@!b0g!#@!b0g!#@!b0g!#@!b0g!#@!b0g!#@!b0g!#@!b0g!#@!b0g!#@!
b0g!#@!b0g!#@!b0g!#@!b0g!#@!b0g!#@!b0g!#@!b0g!#@!b0g!#@!b0g!#@!b0g!#@!
b0g!#@!b0g!#@!b0g!#@!b0g!#@!b0g!#@!b0g!#@!b0g!#@!b0g!#@!b0g!#@!b0g!#@!
b0g!#@!b0g!#@!b0g!#@!b0g!#@!b0g!#@!b0g!#@!b0g!#@!b0g!#@!b0g!#@!b0g!#@!


LONGEST PUBES
Maoni Vi of Cape Town has hair measuring 32 inches from the armpits
and 28
inches from her minge.


[^-top] [next->]