From: Jim Newton
Subject: flushing/draining stdout
Date: 
Message-ID: <2tlgruF21jov5U1@uni-berlin.de>
hi, does anyone know how to force stdout to flush?

The following expression does not print anything to
the terminal until after 10 seconds at which time
it prints everything.

(loop for i from 1 to 10
     do
     (sleep 1)
     (format t "hello my value is ~D " i))

From: David Sletten
Subject: Re: flushing/draining stdout
Date: 
Message-ID: <zdgdd.10789$hN1.1429@twister.socal.rr.com>
Jim Newton wrote:

> hi, does anyone know how to force stdout to flush?
> 
> The following expression does not print anything to
> the terminal until after 10 seconds at which time
> it prints everything.
> 
> (loop for i from 1 to 10
>     do
>     (sleep 1)
>     (format t "hello my value is ~D " i))
> 
(loop for i from 1 to 10
     do
     (sleep 1)
     (format t "hello my value is ~D " i) (force-output))

As Edi pointed out recently:
http://www.lispworks.com/reference/HyperSpec/Front/X_Symbol.htm
has a permuted symbol index which would enable you to check for entries 
with either 'force' or 'output' yielding:
http://www.lispworks.com/reference/HyperSpec/Body/f_finish.htm#force-output

David Sletten
From: Arthur Lemmens
Subject: Re: flushing/draining stdout
Date: 
Message-ID: <opsf41cid7k6vmsw@news.xs4all.nl>
Jim Newton wrote:

> hi, does anyone know how to force stdout to flush?

See FORCE-OUTPUT and FINISH-OUTPUT in the Hyperspec.

Arthur
From: Pascal Bourguignon
Subject: Re: flushing/draining stdout
Date: 
Message-ID: <87wtxm1hki.fsf@thalassa.informatimago.com>
Jim Newton <·····@rdrop.com> writes:

> hi, does anyone know how to force stdout to flush?
> 
> The following expression does not print anything to
> the terminal until after 10 seconds at which time
> it prints everything.
> 
> (loop for i from 1 to 10
>      do
>      (sleep 1)
>      (format t "hello my value is ~D " i))

You have the right to search the fine web, and to read CLHS.
http://www.lispworks.com/reference/HyperSpec/

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

Voting Democrat or Republican is like choosing a cabin in the Titanic.
From: Jim Newton
Subject: Re: flushing/draining stdout
Date: 
Message-ID: <2tlijlF213pi0U1@uni-berlin.de>
how would i find that in the hyperspec without knowing
the function name?  i was looking for drain and flush,
but as someone pointed out i should have been looking for
force-output or finish-output.

thanks



Pascal Bourguignon wrote:
> Jim Newton <·····@rdrop.com> writes:
> 
> 
>>hi, does anyone know how to force stdout to flush?
>>
>>The following expression does not print anything to
>>the terminal until after 10 seconds at which time
>>it prints everything.
>>
>>(loop for i from 1 to 10
>>     do
>>     (sleep 1)
>>     (format t "hello my value is ~D " i))
> 
> 
> You have the right to search the fine web, and to read CLHS.
> http://www.lispworks.com/reference/HyperSpec/
> 
From: Paul F. Dietz
Subject: Re: flushing/draining stdout
Date: 
Message-ID: <uNednbgATfI6A-jcRVn-qg@dls.net>
Jim Newton wrote:

> how would i find that in the hyperspec without knowing
> the function name?

Read the whole thing.

Hey, it works for me.

	Paul
From: Kenny Tilton
Subject: Re: flushing/draining stdout
Date: 
Message-ID: <RBhdd.31269$4C.6484880@twister.nyc.rr.com>
Paul F. Dietz wrote:

> Jim Newton wrote:
> 
>> how would i find that in the hyperspec without knowing
>> the function name?
> 
> 
> Read the whole thing.
> 
> Hey, it works for me.

No wonder you have no time to pitch in on Cello.

