This unusual course examines a highly sophisticated (and heavily obfuscated) Perl program named SelfGOL: a transdimensional, self- aware, viral, software meta-quine.
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.
To do all that, it relies on some extremely advanced programming techniques, and makes use of many of the lesser-known features of the Perl syntax. This talk explores both these aspects of the program, using them to illustrate many important Software Engineering principles, mainly by ironic counter-example.
Half-day or full-day seminar
Perl programmers from all disciplines who are at least familiar with the basics of Perl's control flow, string handling, and simple data structures (scalars, arrays, hashes).