Brainf*ck

Not so much slang, more a programming language.

I don't want to spend much time talking about it, but suffice it to say that it's an impressive language indeed. 8 commands exist in total, and the C interpretor is three lines long. It's Turing complete, mind you.

So, here's a short program I wrote in it in order to print out the alphabet (capital letters only).

Here's a copy of the Brainf*ck interpretor:

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));}

Run the alphabet program by first compiling the Brainf*ck interpretor (it's C, so use 'gcc brain.c'), then do something like:

em@typodemon:~%  Brain < Alphabet.bf

You ought to get output like:

ABCDEFGHIJKLMNOPQRSTUVWXYZ

em@typodemon:~%

I recommend this language to anybody with a sense of humour. It's cute. You can also try the text reversal program.

em@typodemon.com