<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I’ll try and address the points.<br class=""><br class="">1. I proposed a low cost solution as advocated by Sven and Henrik about 2 years ago, that of using tf-random. This was rejected because apparently better RNGs might exist. Now as we all know there is no such thing as the best RNG. My reasoning for tf-random was that if it were good enough for QuickCheck then it would certainly be good enough for naive users. A case of the best driving out the good? Not that best exists in this case.<br class=""><br class="">2. QuickCheck were bitten very hard!<br class=""><br class="">3. <br class=""><blockquote type="cite" class="">Prelude> import System.Random<br class="">Prelude System.Random> let dieRoll = fst . randomR (1,6) . mkStdGen :: Int -> Int<br class="">Prelude System.Random> map dieRoll [1..20]<br class="">[6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6]<br class=""></blockquote><br class="">4. In addition to the problems adumbrated above, random also has a range<br class=""><blockquote type="cite" class="">Prelude System.Random> newStdGen >>= return . genRange<br class="">(1,2147483562)<br class=""></blockquote><br class="">which makes it fail even testu01’s SmallCrush if used naively.<br class=""><br class="">random *may* work in certain cases but I would strongly advise against using it when there are so many other packages without the above problems. I would also add that for e.g. MCMC it is often very hard to see if something is working or not working because of the Monte Carlo noise; something apparently working does not necessarily validate a particular RNG.<br class=""><br class="">I can’t say I agree with the reasoning that it is better to carry on using something that could be giving incorrect results silently rather than breaking things so that people can take action.<br class=""><br class="">Anyhow as I have already said I feel I have done my bit for the Haskell Community. I agree with Carter that this is out of scope for the Core Libraries Committee. I wish you all luck and will step down from being maintainer.<br class=""><br class=""><blockquote type="cite" class="">On 25 Jan 2017, at 11:26, <a href="mailto:libraries-request@haskell.org" class="">libraries-request@haskell.org</a> wrote:<br class=""><br class="">Send Libraries mailing list submissions to<br class=""><span class="Apple-tab-span" style="white-space: pre;"> </span><a href="mailto:libraries@haskell.org" class="">libraries@haskell.org</a><br class=""><br class="">To subscribe or unsubscribe via the World Wide Web, visit<br class=""><span class="Apple-tab-span" style="white-space: pre;"> </span><a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" class="">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br class="">or, via email, send a message with subject or body 'help' to<br class=""><span class="Apple-tab-span" style="white-space: pre;"> </span><a href="mailto:libraries-request@haskell.org" class="">libraries-request@haskell.org</a><br class=""><br class="">You can reach the person managing the list at<br class=""><span class="Apple-tab-span" style="white-space: pre;"> </span><a href="mailto:libraries-owner@haskell.org" class="">libraries-owner@haskell.org</a><br class=""><br class="">When replying, please edit your Subject line so it is more specific<br class="">than "Re: Contents of Libraries digest..."<br class=""><br class=""><br class="">Today's Topics:<br class=""><br class=""> 1. Re: Selection Monad (Jakub Daniel)<br class=""> 2. Add Zero and One to Data.Functor (mirroring V1, U1)<br class=""> (Baldur Blöndal)<br class=""> 3. Re: Random Number Update (Sven Panne)<br class=""> 4. Re: Random Number Update (Henning Thielemann)<br class=""> 5. Re: Random Number Update (Andreas Abel)<br class=""> 6. Re: Random Number Update (Henrik Nilsson)<br class=""><br class=""><br class="">----------------------------------------------------------------------<br class=""><br class="">Message: 1<br class="">Date: Tue, 24 Jan 2017 17:23:58 +0000<br class="">From: Jakub Daniel <<a href="mailto:jakub.daniel@gmail.com" class="">jakub.daniel@gmail.com</a>><br class="">To: Eric Mertens <<a href="mailto:emertens@gmail.com" class="">emertens@gmail.com</a>><br class="">Cc: <a href="mailto:libraries@haskell.org" class="">libraries@haskell.org</a><br class="">Subject: Re: Selection Monad<br class="">Message-ID:<br class=""><span class="Apple-tab-span" style="white-space: pre;"> </span><<a href="mailto:CACaCNTSj5T0GnGkWgk_VO8vaL4dZYao16QUTCvYMXvsAyUw1oQ@mail.gmail.com" class="">CACaCNTSj5T0GnGkWgk_VO8vaL4dZYao16QUTCvYMXvsAyUw1oQ@mail.gmail.com</a>><br class="">Content-Type: text/plain; charset="utf-8"<br class=""><br class="">Hi Eric,<br class=""><br class="">Just to clarify, my question was not about endorsing another library but<br class="">rather extending the ones currently maintained by the committee with<br class="">definition of a notion closely related to what is already contained in the<br class="">libraries. It just so happens that Edward Kmett implemented the notion in a<br class="">standalone library. However to me it does not make much sense to include<br class="">ContT but not SelT (currently under the name Search) in the core libraries,<br class="">despite their connection. I understand if this does not change the answer<br class="">though.<br class=""><br class="">Best Regards,<br class="">Jakub Daniel<br class=""><br class=""><br class=""><br class="">On Tue, 24 Jan 2017 at 17:39 Eric Mertens <<a href="mailto:emertens@gmail.com" class="">emertens@gmail.com</a>> wrote:<br class=""><br class=""><blockquote type="cite" class="">Hi Jakub,<br class=""><br class="">The core libraries committee helps maintain libraries that are already<br class="">critical to the Haskell ecosystem. It doesn’t select new libraries to be<br class="">recommended to users. It’s possible that the search package is a hidden gem<br class="">that more people need to know about. To accomplish that people will need to<br class="">write software using it, market it with blog posts, and bring it up in<br class="">discussions.<br class=""><br class="">Best Regards,<br class="">Eric Mertens<br class=""><br class="">On Jan 24, 2017, at 5:57 AM, Jakub Daniel <<a href="mailto:jakub.daniel@gmail.com" class="">jakub.daniel@gmail.com</a>> wrote:<br class=""><br class="">Hello,<br class=""><br class="">I apologize in case this is not the right place to bring this<br class="">question/proposal up. Some time ago I stumbled upon the Selection Monad [1]<br class="">(also referred to as Search from the search package on hackage). Its<br class="">relation to the Continuation Monad and the usefulness demonstrated in [1]<br class="">made me wonder whether it would be nice to include Selection Monad in the<br class="">core libraries along the Continuation Monad (in mtl and transformers) with<br class="">all the business of selections attaining continuations. I can imagine the<br class="">pattern to be too little recognised to justify such an addition, yet the<br class="">theoretical connection to the Continuation Monad seems to be an interesting<br class="">one and worth being addressed.<br class=""><br class="">Best,<br class=""><br class="">Jakub Daniel<br class=""><br class="">[1] Jules Hedges. *Monad transformers for backtracking search*. In *Proceedings<br class="">of MSFP 2014. *<a href="https://arxiv.org/abs/1406.2058" class="">https://arxiv.org/abs/1406.2058</a><br class=""><br class="">_______________________________________________<br class="">Libraries mailing list<br class=""><a href="mailto:Libraries@haskell.org" class="">Libraries@haskell.org</a><br class=""><a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" class="">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br class=""><br class=""><br class=""><br class=""></blockquote>-------------- next part --------------<br class="">An HTML attachment was scrubbed...<br class="">URL: <<a href="http://mail.haskell.org/pipermail/libraries/attachments/20170124/630bc9cc/attachment-0001.html" class="">http://mail.haskell.org/pipermail/libraries/attachments/20170124/630bc9cc/attachment-0001.html</a>><br class=""><br class="">------------------------------<br class=""><br class="">Message: 2<br class="">Date: Tue, 24 Jan 2017 19:17:31 +0000<br class="">From: Baldur Blöndal <<a href="mailto:baldurpet@gmail.com" class="">baldurpet@gmail.com</a>><br class="">To: Haskell Libraries <<a href="mailto:libraries@haskell.org" class="">libraries@haskell.org</a>><br class="">Subject: Add Zero and One to Data.Functor (mirroring V1, U1)<br class="">Message-ID:<br class=""><span class="Apple-tab-span" style="white-space: pre;"> </span><<a href="mailto:CAK9DwL8-6GdfPWza_sNpRfi5eQ+KE8H_0Wc0WCfAK9WrHEfv_A@mail.gmail.com" class="">CAK9DwL8-6GdfPWza_sNpRfi5eQ+KE8H_0Wc0WCfAK9WrHEfv_A@mail.gmail.com</a>><br class="">Content-Type: text/plain; charset="utf-8"<br class=""><br class="">Deadline of 2 weeks.<br class=""><br class="">Original discussion: ⁽¹⁾<br class=""><br class="">data Zero a<br class="">data One a = One<br class=""><br class="">Same definitions as in ‘trivia’ package,⁽²⁾<br class="">if a consensus is reached we can update<br class="">the documentation for Free:⁽³⁾<br class=""><br class="">“Free Zero” is isomorphic to Identity.<br class="">“Free One” is isomorphic to Maybe.<br class=""><br class="">⁽¹⁾ <a href="https://ghc.haskell.org/trac/ghc/ticket/13177" class="">https://ghc.haskell.org/trac/ghc/ticket/13177</a><br class="">⁽²⁾ <a href="https://hackage.haskell.org/package/trivia" class="">https://hackage.haskell.org/package/trivia</a><br class="">⁽³⁾<br class=""><a href="https://hackage.haskell.org/package/free-4.12.4/docs/Control-Monad-Free.html" class="">https://hackage.haskell.org/package/free-4.12.4/docs/Control-Monad-Free.html</a><br class="">-------------- next part --------------<br class="">An HTML attachment was scrubbed...<br class="">URL: <<a href="http://mail.haskell.org/pipermail/libraries/attachments/20170124/3945e7ae/attachment-0001.html" class="">http://mail.haskell.org/pipermail/libraries/attachments/20170124/3945e7ae/attachment-0001.html</a>><br class=""><br class="">------------------------------<br class=""><br class="">Message: 3<br class="">Date: Tue, 24 Jan 2017 20:45:04 +0100<br class="">From: Sven Panne <<a href="mailto:svenpanne@gmail.com" class="">svenpanne@gmail.com</a>><br class="">To: Thomas Murphy <<a href="mailto:amindfv@gmail.com" class="">amindfv@gmail.com</a>><br class="">Cc: libraries <<a href="mailto:libraries@haskell.org" class="">libraries@haskell.org</a>>, <a href="mailto:dominic@steinitz.org" class="">dominic@steinitz.org</a><br class="">Subject: Re: Random Number Update<br class="">Message-ID:<br class=""><span class="Apple-tab-span" style="white-space: pre;"> </span><<a href="mailto:CANBN=ms6-tDjJE4x-QbR5DX862xg6cFeMpW-M0PD+mQog=YQHA@mail.gmail.com" class="">CANBN=ms6-tDjJE4x-QbR5DX862xg6cFeMpW-M0PD+mQog=YQHA@mail.gmail.com</a>><br class="">Content-Type: text/plain; charset="utf-8"<br class=""><br class="">2017-01-24 18:33 GMT+01:00 <<a href="mailto:amindfv@gmail.com" class="">amindfv@gmail.com</a>>:<br class=""><br class=""><blockquote type="cite" class="">Carter, can you outline how random v2 compares to v1?<br class=""><br class=""></blockquote><br class="">Whatever will be done, I think it would be good to keep the 'random'<br class="">package alive, probably just by re-exporting one of the better RNGs,<br class="">perhaps with a thin shim to keep the API identical. Yes, this would somehow<br class="">"bless" one of the RNGs, but this is not important: The important thing is<br class="">avoiding breakage in the ecosystem, keeping tutorials, books etc. valid.<br class="">People who know what they are doing can easily pick the right RNG for their<br class="">needs and/or quickly adapt their code, but I guess for lots of stuff having<br class="">just *some* RNG under the traditional package name/module name is more than<br class="">enough.<br class=""><br class="">Just my usual backwards-compatibility-rant... ;-)<br class="">-------------- next part --------------<br class="">An HTML attachment was scrubbed...<br class="">URL: <<a href="http://mail.haskell.org/pipermail/libraries/attachments/20170124/e0d26476/attachment-0001.html" class="">http://mail.haskell.org/pipermail/libraries/attachments/20170124/e0d26476/attachment-0001.html</a>><br class=""><br class="">------------------------------<br class=""><br class="">Message: 4<br class="">Date: Tue, 24 Jan 2017 21:53:48 +0100 (CET)<br class="">From: Henning Thielemann <<a href="mailto:lemming@henning-thielemann.de" class="">lemming@henning-thielemann.de</a>><br class="">To: Dominic Steinitz <<a href="mailto:dominic@steinitz.org" class="">dominic@steinitz.org</a>><br class="">Cc: libraries <<a href="mailto:libraries@haskell.org" class="">libraries@haskell.org</a>><br class="">Subject: Re: Random Number Update<br class="">Message-ID: <alpine.DEB.2.02.1701242144080.7413@sputnik><br class="">Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed<br class=""><br class=""><br class="">On Tue, 24 Jan 2017, Dominic Steinitz wrote:<br class=""><br class=""><blockquote type="cite" class="">2. Most people do *not* use it. I believe<br class=""> <a href="https://hackage.haskell.org/package/mwc-random" class="">https://hackage.haskell.org/package/mwc-random</a> is a popular choice<br class=""> but developers are free to use e.g. Mersenne Twister, PCG<br class=""> (Permuted Congruential Generator), TF (ThreeFish) and many others.<br class=""></blockquote><br class="">I have used the plain old System.Random exclusively for years now and did <br class="">not encounter any problems, but I also did not watch for them. I used <br class="">System.Random for Markov chains, audio noise generation, randomized <br class="">algorithmic music, board game computer opponents etc. I'd like to keep a <br class="">default random generator for the many cases where I don't care about the <br class="">precise algorithm. That said, I got used to some randomized synthesized <br class="">sounds and randomized melodies such that I already noticed changes in the <br class="">random generator implementation.<br class=""><br class=""><br class="">------------------------------<br class=""><br class="">Message: 5<br class="">Date: Wed, 25 Jan 2017 11:43:29 +0100<br class="">From: Andreas Abel <<a href="mailto:abela@chalmers.se" class="">abela@chalmers.se</a>><br class="">To: Henning Thielemann <<a href="mailto:lemming@henning-thielemann.de" class="">lemming@henning-thielemann.de</a>>, Haskell<br class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>Libraries <<a href="mailto:libraries@haskell.org" class="">libraries@haskell.org</a>><br class="">Subject: Re: Random Number Update<br class="">Message-ID: <<a href="mailto:29c97717-2946-6b8d-f458-a495c74e9232@chalmers.se" class="">29c97717-2946-6b8d-f458-a495c74e9232@chalmers.se</a>><br class="">Content-Type: text/plain; charset="utf-8"; format=flowed<br class=""><br class=""><blockquote type="cite" class="">I got used to some randomized synthesized<br class="">sounds and randomized melodies such that I already noticed changes in<br class="">the random generator implementation.<br class=""></blockquote><br class="">Can't be very random, if you can get used to it, no?<br class="">:) [Couldn't resist].<br class=""><br class="">On 24.01.2017 21:53, Henning Thielemann wrote:<br class=""><blockquote type="cite" class=""><br class="">On Tue, 24 Jan 2017, Dominic Steinitz wrote:<br class=""><br class=""><blockquote type="cite" class="">2. Most people do *not* use it. I believe<br class=""> <a href="https://hackage.haskell.org/package/mwc-random" class="">https://hackage.haskell.org/package/mwc-random</a> is a popular choice<br class=""> but developers are free to use e.g. Mersenne Twister, PCG<br class=""> (Permuted Congruential Generator), TF (ThreeFish) and many others.<br class=""></blockquote><br class="">I have used the plain old System.Random exclusively for years now and<br class="">did not encounter any problems, but I also did not watch for them. I<br class="">used System.Random for Markov chains, audio noise generation, randomized<br class="">algorithmic music, board game computer opponents etc. I'd like to keep a<br class="">default random generator for the many cases where I don't care about the<br class="">precise algorithm. That said, I got used to some randomized synthesized<br class="">sounds and randomized melodies such that I already noticed changes in<br class="">the random generator implementation.<br class=""></blockquote>-- <br class="">Andreas Abel <>< Du bist der geliebte Mensch.<br class=""><br class="">Department of Computer Science and Engineering<br class="">Chalmers and Gothenburg University, Sweden<br class=""><br class=""><a href="mailto:andreas.abel@gu.se" class="">andreas.abel@gu.se</a><br class=""><a href="http://www.cse.chalmers.se/~abela/" class="">http://www.cse.chalmers.se/~abela/</a><br class=""><br class=""><br class="">------------------------------<br class=""><br class="">Message: 6<br class="">Date: Wed, 25 Jan 2017 11:44:49 +0000<br class="">From: Henrik Nilsson <<a href="mailto:Henrik.Nilsson@nottingham.ac.uk" class="">Henrik.Nilsson@nottingham.ac.uk</a>><br class="">To: <a href="mailto:libraries@haskell.org" class="">libraries@haskell.org</a><br class="">Subject: Re: Random Number Update<br class="">Message-ID: <<a href="mailto:58888FB1.8090300@exmail.nottingham.ac.uk" class="">58888FB1.8090300@exmail.nottingham.ac.uk</a>><br class="">Content-Type: text/plain; charset=UTF-8; format=flowed<br class=""><br class="">Hi,<br class=""><br class="">On 01/24/2017 07:45 PM, Sven Panne wrote:<br class=""><blockquote type="cite" class="">Whatever will be done, I think it would be good to keep the 'random'<br class="">package alive, probably just by re-exporting one of the better RNGs,<br class="">perhaps with a thin shim to keep the API identical. Yes, this would<br class="">somehow "bless" one of the RNGs, but this is not important: The<br class="">important thing is avoiding breakage in the ecosystem, keeping<br class="">tutorials, books etc. valid. People who know what they are doing can<br class="">easily pick the right RNG for their needs and/or quickly adapt their<br class="">code, but I guess for lots of stuff having just *some* RNG under the<br class="">traditional package name/module name is more than enough.<br class=""></blockquote><br class="">I couldn't agree more.<br class=""><br class="">Good (pseudo) random number generators are very important, and the<br class="">effort people like Dominic and Carter have put in is deeply appreciated.<br class="">Thanks!<br class=""><br class="">However, a simplistic generator is much better than code breakage and<br class="">no generator. Users who don't pose the question about what<br class="">generator is used under the hood are unlikely to be bitten very hard by<br class="">a simplistic one. But they would be bitten hard if there isn't any or if<br class="">the API changes.<br class=""><br class="">I've used the present one for games and the like, and they work OK for<br class="">that. I've also used them in an implementation of Metropolis-Hastings <br class="">(for Bayesian inference) (albeit not that much) and I at<br class="">least broadly got the results I expected.<br class=""><br class="">Best,<br class=""><br class="">/Henrik<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""><br class=""><br class="">This message and any attachment are intended solely for the addressee<br class="">and may contain confidential information. If you have received this<br class="">message in error, please send it back to me, and immediately delete it. <br class=""><br class="">Please do not use, copy or disclose the information contained in this<br class="">message or in any attachment. Any views or opinions expressed by the<br class="">author of this email do not necessarily reflect the views of the<br class="">University of Nottingham.<br class=""><br class="">This message has been checked for viruses but the contents of an<br class="">attachment may still contain software viruses which could damage your<br class="">computer system, you are advised to perform your own checks. Email<br class="">communications with the University of Nottingham may be monitored as<br class="">permitted by UK legislation.<br class=""><br class=""><br class=""><br class="">------------------------------<br class=""><br class="">Subject: Digest Footer<br class=""><br class="">_______________________________________________<br class="">Libraries mailing list<br class=""><a href="mailto:Libraries@haskell.org" class="">Libraries@haskell.org</a><br class=""><a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" class="">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br class=""><br class=""><br class="">------------------------------<br class=""><br class="">End of Libraries Digest, Vol 161, Issue 36<br class="">******************************************</blockquote><div class="">
<div class="">Dominic Steinitz</div><div class=""><a href="mailto:dominic@steinitz.org" class="">dominic@steinitz.org</a></div><div class=""><a href="http://idontgetoutmuch.wordpress.com" class="">http://idontgetoutmuch.wordpress.com</a></div>
</div>
<br class=""></body></html>