Hey, isn't anyone going to tell the poor guy about apropos? He knew he 
was trying to "force stdout to flush". That C-centrism is unfortunate, 
but...

CELLO(1): (apropos 'force)
ASDF::FORCE-P
ASDF::FORCE
ASDF::FORCED
ASDF::OPERATION-FORCED [generic-function] (OPERATION)
FORCE
FORCE-OUTPUT        [function] (&OPTIONAL STREAM)
COMP::FORCE
COMP::.FORCED-DOC-FORMS. value: NIL
COMP::FORCE-FRAME-CONSTRAINT [function] (TREG CONSTR)
COMP::FORCE-COMPILE
DEFSYS::.FORCE-DEPENDENT-RECOMPILE.
DEFSYS::FORCE-DEPENDENT-RECOMPILE [generic-function] (MODULE)
DEFSYS::FORCE-LOAD  [generic-function] (MODULE)
DEVEL::FORCE-WHEN-EQ
EXCL::STM-FILE-FORCE-OUTPUT [function] (STREAM)
EXCL::UNFORCE-DOCUMENTATION-STORE [macro] ()
EXCL::FORCE-CACHE-FLUSHES [function] (CLASS)
EXCL::FORCE-SOME-OUTPUT [function] (XP)
EXCL::*FORCED-READTABLE-CASE-RAW* value: NIL
EXCL::*FORCE-STORE-DOCUMENTATION* value: NIL
EXCL::STM-SC-FORCE-OUTPUT [function] (STREAM WAIT)
EXCL::STM-DC-FORCE-OUTPUT [function] (STREAM WAIT)
EXCL::STREAM-FLAG-IS-BEING-FORCED-OUT value: 512
EXCL::FORCE-DOCUMENTATION-STORE [macro] ()
EXCL::S-FORCE-SOME-OUTPUT [function] (XP)
EXCL::FORCE-NEWLINES?
EXCL::STREAM-INTERACTIVE-FORCE-OUTPUT [generic-function] (STREAM)
EXCL::*FORCE-QUIET-EXIT* value: NIL
EXCL::INTERACTIVE-FORCE-OUTPUT [function] (&OPTIONAL STREAM)
EXCL::FORCE
EXCL:STREAM-FORCE-OUTPUT [generic-function] (STREAM)
EXCL.OSI::FORCE
SCM::FORCE
:FORCE-WHEN-EQ      value: :FORCE-WHEN-EQ
:FORCE              value: :FORCE
:FORCE-COMPILE      value: :FORCE-COMPILE
:FORCE-DEPENDENT-RECOMPILE value: :FORCE-DEPENDENT-RECOMPILE
:FORCE-LOAD         value: :FORCE-LOAD
SYS::FORCE
TPL::FORCEP
UFFI::FORCE-LOAD
WIN:TCS_FORCEICONLEFT value: 16
WIN:HELP_FORCEFILE  value: 9
WIN:CF_FORCEFONTEXIST value: 65536
WIN:TCS_FORCELABELLEFT value: 32

kt



-- 
Cells? Cello? Celtik?: http://www.common-lisp.net/project/cells/
Why Lisp? http://alu.cliki.net/RtL%20Highlight%20Film
From: Jim Newton
Subject: Re: flushing/draining stdout
Date: 
Message-ID: <2tmebeF1vur3lU1@uni-berlin.de>
does anyone know of a search engine for the hyperspec?
yes i know there is a table-of-contents, master-index, and
a symbol-index, but a search facility would be nice.


Kenny Tilton wrote:
> 
> 
> Paul F. Dietz wrote:
> 
>> Jim Newton wrote:
>>
>>> how would i find that in the hyperspec without knowing
>>> the function name?
>>
>>
>>
>> Read the whole thing.
>>
>> Hey, it works for me.
> 
> 
> No wonder you have no time to pitch in on Cello.
> 
> Hey, isn't anyone going to tell the poor guy about apropos? He knew he 
> was trying to "force stdout to flush". That C-centrism is unfortunate, 
> but...
> 
> CELLO(1): (apropos 'force)
> ASDF::FORCE-P
> ASDF::FORCE
> ASDF::FORCED
> ASDF::OPERATION-FORCED [generic-function] (OPERATION)
> FORCE
> FORCE-OUTPUT        [function] (&OPTIONAL STREAM)
> COMP::FORCE
> COMP::.FORCED-DOC-FORMS. value: NIL
> COMP::FORCE-FRAME-CONSTRAINT [function] (TREG CONSTR)
> COMP::FORCE-COMPILE
> DEFSYS::.FORCE-DEPENDENT-RECOMPILE.
> DEFSYS::FORCE-DEPENDENT-RECOMPILE [generic-function] (MODULE)
> DEFSYS::FORCE-LOAD  [generic-function] (MODULE)
> DEVEL::FORCE-WHEN-EQ
> EXCL::STM-FILE-FORCE-OUTPUT [function] (STREAM)
> EXCL::UNFORCE-DOCUMENTATION-STORE [macro] ()
> EXCL::FORCE-CACHE-FLUSHES [function] (CLASS)
> EXCL::FORCE-SOME-OUTPUT [function] (XP)
> EXCL::*FORCED-READTABLE-CASE-RAW* value: NIL
> EXCL::*FORCE-STORE-DOCUMENTATION* value: NIL
> EXCL::STM-SC-FORCE-OUTPUT [function] (STREAM WAIT)
> EXCL::STM-DC-FORCE-OUTPUT [function] (STREAM WAIT)
> EXCL::STREAM-FLAG-IS-BEING-FORCED-OUT value: 512
> EXCL::FORCE-DOCUMENTATION-STORE [macro] ()
> EXCL::S-FORCE-SOME-OUTPUT [function] (XP)
> EXCL::FORCE-NEWLINES?
> EXCL::STREAM-INTERACTIVE-FORCE-OUTPUT [generic-function] (STREAM)
> EXCL::*FORCE-QUIET-EXIT* value: NIL
> EXCL::INTERACTIVE-FORCE-OUTPUT [function] (&OPTIONAL STREAM)
> EXCL::FORCE
> EXCL:STREAM-FORCE-OUTPUT [generic-function] (STREAM)
> EXCL.OSI::FORCE
> SCM::FORCE
> :FORCE-WHEN-EQ      value: :FORCE-WHEN-EQ
> :FORCE              value: :FORCE
> :FORCE-COMPILE      value: :FORCE-COMPILE
> :FORCE-DEPENDENT-RECOMPILE value: :FORCE-DEPENDENT-RECOMPILE
> :FORCE-LOAD         value: :FORCE-LOAD
> SYS::FORCE
> TPL::FORCEP
> UFFI::FORCE-LOAD
> WIN:TCS_FORCEICONLEFT value: 16
> WIN:HELP_FORCEFILE  value: 9
> WIN:CF_FORCEFONTEXIST value: 65536
> WIN:TCS_FORCELABELLEFT value: 32
> 
> kt
> 
> 
> 
From: Matthew Danish
Subject: Re: flushing/draining stdout
Date: 
Message-ID: <87u0spx5zf.fsf@mapcar.org>
Jim Newton <·····@rdrop.com> writes:
> does anyone know of a search engine for the hyperspec?

Google?  (apropos "FOO" 'cl)? (especially in SLIME).  The permuted index?

-- 
;; Matthew Danish -- user: mrd domain: cmu.edu
;; OpenPGP public key: C24B6010 on keyring.debian.org
From: Edi Weitz
Subject: Re: flushing/draining stdout
Date: 
Message-ID: <uekjtx5i4.fsf@agharta.de>
On Wed, 20 Oct 2004 07:19:46 +0200, Jim Newton <·····@rdrop.com> wrote:

> does anyone know of a search engine for the hyperspec?  yes i know
> there is a table-of-contents, master-index, and a symbol-index, but
> a search facility would be nice.

  <http://www.franz.com/search/>

Edi.
From: Alain Picard
Subject: Re: flushing/draining stdout
Date: 
Message-ID: <87vfd5r9o4.fsf@memetrics.com>
Edi Weitz <········@agharta.de> writes:

> On Wed, 20 Oct 2004 07:19:46 +0200, Jim Newton <·····@rdrop.com> wrote:
>
>> does anyone know of a search engine for the hyperspec?  yes i know
>> there is a table-of-contents, master-index, and a symbol-index, but
>> a search facility would be nice.
>
>   <http://www.franz.com/search/>

Hey! That's not half bad!  I searched for "flush output"
(trying to put myself in the mental mindset of the OP), and
the very first hit was:

  Streams in Allegro CL****
      ... -streams 5.2.2 The endian-swap keyword argument to read-vector
      and write-vector 5.3 Force-output and finish-output policy 6.0
      Higher Level functions 7.0 Simple-stream Class Hierarchy 8.0
      Implementation Strategies 9.0 Control-character Processing 10 ...

      http://www.franz.com/support/documentation/6.2/doc/streams.htm
      07/02/03, 164752 bytes

Both mentioning the required functions.

-- 
It would be difficult to construe        Larry Wall, in  article
this as a feature.			 <·····················@netlabs.com>
From: Jim Newton
Subject: Re: flushing/draining stdout
Date: 
Message-ID: <2tnu73F20hr2bU1@uni-berlin.de>
this search engine is great, but a bit slow :-(
I notice that it does not really search the
hyperspec.

By the way, what is the relation to the Ansi Spec
on www.franz.com and the hyper-spec?  Is it
the same information but slightly different format?
Or is one an older version than the other?
or what.

=jim

Edi Weitz wrote:
> On Wed, 20 Oct 2004 07:19:46 +0200, Jim Newton <·····@rdrop.com> wrote:
> 
> 
>>does anyone know of a search engine for the hyperspec?  yes i know
>>there is a table-of-contents, master-index, and a symbol-index, but
>>a search facility would be nice.
> 
> 
>   <http://www.franz.com/search/>
> 
> Edi.
From: Pascal Bourguignon
Subject: Re: flushing/draining stdout
Date: 
Message-ID: <87pt3d1no7.fsf@thalassa.informatimago.com>
Jim Newton <·····@rdrop.com> writes:

> does anyone know of a search engine for the hyperspec?
> yes i know there is a table-of-contents, master-index, and
> a symbol-index, but a search facility would be nice.


1- http://www.google.com/advanced_search?hl=en
   Fill the fields:
   Domain [Only] return results from the site or domain: www.lispworks.com


2- Get a local copy.
   find "${YOUR_LOCAL_COPY}" -exec grep -n "${YOUR_REGEXP}" {} /dev/null \;




-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

Voting Democrat or Republican is like choosing a cabin in the Titanic.
From: Lars Brinkhoff
Subject: Re: flushing/draining stdout
Date: 
Message-ID: <85brexb6m3.fsf@junk.nocrew.org>
Pascal Bourguignon <····@mouse-potato.com> writes:
> Jim Newton <·····@rdrop.com> writes:
> > does anyone know of a search engine for the hyperspec?
> 1- http://www.google.com/advanced_search?hl=en
>    Fill the fields:
>    Domain [Only] return results from the site or domain: www.lispworks.com

The domain clhs.lisp.se has the CLHS, the whole CLHS, and nothing but CLHS.

-- 
Lars Brinkhoff,         Services for Unix, Linux, GCC, HTTP
Brinkhoff Consulting    http://www.brinkhoff.se/
From: Arnaud Diederen
Subject: Re: flushing/draining stdout
Date: 
Message-ID: <pan.2004.10.20.20.17.01.508846@swing.be>
On Wed, 20 Oct 2004 07:19:46 +0200, Jim Newton wrote:

> does anyone know of a search engine for the hyperspec? yes i know there is
> a table-of-contents, master-index, and a symbol-index, but a search
> facility would be nice.
> 
> 

For those who use Mozilla/firefox, you can use Andreas Fuchs & Zach
Beane's plugin:

http://www.xach.com/lisp/clhs-search/

Enjoy :)




"The key to performance is elegance, not battalions of special cases."
   -- Jon Bentley and Doug McIlroy
From: Zach Beane
Subject: Re: flushing/draining stdout
Date: 
Message-ID: <m3acuhxh01.fsf@unnamed.xach.com>
Arnaud Diederen <······@swing.be> writes:

> On Wed, 20 Oct 2004 07:19:46 +0200, Jim Newton wrote:
>
>> does anyone know of a search engine for the hyperspec? yes i know there is
>> a table-of-contents, master-index, and a symbol-index, but a search
>> facility would be nice.
>> 
>> 
>
> For those who use Mozilla/firefox, you can use Andreas Fuchs & Zach
> Beane's plugin:
>
> http://www.xach.com/lisp/clhs-search/
>
> Enjoy :)

Thanks for the plug. Unfortunately, the page is slightly misnamed; the
plugin doesn't search the CLHS, it looks up known symbols. This is
still very useful, but isn't what the OP is asking about.

Zach
From: Christopher C. Stacy
Subject: Re: flushing/draining stdout
Date: 
Message-ID: <upt3blcgr.fsf@news.dtpq.com>
Zach Beane <····@xach.com> writes:

> Arnaud Diederen <······@swing.be> writes:
> 
> > http://www.xach.com/lisp/clhs-search/

> the plugin doesn't search the CLHS, it looks up known symbols

This plugin is cool.  Is there a way in Firefox 1.0PR to add a second
a second search box to the toolbars?  (For example, so I could have
one that I set to use Yahoo, and one set to use your hack?)
From: Steven E. Harris
Subject: Re: flushing/draining stdout
Date: 
Message-ID: <83d5zbqx0r.fsf@torus.sehlabs.com>
······@news.dtpq.com (Christopher C. Stacy) writes:

> Is there a way in Firefox 1.0PR to add a second a second search box
> to the toolbars?  (For example, so I could have one that I set to
> use Yahoo, and one set to use your hack?)

You can use C-Up and C-down to cycle through all the search
plugins. That is, you'd hit something like C-k C-up to get to the CLHS
search field, if the CLHS plugin wasn't already selected.

Alternately, set up a Quick Search bookmark with a keyword like
"cl". You could then just hit Alt-d, type "cl ", and your query
term. Unlike the search plugin, I don't think Firefox will do any
special interpretation of the search results.

-- 
Steven E. Harris
From: Christopher C. Stacy
Subject: Re: flushing/draining stdout
Date: 
Message-ID: <umzyfs9ij.fsf@news.dtpq.com>
"Steven E. Harris" <···@torus.sehlabs.com> writes:

> ······@news.dtpq.com (Christopher C. Stacy) writes:
> 
> > Is there a way in Firefox 1.0PR to add a second a second search box
> > to the toolbars?  (For example, so I could have one that I set to
> > use Yahoo, and one set to use your hack?)
> 
> You can use C-Up and C-down to cycle through all the search
> plugins. That is, you'd hit something like C-k C-up to get to the CLHS
> search field, if the CLHS plugin wasn't already selected.

I was hoping I could have a CLHS box  sitting there all the time,
and still have my Yahoo box there, too.

(Thanks!)
From: Zach Beane
Subject: Re: flushing/draining stdout
Date: 
Message-ID: <m33c06yl5u.fsf@unnamed.xach.com>
······@news.dtpq.com (Christopher C. Stacy) writes:

> Zach Beane <····@xach.com> writes:
>
>> Arnaud Diederen <······@swing.be> writes:
>> 
>> > http://www.xach.com/lisp/clhs-search/
>
>> the plugin doesn't search the CLHS, it looks up known symbols
>
> This plugin is cool.  Is there a way in Firefox 1.0PR to add a second
> a second search box to the toolbars?  (For example, so I could have
> one that I set to use Yahoo, and one set to use your hack?)

Dunno. I never use the search box, ever; I have a smart bookmark that
translates "clhs foo" in the location bar to
"http://www.xach.com/clhs?q=foo". "C-l clhs foo RET" and I'm there.

I have similar shortcuts that go from "g" => google, "gg" => google
groups, "m" => IMDb, "clx" => CLX docs, etc.

Zach
From: Xavier Maillard
Subject: Re: flushing/draining stdout
Date: 
Message-ID: <plop87oeiuifqz.fsf@gnu-rox.org>
On 22 oct 2004, Zach Beane wrote:

> ······@news.dtpq.com (Christopher C. Stacy) writes:
> 
> > Zach Beane <····@xach.com> writes:
> > 
> > > Arnaud Diederen <······@swing.be> writes:
> > > 
> > > > http://www.xach.com/lisp/clhs-search/
> > 
> > > the plugin doesn't search the CLHS, it looks up known
> > > symbols
> > 
> > This plugin is cool. Is there a way in Firefox 1.0PR to add a
> > second a second search box to the toolbars? (For example, so
> > I could have one that I set to use Yahoo, and one set to use
> > your hack?)
> 
> Dunno. I never use the search box, ever; I have a smart
> bookmark that translates "clhs foo" in the location bar to
> "http://www.xach.com/clhs?q=foo". "C-l clhs foo RET" and I'm
> there.
> 
> I have similar shortcuts that go from "g" => google, "gg" =>
> google groups, "m" => IMDb, "clx" => CLX docs, etc.

Yeah this definetely the way I go too. I have some other good
examples taken here and there and I really find this approach
quicker and simpler. What's more I gain space on my windows
navigator :/

-- 
Registered Linux-User #340967 with the Linux Counter, http://counter.li.org.
From: Edi Weitz
Subject: Re: flushing/draining stdout
Date: 
Message-ID: <uacuhx5ad.fsf@agharta.de>
On Tue, 19 Oct 2004 23:40:33 GMT, Kenny Tilton <·······@nyc.rr.com> wrote:

> Hey, isn't anyone going to tell the poor guy about apropos?

Or (shameless self-plug) regex-apropos:

  <http://weitz.de/cl-ppcre/#regex-apropos>

Edi.

-- 

Lisp is not dead, it just smells funny.

Real email: (replace (subseq ·········@agharta.de" 5) "edi")
From: Alain Picard
Subject: Re: flushing/draining stdout
Date: 
Message-ID: <87r7ntr9lr.fsf@memetrics.com>
Edi Weitz <········@agharta.de> writes:

> On Tue, 19 Oct 2004 23:40:33 GMT, Kenny Tilton <·······@nyc.rr.com> wrote:
>
>> Hey, isn't anyone going to tell the poor guy about apropos?
>
> Or (shameless self-plug) regex-apropos:
>
>   <http://weitz.de/cl-ppcre/#regex-apropos>
>

Whoa.  Sounds like a candidate for a SLIME keybinding.  :-)

-- 
It would be difficult to construe        Larry Wall, in  article
this as a feature.			 <·····················@netlabs.com>
From: Edi Weitz
Subject: Re: flushing/draining stdout
Date: 
Message-ID: <u4qkp66fs.fsf@agharta.de>
On Wed, 20 Oct 2004 20:02:08 +1000, Alain Picard <············@memetrics.com> wrote:

> Edi Weitz <········@agharta.de> writes:
>
>> Or (shameless self-plug) regex-apropos:
>>
>>   <http://weitz.de/cl-ppcre/#regex-apropos>
>>
>
> Whoa.  Sounds like a candidate for a SLIME keybinding.  :-)

  C-c C-d C-a   (slime-apropos)

Here's an excerpt from the SLIME Changelog:

2004-04-21  Edi Weitz <···@agharta.de>

	* slime.el (slime-apropos): Add support for regexp-based apropos.
	We use nregex, so the regexp syntax is different from Emacs'
	regexps and bit restricted (alternation '|' and optional groups
	'(xy)?' are not implemented).
 	(slime-insert-arglist): New command - stolen from ILISP. I always
	thought this was quite useful. 
	(slime-oos): Fix typo.

	* swank.lisp (apropos-symbols): Use regexp and support
	case-sensitive matching.
	(arglist-for-echo-area): New argument to control if the operator
	name should be included.

	* nregex.lisp: New file.

:)

Cheers,
Edi.

-- 

Lisp is not dead, it just smells funny.

Real email: (replace (subseq ·········@agharta.de" 5) "edi")
From: Edi Weitz
Subject: Re: flushing/draining stdout
Date: 
Message-ID: <ubreygwn5.fsf@agharta.de>
On Tue, 19 Oct 2004 23:26:19 +0200, Jim Newton <·····@rdrop.com> wrote:

> how would i find that in the hyperspec without knowing the function
> name?  i was looking for drain and flush, but as someone pointed out
> i should have been looking for force-output or finish-output.

One way to find these functions is to look at the permuted symbol
index. This'll help if you're looking for a constituent word like
"output." If that doesn't help then you might want to look at the
related "dictionary" page - in your case 21.2. It still lists a lot of
functions but probably the list is small enough to scan it for
something that sounds right. If that still doesn't help ask on c.l.l
and ignore the smart asses... :)

Cheers,
Edi.

-- 

Lisp is not dead, it just smells funny.

Real email: (replace (subseq ·········@agharta.de" 5) "edi")
From: Mario S. Mommer
Subject: Re: flushing/draining stdout
Date: 
Message-ID: <fzlle1wggf.fsf@germany.igpm.rwth-aachen.de>
Jim Newton <·····@rdrop.com> writes:
> hi, does anyone know how to force stdout to flush?
>
> The following expression does not print anything to
> the terminal until after 10 seconds at which time
> it prints everything.
>
> (loop for i from 1 to 10
>      do
>      (sleep 1)
>      (format t "hello my value is ~D " i))

Are you using SLIME?

There is a simple change to the sources that will disable buffering
for the interaction with lisp. The first thing I do when I download a
new blob of slime is to disable buffering so that the above works the
way it should work in an interaction with the user. Please let me know
if you are interested.
From: Duane Rettig
Subject: Re: flushing/draining stdout
Date: 
Message-ID: <47jplmhlj.fsf@franz.com>
Mario S. Mommer <········@yahoo.com> writes:

> Jim Newton <·····@rdrop.com> writes:
> > hi, does anyone know how to force stdout to flush?
> >
> > The following expression does not print anything to
> > the terminal until after 10 seconds at which time
> > it prints everything.
> >
> > (loop for i from 1 to 10
> >      do
> >      (sleep 1)
> >      (format t "hello my value is ~D " i))
> 
> Are you using SLIME?
> 
> There is a simple change to the sources that will disable buffering
> for the interaction with lisp. The first thing I do when I download a
> new blob of slime is to disable buffering so that the above works the
> way it should work in an interaction with the user. Please let me know
> if you are interested.

Perhaps a better approach would be to mark the interaction stream as
interactive, thus more fully emulating the behavior of *terminal-io*
without having to disable buffering.

-- 
Duane Rettig    ·····@franz.com    Franz Inc.  http://www.franz.com/
555 12th St., Suite 1450               http://www.555citycenter.com/
Oakland, Ca. 94607        Phone: (510) 452-2000; Fax: (510) 452-0182