Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
It's funny.  Laugh. Programming Technology

International Obfuscated C Code Tattoo 56

chongo writes "Some people eschew obfuscation while other live for it. Thomas Scovell has taken obfuscation to a completely new personal level by obtaining the very first International Obfuscated C Code Tattoo. We (the IOCCC Judges) are pleased that Thomas has honored the 1984 anonymous IOCCC winning entry by placing the source code on his arm: the very first IOCCC winner to receive this distinction. The anonymous winner (a person who known for various things on the Internet and has been programming in and associated with C for decades) feels honored by the tattoo as well."
This discussion has been archived. No new comments can be posted.

International Obfuscated C Code Tattoo

Comments Filter:
  • I doubt human beings will ever replace the floppy.
  • So... who was it? (Score:5, Interesting)

    by keiferb ( 267153 ) on Thursday January 20, 2005 @03:15PM (#11422663) Homepage
    The article reads like we're almost supposed to know who 'Anonymous' is... Kernighan? Ritchie?
  • by CommanderData ( 782739 ) * <kevinhiNO@SPAMyahoo.com> on Thursday January 20, 2005 @03:24PM (#11422787)
    Could I be arrested for tattooing this on my arm:
    #!/usr/bin/perl -w
    # 531-byte qrpff-fast, Keith Winstein and Marc Horowitz <sipb-iap-dvd@mit.edu>
    # MPEG 2 PS VOB file on stdin -> descrambled output on stdout
    # arguments: title key bytes in least to most-significant order
    $_='while(read+STDIN,$_,2048){$a=29;$b=73;$ c=142;$t=255;@t=map{$_%16or$t^=$c^=(
    $m=(11,10,11 6,100,11,122,20,100)[$_/16%8])&110;$t^=(72,@z=(64, 72,$a^=12*($_%16
    -2?0:$m&17)),$b^=$_%64?12:0,@z)[ $_%8]}(16..271);if((@a=unx"C*",$_)[20]&48){$h
    =5; $_=unxb24,join"",@b=map{xB8,unxb8,chr($_^$a[--$h+8 4])}@ARGV;s/...$/1$&/;$
    d=unxV,xb25,$_;$e=256|(or d$b[4])<<9|ord$b[3];$d=$d>>8^($f=$t&($d>>12^$d>>4^
    $d^$d/8))<<17,$e=$e>>8^($t&($g=($q=$e>>14&7^$e)^ $q*8^$q<<6))<<9,$_=$t[$_]^
    (($h>>=8)+=$f+(~$g&$t) )for@a[128..$#a]}print+x"C*",@a}';s/x/pack+/g;eval
    I'd be a walking violation of the DMCA :)
  • by Anonymous Coward on Thursday January 20, 2005 @03:50PM (#11423127)
    Alrighty, you've convinced me to reveal myself to the world.

    It was I that wrote that program, so many years ago!
  • entry explained (Score:5, Informative)

    by voisine ( 153062 ) on Thursday January 20, 2005 @04:18PM (#11423552)
    int i;main(){for(;i["]i;++i){--i;}"];read('-'-'-',i+++ "hell\
    o, world!\n",'/'/'/'));}read(j,i,p){write(j/p+p,i---j ,i/i);}
    ==== add some whitespace ==========
    int i;
    main()
    {
    for (; i["]i;++i){--i;}"]; read('-' - '-', i++ + "hello, world!\n", '/' / '/'));
    }

    read(j, i, p)
    {
    write(j / p + p, i-- - j, i / i);
    }
    ===== and char subtraced from itself is 0, and char or pointer divided by itself is 1 =====
    int i;
    main()
    {
    for (; i["]i;++i){--i;}"]; read(0, i++ + "hello, world!\n", 1));
    }

    read(j, i, p)
    {
    write(j / p + p, i-- - j, 1);
    }
    ======= j is always 0, p is always 1, lets remove them ======
    int i;
    main()
    {
    for (; i["]i;++i){--i;}"]; read(i++ + "hello, world!\n"));
    }

    read(i)
    {
    write(0 / 1 + 1, i-- - 0, 1);
    }
    ======= 0 / 1 + 1 is 1, subtracting 0 does nothing, decrementing a local variable this is never used afterward also does nothing =======
    int i;
    main()
    {
    for (; i["]i;++i){--i;}"]; read(i++ + "hello, world!\n"));
    }

    read(i)
    {
    write(1, i, 1);
    }
    ======== replace read(i) with write(1, i, 1) =====
    int i;
    main()
    {
    for (; i["]i;++i){--i;}"]; write(1, i++ + "hello, world!\n", 1));
    }
    ====== i[n] can be rewritten *(i + n) or *(n + i) ======
    int i;
    main()
    {
    for (; *("]i;++i){--i;}" + i); write(1, "hello, world!\n" + i++, 1));
    }
    === as i gets incrimented, we dereference the next char of the string which is always non-zero till we hit the null terminator, all the matters is that the string is the same length as "hello, world!\n" =====
    int i;
    main()
    {
    for (; *("hello, world!\n" + i); write(1, "hello, world!\n" + i++, 1));
    }
    ===== so now we can see we incriment i, printing out the next character of hello world till we hit the null terminator ====
    • Very good explanation, BTW. I was told that anonymous winner used almost (but not quite) the reverse of your explanation to construct the original entry.
    • Excuse my ignorance, but it would appear to me that this code needs i to be zero to begin with in order to work properly, yet as far as I can see the value of i will be undefined (i.e. random) at the start of the program. What am I missing?
      • Re:entry explained (Score:3, Informative)

        by voisine ( 153062 )
        global variables are initialized to zero, local stack variables are undefined
      • i is declared globally. This means that on an x86 box (maybe other archs as well) it will probably be allocated in the bss section of the image which means it will be zero by default.
        • My guess, based on what was commonly available at the anonymous author's facility in 1984, was that their machine was most likely a Dec Vax or PDP. The C compiler for Un*x on those machines allocated global variables out of bss which was initialized to zero by default.

          I do know that Larry Bassel and I tested the entries on a Vax 780 running a BSD-flavored Un*x. The grand prize winner of 1984 [ioccc.org] assumes you are running on a PDP or a Vax which had a PDP emulation mode. We tested all of the 1984 entries on th

          • Re:entry explained (Score:3, Informative)

            by voisine ( 153062 )
            Acording to my K&R book here (second edition which was updated long after 1984) static variables are initialied by default to 0, and it also states that variables defined outside of functions are implicitly static.
            • Re:entry explained (Score:3, Insightful)

              by Smallpond ( 221300 )
              Global variables have to be initialized in a multiuser operating system. Otherwise you could allocate big arrays and scan through them for other people's data. The stack is (supposedly) less interesting.
    • Microsoft programmers might be watching... (eek!)
  • if it were the complete linux 2.6 kernel source code... that's interesting!
  • It's geeky to the max ... but cool too
  • by cruff ( 171569 ) on Thursday January 20, 2005 @07:30PM (#11425936)
    If he has a bad experience with C and switches to another language of choice. Can't have the other language asking about the C code tattooed on his arm. :-)
  • Why, on earth, would anybody put themselves through the pain of having a tatoo, of C CODE?! This just seems completely absurd.

    I mean, tattoos in and of themselves can be beautiful works of art. Or a badge of recognition. Or a tradition handed down for millenia.

    But C CODE?! I can just imagine conversations this guy might have.

    "Hey dude, I got me a tattoo last week. It's sooo cool, wanna see."
    "Oh yea, lets have a look."

    [rolls up his sleeve]

    "Umm, so, it's what, an homage to Nazi death camps? Thats no
    • It could have been a tattoo of OBFUSCATED PERL code!
  • "Uh, sorry, dude, I think I made a typo."

  • by toby ( 759 )
    Are there any "typos"?
    hehe no! Adam was particularly careful, for which I am most greatful!
    Maybe Adam should have typed your answers too.
  • Ok, I thought I was bad with my "Born to Code" tattoo (which some people understand to refer to either encryption or working in a hospital, thankfully the other geeks get it though) ... but now after seeing this I think I have to get the next tattoo of the Linux kernel source on my back to top this one ...

Those who can, do; those who can't, write. Those who can't write work for the Bell Labs Record.

Working...