Updated: 11/5/2005; 6:05:58 PM.
Chris Double's Radio Weblog
        

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.
 
April 2004
Sun Mon Tue Wed Thu Fri Sat
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30  
Mar   May



Click here to visit the Radio UserLand website.

Listed on BlogShares

Click to see the XML version of this web page.

Click here to send an email to the editor of this weblog.