Re: Stream of random comments continues

1998-12-04 Thread Mikael Rittri
Dave Tweed wrote: > On Fri, 4 Dec 1998, Keith Wansbrough wrote: > > > Surely it would be better to split the one stream into several infinite ones: > > - - - > > Closer inspection reveals this is not a necessarily a the best idea > (particularly if you're going to repeat the trick several times

Re: Stream of random comments continues

1998-12-04 Thread Lennart Augustsson
> There was a paper > published in the JFP about a better way of splitting streams which I think > appeared sometime between January 1996--October 1996. Are you perhaps referring to the paper by me, Mikael Rittri, and Dan Synek called "On generating unique names" (Jan 94). It has a low level tri

Re: Stream of random comments continues

1998-12-04 Thread D. Tweed
On Fri, 4 Dec 1998, Lennart Augustsson wrote: > > > There was a paper > > published in the JFP about a better way of splitting streams which I think > > appeared sometime between January 1996--October 1996. > Are you perhaps referring to the paper by me, Mikael Rittri, and Dan Synek > called "On

Re: Stream of random comments continues

1998-12-04 Thread Sven Panne
Keith Wansbrough wrote: > Surely it would be better to split the one stream into several infinite ones: > > splitStream :: [a] -> ([a],[a]) > > splitStream xs = unzip (spl xs) > where spl (x:y:xs) = (x,y):(spl xs) > > Then you don't have to know how many you are going to use from each s

Re: Stream of random comments continues

1998-12-04 Thread D. Tweed
On Fri, 4 Dec 1998, Keith Wansbrough wrote: > Surely it would be better to split the one stream into several infinite ones: > > splitStream :: [a] -> ([a],[a]) > > splitStream xs = unzip (spl xs) > where spl (x:y:xs) = (x,y):(spl xs) > > Then you don't have to know how many you are goi

Re: Stream of random comments continues

1998-12-04 Thread Ralf Hinze
| The discussion of random numbers in Haskell should perhaps | move elsewhere as it is quite restricted, but it shows one | problem with the functional approach to *practical* programming: | in *my opinion* our fascination by the Monadic Approach to | Universe and Everything, and the possibility

Re: Stream of random comments continues

1998-12-04 Thread Keith Wansbrough
> Lennart advocates the use of streams : > > > let mis = take n (random ss1) > > is = take n (toInt (random ss2)) > > ds = take n (toDouble (random ss3)) > > in ... > > and I agree entirely with him, although the coding details might > be different. Streams are nice and safe.

Stream of random comments continues

1998-12-04 Thread Jerzy Karczmarczuk
The discussion of random numbers in Haskell should perhaps move elsewhere as it is quite restricted, but it shows one problem with the functional approach to *practical* programming: in *my opinion* our fascination by the Monadic Approach to Universe and Everything, and the possibility to program