Slashdot Mirror


International Obfuscated C Code Tattoo

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."

56 comments

  1. Get a USB drive by AndroidCat · · Score: 2, Funny

    I doubt human beings will ever replace the floppy.

    --
    One line blog. I hear that they're called Twitters now.
    1. Re:Get a USB drive by Anonymous Coward · · Score: 0

      Does not compute, possible corrections:

      1.Get a floppy drive, I doubt human beings will ever replace the floppy.
      2.Get a USB drive, I doubt human beings will ever replace the USB.

    2. Re:Get a USB drive by Anonymous Coward · · Score: 0

      I know what you mean, I have that too with my sister

    3. Re:Get a USB drive by Anonymous Coward · · Score: 0

      That is so hot. I just want to touch her.

    4. Re:Get a USB drive by Anonymous Coward · · Score: 0

      Congratulations! You win the Creepiest Post Ever award!

      Great Scott...give me the jibblies.

  2. So... who was it? by keiferb · · Score: 4, Interesting

    The article reads like we're almost supposed to know who 'Anonymous' is... Kernighan? Ritchie?

    1. Re:So... who was it? by Anonymous Coward · · Score: 2, Funny

      Bill Gates

    2. Re:So... who was it? by Tumbleweed · · Score: 2, Funny

      That's some pretty nasty-looking code. Probably a Perl programmer. :)

    3. Re:So... who was it? by chongo · · Score: 2, Informative
      FYI: I asked the anonymous author a while back about Perl. They said:
      " Sometimes write in Perl when the wind is right. :-) (my smiley added) No seriously, Perl does have its place. I do use it for short scripting sometimes although in those years (back in 1984) it was sed, awk, grep and sh."
      --
      chongo (was here) /\oo/\
    4. Re:So... who was it? by aled · · Score: 3, Interesting

      He He... Larry Wall (Perl's creator) has at least two winning entries in the IOCCC. If you ever wondered why Perl is so ofuscated...

      --

      "I think this line is mostly filler"
    5. Re:So... who was it? by chongo · · Score: 1
      In regards to the parent posting and Larry Wall: The two awards given to Larry Wall and his code are available. His 1986 grand prize is particularly noteworthy.

      Note that I am neither confirming nor denying that the anonymous winner is Larry. I just highlighting those two awards and the 1986 entry in particular.

      --
      chongo (was here) /\oo/\
    6. Re:So... who was it? by archeopterix · · Score: 1
      The article reads like we're almost supposed to know who 'Anonymous' is... Kernighan? Ritchie?
      It's probably the Anonymous Coward from Slashdot.
    7. Re:So... who was it? by lachlan76 · · Score: 1

      Bill Gates was able to learn C? ;)

  3. What I want to know is... by CommanderData · · Score: 3, Informative
    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 :)
    --
    Urge to post... fading... fading... RISING!... fading... fading... gone.
    1. Re:What I want to know is... by Anonymous Coward · · Score: 1

      Funny, but even funnier the first time I read it in TFA ;-)

    2. Re:What I want to know is... by Anonymous Coward · · Score: 0

      Hmmm, maybe you're confused. I saw the bit in the TFA about RSA codebreaking tattoos and T-shirts. This is not that code, it is the infamous DeCSS perl script written by Keith Winstein and Marc Horowitz at MIT. It is used to extract a video from a DVD, not to crack RSA codes.

  4. Anonymous, Indeed. by Anonymous Coward · · Score: 3, Funny

    Alrighty, you've convinced me to reveal myself to the world.

    It was I that wrote that program, so many years ago!

  5. Is this the Thomas Scovell that by Anonymous Coward · · Score: 0

    wrote Bulletproof FTP?

  6. entry explained by voisine · · Score: 4, Informative

    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 ====

    1. Re:entry explained by chongo · · Score: 1

      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.

      --
      chongo (was here) /\oo/\
    2. Re:entry explained by TwistedSquare · · Score: 1

      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?

    3. Re:entry explained by voisine · · Score: 2, Informative

      global variables are initialized to zero, local stack variables are undefined

    4. Re:entry explained by CableModemSniper · · Score: 1

      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.

      --
      Why not fork?
    5. Re:entry explained by chongo · · Score: 1
      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 assumes you are running on a PDP or a Vax which had a PDP emulation mode. We tested all of the 1984 entries on the same system.

      BTW: That entry by Sjoerd Mullender and Robbert van Renesse remains one of the my all-time favorites to this day. Machine dependent entries are discouraged by the guidelines today, but not so in 1984. It was probably that Grand Prize entry, more than anything, that encouraged Larry and I to hold a 2nd IOCCC back in 1985. It was also the fact that the grand prize authors were from Europe that the word "International" was added to the contest name back in 1985.

      --
      chongo (was here) /\oo/\
    6. Re:entry explained by voisine · · Score: 2, Informative

      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.

    7. Re:entry explained by Smallpond · · Score: 2, Insightful

      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.

    8. Re:entry explained by voisine · · Score: 2, Interesting

      hmmm... so is that done by the kernel then? Otherwise I could just modify gcc to not initialiaze globals couldn't I?

    9. Re:entry explained by Anonymous Coward · · Score: 0

      Yes, it is done by the operating system. But not really to help you out. More to prevent you from seeing data from the program which previously had that data segment.

      The stack would also have been zeroed the first time you see it, but it gets reused for every function call so it is likely that it would be filled with garbage from previous function calls.

    10. Re:entry explained by Anonymous Coward · · Score: 0

      Global 0'initialized vars dont go in the data section, but rather in a separate section of the executable (.bzz? Dont remember). This allows for compression in the executable, as the image only needs to store how many bytes of uninitialized data there has to be for the bz section, rather than a list of all the initializers like the data section.

      So, yes, initialization is done by the loader. Not for security reasons but just to make executables smaller.

      (I believe windows zeroes out any new page allocated by an app for security reasons, but I havent checked it in a while)

  7. Oops... by Ackmo · · Score: 0, Offtopic

    ...there's a typo on his arm. He can edit that, right?

  8. Bah, not interesting.... by Gollum2001 · · Score: 1

    if it were the complete linux 2.6 kernel source code... that's interesting!

    --
    "Only two things are infinite, the universe and human stupidity, and I'm not sure about the former" - Albert Einstein.
  9. Well, I think ... by ninewands · · Score: 1

    It's geeky to the max ... but cool too

  10. He'll have regrets later when... by cruff · · Score: 2, Funny

    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. :-)

    1. Re:He'll have regrets later when... by mvw · · Score: 1

      Yes, quite embarrassing if he grows up, doing e.g. functional programming. :-)

  11. Tattoo? by SteeldrivingJon · · Score: 0

    "International Obfuscated C Code Tattoo."

    Sounds like a gathering of confusing hackers in kilts.

    I expect it would be held in Hungary, and would involve events like the cable toss.

    --
    September 2011: Looking for Cocoa/iOS work in Boston area Cocoa Programmer Quincy, MA
  12. 1 card short of a full pack. by Bitsy+Boffin · · Score: 0

    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 not cool man, why would you do that."
    "NO no, look can't you see, it's C CODE, more than that it's OBFUSCATED, so cool man."
    "Oh, right, yes, of course, how silly of me."

    [quickly moving away from the looney]

    I guess his only saving grace is that tatoo removal is now more or less (painfully I believe) possible. So it's not necessarily a permanant marker of being an absolute idiot.

    --
    NZ Electronics Enthusiasts: Check out my Trade Me Listings
    1. Re:1 card short of a full pack. by Anonymous Coward · · Score: 0

      Silly me, I should have got some PHP code, then I would have been all l33t like you! ;) And there you are, one more reason I'm glad I left christchurch as soon as I could walk ;)

      You could of course always have read my website, which explained "exactly" why I got it. But you were probably too busy with your "back end" eh. BTW, "University" is spelt like that. Most people who have been to one know that.

      Thanks for continuing the stereotype of kiwis as small fish pond bitches.

      -TS

    2. Re:1 card short of a full pack. by Anonymous Coward · · Score: 0

      Ok so picking on your spelling was a bit harsh, after reading more of your site it is obvious you're dyslexic. Sorry about that. But I have to say, someone with a soul-patch in the year 2005 commenting on whether something is aesthetic or not? Puhlease.

      -TS

      p.s. You should try for a job at The Warehouse they pay better than your hourly rates for PHP you know. Much less stressfull than codng, might leave you with a more pleasant disposition! ;)

    3. Re:1 card short of a full pack. by Anonymous Coward · · Score: 0
      Don't you be dissin' the soul patch, jus cause' you ain't got no soul, sucka!

    4. Re:1 card short of a full pack. by Bitsy+Boffin · · Score: 1

      Silly me, I should have got some PHP code, then I would have been all l33t like you!

      I'm not the one who had an insanely stupid pigment inserted into thier skin.

      christchurch as soon as I could walk

      And Christchurch breathed a collective sigh of relief.

      But you were probably too busy with your "back end" eh. BTW, "University" is spelt like that. Most people who have been to one know that.

      Not only does your branding remind one of Nazi death camps, but it appears you are also a spelling nazi, quelle coincidence.

      Little hint for you -- nobody gives a crap. "Correct Spelling" is a relativly new concept in the scheme of things.

      --
      NZ Electronics Enthusiasts: Check out my Trade Me Listings
    5. Re:1 card short of a full pack. by Bitsy+Boffin · · Score: 1

      You should try for a job at The Warehouse they pay better than your hourly rates for PHP you know.

      Yea, and I'm sure they'd love to have me choose when I want to work, what I want to wear (if anything), if I want to go have a bit of a kip for half an hour, and pick and choose from the jobs.

      I do well enough thank you very much.

      --
      NZ Electronics Enthusiasts: Check out my Trade Me Listings
    6. Re:1 card short of a full pack. by Anonymous Coward · · Score: 0

      Nobody gives a crap? And yet you changed the spelling mistake I pointed out, hmm odd~ But you still can't spot the "testamonials" spelling mistake on your navigation bar. I really do think you'll find that any sensible potential client wouldn't take any notice of testimonials given to someone who can't spell he word, it doesn't bode well for the quality of the site you'd produce.

      Oh and it is "go go gadget [insert here]" not "go go [insert here] gadget" so your entire silly little story for your pseudo-business is incorrect.

      You're obviously obsessed with Nazis if you see references to them so easily, hardly an odd pre-occupation for someone from Christchurch, I might suggest you look closer to home or just aquire a new hobby such as doing something constructive rather than being a tasteless bore mr soul.

      -ts

  13. Oops by Dachannien · · Score: 1

    "Uh, sorry, dude, I think I made a typo."

  14. It could have been worse. by cybergrue · · Score: 1

    It could have been a tattoo of OBFUSCATED PERL code!

    1. Re:It could have been worse. by lsmeg · · Score: 1
      It could have been a tattoo of OBFUSCATED PERL code!

      Wouldn't obfuscating perl code be redundant? ;)

      --
      It's OK! I'm a limo driver!
    2. Re:It could have been worse. by Anonymous Coward · · Score: 0
      Perl remains the only language I have seen where you can build a functional obfuscated program entirely out of keywords and function names....
      not exp log srand xor s qq qx xor
      s x x length uc ord and print chr
      ord for qw q join use sub tied qx
      xor eval xor print qq q q xor int
      eval lc q m cos and print chr ord
      for qw y abs ne open tied hex exp
      ref y m xor scalar srand print qq
      q q xor int eval lc qq y sqrt cos
      and print chr ord for qw x printf
      each return local x y or print qq
      s s and eval q s undef or oct xor
      time xor ref print chr int ord lc
      foreach qw y hex alarm chdir kill
      exec return y s gt sin sort split
  15. Sigh. by SteeldrivingJon · · Score: 1


    To explain my 'joke', one of the definitions of 'tattoo' is " b : outdoor military exercise given by troops as evening entertainment"

    One of the better known is the Edinburgh Military Tattoo, which involves lots of people in kilts, playing bagpipes.

    Hence, the hackers in kilts.

    (Alas, I got this mixed up with the Highland Games, which is why I mentioned the 'cable toss', a pun on the traditional 'caber toss' competition of throwing something that looks like a wooden telephone pole.)

    The Hungary bit was mentioned because an international event involving obfuscated C code should surely be held in Hungary, in honor of Hungarian notation, which obfuscates code intended for maintenance.

    My Karma should now be "Negative: needed to explain own joke"

    --
    September 2011: Looking for Cocoa/iOS work in Boston area Cocoa Programmer Quincy, MA
    1. Re:Sigh. by Anonymous Coward · · Score: 0

      Hey well I got it, and it is my tattoo, but looksee I have no karma points ;)

      -TS

  16. Don't give ideas... by Spy+der+Mann · · Score: 1

    Microsoft programmers might be watching... (eek!)

  17. Typos by toby · · Score: 1
    Are there any "typos"?
    hehe no! Adam was particularly careful, for which I am most greatful!
    Maybe Adam should have typed your answers too.
    --
    you had me at #!
    1. Re:Typos by Anonymous Coward · · Score: 0

      hehe thanks, typo fixed. Though you would have looked really clever if you'd spotted the typo in the c code in the html that was there briefly until someone noted it to me ;)

      -TS

  18. you're welcome by toby · · Score: 1
    I'm not normally into tattoos - it's hard for me to think of anything so signficant that I would commit it to flesh - but I liked the concept of yours a great deal. I bet there are 1000 /. readers muttering now, "Damn! I wish I'd thought of that" :-)

    I suppose I could get a saying of Chairman Knuth tattooed on my buttocks - something about premature optimisation, perhaps. Actually there are so many great computer science quotes I'd never be able to decide.

    --
    you had me at #!
  19. Geek tattoos by Spooker · · Score: 1

    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 ...

  20. Mark Twain said by Giggle+Stick · · Score: 1

    "A joke is like a frog. You learn alot about it by dissecting it, but you kill it in the process."