Output/progress info during a long program?



["Alasdair McAndrew" <amca01 at gmail.com>, Wed, 25 Oct 2006 23:31:07 +1000]:
> I have a maxima program which sometimes takes a while to compute.  I'd like
> to print out some encouraging messages along the way: "Half way there" sort
> of thing.  But it seems that  a print statement in a program block will only
> be executed when the whole block is completed.  Is there any way of
> implementing some sort of progress information (maybe a line of +'s.or the
> occasional message) in Maxima?

I don't have that problem here.  If I start Maxima and evaluate, say,

    block([], print(1), ?sleep(2), print(2));

I see the 1 immediately, and the 2 only after a delay of 2 seconds.
This is both on the console and in Emacs' inferior Maxima mode.

Could it be that you are using some frontend that gathers all the
output before displaying it?

In case this is platform or Lisp-dependent: I am on Linux, with CMUCL.

Regards,

Albert.