This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: conservative scanning and infinite streams
- To: Jim Blandy <jimb at red-bean dot com>
- Subject: Re: conservative scanning and infinite streams
- From: Michael Livshin <mlivshin at bigfoot dot com>
- Date: 25 Mar 2000 10:33:40 +0200
- Cc: Ole Myren Rohne <ole dot rohne at cern dot ch>, guile at sourceware dot cygnus dot com
- Organization: who? me?
- References: <14555.39096.640307.723245@pcedu1.cern.ch> <m34s9wmfvg.fsf@savonarola.red-bean.com>
Jim Blandy <jimb@red-bean.com> writes:
> > I'd like to use very long streams, but it a steady growing heap makes
> > this impractical.
> >
> > Do I have any option but rewriting my streams in loop style?
>
> Are you *sure* the "garbage" is really garbage? It looks to me like
> stream-fold, used by stream-for-each, is written (probably
> accidentally) so that it holds onto the initial stream until it
> returns.
that's right, `stream-fold' is written too generically to work well
with Guile (a most rudimantary compiler life-time analysis would see
that the `stream' argument isn't needed, *sigh*). I'll check in a
better version when I have a better connection.
> Have you tried rewriting your code without using stream-for-each?
now that, surprisingly, doesn't help at all. some digging in
evaluator is called for, it seems...
--
There are few personal problems which can't be solved by the suitable
application of high explosives.