Just another Perl shrine | |
PerlMonks |
Langton's Obfuscationby golux (Chaplain) |
on Oct 29, 2017 at 05:22 UTC ( [id://1202259]=obfuscated: print w/replies, xml ) | Need Help?? |
After watching this very interesting video, I decided it just had to be made into an obfuscation. After completion I realized it had been more than a year since I had composed one -- time flies. As usual, more information can be found at Wikipedia.
You'll need to have perl/Tk installed to run it. Invoke it with perl <program> (or in Windows give it a .pl extension). I won't give away too much, except to say that the shape of the code hints at the ultimate outcome. When first run, type the <space> key to start progress. You can then type <space> again to pause or restart. The number of "cycles" (or "generations") displays in the invoking window after each subsequent pause. Two parameters may be given; both are optional. The first is an integer that says how many "cycles" to run before changing colors. It defaults to a value which is more obvious when you run the code. Try for example a value of '350'. The second is the delay in milliseconds between successive "cycles"; use a larger value to slow down execution. The default is '1' (fastest possible).
Back to
Obfuscated Code
|
|