--- Tuomo Salo <[EMAIL PROTECTED]> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> - From the keyboard of Phil Carmody (2007-11-15 15:05):
> > I saw this on sci.math, and thought "one liner" ;-)
> 
> While I could not squeeze this down to a one 80 char line, there is only
> one line that does not begin with a # :-)
> 
> #!perl -l
> $\=~s#(.*)\n#"$1(\n"x($1=~y/(//<$a)."$1)\n"x($1=~y/)//*2<$_-1)#gefor
1..2*($a=pop);print
> 
> I tried to do the generation by hand, implemented that method as a
> regex, and polished (or should I say disfigured) the result with a
> couple of standard golfing tricks. Notice the lack of escaped parens,
> btw :-)
> 
> There are probably a couple of mrmagoos there, at least you could lose
> a couple of chars (along with any perceived one-linerness) by replacing
> the "\n":s with literal newlines.

Masterful! Hyvä Tuomo! I can only begin to work out how it works!

Phil

()  ASCII ribbon campaign      ()    Hopeless ribbon campaign
/\    against HTML mail        /\  against gratuitous bloodshed

[stolen with permission from Daniel B. Cristofani]


      
____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs

Reply via email to