I was bored today, so I wrote an ickle module which takes code like this:

  use Pony;

  print "Hello world!\n";

and turns it into

  use Pony;
        b                
       UfFy              
       buffy             
      buFFYb             
      uFfyBUF            
      fYbuFfY            
     BufFYBuF            
      FybuFfY            
       BUffyb            
       ufFybuF      fy   
      bUffybuFf     yBu  
   F  fYbuFFybuFFyBUffy  
   BUfFYbUFFYbUFfybuffY  
  bu FFYbUFFyBUFFyBUffYb 
  uF  FYbufFYbUFfybUffYB 
   u    FfybuFfybuFFYbUff
         YBUfFYbuFfybUffY
          B      uFFYbufF
          y       Buf fyb
          U        fF ybu
          f       FYB UFf
          Y       b U  FF
          Y       B u  F 
          f         Y  b 
         U          f    
                   f     

  yBufFYBufFybuFfybUfFYBUFfYbUFFYBuFf

I am very very sorry.  It's all Damian's fault.  He 'inspired' me to do
this after his talk on Bleach.

The pony is scalable, and it will handle up to about 5000 characters of
code (I only wrote the code for scaling it down, couldn't be arsed with
scaling up).  The module has a 100Kb ASCII-art pony embedded in it (derived
from an XPM which was swiped from the web pages of the American Shetland
Pony Club) which gets scaled to the right size and then we substitute
code which has been encoded a-la-Buffy.pm.  Because the scaling can't be
exact, it either gets padded with garbage at the end or we draw a line
underneath the pony for it to stand on.

To execute, it throws away all the whitespace and then decodes exactly the
same as Leon Brocard's 'Buffy' module.

I'll put it on CPAN soon.

Future enhancements (yeah right):
  Use RLE to compress the 100Kb of ASCII-art;
  or if I can figger it out, store it as arbitrarily scalable vectors;
  scaling up

-- 
David Cantrell | [EMAIL PROTECTED] | http://www.cantrell.org.uk/david/

    This is a signature.  There are many like it but this one is mine.

** I read encrypted mail first, so encrypt if your message is important **

PGP signature

Reply via email to