Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×
Programming IT Technology

16th IOCCC Winners Announced 147

chongo writes: "The winners of the 16th International Obfuscated C Code Contest (IOCCC) have been selected. The judges are in the process of notifying the winners by EMail. We expect to release the source code around mid April 2002 after the winners have had a chance to review our writeup of their entries."
This discussion has been archived. No new comments can be posted.

16th IOCCC Winners Announced

Comments Filter:
  • by Anonymous Coward
    Write a program in one language, but make it appear to be in a different programming language. For example make a perl program look like a java program.
    • This can already be done somewhat easily with a C preproccesor, I have seen FORTRAN examples in books in fact.
    • Write a program to tell you if you have pants on. Then, when you have pants on, the program says, in a robot voice: "you have pants on" over and over. When you don't have pants on the robot voice says "you do not have pants on." The placing of pants will result in a modification of the voice warning within expected tolerances of 1.2 microseconds. The IEEE accepted definition of 'wearing pants' is having at least once pulled them so that the crotch area contacts the crotch of the person wearing said pants. Buttoning/zipping is not the prefered method of pants detection, seeing as many embarrassing situations arise from people having pants on but not having them properly secured. The robot voice would be the voice of the guy who did Kitt in Knight Rider and the pants detection algorhithim would be based on wither punch cards or mood rings.
    • It has been done (Score:2, Informative)

      by EggplantMan ( 549708 )
      ... without just appearing to be in another language, but actually being so. Take a look here [ioccc.org]. Genius or travesty?
    • by mcc ( 14761 ) <amcclure@purdue.edu> on Friday March 08, 2002 @07:22PM (#3133130) Homepage
      You may be interested in a type of program called a "polyglot"-- a program which is simultaneously valid, and preferably does the same thing, in more than one language simultaneously. Several previous IOCCC winners have been polyglots. (You maybe should look in particular at the one entry-- i'm *pretty* sure this was last year-- for a program that #DEFINED a bunch of english words as chunks of C that did the same thing the english words did, and then wrote a short *compilable* program in totally readable pseudocode.. with the gimmick being that the program actually did something wholly other than what the pseudocode said it did! Even if you know this coming in, it still is near impossible even on several readings to figure out how exactly it works out. It was rather cute.)

      Anyway, a few polyglot-related links:

      With the crazy-ass language redefinition capabilities in perl 6, i think we can expect to see a resurgence in some very odd polyglots very soon..

      Grrr.. mean, mean slashdot editors.. telling us the IOCCC winners were announced just so we can wait in suspense for a full month to see the entries.. bleh. I love the IOCCC..

    • You can make python have curly brackets for sections of code, just comment them out:

      if x==z: # {
      print y
      x+=z
      # }

      (I can't get it to indent properly, everytime I hit tab IE goes to another part of the form)
    • Thats easy, just code C# and it looks like Java.
    • Make perl look like java? Wouldn't that be kind of difficult with the whole #!/usr/bin/perl thing, and all of the variables prefixing with '$', i'm not an expert on java but I dont think they do that. Of course, i'm sure someone will think of some way.
      • perl has the concept of barewords. They are just like a normal variable but they don't have the $ in front. A STDIO is a common one that appears in many programs. With the right module, you can redefine perl to look like just about anything for example Perligata [monash.edu.au] which changes the parsing rules to a latin form where the subject of the verb is defined by its suffix.

        A few days ago /. had a story about many odd languages. While some (most?) of them seem quite useless, if writing a program in them opens your mind, it can make you a better coder. For example brainf*ck [catseye.mb.ca] is a pure turing language with 8 instructions -- risc taken all the way down. Hardware desgined to run brainf*ck could be clocked at the several hundred Ghz and could be piplined like mad.
        • Unfortunately, I've yet to find a brainfuck interpreter for *nix that doesn't blow goats. The I/O sucks ass in the standard interpreter, making it very hard to write real software with it, but not for the intended reason. I dare you to try to gather entropy from /dev/random in a brainfuck program.
    • One of the 2000 winners did that. He wrote code that was simulatneously a sh shell script, a makefile, and C code.
  • by tcd004 ( 134130 ) on Friday March 08, 2002 @06:46PM (#3132971) Homepage
    I think you just notified them via Slashdot.

    The Shadow Government Knows [lostbrain.com]
    tcd004
  • Assembler (Score:4, Funny)

    by rif42 ( 206260 ) on Friday March 08, 2002 @06:47PM (#3132981)
    > We expect to release the source code
    > around mid April 2002

    Will we also get a translation in assembler to help clarify the soure code?
    • I know you meant this as a joke in the sense of assembly language being so much more difficult than obfuscated C, but it's only funny to people who are ignorant of programming in assembly.

      Back when I used to do a fair amount of assembly programming along with C, I would often run the debugger in assembly mode to see exactly what was happening. Very often I could uncover subtle bugs that way.

      I don't really do it as much anymore, primarily because I'm not familiar with the assembly of my modern machines anymore (alas).

      • I could NEVER debug C in source level debugger.

        Actually, the only other tool I use when programming
        on windows (other than the compiler.) is a disassembler.

        --
      • Re:Assembler (Score:3, Interesting)

        by VAXman ( 96870 )
        Assembler generated from IOCCC programs will definitely not be obfuscated. Most of the obfuscation comes from the preproccesor, and compilers generate regular, boring code.

        However, it definitely is possible to write highly obfuscated assembly, which would be far worse than anything done in C. Heck, with "db" you can do anything you want, and with an instruction set like IA32 you can do all sorts of insane things. Self-modifying code is also a lot easier in assembly. :-)
        • Are I-caches smart enough to figure out when you modify the code? And wouldn't that make code that was slow as hell, because you have to flush the cache and pipeline?
          -Dan
          • I don't know about other processors, but Willamette (aka Pentium 4) fully supports self-modifying code, and you can modify an instruction at any point (such as the next instruction - even if has already been speculatively executed), and the processor will correctly restart and execute the modified instruction.

            Yes, this is terrible for performance (it invalidates the whole trace cache) but it is correct.

            Officially, Intel says you have to execute a serializing instruction in between the point of modifcation and the actual instruction, although the newer processors are smart enough to do it automatically.

            I wonder if any real software actually modifies in-flight instructions? It's conceivable that an OS loading/executing a really short program on a processor which is deeply speculative could hit that case.
            • Writing self modifying code is hard, it's even harder to debug, and thrice as hard to follow.
              To the best of my knowledge, most common OS define text segments of processes as read & execute only.
              • Well, yeah, but since most OS'es have flat addressing, you ust use your read/write flat data segment to modify the code in your read/execute flat code segment. If the _page_ is marked read-only you can't modify it, but you can just copy it to your own data segment, and then modify and execute it to your heart's content.
        • Another fun thing to do would be writing an obfucated program in MacOS 9 with self modifying code that mixed 68k assembly functions with PPC assembly functions.
      • Lighten up. :) I know assembly, and I thought it was funny.

      • I know what you mean - I've spent a good portion of time recently parsing through compiled code (with two versions of a compiler) to make sure things were properly optimized in both (of course, they weren't). The tricks we must play to speed up memory copies with the least instructions possible... mmmmm. At least it was on a full register set machine (PowerPC 740)... Thank goodness for all of those GPRs :)
      • > I know you meant this as a joke in the sense
        > of assembly language being so much more
        > difficult than obfuscated C

        Yeah, it sounds funny, but on the serious side seeing some of my colleagues unreadable C code, I sometime wish they would have written straight assembler in stead of attempting to get some weird optimisation through a strange C constructs.
  • Have the judges submitted these to turnitin.com [turnitin.com]?

    These may be very good test cases for the site.

  • The list of who won (Score:5, Informative)

    by chongo ( 113839 ) on Friday March 08, 2002 @06:51PM (#3133003) Homepage Journal
    An updated list of who won the 16th IOCCC may be found at:

    We have already had one anonymous winner request to become non-anonymous.

    • It is the Lavarand guy! With a /. ID lower than me. Oh my :-D

      Jeremy
    • I bet the guy is afraid to get fired for not working on the job ;-)
      • A friend of mine was bored at work one day and did something similar.

        He wrote (in raw machine code) a program to uudecode a text file. If that wasn't impressive enough, he limited his op-code usage to only bytes that had a text representation (32-127), so you could simply paste some text at the begging of the uuencoded data, rename it to foo.com and run it!

        He's one of the few truly amazing programmers I have met.
  • Bleh (Score:1, Insightful)

    by Anonymous Coward
    The winning descriptions sound pretty ho hum again this year. Although the X program and the interactive games are usually somewhat interesting since they waste a lot of your allotted bytes to get them started. Still haven't seen a really slick X program since the julia/mandelbrot viewer from the early 90's. And I'm definitely going to still be waiting for someone to top theorem from 1990.
  • What was the point? (Score:1, Informative)

    by Anonymous Coward
    So... somebody won a contest. The percentage of Slashdot readers who might actually *know* a winner are probably miniscule. The character of the entries is unknown. There's no source code yet. In fact, to other than the 16 people who won, the losers, and their close personal friends... what's the friggin point of posting this to slashdot NOW? And they were all notified in e-mail anyway.

    Try again when there's something to *see*.

    • percentage of Slashdot readers who might actually *know* .... are probably miniscule

      As opposed to posting as an AC?

      what's the friggin point of posting this to slashdot NOW?

      You should ask......
  • i guess my obfuscated version of Hello World didnt win again!
  • by LuxuryYacht ( 229372 ) on Friday March 08, 2002 @06:59PM (#3133043) Homepage
    Looks like this site is now the winner of todays International Obfuscated Website Contest due to the /. effect.

    .
  • by Anonymous Coward on Friday March 08, 2002 @07:08PM (#3133082)
    GPL ABUSER [slashdot.org] has WON the IOCCC CODE CONTEST! [ioccc.org]
  • In that one the goal is to unobfuscate any code, I mean any at all that has ever been made in the last 40 years.
  • Is there a secret society of Grand Master programmers that use the results of this contest to test new initiates? Using only a ball of twine, a gumdrop, and a used stamp, with ten minutes on the clock, they are asked what the source code would do. Correct answers gain entry, will failed responses fate the initiate to forever program in JavaScript (or maybe VB).

    Because everyone knows, grand master programmers don't need comments.

    I just wish I didn't work with grand master wannabes.
  • by Peridriga ( 308995 ) on Friday March 08, 2002 @07:19PM (#3133117)


    The winner on this years contest is Microsoft for their submission of

    Microsoft Corporation End User Agreement

    Contributed by an anonymous user.
  • Since this code is obfuscated I guess the GPL does not apply to it?
    • Re:GPL? (Score:1, Insightful)

      by Anonymous Coward
      The GPL explicitly defines source code as the preferred form of a program for modifying it.

      To find out whether the gobbletygook you distribute is source code or not is simple: if you normally add features to the program by editing the gobbletygook, it's source. If you instead edit the stuff that you compiled to gobbletygook and then recompile it, then the stuff you distributed isn't source and it's a clear-cut GPL violation.
    • Heh, if there were an obfuscated liscence contest the GPL would be the all-time winner! :)

  • We expect to release the source code around mid April 2002

    To quote Homer: 40 seconds? But I want it NOW!

    Any of the winners care to link to their source? (Obviously nothing would get past the lameness filter ;-)

  • by frozenray ( 308282 ) on Friday March 08, 2002 @07:29PM (#3133153)
    Every time I hear about the IOCCC I'm reminded of this old anecdote:

    The highlight of the annual Computer Bowl occurred when Bill Gates, who was a judge, posed the following question to the contestants:

    "What contest, held via Usenet, is dedicated to examples of weird, obscure, bizarre, and really bad programming?"

    After a moment of silence, Jean-Louis Gassee (ex-honcho at Apple) hit his buzzer and answered "Windows."

    Mr. Bill's expression was, in the words of one who was there, "classic."


    (source [netfunny.com])

  • by Anonymous Coward
    #include <stdio.h>
    #define S(s)char x[]=#s;s
    #define Q(x)x
    #define A(x,y)y##x
    #define B(x,y)A(y,x)
    #define C(x,y)B(y,x)
    #define Z(s,t,u)case s:if(*p!=32){t;}else{u;}break;
    S(B( A( a ,m ),A(n ,i))() {B (A(h,c ),A(r ,a ))*p=x ;B(A( n, i),t)t
    =0;B(A(n , i),t)s =0;B( f ,A(r, o )) (;*p;Q( p)++){C( B( A(c,t) ,h),B(A(
    w, s),i))( s){ Z( 0,t+=8 *8-00 ,s ++)Z( 1,t+= 8 ;,s++ )Z
    ( 2, t++ ,putchar(t-73);t=s=0)}}})
  • by ZiZ ( 564727 ) on Friday March 08, 2002 @07:44PM (#3133201) Homepage
    I believe that one of the entries:

    Best Abuse of User: Edward Rosten (England) - Greasy mouse

    also qualifies for the Iron Chef competition. Or am I alone in thinking that Greasy Mouse sounds like some sort of England variant on Chinese/Indian cookery? *grin* (I can't wait to see this entry. I love the Abuse of User programs...)

  • The contributors, winners, judges and just about
    anyone who has anything to do with IOCCC, should
    be in your "not to hire" black-list.

    Unless you want your project to be implemented as
    a self-printing pelindromic asciiz, that has a built in tetris.

    --
    • It takes real skill to build good intentionally obfuscated C, and the folks who can do so effectively can generally write very clean C as well. The people who unintentionally create code that looks like a potential entry... now, they're to be watched for.
      • Sorry, but most of the winning entries (at least of previous years) consist of a whole heap of #defines and numbers formatted as ASCII art. That does not take skills that are useful in real life, just a whole lot of time on your hands.
        • It implies knowledge of the preprocessor (which all too many "C programmers" don't have), and of what exactly the parser will accept; the X ones tend to use raw Xlib (which most lameos don't deal with well); and most important of all, a certain level of creativity is required to come up with a good one, and good problem-solving skills are needed to make them Work Right. (See the Makefile / shell script / C program for a simple example -- I'd put money that your average grad with a CS degree couldn't do that if asked).
    • Worst driver

    Anonymous 4 (USA) - A driver game

    Hey, I didn't know Anonymous 4 [anonymous4.com] did programming too?

    Har har. Anyway, compared to today's high-level languages, C is boring. Let's see some obfuscated Ruby programs.

    • Let's see some obfuscated Ruby programs.

      Or obfuscated perl scripts. Oh, wait a minute...

    • > Let's see some obfuscated Ruby programs.

      From Tomasz Wegrzanowski ([ruby-talk:30377] [ruby-talk.org]):

      $\=(?c??d:?e).chr+%Q%\n%;$,=%q=o, =;;%q{leHrow}=~/(...)(...)/;print [$1,$2].map{|l|l.reverse+%q|l|}

      Showing the more Perlish side of Ruby.

      I recall seeing one that calculated Pi with code of a similar quality too, along with a few quines, although I'm yet to seen an obfuscated one.
  • by miracle69 ( 34841 ) on Friday March 08, 2002 @10:04PM (#3133616)
    The winners will be notified by Obsfucated Email guised as spam.
  • to not post this until source was released?
  • I live with the winner of the small program category. He does programming contests "for fun" In his own words "I dont remember how it works anymore"
  • I can't find the post on /. that already explained this, but since I'm not a programmer...

    What, again, is the point of a program that can compile itself? (see Best Abuse of the Rules winner)
  • by chongo ( 113839 ) on Saturday March 09, 2002 @05:54PM (#3135673) Homepage Journal
    We have had 3 winners convert to non-anonymous status. The list of recent winners is now:

    Best of Show

    Jason Orendorff (USA) - An Adventure-like game

    Most likely to amaze

    Anonymous (Great Britain) - x86/ELF dynamic binary translator

    Best abuse of the rules (Most complete program)

    Fabrice Bellard (France) - A C subset programming system for x86 that can compile and execute itself

    Best X11 Game

    John Williams (USA) - Missile Command

    Best Short Program

    Raymond Cheong (USA) - Arbitrary precision square root

    Best position-independent code

    Brian Westley (USA) - A punch card printer/sorter

    Best Abuse of CPP

    Immanuel Herrmann (Germany) - A Turing machine

    Best Abuse of User

    Edward Rosten (England) - Greasy mouse

    Best One-Liner

    Jens Schweikhardt (Germany) - A shell glob matcher

    Best curses Game

    Kevin Pulo (Australia) - A Pong-like game across network

    Most eye-crossing

    Immanuel Herrmann (Germany) - A
    SIRDS [acronymfinder.com]-shaped SIRDS [acronymfinder.com] generator

    Most obfuscated sound

    Pierre-Philippe Coupard (USA) - A talking clock

    Best primal ASCII graphics

    Nicolas Ollinger (France) - Prints primes with a sieve graph

    Best AI

    Doug Beardsley (USA) - A suicide chess program

    Worst driver

    Chris King (USA) - A driver game

The use of money is all the advantage there is to having money. -- B. Franklin

Working...