Brainfuck
2005-11-16 15:26:55.569438+00 by
Dan Lyke
5 comments
The Brainfuck Programming Language:
Brainfuck is the ungodly creation of Urban M¨ller, whose goal was apparently to create
a Turing-complete language for which he could write the smallest compiler ever, for the
Amiga OS 2.0. His compiler was 240 bytes in size. (Though he improved upon this later --
he informed me at one point that he had managed to bring it under 200 bytes.)
[ related topics:
Invention and Design Software Engineering
]
comments in ascending chronological order (reverse):
#Comment Re: made: 2005-11-16 16:52:31.622953+00 by:
topspin
++++++++++++++
[>++++++>+++++++>++++++++>+++++++++>++>++++<<<<<<-]
>+++.
>++++++.
-------.
>>----------.
>++++.
<.
<<+++++++.
---.
>>>.
<<<+.
>>+.
<<---.
>-----.
>>>+++++++.
#Comment Re: made: 2005-11-16 21:12:30.891946+00 by:
meuon
I'm currently doing DDE calls in ActiveStatePerl on Winders, and writing an accounting system in PHP and MySQL... and just looking at Brainfuck makes my head hurt... hurt.. hurt.. Appropriate name.
#Comment Re: made: 2005-11-17 16:33:35.241548+00 by:
ebradway
I would like to see a BrainFuck compiler written entirely in BrainFuck. That would be cool!
#Comment Re: made: 2005-11-17 17:14:42.324407+00 by:
mvandewettering
I used this as a .signature file for a while:
(hope it survives the html mangling...)
#define P(C,X)case C:printf(#X);break; /* bftoc.c by markv@pixar.com */
main(){int c;printf("char a[9999];main(){char*p=a;");while((c=getchar())>=0)
{switch(c){P(62,p++;)P(60,p--;)P(43,++*p;)P(45,--*p;)P(46,putchar(*p);)P(44,
*p=getchar();)P(91,while(*p){)P(93,});}}printf("exit(0);}");exit(0);}
#Comment Re: made: 2005-11-17 17:17:40.339592+00 by:
mvandewettering
That seems to have worked, so along the same lines:
>+++++++++[-<++++++++++++>]<+.>++[-<------>]<.>++++[-<++++>]<+.-------.++++++++
+++.>++++++[-<--------->]<.>++++++[-<++++++++>]<.-------.>+++[-<+++++>]<.>++++[
-<------>]<+.>++++[-<++++>]<+.>++++++++[-<-------->]<----.>+++++++[-<+++++++>]<
++++.>++++[-<+++>]<.--.>+++++++++[-<----------->]< my brainf*ck .signature