{"action":"created","issue":{"url":"https://api.github.com/repos/boxtown/statrs/issues/18","repository_url":"https://api.github.com/repos/boxtown/statrs","labels_url":"https://api.github.com/repos/boxtown/statrs/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/boxtown/statrs/issues/18/comments","events_url":"https://api.github.com/repos/boxtown/statrs/issues/18/events","html_url":"https://github.com/boxtown/statrs/issues/18","id":182943207,"number":18,"title":"Review of iterator statistics trait","user":{"login":"boxtown","id":2892990,"avatar_url":"https://avatars.githubusercontent.com/u/2892990?v=3","gravatar_id":"","url":"https://api.github.com/users/boxtown","html_url":"https://github.com/boxtown","followers_url":"https://api.github.com/users/boxtown/followers","following_url":"https://api.github.com/users/boxtown/following{/other_user}","gists_url":"https://api.github.com/users/boxtown/gists{/gist_id}","starred_url":"https://api.github.com/users/boxtown/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boxtown/subscriptions","organizations_url":"https://api.github.com/users/boxtown/orgs","repos_url":"https://api.github.com/users/boxtown/repos","events_url":"https://api.github.com/users/boxtown/events{/privacy}","received_events_url":"https://api.github.com/users/boxtown/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/boxtown/statrs/labels/help%20wanted","name":"help wanted","color":"159818"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/boxtown/statrs/milestones/3","html_url":"https://github.com/boxtown/statrs/milestones/0.4.0","labels_url":"https://api.github.com/repos/boxtown/statrs/milestones/3/labels","id":2069158,"number":3,"title":"0.4.0","description":"","creator":{"login":"boxtown","id":2892990,"avatar_url":"https://avatars.githubusercontent.com/u/2892990?v=3","gravatar_id":"","url":"https://api.github.com/users/boxtown","html_url":"https://github.com/boxtown","followers_url":"https://api.github.com/users/boxtown/followers","following_url":"https://api.github.com/users/boxtown/following{/other_user}","gists_url":"https://api.github.com/users/boxtown/gists{/gist_id}","starred_url":"https://api.github.com/users/boxtown/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boxtown/subscriptions","organizations_url":"https://api.github.com/users/boxtown/orgs","repos_url":"https://api.github.com/users/boxtown/repos","events_url":"https://api.github.com/users/boxtown/events{/privacy}","received_events_url":"https://api.github.com/users/boxtown/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":0,"state":"open","created_at":"2016-10-14T01:32:05Z","updated_at":"2016-10-14T01:32:43Z","due_on":"2016-12-01T00:00:00Z","closed_at":null},"comments":15,"created_at":"2016-10-14T01:31:41Z","updated_at":"2016-10-19T17:09:57Z","closed_at":null,"body":"Currently the iterator statistics trait is treated as a special case since to act over the iterator the methods need to take a mutable reference, so all the traits from `statrs::statistics` are (going to be) combined in the `IterStatistics` trait that is implemented for all Iterators. I haven't come up with a better solution but for some reason this implementation doesn't sit too well with me and I'd love to have someone review it and provide feedback."},"comment":{"url":"https://api.github.com/repos/boxtown/statrs/issues/comments/254878124","html_url":"https://github.com/boxtown/statrs/issues/18#issuecomment-254878124","issue_url":"https://api.github.com/repos/boxtown/statrs/issues/18","id":254878124,"user":{"login":"vks","id":33460,"avatar_url":"https://avatars.githubusercontent.com/u/33460?v=3","gravatar_id":"","url":"https://api.github.com/users/vks","html_url":"https://github.com/vks","followers_url":"https://api.github.com/users/vks/followers","following_url":"https://api.github.com/users/vks/following{/other_user}","gists_url":"https://api.github.com/users/vks/gists{/gist_id}","starred_url":"https://api.github.com/users/vks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vks/subscriptions","organizations_url":"https://api.github.com/users/vks/orgs","repos_url":"https://api.github.com/users/vks/repos","events_url":"https://api.github.com/users/vks/events{/privacy}","received_events_url":"https://api.github.com/users/vks/received_events","type":"User","site_admin":false},"created_at":"2016-10-19T17:09:57Z","updated_at":"2016-10-19T17:09:57Z","body":"Do you really need traits for the distributions? Couldn't you just define\nthe method directly on the type? This would be similar to what the standard\nlibrary is doing.\n\nOn Tue, Oct 18, 2016, 15:19 Michael Ma <notifications@github.com> wrote:\n\n> Right the trait signature has to be self, which means for the other\n> implementors (i.e. all the Distributions that implement Min, Max, Mean,\n> etc) you have to do an implementation for the immutable AND mutable\n> reference:\n>\n> trait Mean<T> {\n>   fn mean(self) ->T;\n> }\n>\n> struct Normal{mean: f64, std_dev: f64}\n>\n> impl Mean<f64> for &'a Normal {\n>   fn mean(self) -> f64 {\n>     self.mean\n>   }\n> }\n>\n> impl Mean<f64> for &'a mut Normal {\n>   fn mean(self) -> f64 {\n>     self.mean\n>   }\n> }\n>\n> —\n> You are receiving this because you commented.\n>\n>\n> Reply to this email directly, view it on GitHub\n> <https://github.com/boxtown/statrs/issues/18#issuecomment-254504910>, or mute\n> the thread\n> <https://github.com/notifications/unsubscribe-auth/AACCtGzyKmj7rAhwFf1n13SraiVg58kwks5q1MdngaJpZM4KWjNW>\n> .\n>\n"}}
{"actor":{"display_login":"vks"}}