Patrick Hurley
9/19/2006 3:10:00 AM
On 9/18/06, Martin S. Weber <Ephaeton@gmx.net> wrote:
> On Mon, Sep 18, 2006 at 07:33:57PM +0900, Carl Drinkwater wrote:
> > (...)
> > I hope some of you will find this interesting, and sorry for disturbing
> > you if not!
>
> Code golfing is not for me, yet watching others do is very amusing.
> So when will the submitted entries be open to public ?
>
> -Martin
>
>
They are still discussing it on their forums, but I just looked today
and tried out the 99 bottles of beer. I have the shortest Ruby (202
bytes), but I am only tied for 10th place overall. The best Perl entry
is kicking my butt at 176 bytes. I think this is probably due to the
slightly more verbose string interpolation in Ruby, but I am
interested in what could be done to further shrink my script:
@a='#{n} bottle#{n>1?:s:""} of beer'
@b=" on the wall"
(n=99).times{puts eval"\"#@a#@b, #@a.\n\#{n-=1;n<1?(n=99;'Go to the
store and buy some more'):'Take one down and pass it around'},
#@a#@b.\n\n\""}
pth