Functional random data streams Marc Nieper-Wißkirchen (05 May 2020 06:44 UTC)
Re: Functional random data streams Shiro Kawai (05 May 2020 09:10 UTC)
Re: Functional random data streams Shiro Kawai (05 May 2020 09:12 UTC)
Re: Functional random data streams Marc Nieper-Wißkirchen (05 May 2020 09:26 UTC)
Re: Functional random data streams Marc Nieper-Wißkirchen (05 May 2020 09:35 UTC)
Re: Functional random data streams Shiro Kawai (05 May 2020 10:02 UTC)
Re: Functional random data streams Marc Nieper-Wißkirchen (05 May 2020 10:58 UTC)
Re: Functional random data streams John Cowan (05 May 2020 13:29 UTC)
Re: Functional random data streams Marc Nieper-Wißkirchen (05 May 2020 13:47 UTC)
Re: Functional random data streams Shiro Kawai (05 May 2020 19:45 UTC)
Re: Functional random data streams Marc Nieper-Wißkirchen (05 May 2020 20:00 UTC)
Re: Functional random data streams Shiro Kawai (05 May 2020 20:23 UTC)
Re: Functional random data streams Marc Nieper-Wißkirchen (06 May 2020 17:43 UTC)
Re: Functional random data streams John Cowan (06 May 2020 19:32 UTC)
Re: Functional random data streams Marc Nieper-Wißkirchen (06 May 2020 19:39 UTC)
Re: Functional random data streams John Cowan (06 May 2020 21:11 UTC)
Re: Functional random data streams Marc Nieper-Wißkirchen (07 May 2020 06:10 UTC)
Re: Functional random data streams John Cowan (08 May 2020 18:23 UTC)
Re: Functional random data streams Marc Nieper-Wißkirchen (08 May 2020 18:41 UTC)
Re: Functional random data streams Marc Nieper-Wißkirchen (09 May 2020 08:31 UTC)
Re: Functional random data streams John Cowan (11 May 2020 19:30 UTC)
Re: Functional random data streams Marc Nieper-Wißkirchen (11 May 2020 19:48 UTC)
Re: Functional random data streams Marc Nieper-Wißkirchen (20 Aug 2020 09:39 UTC)
Re: Functional random data streams John Cowan (20 Aug 2020 16:00 UTC)
Re: Functional random data streams Marc Nieper-Wißkirchen (20 Aug 2020 18:23 UTC)
Re: Functional random data streams Arthur A. Gleckler (20 Aug 2020 20:18 UTC)
Re: Functional random data streams Marc Nieper-Wißkirchen (20 Aug 2020 20:27 UTC)
Re: Functional random data streams Arthur A. Gleckler (20 Aug 2020 23:08 UTC)
Re: Functional random data streams Marc Nieper-Wißkirchen (21 Aug 2020 07:01 UTC)

Re: Functional random data streams Marc Nieper-Wißkirchen 05 May 2020 09:25 UTC

Am Di., 5. Mai 2020 um 11:10 Uhr schrieb Shiro Kawai <xxxxxx@gmail.com>:
>
> It is relatively easy to derive lazy streams from generators efficiently (each item consumes one procedure call plus one cons, e.g. srfi-127).
> Deriving generators from lazy streams, on the other hand, involves creation of a thunk for every generator call.   So I prefer having generators first, and lazy streams on top of it.

For most Schemes, this sounds like the best way to implement random
data streams and a converter from generators to SRFI 41 streams would
indeed be a very valuable tool. For Schemes that have been optimized
with respect to lazy semantics (I am thinking of a Scheme built on top
of a Haskell core), however, it may be inefficient to create a
generator and then convert it to a stream.

Thus my request to add a second equivalent set of procedures
addressing streams. For the sample implementation, one could build on
the generator interface, of course, as you propose.

Thanks,

Marc

P.S.: While I cannot say much about the particular efficiency in the
Guile implementation, I agree with Mark Weaver's comment from
https://lists.gnu.org/archive/html/guile-devel/2019-07/msg00000.html
that we should promote functional constructs when there aren't reasons
that stand against it (like efficiency reasons). In this sense, we
should take care that the final collection of stream procedures won't
be smaller than the final collection of generator procedures in
R7RS-large.