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!

51 of 158 comments (clear)

  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. Four words: by Anonymous Coward · · Score: 4
  3. 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
  4. 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.
  5. 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.

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

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

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

    2. 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.
    3. 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. =)

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

  9. 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
  10. 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
  11. 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
  12. 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 rmull · · Score: 2

      nor does this one, for that matter. :)

      --
      See you, space cowboy...
  13. 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 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.
  14. 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.

  15. Re:Downside by technos · · Score: 2

    I think of it as open-source copy protection.

    --
    .sig: Now legally binding!
  16. 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.

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

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

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

  20. 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
  21. 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 */
    }

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

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

    Or mainframe programmer.

  25. 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!
  26. 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?

  27. 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.
  28. 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!
  29. 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!"
  30. 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."
  31. 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 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
    2. 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 ;).

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

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

  34. 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!
  35. 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.
  36. Come on Rob... by a.out · · Score: 5


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

  37. 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.
  38. 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'
  39. 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.
  40. 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

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