A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Shortest Quine!

  1. #1
    Senior Member dudeqwerty's Avatar
    Join Date
    Mar 2005
    Location
    Bosnia
    Posts
    1,626

    Shortest Quine!

    The forum's name is "The Arena" so I don't see why we can't have any programming contests too..?

    The contest is simple, write the shortest quine. A quine is program which outputs its own source only.

    The wikipedia page has more info.

    The rules:

    • Your quine must not read its own source from file
    • Your quine must be Actionscript 2 compatible, but you can use as much nasty and deprecated code as you like!
    • Anyone can play
    • No copying quines from the internet, I'll know if you've done so!


    The winner will be the person who posts the shortest quine after a period of time yet to be decided.

    You get extra kudos for obfuscation and originality.

    Here's my serve, pretty simple to start. Let's get the ball rolling!


    Code:
    a=[41,115,40,101,99,97,114,116,59,41,93,122,91,97,40,114,104,99,61,43,115,41,97,32,110,105,32,122,40,114,111,102,59,34,59,93,34,61,43,115,59,41,34,34,58,34,44,34,63,50,57,45,122,40,43,93,122,91,97,61,43,115,41,59,51,57,60,122,43,43,59,49,45,61,122,40,114,111,102,59,34,91,61,97,34,61,43,115,59,34,34,61,115];s="";s+="a=[";for(z=-1;++z<93;)s+=a[z]+(z-92?",":"");s+="];";for(z in a)s+=chr(a[z]);trace(s)
    401 characters.
    New sig soon

  2. #2
    supervillain gerbick's Avatar
    Join Date
    Jul 2000
    Location
    undecided.
    Posts
    18,986
    Hmm... actually sounds cool despite being weird as hell. Heh.

    So it outputs exactly what is in the function?

    [ Hello ] | [ gerbick ] | [ Ω ]

  3. #3
    Senior Member dudeqwerty's Avatar
    Join Date
    Mar 2005
    Location
    Bosnia
    Posts
    1,626
    Yeah man, the code outputs itself. Lots of people go "oh that's easy" and try something like:
    trace("trace(.... then they realise the infinite loop.

    It's trickier than it sounds, but pretty fun from a geeky perspective. Give it a go!
    New sig soon

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center