Re: ASCII art from sourcecode as image

Eli the Bearded <*@eli.users.panix.com> Mon, 11 Oct 2021 18:01:36 -0000 (UTC)
Newsgroups alt.ascii-art,comp.lang.perl.misc
Organization Some absurd concept
Message-ID <[email protected]>
In alt.ascii-art, colin randall  <[email protected]> wrote:
> On Wednesday, July 16, 2003 at 9:07:44 AM UTC+1, Harry Mason wrote:

I'd make a suggestion, but 19 years later it might not help.

> For perl there is Acme::EyeDrops. It doesn't just format the program, it
> obfuscates it too.
> 
> -- 8< -- cut here -- >8 --
> #!/usr/bin/perl -w
> eval eval '"'.
> 
> 
>                                         ('#').
>                                        '!'.'/' .('['
>            ^'.' )                  .('['^'('). ("\["^
>        ')')."\/".(               '`'|'"').('`'| ')').(
>   '`'|'.')  .'/'. (             '['^'+').('`'|'%').('['
> ^')').('`'|',').('{'           ^'[').'-'.('['^',').('!'
> ^'+').('['^'.').('['^        '(').('`'|'%').('{'^('[')).(
>  '['^'(').('['^'/').(     '['^')').('`'|')').('`'|'#').("\["^
>             ('/')).       ';'.('!'^'+').('['^'+').('['^"\)").(
>       '`'|')').('`'|'.').('['^'/').('{'^'[').'\\'.'"'.('`'|'(').(
>       '`'|'%').('`'|',').('`'|',').('`'|'/').','.('{'^'[').('['^','
>      ).('`'|'/').('['^')').('`'|',').('`'|'$').'\\'.'\\'.('`'|"\.").
>       '\\'.'"'.';'.('!'^'+').'"';$:='.'^'~';$~='@'|'(';$^=')'^'[';$/=
>       '`'|'.';$_='('^'}';$,='`'|'!';$\=')'^'}';$:='.'^'~';$~='@'|'(';
>       $^=')'^'[';$/='`'|'.';$_='('^'}';$,='`'|'!';$\=')'^'}';$:="\."^
>      '~';$~='@'|'(';$^=')'^'[';$/='`'|'.';$_='('^'}';$,='`'|('!');$\=
>       ')'^'}';$:='.'^'~';$~='@'|'(';$^=')'^'[';$/='`'|'.';$_='('^'}';
>         $,='`'|'!';$\=')'^'}';$:='.'^'~';$~='@'|'(';$^=')'^'[' ;($/)=
>          '`'|'.';$_='('^'}';$,='`'|'!';$\=')'^'}';$:='.'^'~';   ($~)=
>            '@'|'(';$^=')'^'[';$/='`'|'.';$_='('^'}';$,=('`')|   "\!";
>              $\=')'^'}';$:='.'^'~';$~='@'|'(';$^=')' ^'[';$/=   '`'|
>                ((   '.'));$_='('^'}';$,='`'|"\!";$\= ')'^'}';  ($:)
>                     ='.'^"\~";  $~='@'|'(' ;$^=')'^   '[';$/=  '`'
>                     |('.');$_=  '('^'}';$, ='`'|'!'    ;$\=')' ^+
>                      "\}";$:=   '.'^'~';$~  =('@')|     '(';$^
>                      =')'^'['  ;$/=('`')|   '.';$_=      "\("^
>                      '}';$,=   '`'|'!';$\    ="\)"^      '}';$:
>                      =('.')^   "\~";$~=      ('@')|       "\(";
>                      $^=')'    ^"\[";       $/='`'        |'.';
>                       ($_)=     ('(')^     '}';$,         ='`'|
>                       "\!";      $\=')'^  '}';$:          ='.'
>                       ^'~';         $~='@'|'('            ;$^=
>                       ')'^           "\[";$/=             '`'|
>                       '.';            $_=('(')^           '}';
>                      ($,)            ='`'|'!';$\         =')'^
>                     "\}";         $:='.'^'~';$~=         ('@')|
>                     "\(";        $^="\)"^  '[';         $/='`'|
>                   '.';$_=                              '('^'}';
>                 $,="\`"|                                '!';#;
> -- 8< -- cut here -- >8 --

> Thats an interesting piece of art
> i dont have perl installed and i'd be curious to know what its output
> looks like

It just prints "hello, world". 

There are a bunch more examples in the documentation for Acme::EyeDrops,
but trying a few, I was unable to get them to produce output (other
than errors[*]). Chances are the output ASCII art code is rather
sensitive to changes in Perl syntax.

https://metacpan.org/pod/Acme::EyeDrops

[*] Example, with Perl v5.26.1
    Eval-group not allowed at runtime, use re 'eval' in regex
    m/(?{eval"\$~=pop||'';open\$%;y,!-~,#,,s,(.).,\$+,gs,\$~&&(\$_=reverse)for\@~=grep\$|--,('')x18,<0>;\@;=map~~reverse,re.../
    at /tmp/p line 48.
    For the similarly shapped "camel.pl"

Elijah
------
has not tried using all the ancient versions of Perl he has access to