May 18, 2011

Black Perl

偶然看到一篇 Perl 语言的诗篇, 据说可以在 Perl 3 上编译. 作者 Larry Wall, 语言学家, Perl 的发明者和导师. 神奇的是我熟悉的 Perl 很像 C, 变量全都有钱, 而这个诗篇, 除了 die, 没一点 Perl 的特征. 所以人称 Perl "There's more than one way to do it", 果不其然.

BEFOREHAND: close door, each window & exit; wait until time.
    open spellbook, study, read (scan, select, tell us);
write it, print the hex while each watches,
    reverse its length, write again;
    kill spiders, pop them, chop, split, kill them.
        unlink arms, shift, wait & listen (listening, wait),
sort the flock (then, warn the "goats" & kill the "sheep");
    kill them, dump qualms, shift moralities,
    values aside, each one;
        die sheep! die to reverse the system
        you accept (reject, respect);
next step,
    kill the next sacrifice, each sacrifice,
    wait, redo ritual until "all the spirits are pleased";
    do it ("as they say").
do it(*everyone***must***participate***in***forbidden**s*e*x*).
return last victim; package body;
    exit crypt (time, times & "half a time") & close it,
    select (quickly) & warn your next victim;

AFTERWORDS: tell nobody.
    wait, wait until time;
    wait until next year, next decade;
        sleep, sleep, die yourself,
        die at last
# Larry Wall

再找找看, 早有人作了 C 的诗仙. 可编译, 可运行, 更是越读越有趣!

    double time, me= !0XFACE,
    not; int rested,   get, out;
    main(ly, die) char ly, **die ;{
        signed char lotte,
dear; (char)lotte--;
    for(get= !me;; not){
    1s -  out & out ;lie;{
    char lotte, my= dear,
    **let= !!me *!not+ ++die;
"The gloves are OFF this time, I detest you, snot\n\0sed GEEK!");
    do {not= *lie++ & 0xF00L* !me;
    #define love (char*)lie -
    love 1s *!(not= atoi(let
    [get -me?
(char)lotte: my- *love -
    'I'  -  *love -  'U' -
    'I'  -  (long)  - 4 - 'U' ])- !!
    (time  =out=  'a'));} while( my - dear
    && 'I'-1l  -get-  'a'); break;}}
(char)*lie++, (char)*lie++; hell:0, (char)*lie;
    get *out* (short)ly   -0-'R'-  get- 'a'^rested;
    do {auto*eroticism,
    that; puts(*( out
        - 'c'
-('P'-'S') +die+ -2 ));}while(!"you're at it");
for (*((char*)&lotte)^=
    (char)lotte; (love ly) [(char)++lotte+
    !!0xBABE];){ if ('I' -lie[ 2 +(char)lotte]){ 'I'-1l ***die; }
    else{ if ('I' * get *out* ('I'-1l **die[ 2 ])) *((char*)&lotte) -=
    '4' - ('I'-1l); not; for(get=!
get; !out; (char)*lie  &  0xD0- !not) return!!
    do{ not* putchar(lie [out
    *!not* !!me +(char)lotte]);
    not; for(;!'a';);}while(
        love (char*)lie);{
register this; switch( (char)lie
    [(char)lotte] -1s *!out) {
    char*les, get= 0xFF, my; case' ':
    *((char*)&lotte) += 15; !not +(char)*lie*'s';
    this +1s+ not; default: 0xF +(char*)lie;}}}
    get - !out;
    if (not--)
    goto hell;
        exit( (char)lotte);}