Re: ASCII art from sourcecode as image

Colin Randall <[email protected]> Sun, 17 Oct 2021 19:35:35 +0100
Newsgroups alt.ascii-art,comp.lang.perl.misc
Organization none whatsoever
Message-ID <[email protected]>
On 11/10/2021 19:01, Eli the Bearded wrote:
> 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
> 
ok ... thanks for that ... sorry to have put you to the trouble ...

so it was just an example of a "caligram" using the Acme::EyeDrops tool

if it had been C or Bash or even Pascal i would've been able to read it
... hadn't realized that Perl was so 'parentheses' heavy ... kind of
looks like it was made with a bracket-generator :)

-- 
     .
   ._!__  __ __
     / _\/_ |_ \!_
    / /    7 / /|
    \ \_ _/ /  \ .
     \_//__/|_\_\!_.
                 |