Stream-filter and space leaks
Phil Bewig
(20 Feb 2003 14:08 UTC)
|
Re: Stream-filter and space leaks
Richard Kelsey
(20 Feb 2003 18:41 UTC)
|
Re: Stream-filter and space leaks
Phil Bewig
(21 Feb 2003 09:57 UTC)
|
Re: Stream-filter and space leaks
Richard Kelsey
(21 Feb 2003 23:18 UTC)
|
Re: Stream-filter and space leaks
sperber@xxxxxx
(21 Feb 2003 10:04 UTC)
|
Re: Stream-filter and space leaks
Richard Kelsey
(21 Feb 2003 15:06 UTC)
|
Re: Stream-filter and space leaks
Matthias Neubauer
(25 Feb 2003 16:01 UTC)
|
Re: Stream-filter and space leaks Richard Kelsey (25 Feb 2003 18:25 UTC)
|
Re: Stream-filter and space leaks
Matthias Neubauer
(25 Feb 2003 21:32 UTC)
|
Re: Stream-filter and space leaks
Richard Kelsey
(25 Feb 2003 22:11 UTC)
|
Re: Stream-filter and space leaks
sperber@xxxxxx
(26 Feb 2003 08:18 UTC)
|
Re: Stream-filter and space leaks
Matthias Neubauer
(26 Feb 2003 13:31 UTC)
|
Re: Stream-filter and space leaks
sperber@xxxxxx
(11 Mar 2003 14:58 UTC)
|
Re: Stream-filter and space leaks
Matthias Neubauer
(19 Mar 2003 15:27 UTC)
|
Re: Stream-filter and space leaks
felix
(22 Mar 2003 09:49 UTC)
|
Re: Stream-filter and space leaks
felix
(22 Mar 2003 09:56 UTC)
|
From: Matthias Neubauer <xxxxxx@informatik.uni-freiburg.de> Date: 25 Feb 2003 17:01:34 +0100 I, for my part, downloaded the current reference implementation as found on http://srfi.schemers.org/srfi-40/srfi-40.txt. The only thing that I then changed was that I replaced the former version of STREAM-FILTER by the one Phil posted last Thursday. When I load this into my scsh (0.6.3) and evaluate (stream-car (stream-filter (lambda (x) (zero? x)) (stream-from 1))) the whole thing dies pretty soon ejecting a post-gc interrupt---i.e, scsh seems to run out of memory. For me, using Scheme 48 version 0.57, the current reference implemenation leaks for (stream-car (stream-filter (lambda (x) (zero? x)) (stream-from 1))) Using either or both the new stream-filter or the non-reentrant promises fixes the problem. Our different experiences may be based on differences between the 0.57 and the Scheme 48 version underlying Scsh 0.6.3. I don't know which version that is. The only thing I am not sure about is, if STREAM-UNFOLDN is the right abstraction to transform streams (it looks a little bit too "heavy weight" to me ...). It certainly isn't a polished result. Most of the goofiness comes from wanting to be able to convert N input streams into M output streams. It might be simpler to have three functions that handle N->1, 1->1, and 1->N conversions. Perhaps having all four would be the most useful thing to do. It's a bit hard to tell what your stream-transform is doing. Can you explain it? Or give a type? -Richard Kelsey