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

Re: 3-D Stereogram, Self replicating source.

by Preceptor (Deacon)
on Oct 07, 2015 at 15:25 UTC ( [id://1144071]=note: print w/replies, xml ) Need Help??


in reply to 3-D Stereogram, Self replicating source.

I know it's a few years late to the party. This remains one of my favourite examples of Perl. However, I've just been trying to get this to run, and it ... doesn't seem to produce the output I expect. Would anything materially have changed under perl 5.22?

  • Comment on Re: 3-D Stereogram, Self replicating source.

Replies are listed 'Best First'.
Re^2: 3-D Stereogram, Self replicating source.
by vitoco (Hermit) on Apr 16, 2023 at 14:32 UTC

    I came back to this masterpiece and also found it does not run on perl 5.11 or later, as it uses a standalone split expecting that it would assign the result into @_.

    I tweaked it a bit to work in version 5.32, but sorry for the bad word on line 15 (don't blame Marcus for that).

    #!/usr/bin/perl # Copyright (c) Marcus Post, <marcus@marcuspost.com> # # # # $_=q,my(@f|@c|x$_=q.my(@f|@c|x$_=q.my(@f|@c|x$_=q.m(@f||@c|x$_=q.m(@f| +|@c|xx @w);@a=@f=<DAT%@w);@a=@f=<DAT%@w);@a=@f=<DAT%@w;@a=@f=<DAAT%@w;@a=@f=< +DAAT%% A>;seek(DATA|0!A>;seek(DAA|0!!A>;seek(DAA|0!A>;seek(DAA|0!!A>;seek(DAA +|0!!AA |0);@c=<DATA>;Y|0);@c<DATA>;Y||0);@c<DATA>Y||0);@c<DATA>Y|||0);@c<DATA +>Y|||| until(($_=pop(zutil(($_==pp(zuttil(($_==p(zuttil(($_==p(zutttil(($_==p +(zuttt @c))=~/^_/){};Qc))=~/^_/){};Qc)))=~/^_/{};Qc)))=~/^_/{};Qc))))=~/^_/{} +;Qc))) unshift(@a|$_)xnshift(@a|$_)xnshhift(a|$_)xnshhift(a|$_)xnshhiift(a|$_ +)xnshh ;for(1..3){pri%;for(1.3){pri%;ffor1.3){pri%;ffor1.3){pri%;ffor11.3){pr +i%;fff nt(shift(@c));!nt(shft(@c));!ntt(hft(@c));!ntt(hft(@c));!ntt(hftt(@c)) +;!nttt }for(@f){my($sY}for@f){my($sY}for@f){my($sY}for@f){my($sY}for@f){mmy($ +sY}foo );@b=split//;$z);@b=plit//;$z);@b=plit//;$z);@b=plit//;$z);@b=plit//;; +$z);@@ _=shift(@c);s!Q_=shit(@c);s!Q_=shit(@c);s!Q_=shit(@c);s!Q_=shit(@c);s! +QQ_=ss /(.{15}).*/\1/x/(.{15})*/\1/x/(.{15})*/\1/x/(.{15})*/\1/x/(.{15}})*\1/ +xx/(.. ;@w=split//;fo%;@w=split/;fo%;@w=split/;fo%;@w=split/;fo%;@w=spllit;fo +%%;@ww r(@b){$w[$s+15!r(@b){$w[$s15!r(@b){$w[$s15!r(@b){$w[$s15!!(@b){$$w[s15 +!!!(@@ -$_]=(($w[$s]eY-$_]=(($w[$s]YY-_]=(($w[$s]YY-_]=(($w[$s]YY-_]=((($[$s] +]YY-__ q"|")?".":$w[$zq"|")?".":$w[$zq|")?"."::$[$zq|")??."::$[[$z|")???.::$$ +[[$z|| s]);$s++;}for(Qs]);$s++;}for(Qs];$s++;}}or(Qs];$$s+;}}orr(Qs]$$s++;}}o +rr(Qss 1..75){unless(x1..75){unless(x1.75){unnlss(x1.775){uulsss(x1.75){uuuls +ss(x11 $w[$_]ne''){$w%$w[$_]ne''){$w%$w$_]nee''{$w%$$w$_]nn''{{$w%$$w_]nnn''{ +{$w%$$ [$_]=$w[($_-1)![$_]=$w[($_-1)![$_=$w[[($_-)![$_==w[[($$_-)![$__w[[[($$ +_-)![[ ];}}print(joinY];}}print(joinY];}prinnt(joinY;}prinntt(joinY;}pinnntt( +joinYY ""|@w);print"\z""|@w);print"\z""|w);;print"\z"|w);;pprint"\z"|w;;pppri +nt"\zz n";}print@a;,;#n";}print@a;.;#n";priint@a;.;#n;priintt@a;.;#n;piinntt@ +a;.;## y!|zY\!%x!,Q!;#y!|zY\!%x!.Q!;#y!zY\!!%x!.Q!;#!zY\!!%x!!.Q!;#!z\!!!%x!! +.Q!;## s{Q.*\n}[]g;#<>s{Q.*\n}[]g;#<>sQ.*\nn}[]g;#>sQ.*\nn}[]]g;#>sQ.\nnn}[]] +g;#>ss eval;#EndFini!$eval;#EndFini!$eal;#EEndFin!$eal;;##nddFin!$ea;;###nddF +in!$ee __DATA__ 000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000 000000000000110000000110000000000000000011100000000000000000 000000000001110000001110000000000000000111110000000000000000 000000000011110000011110000000000000001111111000000000000000 000000000011110000011110000000000000001111110000000000000000 000000000011110000011110000000000000001111100000000000000000 000001111111111111111111111110000000001111100000000000000000 000011111111111111111111111100000000000111100000000000000000 000111111111111111111111111000000000000111100000000000000000 000000000011110000011110000000000000000111100000000000000000 000000000011110000011110000000000000000111100000000000000000 000000000011110000011110000000000000000111100000000000000000 000000000011110000011110000000000000000011100000000000000000 000001111111111111111111111110000000000011100000000000000000 000011111111111111111111111100000000000011100000000000000000 000111111111111111111111111000000000000001100000000000000000 000000000011110000011110000000000000000001100000000000000000 000000000011110000011110000000000000000001100000000000000000 000000000011110000011110000000000000000000000000000000000000 000000000011100000011100000000000000000000000000000000000000 000000000011000000011000000000000000000011110000000000000000 000000000000000000000000000000000000000111111000000000000000 000000000000000000000000000000000000000111110000000000000000 000000000000000000000000000000000000000011110000000000000000 000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000
Re^2: 3-D Stereogram, Self replicating source.
by Anonymous Monk on Oct 14, 2015 at 00:27 UTC
    This crazy masterpiece of self pollinating code runs on Perl 5.10.0, a version that's installable with http://perlbrew.pl/ :)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1144071]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2024-04-19 22:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found