Hi, Lutz!
Just discover that
(while true (print ".") (sleep 1000))
started in command prompt shows all the output only after execution is finished.
Often this is not useful.
If this is a new behavior, then something like (flush), or, better, the output buffer configuration for particular handle, like in perl, will be a good addition.
On Unix Mac OS X you can import fflush()
> (import "libc.dylib" "fflush")
fflush <948F88C7>
> (while true (print ".") (fflush 0) (sleep 200))
................................................^Creceived SIGINT - in function sleep
(c)ontinue, (d)ebug, e(x)it, (r)eset:r
>
The SIGINT was caused by hitting Ctrl-C. The above is on Mac OS X. On Linux you would use: libc.so. On Win32 something else?
ps: output is also forced with line-feeds
Thanks.
... and you can also use 'write-buffer' on stdout and don't need to flush:
> (while true (write-buffer 0 ".") (sleep 200))
..................^Creceived SIGINT - in function sleep
(c)ontinue, (d)ebug, e(x)it, (r)eset:x
~>
oh! write-buffer is sufficient! thanks again!