Dominik Bathon wrote:
> On Wed, 12 Oct 2005 14:07:08 +0200, daz wrote:
>
> > Maybe we'll see a smaller fowl soon :-)
>
> I am not sure if you meant golfing by "a smaller fowl", [...]


I'd just like to be able to see the whole image without needing
to project it onto the side of a tower block, first ;) ...
.... but golfing's OK ...

>
> [...]
>  GRADIENT[(file.read(3).unpack("CCC").inject { |a,b| a+b } / 3) >> 4]


I abandoned a similar construct after finding that String#[] is
quicker than short String#unpack sequences.  Unpacking the whole
string is very quick but then Array#[] is needed later.
Mine is still messy, though.


> [...]
>  end.reverse)

Yes, I should have had the courage to reverse instead of maintaining
a pointer.


> And here are two different short version, they need ARGV[0] and
> also write to stdout:
>      ['snip']*2
>
> Dominik


I won't try to compete :)

Cheers,

daz