Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

SelfGOL - I bet it is very obfuscated.

by ghenry (Vicar)
on Jul 18, 2005 at 11:15 UTC ( #475708=perlmeditation: print w/ replies, xml ) Need Help??

SelfGOL looks very interesting:

The SelfGOL program can:

  • self-replicate by printing its own source code,
  • rewrite other Perl programs to allow them to self-replicate their own source code too,
  • detect and report the small number of Perl programs that are not rewritable in this way,
  • transform itself or other Perl programs into cellular automata of arbitrary size and play Conway's "Game of Life",
  • animate any short text as a cycling marquee banner.
SelfGOL accomplishes these feats in under 1000 bytes of standard Perl, without importing any modules, and without using a single if, unless, while, until, for, foreach, goto, next, last, redo, map, or grep.

Has any one been on this course?

Walking the road to enlightenment... I found a penguin and a camel on the way.....
Fancy a Just ask!!!

Comment on SelfGOL - I bet it is very obfuscated.
Replies are listed 'Best First'.
Re: SelfGOL - I bet it is very obfuscated.
by davorg (Chancellor) on Jul 18, 2005 at 11:42 UTC

    I've seen Damian give shorter versions of the SelfGOL presentation at a couple of conferences over the last few years. It's a very scary piece of code :)


    "The first rule of Perl club is you do not talk about Perl club."
    -- Chip Salzenberg

Re: SelfGOL - I bet it is very obfuscated.
by McDarren (Abbot) on Dec 21, 2005 at 06:03 UTC
    Some more information on SelfGOL (including the source) can be found here

    It also gets a mention in the Panther book (2nd Edition, Chapter 10). Oddly enough, in the section on obfuscation :D

    Darren :)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://475708]
Approved by castaway
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2015-10-09 05:50 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (233 votes), past polls