International Obfuscated C Code Contest Winners
ioccc.org
ioccc.org
Source: http://www.ioccc.org/2012/tromp/tromp.c
Spoiler: http://www.ioccc.org/2012/tromp/hint.html
It's based on a minimal implementation of Binary Lambda Calculus: http://en.wikipedia.org/wiki/Binary_lambda_calculus
Apparently so. Wow.
http://web.archive.org/web/20040602202609/http://homepages.c...
It really is, which leads me to wonder how difficult it would be, to deobfuscate this into code that can be understood by the average programmer?
At least in terms of being able to say what it does, without being told.
While most would probably regard security through obscurity as bad practice, perhaps there are practical uses in certain contexts.
Most of the evolution from that point was finding ways to reduce the code size, then finally reformatting into a lambda. I credit John for not succumbing to gratuitous obfuscation, nor gratuitous use of macros to shave bytes. I suggested to him at one point to consider reducing the entire program to a single loop. He didn't think it would be shorter and pointed out that he had made a similar transformation in an earlier IOCCC entry of his, his infamous maze program, so I believed him and didn't go through the effort to verify for myself.
If you have any feedback on the competition for the Judges, please contact us using the details at http://www.ioccc.org/contact.html
Thanks. SimonC.
I'm specifically thinking of libpng, but I'm sure one could think of other meaningful examples.
Aside: history... Larry Wall wrote the original Perl in 1986-87, the same two successive years he won the IOCCC. I hope this program helps you to realize that this was no fluke - that Perl and Obfuscation are as inseparable as, say, camels and humps.
Having said that :-), if the entry has merit on its own and not just because of the external dependency, then it might "win".
This contest is great. I'm so glad it's happening regularly again :)
Okay, it is quite cryptic and a bit unorganized (as I frantically updated the code as I saw any optimization opportunity), but it may be interesting to see how the code is gradually shorten.
Sorry about the commit messages. Think of them as part of the obfuscation ;)
Obfuscated C And Other Mysteries by Don Libes
http://www.amazon.com/Obfuscated-Other-Mysteries-Don-Libes/d...
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);}The winner page: http://www.ioccc.org/2012/grothe/hint.html
The source in french: http://www.madore.org/~david/weblog/2012-10.html#d.2012-10-1...
Edit: This one is fun to look at too: http://www.ioccc.org/2012/hamano/hamano.c
These are also the winners for "language you currently hate" clear code contest.
IOCCC is back!
Check this out
{ echo one;echo two;echo tres;}|./kang
result: the sum in hex