Slashdot Mirror


2004 IOCCC Winners Source Code Released

Langly writes "The IOCCC have finally released their source code for 2004. My thoughts goes out to the poor guys that actually wrote this code. Reader discretion is advised." Every time I see an obfuscated code contest, I wonder if 'Winner' is the right word to describe the victor ;)

13 of 175 comments (clear)

  1. Mirrors by mozingod · · Score: 5, Informative

    Google cache with different mirrors across the globe: http://64.233.167.104/search?q=cache:LAIfxt7dfOEJ: www.ioccc.org/+ioccc&hl=en

  2. Re:Great article summaries lately... by RPI+Geek · · Score: 2, Informative

    International Obfuscated C Code Contest (I think).

    This groups releases a challenge each year that the entrants have to solve using the most obfuscated C code possible. They judge tne entries and award prizes to the best of the worst. Previous entries have used the precompiler to do much of the work, eliminated brackets and spaces, hacked the stack, and generally used many other tricks to complete the challenge.

    --

    - "Nobody came out that night, not one was ever seen. But Old Man Stauf is waiting there, crazy sick and mean!"
  3. Official IOCCC mirrors by Anonymous Coward · · Score: 3, Informative
    IOCCC Mirrors

    Asia


    Europe

    North America
  4. Re:Mirror this already! by Anonymous Coward · · Score: 5, Informative

    There are several mirrors. I know, I run one of them. Why the submitter hardcoded the us one is beyond me.

    • Antarctica
      none yet :-)
    • Africa
      none
    • Australia and other Pacific
    • www.au.ioccc.org - Sydney, Australia (34 0' S 151 0' E)
    • Extraterrestrial
      SETI is looking for some sites :-)
    • South America
      none
  5. Mirrors ... by foobsr · · Score: 4, Informative

    http://www.de.ioccc.org/years.html#2004

    also tw, au, es, www1.us

    CC.

    --
    TaijiQuan (Huang, 5 loosenings)
  6. Re:frist? by Anonymous Coward · · Score: 2, Informative

    Various standard C library functions are known to the compiler, and the compiler is allowed to optimise them. For example, here's a little trick. If you compile:

    printf("Hello\n");

    With max opt, GCC will convert it into:

    puts("Hello");

    How cool is that? You've saved one byte in your string and called a much quicker/smaller function!

  7. Another mirror by DoctorEternal · · Score: 3, Informative
  8. Re:Obfuscated webserver by achowe · · Score: 3, Informative
    Yes. I wrote it and I'm rather proud of that entry. You can see it working here:
    http://hibachi.snert.org:8008/
    Version 2.1, the Unobfuscated Posix Windows threaded version will be released sometime soon. If anyone is interested in testing it, email me.
  9. Re:frist? by Anonymous Coward · · Score: 1, Informative
    gcc -std=c99 -o frist_prost frist_prost.c works perfectly without warning. By default, gcc still interprets the code as C89.

    This has nothing to do with C89 or C99. The only standard-compliant forms of main are those that return 'int', regardless of which C standard you are talking about. Also, the -std argument to gcc is not sufficient to make it a standard C compiler. RTFM.

    The -ansi option does not cause non-ISO programs to be rejected gratuitously. For that, -pedantic is required in addition to -ansi. ...
    The -std options specifying some version of ISO C have the same effects as -ansi, except that features that were not in ISO C90 but are in the specified version (for example, // comments and the inline keyword in ISO C99) are not disabled.
  10. Re:frist? by Anonymous Coward · · Score: 1, Informative
    You need to add the -pedantic argument for this to be very meaningful. From the gcc manual:

    -pedantic
    Issue all the warnings demanded by strict ISO C and ISO C++; reject all programs that use forbidden extensions, and some other programs that do not follow ISO C and ISO C++. For ISO C, follows the version of the ISO C standard specified by any -std option used.

    Valid ISO C and ISO C++ programs should compile properly with or without this option (though a rare few will require -ansi or a -std option specifying the required version of ISO C). However, without this option, certain GNU extensions and traditional C and C++ features are supported as well. With this option, they are rejected.


    The gcc manual also says:

    Some users try to use -pedantic to check programs for strict ISO C conformance. They soon find that it does not do quite what they want: it finds some non-ISO practices, but not all--only those for which ISO C requires a diagnostic, and some others for which diagnostics have been added.

    A feature to report any failure to conform to ISO C might be useful in some instances, but would require considerable additional work and would be quite different from -pedantic. We don't have plans to support such a feature in the near future.


    So this is not a perfect way of checking compliance, but it is usually fairly good.
  11. Re:frist? by BreadMan · · Score: 3, Informative

    For GCC, at least, the entry point as far as Linux is concerned is _init, defined in /usr/lib/crti.o.

    _init opens the standard file descriptors, gathers the command line arguments and does a but of housekeeping before calling main, your program's entry point. GCC links to this by default; but you can change this if necessary, for instance an embedded project running without an OS would need very different initialization code, and for that matter it could define the entry point of the application as something other than main().

    If you want to see what GCC is doing for a compilation, try

    gcc =### x.c

    And you'll be able to see what gcc passes to the underlying tools to pre-process, compile, assemble and link.

  12. Re:Great article summaries lately... by Coryoth · · Score: 2, Informative
    And best of all, that ridiculous code is REALLY AMAZINGLY POWERFUL in many cases.

    I only looked at the first entry, anonymous.c. It's 47 utterly incomprehensible lines. What it does is convert text into one of Tolkien's Elvish fonts


    I was fairly impressed with Gavin.c. It's 165 lines of nicely indented/formatted C code that's pretty much incomprehensible. What does it do? It's a 32 bit multitasking operating system complete with a GUI, a shell, and a text viewer called vi.

    Or perhaps Vik1.c - 63 lines (including a comment :-), that when compiled gives you an X11 racing game. But check out the feature list:

    • Drive on a road in a 3-d landscape with hills and curves
    • Mountains in the horizon
    • A sun in the sky when driving during the day.
    • Dark sky and reduced visibility when driving at night.
    • Snow when driving in the winter.
    • Slippery road when driving in the winter.
    • When driving off the road, the car slows down to a halt
    • Three different race tracks that takes about one minute to complete.
    • Speed meter.
    • Computer driven opponent cars.
    • Collision detection when driving into other cars.
    • Lap time measurement.
    • The best lap time is stored as reference.


    Not bad for 63 lines of C code.

    Jedidiah.
  13. Re:Is This Necessary? by Nicolay77 · · Score: 2, Informative

    Well, then you should know that Larry Wall was a winner of the IOCCC in 1987.

    --
    We are Turing O-Machines. The Oracle is out there.