Until yesterday, I had been using a version from 2008-07-08. This worked pretty well. Yesterday I updated to the latest CVS version.
Everything seems to be working fine, but now the output appears to be buffered strangely. Any function that produces a lot of output seems to have it buffered. When I enter something else into the repl, the missing output then comes out. This is a bit annoying.
So I set *use-dedicated-output-stream* to T. This works much better, but now the output is interleaved with the output of the repl. That is, the result of the repl is printed before the output of the function. I can live with that, but it's kind of annoying too.
Is there something I've missed to cause this behavior? Oh, I'm also running this with the latest snapshot of cmucl (no unicode)
Ray
* Raymond Toy [2008-09-11 03:24+0200] writes:
Until yesterday, I had been using a version from 2008-07-08. This worked pretty well. Yesterday I updated to the latest CVS version.
Everything seems to be working fine, but now the output appears to be buffered strangely. Any function that produces a lot of output seems to have it buffered. When I enter something else into the repl, the missing output then comes out. This is a bit annoying.
FORCE-OUTPUT didn't always flush the buffer. That should be fixed now. We call FORCE-OUTPUT just before returning the result to Emacs.
So I set *use-dedicated-output-stream* to T. This works much better, but now the output is interleaved with the output of the repl. That is, the result of the repl is printed before the output of the function. I can live with that, but it's kind of annoying too.
To fix that, we would need to synchronize the two streams. That's not easy, because we just write the raw output to the dedicated output stream. We don't even have sequence numbers or something like that.
Is there something I've missed to cause this behavior? Oh, I'm also running this with the latest snapshot of cmucl (no unicode)
Ideally, buffered output would be flushed with a timer, but CMUCL has no timers.
Helmut.
* Helmut Eller m2sks7x8nz.fsf@common-lisp.net : Wrote on Thu, 11 Sep 2008 12:45:52 +0200: | * Raymond Toy [2008-09-11 03:24+0200] writes: |> So I set *use-dedicated-output-stream* to T. This works much better,
I'd like to see *use-dedicated-output-stream* supported: It is useful and sometimes necessary for output to not to go through the whole of slime repl's infrasturcture.
|> but now the output is interleaved with the output of the repl. That is, |> the result of the repl is printed before the output of the function. I |> can live with that, but it's kind of annoying too. | | To fix that, we would need to synchronize the two streams. That's not | easy, because we just write the raw output to the dedicated output | stream. We don't even have sequence numbers or something like that. | |> Is there something I've missed to cause this behavior? Oh, I'm also |> running this with the latest snapshot of cmucl (no unicode) | | Ideally, buffered output would be flushed with a timer, but CMUCL has no | timers.
There was a SERVE-TIMER conribution in 2004 posted in
URL:http://coding.derkeiler.com/Archive/Lisp/comp.lang.lisp/2004-05/1103.html
I was using this for a while, and hoped it would be included into CMUCL. I'm not sure how to reach the author now. Perhaps it could still be added to CMUCL?
[For my own stuff, since then, I've been task queues running on top of MP to implement timers. I'm not sure if this is better than serve-timer for a general CMUCL solution for inclusion in CMUCL. For an early prototype implementation of teh PQ based timer, you can search google for "cmucl"+"cron.lisp" and skip any bknr links. I'd be interested in advice on both]
-- Madhu
Helmut Eller wrote:
- Raymond Toy [2008-09-11 03:24+0200] writes:
Until yesterday, I had been using a version from 2008-07-08. This worked pretty well. Yesterday I updated to the latest CVS version.
Everything seems to be working fine, but now the output appears to be buffered strangely. Any function that produces a lot of output seems to have it buffered. When I enter something else into the repl, the missing output then comes out. This is a bit annoying.
FORCE-OUTPUT didn't always flush the buffer. That should be fixed now. We call FORCE-OUTPUT just before returning the result to Emacs.
Thanks for the quick fix. I tried it out and it works better. However, it also works even worse. :-( What I see is that it's working fine when I'm compiling up a bunch of stuff, but eventually output stops and cmucl sucks up 100% CPU doing something. XEmacs is pretty idle at this point.
So I set *use-dedicated-output-stream* to T. This works much better, but now the output is interleaved with the output of the repl. That is, the result of the repl is printed before the output of the function. I can live with that, but it's kind of annoying too.
To fix that, we would need to synchronize the two streams. That's not easy, because we just write the raw output to the dedicated output stream. We don't even have sequence numbers or something like that.
Can't you just hook into the repl prompt to flush the dedicated stream, and then output the results? (He says without the foggiest idea how any of this works. :-) )
In any case, I don't have any real problems with *use-dedicated-output-stream*.
Ray