给 perl hacker 们看的[12]

[入库:2005年8月28日] [更新:2007年3月25日]

本文简介:选择自 eternalee 的 Blog

I wonder whether it would be possible to write a Turing Machine
in this restricted language, demonstrating its algorithmic
completeness.

 .robin.


Notes:
 http://www.kitsite.com/~robin/ou-x-po/talk/perl-prisoner.html

Analyzing font metrics:
 http://www.kitsite.com/~robin/ou-x-po/fontm.c
 http://www.kitsite.com/~robin/ou-x-po/prisoner.pl
%%
#sn@neopoly.de
#received an honourable mention 2000 TPJ Obfuscated Perl Contest
$\=$/,$^X=~m(((.)..l));$~=q,od,,$_='sven@sven.de 2000/01/04'
,$;="/$2$~/$1f\141q".(close STDERR).".$2$~";$#=length,print
map{@ARGV=-f$_.$;?$_.$;:m;();;m>"(j.{$#})>while<>;$+}@INC
%%
#"Christensen, David A. (CHC)" <DChristensen@chc.gov.mb.ca> with thanks to
#Andy Lester
#!/usr/bin/perl
undef $/;@t=split//,<DATA>; print map{$_<0?chr(-$_):$t[$_]} qw
/-74 32 10 11 5 40 41 44 43 75 80 76 27 48 64 65 26 54 7 1 91 -107 69 58/;
__END__
David Christensen
Technical Consultant
Manitoba Public Library Services

%%
#Mark-Jason Dominus http://www.plover.com/

require 5.00553;
use re 'eval';
$|=1;
$z = qr{(?{local$d=1})
        (?:`(?{$d++})
          |.(?{$d--})
        )+?
        (?(?{$d})(?!))
       }x;
$_="``As`SB``Ad``S``BS`BBI``Ae``B`SI`Ed``A?``C``CIi`pI``E?Z``BZZZZZ`KI
```CX`KIZZQZZZQZZZZZQZZZZQZ``BZZ```CX`KX`KXQ``Ee``EeZZZZZQZ```CX`KIZZQ
```CX`KIZZQZZZZQ```CXZ`KIZZQ``Ee```CX`KIZZQ``EdZZZQZ``BZZ```CX`KX`KXQ`
`BZ```CX`KIZZ`KXZQ``Ee```CX`KIZZQ``EdZZZQ``BZZZZ`KXQZ``BZZ```CX`KX`KXQ
``B```CXZ`KIZZ`KXQ``Ee``EeZZZZZQ``B``EeZZZ`KXQ``Ee``EdZZZQ``Ee```CX`KI
ZZQ``EdZZZQ``Ed``Ee```CX`KX`KI";
s/\n//g;s/Q/`KI``E?/g;s/X/IZZZ/g;s/Z/``Es/g;
1 while
  s{`I($z)          (?{$q=0})|``K($z)($z)                    (?{$q=1})
   |```S($z)($z)($z)(?{$q=2})|```B($z)($z)($z)               (?{$q=3})
   |```C($z)($z)($z)(?{$q=4})|``A($z)($z)                    (?{$q=5})
   |`i($z)     (?{$R++,$q=6})|`p($z)(?{print(chr 120-$R), $R=0, $q=7})
   |`E($z)          (?{$q=8})|`V($z)                         (?{$q=9})
   }
   {local $^W;
   $q<5 ?($1,$2,"``$4$6`$5$6","`$7`$8$9","``$10$12$11")[$q]
   :$q==5?($bind{$13}=$14,"")
   :($15,"",$bind{$17},"")[$q-6]
    }ex;
%%
Author:  Mark-Jason Dominus
@P=split//,".URRUU\c8R";@d=split//,"\nrekcah xinU / lreP rehtona tsuJ";sub p{
@p{"r$p","u$p"}=(P,P);pipe"r$p","u$p";++$p;($q*=2)+=$f=!fork;map{$P=$P[$f|ord
($p{$_})&6];$p{$_}=/ ^$P/ix?$P:close$_}keys%p}p;p;p;p;p;map{$p{$_}=~/^[P.]/&&
close$_}%p;wait until$?;map{/^r/&&<$_>}%p;$_=$d[$q];sleep rand(2)if/\S/;print

[note: Won 2nd place in the 5th annual obfuscated Perl contest.
 see http://perl.plover.com/obfuscated/ for more info. ]
%%
#Yanick Champoux
#http://www.iro.umontreal.ca/~champoux/sigs/
print map chr$_[0]-ord$_,@_='200ocT╣ZYT`cV▁cV\╜ge]cV'=~m;(\d+|.);g;
%%
#Richard Proctor <Richard@waveney.org>
@{$_}=(@{$_-1},1)for(1..9);
map{s/./sprintf"%02d",ord$&/eg}($h,$l)
=("0X\cFMWD\cDDF.CD","\cY\"\cEY*\\\cH\\<\cEK\\");
print chr((@{substr($h,$_,1)}.@{substr($l,$_,1)})+32)for(0..23)
%%
#Richard Proctor <Richard@waveney.org>
sub x{for(split'',"Abigail!"x3){print chr(shift()+ord)}}
x(9,19,10,13,-65,-8,2,78,51,6,-4,11,-65,-25,-7,81,43,-66,-33,-6,2,2,-7,81)
%%
#Gaal Yahas <gaal@forum2.org>
perl -le

本文关键:perl
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top