{"action":"created","issue":{"url":"https://api.github.com/repos/Bijnagte/spock-genesis/issues/16","repository_url":"https://api.github.com/repos/Bijnagte/spock-genesis","labels_url":"https://api.github.com/repos/Bijnagte/spock-genesis/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/Bijnagte/spock-genesis/issues/16/comments","events_url":"https://api.github.com/repos/Bijnagte/spock-genesis/issues/16/events","html_url":"https://github.com/Bijnagte/spock-genesis/issues/16","id":164665729,"number":16,"title":"Add ability to control the seed for random generators","user":{"login":"Bijnagte","id":2717504,"avatar_url":"https://avatars.githubusercontent.com/u/2717504?v=3","gravatar_id":"","url":"https://api.github.com/users/Bijnagte","html_url":"https://github.com/Bijnagte","followers_url":"https://api.github.com/users/Bijnagte/followers","following_url":"https://api.github.com/users/Bijnagte/following{/other_user}","gists_url":"https://api.github.com/users/Bijnagte/gists{/gist_id}","starred_url":"https://api.github.com/users/Bijnagte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bijnagte/subscriptions","organizations_url":"https://api.github.com/users/Bijnagte/orgs","repos_url":"https://api.github.com/users/Bijnagte/repos","events_url":"https://api.github.com/users/Bijnagte/events{/privacy}","received_events_url":"https://api.github.com/users/Bijnagte/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Bijnagte/spock-genesis/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-07-09T12:51:34Z","updated_at":"2016-07-11T06:54:02Z","closed_at":null,"body":"Open questions are if it should be able to be set per feature or just globally. Globally is easier and it could still have new Random instances per generator so multiple tests would not influence the generation. Using per feature / spec / generator could make it more difficult but would allow some to be reproducible. It may also be beneficial to log out the seed so on fully random runs if there was a failure it could be retried."},"comment":{"url":"https://api.github.com/repos/Bijnagte/spock-genesis/issues/comments/231655342","html_url":"https://github.com/Bijnagte/spock-genesis/issues/16#issuecomment-231655342","issue_url":"https://api.github.com/repos/Bijnagte/spock-genesis/issues/16","id":231655342,"user":{"login":"mariogarcia","id":1414131,"avatar_url":"https://avatars.githubusercontent.com/u/1414131?v=3","gravatar_id":"","url":"https://api.github.com/users/mariogarcia","html_url":"https://github.com/mariogarcia","followers_url":"https://api.github.com/users/mariogarcia/followers","following_url":"https://api.github.com/users/mariogarcia/following{/other_user}","gists_url":"https://api.github.com/users/mariogarcia/gists{/gist_id}","starred_url":"https://api.github.com/users/mariogarcia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mariogarcia/subscriptions","organizations_url":"https://api.github.com/users/mariogarcia/orgs","repos_url":"https://api.github.com/users/mariogarcia/repos","events_url":"https://api.github.com/users/mariogarcia/events{/privacy}","received_events_url":"https://api.github.com/users/mariogarcia/received_events","type":"User","site_admin":false},"created_at":"2016-07-11T06:54:02Z","updated_at":"2016-07-11T06:54:02Z","body":"Normally random number implementation in functional languages use a seed to generate the next random number. That way the generation is deterministic. An example in Haskell could be.\r\n\r\n```haskell\r\nnext :: g -> (Int, g)\r\n```\r\n\r\n- Haskell reference: https://hackage.haskell.org/package/random-1.1/docs/System-Random.html\r\n- Here's another reference in Scala: http://stackoverflow.com/questions/31818787/pure-functional-random-number-generator-state-monad\r\n\r\nMeaning that every time you use the same seed you will end up with the same next random number. \r\n\r\nIMO it should be something accessible through the API. If you want to create a reproducible random generator the use a `Gen.getDouble(seed)` if you don't then use the normal `Gen.getDouble()`.\r\n\r\nMy two cents\r\nMario"}}
{"actor":{"display_login":"mariogarcia"}}