Interesting C code
a1k0n.net
a1k0n.net
I'm not impressed. It could be done in 1 line of C when he left out the line-breaks.
I don't think obfuscated code is interesting. It's unreadable. And therefore it's hard to learn something from it.
But it's nice he is explaining the code. Now that is interesting!
Yes, the aim was compression (golfing), not obfuscation. Compression of silly ASCII things has been sort of a hobby of mine for a while and I intend to blog about that in particular. Another little compressed snippet is my "email signature" at the bottom of my site root. Try clicking on it.
....jealous
Jesus Christ. I love you, dude. Your site must have the highest awesomeness-per-bit ratio on the Internet :)
Someone ought to make a quiz page - "is this perl golf, or a cat walking on a keyboard".
Personally, I think that using golf handicapped languages is the only way to keep it interesting. If you can choose the language, it gets too easy. One could even implement 'cat' as a single character, provided his language of choice.
/rant
I think compressed (edit: golfed - new word of the day :) code in general is pretty cool, though.
I assume the line-breaks are to allow the code to fit within 80 columns to display on most standard terminals. If you look closely, they occur at places you wouldn't expect them to. I'm guessing they were placed by cat and not the author.
http://jsfiddle.net/mrpollo/jeNau/
tho i cant make it run yet on jsfiddle
main(l
,a,n,d)char**a;{
for(d=atoi(a[1])/10*80-
atoi(a[2])/5-596;n="@NKA\
CLCCGZAAQBEAADAFaISADJABBA^\
SNLGAQABDAXIMBAACTBATAHDBAN\
ZcEMMCCCCAAhEIJFAEAAABAfHJE\
TBdFLDAANEfDNBPHdBcBBBEA_AL\
H E L L O, W O R L D! "
[l++-3];)for(;n-->64;)
putchar(!d+++33^
l&1);}
BTW, how to convert C to JavaScript? $ gcc -o yanim yanim.c -lm
yanim.c:1:1: warning: data definition has no type or storage class [enabled by default]
yanim.c: In function ‘main’:
yanim.c:5:24: warning: incompatible implicit declaration of built-in function ‘cos’ [enabled by default]
yanim.c:5:33: warning: incompatible implicit declaration of built-in function ‘sin’ [enabled by default]