{"action":"created","issue":{"url":"https://api.github.com/repos/mgold/elm-random-pcg/issues/3","repository_url":"https://api.github.com/repos/mgold/elm-random-pcg","labels_url":"https://api.github.com/repos/mgold/elm-random-pcg/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/mgold/elm-random-pcg/issues/3/comments","events_url":"https://api.github.com/repos/mgold/elm-random-pcg/issues/3/events","html_url":"https://github.com/mgold/elm-random-pcg/issues/3","id":157364355,"number":3,"title":"RFC: support generate in a less-than-ideal way?","user":{"login":"mgold","id":1191970,"avatar_url":"https://avatars.githubusercontent.com/u/1191970?v=3","gravatar_id":"","url":"https://api.github.com/users/mgold","html_url":"https://github.com/mgold","followers_url":"https://api.github.com/users/mgold/followers","following_url":"https://api.github.com/users/mgold/following{/other_user}","gists_url":"https://api.github.com/users/mgold/gists{/gist_id}","starred_url":"https://api.github.com/users/mgold/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgold/subscriptions","organizations_url":"https://api.github.com/users/mgold/orgs","repos_url":"https://api.github.com/users/mgold/repos","events_url":"https://api.github.com/users/mgold/events{/privacy}","received_events_url":"https://api.github.com/users/mgold/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mgold/elm-random-pcg/labels/feedback%20wanted","name":"feedback wanted","color":"c2e0c6"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-29T01:26:46Z","updated_at":"2016-06-09T02:30:33Z","closed_at":null,"body":"Because of restrictions on effects modules, 2.0.0 does not include `generate : (a -> msg) -> Generator a -> Cmd msg`. For core, the seed is initialized to the current time (which isn't great, and is worse for core's RNG, but it's not awful for PNG). Then the runtime maintains the current seed. But [without permission](https://github.com/elm-lang/package.elm-lang.org/issues/168), I can't do the same. Instead I'd have to [generate 64 bits from core's RNG, use them to initialize a seed,](https://github.com/mgold/elm-random-pcg/commit/772e24bf35391b93370f989abac946608ca1998e) and then throw that seed away once the generator has been run on it. Between using an inferior RNG for seeding and calling `initialSeed2` many times, the statistical robustness of psuedo-random values will be compromised (though I'd love test data as to by how much).\r\n\r\nThat said, the API goal for this library has always been \"drop in replacement for core\". That is, take any valid Elm program using core's Random module, replace `import Random` with `import Random.Pcg as Random`, and the program still compiles and generates random values.\r\n\r\n**I am seeking feedback from users of the library** as to whether you prefer the complete API or not compromising on statistical robustness."},"comment":{"url":"https://api.github.com/repos/mgold/elm-random-pcg/issues/comments/224785653","html_url":"https://github.com/mgold/elm-random-pcg/issues/3#issuecomment-224785653","issue_url":"https://api.github.com/repos/mgold/elm-random-pcg/issues/3","id":224785653,"user":{"login":"nphollon","id":1874895,"avatar_url":"https://avatars.githubusercontent.com/u/1874895?v=3","gravatar_id":"","url":"https://api.github.com/users/nphollon","html_url":"https://github.com/nphollon","followers_url":"https://api.github.com/users/nphollon/followers","following_url":"https://api.github.com/users/nphollon/following{/other_user}","gists_url":"https://api.github.com/users/nphollon/gists{/gist_id}","starred_url":"https://api.github.com/users/nphollon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nphollon/subscriptions","organizations_url":"https://api.github.com/users/nphollon/orgs","repos_url":"https://api.github.com/users/nphollon/repos","events_url":"https://api.github.com/users/nphollon/events{/privacy}","received_events_url":"https://api.github.com/users/nphollon/received_events","type":"User","site_admin":false},"created_at":"2016-06-09T02:30:33Z","updated_at":"2016-06-09T02:30:33Z","body":"Would expanding the API compromise the performance of the existing library?\r\n\r\nI think it would be great to offer a replacement `generate` as long as users can continue to use `next` if they need better randomness. The documentation would just need to make it clear that if you want the most robust output, you can't use `generate`.\r\n"}}
{"actor":{"display_login":"nphollon"}}