Slashdot Mirror


21st IOCCC Source Code Released

First time accepted submitter johntromp writes "Source code for the 21st International Obfuscated C Code Contest was released last weekend, following announcement of the winners on Sep 30, and just over a month after the submission window closed on Sep 14, a new speed record for the judges. Happy source code browsing!"

24 comments

  1. OS doesn't matter. by SolitaryMan · · Score: 1, Offtopic

    This is one of those cases where opening the source does not really mean anything.

    --
    May Peace Prevail On Earth
    1. Re:OS doesn't matter. by Anonymous Coward · · Score: 0

      Why doesn't the operating system matter?

  2. I looked at some of the source files by Anonymous Coward · · Score: 1

    That is just nuts. Must be a bitch to debug.

    1. Re:I looked at some of the source files by stanlyb · · Score: 1

      You mean that the CODE has bugs??? How dare you???

    2. Re:I looked at some of the source files by utkonos · · Score: 2

      I thought bugs were a requirement for entry, the more spectacular, the better.

  3. KC GetTogether + This one's going out to 10CC fans by Anonymous Coward · · Score: 0, Offtopic

    I'm not in love
    So don't forget it
    It's just a silly phase I'm going through
    And just because
    I call you up
    Don't get me wrong, don't think you've got it made
    I'm not in love, no no, it's because

    I like to see you
    But then again
    That doesn't mean you mean that much to me
    So if I call you
    Don't make a fuss
    Don't tell your friends about the two of us
    I'm not in love, no no, it's because..

    I keep your picture
    Upon the wall
    It hides a nasty stain that's lying there
    So don't you ask me
    To give it back
    I know you know it doesn't mean that much to me
    I'm not in love, no no, it's because..

    Ooh you'll wait a long time for me ...

  4. Surprisingly cool Re:OS doesn't matter. by Fubari · · Score: 4, Interesting
    Surprisingly cool stuff; the hint files of the various entries are worth a look too. For example, this is from the zeitak/hint.html entry:

    Selected Judges Remarks:

    This is an extremely subtle and twisted piece of Gold award winning code!

    The judges had spent a considerable amount of time analyzing this entry. At one point we spent 18 minutes just to understand 18 key characters of this code.

    The file zeitak_deobfucate.c provides a version that has been slightly deobfuscated. You may find reading that file helpful in your attempt to understand this extremely subtle entry.

    Author’s comments:
    Nesting Errors Detector

    What does it do
    As you have probably understood by looking at the source*, this program has something to do with parenthesis (and equality of opening and closing parenthesis, if you look close enough). It goes over the file given to it and checks that every opening (, [, or { has a matching closing one and vice versa. It also checks that every “ or ‘ is closed.

    If an error is detected, an error message will be printed. If the problem is a superfluous closing bracket, it will even print a few characters around it’s position.

    Make sure you view the source with 4 spaces tab width.

    Features
    Ignores parenthesis inside strings or character constants, so no errors will be detected in the following line:

    printf(")");

    Doesn’t get confused by the 1984/anonymous entry!

    Mis-Features
    Escapes (e.g. \") are ignored, so the following line will produce an error:

    printf("\"");

    Obfuscation
    IOCCC winners already contain entries without digits, control-flow keywords and certain operators in their source. This entry has an even more limited source, that is:

    Without any digits.
    Without any character constants.
    Without using functions from headers other than stdio.
    Without any control-flow keywords (not even the ?: operator).
    Without any arithmetic or logic operators!

  5. Underhanded was always more interesting by monkeyhybrid · · Score: 5, Interesting

    Very clever stuff but I always found The Underhanded C Contest much more interesting. Sadly the last one of those was in 2009. I'd love to see that return.

    1. Re:Underhanded was always more interesting by dotgain · · Score: 1

      It seems the results of the 2009 contest weren't even announced, which is a pity.

    2. Re:Underhanded was always more interesting by Anonymous Coward · · Score: 0

      I second that I've seen code from one year where it has line by line commentary and I still had to read the whole thing at least three times to see where it all went "wrong."

  6. First impressions by chebucto · · Score: 3, Informative

    I've only glanced at the files, and I'm far too amateur to understand them. That said, it seems at first glance that a bit too many of the entries relied in part on turning code into ascii art. There was an entry a few years ago that calculated pi by the shape of the source file code, that was neat.. but if the whitespace is there just to look cool and break up lines, then that part of the obfuscation is 2nd rate obfuscation, in my not so well deserved opinion. Still, very very good to see the IOCCC make quick work and bring us the goods.

    --
    The English word fart is one of the oldest words in the English vocabulary.
    1. Re:First impressions by Anonymous Coward · · Score: 1, Insightful

      When you said: "I've only glanced at the files, and I'm far too amateur to understand them" you should have stopped right there. The fact that you don't understand then should have been your clue that your so-called "at first glance" was steeped in ignorance. From there you compounded your ignorant post with even more uninformed dribble. And the fact that your post was rated "4, Informative" shows that there exist too many /. folk with rating points who rate ignorant postings like your post with the most bizarre attributes.

      Go study the one-liner and understand what it does and how it works. That will be a warmup. Now take something such as the "Conway game of death" and deconstruct how it works. Finally the to convert the amazing parenthesis matcher into well document documented C code and the. Modify it not be confused by strings such as \".

      When you can grok IOCCC code to that level, then post your opinion about ASCII art and obfuscation. But until you can, try to post fewer ignorant dribble and spend more time learning to correctly evaluate code.

    2. Re:First impressions by mrvan · · Score: 1

      Yeah... I have to admit even the 'deobfuscated' versions of the source code are gibberish to me, so it is quite obvious that the ascii-art is nothing more than icing on the cake.

    3. Re:First impressions by hankwang · · Score: 1

      it seems at first glance that a bit too many of the entries relied in part on turning code into ascii art.

      If you have been hacking for a week to squeeze a complex program into 2 kB (excluding whitespace), which by itself will lead to hard-to-read code, then spending another half hour on creative formatting is just the icing on the cake. Actually, the contest rules state that ascii obfuscation doesn't count towards the scoring; the jury will run it through a C beautifier anyway.

      That said, the program endoh2 generates an ascii-art obfuscated program. The program 'deckmyn' uses the white space in the source code as data.

      I find it pretty impressive what the authors manage to squeeze in tiny programs. Notable things in previous years that I remember include a C compiler and an x86 virtual machine, if I recall correctly. This year, the 'tromp' program is an interpreter - although I don't fully get what it does. :-)

      Too bad that this slashdot story draws so few comments.

    4. Re:First impressions by DMUTPeregrine · · Score: 1

      In general the ascii-art transformation is done after the code is written, it's just a fun thing to do that won't confuse the judges at all (they're sure to run it through a code-beautifier/auto-indenter and otherwise remove the art.)

      --
      Not a sentence!
    5. Re:First impressions by PuZZleDucK · · Score: 1

      When you said: "I've only glanced at the files, and I'm far too amateur to understand them" you should have stopped right there.

      Seriously?!?! just because I've never built a bridge, I can't say "that bridge could be better"

      The guy qualified his oppinions and asked people for more information (and didn't post as AC). I see no problem. Keep it up chebucto.

      Also thanks to DMUTPeregrine below who actualy addresses the issue (I was curious too).

      --
      Can a person program a new solution to a problem? Why should anyone be able to stop such a thing? -Richard Stallman
  7. Make sure to read the Makefiles as well. by Anonymous Coward · · Score: 0

    These aren't the droids you're looking for Mr. Spock!

  8. who needs a contest; go to any university by ardiri · · Score: 2

    ... while i've always been a fan of IOCCC contests, when i was teaching C programming - most of the students source code could be considered entries to such a competition :) gone are the days where we used to write clean, understandable code. i always joke when doing presentations about the fact that the reason why most people are afraid of C as a programming language is because other people write horrible C.. if you write good, clean, understandable C - it is an excellent language :)

  9. Obfuscated webpage by wonkey_monkey · · Score: 2, Insightful

    Who the hell thought blue links on a dark green background was a good idea?

    --
    systemd is Roko's Basilisk.
    1. Re:Obfuscated webpage by Anonymous Coward · · Score: 0

      That was a mistake.

      This happened due to a combination of "apache2", "mod_autoindex" with a ReadmeName set to README.html instead of FOOTER.html and publishing the 2012 results that included a README.html.

      I've now fixed it. SimonC.

  10. endoh2.c by David89 · · Score: 1

    I didn't look at all the entries, but endoh2.c is beautiful!!

    --
    Track IP - Remotely track the IP address of a machine via email or MySQL.
    1. Re:endoh2.c by bmsleight · · Score: 1

      It is a thing of beauty. OMG - that is real skill.

      Author’s comments:
      Yeah, “Again”. Sorry. But I don’t feel guilty or uncomfortable.

      This entry is based on ‘over-used themes’ such as self reproducing program and pi or e computation. I know you’re tired of them.

      But have you ever seen all-in-one?