Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

SelfGOL - I bet it is very obfuscated.

by ghenry (Vicar)
on Jul 18, 2005 at 11:15 UTC ( [id://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!!!

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
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://475708]
Approved by castaway
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (3)
As of 2024-04-16 21:08 GMT
Find Nodes?
    Voting Booth?

    No recent polls found