Slashdot Mirror


IOCCC Winners Announced

Arachn1d writes "The IOCCC has finally announced the winners of the 2004 contest.
With winners this year including a mini-OS and a ray-tracer, the submissions should be interesting indeed - if you can make sense of them. According to the page, the actual code for the winners should be up mid-october."

6 of 175 comments (clear)

  1. Umm by stratjakt · · Score: 3, Interesting

    Who's the IOCCC and what was this contest about? Some programming thing obviously. Is this that obfuscated perl thing?

    Seriously, a sentence or two of information in the submissions doesn't hurt.

    --
    I don't need no instructions to know how to rock!!!!
  2. Re:Obfuscation by Anonymous Coward · · Score: 5, Interesting
  3. Re:More tricks by Bastian · · Score: 5, Interesting

    Recursive calls to main(), if handled with interesting tricks like vectored execution and such, can really spice up a program.

    If you use the trick of storing all of your data in one huge 'array', try to overlap anything you can get away with overlapping. For example, if you have a constant whose most significant byte is the same as the least significant byte in a string, there's not sense in storing that byte twice.

    While not allowed in IOCCC itself, try mixing your C with a language that's even more incomprehensible than C. I had good luck with writing a C program that sent PostScript code to a printer and having all the real work be done in the PostScript code.

  4. /*Why did I do this*/ by wiredog · · Score: 2, Interesting
    Comment seen in someone else's code just before a block of especially hairy code which, it turned out, used pow() to determine which bits were set in a 16 bit int which was used to hold flags used to determine if certain data was being used. It looked sort of like:

    while(pow(something,16)==n)
    {
    if(something)
    {
    for(something else)
    {
    ...

    This was on an embedded system where using one 16 bit int instead of 16 8-bit chars to hold the flags resulted in a vital savings of memory.

  5. Re:More tricks by Bastian · · Score: 2, Interesting

    While a lot of stuff folks did back in the day, a lot of times there wasn't much choice. If you don't have enough (memory | speed) to accomplish the task at hand, you'll start resorting to ugly hacks. There are some interesting articles out there on all the horrible things programmers did to old game systems like the Atari 2600 and the Intellivision that would be considered Hateful today but were necessary to create a lot of good games at the time.

    The real problem is lack of documentation, and it's a problem to this day, especially when a programmer is working on a project alone. I know I'm guilty. You should take a look at some of the code I've been writing in the past week. It's like I couldn't put two slashes together to save my life.

  6. This is *not* ovuscation by darkonc · · Score: 2, Interesting
    The following code is not obfuscation. It's an honest attempt to split a Red Hat RPM filename into product and version.

    while($rpm=<>){ chomp $rpm;
    if( $rpm =~ s/-((?!(g77|8514|gui)-)(([0-9][-.0-9]*)?_?(?!X11)( (?i)trunk|[abix]|horde|alpha|stable|cvs|beta|gamma ))?[-_.0-9]*(([a-zZ]|([0-9]*(svn|fc|EL|FIT|FC|x|fi nal|rh|ii|pl|tp|horde|fcs|rc|pre)))[-.0-9]*)?)\.(s rc|noarch|i[3456]86).rpm//){;
    printf "name=%23s \t vers=%s\n",$rpm, $1;
    }else{ print "ugh!\n" };
    }
    Remember to remove the whitespace from the regex before running it.
    --
    Sometimes boldness is in fashion. Sometimes only the brave will be bold.