His entire blog is a pure obfuscated goldmine. Just look at his footer:<p><pre><code> _=0;k;main(){while(_<641){for(k=0;"##K#8(38D-##C]L5870.X7\\M_b;90\\"
"MC-M/NZGB6Q,I0VGB6a0FbN<VG.6Q\\bNb7^@`X=N@`XQaOVX:^]NX=:Z8PY]B`:>P"
"NY8^$#SM):XA"[_/6]-35>>_++%6&1;k++);putchar(k[" _/\\\n,`)('<-"]);}}</code></pre>
Haha. I don't get why this particular one attracts so much attention, as it was my first one and is pretty amateurish compared to this one:<p><a href="http://a1k0n.net/2006/09/20/obfuscated-c-donut-2.html" rel="nofollow">http://a1k0n.net/2006/09/20/obfuscated-c-donut-2.html</a>
If this is the kind of thing you're into, check out the The International Obfuscated C Code Contest at <a href="http://www.ioccc.org" rel="nofollow">http://www.ioccc.org</a><p>Some of the submissions are absolutely fiendish. Fabrice Bellard's are particularly interesting, just like all his other work.<p>See if you can work out what westley.c from 1988 does:<p><pre><code> #define _ -F<00||--F-OO--;
int F=00,OO=00;main(){F_OO();printf("%1.3f\n",4.*-F/OO/OO);}F_OO()
{
_-_-_-_
_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_
_-_-_-_
}</code></pre>
I can't compile this. What am I doing wrong? Here is the output:<p>$ gcc -o donut donut.c -lm<p>donut.c:1: warning: data definition has no type or storage class<p>donut.c: In function ‘main’:<p>donut.c:4: warning: incompatible implicit declaration of built-in function ‘printf’<p>donut.c:5: warning: incompatible implicit declaration of built-in function ‘memset’
Very cool - I've never played with sending special terminal characters before to clear the screen and the like; like others, I will definitely add this to my repertoire!<p>My suggestion for deciphering it - let's not forget about `indent`!<p>Both iterations of the donut.c program: <a href="https://gist.github.com/1074316" rel="nofollow">https://gist.github.com/1074316</a>