Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
Perl Programming

5th Obfuscated Perl Contest Winners 110

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.
This discussion has been archived. No new comments can be posted.

5th Obfuscated Perl Contest Winners

Comments Filter:
  • ... because they can't take a joke.
  • er, module: HTML::Mason [masonhq.com]
  • by NecroPuppy ( 222648 ) on Thursday November 16, 2000 @10:33AM (#619308) Homepage
    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. :)
  • 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.

  • Please read the parent post. I was trying to translate this to human language. You're not really helping:-)
  • Add laser designation and smart-targeting software and you've got Obfuscated Slashcode.

    Kierthos
  • by Michael Woodhams ( 112247 ) on Thursday November 16, 2000 @11:01AM (#619312) Journal
    It has been done. You can now write perl in Latin [monash.edu.au].
  • 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.

  • Looking at the moderation totals, Insightful = 1, Funny = 4. Total = insightful? Someone should send a slash patch in...
  • 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
  • No need to learn PHP. Check out embedded perl:

    http://perl.apache.org/embperl [apache.org]

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

  • 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.
  • Equally, why not compete in writing clean, indented, well commented Perl? Oh wait.. that must be a logical contradiction. :-)

    --
  • 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.
  • 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};
    }

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

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

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

    And this we owe that to the great Damian Conway. [monash.edu.au] 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.

  • Obsfucated Visual Basic would be interesting ...

    For Each knob in house
    Dim lights
    Next
  • taken from one of my lectures i hold:

    The ftp site ftp://ftp.uu.net/pub/ioccc/ [uu.net] 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 [uu.net]

    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


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

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

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

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

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

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

    De-obfuscated INTERCAL

    Of course, this might take a while.

  • 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?
  • And how exactly do these turtles harness these machine guns to lay eggs?
  • 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.
    --
  • by delld ( 29350 ) on Thursday November 16, 2000 @11:06AM (#619342)
    are all here. [itknowledge.com]
  • 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.

  • 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
  • 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.
  • Unfortunately, I have to agree completely... it's +5 insightful now! Yeesh...
  • Someone should port DeCSS to this. :)
    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
  • by MrScience ( 126570 ) on Thursday November 16, 2000 @11:17AM (#619349) Homepage
    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 [www.cwi.nl], and he explains how he came up with it.

    Very interesting reading on maze theory.
  • by cpeterso ( 19082 ) on Thursday November 16, 2000 @11:54AM (#619350) Homepage
    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 [tuxedo.org].


  • 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 ;)

  • ... learn Common Lisp. Seriously. XML is really just S-expressions (in drag, with redundant, overblown syntax - see here [bell-labs.com]; (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 [xml.com] 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 [sdtimes.com] 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 [sourceforge.net] or CL-HTTP [mit.edu]) and a lot of other good stuff that I don't have time to list here.
  • English is Infinitely Obsfucatable.

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

    --
  • 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.
  • oh yeah, and lets not forget this entry:

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

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

  • by Chacham ( 981 ) on Thursday November 16, 2000 @02:07PM (#619356) Homepage Journal

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

  • by Silver A ( 13776 ) on Thursday November 16, 2000 @02:13PM (#619357)
    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.

  • not so on Apache.

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

    Mod_Python [modpython.org] which is closer to mod_perl in philosophy, I think.

    Mod_Snake [sourceforge.net] 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.)

  • Something funky is going on that web page. Ever hear of htmlspecialchars()? Oops, that's PHP. ;)
  • by traphicone ( 251726 ) on Thursday November 16, 2000 @10:21AM (#619360)
    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.
  • 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.
  • Eschew Obfuscation!

    Amorphis
  • Un-Obfuscating the Netscape Source Code.
  • 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.
  • 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).
  • Perhaps if I could
    Envision just what these
    Really did, I could
    Let my machine try and run them...

    ChAoS

  • by jo42 ( 227475 )
    Isn't PERL, by very definition and existence, obfuscated in the first place? Makes C/C++, heck even that Java butt rot, look good.
  • by hawkestein ( 41151 ) on Thursday November 16, 2000 @10:43AM (#619368)
    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).
  • 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

  • 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...
  • by Kickasso ( 210195 ) on Thursday November 16, 2000 @10:48AM (#619371)
    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.
    --
  • C doesn't care what you define, as long as what comes out of the pre-processor makes sense.
  • Hey, at least nobody's tried to do an obfuscated bf [queru.com] contest yet.
  • by AdamTrace ( 255409 ) on Thursday November 16, 2000 @11:23AM (#619374)
    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
  • 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 [unicode.org].

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

  • "Writing Cool C" on:
    http://www.cs.bgu.ac.il/~omri/Humor/verbose-c.ht ml
  • 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...
  • ...readable assembler.
  • 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...
  • 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 [ncsu.edu].
  • 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.
  • 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?"
  • You going to pay for the bill? Shouldn't have piped that to lpr, dammit.
  • Anyone who calls a perl module "Lingua::Romana::Perligata" is a legend in my book.

    check it out here [monash.edu.au]

    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.

  • by Kickasso ( 210195 ) on Thursday November 16, 2000 @10:26AM (#619386)
    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.
    --

  • 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.
  • 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?"
  • by joss ( 1346 ) on Thursday November 16, 2000 @10:28AM (#619389) Homepage
    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..

  • 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.
  • by Pulzar ( 81031 ) on Thursday November 16, 2000 @10:52AM (#619391)
    You can download all the entries from The Perl Journal Contest Page [itknowledge.com]. It's not as convenient as copy&paste, but it works.
  • 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..
  • 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...

  • 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!)
  • 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.

    --------
  • 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...
  • As opposed to what?
  • by evanbd ( 210358 ) on Thursday November 16, 2000 @06:08PM (#619404)
    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?)!

  • Turtles armed with machine guns would be pretty tough to hunt. No thanks!
  • by the red pen ( 3138 ) on Thursday November 16, 2000 @06:29PM (#619407)
    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.
  • idontthinkremovingwhitespaceisreallyachallengeimea n
    itmakesthispostalittlemoreconfusingthannormalmay be
    itwouldbeevenmoreconfusingifitookmyfingersoffoft he
    homekeyskiijdkujruyudfromthatyoushouldbeabletofi gure
    outwhatkindofkeyboardimtypingondamnlamenessfilte r
  • 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)
  • by Anonymous Coward on Thursday November 16, 2000 @10:31AM (#619412)
    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

  • 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

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

THEGODDESSOFTHENETHASTWISTINGFINGERSANDHERVOICEISLIKEAJAVELININTHENIGHTDUDE

Working...