// http://www.puxedo.org/blog/cache/www.muppetlabs.com/%257Ebreadbox/bf/ // or http://www.nsl.com/misc/bf.htm // http://esoteric.sange.fi/brainfuck/ e:{M::30000#_ci P::0;({(.[y x;x,z];y;z)}.)/(0;O I?/:x,";";+m x@:&x _lin I);} m:{-1+{x,x+(x _ d)?d[x]-1}'&>':0I,d:-/+\'"[]"=\:x:" ",x," "} I:"><+-.,[];" / brainf*** operators O:({z;P+:1;x+1} / increment pointer {z;P-:1;x+1} / decrement pointer {z;M[P]:_ci 1+_ic M P;x+1} / increment value at pointer {z;M[P]:_ci -1+_ic M P;x+1} / decrement value at pointer {z;`0:M P;x+1} / print value at pointer {M[P]:0:`;x+1} / input value to pointer {:[_ic M P;x+1;1+z y?x]} / if 0 = value at pointer, escape loop {y z?x} / loop {z;x}) / end / bf - c compiler, courtesy of eiz (aka mackenzie straight): c:{`bf.out.c 0:"char m[9999];char*p=m;int main(){",(,/@[256#"";_ic"<>+-.,[]" :;("--p;";"++p;";"++*p;";"--*p;";"putchar(*p);";"*p=getchar();";"while(*p){" "}")]_ic x), "}"; `4:"gcc -o bf.out -O3 -w bf.out.c"; `3: "rm -f bf.out.c";} \ st:" > + + + + [ < + + + + + + + + > - ] > + + + + + + + + [ > + + + + < - ] > > + + > > > + > > > + < < < < < < < < < < [ - [ - > + < ] > [ - < + > > > . < < ] > > > [ [ - > + + + + + + + + [ > + + + + < - ] > . < < [ - > + < ] + > [ - > + + + + + + + + + + < < + > ] > . [ - ] > ] ] + < < < [ - [ - > + < ] + > [ - < + > > > - [ - > + < ] + + > [ - < - > ] < < < ] < < < < ] + + + + + + + + + + . + + + . [ - ] < ] + + + + + * * * * * M a d e * B y : * N Y Y R I K K I * 2 0 0 2 * * * * * " e st