{"action":"created","comment":{"url":"https://api.github.com/repos/libmir/mir/pulls/comments/69473775","id":69473775,"diff_hunk":"@@ -0,0 +1,668 @@\n+module mir.random.flex.internal.area;\n+\n+import mir.random.flex.internal.types : Interval;\n+import std.traits : ReturnType;\n+\n+/**\n+Determines the hat and squeeze function of an interval.\n+Based on Theorem 1 of Botts et al. (2013).\n+*/\n+void determineSqueezeAndHat(S)(ref Interval!S iv)\n+{\n+    import mir.utility.linearfun : linearFun;\n+    import mir.random.flex.internal.types : determineType, FunType;\n+\n+    // y (aka x0) is defined to be the maximal point of the boundary points\n+    enum sec = `(iv.ltx >= iv.rtx) ?\n+                linearFun!S((iv.rtx - iv.ltx) / (iv.rx - iv.lx), iv.lx, iv.ltx) :\n+                linearFun!S((iv.rtx - iv.ltx) / (iv.rx - iv.lx), iv.rx, iv.rtx)`;\n+\n+    enum t_l = \"linearFun!S(iv.lt1x, iv.lx, iv.ltx)\";\n+    enum t_r = \"linearFun!S(iv.rt1x, iv.rx, iv.rtx)\";\n+\n+    // could potentially be saved for subsequent calls\n+    FunType type = determineType(iv);\n+    with(FunType) with(iv)\n+    switch(type)\n+    {\n+        case T1a:\n+            squeeze = mixin(t_r);\n+            hat = mixin(t_l);\n+            break;\n+        case T1b:\n+            squeeze = mixin(t_l);\n+            hat = mixin(t_r);\n+            break;\n+        case T2a:\n+            squeeze = mixin(sec);\n+            hat = mixin(t_l);\n+            break;\n+        case T2b:\n+            squeeze = mixin(sec);\n+            hat = mixin(t_r);\n+            break;\n+        case T3a:\n+            squeeze = mixin(t_r);\n+            hat = mixin(sec);\n+            break;\n+        case T3b:\n+            squeeze = mixin(t_l);\n+            hat = mixin(sec);\n+            break;\n+        case T4a:\n+            if (iv.lx == -S.infinity)\n+            {\n+                squeeze = squeeze.init;\n+                hat = mixin(t_r);\n+                break;\n+            }\n+            if (iv.rx == +S.infinity)\n+            {\n+                squeeze = squeeze.init;\n+                hat = mixin(t_l);\n+                break;\n+            }\n+            squeeze = mixin(sec);\n+            hat = iv.ltx > iv.rtx ? mixin(t_l) : mixin(t_r);\n+            break;\n+        case T4b:\n+            squeeze = iv.ltx < iv.rtx ? mixin(t_l) : mixin(t_r);\n+            hat = mixin(sec);\n+            break;\n+        default:\n+            squeeze = linearFun!S(0, 0, 0);\n+            hat = linearFun!S(0, 0, 0);\n+    }\n+}\n+\n+// TODO: add more tests\n+unittest\n+{\n+    import std.meta : AliasSeq;\n+    import mir.random.flex.internal.types: determineType;\n+    foreach (S; AliasSeq!(float, double, real))\n+    {\n+        const f0 = (S x) => x * x;\n+        const f1 = (S x) => 2 * x;\n+        const f2 = (S x) => 2.0;\n+        auto c = 42; // not required for this test\n+        auto dhs = (S l, S r) {\n+            auto iv = Interval!S(l, r, c, f0(l), f1(l), f2(l),\n+                                          f0(r), f1(r), f2(r));\n+            determineSqueezeAndHat(iv);\n+            return iv;\n+        };\n+\n+        // test left side\n+        auto hs1 = dhs(-1, 1);\n+        assert(hs1.hat.slope == 0);\n+        assert(hs1.hat.intercept == 1);\n+        assert(hs1.squeeze.slope == 2);\n+        assert(hs1.squeeze.intercept == -1);\n+\n+        // test right side\n+        auto hs2 = dhs(1, 3);\n+        assert(hs2.hat.slope == 4);\n+        assert(hs2.hat.intercept == -3);\n+        assert(hs2.squeeze.slope == 2);\n+        assert(hs2.squeeze.intercept == -1);\n+    }\n+}\n+\n+/**\n+Flex-specific constants cutoffs for numeric errors.\n+*/\n+template constants(S)\n+{\n+    import mir.internal.math: sqrt;\n+    enum S smallLog = sqrt(sqrt(S.epsilon * 5));\n+    enum S smallExp = sqrt(sqrt(S.epsilon * 120));\n+}\n+\n+alias hatArea(S) = area!(true, S);\n+alias squeezeArea(S) = area!(false, S);\n+\n+/**\n+Computes the area below either the hat or squeeze function\n+in-between a interval `iv`.\n+Based on table 1 and general equation (3) from Botts et al. (2013).\n+\n+    (F_T(sh(r))- F_T(sh(l))) / sh.slope\n+\n+Params:\n+    isHat = whether to calculate the hat or squeeze area\n+    iv = Interval to use\n+\n+Returns: Computed area below either hat or squeeze.\n+*/\n+void area(bool isHat, S)(ref Interval!S iv)\n+in\n+{\n+    assert(iv.lx < iv.rx, \"invalid interval\");\n+}\n+body\n+{\n+    import std.math: signbit, frexp, LOG2E, isFinite;\n+    import mir.internal.math: copysign, exp, log2, fabs;\n+    import mir.random.flex.internal.transformations : antiderivative;\n+    import mir.random.flex : flexInverse;\n+    enum one_div_3 = S(1) / 3;\n+    enum one_div_6 = S(1) / 6;\n+    enum one_div_24 = S(1) / 24;\n+\n+    S area = void;\n+\n+    static if (isHat)\n+        auto sh = iv.hat;\n+    else\n+        auto sh = iv.squeeze;\n+\n+    // check difference to left and right starting point\n+    // sigma in the paper (1: left side, -1, right side\n+    immutable S leftOrRight = (iv.rx - sh.y) > (sh.y - iv.lx) ? 1 : -1;\n+    immutable shL = sh(iv.lx);\n+    immutable shR = sh(iv.rx);\n+    immutable ivLength = iv.rx - iv.lx;\n+    auto z = leftOrRight * sh.slope * ivLength;\n+\n+    // sh.y is the boundary point where f obtains its maximum\n+\n+    // specializations for T_c family (page 6)\n+    if (iv.c == 0)\n+    {\n+        if (fabs(z) < constants!S.smallExp)\n+        {\n+            area = exp(sh.a) * (iv.rx - iv.lx) * (1 + z * S(0.5) + (z * z) * one_div_6\n+                                                    + (z * z * z) * one_div_24);","path":"source/mir/random/flex/internal/area.d","position":176,"original_position":176,"commit_id":"e1733f8d89ea5265fd68f197672c41a38d155798","original_commit_id":"17babb8a41465f1dab6def2e71b36973b13717e3","user":{"login":"joseph-wakeling-sociomantic","id":6409224,"avatar_url":"https://avatars.githubusercontent.com/u/6409224?v=3","gravatar_id":"","url":"https://api.github.com/users/joseph-wakeling-sociomantic","html_url":"https://github.com/joseph-wakeling-sociomantic","followers_url":"https://api.github.com/users/joseph-wakeling-sociomantic/followers","following_url":"https://api.github.com/users/joseph-wakeling-sociomantic/following{/other_user}","gists_url":"https://api.github.com/users/joseph-wakeling-sociomantic/gists{/gist_id}","starred_url":"https://api.github.com/users/joseph-wakeling-sociomantic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joseph-wakeling-sociomantic/subscriptions","organizations_url":"https://api.github.com/users/joseph-wakeling-sociomantic/orgs","repos_url":"https://api.github.com/users/joseph-wakeling-sociomantic/repos","events_url":"https://api.github.com/users/joseph-wakeling-sociomantic/events{/privacy}","received_events_url":"https://api.github.com/users/joseph-wakeling-sociomantic/received_events","type":"User","site_admin":false},"body":"Yea, I think it would be good to have a short comment noting that this expands the Taylor series of the approximation one term more than given in Table 2.  You can also cross-ref any supplementary documentation such as that you are preparing.","created_at":"2016-07-04T15:43:08Z","updated_at":"2016-07-04T15:43:08Z","html_url":"https://github.com/libmir/mir/pull/240#discussion_r69473775","pull_request_url":"https://api.github.com/repos/libmir/mir/pulls/240","_links":{"self":{"href":"https://api.github.com/repos/libmir/mir/pulls/comments/69473775"},"html":{"href":"https://github.com/libmir/mir/pull/240#discussion_r69473775"},"pull_request":{"href":"https://api.github.com/repos/libmir/mir/pulls/240"}}},"pull_request":{"url":"https://api.github.com/repos/libmir/mir/pulls/240","id":75363986,"html_url":"https://github.com/libmir/mir/pull/240","diff_url":"https://github.com/libmir/mir/pull/240.diff","patch_url":"https://github.com/libmir/mir/pull/240.patch","issue_url":"https://api.github.com/repos/libmir/mir/issues/240","number":240,"state":"open","locked":false,"title":"Tinflex","user":{"login":"wilzbach","id":4370550,"avatar_url":"https://avatars.githubusercontent.com/u/4370550?v=3","gravatar_id":"","url":"https://api.github.com/users/wilzbach","html_url":"https://github.com/wilzbach","followers_url":"https://api.github.com/users/wilzbach/followers","following_url":"https://api.github.com/users/wilzbach/following{/other_user}","gists_url":"https://api.github.com/users/wilzbach/gists{/gist_id}","starred_url":"https://api.github.com/users/wilzbach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wilzbach/subscriptions","organizations_url":"https://api.github.com/users/wilzbach/orgs","repos_url":"https://api.github.com/users/wilzbach/repos","events_url":"https://api.github.com/users/wilzbach/events{/privacy}","received_events_url":"https://api.github.com/users/wilzbach/received_events","type":"User","site_admin":false},"body":"(reboot of #222 with an upstream branch)\r\n\r\n# TODO\r\n- [x] Move  `LinearFun` to `mir.utilitiy.linearfun`, make it public. Rename  `_y` -> `x0`, `_a`->`a` (remove `a` property). Remove `opEquals` (should work out of the box). Clean and add docs.\r\n- [x] Move `GenerationInterval` to `mir.tinflex.package`, make it public and rename to `TinflexInterval`\r\n- [x] Rename `calcPoints` -> `tinflexIntervals` and move it to `mir.tinflex.package`.\r\n- [ ] `tinflex` should have following API:\r\n  1. `(in Pdf pdf, in F0 f0, in F1 f1, in F2 f2, S[] cs, S[] points, S rho = 1.1)`\r\n  2. `(in F0 f0, in F1 f1, in F2 f2, S[] cs, S[] points, S rho = 1.1)`\r\n  3. `(in Pdf pdf, in TinflexInterval!S[] intervals)`\r\n- [x] `tinflexImpl` should have API: `(in Pdf pdf, in GenerationInterval!S[] gvs, in Discrete!S ds, ref RNG rng)`\r\n\r\nafter that users (and you) would be able to analyse tinflex intervals without dirty hacks like `plot.d`. So, create a single file in examples with all test like in R code.\r\n\r\n- [x] Use matplotlib instead of ggplotd\r\n- [x] Remove ggplotd\r\n- [x] inline `transform` and remove it.\r\n- [x] Interval lines should look exactly like in R. `inverse` should be used, thus lines would be curved.\r\n- [ ] Use http://pyd.readthedocs.io/en/latest/functions.html to pass interval function to python instead of computing dots in D\r\n- [x] Remove all unused stuff from `mir.tinflex`\r\n- [x] rename `inverse` to `flexInverse`, move to package, make public\r\n- [x] Rename from `tinflex` to `flex` (all cases)\r\n- [ ] replace stuff like `z / 3` with `z * one_div_3`\r\n- [ ] fix `dub.json`: package must not define configurations for examples. Use new builtin dub syntax, but with `dub.json` instead of `dub.sdl` (see http://code.dlang.org/getting_started, Single-file packages)\r\n- [ ] Do detailed paper work for cases +- 1 in Table 3. Need z^3 approximation instead of z^2. \r\n- [ ] Do detailed paper work for Table 3 analog but with right bound instead of left. This will fix sampling for -infinity (btw, how -infinity handled in R code?)\r\n- [ ] Fix bugs with in `tinflexImpl`\r\n\r\n- [ ] Rename `Discrete` -> `NaiveDiscrete`\r\n- [ ] Add Alias Method as `Discrete`\r\n- [ ] Comment article https://www.academia.edu/25911888/An_automatic_code_generator_for_nonuniform_random_variate_generation?auto=download\r\n- [ ] Use binary heap (and sort in the end) instead of Dlist\r\n- [ ] clean code, add docs\r\n- [ ] look at FP failures on x86\r\n- [ ] remove commented tests","created_at":"2016-06-27T19:13:52Z","updated_at":"2016-07-04T15:43:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"83b6b929b207789014eabaa64a8e93fbd24f7aa5","assignee":{"login":"wilzbach","id":4370550,"avatar_url":"https://avatars.githubusercontent.com/u/4370550?v=3","gravatar_id":"","url":"https://api.github.com/users/wilzbach","html_url":"https://github.com/wilzbach","followers_url":"https://api.github.com/users/wilzbach/followers","following_url":"https://api.github.com/users/wilzbach/following{/other_user}","gists_url":"https://api.github.com/users/wilzbach/gists{/gist_id}","starred_url":"https://api.github.com/users/wilzbach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wilzbach/subscriptions","organizations_url":"https://api.github.com/users/wilzbach/orgs","repos_url":"https://api.github.com/users/wilzbach/repos","events_url":"https://api.github.com/users/wilzbach/events{/privacy}","received_events_url":"https://api.github.com/users/wilzbach/received_events","type":"User","site_admin":false},"assignees":[{"login":"wilzbach","id":4370550,"avatar_url":"https://avatars.githubusercontent.com/u/4370550?v=3","gravatar_id":"","url":"https://api.github.com/users/wilzbach","html_url":"https://github.com/wilzbach","followers_url":"https://api.github.com/users/wilzbach/followers","following_url":"https://api.github.com/users/wilzbach/following{/other_user}","gists_url":"https://api.github.com/users/wilzbach/gists{/gist_id}","starred_url":"https://api.github.com/users/wilzbach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wilzbach/subscriptions","organizations_url":"https://api.github.com/users/wilzbach/orgs","repos_url":"https://api.github.com/users/wilzbach/repos","events_url":"https://api.github.com/users/wilzbach/events{/privacy}","received_events_url":"https://api.github.com/users/wilzbach/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/libmir/mir/pulls/240/commits","review_comments_url":"https://api.github.com/repos/libmir/mir/pulls/240/comments","review_comment_url":"https://api.github.com/repos/libmir/mir/pulls/comments{/number}","comments_url":"https://api.github.com/repos/libmir/mir/issues/240/comments","statuses_url":"https://api.github.com/repos/libmir/mir/statuses/e1733f8d89ea5265fd68f197672c41a38d155798","head":{"label":"libmir:tinflex","ref":"tinflex","sha":"e1733f8d89ea5265fd68f197672c41a38d155798","user":{"login":"libmir","id":18573637,"avatar_url":"https://avatars.githubusercontent.com/u/18573637?v=3","gravatar_id":"","url":"https://api.github.com/users/libmir","html_url":"https://github.com/libmir","followers_url":"https://api.github.com/users/libmir/followers","following_url":"https://api.github.com/users/libmir/following{/other_user}","gists_url":"https://api.github.com/users/libmir/gists{/gist_id}","starred_url":"https://api.github.com/users/libmir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libmir/subscriptions","organizations_url":"https://api.github.com/users/libmir/orgs","repos_url":"https://api.github.com/users/libmir/repos","events_url":"https://api.github.com/users/libmir/events{/privacy}","received_events_url":"https://api.github.com/users/libmir/received_events","type":"Organization","site_admin":false},"repo":{"id":37379986,"name":"mir","full_name":"libmir/mir","owner":{"login":"libmir","id":18573637,"avatar_url":"https://avatars.githubusercontent.com/u/18573637?v=3","gravatar_id":"","url":"https://api.github.com/users/libmir","html_url":"https://github.com/libmir","followers_url":"https://api.github.com/users/libmir/followers","following_url":"https://api.github.com/users/libmir/following{/other_user}","gists_url":"https://api.github.com/users/libmir/gists{/gist_id}","starred_url":"https://api.github.com/users/libmir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libmir/subscriptions","organizations_url":"https://api.github.com/users/libmir/orgs","repos_url":"https://api.github.com/users/libmir/repos","events_url":"https://api.github.com/users/libmir/events{/privacy}","received_events_url":"https://api.github.com/users/libmir/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/libmir/mir","description":"Generic Numerical Library","fork":false,"url":"https://api.github.com/repos/libmir/mir","forks_url":"https://api.github.com/repos/libmir/mir/forks","keys_url":"https://api.github.com/repos/libmir/mir/keys{/key_id}","collaborators_url":"https://api.github.com/repos/libmir/mir/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/libmir/mir/teams","hooks_url":"https://api.github.com/repos/libmir/mir/hooks","issue_events_url":"https://api.github.com/repos/libmir/mir/issues/events{/number}","events_url":"https://api.github.com/repos/libmir/mir/events","assignees_url":"https://api.github.com/repos/libmir/mir/assignees{/user}","branches_url":"https://api.github.com/repos/libmir/mir/branches{/branch}","tags_url":"https://api.github.com/repos/libmir/mir/tags","blobs_url":"https://api.github.com/repos/libmir/mir/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/libmir/mir/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/libmir/mir/git/refs{/sha}","trees_url":"https://api.github.com/repos/libmir/mir/git/trees{/sha}","statuses_url":"https://api.github.com/repos/libmir/mir/statuses/{sha}","languages_url":"https://api.github.com/repos/libmir/mir/languages","stargazers_url":"https://api.github.com/repos/libmir/mir/stargazers","contributors_url":"https://api.github.com/repos/libmir/mir/contributors","subscribers_url":"https://api.github.com/repos/libmir/mir/subscribers","subscription_url":"https://api.github.com/repos/libmir/mir/subscription","commits_url":"https://api.github.com/repos/libmir/mir/commits{/sha}","git_commits_url":"https://api.github.com/repos/libmir/mir/git/commits{/sha}","comments_url":"https://api.github.com/repos/libmir/mir/comments{/number}","issue_comment_url":"https://api.github.com/repos/libmir/mir/issues/comments{/number}","contents_url":"https://api.github.com/repos/libmir/mir/contents/{+path}","compare_url":"https://api.github.com/repos/libmir/mir/compare/{base}...{head}","merges_url":"https://api.github.com/repos/libmir/mir/merges","archive_url":"https://api.github.com/repos/libmir/mir/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/libmir/mir/downloads","issues_url":"https://api.github.com/repos/libmir/mir/issues{/number}","pulls_url":"https://api.github.com/repos/libmir/mir/pulls{/number}","milestones_url":"https://api.github.com/repos/libmir/mir/milestones{/number}","notifications_url":"https://api.github.com/repos/libmir/mir/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/libmir/mir/labels{/name}","releases_url":"https://api.github.com/repos/libmir/mir/releases{/id}","deployments_url":"https://api.github.com/repos/libmir/mir/deployments","created_at":"2015-06-13T16:59:39Z","updated_at":"2016-06-27T18:38:27Z","pushed_at":"2016-07-04T15:24:35Z","git_url":"git://github.com/libmir/mir.git","ssh_url":"git@github.com:libmir/mir.git","clone_url":"https://github.com/libmir/mir.git","svn_url":"https://github.com/libmir/mir","homepage":"http://mir.dlang.io","size":2117,"stargazers_count":34,"watchers_count":34,"language":"D","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":59,"forks":9,"open_issues":59,"watchers":34,"default_branch":"master"}},"base":{"label":"libmir:master","ref":"master","sha":"819ea032898a17af2d1bf4e439d106d89625a9c5","user":{"login":"libmir","id":18573637,"avatar_url":"https://avatars.githubusercontent.com/u/18573637?v=3","gravatar_id":"","url":"https://api.github.com/users/libmir","html_url":"https://github.com/libmir","followers_url":"https://api.github.com/users/libmir/followers","following_url":"https://api.github.com/users/libmir/following{/other_user}","gists_url":"https://api.github.com/users/libmir/gists{/gist_id}","starred_url":"https://api.github.com/users/libmir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libmir/subscriptions","organizations_url":"https://api.github.com/users/libmir/orgs","repos_url":"https://api.github.com/users/libmir/repos","events_url":"https://api.github.com/users/libmir/events{/privacy}","received_events_url":"https://api.github.com/users/libmir/received_events","type":"Organization","site_admin":false},"repo":{"id":37379986,"name":"mir","full_name":"libmir/mir","owner":{"login":"libmir","id":18573637,"avatar_url":"https://avatars.githubusercontent.com/u/18573637?v=3","gravatar_id":"","url":"https://api.github.com/users/libmir","html_url":"https://github.com/libmir","followers_url":"https://api.github.com/users/libmir/followers","following_url":"https://api.github.com/users/libmir/following{/other_user}","gists_url":"https://api.github.com/users/libmir/gists{/gist_id}","starred_url":"https://api.github.com/users/libmir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libmir/subscriptions","organizations_url":"https://api.github.com/users/libmir/orgs","repos_url":"https://api.github.com/users/libmir/repos","events_url":"https://api.github.com/users/libmir/events{/privacy}","received_events_url":"https://api.github.com/users/libmir/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/libmir/mir","description":"Generic Numerical Library","fork":false,"url":"https://api.github.com/repos/libmir/mir","forks_url":"https://api.github.com/repos/libmir/mir/forks","keys_url":"https://api.github.com/repos/libmir/mir/keys{/key_id}","collaborators_url":"https://api.github.com/repos/libmir/mir/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/libmir/mir/teams","hooks_url":"https://api.github.com/repos/libmir/mir/hooks","issue_events_url":"https://api.github.com/repos/libmir/mir/issues/events{/number}","events_url":"https://api.github.com/repos/libmir/mir/events","assignees_url":"https://api.github.com/repos/libmir/mir/assignees{/user}","branches_url":"https://api.github.com/repos/libmir/mir/branches{/branch}","tags_url":"https://api.github.com/repos/libmir/mir/tags","blobs_url":"https://api.github.com/repos/libmir/mir/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/libmir/mir/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/libmir/mir/git/refs{/sha}","trees_url":"https://api.github.com/repos/libmir/mir/git/trees{/sha}","statuses_url":"https://api.github.com/repos/libmir/mir/statuses/{sha}","languages_url":"https://api.github.com/repos/libmir/mir/languages","stargazers_url":"https://api.github.com/repos/libmir/mir/stargazers","contributors_url":"https://api.github.com/repos/libmir/mir/contributors","subscribers_url":"https://api.github.com/repos/libmir/mir/subscribers","subscription_url":"https://api.github.com/repos/libmir/mir/subscription","commits_url":"https://api.github.com/repos/libmir/mir/commits{/sha}","git_commits_url":"https://api.github.com/repos/libmir/mir/git/commits{/sha}","comments_url":"https://api.github.com/repos/libmir/mir/comments{/number}","issue_comment_url":"https://api.github.com/repos/libmir/mir/issues/comments{/number}","contents_url":"https://api.github.com/repos/libmir/mir/contents/{+path}","compare_url":"https://api.github.com/repos/libmir/mir/compare/{base}...{head}","merges_url":"https://api.github.com/repos/libmir/mir/merges","archive_url":"https://api.github.com/repos/libmir/mir/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/libmir/mir/downloads","issues_url":"https://api.github.com/repos/libmir/mir/issues{/number}","pulls_url":"https://api.github.com/repos/libmir/mir/pulls{/number}","milestones_url":"https://api.github.com/repos/libmir/mir/milestones{/number}","notifications_url":"https://api.github.com/repos/libmir/mir/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/libmir/mir/labels{/name}","releases_url":"https://api.github.com/repos/libmir/mir/releases{/id}","deployments_url":"https://api.github.com/repos/libmir/mir/deployments","created_at":"2015-06-13T16:59:39Z","updated_at":"2016-06-27T18:38:27Z","pushed_at":"2016-07-04T15:24:35Z","git_url":"git://github.com/libmir/mir.git","ssh_url":"git@github.com:libmir/mir.git","clone_url":"https://github.com/libmir/mir.git","svn_url":"https://github.com/libmir/mir","homepage":"http://mir.dlang.io","size":2117,"stargazers_count":34,"watchers_count":34,"language":"D","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":59,"forks":9,"open_issues":59,"watchers":34,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/libmir/mir/pulls/240"},"html":{"href":"https://github.com/libmir/mir/pull/240"},"issue":{"href":"https://api.github.com/repos/libmir/mir/issues/240"},"comments":{"href":"https://api.github.com/repos/libmir/mir/issues/240/comments"},"review_comments":{"href":"https://api.github.com/repos/libmir/mir/pulls/240/comments"},"review_comment":{"href":"https://api.github.com/repos/libmir/mir/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/libmir/mir/pulls/240/commits"},"statuses":{"href":"https://api.github.com/repos/libmir/mir/statuses/e1733f8d89ea5265fd68f197672c41a38d155798"}}}}
{"actor":{"display_login":"joseph-wakeling-sociomantic"}}