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))
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
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.
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/
>
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
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.
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>
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.
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.
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/
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
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
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?)
······@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
"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!)
······@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
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.
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")
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>
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")
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")
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.
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