Slashdot Mirror


5th Obfuscated Perl Contest Winners

strredwolf points out that we have winners of the Fifth Annual Obfuscated Perl Contest, noting, "Unfortunately, my virtual machine didn't win." (Insert loser-condolences here.) BTW, I noticed problems with the code as printed: the winner of category 2 lacks a terminal quote, and I couldn't get the category 3 winner to compile even after fiddling with whitespace. Put up a webpage with code I can copy-paste-and-run, email me, and I'll update this story with your link.

110 comments

  1. Don't say anything bad about Perl by drivers · · Score: 1

    ... because they can't take a joke.

  2. Just one word.. by import · · Score: 1

    er, module: HTML::Mason

  3. Re:Writing obfuscated Perl by NecroPuppy · · Score: 5

    is like hunting sea turtles. When they are laying eggs. On a beach. With a machine gun.

    Add an undermounted grenade launcher, and you've got the Obfuscated LISP contest. :)

    --
    I like you, Stuart. You're not like everyone else, here, at Slashdot.
  4. Not very artistic... unlike Obfuscated C entrants. by Speare · · Score: 5

    This is not a flamebait.

    Anyone can run Perl code through a perl-built obfuscator. Heck, one of the winning entries was an obfuscated perl-built obfuscator. How... imaginative.

    I have lost my hardcopy of the Obfuscated C contest entries, but it seemed like they had a lot more spirit, and thought about the artistic side, on more than one level.

    For example, one winner of Obfuscated C wrote a simple maze generator. However, the source code to the maze generator was itself a maze, with whitespace passages going up and across and down through the code. To top it off, those whitespace passages that cut through the code spelled out the word "MAZE", if you stood back far enough to see it. The main variables used were m, a, z and e, as well.

    The closest to 'artistic' Perl source that I have seen is the "RSA Dolphin," where the RSA algorithm is formatted to have the silhouette of a dolphin. That's still only one level of art.

    --
    [ .sig file not found ]
  5. Re:Could someone please, by JurriAlt137n · · Score: 1

    Please read the parent post. I was trying to translate this to human language. You're not really helping:-)

    --

    People replying to my sig annoy me. That's why I change it all the time.
  6. Re:Writing obfuscated Perl by Kierthos · · Score: 1

    Add laser designation and smart-targeting software and you've got Obfuscated Slashcode.

    Kierthos

    --
    Mr. Hu is not a ninja.
  7. Perligata (Re:too easy) by Michael+Woodhams · · Score: 4

    It has been done. You can now write perl in Latin.

    --
    Quattuor res in hoc mundo sanctae sunt: libri, liberi, libertas et liberalitas.
    1. Re:Perligata (Re:too easy) by King+Babar · · Score: 2
      It has been done. You can now write perl in Latin.

      And this we owe that to the great Damian Conway. This is the Perl God who teaches CS in Australia, and who defied the skeptics (uh, that would be me) by soliciting and getting enough donors next year to hack perl rather than slay undergraduates. (Whoops! I meant "teach undergraduates"; guess I'm just projecting or something...) The note I got from Professor Conway thanking me for my contribution to his rescue^H^H^H^H^H^Hresearch leave would have been suitable for framing, except that it was sent via email.

      --

      Babar

    2. Re:Perligata (Re:too easy) by /dev/kev · · Score: 2

      Someone should port DeCSS to this. :)

      --
      Quidquid latine dictum sit, altum viditur.
  8. Re:Not very artistic... by rgmoore · · Score: 1

    Each language naturally tends to produce obfuscated code in its own idiom. The obfuscated Perl in the contest has a variety of levels of obfuscation, and some of it is wonderfully logically obfuscated as well as simply hard to read. I'll admit that the obfuscated Perl folks do tend to produce extremely dense, hard to read material, but there's also a lot of genuine logical obfuscation in there, too.

    --

    There's no point in questioning authority if you aren't going to listen to the answers.

  9. Re:Unfair by Gen-GNU · · Score: 1

    Looking at the moderation totals, Insightful = 1, Funny = 4. Total = insightful? Someone should send a slash patch in...

  10. Re:Writing obfuscated Perl by Kierthos · · Score: 1

    How about you start in APL, segue over to ICON, a couple of lines in FP, and then over to LISP to finish it all up?

    And it must be understandable by a five-year old or a politician....

    That would be the ultimate coding contest...

    Kierthos

    --
    Mr. Hu is not a ninja.
  11. Re:Geez... a lot of bitter C people here by SCHecklerX · · Score: 1
    No need to learn PHP. Check out embedded perl:

    http://perl.apache.org/embperl

  12. Re:Could someone please, by import · · Score: 1

    In layman-ish terms: the frogger script as submitted was encrypted. When run it decrypts itself and runs the decrypted stuff. The decrypted stuff is much easiar to read. He even provided a formatted decrypted version. :)

    Also: to run it I think you need to import the tk module on the command line.

  13. Re:(at the risk of starting a flame war:-) Python by SquadBoy · · Score: 1

    I've read some about Python maybe when I have time to learn a language to have fun with that looks cool. No the primary reason I'm learning Perl is becuase I'm and admin with Linux, *BSD, Irix, and Sun boxen that I need to be able to write quick little scripts to do the admin stuff I have to do. (I'm a quite junior admin btw) Perl seems to be the way to do this because I can count on it being on all of the boxen. Kind of like the same theory behind learning Vi yup it may not be as good as Emacs IMHO. But it is always there.

    --

    Cypherpunks: Civil Liberty Through Complex Mathematics. Those who live by the sword die by the arrow.
  14. The real challenge: the obfuscated Python contest by TeknoHog · · Score: 1

    Equally, why not compete in writing clean, indented, well commented Perl? Oh wait.. that must be a logical contradiction. :-)

    --

    --
    Escher was the first MC and Giger invented the HR department.
  15. Re:Unfair by jayhawk88 · · Score: 1

    It must show the most recent moderation effect in the description? Not the first one like that I've seen; really not that big of deal in the long run. I just couldn't believe anyone would give that post an Insightful mod. Hopefully it was done as a joke, I'd hate to think anyone was that dense.

  16. That's really confusing. by BlowCat · · Score: 2
    Some people say that the ballot in Palm Beach county was confusing. I have to disagree. Imagine a ballot filled up with Perl code - that would be really confusing:

    #!/usr/bin/perl
    while (<BALLOT>) {
    $bush++ if /bush/;
    $gore++ if /gore/;
    $gore++ if $chad{$pregnant};
    $gore++ if $chad{$hanging};
    }

  17. Re:Eh? by killbill · · Score: 2
    I realize you are kidding... but I program in both Perl and C++ and both can get as bad as you want them to be.

    For example, a Perl regular expression for matching can be plenty painfull to read... but it replaces 3 pages of nested and snarled looping in C++. Hardly an easy read either, and lots more opportunity for defect. You can use the regular expressions in C++, but they might not work (at least not the ones I tried) and will be even uglier...

    Also, while Perl is weakly typed and does not declare types (or even necessarily variables), you still can know the difference when you need to. Consider the two examples below.

    # Perl Compare
    if ( $foo == $bar )

    # C++ Compare
    if ( foo == bar )


    What does the perl do? Compare the number in $foo to the number in $bar. If it were comparing strings, it would have used the "eq" operator instead of the "==" operator.

    In C++, who knows what is being compared unless you can track down the class declaration for foo and bar. Further, this class definition probably inherited from about 3 other levels of classes, each of which must be checked to see who (if anyone) overloaded the "==" operator. The base class probably used a template, which you have to find. Then, if you can even find the headers for all the clases and the template, you get to parse the actual overload for the "==" operator to see what on earth it is doing.

    Granted, the C++ example has considerably more complexity... but either language can be completely and equally illegible.

    The more I use C++, the more I like Java, but that's a different topic...

    Bill
    --
    Mathematically impossible requirements are technically not against policy.
  18. Re:Supreme Obfuscation Talent by BillYak · · Score: 1
    Moderators: Mod this up. This is a joke. Perl does _not_ have a compiler. Its standard w/ an interpreter.
    (This is a common error :)

    -Bill

  19. Re:Writing obfuscated Perl by Dannon · · Score: 2

    I'd suggest an Obsfucated English Contest, with extra points for correct grammar... but the more I read, the more I become quite certain that English is Infinitely Obsfucatable.
    ---

    --
    Good judgment comes from experience.
    Experience comes from bad judgment.
  20. Re:Found it! by ethereal · · Score: 1

    OK, I tried the C code which admittedly is remarkable, but it doesn't generate a very complicated maze. It looks like:

    Well, I'd show you what it looks like, but I hit the lameness filter. It has one path across the bottom of the maze, and a number of straight dead-end passageways going up to the top. Does this work for anyone else?

    --

    Your right to not believe: Americans United for Separation of Church and

  21. Obsfucated Visual Basic by sambo99 · · Score: 1

    Obsfucated Visual Basic would be interesting ...

    For Each knob in house
    Dim lights
    Next

    --
    - Sam
  22. the obfuscated contests... by ardiri · · Score: 1
    taken from one of my lectures i hold:

    The ftp site ftp://ftp.uu.net/pub/ioccc/ contains information regarding 'The International Obfuscated C Code Contest'. One of the best programs ever seen in these contests is one written by Brian Westley in 1988 which prints 3.141 (the mathematical constant pi) on the screen using the source code shown in ...

    ftp://ftp.uu.net/pub/ioccc/1988/westle y.c

    this is taken from my Java lecture notes (What is Java) - basically saying what the goodies they took out of C/C++ to create Java were :P

    oh boy, were my students pissed when i said i loved this stuff :P

    1. Re:the obfuscated contests... by ardiri · · Score: 1
      oh yeah, and lets not forget this entry:

      ftp://ftp.uu.net/pub/ioccc/1992/westley.c

      $ gcc -o world westley.c
      $ ./world -40 115

      and, you'll get a nice little map! *yay*.. my home town, Perth, Western Australia. pass the lat, long and wola.. it'll show you where it is.

  23. No kidding... by devphil · · Score: 2


    I still have a copy of the IOCCC entry which consisted of an ASCII-art circle drawn inside main().

    The program calculated an approximation of pi by figuring out the surface area of its own source code. The bigger the circle, the more accurate the approximation.

    I think even the Jargon File mentions that one as an example of true obfuscation. The Perl entries are just... sophmoric.

    --
    You cannot apply a technological solution to a sociological problem. (Edwards' Law)
  24. Re:Not challenging either by tumeric · · Score: 1

    Its easy to write documented perl (use comments).
    Its as easy to write un-obfuscated perl as it is not to shoot yourself with a gun.
    Its hard to write 25000 lines of code in perl because it gets the job done in a lot less (and someone probably wrote a freely available module for it anyway).

  25. Re:Could someone please, by tycage · · Score: 1
    Obfuscated Perl was on purpose.
    Really bad, completely unintelligable Perl was because they didn't read all the man pages before they started coding. :)

    --Ty

  26. Re:Worthless by gunner800 · · Score: 1
    ...the joke has already been done, and Perl is such a godawful atrocity of a language that it's practically impossible NOT to write obfuscated Perl.

    Would you feel better if we had a contest to see who could convert obfuscated Perl to truly elegant, readable, portable, maintainable Perl? We could use the winners of this contest as the fodder for the "Disobfuscated Perl Contest".

    Hmm. I intended this as a joke (a non-flame for your non-flamebait), but I kind of like the idea now.


    My mom is not a Karma whore!

  27. Re:Worthless by Keith+Russell · · Score: 2

    Hey, anyone can splatter paint on a canvas. Only Jackson Pollack could make it art.

    Besides, the joke now is to either come up with an off-the-wall program in the first place (I never would have thought of Frogger in readable Perl, let alone that mess), or pull in the strangest form of obfuscation (Mayan numerals!?)

    I still think the ultimate challenge would be obfuscated Python. Real artists would know what to do with significant whitespace! :-)

    We're not scare-mongering/This is really happening - Radiohead

    --
    This sig intentionally left blank.
  28. I don't know... by mortonda · · Score: 1

    whether I want to call that beatifull, or if I just want to throw up....

    I think I'm just thankfull that I don't know how to do that. :P

    1. Re:I don't know... by Chris+Hind · · Score: 1
      I think I'm just thankfull that I don't know how to do that.

      I dunno about this --- it seems to me that if you can do this, you know enough to know how not to do it as well. Kinda like, after watching "Quake Done Quick With A Vengeance", I knew that I didn't want to deathmatch the authors.

      --
      nal 11
  29. Re:too easy by tycage · · Score: 1
    I started doing this once, but then I got a life..

    Don't you mean, "Dude, I started doing this once, but then, um, like, I got a life, ok.."

    --Ty

  30. Getting any of them to compile.... by Alan · · Score: 2

    I can't get any of the results to compile :( Not sure if that's an error on my side or on the webmaster for not putting the code in right. Anyone got any of these to compile and run properly? Links?

    1. Re:Getting any of them to compile.... by Pulzar · · Score: 3

      You can download all the entries from The Perl Journal Contest Page. It's not as convenient as copy&paste, but it works.

      --
      Never underestimate the bandwidth of a 747 filled with CD-ROMs.
  31. Some unpublished code... by elseware · · Score: 1

    Although my entry won, they didn't actually publish the code. If you want to look into the evil I've put it online with an explanation of what the hell it actually does. See http://totl.net/PerlContest/

    I've always coded badly, but it's nice to be recognised for it.

  32. Proposal for a real challenge... by Paul+Neubauer · · Score: 1

    I suspect any language can be obfuscated, often by accident. Now how about this:

    De-obfuscated INTERCAL

    Of course, this might take a while.

    --
    I don't subscribe to RMS's GNUtopian vision.
  33. Re:Could someone please, by JurriAlt137n · · Score: 1

    Ok, so what it comes down to is that they didn't forget to dust off, they purposely emptied an ashtray on the floor? Something like that?

    --

    People replying to my sig annoy me. That's why I change it all the time.
  34. Re:Writing obfuscated Perl by jtdubs · · Score: 1

    And how exactly do these turtles harness these machine guns to lay eggs?

  35. Re:Writing obfuscated Perl by Kickasso · · Score: 1

    Don't you worry! They're only allowed to hunt people (at least 180 cm/5'10'', 75kg/165 lb, no pregnant or breast-feeding females) who make bad puns about other people's less-than-perfect English.
    --

  36. The entries by delld · · Score: 5

    are all here.

    1. Re:The entries by pb · · Score: 1

      Oh wow, they have my entry! (it's in entries/baylie.pl; no, that's not perl, it's uuencoded. :)

      Ok, it was pretty pitiful, and for some reason didn't make it into a category, but I was proud. I don't remember why I didn't write something longer, though. I guess I thought there was a 256 byte limit, and it was actually 512 bytes?
      ---
      pb Reply or e-mail; don't vaguely moderate.

      --
      pb Reply or e-mail; don't vaguely moderate.
  37. lack of return spaces by avandesande · · Score: 2

    They should demand that each semi-colon has a return character- it obfuscates obfuscation! Any code can be made 'unreadable' in this manner.REAL code obfuscation is a fine art, and I should be able to appreciate it on it's own terms.

    --
    love is just extroverted narcissism
  38. Self-imposed /. effect? by jfpoole · · Score: 2

    Put up a webpage with code I can copy-paste-and-run, email me, and I'll update this story with your link.

    Thanks, but no thanks. I may as well just unplug my webserver -- the end result is roughly the same as posting a link to it on the front page of /.

    -j

  39. Re:Unfair by jayhawk88 · · Score: 1

    Nice post, but how in the world does this garner a +1 Insightful? I'm starting to believe the "Moderators are Smoking Crack" dogma more and more every day.

  40. Re:Unfair by Abcd1234 · · Score: 2

    Unfortunately, I have to agree completely... it's +5 insightful now! Yeesh...

  41. This reminds me of the old adage... by Frymaster · · Score: 2
    1. Never do what you can do with cat which you can do with troff
    2. never do with troff what you can do with C, unfurling everything and using using all those gnu enhancements
    3. never do with C what you coulda done in eiffle.
    4. Jesus, if you can get the turing machine emulator you wrote in first year to do it, what are you pissing around with eiffle for?
    5. turing is fake hardware, never do with turing what you could do with a soldering gun and six buck worth of radio shack discount bin parts
    6. avoid using cat whenever possible
  42. Found it! by MrScience · · Score: 3

    Well, I tried to paste it, but couldn't get it to work out in fixed-width font. The link to the author is here, and he explains how he came up with it.

    Very interesting reading on maze theory.

    --

    You quitting proves that the karma kap worked. The most annoying of the whores shut up. --CmdrTaco

  43. Obfuscated One Instruction Set Computing code? by cpeterso · · Score: 3

    What about obfuscated OISC?

    You've heard of RISC, Reduced Instruction Set Computers? Well, here is the concept taken to its logical extreme -- an emulator for a computer with just one (1) instruction (Subtract and Branch if Negative)! Sample programs in the OISC machine language are included.

    ESR has an OSIC emulator.


  44. Here is my qualm with most obfuscated contests by segmond · · Score: 2

    obfuscation by eliminiating white spaces is not obfuscation, i will like the competitions to allow all entries to support white spaces, but the white spaces will not be counted, thus for a 512 byte compo, your actually code might be 800 bytes formatted like a real code, but when all the white spaces are removed, it willhave to be equal or less than 512 to qualify. That is when I truely adore obfuscated code, basically, code that looks like code, yet for the love of your life, you can't figure it out. just my opinion. :> btw, i can't wait for someone to take some perl code, encoded it in perl bytecode, and some how have perl jump to that code ;)

    --
    ------ Curiosity killed the cat. {satisfaction brought it back | it didn't die ignorant | lack of it is killing mankind
  45. If you're going to hack XML... by alispguru · · Score: 2

    ... learn Common Lisp. Seriously. XML is really just S-expressions (in drag, with redundant, overblown syntax - see here; (sorry about the pdf)), so why not use a language designed for munging them?

    Perl and XML don't really get along well, primarily because Perl and arbitrarily nested data structures don't really get along well (see here if you want a less biased, but still discouraging opinion).

    Strangely enough, Java and XML aren't getting along as well as one would think, if this article on the JDOM project is any indication. Java also has the shifting sands problem - vendor-controlled standards are evil, no matter who the vendor is.

    Common Lisp has an ANSI standard that hasn't changed since 1995, open-source multi-threaded web servers that you can add native code to on the fly (see AllegroServe or CL-HTTP) and a lot of other good stuff that I don't have time to list here.

    --

    To a Lisp hacker, XML is S-expressions in drag.
  46. Re:Writing obfuscated Perl by Wah · · Score: 1

    English is Infinitely Obsfucatable.

    which when interpreted under the correct socio-economic condtions spells...Ebonics!

    --

    --
    +&x
  47. Re:Am I missing something? by ThreeTee · · Score: 1

    The first one requires Perl/Tk. Install it (get it from http://www.perl.com/CPAN-local/modules/by-authors/ Nick_Ing-Simmons/) and try the script again.

    --
    --= ThreeTee =--
  48. Terminal quote in second sample. by Chacham · · Score: 3

    Just add a quote at the end yourself. Then it compiles without error

  49. Re:Could someone please, by Silver+A · · Score: 3
    This program was encrypted by using the bit string operators to XOR the program itself with a string of 0x01 characters. The program starts of by evaluating the encoded program against a string of 0x01 characters to restore itself, and then evaluates the resulting string to start the program. The program itself looks like this once unencoded:

    I'm not a programmer, but that seems to be cheating. Too many of the entries rely on self-extracting or self-decrypting code. Perhaps the contest judges should have separate categories for obfuscated programs which aren't self-modifying, or at least aren't compressed or encrypted.

  50. Re:(at the risk of starting a flame war:-) Python by h2odragon · · Score: 1
    not so on Apache.

    PyApache is what I use, no troubles with Apache 1.3.14 and Python 1.6; hackable.

    Mod_Python which is closer to mod_perl in philosophy, I think.

    Mod_Snake which is kinda like the same thing only different.

    The latter two projects don't offer me enough enhancements to make me switch from PyApache yet; so I haven't as much experiance with them. PyApache has the feel of a defunct project, I haven't heard of any efforts to make it work with (Apache|Python) 2.0+

    Just to keep this from being completely offtopic, Obfuscated Python is possible. AMK's ARC4 in python is a good example. If you're feeling particularly evil you can do really nasty things by mixing tabs and spaces and taking advantage of the fact that indentation need not be constant throught a file (this block @ 3, next @ 5, one after that at 4, etc.)

  51. Obfuscated web page. by BubbaFett · · Score: 1

    Something funky is going on that web page. Ever hear of htmlspecialchars()? Oops, that's PHP. ;)

  52. Supreme Obfuscation Talent by traphicone · · Score: 4

    Yes, I have to say I was very impressed with these scripts. It's a display of impressive talent when your code is so obfuscated that even the compiler can't figure it out.

  53. Re:Writing obfuscated Perl by AJWM · · Score: 2

    Dang, you (sort of) beat me to it.

    I was going to say that an obfuscated Perl contest made about as much sense as an obfuscated APL contest. I mean, how could you tell?

    (BTW, I did APL tech support for a couple of years. It is possible to write unobfuscated APL, but actually seeing an unobfuscated APL program "in the wild" is about as likely as seeing an unobfuscated Perl script.)

    APL is a terminal disease
    -- joke dating back to when APL was run on mainframes from terminals with wierd character sets.

    --
    -- Alastair
  54. EO by [amorphis] · · Score: 1

    Eschew Obfuscation!

    Amorphis

  55. Next Contest... by kupolu · · Score: 1

    Un-Obfuscating the Netscape Source Code.

    --
    -- We should kill all the intolerant people in the world.
  56. I just started learning Perl... by SquadBoy · · Score: 2

    and now I'm going to go into the corner and cry or maybe laugh I just don't know. In truth this is pretty cool because while you can write really good code with Perl you can also produce well this stuff. Now I'm just looking forward to the day when I can read these programs. BTW ,and yes this is on topic if you think about it, how many others would like to see a O'Reilly slashbox. I know I would.

    --

    Cypherpunks: Civil Liberty Through Complex Mathematics. Those who live by the sword die by the arrow.
  57. Re:Writing obfuscated Perl by DdJ · · Score: 1

    Better yet, rather than having an obfuscated Pascal contest, why not have an APL clarity contest. Give prizes to the folks best able to make a clear, maintainable, understandable program in APL. Modern APL varients that use a readable character set will not be permitted (it's not APL if you don't have the domino and triangle in your character set).

  58. Perl by True+ChAoS · · Score: 2
    Perhaps if I could
    Envision just what these
    Really did, I could
    Let my machine try and run them...

    ChAoS

    --
    WARNING: May contain traces of nut
  59. Eh? by jo42 · · Score: 1

    Isn't PERL, by very definition and existence, obfuscated in the first place? Makes C/C++, heck even that Java butt rot, look good.

    1. Re:Eh? by The+OPTiCIAN · · Score: 1

      Moderators shmoderators! Don't mod these up! We've had threads discussing karma whore threads at least the last two times obfuscated perl has come up. Idiots using their brilliance to point out the ridiculous "um like man: perl -> already obfuscated - arn't I insightful". Don't mod up stuff that wastes my time.

      --


      Believe with me, my saplings.
  60. Re:Not very artistic... unlike Obfuscated C entran by hawkestein · · Score: 4

    The coolest obfuscated C program I ever saw was a tic tac toe program. Basically, each time you ran it, it outputted source code in the form of a tic tac toe board. To get it to play the next move, you compiled the current board and ran it again.

    (At least, this is how I remember it. Somebody correct me if I'm wrong).

    --
    -- Will quantum computers run imaginary-time operating systems?
  61. Re:Not very artistic... unlike Obfuscated C entran by Pulzar · · Score: 1

    A good one, from one of the previous contests, was a piece of code that reads like a poem, and prints the same poem when executed..

    And, no, it wasn't this:

    print <<EOF

    My Obfuscated Poem

    ...
    EOF

    --
    Never underestimate the bandwidth of a 747 filled with CD-ROMs.
  62. Re:Writing obfuscated Perl by JurriAlt137n · · Score: 1

    What I want to see is obfuscated Pascal, or better Modula 2, contest. This would be sport, gentlemen. Obfuscated Perl isn't, I'm sorry.

    Considering the article we recently had about the Basic language for the PS2, how about an obfuscated Basic contest? That way some of the oldtimers can join as well...

    --

    People replying to my sig annoy me. That's why I change it all the time.
  63. Re:Writing obfuscated Perl by Kickasso · · Score: 3
    Sorry, lost my indentation. It shoild be:
    • hunting turtles
      • laying eggs
    • on beach
    • with machine gun
    and not
    • hunting turtles
      • laying eggs
      • on beach
      • with machine gun
    Sorry.
    --
  64. Re:too easy by swingkid · · Score: 1

    C doesn't care what you define, as long as what comes out of the pre-processor makes sense.

  65. Re:Writing obfuscated Perl by Bastian · · Score: 1

    Hey, at least nobody's tried to do an obfuscated bf contest yet.

  66. I took third place in this contest...! :) by AdamTrace · · Score: 3

    Yep, I took third place in the first section of the contest, which was to write a game in Perl in 512 bytes or less. I love game programming, and I love Perl, and the contest was really a lot of fun. I'm proud of what I did. To all those who are clever and say that Perl is obfuscated in and of itself, I disagree. I think writing obfuscated Perl *WELL* requires vast knowledge of the language, including obscure little tricks, weird regexps, etc, and HOW to use them effectively. Not me, though... I just wrote a game and made sure it was 512 bytes (which isn't as easy as it sounds to maximize the "game" part and minimize the bytes). Adam

  67. Re:Writing obfuscated Perl by Apotsy · · Score: 1
    it's not APL if you don't have the domino and triangle in your character set

    Fortunately, the APL symbols are included in Unicode! Starting with the I-beam at hex 0x2336. The code charts are here.

  68. Re:too easy by elkootje · · Score: 1

    "Writing Cool C" on:
    http://www.cs.bgu.ac.il/~omri/Humor/verbose-c.ht ml

  69. Re:Worthless by Garpenlov · · Score: 1

    that what made the Obfuscated C contest funny was its novelty

    And what's so original about just cramming your code into unrecognizable encrypted garbage? Where's the style? Whatever happened to a program whose source code formed an ASCII graphic of what it would do, or something...

    --
    --- Where's my X.400 protocol decoder?
  70. Re:Obfuscated Perl? by shayne321 · · Score: 1

    ...readable assembler.

    --
    Today I didn't even have to use my AK; I got to say it was a good day -- Icecube
  71. Re:Writing obfuscated Perl by Tomin8tor · · Score: 2

    On the surface of mars while little elfin-faced faeries dance around like they're on a mixture of speed and shrooms.... then you have the description of Obfuscated Prolog...

    --
    Pleasure in the job puts perfection in the work.
    There was never a genius without a tincture of madness.
    Aris
  72. Re:Writing obfuscated Perl by Lilior · · Score: 1

    why are people bashing lisp so hard? lisp only has parentheses. lots of parentheses. but that should help clarity -- there can be no confusion about what order things are done in.

    --
    --Lilior
  73. Re:too easy by mosch · · Score: 2

    nope, you can't do that. you could do stuff like

    #define bar {
    #define baz }

    but it's not possible to use special characters or reserved words in the define. defines are "cute" but they're not really obfuscated anyway, since you can just grab the output of the preprocessor and see the unmunged source.

    --
    "Don't trolls get tired?"

  74. Re:One liners... by jdennett · · Score: 1

    You going to pay for the bill? Shouldn't have piped that to lpr, dammit.

  75. Truly Obfuscated Perl - in Latin by Vryl · · Score: 2
    Anyone who calls a perl module "Lingua::Romana::Perligata" is a legend in my book.

    check it out here

    Abstract

    This paper describes a Perl module -- Lingua::Romana::Perligata -- that makes it possible to write Perl programs in Latin. A plausible rationale for wanting to do such a thing is provided, along with a comprehensive overview of the syntax and semantics of Latinized Perl. The paper also explains the special source filtering and parsing techniques required to efficiently interpret a programming language in which the syntax is (largely) non-positional.

  76. Writing obfuscated Perl by Kickasso · · Score: 3
    is like hunting sea turtles. When they are laying eggs. On a beach. With a machine gun.

    What I want to see is obfuscated Pascal, or better Modula 2, contest. This would be sport, gentlemen. Obfuscated Perl isn't, I'm sorry.
    --

    1. Re:Writing obfuscated Perl by nehril · · Score: 2

      Turtles armed with machine guns would be pretty tough to hunt. No thanks!

  77. Re:too easy by Scott+Wood · · Score: 1

    I'm not sure if it's allowed by ANSI C or not, but with gcc (and probably any compiler that does not have an integrated preprocessor) you can #define reserved words. Go ahead and try it.

  78. sort of... by mosch · · Score: 2

    okay, you can
    #define long {

    and then when you declare a long, you're fscked. you can't
    #define long {
    #define baz long

    and then use 'baz bar' to set bar to be a long.

    you also can't
    #define { } (just won't work, illegal macro name)

    any obfuscation done this way, is really just "cute" obfuscation anyway. I mean, you have to provide an easily readable translation key.

    --
    "Don't trolls get tired?"

  79. too easy by joss · · Score: 3

    You don't need to be a genius to write utterly incomprehensible perl code.... Bah, this comment is too obvious. Look, I'll start again.

    I would like to see a contest for programs that are readable and work even though they shouldn't, like if you create a c program which includes a bunch of macros

    #define like {
    #define ok }
    #define um ;
    #define int dude
    etc

    then you can write fairly serious programs in valley speak. I started doing this once, but then I got a life..

    --
    http://rareformnewmedia.com/
  80. Could someone please, by JurriAlt137n · · Score: 1

    explain to me, being a complete Perl no-know, what the hell this is about? Can someone explain the difference between Obfuscated Perl and really bad, completely unintelligable Perl? Somehow my senses of both logic and humour are returning syntax errors.

    --

    People replying to my sig annoy me. That's why I change it all the time.
    1. Re:Could someone please, by import · · Score: 1

      Not really. If you download the entries and look at some of the solutions you'll see that they are indeed *designed* to be obfuscated.

      From the frogger entry's SOLUTION:

      This program was encrypted by using the bit string operators to XOR the program itself with a string of 0x01 characters. The program starts of by evaluating the encoded program against a string of 0x01 characters to restore itself, and then evaluates the resulting string to start the program. The program itself looks like this once unencoded:
      and so on..
    2. Re:Could someone please, by fatphil · · Score: 2

      Alas these weren't all the best examples.
      As just another perl hacker I found the best of show truly pathetic. The rest were fairly readable as soon as you'd put a few newlines in.
      The quality is lower than the IOCCC, certainly, but I think that is because Perl is inherantly noisier (as in SNR) if you use all the inbuilt features, so people go to less effort to make it ugly, it's most of the way there already.

      Truly obfuscated Perl uses an unfathomable algorithm as well as undecipherable presentation.

      FatPhil
      (Repeated IOCCC loser!)

      --
      Also FatPhil on SoylentNews, id 863
  81. Re:here's a new goal for all the spammers... by tewwetruggur · · Score: 1
    ok, fine then... how about mean post and/or median post... play the game of projecting just how many posts you think there will be.

    Something to challenge you more than the current level, anyway.

    --
    Hi! This is the Sig, blatantly attached to the end of this comment.
  82. Geez... a lot of bitter C people here by thex23 · · Score: 2

    I like Perl. Quick, dirty, and flexible. I'm sure the "C is best for everything, blah blah blah" crowd will scoff, but for protoyping Web apps, and manipulating text files(which is my main thang) it rocks the house.

    I think Flash, Perl, and XML are my favourite ingredients. Once I get it worked out, sure, I'll call up my C-loving friends to bum the code down to a fast binary, but I aint got the time or patience to screw around.

    Are there any Perl people out there who can tell me a good reason to learn PHP too? Or should I go the other direction and pick up some Java (considering I want to focus on XML and Web development)?

    Don't take it as a dis, folx. I love you weird C people, and all your stories about that time you wrote a routine in a assembler...

  83. Obfuscated Perl? No sweat... by Millennium · · Score: 1

    Come on, people We all know real coders obfuscate Python.

    Either that or they deobfuscate J.
    ----------

  84. adduser whatthehell by TheDullBlade · · Score: 2

    Just do what I do, create an extra user that has no access to anything important. IMHO, it's good policy to seperate your activities as different users. For example: edit (runs nothing but vi or emacs, has sole write access to your personal source code), compile (has read access to your edit area), archive (which backs up your code, so you can't even accidentally delete your own stuff), test (has read access to compile results, write access only to its own personal scratch area), toys (for internet access and games; has neither read nor write access to anything important), and root (as the default user, with "root" as the password, for letting other people telnet in and run whatever they want). The key to security is in sensible division of roles among special-purpose pseudousers.

    Better yet, pick up an old 486 for fun stuff like screwing around with experimental file systems.

    --------

    --
    /.
  85. Re:And by 1+h4t3+y0u+pr1cks · · Score: 1

    Let me guess, you masturbate into your coffee every morning and call that your 'creamer'. Am I right?

    Anyone as simple minded as you has got to have some major fucked up solutions to something as simple as that. Don't fucking answer, I don't want to know.


    You think your big time?

    --


    You think your big time?
    I'll kick your ass so hard you'll be unbuttoning your neck button to piss!
  86. Perl? Syntax? by NoOneSpecial · · Score: 2

    I know perl. I love perl. I pride myself in writing self-commenting code that makes sense when I pick up a project I have abandonded for two years.

    Obfuscated code proves to me that I KNOW NOTHING. The Frogger entry parses. And does nothing. It seems to be filled with ANSI codes. But it still does nothing for me, and I can't figure out why (it would do anythin). The inner-beauty entry fails to parse (for me). The final, Best Of Show Entry, is actually interesting, makes some sort of sense, and does what it is supposed to. It gains it's obfuscated title because of it's approach, not it's writing or syntax.

    I thought I had a firm grasp on perl syntax. I thought I could debug any program less than 4k in 30 seconds. Umm...this contest always proves me wrong.

    If nothing else, this proves that you can write an open-source perl trojan horse that even I might run to see what it does...

    --
    -Ignore this post, please- NoOneSpecial
  87. Re:Unfair by Phaser777 · · Score: 1

    Am I the only one who's getting a bit tired of the confused-voters joke? It was funny the first few times, but its been done too many times IMHO.

  88. Obfuscated Perl? by dcs · · Score: 2

    As opposed to what?

    --
    (8-DCS)
  89. Re:Not very artistic... unlike Obfuscated C entran by elkootje · · Score: 1

    Obfuscated C is art in it's own way, but http://www.tpj.com also has other contests,
    consider this one:
    http://www.itknowledge.com/tpj/perl-poetry00-res ults.html

    [ what *I* liked most: ]

    >...
    This short entry, by Angie Winterbottom, was the most interesting. Her style was fresh and unique, and her use of visual representations in the text are clever. Consider the following excerpt:

    ($blaze_of_night{moon} == black_hole)

    "The moon, a black hole in the blaze of night." Marvelous! Angie tells us that this entry is from Jim Steinman's song The Invocation, on the Pandora's Box album Original Sin. Here is her entry:

    if ((light eq dark) && (dark eq light)
    && ($blaze_of_night{moon} == black_hole)
    && ($ravens_wing{bright} == $tin{bright})){
    my $love = $you = $sin{darkness} + 1;
    };

    Here are the original lyrics:

    If light were dark and dark were light
    The moon a black hole in the blaze of night
    A raven's wing as bright as tin
    Then you, my love, would be darker than sin.
    >...

    now, _that's_ artistic !

  90. Re:Not very artistic... unlike Obfuscated C entran by evanbd · · Score: 3
    This and other cool obfuscated c programs can be found at www.ioccc.org, the page of the International Obfuscated C Code Contest. I believe both the programs described in this and replies are there. Very cool stuff, including:

    The tic tac toe program where the source is the board (recompile for next move)
    The program that flips a square text file about the main diagonal, and when fed its own source produces a different c program that does the smae via a different method
    A LISP compiler (in under 1KB)
    The adventure game where your commands are compiler options and the response is the errors
    and my favorite, the first ever winner:

    it's a one-line program that confuses the Slash code :(. It's the first one, by an anonymous author.

    so for those interested, its worth a read. I think Slashdot covers it every year, but I don't really feel like digging up links. happy reading (err... confusion?)!

  91. Re:here's a new goal for all the spammers... by tewwetruggur · · Score: 1
    Ok... offtopic I can see...

    The fact that someone thought it to be interesting, I find quite intruiging! (thanks!)

    But flamebait???? I was issuing a challenge, not provoking a flame war! Forgive me if "last post" has already been done, I was not aware... it probably is a simple case of me just not paying attention in the past. But flamebait? No, no, no... this is simply offtopic, but evidently offtopic in an interesting manner.

    Please, if you choose to moderate, keep things in context - again, the big picture...

    Anyway... to further amend my challenge... how about trying to post at as many of the prime numbers as possible? Now, that should be a challenge to at least someone out there...

    --
    Hi! This is the Sig, blatantly attached to the end of this comment.
  92. Not challenging either by the+red+pen · · Score: 5

    When I heard about this, I was pretty surprised. I thought "obfuscated Perl" was redundant. If they want a challenge, how about a "Documented Perl" contest?

    In this, the entrants must write a non-trivial application, entirely in Perl, that has to be completely portable across at least 3 implementations (including one on Windows) and at least 25,000 lines of code (not counting comments).

    Judges will introduce a bug into each program that would be obvious if you knew what the program did. Each bug *must* involve a cascade from an ambiguous or subtle misuse one of Perl's much-heralded "Do what I mean" functions.

    A panel of experienced Perl programmers will be given the programs to debug. The program that takes the least average time to debug wins.

    That's a contest.

  93. obfuscatedpost by ElusiveSpoon · · Score: 2

    idontthinkremovingwhitespaceisreallyachallengeimea n
    itmakesthispostalittlemoreconfusingthannormalmay be
    itwouldbeevenmoreconfusingifitookmyfingersoffoft he
    homekeyskiijdkujruyudfromthatyoushouldbeabletofi gure
    outwhatkindofkeyboardimtypingondamnlamenessfilte r

  94. IOCCC by jubandhu · · Score: 2

    Too bad the IOCCC is not going so well. They've been sitting on the entries since April. (I'm not blaming them since I understand that they have their own life outside of the IOCCC.) But it's sad to see it in limbo. Recently, there was a message on that site from one of the judges saying that most of the other judges were no longer interested in judging the contest. (that message has since been removed)

  95. Uhhh... what? by DestructioN · · Score: 1

    Don't try to read the code. Really. Need aspirin.
    ---
    www.stallman.org is running Apache/1.3.6 (Unix) on FreeBSD

  96. Am I missing something? by cnkeller · · Score: 1

    The first one ran with zero results. No syntax errors or output of any kind. I guess that's why it won, it was a truely obfuscated way to waste my time....

    --

    there are no stupid questions, but there are a lot of inquisitive idiots

  97. Unfair by Anonymous Coward · · Score: 5
    I was confused by the rules. I submitted C++ when I meant to submit Perl. Obviously, judging by the number of C++ entries received in this contest, versus the number of C++ entries received in other contests, thousands of people meant to submit Perl but submitted C++ instead. We need a re-contest.

    AG

  98. Re:Worthless by tycage · · Score: 2
    Perl is such a godawful atrocity of a language that it's practically impossible NOT to write obfuscated Perl.

    I would argue that any program written in a language you don't understand or with techniques you don't understand is Obfuscated to some degree.
    I've seen beautiful, easy to read and understand Perl code, and I've seen Perl code that should cause the machine it was written on to burst into flame. Hell, I've written both of the above.
    It all really depends on the effort you put into it, just like in any language.
    I've written Perl and C that didn't make sense to me the next day, and I've written both that were obvious to everyone that's ever seen them.
    It's the coders use of the language that makes the critial difference I think.

    --Ty

  99. Obfuscated perl is heartless by delmoi · · Score: 2

    Perl isn't really designed to stop this sort of abuse/artform/whatever. So Obfuscated perl contests don't really hold that much interest to me. While I'm sure writing this stuff isn't easy, it dosn't really seam super dificult within the confines of the language.

    Obfuscated C however, is a bit more difficult, and the results are therefore more appealing to me.

    C of course, is prone to abuses to (#define...), what I'd really, really like to see is an obfuscated java contest. Its harder to mess with java then it is with those other languages, I wonder what ingenious hackers would be able to think up there...

    --

    ReadThe ReflectionEngine, a cyberpunk style n
  100. Pardon my stupidity... by connah · · Score: 1

    but why is it that none of those perl scripts will work for me? I copied and pasted them off the page and into a file...then ran it. Every single one results in an error...

    Connah

    --

    Connah
    "Your mouse has moved. Windows NT must be restarted for this change to take effect."