POV-Ray : Newsgroups : povray.off-topic : I think I did something wrong with RK4... Server Time
1 Oct 2024 13:20:08 EDT (-0400)
  I think I did something wrong with RK4... (Message 21 to 22 of 22)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Invisible
Subject: Re: I think I did something wrong with RK4...
Date: 15 Apr 2008 08:21:17
Message: <48049dbd@news.povray.org>
Darren New wrote:

> You know, it's not all that hard to accidentally carry over incorrect 
> state in a language without mutable state, too. :-)

Heh. Do you have *any idea* how long it took me to finish debugging this 
JavaScript snippet?

function Bindings_Lookup(key)
{
   if (this.Key  == key) return this.Value;
   this.Next.Lookup(key);
}

It took an absurd amount of time to figure this out - especially given 
the strange way Firefox responded to it...

Sure, they'll never make a programming language where mistakes are 
impossible. But mutable state just offers *so many* ways to shoot 
yourself in the foot. :-/

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Darren New
Subject: Re: I think I did something wrong with RK4...
Date: 15 Apr 2008 11:41:37
Message: <4804ccb1$1@news.povray.org>
Invisible wrote:
> Sure, they'll never make a programming language where mistakes are 
> impossible. But mutable state just offers *so many* ways to shoot 
> yourself in the foot. :-/

I don't understand what that has to do with mutable state, since you're 
not mutating anything there. It looks like you have the bug of too much 
recursion and the bug of not checking for the end of the list, assuming 
I'm reading it right.

And yes, firefox seems to crash my machine at least once a day, which is 
rather annoying. I've taking to running anything on a remote machine 
that takes more than 5 minutes as a nohup job, just in case my machine 
locks up.

-- 
   Darren New / San Diego, CA, USA (PST)
     "That's pretty. Where's that?"
          "It's the Age of Channelwood."
     "We should go there on vacation some time."


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.