I realized that my previous JAPH was thoroughly unattractive because you had to squint in order to decipher it, which isn't pleasant. That's why I came up with this one. It is based on the same idea of extracting JAPH one character at a time from successive iterations of the SHA512 of the code, but now features whitespaces(!) and pretty symmetrical subroutines. I hope you have as much fun understanding it as I had writing it. Here it is:
use strict; use Digest::SHA substr(q/=sha512(\/), $/, q); %_ = (undef($/) && (open *q, $0) => undef($/) || ($/=<q>) !~ s+= \w\+=+= =+??? : 6); $/ =~ s+[\xD\xA]\++\xA+g; $_ = aJcpbneUbBdThmaWbMqehybAhIkAaPeYavrNcjd0bvb9gxfjay=>; y #a-zA-Z0-9_$/y #\0->y;#; y #a-zA-Z0-9_$/y #\0->y;#; print substr($/=sha512($/), $_, 1) for (map &_ => /./gs); sub _ ( ) { # } ( ) _ dus sub x ($) { ! q ! } ($) x dus { 0 x (0) rox ! xor (0) x 0 } !((//m...//m) ^ (m\\...m\\))? (64)x + (ord) : (ord) + x(49) } # {
perl -w it, it runs without warnings and prints exactly "Just another Perl hacker,".
Good start points to understand what happens:
EDIT: Here's an alternative version of the code that doesn't read it's own source, making it more portable (possible use as a one-liner, no trailing whitespace problem) but much less interesting:
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Pulling JAPH out of the iterated SHA512 of the code...
by Your Mother (Archbishop) on Jun 07, 2011 at 17:45 UTC | |
by Grimy (Pilgrim) on Jun 07, 2011 at 17:58 UTC | |
by Your Mother (Archbishop) on Jun 07, 2011 at 18:08 UTC | |
by Grimy (Pilgrim) on Jun 07, 2011 at 18:11 UTC | |
by Your Mother (Archbishop) on Jun 07, 2011 at 18:15 UTC | |
by choroba (Cardinal) on Jun 07, 2011 at 21:34 UTC |