Mike Wilson <wmwilson1 / go.com> writes:

> >> Hmm, I've got a 16-way 10GB RAM Sun Enterprise 6500 sitting
> >>here..... ;)
> > If I pay the postage could you ship it over?
> '
> sure, postage would be $400,000, $600,000 if you want the TB of disk
> too, that good? ;)

Guess I'll wait for it to appear on eBay

> Sorry I'm still on this, but would it maybe make sense to have one of
> the $SAFE levels cover such things?  If I wanted to make some online
> calculator, someone could just DOS the heck out of me like this (not
> that I'm doing that, but..).  Even checking input, I'd really have to
> take the given operations into account as well
> (i.e. (2**(2**(2**(2**(... ), would get hairy. ;)

How about:

     require 'timeout'

     begin
       ans = 0
       timeout(1) do
         ans = 1020939**(ARGV[0].to_i)
       end
       puts ans
     rescue TimeoutError
       puts "Throw another processor in the box"
     end



Dave