POV-Ray : Newsgroups : povray.bugreports : #debug, #render ... windows Server Time
2 Jun 2024 04:19:04 EDT (-0400)
  #debug, #render ... windows (Message 1 to 7 of 7)  
From: Spider
Subject: #debug, #render ... windows
Date: 26 Mar 1999 07:01:52
Message: <36FB7624.22B06813@bahnhof.se>
I belive I have foundd a bug, or at least a minor irritation in the windows
version of pov-ray. 

appearance :
in a very slow loop I have(some 140 000 items) I wanted a percentage meter, and
thus I made a #if(mod(Y,N/10)=0) #debug "." #end
statement(this isn't the real one, I actually had a bit more optimized code, as
well as some statistics) but to my irritation, a line isn't updated with new
output unless I add a "\n" to the output. I really didn't want to output
everything to a new line, but this seems impossible. I've tried with
#debug
#render
#statistics
#warning 
by obvious reasons, #error isn't very appropiate .-)

version of POV :
Version 3.1e.watcom.win32 [Pentium II optimized]

I don't know if this is some optimization, to output to a line only when it is
full, but either a addition to the help files(that this is the case) or a
software addition.

Thankyou.


-- 
//Spider
        [ spi### [at] bahnhofse ]-[ http://www.bahnhof.se/~spider/ ]
What I can do and what I could do, I just don't know anymore
                "Marian"
        By: "Sisters Of Mercy"


Post a reply to this message

From: Nieminen Mika
Subject: Re: #debug, #render ... windows
Date: 26 Mar 1999 08:14:54
Message: <36fb884e.0@news.povray.org>
Spider <spi### [at] bahnhofse> wrote:
: but to my irritation, a line isn't updated with new
: output unless I add a "\n" to the output.

  This means that the outputting is buffered, just like outputting to
standard output in any programming language.
  In programming languages the solution to this is to flush the stdout
stream after outputting the text. AFAIK there's no way to flush text
streams in povray other than outputting a "\n".

  How about a new feature: #flush <stream>, where <stream> can be
'debug', 'render', 'warning', etc...
  For example:

#warning "This is a warning"
#flush warning

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: #debug, #render ... windows
Date: 26 Mar 1999 09:13:17
Message: <36fb95fd.0@news.povray.org>
In article <36fb884e.0@news.povray.org> , Nieminen Mika <war### [at] cctutfi>  
wrote:

>   This means that the outputting is buffered, just like outputting to
> standard output in any programming language.

It is not, at least not in the POV-Ray core code.  The code used will work
on most other platforms that output the text directly. However, the GUI
platforms need to workaround certain limitations of text streams.

We are aware of the shortcomings of the current text stream only based
output when using graphical user interfaces. This will all work much better
in future versions of POV-Ray.

>   In programming languages the solution to this is to flush the stdout
> stream after outputting the text. AFAIK there's no way to flush text
> streams in povray other than outputting a "\n".
>
>   How about a new feature: #flush <stream>, where <stream> can be
> 'debug', 'render', 'warning', etc...
>   For example:
>
> #warning "This is a warning"
> #flush warning


     Thorsten


Post a reply to this message

From: Spider
Subject: Re: #debug, #render ... windows
Date: 26 Mar 1999 18:22:42
Message: <36FC15C0.C6AABD96@bahnhof.se>
Thorsten Froehlich wrote:
> 
> In article <36fb884e.0@news.povray.org> , Nieminen Mika <war### [at] cctutfi>
> wrote:
> 
> >   This means that the outputting is buffered, just like outputting to
> > standard output in any programming language.
> 
> It is not, at least not in the POV-Ray core code.  The code used will work
> on most other platforms that output the text directly. However, the GUI
> platforms need to workaround certain limitations of text streams.
Ok, thanks. I guessed that it was this, but i was uncertain.
 
> We are aware of the shortcomings of the current text stream only based
> output when using graphical user interfaces. This will all work much better
> in future versions of POV-Ray.
> 
> >   In programming languages the solution to this is to flush the stdout
> > stream after outputting the text. AFAIK there's no way to flush text
> > streams in povray other than outputting a "\n".
> >
> >   How about a new feature: #flush <stream>, where <stream> can be
> > 'debug', 'render', 'warning', etc...
> >   For example:
> >
> > #warning "This is a warning"
> > #flush warning
> 
>      Thorsten

-- 
//Spider
        [ spi### [at] bahnhofse ]-[ http://www.bahnhof.se/~spider/ ]
What I can do and what I could do, I just don't know anymore
                "Marian"
        By: "Sisters Of Mercy"


Post a reply to this message

From: Spider
Subject: Re: #debug, #render ... windows
Date: 26 Mar 1999 18:23:34
Message: <36FC15F4.16F870D5@bahnhof.se>
Nieminen Mika wrote:
> 
> Spider <spi### [at] bahnhofse> wrote:
> : but to my irritation, a line isn't updated with new
> : output unless I add a "\n" to the output.
> 
>   This means that the outputting is buffered, just like outputting to
> standard output in any programming language.
>   In programming languages the solution to this is to flush the stdout
> stream after outputting the text. AFAIK there's no way to flush text
> streams in povray other than outputting a "\n".
yeah, I know. I posted that solution as well, but I don't WANT to.

As well, the \t (i think) for TAB isn't working in windows.


>   How about a new feature: #flush <stream>, where <stream> can be
> 'debug', 'render', 'warning', etc...
>   For example:
> 
> #warning "This is a warning"
> #flush warning
Just do direct output...

-- 
//Spider
        [ spi### [at] bahnhofse ]-[ http://www.bahnhof.se/~spider/ ]
What I can do and what I could do, I just don't know anymore
                "Marian"
        By: "Sisters Of Mercy"


Post a reply to this message

From: Peter Popov
Subject: Re: #debug, #render ... windows
Date: 10 Apr 1999 14:58:56
Message: <370f8756.26362743@news.povray.org>
On Fri, 26 Mar 1999 12:57:24 +0100, Spider <spi### [at] bahnhofse> wrote:

>I belive I have foundd a bug, or at least a minor irritation in the windows
>version of pov-ray. 
>
>appearance :
>in a very slow loop I have(some 140 000 items) I wanted a percentage meter, and
>thus I made a #if(mod(Y,N/10)=0) #debug "." #end
>statement(this isn't the real one, I actually had a bit more optimized code, as
>well as some statistics) but to my irritation, a line isn't updated with new
>output unless I add a "\n" to the output. I really didn't want to output
>everything to a new line, but this seems impossible. I've tried with
>#debug
>#render
>#statistics
>#warning 
>by obvious reasons, #error isn't very appropiate .-)
>
>version of POV :
>Version 3.1e.watcom.win32 [Pentium II optimized]
>
>I don't know if this is some optimization, to output to a line only when it is
>full, but either a addition to the help files(that this is the case) or a
>software addition.
>
>Thankyou.

This is not a bug in any case. That's just how windoze treats console
output. You may try to use \r which is a carriage return. This will
flush the stream or whatever you programmers call it. I have
successfully used it for the exact same purpose as you, and I remember
it was quite simple. You need a string (eg. yourString) containing 100
dots '.' and then, every time you advance a percentage in your loop,
use something like
 #debug concat ("\r", substr(yourString, 1, currentProgress))
and that's all. HTH.


---------
Peter Popov
ICQ: 15002700


Post a reply to this message

From: Spider
Subject: Re: #debug, #render ... windows
Date: 11 Apr 1999 11:58:04
Message: <3710B76F.EA3BE6B8@bahnhof.se>
> 
> This is not a bug in any case. That's just how windoze treats console
> output. You may try to use \r which is a carriage return. This will
> flush the stream or whatever you programmers call it. I have
> successfully used it for the exact same purpose as you, and I remember
> it was quite simple. You need a string (eg. yourString) containing 100
> dots '.' and then, every time you advance a percentage in your loop,
> use something like
>  #debug concat ("\r", substr(yourString, 1, currentProgress))
> and that's all. HTH.
> 

hey, you be back. Good :-)
Thanks for the info :-)


-- 
//Spider
        [ spi### [at] bahnhofse ]-[ http://www.bahnhof.se/~spider/ ]
What I can do and what I could do, I just don't know anymore
                "Marian"
        By: "Sisters Of Mercy"


Post a reply to this message

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