Slashdot Mirror


5th Annual Obfuscated Perl Contest

$Bob writes "The best and brightest of the Perl community are showing up to drive you insane. Test you strength in the 5th Annual Obfuscated Perl Contest!" Name your variables after the stooges! Write Spagetti! Its good!

158 comments

  1. Compiler solving Towers of Hanoi by Idaho · · Score: 3

    I just found it. It's called 'vanschnitz' and can be found here

    --
    Every expression is true, for a given value of 'true'
  2. Re:Obfuscated Perl? by photozz · · Score: 1

    "trolling, karma-whoring crap" Have you considered a nice hot bubble bath and maybee a little time off in the country to rest?? Take your mind off things and remember how much we should all just love each other on this big ball of granite?? other than that, I agree.

    --


    Dirty Pirate Hooker
  3. Four words: by Anonymous Coward · · Score: 4
  4. Re:Modification of read only value attempted by yomahz · · Score: 1
    You often post 'jokes' as an AC funny man? More like flame bait.

    Too bad I bit.

    --

    A mind is a terrible thing to taste.

    --
    "A mind is a terrible thing to taste."
  5. Re:unix comes with a perl obfuscator by BilldaCat · · Score: 2

    well, damn, i'll have to post that more often then.

    mod this guy up!

    --
    BilldaCat
  6. Re:The classic obfuscated contest (hilarious) by extar-bags · · Score: 1

    I don't know... I always liked gandalf.c--the one where the code is in the shape of the Cat in the Hat.

    --

    ----------
    "Rock over London... Rock on Chicago..." -Wesley Willis

  7. Re:Attack of the Killer Llamas... by Ranger+Rick · · Score: 1
    Nah, that'll come in 2nd. First place will go to the guy who rewrites the BBS Door game 'Cripple Smash'.

    :wq!

    --

    WWJD? JWRTFM!!!

  8. Re:Ah, yes, Perl... by emmons · · Score: 2

    so do unix hackers... ;)

    --
    Do you even know anything about perl? -- AC Replying to Tom Christiansen post.
  9. Re:There's a contest!?! by jason_aw · · Score: 2

    One of the entries is a "wc"[1] programme that will work both in Perl and C... Makes my teeth itch :-)

    [1]Word count, rather than Water Closet, of course.

  10. Re:unix comes with a perl obfuscator by dmp · · Score: 1

    Ahmen.

    --
    Stop talking about who's to blame when all that counts is how to change --"Born of Frustration" - James
  11. Re:Attack of the Killer Llamas... by jason_aw · · Score: 1

    Or perhaps Attack of the Mutant Camels, another Minter classic.

    Jeff Minter is easily the greatest computer game creator the world has ever seen.

  12. Re:What's the point? by Kinthelt · · Score: 1

    How could you possibly say that LISP is an obfuscated language? It's by far one of the most elegant languages ever created! You just need to shift your mind from thinking iteratively to thinking recursively.

    --

    "Evil will always triumph over good, because good is dumb." - Dark Helmet (Spaceballs)

  13. Obfuscation humour lost on Perl by Sebastopol · · Score: 1


    Obfuscated C is funny because C is supposed to be all strict and anal. Obfuscated Perl isn't funny because Perl deliberately allows obfuscation for the sake of speedy coding.

    It's like the Dem/Repub convetions: they are supposed to be flimsy and full of rhetoric, so why does the press write articles proclaiming how flimsy and rhetorical(?) the convetions are (will be.) Duh. As my grandma would say as she downed another Miller Lite: "No shit, Sherlock."


    ---

    --
    https://www.accountkiller.com/removal-requested
    1. Re:Obfuscation humour lost on Perl by core10k · · Score: 1

      >Obfuscated C is funny because C is supposed >to be all strict and anal. C isn't strict and anal, it just doesn't let you modify the language on the fly. Which puts it in exactly the same league as Perl. C is astoundingly elegant, and a good introduction to the One True Language (Assembly) As to perl. Any language that lets you have lingering, 'we don't give a **** where this goes' pointers deserves to die. ($_ is a travesty on mankind)

  14. Slash by Octal · · Score: 1

    I know I'll get moderated down for trolling or redundancy or somesuch, but I just have to say this: Enter Slash! You know you'll win. Of course getting it under the 512k line will be a little tricky but you can do it! We have faith in you!

    1. Re:Slash by Octal · · Score: 1

      Ohh... well then, I guess Slash won't make it after all.

    2. Re:Slash by Plutor · · Score: 1

      Read again. Not 512k. Is 512 CHARACTERS. Been working on cramming game in 512 chars for 12 hours.

  15. I win. :) by rednic · · Score: 1

    perl, especially when written by me, seems to be a write-only language... :)

  16. Ever notice... by ChaoticCoyote · · Score: 2
    ...that there isn't an "Obfuscated C++ Contest?"

    That's because it wouldn't be very challenging... ;)

    (This from a guy who loves C++)

    1. Re:Ever notice... by PD · · Score: 2

      Doesn't compile with g++. You need to change it to even get it to work.

      1) you forgot #include
      2) what is foreach? Do you mean for_each?
      3) You've got the unary function declaration all wrong.

      Anyway, your program isn't really fair because you're including a great deal of code that isn't obfuscated. I could play by the same rules and write a C program one line long that includes a great deal of code and isn't obfuscated. If I only count that one line, then I win the challenge!

    2. Re:Ever notice... by PD · · Score: 1

      Dang! The html munger munged the line above that should have said

      1) you forgot #include string (mentally add the angle brackets)

  17. Recursive contest... by BaronM · · Score: 5

    How about a writing Perl-obfuscator in obfucsated perl? Then, just crank your code through enough times that even you can't recognize it, and submit!

    1. Re:Recursive contest... by Lozzer · · Score: 1

      I think you're going to have a hard time finding strange attractors in a discrete space, most likely the program will just keep growing.

      --
      Special Relativity: The person in the other queue thinks yours is moving faster.
    2. Re:Recursive contest... by DrQu+xum · · Score: 1

      How about a writing Perl-obfuscator in obfucsated perl? Then, just crank your code through enough times that even you can't recognize it, and submit!
      Would the obfuscator have to produce code that produces the same output as the original?

      Note that I'm not putting down obfuscation in any way. I have been known to use several hundred #define macros and quite a few heavily nested ?(?:):(?:) constructs in my old C projects.

      --
      DrQu+xum: Proof that the lameness filter doesn't work.
    3. Re:Recursive contest... by cainem · · Score: 1

      Would the obfuscator have to produce code that produces the same output as the original?

      The obfuscator would have to produce the same output, after all the point of an obfuscator program is just to alter the code while keeping the same functionality.
      But if you fed the output into the obfuscator, it mightn't be the same code. If you keep doing it, you can either:

      A) reach a program which is unchanged by the obfuscator

      B)reach a closed loop, like A->B->...->X->A

      C)not end up in a loop at all.
      In the last case you might get Strange Attractors in perlcode-space :-)

  18. Ah, yes, Perl... by _xeno_ · · Score: 4
    There's nothing better than sitting there with an open Emacs window, watching as some newbie comes by, looks at the mess, and says "That's computer code?" Ah, scaring the uninitiated... that's what Perl code is all about...

    (Well, actually, it was the regex that put him off... Any language where
    while ($line=<>) {
    foreach ($line=~/\"((?:(?:[^\"\\]*)|(?:(?:\\\")*))*)\"\s?| ([^\s]+)\s?|\s/g) {
    print "$_\n";
    }
    }
    is legal is enough to scare anyone...)

    (One faux karma point to anyone who can tell me what that does :))

    --
    You are in a maze of twisty little relative jumps, all alike.
    1. Re:Ah, yes, Perl... by .sig · · Score: 1

      You mean one faux karma point to anyone with a Perl interpretor?

      --
      -Space for rent
    2. Re:Ah, yes, Perl... by elflord · · Score: 1

      Python has regex's, so you could do much the same thing.

    3. Re:Ah, yes, Perl... by Phexro · · Score: 3

      wow, you must have some upper-class newbies around you. most people who watch me use emacs for anything get scared.

      Me: C-x 5 f ~/pr TAB w TAB RET (type type code hack) C-x w M-x compile RET RET
      Them: AAAAAaaaaaaaaaugh! (head explodes)
      --

    4. Re:Ah, yes, Perl... by Matts · · Score: 2

      Thats not scary... You're simply capturing words or options, optionally between quotes while allowing for quote escaping, using \".

      Try doing that in one line with any other language and still make it as efficient as a Perl regex...

      --

      Matt. Want XML + Apache + Stylesheets? Get AxKit.
    5. Re:Ah, yes, Perl... by JediLuke · · Score: 1

      yeah but french people smell funny... ;)

      JediLuke

      --

      JediLuke
      -Do or Do Not, There is no Try
    6. Re:Ah, yes, Perl... by Nidhogg · · Score: 3
      1. (One faux karma point to anyone who can tell me what that does :))

      That's easy. It makes my head hurt and generates a lovely whooshing sound.

      I'll take that karma point now. =)

    7. Re:Ah, yes, Perl... by Erataikasu · · Score: 2

      Lots of languages have regex support these days. Other than that, and implicit variables (Pronouns for programming languages), what is really so bad about Perl?

      Sure, it looks unintelligable to someone who doesn't know it, but then so does french.

    8. Re:Ah, yes, Perl... by gwernol · · Score: 1

      Thats not scary... You're simply capturing words or options, optionally between quotes while allowing for quote escaping, using \".

      Try doing that in one line with any other language and still make it as efficient as a Perl regex...

      But he didn't claimed it wasn't efficient. He claimed that it was obfuscated. Note that efficient in terms of the number of characters of code it takes to express a function is not the same thing as the runtime efficiency of the function. Also note that compact syntax tends to make things more obscure, rather than less. Also note that efficiency of writing is not the same (and in fact is often reciprocal to) efficiency of reading. Just some thoughts.

      --
      Sailing over the event horizon
  19. Carnivore? by .sig · · Score: 2

    Is someone trying to trick the FBI into releasing the source for Carnivore?
    If so, how do they know it's written in Perl? I thought they were using VB....
    Of course we all know that it's boud to be obfuscated enough to win......

    --
    -Space for rent
    1. Re:Carnivore? by cainem · · Score: 1

      carnivore was originally written in grep, but is now fgrep for performance reasons.

  20. Re:$5 on funny by Anonymous Coward · · Score: 1

    Perhapse it's redundant because someone says something like it every time Perl comes up in a story...

    dumbass.

  21. Re:How many by toup · · Score: 3

    How many of you were sitting at work when you saw this item, and have since spent a good deal of time trying to write a bit of obfuscated perl to post here as your response?

    I'm not the only one, fess up.


    Here you go.

    #!/usr/bin/perl
    print "hello world\n";
    exit;

    --
    -toup
  22. Cool! by GrievousAngel · · Score: 1

    eval("\x70\x72\x69\x6e\x74\x20\x22\x54\x68\x69\x73 \x20\x74\x6f\x74\x61\x6c\x6c\x79\x20\x52 \x75\x6c\x33\x5a\x21\x0a\x22")

    --


    "Extremism in defense of liberty is more fun."
    1. Re:Cool! by acacia · · Score: 1

      Yes it does!

      --
      ~Religion is O.K., as long as it gets you laid.
  23. Perl is like masturbation... by dmp · · Score: 1

    You don't want to admit doing it and it gets a little messy sometimes, but you sometimes need old Rosy to get the dirty deed done quickly.

    --
    Stop talking about who's to blame when all that counts is how to change --"Born of Frustration" - James
  24. Some obfuscation there... by JBF-BooK · · Score: 2

    At Paris.pm (in France), we have devoted a page to obfuscating the expression $A++ .

    Now 55 and counting.
    Check the one with NO alphanumerical characters AT ALL!

    BooK
  25. Re:Obfuscated Perl? by Ranger+Rick · · Score: 1
    If you know people that encourage that, you're hanging out with a bunch of idiots. I don't know any perl coders that would recommend any of that.

    Good programming habits are the same across most languages. I think there are just more bad perl programmers because they all came from doing web design. :) Some grow out of it, most don't.

    :wq!

    --

    WWJD? JWRTFM!!!

  26. Obfuscated Perl? by DrQu+xum · · Score: 3

    How are you able to tell the difference between Obfuscated & Un-Obfuscated Perl? :) Make your bets now: Will this post be Funny or Flamebait?

    --
    DrQu+xum: Proof that the lameness filter doesn't work.
    1. Re:Obfuscated Perl? by Erataikasu · · Score: 1

      Well, how much regex use is appropriate is a matter of opinion. Other than that, how does Perl _encourage_ the use of break, globals, and meaningless variable names?

      (Warning: Variable name too meaningful!)
      (Warning: No break detected! Logic may not be convoluted enough.)
      (Warning: Local variable detected, recommend use of global instead)

    2. Re:Obfuscated Perl? by jallen02 · · Score: 1

      LMAO Someone has Karma to burn.. ROFL modding posts randomly as insightful


      If you think education is expensive, try ignornace

    3. Re:Obfuscated Perl? by Ricdude · · Score: 1

      I've always found perl code to be indistinguishable from "strings /dev/random", myself...

      --
      How's my programming? Call 1-800-DEV-NULL
    4. Re:Obfuscated Perl? by Burz · · Score: 1

      Of course even Chinese, having pictograms, is clearer than Perl. I suspect that Billions of years from now when our computers finally succumb to universal heat-death, Perl syntax will remain the only one still thermodynamically permissible.

    5. Re:Obfuscated Perl? by afc · · Score: 1
      What do poor RMS's behinds have to do with the beligerance and lack of sense of humour of some (if not most) Perl mongers?

      If anything, you should tell him to go shove his head up Tom Christiansen's ass...
      --

      --
      Information wants to be beer, or something like that.
    6. Re:Obfuscated Perl? by Disco+Stu · · Score: 1

      Dude...this is the funniest thing I've seen all day. BTW, notice that my original post got modded back up... "insightful"? WTF? It was a troll...

    7. Re:Obfuscated Perl? by greg_barton · · Score: 1

      Ya, isn't "Obfuscated Perl" a bit redundant?

    8. Re:Obfuscated Perl? by Bozzio · · Score: 1

      Now this last moderation "Doesn't make a LICK of sense!"

      "Producing satire is kind of hopeless because of the literacy rate of the American public."

      --
      I just pooped your party.
    9. Re:Obfuscated Perl? by oznet · · Score: 1

      People always say things like that about Perl and it seems that it's based mostly on people not understanding the regular-expression syntax and the "default" variables (like $_).

      Other than that the code looks no more complicated than any other scripted language.

      If everyone who looked at Perl code for the first time had a short two-sentance explanation of the above, I think they could read it right away.

      Of course, if they are looking at crappy code then it will still be difficult, but anyone can write hard to follow code in any language.

    10. Re:Obfuscated Perl? by DrQu+xum · · Score: 1

      Note to self: Perl jokes open up a big-ass can of worms on /.

      --
      DrQu+xum: Proof that the lameness filter doesn't work.
    11. Re:Obfuscated Perl? by David+P · · Score: 1

      Yeah, Perl can get pretty funky... I'm used to C++ and the first time I really sat down and looked at a simple program (forms mailer), I had to look it over a few times just to figure out what the functions were doing. Plus, all the '$'s and '@'s reminded me of Basic.

      I'm betting on Funny just because it's not another 'firt post' post.

      ---------------

    12. Re:Obfuscated Perl? by rmull · · Score: 2

      nor does this one, for that matter. :)

      --
      See you, space cowboy...
    13. Re:Obfuscated Perl? by jason_aw · · Score: 1

      > Using regexes for everything, even though there are built-in functions

      Well, there's nothing wrong with regexes. They're a neat, efficient, powerful solution. Okay, you can overuse them... occasionally

      > more obfuscated approach of a break, continue or exit

      That can often be the clearest and most natural way of doing it; you just have to clear the rigid "textbook" thinking out of your mind.

      > Excessive use of globals, Meaningless variable names

      Well, they're not really perl specific... and besides, *sometimes* a "meaningless" variable name is better (whatever your language). "i" is often better than "loop_counter", for example...

      > Perl causes brain damage

      Or people who don't understand Perl properly think it looks brain damaged?

    14. Re:Obfuscated Perl? by Tim+Macinta · · Score: 1
      Will this post be Funny or Flamebait?

      I vote for "Insightful".

    15. Re:Obfuscated Perl? by photozz · · Score: 1

      Un-Obfuscated Perl is blue
      Obfuscated Perl is red
      Duh....

      --


      Dirty Pirate Hooker
  27. Re:My gripes with perl... by cameloid · · Score: 1

    The problem with Perl is that it lets me do things too quickly, meaning I have to spend the rest of my time reading gentlemen's literature with my feet up on the desk.

    Heh!

    --
    -- Cisk for the Cisk God
  28. Re:There's a contest!?! by Ranger+Rick · · Score: 1
    Quite a bit, I expect:

    tar -xvf perl-5.6.0.tar.gz
    cd perl-5.6.0
    ./Configure
    make
    make install

    :wq!

    --

    WWJD? JWRTFM!!!

  29. Re:Obfuscated C code from Perl by ChadN · · Score: 1

    Unfortunately, the resulting "obfuscate.c" is WAY too big to be entered in the contest...

    --
    "It's overkill, of course. But you can never have too much overkill." - Anonymous Slashdot Coward
  30. How many by swerdloff · · Score: 5

    How many of you were sitting at work when you saw this item, and have since spent a good deal of time trying to write a bit of obfuscated perl to post here as your response?

    I'm not the only one, fess up.

    1. Re:How many by Vassily+Overveight · · Score: 1

      Absolutely not. I deny it. Uh-uh. Nope.

      --

      "If I have seen further than other men, it is by stepping on their glasses." - Michael Swaine

    2. Re:How many by idistrust · · Score: 1

      print('well i for one thought about it\n'); print<
      now... please don't pick that apart because i noticed mistakes when i wrote it... :) please? be kind on me.

      --

      --Ask a silly person, get a silly answer.

    3. Re:How many by afc · · Score: 1

      Man, that's horrible. Actually, the very first line of it was enough to make me puke
      --

      --
      Information wants to be beer, or something like that.
    4. Re:How many by Gurlia · · Score: 2

      Obfuscated code? Hmmm...

      "Don't modify spaghetti code unless you can eat the consequences."

      Or, rather:

      !(modify $spaghetti{$code}) unless $eat{$consequences};

      (Shamelessly stolen from somebody's email sig)


      ---
      --
      mikre he sophia he tou Mikrosophou.
  31. A new business model for Open Source? by mrogers · · Score: 2

    Now we can make some money from GPL'd software: give the source code away for free, and charge for the comments.

  32. Re:What's the point? by Vassily+Overveight · · Score: 1

    I'm still waiting for my eyeballs to uncross after reading my last LISP progrem.

    [Begin Also Spach Zarathustra theme music] "My God, it's , it's ... full of parens"

    --

    "If I have seen further than other men, it is by stepping on their glasses." - Michael Swaine

  33. What's the point? by JebOfTheForest · · Score: 1
    All perl is inherently obfuscated. It's the most obfuscated looking language since TECO.

    jeb.

    1. Re:What's the point? by sg_oneill · · Score: 1

      I'm getting the impression that implementing forth is a common past time for the adventurous programmer. I did a similar thing for a little z80 project about five years ago as the only 4th compilers I could find had way too much CP/M junk hanging off it. Took about 3 or 4 days for a compiler, written in turbo pascal and compiling to Assembler. Again, only a subset, but verry simple. What a *great* language it is that allows such things to happen. I often wonder just how C became so big... But I guess no one was really trying to implement unix on toasters.

      --
      Excuse the Unicode crap in my posts. That's an apostrophe, and slashdot is busted.
    2. Re:What's the point? by godel · · Score: 1

      And where + means concatenation or addition.
      Gah.

    3. Re:What's the point? by afc · · Score: 1
      Yeah, yeah, Lots of Insane yada-yada

      You know what the fun thing is? Parentheses are about the only syntatic "noise" characters in Lisp that are in your face, so to speak. And if you're an experienced lisper you just ignore'em when reading the code.

      Now compare that with the plethora of $, @, % and what not scattered around here and there in your favourite toy language. Yeah, I know, once you get the hang of it it's OK, but how long does it take and most important: is it really necessary?
      --

      --
      Information wants to be beer, or something like that.
    4. Re:What's the point? by Vassily+Overveight · · Score: 1

      Nah. Forth is the most obfuscated language ever. Closely followed by LISP and APL.

      --

      "If I have seen further than other men, it is by stepping on their glasses." - Michael Swaine

    5. Re:What's the point? by excesspwr · · Score: 1

      LOGO?

    6. Re:What's the point? by Vassily+Overveight · · Score: 1

      Hey, just havin' some fun. Nothing like tweaking someone's favorite language to raise the ole blood pressure. If you like LISP, feel free to enjoy it.

      --

      "If I have seen further than other men, it is by stepping on their glasses." - Michael Swaine

    7. Re:What's the point? by Kelvin · · Score: 1

      that's INTERCAL.

    8. Re:What's the point? by dkm · · Score: 1

      I wish I could remeber what it was called but I ran across a language once which allowed computed, probabilitic come froms (i.e., come from line 10 12% of the time). Try to figure out what was going on in that source code!

      It wasn't a serious language but there were compilers availible.

    9. Re:What's the point? by ucblockhead · · Score: 1

      Yeah, Perl has nothing on a language that let you define '2' as a verb that returns 3.

      : 2 3 ;

      Do I have that right? It's been years.

      --
      The cake is a pie
    10. Re:What's the point? by sg_oneill · · Score: 1
      Something like that....

      : 1 2 ;

      1 1 + .;

      4

      Nutty! Forth rocked something hard, partly because it really was FIERCELY obsfucated, but with a little work actually could be made quite readable. Despite the fact the little bugger didn't have *real* variables in the same sense we know them now, yet building whacky big data structures was a breeze. I even managed to get the little bugger to be quasi-OOP with about 6 lines of code. A damn fine language.

      --
      Excuse the Unicode crap in my posts. That's an apostrophe, and slashdot is busted.
    11. Re:What's the point? by ucblockhead · · Score: 1

      And if you want to obfuscate that further, change the base variable to something odd, like 43.

      I can envision a text output routine that works by setting the output base to 36...

      Anyway, a nice, lightweight language, too. I played around with implementing it myself in 6502 assembly way back when, and was able to build an incredibly large subset of the language without all that much effort. But then, 4k Forth kernels are not unheard of.

      Very underrated, but almost impenetrable, especially in the versions that didn't have real files, but saved code on raw 4k pages. It could get really nasty when coders started playing with the formatting to get more code in.

      Damn, now I'm getting the nasty urge to try implementing it again...

      --
      The cake is a pie
  34. Re:Downside by technos · · Score: 2

    I think of it as open-source copy protection.

    --
    .sig: Now legally binding!
  35. Re:$5 on funny by swerdloff · · Score: 2

    I've got $7 that says it doesn't get moderated at all.

    Of course, why my cash is talking to me is a different story.

  36. Downside by Vassily+Overveight · · Score: 1

    I was always a fan of the Obfuscated C contest (my fave category was 'abuse of the preprocessor'), but have to say these contests have their downside. They're used by language Nazis as arguments for why its a bad idea to use the language involved. "How can you consider using a language that's so crappy that people can write inpenetrable code with it?" is the usual harangue. (To which I always responded that any language can be abused in this fashion. Then I'd shoot them with my Nerf gun.)

    --

    "If I have seen further than other men, it is by stepping on their glasses." - Michael Swaine

  37. My vote's for "Insightful" by phlake · · Score: 1
    but since i have not moderator points today, i'll just post it. =)

    seriously, though, while i suppose there is such a thing as elegant perl, as neat perl, as organized, modular, and even object-oriented perl, at its core, perl is a way to get things done quickly and simply. and, at least to some of the people whose perl i've had the "pleasure" of wading through, quickly and simply also seems to imply sloppy and quirky. which i suppose doesn't sound too bad, but when another coder comes along and extends sloppy and quirky code with messy, odd-ball code...

    maybe i should just go back to c++, where things are always so straightforward... (heh)

  38. What I'm waiting for... by toh · · Score: 5

    Wouldn't the real challenge be an UnObfuscated Perl contest?

    (disclaimer: I like and use perl for many things...but it still looks like a doctor's handwriting ;)

    --
    -- Life is short. Forgive quickly. Kiss slowly. ~ Robert Doisneau
    1. Re:What I'm waiting for... by JediLuke · · Score: 1

      actually a unobfuscated Java contest would be better... :)

      can't stand java...perl may look like a doctors handwritting, but java looks like a 4 year old learning how to write.

      JediLuke

      --

      JediLuke
      -Do or Do Not, There is no Try
  39. Dear moderator... by photozz · · Score: 1

    Main Entry: obfuscate Pronunciation: 'äb-f&-"skAt; äb-'f&s-"kAt, &b- Function: transitive verb Inflected Form(s): -cated; -cating Etymology: Late Latin obfuscatus, past participle of obfuscare, from Latin ob- in the way + fuscus dark brown -- more at OB-, DUSK Date: 1577 1 a : DARKEN b : to make obscure 2 : CONFUSE - obfuscation /"äb-(")f&s-'kA-sh&n/ noun - obfuscatory /äb-'f&s-k&-"tOr-E, &b-, -"tor-/ adjective Thus my above coment was a witty comentary upon the popular conception of the word obfuscate. I am dismayed you did not get it.

    --


    Dirty Pirate Hooker
    1. Re:Dear moderator... by photozz · · Score: 1

      thank you, I'll just shut up now........

      --


      Dirty Pirate Hooker
  40. Day Job... by Once&FutureRocketman · · Score: 3

    One word: Microsoft.


    --

    "Research is what I am doing when I don't know what I am doing." -- Wernher von Braun

    1. Re:Day job... by jallen02 · · Score: 1

      I really hope mainframe programming does not make everyone as rude as you.


      If you think education is expensive, try ignornace

  41. Micrsoft 2000 Obfuscated C# Challenge by Anonymous Coward · · Score: 2

    All code due Dec. 31, 2000. Please direct questions to Steve Ballmer, Microsoft Craporation.

    1. Re:Micrsoft 2000 Obfuscated C# Challenge by the_other_one · · Score: 1

      The GOTO will kind of remove the challenge from obfuscation

      --
      134340: I am not a number. I am a free planet!
  42. Re:Rebuttal by radja · · Score: 1

    or write just anything in intercal...

    --

    No one can understand the truth until he drinks of coffee's frothy goodness.
    --Sheikh Abd-Al-Kadir, 1587
  43. Re:Attack of the Killer Llamas... by gowen · · Score: 1
    The last thing I saw from him was a psychedelic, updated version of the old Atari classic Tempest (remember the rotary control?) for MS-Dos (and the Jaguar IIRC). Tempest 2000, it was called.

    Blindingly fast (on a DX66) and insanely addictive.

    --
    Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
  44. Re:Attack of the Killer Llamas... by efuseekay · · Score: 1

    Or...was it Revenge of the Killer Llamas (the sequel?) I forgot. It's suuuuuuuuuch a long time ago where code is short and sweet and all packed into 3K (for the VIC 20). Now Take That for obsfuscated!

    --
    Mode (3) smart-aleck mode. Press * to return to main menu.
  45. Re:Attack of the Killer Llamas... by efuseekay · · Score: 1

    just checked, it's Attack/Revenge of the Mutant Camels. Ilamasoft for the Vic20 (3Kilobytes!).
    I got it confused with Llamasoft.

    Jeff Minter's still coding!

    --
    Mode (3) smart-aleck mode. Press * to return to main menu.
  46. RSA in 2 lines most obfuscated by obtuse · · Score: 1

    Is there any perl more obfuscated than the implementation of RSA in 2 lines? That's unbelievable. It was impressive years ago when it was 5 lines. Of course, it could be argued that it belongs in an Obfuscated dc contest instead.

    --
    Assembly is the reverse of disassembly.
  47. Re:The classic obfuscated contest (hilarious) by Sharkeys-Day · · Score: 1

    The Braille/ascii converter was my favorite too.

    The real beauty of the program, was that the code itself was its own documentation -- in braille!
    You ran the program on itself to see the documentation in ascii.

  48. Re:Modification of read only value attempted by yomahz · · Score: 1
    errr.. ummm.. it's a joke.. get over it
    --

    A mind is a terrible thing to taste.

    --
    "A mind is a terrible thing to taste."
  49. Re:i wonder... by photozz · · Score: 1

    It's a wierd contrast.. sometimes the can do something so well, and be feared for it... Yet other time be a bunch of bumbling idiots. (Waco.. Ruby ridge....)

    --


    Dirty Pirate Hooker
  50. Re:Attack of the Killer Llamas... by jason_aw · · Score: 1

    Yeah? What's he doing these days, anything interesting?

    Attempt to drag us back to some semblance of on-topicness: Llamas, Camels; is Larry Wall really just a pseudonym for Jeff Minter? :-)

  51. Re:There's a contest!?! by Vassily+Overveight · · Score: 1

    Ah yes. I had the same situation with C. My favorite was the guy who knew Fortran and hated C, so he used the preprocessor to, in effect, create his own Fortran-like language. (My God, now I'm going to have nightmares about that one tonight)

    --

    "If I have seen further than other men, it is by stepping on their glasses." - Michael Swaine

  52. A comment and a suggestion... by Brazilian+Geek · · Score: 1

    This is neat, a first post about perl that doesn't necessarily flame it to death.

    My $5 are on obfuscated, perl can be used to generate really neat and inteligable (sp?) code if you're not too lazy. Since I'm REALLY lazy, I'll submit some of my code.

    As a suggestion, they should have a category for the smallest program to serve a webpage - that'll be intresting, coding an http 1.0 daemon and serving a page without using any modules. Just a thought...

    --
    All browsers' default homepage should read: Don't Panic...
  53. Re:My gripes with perl... by GoBamaRollTide · · Score: 1

    So is the complaint from many Windows users... Let's see - I can save with -s, File..save, File...Save As, or the little button thingey... It's a small world, after all.... :-)

    --
    Roll Tide! For Bama headlines, check out Bamadog.
  54. Re:There's a contest!?! by aridhol · · Score: 1

    Hmmm...I wonder how much preprocessor magic it would take to make C into Perl?
    Scary thought

    --
    I can't say that I don't give a fuck. I've just run out of fuck to give.
  55. Re:Translation. by EvilGwyn · · Score: 1

    The shortest version yet: sort | uniq -c

    --
    Phear my l33t homepage.
  56. Re:i wonder... by calcfreak901 · · Score: 1

    I agree with Congress, the White House, and Microsoft, but those are the main blunderers. The CIA, FBI, and particularly the NSA, and for those of you who remember the cold war, the KGB and GRU, are to be feared, particularly by crackers, phreaks, lusers, and other shower scum of the hacking world. Most of us have nothing to be concerned of.

    On a tangentally related note, anyone considered other obfuscated contests, such as an obfuscated TI-BASIC contest, for those of us still in high school or college?

  57. Re:I'll enter my Katzifyer! by orcrist · · Score: 2

    Try this; it will actually work ;-)

    #!/usr/bin/perl -w
    s{(tech|rights|Constitution)}
    {(qw(corporation abuse geek system internet new era Hellmouth))[int(rand(8))] . " $1"}egi, print for <DATA>;
    __DATA__
    Plugin your text here

    --
    San Francisco values: compassion, tolerance, respect, intelligence
  58. Re:Obfuscated C code from Perl by apirkle · · Score: 2

    yohmaz says:
    -----------
    For the next Obuscated C code contest, I'm going to write the follwing perl script:

    #!/usr/bin/perl
    print "Hello World\n";

    and then

    perl -MO=CC,-O2,-oobfuscate.c obfuscate.pl

    and submit the obfuscate.c
    ----------
    So, here's the output {grin}:
    *whine* but its ONLY 295 lines...

    #include "EXTERN.h"
    #include "perl.h"
    #include "XSUB.h"

    /* Workaround for mapstart: the only op which needs a different ppaddr */
    #undef Perl_pp_mapstart
    #define Perl_pp_mapstart Perl_pp_grepstart
    #define XS_DynaLoader_boot_DynaLoader boot_DynaLoader
    EXTERN_C void boot_DynaLoader (pTHX_ CV* cv);

    static void xs_init (pTHX);
    static void dl_init (pTHX);
    static PerlInterpreter *my_perl;

    #ifdef BROKEN_STATIC_REDECL
    #define Static extern
    #else
    #define Static static
    #endif /* BROKEN_STATIC_REDECL */

    #ifdef BROKEN_UNION_INIT
    /*
    * Cribbed from cv.h with ANY (a union) replaced by void*.
    * Some pre-Standard compilers can't cope with initialising unions. Ho hum.
    */
    typedef struct {
    char * xpv_pv; /* pointer to malloced string */
    STRLEN xpv_cur; /* length of xp_pv as a C string */
    STRLEN xpv_len; /* allocated size */
    IV xof_off; /* integer value */
    double xnv_nv; /* numeric value, if any */
    MAGIC* xmg_magic; /* magic for scalar array */
    HV* xmg_stash; /* class package */

    HV * xcv_stash;
    OP * xcv_start;
    OP * xcv_root;
    void (*xcv_xsub) (CV*);
    void * xcv_xsubany;
    GV * xcv_gv;
    char * xcv_file;
    long xcv_depth; /* >= 2 indicates recursive call */
    AV * xcv_padlist;
    CV * xcv_outside;
    #ifdef USE_THREADS
    perl_mutex *xcv_mutexp;
    struct perl_thread *xcv_owner; /* current owner thread */
    #endif /* USE_THREADS */
    cv_flags_t xcv_flags;
    } XPVCV_or_similar;
    #define ANYINIT(i) i
    #else
    #define XPVCV_or_similar XPVCV
    #define ANYINIT(i) {i}
    #endif /* BROKEN_UNION_INIT */
    #define Nullany ANYINIT(0)

    #define UNUSED 0
    #define sym_0 0

    Static OP op_list[3];
    Static LISTOP listop_list[2];
    Static SV sv_list[12];
    Static XPV xpv_list[7];
    Static XPVAV xpvav_list[3];
    Static XPVHV xpvhv_list[1];
    static OP * pp_main (pTHX);

    static OP op_list[3] = {
    { 0, 0, NULL, 0, 0, 65535, 0x0, 0x0 },
    { 0, 0, NULL, 0, 177, 65535, 0x0, 0x0 },
    { (OP*)&listop_list[1], 0, NULL, 0, 190, 65535, 0x1, 0x0 },
    };

    static LISTOP listop_list[2] = {
    { 0, 0, NULL, 0, 209, 65535, 0x5, 0x0, 0, 0, 1 },
    { 0, 0, NULL, 0, 178, 65535, 0xd, 0x40, &op_list[1], &op_list[2], 5 },
    };

    static SV sv_list[12] = {
    { &xpvav_list[0], 1, 0xa },
    { &xpvav_list[1], 1, 0xa },
    { 0, 1, 0x100 },
    { &xpv_list[0], 1, 0x4840004 },
    { &xpvhv_list[0], 2, 0x2000000b },
    { &xpvav_list[2], 2, 0xa },
    { &xpv_list[1], 1, 0x4040004 },
    { &xpv_list[2], 1, 0x4040004 },
    { &xpv_list[3], 1, 0x4040004 },
    { &xpv_list[4], 1, 0x4040004 },
    { &xpv_list[5], 1, 0x4040004 },
    { &xpv_list[6], 1, 0x4040004 },
    };

    static XPV xpv_list[7] = {
    { 0, 12, 13 },
    { 0, 37, 38 },
    { 0, 26, 27 },
    { 0, 47, 48 },
    { 0, 36, 37 },
    { 0, 30, 31 },
    { 0, 1, 2 },
    };

    static XPVAV xpvav_list[3] = {
    { 0, -1, -1, 0, 0.0, 0, Nullhv, 0, 0, 0x1 },
    { 0, -1, -1, 0, 0.0, 0, Nullhv, 0, 0, 0x1 },
    { 0, -1, -1, 0, 0.0, 0, Nullhv, 0, 0, 0x1 },
    };

    static XPVHV xpvhv_list[1] = {
    { 0, 0, 31, 0, 0.0, 0, Nullhv, -1, 0, 0, 0 },
    };

    static int perl_init()
    {
    dTHR;
    dTARG;
    djSP;
    {
    SV **svp;
    AV *av = (AV*)&sv_list[1];
    av_extend(av, 1);
    svp = AvARRAY(av);
    *svp++ = (SV*)&PL_sv_undef;
    *svp++ = (SV*)&sv_list[2];
    AvFILLp(av) = 1;
    }
    op_list[0].op_ppaddr = pp_main;
    op_list[1].op_ppaddr = PL_ppaddr[OP_ENTER];
    xpv_list[0].xpv_pv = savepvn("Hello world\n", 12);
    listop_list[0].op_ppaddr = PL_ppaddr[OP_PRINT];
    op_list[2].op_ppaddr = PL_ppaddr[OP_EXIT];
    listop_list[1].op_ppaddr = PL_ppaddr[OP_LEAVE];
    xpv_list[1].xpv_pv = savepvn("/usr/local/lib/perl5/5.6.0/i686-linux", 37);
    xpv_list[2].xpv_pv = savepvn("/usr/local/lib/perl5/5.6.0", 26);
    xpv_list[3].xpv_pv = savepvn("/usr/local/lib/perl5/site_perl/5.6.0/i686 -linux", 47);
    xpv_list[4].xpv_pv = savepvn("/usr/local/lib/perl5/site_perl/5.6.0", 36);
    xpv_list[5].xpv_pv = savepvn("/usr/local/lib/perl5/site_perl", 30);
    xpv_list[6].xpv_pv = savepvn(".", 1);
    {
    SV **svp;
    AV *av = (AV*)&sv_list[5];
    av_extend(av, 5);
    svp = AvARRAY(av);
    *svp++ = (SV*)&sv_list[6];
    *svp++ = (SV*)&sv_list[7];
    *svp++ = (SV*)&sv_list[8];
    *svp++ = (SV*)&sv_list[9];
    *svp++ = (SV*)&sv_list[10];
    *svp++ = (SV*)&sv_list[11];
    AvFILLp(av) = 5;
    }
    PL_main_root = (OP*)&listop_list[1];
    PL_main_start = &op_list[0];
    PL_curpad = AvARRAY((AV*)&sv_list[1]);
    PL_initav = (AV *) Nullsv;
    GvHV(PL_incgv) = (HV*)&sv_list[4];
    GvAV(PL_incgv) = (AV*)&sv_list[5];
    av_store(CvPADLIST(PL_main_cv),0,SvREFCNT_inc((AV* )&sv_list[0]));
    av_store(CvPADLIST(PL_main_cv),1,SvREFCNT_inc((AV* )&sv_list[1]));
    PL_amagic_generation= 0;
    return 0;
    }
    #include "cc_runtime.h"

    static
    CCPP(pp_main)
    {
    I32 oldsave;
    SV **svp, *sv, *src, *dst, *left, *right;
    MAGIC *mg;
    djSP;
    lab_80f5670:
    PL_op = &op_list[1];
    DOOP(PL_ppaddr[OP_ENTER]);
    TAINT_NOT;
    sp = PL_stack_base + cxstack[cxstack_ix].blk_oldsp;
    lab_80f5848:
    PUSHMARK(sp);
    EXTEND(sp, 1);
    PUSHs((SV*)&sv_list[3]);
    PL_op = (OP*)&listop_list[0];
    DOOP(PL_ppaddr[OP_PRINT]);
    lab_82cddd8:
    TAINT_NOT;
    sp = PL_stack_base + cxstack[cxstack_ix].blk_oldsp;
    PL_op = &op_list[2];
    DOOP(PL_ppaddr[OP_EXIT]);
    DOOP(PL_ppaddr[OP_LEAVE]);
    FREETMPS;
    PUTBACK;
    return PL_op;
    }

    int
    main(int argc, char **argv, char **env)
    {
    int exitstatus;
    int i;
    char **fakeargv;

    PERL_SYS_INIT3(&argc,&argv,&env);

    if (!PL_do_undump) {
    my_perl = perl_alloc();
    if (!my_perl)
    exit(1);
    perl_construct( my_perl );
    PL_perl_destruct_level = 0;
    }

    #ifdef CSH
    if (!PL_cshlen)
    PL_cshlen = strlen(PL_cshname);
    #endif

    #ifdef ALLOW_PERL_OPTIONS
    #define EXTRA_OPTIONS 2
    #else
    #define EXTRA_OPTIONS 3
    #endif /* ALLOW_PERL_OPTIONS */
    New(666, fakeargv, argc + EXTRA_OPTIONS + 1, char *);
    fakeargv[0] = argv[0];
    fakeargv[1] = "-e";
    fakeargv[2] = "";
    #ifndef ALLOW_PERL_OPTIONS
    fakeargv[3] = "--";
    #endif /* ALLOW_PERL_OPTIONS */
    for (i = 1; i argc; i++)
    fakeargv[i + EXTRA_OPTIONS] = argv[i];
    fakeargv[argc + EXTRA_OPTIONS] = 0;

    exitstatus = perl_parse(my_perl, xs_init, argc + EXTRA_OPTIONS,
    fakeargv, NULL);
    if (exitstatus)
    exit( exitstatus );

    sv_setpv(GvSV(gv_fetchpv("0", TRUE, SVt_PV)), argv[0]);
    PL_main_cv = PL_compcv;
    PL_compcv = 0;

    exitstatus = perl_init();
    if (exitstatus)
    exit( exitstatus );
    dl_init(aTHX);

    exitstatus = perl_run( my_perl );

    perl_destruct( my_perl );
    perl_free( my_perl );

    PERL_SYS_TERM();

    exit( exitstatus );
    }

    /* yanked from perl.c */
    static void
    xs_init(pTHX)
    {
    char *file = __FILE__;
    dTARG;
    djSP;

    #ifdef USE_DYNAMIC_LOADING
    newXS("DynaLoader::boot_DynaLoader", boot_DynaLoader, file);
    #endif
    /* bootstrapping code*/
    SAVETMPS;
    targ=sv_newmortal();
    #ifdef DYNALOADER_BOOTSTRAP
    PUSHMARK(sp);
    XPUSHp("DynaLoader",strlen("DynaLoader"));
    PUTBACK;
    boot_DynaLoader(aTHX_ NULL);
    SPAGAIN;
    #endif
    FREETMPS;
    /* end bootstrapping code */
    }
    static void
    dl_init(pTHX)
    {
    char *file = __FILE__;
    dTARG;
    djSP;
    /* Dynamicboot strapping code*/
    SAVETMPS;
    targ=sv_newmortal();
    FREETMPS;
    /* end Dynamic bootstrapping code */
    }

  59. Obfuscated C code from Perl by yomahz · · Score: 2
    For the next Obuscated C code contest, I'm going to write the follwing perl script:

    #!/usr/bin/perl
    print "Hello World\n";

    and then

    perl -MO=CC,-O2,-oobfuscate.c obfuscate.pl

    and submit the obfuscate.c
    --

    A mind is a terrible thing to taste.

    --
    "A mind is a terrible thing to taste."
  60. Regular Expressions!!! by suwalski · · Score: 1

    Yey! =P

  61. Re:Come on Rob... by a.out · · Score: 3

    wow .. moderators really have a sence of humor.

    See Rob's Comments:

    HERE for the Third Annual Obfuscated Perl Contest.

  62. Talking about redundant... by Upsilon · · Score: 1

    Yeah, I know Perl code looks like crap. I'm not trying to deny it. However, this "joke" just isn't funny anymore. Seriously, I happened to be looking at an old /. post about the 4th annual contest, and this same stupid joke was made like 50 times. And here it is again! You'd better believe it won't be the last either. Come on! Can't you at least thing of an original way to make fun of perl?

    --
    I am not an idiot. Please use my name to email me.

    "That's right, I'm quoting myself."

    -Upsilon

    1. Re:Talking about redundant... by pma · · Score: 1

      Yeah, I understand what you're saying, but aside from that, don't you think "Obfuscated Perl" is a bit redundant?

  63. Day job... by oznet · · Score: 2

    Or mainframe programmer.

  64. Re:The classic obfuscated contest (hilarious) by nellardo · · Score: 5
    My favorite from the Obfuscated C Contest was the one that played Conway's life in the root window of your X display.

    What made it obfuscated?

    • It didn't use Xlib. It opened a socket and wrote the X protocol directly.
    • It was about 1024 characters long.
    • It ran like a bat out of hell - each pixel was a cell (so typical workstation monitor == one million cells), and it appeared to do about five or ten generations a second!
    I loved just leaving that puppy running.... It started out with a random sampling of cells, and watching gliders spring up and soar across the screen....

    ObPerl: And people have suggested using this language as a first programming language? Eep.

    --
    -----
    Klactovedestene!
  65. Truly Obfuscated Perl. by Pinball+Wizard · · Score: 2
    Since 99% of perl programmers can't stand Windows, something like the following should really look obfuscated(its ASP, with perl as the scripting language):

    #
    $Conn = $Server->CreateObject("ADODB.Connection");
    # Open a system DSN
    #
    $Conn->Open( "ADOSamples" );

    # Execute an SQL Query
    #
    $RS = $Conn->Execute( "SELECT * FROM Orders" );
    # Read a property to get the number of columns
    # present in the Recordset returned from the
    # query.
    #
    $count = $RS->Fields->{Count};
    # Print out the names of each column
    #
    for ( $i = 0; $i $Response->Write( $RS->Fields($i)->Name );
    $Response->Write("
    ");
    };

    # Loop the Recordset until there are no more records
    #
    while ( ! $RS->{EOF} ) {
    for ( $i = 0; $i $Response->Write(" ");
    $Response->Write($RS->Fields($i)->{Value});
    $Response->Write("
    ");
    };

    # Move to the next record
    #
    $RS->MoveNext();
    };
    # Close the Recordset
    #
    $RS->Close();
    $Conn->Close();
    %>

    Of course, a real entry would leave out the comments. Whaddya think? Would this qualify?

    --

    No, Thursday's out. How about never - is never good for you?

  66. Perl IS Obfuscated C by pb · · Score: 2

    If the Obfuscated C Contest didn't have such small size limitations on C files, I'd post the source code to Perl!

    ...however, I need to see what silly rules the Obfuscated Perl contest has. If it doesn't have that many, you can just *bet* that I'll write a source filter that decrypts to Perl, runs itself, and calls the C preprocessor! (and maybe I'll have it generate and compile some C code while I'm at it... hmm.)
    ---
    pb Reply or e-mail; don't vaguely moderate.

    --
    pb Reply or e-mail; don't vaguely moderate.
  67. Hey! My nominee is.. by technos · · Score: 3

    I hearby nominate Slashcode as the ultimate bit of obfuscated Perl code. Upon reading the relativly clean code, you think it's a mere weblog. But when you implement it, it turns out to be the world's most powerful distributed denial of service tool.

    I know Microsoft technicians who don't sleep well knowing their webserver could be taken down by a global community of GNU extremists at any time of day or night. I know Apache admins that cringe and start filling out requisition orders for RAID arrays and Xeon processors at the slightest suggestion that someone submitted their site to Slashdot. Myself, I planned ahead with a script that reroutes everything to localhost at the first sign that my poor overworked server is having a breakdown. The chance of it being to linked to by Slashdot is one in a million, but I'm not taking any chances at being on the recieving end..

    --
    .sig: Now legally binding!
  68. Re:Attack of the Killer Llamas... by cdipierr · · Score: 1

    Attack of the killer llamas? You don't mean LlamaTron do you?

  69. Translation. by copito · · Score: 2

    #!/usr/bin/perl
    while(){
    $hash{$_}++;
    }
    while(($line,$times_seen) = each %hash){
    print "$times_seen $line\n";
    }


    --

    --
    "L'IT c'est moi!"
    1. Re:Translation. by copito · · Score: 2

      sorry that should obviously be
      while(<>)

      --

      --
      "L'IT c'est moi!"
  70. *The *Escape pr0n windows game by wiZd0m · · Score: 1

    Yeah, I made a litle game, It's called "Try to escape the pr0n windows*, this is how it works:

    #!usr/local/bin/perl

    $pop_up -> new window();
    $pop_up ->Start_html,
    $pop_up ->close_window()
    {
    $pop_up->window('http://pr0n_url/'),
    until resboot();
    }

    ;-) wiZd0m

    Disclaimer: I am not a perl programmer, and I know the syntax is flawed.

  71. Re:The classic obfuscated contest (hilarious) by MagPulse · · Score: 1

    It's davidguy.c right? Did you do anything special to compile it in Linux? I keep getting a floating exception.

  72. Modification of read only value attempted by yomahz · · Score: 3
    Perl variables can't start w/ numbers

    $5 is invalid :)
    --

    A mind is a terrible thing to taste.

    --
    "A mind is a terrible thing to taste."
  73. unix comes with a perl obfuscator by scrytch · · Score: 5

    cat

    --
    I've finally had it: until slashdot gets article moderation, I am not coming back.
    1. Re:unix comes with a perl obfuscator by MicroBerto · · Score: 1

      I am a small-time perl programmer, but i just don't get this joke. What am i missing? :(

      Mike Roberto
      - GAIM: MicroBerto

      --
      Berto
    2. Re:unix comes with a perl obfuscator by FooBarson · · Score: 1

      Am I missing something or did a "mod this up" post just get brought to +4?

    3. Re:unix comes with a perl obfuscator by BilldaCat · · Score: 2

      this is one of the funniest things i've read on slashdot. if anyone has some mod points to spare, mod this guy up.

      --
      BilldaCat
    4. Re:unix comes with a perl obfuscator by Anonymous Coward · · Score: 2

      cat is the archetypeal Unix program, a text filter that does nothing (despite this, it's one of the more useful things on your system - an irony not lost on Unix types). Thus the joke is that perl comes already obfuscated. Someone actually made the same joke earlier in a different manner, but this one is cute too (and perl is obfuscated enough to deserve more than one joke at its expense, yet useful enough to weather them all, albeit not exactly gracefully ;).

  74. Re:Obfuscated Basic by Saint+Aardvark · · Score: 1

    LOL...

  75. Previous contents by Kiro · · Score: 1
    For those interested in coverage of previous contents and their winners:

    1st annual content
    2nd annual contest
    3rd annual contest
    4th annual contest

    Good luck to this year's contestants!

    --
    Kiro

  76. real code by TheDullBlade · · Score: 1

    This is what I cooked up to chop the '//' comment off of a line C++ code (taking into account the possibility of '/**/' comments and quoted strings).


    sub line_comment{
    #Now to handle comments [evil chuckle]...
    $_[0]=~/((?:[^'"\/]+|(?:\'(?:\\'|[^'])*\')|(?:\"(? :\\"|[^"])*\")|(?:\/[^\/]))+)(\/\/.+)?/o ;
    return ($1, $2);
    }


    Now, I probably should have used the "/x" modifier and formatted this with comments, but there's just something about regex matching that makes any effort toward improving readability seem wrong.

    I do this sort of thing all the time.

    ---
    Despite rumors to the contrary, I am not a turnip.

    --
    /.
    1. Re:real code by anagogue · · Score: 1

      hrm... regex's are SO not the most obfuscated thing in perl... they don't actually DO anything control-wise..

      eval { chomp; ($i ? eval { $i = 0; @thingies = split(/\t/) } : (push @snarf, "$_\n")) } for <SLURP>;

      is when it STARTS to get fun :)

  77. Re:The classic obfuscated contest (hilarious) by tzanger · · Score: 1

    My favorite is the tic tac toe game that is both the game and the code! (recompile to play next move...)

    Hmmm, I can't seem to compile it. Lots of errors about undeclared variables. :-(

  78. I'm going to win! by Anonymous Coward · · Score: 1

    I'm going to put my name all over Slashcode. It'll be a shoe-in!

  79. what's sad... by boinger · · Score: 1

    ..is, I think, I could submit some of my own old (newbie) code unaltered.

    --
    Send your friends messages of love at fuck-you.org
  80. In Python... by Zagadka · · Score: 1

    #!/usr/bin/python
    from sys import *
    m={}
    for line in stdin.readlines():
    m[line] = m.get(line,0)+1
    for line,count in m.items():
    stdout.write("%d %s" % (count, line))

  81. Re:$5 on funny by SteveTheBird · · Score: 1

    People like you exist. I fear for the human race.

  82. I'm a bit confused... by GeekLife.com · · Score: 2

    You got modded up because...you suggested that someone else get modded up?

    I guess I'll get modded down for suggesting that you get modded down.
    -----

  83. Re:My gripes with perl... by ackthpt · · Score: 1

    Um... I think I started to write an unobfuscated Hello World in Perl, in 1997, it's up to 2,500 lines, but sure looks orderly. I hope I can just get it running in time!

    Vote Naked 2000

    --

    A feeling of having made the same mistake before: Deja Foobar
  84. all my perl is obfuscated! by happystink · · Score: 2
    I could submit some really great examples of crazy spaghetti code that was incomprehensible and would not make sense to anyone, but I'd have to get permission from my employer first, since writing bad Perl is what I do for a living:)

    sig:

    --

    sig:
    See the "..for smart people" banners Wired runs here? Look elsewhere guys.

  85. I'll enter my Katzifyer! by cthulhubob · · Score: 2

    if ($_ =~ /tech|rights|Constitution/) {
    ReplaceRandomWords('corporation|abuse|geek|system| internet|new era|Hellmouth');
    }

    Think that would make it under the crappy web page category?

    --

    In post-9/11 America, the CIA interrogates YOU!
    1. Re:I'll enter my Katzifyer! by excesspwr · · Score: 1

      Now that's funny

  86. Rebuttal by deblau · · Score: 2
    In rebuttal to the Obfuscated Perl contest, I'd like to propose a counter-contest. I dare anyone to write an un-obfuscated program in Befunge.

    -- Dave

    --
    This post expresses my opinion, not that of my employer. And yes, IAAL.
  87. Spaghetti code is Tasty Code! by dudle · · Score: 1

    That's what my signature says for a while now:

    Spaghetti Code is Tasty Code!

    For more funny signature, you can check http://bugzilla.mozilla.org/data/comments (When it becomes available again.)

    dudle.

    --
    Looking for a great online backup: Green Backup
  88. Come on Rob... by a.out · · Score: 5


    Why don't you enter slash??
    I know deep down you've always wanted to. <grin>

  89. Re:i wonder... by photozz · · Score: 1

    They would have to get in line behind Congress, the white house, the CIA, the FBI..............

    --


    Dirty Pirate Hooker
  90. There's a contest!?! by aridhol · · Score: 2

    I've done some contracts maintaining Perl, and have seen some code that could win these hands down. Now I find out that they could have submitted it to the contest instead of the maintenance programmers, and actually won fame!!!

    --
    I can't say that I don't give a fuck. I've just run out of fuck to give.
  91. That reminds me... by Idaho · · Score: 5

    Of the Obfuscated C Code Contest.

    That contest could create some real good compiler tests.

    Like, how about a solution to Towers of Hanoi that let the compiler solve the problem by recursively including itself, eventually creating one huge 'printf()'-statement?
    And it used a compiler switch for the number of pegs. At the time I tested it, gcc broke (or my computer ran out of memory, I'm not really sure which of the two...) at 15 pegs.

    The solution to 14 pegs would create a over 1 MB executable containing just an MB of printf("really long string"); text.

    If I find a link to it somewhere I'll let you know. The International Obfuscated C Code Contest (IOCCC) has it's homepage at www.ioccc.org, but I can't seem to remember the name of the program.

    --
    Every expression is true, for a given value of 'true'
  92. Funny... by strathmeyer · · Score: 1

    When I look at the obfuscated Perl code, I get the same sort of feeling when I look at my own Perl code. You know, that, "Yes, this is definately Perl" feeling.

  93. My Second Favorite Obfuscated Perl Code by ekmo · · Score: 1

    http://thepope.org/~paco/

    This one is NOT redundant!

    --

    | Ceci n'est pas une pipe.
  94. Re:Like Suck.Com by 1alpha7 · · Score: 1

    This reminds me of Suck.com. An excellent way to define good is by its opposite. Yeah, and it's fun, too.
    Moded down to -1(offtopic).

    Moderator, you're perhaps an illiterate imbecile? That is a major point of the contest, to improve coding.

    --
    Live to be Moderated
  95. Attack of the Killer Llamas... by efuseekay · · Score: 2

    If somebody can rewrite that classic Spectrum ZX game Attack of the Killer Llamas in 2048 characters or less, that will win for sure :)

    --
    Mode (3) smart-aleck mode. Press * to return to main menu.
  96. Re:$5 on funny by swerdloff · · Score: 1

    Damn.

    I was wrong.

    Now I've gotta give all seven dollars to myself.

    Man.

  97. The classic obfuscated contest (hilarious) by smoondog · · Score: 5

    Check out the C obfuscated contest from the 90's. If you haven't seen any of the winning programs before, you will be amazed, shocked and left in wonder (Like I wonder what the day job of these developers is...)

    International Obfuscated C page and the amazing and confounding winners.

    My favorite is the tic tac toe game that is both the game and the code! (recompile to play next move...)


    -- Moondog

  98. Re:Obfuscated Basic by Tower · · Score: 2

    10 A$="Hello World."
    20 ? A$

    --

    --
    "It's tough to be bilingual when you get hit in the head."