{"action":"closed","issue":{"url":"https://api.github.com/repos/libmir/mir-random/issues/114","repository_url":"https://api.github.com/repos/libmir/mir-random","labels_url":"https://api.github.com/repos/libmir/mir-random/issues/114/labels{/name}","comments_url":"https://api.github.com/repos/libmir/mir-random/issues/114/comments","events_url":"https://api.github.com/repos/libmir/mir-random/issues/114/events","html_url":"https://github.com/libmir/mir-random/issues/114","id":393943589,"node_id":"MDU6SXNzdWUzOTM5NDM1ODk=","number":114,"title":"opCall template issues when using NormalVariable","user":{"login":"SaurabhTotey","id":22577113,"node_id":"MDQ6VXNlcjIyNTc3MTEz","avatar_url":"https://avatars3.githubusercontent.com/u/22577113?v=4","gravatar_id":"","url":"https://api.github.com/users/SaurabhTotey","html_url":"https://github.com/SaurabhTotey","followers_url":"https://api.github.com/users/SaurabhTotey/followers","following_url":"https://api.github.com/users/SaurabhTotey/following{/other_user}","gists_url":"https://api.github.com/users/SaurabhTotey/gists{/gist_id}","starred_url":"https://api.github.com/users/SaurabhTotey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SaurabhTotey/subscriptions","organizations_url":"https://api.github.com/users/SaurabhTotey/orgs","repos_url":"https://api.github.com/users/SaurabhTotey/repos","events_url":"https://api.github.com/users/SaurabhTotey/events{/privacy}","received_events_url":"https://api.github.com/users/SaurabhTotey/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-12-25T01:20:47Z","updated_at":"2018-12-25T03:51:06Z","closed_at":"2018-12-25T03:51:05Z","author_association":"NONE","body":"Hello, I was attempting to use normalVar when I ran into issues with the code not compiling. \r\n```\r\ntemplate mir.random.variable.NormalVariable!double.NormalVariable.opCall cannot deduce function from argument types !()(MersenneTwisterEngine!(uint, 32LU, 624LU, 397LU, 31LU, 2567483615u, 11LU, 4294967295u, 7LU, 2636928640u, 15LU, 4022730752u, 18LU, 1812433253u)*), candidates are:\r\n../../../.dub/packages/mir-random-2.1.5/mir-random/source/mir/random/variable.d(912,7):        mir.random.variable.NormalVariable!double.NormalVariable.opCall(G)(ref scope G gen) if (isSaturatedRandomEngine!G)\r\n../../../.dub/packages/mir-random-2.1.5/mir-random/source/mir/random/variable.d(941,7):        mir.random.variable.NormalVariable!double.NormalVariable.opCall(G)(scope G* gen) if (isSaturatedRandomEngine!G)\r\n/usr/bin/ldc2 failed with exit code 1.\r\n```\r\n\r\nThese issues came when I tried using the following code.\r\n```\r\nimport std.random;\r\nimport std.stdio;\r\nimport mir.random.variable;\r\nRandom gen = Random(unpredictableSeed);\r\ndouble x = normalVar!double()(&gen);\r\nwriteln(x);\r\n```\r\n\r\nI referred to the documentation to try and get the code working, but I was unable to understand the examples using the undefined `rne` and `threadLocalPtr`. Furthermore, when I tried running the examples on the documentation, they seemed to fail. In short, I was wondering what the correct way to get a random double from the NormalVariable struct was."}}
{"actor":{"display_login":"9il"}}