POV-Ray : Newsgroups : povray.pov4.discussion.general : I want to be rid of my stupid mistakes Server Time
1 Jul 2024 05:05:26 EDT (-0400)
  I want to be rid of my stupid mistakes (Message 51 to 53 of 53)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: SharkD
Subject: Re: I want to be rid of my stupid mistakes
Date: 21 Aug 2009 21:42:53
Message: <4a8f4d1d$1@news.povray.org>
clipka wrote:
> What should be the detection criterion?

Just do what JavaScript does: after x number of seconds ask the user 
whether he want to continue waiting or kill the script.

-Mike


Post a reply to this message

From: Chambers
Subject: Re: I want to be rid of my stupid mistakes
Date: 22 Aug 2009 05:27:15
Message: <4a8fb9f3$1@news.povray.org>
SharkD wrote:
> clipka wrote:
>> What should be the detection criterion?
> 
> Just do what JavaScript does: after x number of seconds ask the user 
> whether he want to continue waiting or kill the script.
> 
> -Mike

As long as it's a non-blocking request.  There are scenes which takes 
longer to parse than to trace, you know.


...Chambers


Post a reply to this message

From: Robert Dawson
Subject: Re: I want to be rid of my stupid mistakes
Date: 18 Jan 2010 14:55:00
Message: <web.4b54bb7597aca27178cf40cc0@news.povray.org>
"bgimeno" <bgimeno[at]persistencia[dot]org> wrote:
> The following code is perfectly valid to the present version, but does not
> produce anything.
>
> #declare FooCount = 0 ;
> #while (FooCount < 100 )
> sphere {<0,FooCount,0>,1 pigment { rgb< 1, 1, 0> } }
> // #declare FooCount = FooCount + 1 ; // note this missing line
> #end
>
> I suppose that a "detector" of infinite loops is it too much to ask?

   Yes, that is basically what Alan Turing showed many years ago.  The control
syntax of  POV-Ray is powerful enough that the halting problem is undecidable.

   What would be possible is a restricted syntax for looping ("dummy variables
for dummies"?) that could be checked and that would guarantee no infinite loops.
 For instance, a simple For-Next syntax in which the dummy variable could not be
modified within the body of the loop would allow most things that most POV users
want to do.

      On the other hand, unless nesting loops were also forbidden, you could
still easily write a nest of loops that would require 10^100 years to run; and
nesting is something that POV users would miss.  So I don't think there is any
good solution.

Robert Dawson


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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