News for hackers. Stuff that matters.
Re:Arc Ported to JavaScript by nostrademons on Thursday February 07, 2008 @11:47AM (#111017)
I tried factorial as one of my test cases. Up through factorial 10 it was still coming back as integers. You may have triggered some overflow condition. The interpreter uses the native JavaScript + operation, then checks whether result == Math.round(result) to see whether it should wrap it in an int or a num.

I'm truly amazed you got it to work up to (fact 100), and that it came back in a reasonable amount of time. Firefox has a recursion limit depth of 1000, which means that the interpreter overhead is only about a factor of 10. I was expecting much more...

Re:Arc Ported to JavaScript by anaphoric on Thursday February 07, 2008 @01:51PM (#111194)
I think it worked for 50, but then it busted on 100. I only tried a couple of calls.