{"action":"created","comment":{"url":"https://api.github.com/repos/slamdata/scala-pathy/pulls/comments/48553791","id":48553791,"diff_hunk":"@@ -54,19 +54,14 @@ object PathOf {\n     genRelFile[A] map (rootDir </> _)\n \n   private def genRelFile[A: Arbitrary: Show]: Gen[RelFile[Sandboxed]] =\n-    for {\n-      d <- genRelDir[A]\n-      s <- genSegment[A]\n-    } yield d </> file(s)\n+    sizeDistributed(genRelDir[A], genSegment[A])((d, s) => d </> file(s))\n \n   private def genAbsDir[A: Arbitrary: Show]: Gen[AbsDir[Sandboxed]] =\n     genRelDir[A] map (rootDir </> _)\n \n   private def genRelDir[A: Arbitrary: Show]: Gen[RelDir[Sandboxed]] =","path":"scalacheck/src/main/scala/pathy/scalacheck/PathOf.scala","position":34,"original_position":34,"commit_id":"f571f54a03f07577c9fbfb8b4ec89a6a55dcbf3c","original_commit_id":"f571f54a03f07577c9fbfb8b4ec89a6a55dcbf3c","user":{"login":"mossprescott","id":6147371,"avatar_url":"https://avatars.githubusercontent.com/u/6147371?v=3","gravatar_id":"","url":"https://api.github.com/users/mossprescott","html_url":"https://github.com/mossprescott","followers_url":"https://api.github.com/users/mossprescott/followers","following_url":"https://api.github.com/users/mossprescott/following{/other_user}","gists_url":"https://api.github.com/users/mossprescott/gists{/gist_id}","starred_url":"https://api.github.com/users/mossprescott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mossprescott/subscriptions","organizations_url":"https://api.github.com/users/mossprescott/orgs","repos_url":"https://api.github.com/users/mossprescott/repos","events_url":"https://api.github.com/users/mossprescott/events{/privacy}","received_events_url":"https://api.github.com/users/mossprescott/received_events","type":"User","site_admin":false},"body":"Not sure what you mean by optimal. With a size of 10, the generator can produce a path with as many as 5 segments, where each dir/filename is a single char, since the `/`s are effectively counted.","created_at":"2015-12-29T17:01:23Z","updated_at":"2015-12-29T17:01:23Z","html_url":"https://github.com/slamdata/scala-pathy/pull/22#discussion_r48553791","pull_request_url":"https://api.github.com/repos/slamdata/scala-pathy/pulls/22","_links":{"self":{"href":"https://api.github.com/repos/slamdata/scala-pathy/pulls/comments/48553791"},"html":{"href":"https://github.com/slamdata/scala-pathy/pull/22#discussion_r48553791"},"pull_request":{"href":"https://api.github.com/repos/slamdata/scala-pathy/pulls/22"}}},"pull_request":{"url":"https://api.github.com/repos/slamdata/scala-pathy/pulls/22","id":54689140,"html_url":"https://github.com/slamdata/scala-pathy/pull/22","diff_url":"https://github.com/slamdata/scala-pathy/pull/22.diff","patch_url":"https://github.com/slamdata/scala-pathy/pull/22.patch","issue_url":"https://api.github.com/repos/slamdata/scala-pathy/issues/22","number":22,"state":"open","locked":false,"title":"Improve path generators","user":{"login":"mossprescott","id":6147371,"avatar_url":"https://avatars.githubusercontent.com/u/6147371?v=3","gravatar_id":"","url":"https://api.github.com/users/mossprescott","html_url":"https://github.com/mossprescott","followers_url":"https://api.github.com/users/mossprescott/followers","following_url":"https://api.github.com/users/mossprescott/following{/other_user}","gists_url":"https://api.github.com/users/mossprescott/gists{/gist_id}","starred_url":"https://api.github.com/users/mossprescott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mossprescott/subscriptions","organizations_url":"https://api.github.com/users/mossprescott/orgs","repos_url":"https://api.github.com/users/mossprescott/repos","events_url":"https://api.github.com/users/mossprescott/events{/privacy}","received_events_url":"https://api.github.com/users/mossprescott/received_events","type":"User","site_admin":false},"body":"The incoming `size` parameter is now respected, and the available size is distributed among the generated path segments. Crucially, that means `/` and `.` can now be generated (and *alway* are, when size = 0), along with simple paths like `/a` and also much deeper paths, all under the control of the caller.\r\n\r\nBiased the segment generator to produce mostly simple, alpha-numeric path segments, with arbitrary Unicode characters appearing less often. This just makes it easier to read the resulting paths most of the time, without sacrificing coverage.","created_at":"2015-12-28T22:36:29Z","updated_at":"2015-12-29T17:01:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dfd8ae8d64056f1c73a6a3d41cd0ac008b281643","assignee":{"login":"jedesah","id":1780116,"avatar_url":"https://avatars.githubusercontent.com/u/1780116?v=3","gravatar_id":"","url":"https://api.github.com/users/jedesah","html_url":"https://github.com/jedesah","followers_url":"https://api.github.com/users/jedesah/followers","following_url":"https://api.github.com/users/jedesah/following{/other_user}","gists_url":"https://api.github.com/users/jedesah/gists{/gist_id}","starred_url":"https://api.github.com/users/jedesah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jedesah/subscriptions","organizations_url":"https://api.github.com/users/jedesah/orgs","repos_url":"https://api.github.com/users/jedesah/repos","events_url":"https://api.github.com/users/jedesah/events{/privacy}","received_events_url":"https://api.github.com/users/jedesah/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/slamdata/scala-pathy/pulls/22/commits","review_comments_url":"https://api.github.com/repos/slamdata/scala-pathy/pulls/22/comments","review_comment_url":"https://api.github.com/repos/slamdata/scala-pathy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/slamdata/scala-pathy/issues/22/comments","statuses_url":"https://api.github.com/repos/slamdata/scala-pathy/statuses/f571f54a03f07577c9fbfb8b4ec89a6a55dcbf3c","head":{"label":"mossprescott:better-generators","ref":"better-generators","sha":"f571f54a03f07577c9fbfb8b4ec89a6a55dcbf3c","user":{"login":"mossprescott","id":6147371,"avatar_url":"https://avatars.githubusercontent.com/u/6147371?v=3","gravatar_id":"","url":"https://api.github.com/users/mossprescott","html_url":"https://github.com/mossprescott","followers_url":"https://api.github.com/users/mossprescott/followers","following_url":"https://api.github.com/users/mossprescott/following{/other_user}","gists_url":"https://api.github.com/users/mossprescott/gists{/gist_id}","starred_url":"https://api.github.com/users/mossprescott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mossprescott/subscriptions","organizations_url":"https://api.github.com/users/mossprescott/orgs","repos_url":"https://api.github.com/users/mossprescott/repos","events_url":"https://api.github.com/users/mossprescott/events{/privacy}","received_events_url":"https://api.github.com/users/mossprescott/received_events","type":"User","site_admin":false},"repo":{"id":40500842,"name":"scala-pathy","full_name":"mossprescott/scala-pathy","owner":{"login":"mossprescott","id":6147371,"avatar_url":"https://avatars.githubusercontent.com/u/6147371?v=3","gravatar_id":"","url":"https://api.github.com/users/mossprescott","html_url":"https://github.com/mossprescott","followers_url":"https://api.github.com/users/mossprescott/followers","following_url":"https://api.github.com/users/mossprescott/following{/other_user}","gists_url":"https://api.github.com/users/mossprescott/gists{/gist_id}","starred_url":"https://api.github.com/users/mossprescott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mossprescott/subscriptions","organizations_url":"https://api.github.com/users/mossprescott/orgs","repos_url":"https://api.github.com/users/mossprescott/repos","events_url":"https://api.github.com/users/mossprescott/events{/privacy}","received_events_url":"https://api.github.com/users/mossprescott/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mossprescott/scala-pathy","description":"A type-safe abstraction for platform-independent file system paths.","fork":true,"url":"https://api.github.com/repos/mossprescott/scala-pathy","forks_url":"https://api.github.com/repos/mossprescott/scala-pathy/forks","keys_url":"https://api.github.com/repos/mossprescott/scala-pathy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mossprescott/scala-pathy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mossprescott/scala-pathy/teams","hooks_url":"https://api.github.com/repos/mossprescott/scala-pathy/hooks","issue_events_url":"https://api.github.com/repos/mossprescott/scala-pathy/issues/events{/number}","events_url":"https://api.github.com/repos/mossprescott/scala-pathy/events","assignees_url":"https://api.github.com/repos/mossprescott/scala-pathy/assignees{/user}","branches_url":"https://api.github.com/repos/mossprescott/scala-pathy/branches{/branch}","tags_url":"https://api.github.com/repos/mossprescott/scala-pathy/tags","blobs_url":"https://api.github.com/repos/mossprescott/scala-pathy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mossprescott/scala-pathy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mossprescott/scala-pathy/git/refs{/sha}","trees_url":"https://api.github.com/repos/mossprescott/scala-pathy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mossprescott/scala-pathy/statuses/{sha}","languages_url":"https://api.github.com/repos/mossprescott/scala-pathy/languages","stargazers_url":"https://api.github.com/repos/mossprescott/scala-pathy/stargazers","contributors_url":"https://api.github.com/repos/mossprescott/scala-pathy/contributors","subscribers_url":"https://api.github.com/repos/mossprescott/scala-pathy/subscribers","subscription_url":"https://api.github.com/repos/mossprescott/scala-pathy/subscription","commits_url":"https://api.github.com/repos/mossprescott/scala-pathy/commits{/sha}","git_commits_url":"https://api.github.com/repos/mossprescott/scala-pathy/git/commits{/sha}","comments_url":"https://api.github.com/repos/mossprescott/scala-pathy/comments{/number}","issue_comment_url":"https://api.github.com/repos/mossprescott/scala-pathy/issues/comments{/number}","contents_url":"https://api.github.com/repos/mossprescott/scala-pathy/contents/{+path}","compare_url":"https://api.github.com/repos/mossprescott/scala-pathy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mossprescott/scala-pathy/merges","archive_url":"https://api.github.com/repos/mossprescott/scala-pathy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mossprescott/scala-pathy/downloads","issues_url":"https://api.github.com/repos/mossprescott/scala-pathy/issues{/number}","pulls_url":"https://api.github.com/repos/mossprescott/scala-pathy/pulls{/number}","milestones_url":"https://api.github.com/repos/mossprescott/scala-pathy/milestones{/number}","notifications_url":"https://api.github.com/repos/mossprescott/scala-pathy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mossprescott/scala-pathy/labels{/name}","releases_url":"https://api.github.com/repos/mossprescott/scala-pathy/releases{/id}","created_at":"2015-08-10T19:09:51Z","updated_at":"2015-08-10T19:09:51Z","pushed_at":"2015-12-28T22:28:55Z","git_url":"git://github.com/mossprescott/scala-pathy.git","ssh_url":"git@github.com:mossprescott/scala-pathy.git","clone_url":"https://github.com/mossprescott/scala-pathy.git","svn_url":"https://github.com/mossprescott/scala-pathy","homepage":null,"size":57,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"slamdata:master","ref":"master","sha":"d77e4576327e956c243d181b6f4cccd82dd08b6c","user":{"login":"slamdata","id":5385602,"avatar_url":"https://avatars.githubusercontent.com/u/5385602?v=3","gravatar_id":"","url":"https://api.github.com/users/slamdata","html_url":"https://github.com/slamdata","followers_url":"https://api.github.com/users/slamdata/followers","following_url":"https://api.github.com/users/slamdata/following{/other_user}","gists_url":"https://api.github.com/users/slamdata/gists{/gist_id}","starred_url":"https://api.github.com/users/slamdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slamdata/subscriptions","organizations_url":"https://api.github.com/users/slamdata/orgs","repos_url":"https://api.github.com/users/slamdata/repos","events_url":"https://api.github.com/users/slamdata/events{/privacy}","received_events_url":"https://api.github.com/users/slamdata/received_events","type":"Organization","site_admin":false},"repo":{"id":38395909,"name":"scala-pathy","full_name":"slamdata/scala-pathy","owner":{"login":"slamdata","id":5385602,"avatar_url":"https://avatars.githubusercontent.com/u/5385602?v=3","gravatar_id":"","url":"https://api.github.com/users/slamdata","html_url":"https://github.com/slamdata","followers_url":"https://api.github.com/users/slamdata/followers","following_url":"https://api.github.com/users/slamdata/following{/other_user}","gists_url":"https://api.github.com/users/slamdata/gists{/gist_id}","starred_url":"https://api.github.com/users/slamdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slamdata/subscriptions","organizations_url":"https://api.github.com/users/slamdata/orgs","repos_url":"https://api.github.com/users/slamdata/repos","events_url":"https://api.github.com/users/slamdata/events{/privacy}","received_events_url":"https://api.github.com/users/slamdata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/slamdata/scala-pathy","description":"A type-safe abstraction for platform-independent file system paths.","fork":false,"url":"https://api.github.com/repos/slamdata/scala-pathy","forks_url":"https://api.github.com/repos/slamdata/scala-pathy/forks","keys_url":"https://api.github.com/repos/slamdata/scala-pathy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/slamdata/scala-pathy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/slamdata/scala-pathy/teams","hooks_url":"https://api.github.com/repos/slamdata/scala-pathy/hooks","issue_events_url":"https://api.github.com/repos/slamdata/scala-pathy/issues/events{/number}","events_url":"https://api.github.com/repos/slamdata/scala-pathy/events","assignees_url":"https://api.github.com/repos/slamdata/scala-pathy/assignees{/user}","branches_url":"https://api.github.com/repos/slamdata/scala-pathy/branches{/branch}","tags_url":"https://api.github.com/repos/slamdata/scala-pathy/tags","blobs_url":"https://api.github.com/repos/slamdata/scala-pathy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/slamdata/scala-pathy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/slamdata/scala-pathy/git/refs{/sha}","trees_url":"https://api.github.com/repos/slamdata/scala-pathy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/slamdata/scala-pathy/statuses/{sha}","languages_url":"https://api.github.com/repos/slamdata/scala-pathy/languages","stargazers_url":"https://api.github.com/repos/slamdata/scala-pathy/stargazers","contributors_url":"https://api.github.com/repos/slamdata/scala-pathy/contributors","subscribers_url":"https://api.github.com/repos/slamdata/scala-pathy/subscribers","subscription_url":"https://api.github.com/repos/slamdata/scala-pathy/subscription","commits_url":"https://api.github.com/repos/slamdata/scala-pathy/commits{/sha}","git_commits_url":"https://api.github.com/repos/slamdata/scala-pathy/git/commits{/sha}","comments_url":"https://api.github.com/repos/slamdata/scala-pathy/comments{/number}","issue_comment_url":"https://api.github.com/repos/slamdata/scala-pathy/issues/comments{/number}","contents_url":"https://api.github.com/repos/slamdata/scala-pathy/contents/{+path}","compare_url":"https://api.github.com/repos/slamdata/scala-pathy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/slamdata/scala-pathy/merges","archive_url":"https://api.github.com/repos/slamdata/scala-pathy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/slamdata/scala-pathy/downloads","issues_url":"https://api.github.com/repos/slamdata/scala-pathy/issues{/number}","pulls_url":"https://api.github.com/repos/slamdata/scala-pathy/pulls{/number}","milestones_url":"https://api.github.com/repos/slamdata/scala-pathy/milestones{/number}","notifications_url":"https://api.github.com/repos/slamdata/scala-pathy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/slamdata/scala-pathy/labels{/name}","releases_url":"https://api.github.com/repos/slamdata/scala-pathy/releases{/id}","created_at":"2015-07-01T21:25:53Z","updated_at":"2015-10-31T05:45:01Z","pushed_at":"2015-12-28T22:36:30Z","git_url":"git://github.com/slamdata/scala-pathy.git","ssh_url":"git@github.com:slamdata/scala-pathy.git","clone_url":"https://github.com/slamdata/scala-pathy.git","svn_url":"https://github.com/slamdata/scala-pathy","homepage":null,"size":68,"stargazers_count":1,"watchers_count":1,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":5,"forks":3,"open_issues":5,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/slamdata/scala-pathy/pulls/22"},"html":{"href":"https://github.com/slamdata/scala-pathy/pull/22"},"issue":{"href":"https://api.github.com/repos/slamdata/scala-pathy/issues/22"},"comments":{"href":"https://api.github.com/repos/slamdata/scala-pathy/issues/22/comments"},"review_comments":{"href":"https://api.github.com/repos/slamdata/scala-pathy/pulls/22/comments"},"review_comment":{"href":"https://api.github.com/repos/slamdata/scala-pathy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/slamdata/scala-pathy/pulls/22/commits"},"statuses":{"href":"https://api.github.com/repos/slamdata/scala-pathy/statuses/f571f54a03f07577c9fbfb8b4ec89a6a55dcbf3c"}}}}