|
Friday, April 30, 2004 |
Synchronous Web Programming. Sounds like a continuation based web framework. The sample implementation, Imposter, has problems with the back button though according to the 'limitations' section. Thanks to Richard for the link.
3:21:36 PM
|
|
I got an email today about my comment that Ruby failed on generating the factorial of 10,000. The code presented worked in Ruby up to large factorials:
def factorial(n)
result = 1
n.downto(2) do | value |
result *= value
end
return result
end
This approach, an iterative solution, will work, yes. I was referring
to a direct translation of the recursive factorial implementation I did
in Scheme:
def fact(n)
if n == 1
1
else
n * fact(n - 1)
end
end
I wasn't trying to criticise Ruby, rather I was saying that there are
times where you'll write code that you expect to work but it fails due
to some implementation limit (stack size, size of integers, etc). The
only choice in these cases is to re-write your code so that it works
around these implementation limits. But it's nice to use language
implementations where the code works regardless.
I do like the Ruby language and it is great that it handles large
numbers and lots of other great features. If I couldn't use Lisp or
Smalltalk, Ruby would definitely be one of my choices.
10:58:15 AM
|
|
© Copyright 2005 Chris Double.
|
|
|