Are you a programmer? Have you thought about the IOCCC? (7)

1 Name: Anonymous 2004-11-20 13:30 ID:Heaven [Del]

http://en.wikipedia.org/wiki/IOCCC

http://www.ioccc.org/

Some of that code probably belongs more in /ascii/ than a compiler.

Discuss.

2 Name: !WAHa.06x36 2004-11-20 13:46 ID:iGl+AAVw [Del]

I have, but then I see the damn things people have done, and I don't feel like I have any chance to keep up.

Like the program that does three different things when compiled normally, or compiled with lines in reverse order, or compiled with the lines alphabetically sorted. In addition, it can reverse and sort lines itself.

One of my favourites (because I can almost understand it), is the program that uses a bunch of (of course, slightly incorrect) #defines to let the author write in pseudocode, and them implements a prime number searcher in this pseudocode, except of course when compiled the program does something else entirely.

3 Name: dmpk2k!hinhT6kz2E 2004-11-20 21:03 ID:/U1w80cQ [Del]

IOCCC competitors are just plain nuts.

But they probably would make the best C compiler writers. They can make C breakdance on a pin while half-asleep. Truely amazing stuff.

4 Name: hk0!0khonVgaHI 2004-11-22 23:03 ID:AbGkOnLQ [Del]

They should call it the IOCPPTC.
Intenationally Obfuscated using C Pre Processor Tricks Contest.

cpp is a macro language... and thus allows one to write self-modifying code, in effect.

This where all the complexity and genius comes into play. But remember kids, it's all the CPP, not the compiler that makes it possible.

5 Name: !WAHa.06x36 2004-11-23 00:51 ID:66VfokOQ [Del]

No, CPP tricks are considered pretty lame in the IOCCC. Old entries used them quite a bit, but it's quickly fallen out of fashion.

6 Name: hk0!0khonVgaHI 2004-11-23 05:35 ID:AbGkOnLQ [Del]

Errr...
Almost every example I see uses "#define" somewhere.
That's CPP.

7 Name: !WAHa.06x36 2004-11-23 12:40 ID:VFbxhOLw [Del]

Sure, people do a bit of #defineing, but few new entries are built entirely around #define tricks. The obfuscation usually goes far deeper than that.

This thread has been closed. You cannot post in this thread any longer.