5 ms·
Reminds me of the old 1992 winner of the IOCCC by Brian Westley (who consistently entered some of the most impressive programs in that contest). It doesn't spin
by zwegner 13y ago
Reminds me of the old 1992 winner of the IOCCC by Brian Westley (who consistently entered some of the most impressive programs in that contest). It doesn't spin, but it prints a map of the provided lat/long.
http://www.ioccc.org/1992/westley.hint http://www.ioccc.org/1992/westley.hint
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);}
- russellsprouts 13y agoThere is another program arranged in a similar circular shape that calculated pi experimentally using it's own source code as the circle to test.
- zwegner 13y agoYup--that's a great one. And it too is by Brian Westley...
- ZirconCode 13y agoFound it here http://www.cise.ufl.edu/~manuel/obfuscate/pi.c http://www.cise.ufl.edu/~manuel/obfuscate/pi.c That's awesome.
- jerf 13y agoThere's a lot of talk about scalable code floating around, but it's rare to see anything as scalable as this code. Do you want more precision in your pi approximation? Then you literally scale the code up. There's few people who can truly claim to have written scalable code like that.
- justin_ 13y agoSpeaking of "scalable code", there is another interesting obfuscated piece of code that can scale itself. akari.c[1] is an obfuscated ASCII art downsampler. The neat thing is that the program itself is ASCII art, and downscaling the program source code will generate valid programs for 3 iterations![2] [1] http://www.ioccc.org/2011/akari/akari.c http://www.ioccc.org/2011/akari/akari.c [2] http://www.ioccc.org/2011/akari/hint.html http://www.ioccc.org/2011/akari/hint.html
- mhartl 13y ago*its own