{"action":"created","comment":{"url":"https://api.github.com/repos/privat/nit/pulls/comments/30711176","id":30711176,"diff_hunk":"@@ -49,18 +50,19 @@ abstract class Reader\n \tfun read_byte: nullable Int is abstract\n \n \t# Read at most i bytes\n-\tfun read(i: Int): String\n+\tfun read(i: Int): Bytes","path":"lib/standard/stream.nit","position":13,"original_position":13,"commit_id":"a58f9f346209964ef8bf8bbe9edbe717d92b629c","original_commit_id":"a58f9f346209964ef8bf8bbe9edbe717d92b629c","user":{"login":"privat","id":135828,"avatar_url":"https://avatars.githubusercontent.com/u/135828?v=3","gravatar_id":"","url":"https://api.github.com/users/privat","html_url":"https://github.com/privat","followers_url":"https://api.github.com/users/privat/followers","following_url":"https://api.github.com/users/privat/following{/other_user}","gists_url":"https://api.github.com/users/privat/gists{/gist_id}","starred_url":"https://api.github.com/users/privat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/privat/subscriptions","organizations_url":"https://api.github.com/users/privat/orgs","repos_url":"https://api.github.com/users/privat/repos","events_url":"https://api.github.com/users/privat/events{/privacy}","received_events_url":"https://api.github.com/users/privat/received_events","type":"User","site_admin":false},"body":"I can understand that the method *read i numbers of bytes* returns Bytes instead of String. In fact, it completely make sense imho; however, I do not think that it is POLA that `Reader::read` is not symmetric with `Reader::write`.\r\n\r\nA proposal (I'm still not completely happy about it) is that you rename `Reader::read` to `Reader::read_bytes` and introduce a symmetric `Writer::write_bytes` that takes a Bytes.","created_at":"2015-05-20T14:59:40Z","updated_at":"2015-05-20T14:59:40Z","html_url":"https://github.com/privat/nit/pull/1309#discussion_r30711176","pull_request_url":"https://api.github.com/repos/privat/nit/pulls/1309","_links":{"self":{"href":"https://api.github.com/repos/privat/nit/pulls/comments/30711176"},"html":{"href":"https://github.com/privat/nit/pull/1309#discussion_r30711176"},"pull_request":{"href":"https://api.github.com/repos/privat/nit/pulls/1309"}}},"pull_request":{"url":"https://api.github.com/repos/privat/nit/pulls/1309","id":34760463,"html_url":"https://github.com/privat/nit/pull/1309","diff_url":"https://github.com/privat/nit/pull/1309.diff","patch_url":"https://github.com/privat/nit/pull/1309.patch","issue_url":"https://api.github.com/repos/privat/nit/issues/1309","number":1309,"state":"open","locked":false,"title":"File and Bytes","user":{"login":"R4PaSs","id":1444825,"avatar_url":"https://avatars.githubusercontent.com/u/1444825?v=3","gravatar_id":"","url":"https://api.github.com/users/R4PaSs","html_url":"https://github.com/R4PaSs","followers_url":"https://api.github.com/users/R4PaSs/followers","following_url":"https://api.github.com/users/R4PaSs/following{/other_user}","gists_url":"https://api.github.com/users/R4PaSs/gists{/gist_id}","starred_url":"https://api.github.com/users/R4PaSs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/R4PaSs/subscriptions","organizations_url":"https://api.github.com/users/R4PaSs/orgs","repos_url":"https://api.github.com/users/R4PaSs/repos","events_url":"https://api.github.com/users/R4PaSs/events{/privacy}","received_events_url":"https://api.github.com/users/R4PaSs/received_events","type":"User","site_admin":false},"body":"A bit of a fix in the context of issues #1267 and #1262.\r\n\r\nThe bytes module has a `ByteBuffer` class, while it is still working with `Int` at the moment, when Nit correctly supports `Bytes`, we can change it to a real `ByteBuffer`\r\n\r\nThis class is highly recommended when working with byte streams and collections.\r\n\r\nAs such, file operations are related to this module since most of the operations are working on bytes, what they mean is up to the end-user to figure.","created_at":"2015-05-05T19:53:22Z","updated_at":"2015-05-20T14:59:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d051152064d49e7a7f550b405b1e6cce90bb1e01","assignee":null,"milestone":{"url":"https://api.github.com/repos/privat/nit/milestones/4","html_url":"https://github.com/privat/nit/milestones/v1.0prealpha","labels_url":"https://api.github.com/repos/privat/nit/milestones/4/labels","id":795157,"number":4,"title":"v1.0prealpha","description":"The first public version that we are proud off and can be used sanely by non Nit people.","creator":{"login":"privat","id":135828,"avatar_url":"https://avatars.githubusercontent.com/u/135828?v=3","gravatar_id":"","url":"https://api.github.com/users/privat","html_url":"https://github.com/privat","followers_url":"https://api.github.com/users/privat/followers","following_url":"https://api.github.com/users/privat/following{/other_user}","gists_url":"https://api.github.com/users/privat/gists{/gist_id}","starred_url":"https://api.github.com/users/privat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/privat/subscriptions","organizations_url":"https://api.github.com/users/privat/orgs","repos_url":"https://api.github.com/users/privat/repos","events_url":"https://api.github.com/users/privat/events{/privacy}","received_events_url":"https://api.github.com/users/privat/received_events","type":"User","site_admin":false},"open_issues":35,"closed_issues":8,"state":"open","created_at":"2014-09-19T00:16:45Z","updated_at":"2015-05-16T00:42:58Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/privat/nit/pulls/1309/commits","review_comments_url":"https://api.github.com/repos/privat/nit/pulls/1309/comments","review_comment_url":"https://api.github.com/repos/privat/nit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/privat/nit/issues/1309/comments","statuses_url":"https://api.github.com/repos/privat/nit/statuses/a58f9f346209964ef8bf8bbe9edbe717d92b629c","head":{"label":"R4PaSs:file_conformance","ref":"file_conformance","sha":"a58f9f346209964ef8bf8bbe9edbe717d92b629c","user":{"login":"R4PaSs","id":1444825,"avatar_url":"https://avatars.githubusercontent.com/u/1444825?v=3","gravatar_id":"","url":"https://api.github.com/users/R4PaSs","html_url":"https://github.com/R4PaSs","followers_url":"https://api.github.com/users/R4PaSs/followers","following_url":"https://api.github.com/users/R4PaSs/following{/other_user}","gists_url":"https://api.github.com/users/R4PaSs/gists{/gist_id}","starred_url":"https://api.github.com/users/R4PaSs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/R4PaSs/subscriptions","organizations_url":"https://api.github.com/users/R4PaSs/orgs","repos_url":"https://api.github.com/users/R4PaSs/repos","events_url":"https://api.github.com/users/R4PaSs/events{/privacy}","received_events_url":"https://api.github.com/users/R4PaSs/received_events","type":"User","site_admin":false},"repo":{"id":4930337,"name":"nit","full_name":"R4PaSs/nit","owner":{"login":"R4PaSs","id":1444825,"avatar_url":"https://avatars.githubusercontent.com/u/1444825?v=3","gravatar_id":"","url":"https://api.github.com/users/R4PaSs","html_url":"https://github.com/R4PaSs","followers_url":"https://api.github.com/users/R4PaSs/followers","following_url":"https://api.github.com/users/R4PaSs/following{/other_user}","gists_url":"https://api.github.com/users/R4PaSs/gists{/gist_id}","starred_url":"https://api.github.com/users/R4PaSs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/R4PaSs/subscriptions","organizations_url":"https://api.github.com/users/R4PaSs/orgs","repos_url":"https://api.github.com/users/R4PaSs/repos","events_url":"https://api.github.com/users/R4PaSs/events{/privacy}","received_events_url":"https://api.github.com/users/R4PaSs/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/R4PaSs/nit","description":"Nit language","fork":true,"url":"https://api.github.com/repos/R4PaSs/nit","forks_url":"https://api.github.com/repos/R4PaSs/nit/forks","keys_url":"https://api.github.com/repos/R4PaSs/nit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/R4PaSs/nit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/R4PaSs/nit/teams","hooks_url":"https://api.github.com/repos/R4PaSs/nit/hooks","issue_events_url":"https://api.github.com/repos/R4PaSs/nit/issues/events{/number}","events_url":"https://api.github.com/repos/R4PaSs/nit/events","assignees_url":"https://api.github.com/repos/R4PaSs/nit/assignees{/user}","branches_url":"https://api.github.com/repos/R4PaSs/nit/branches{/branch}","tags_url":"https://api.github.com/repos/R4PaSs/nit/tags","blobs_url":"https://api.github.com/repos/R4PaSs/nit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/R4PaSs/nit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/R4PaSs/nit/git/refs{/sha}","trees_url":"https://api.github.com/repos/R4PaSs/nit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/R4PaSs/nit/statuses/{sha}","languages_url":"https://api.github.com/repos/R4PaSs/nit/languages","stargazers_url":"https://api.github.com/repos/R4PaSs/nit/stargazers","contributors_url":"https://api.github.com/repos/R4PaSs/nit/contributors","subscribers_url":"https://api.github.com/repos/R4PaSs/nit/subscribers","subscription_url":"https://api.github.com/repos/R4PaSs/nit/subscription","commits_url":"https://api.github.com/repos/R4PaSs/nit/commits{/sha}","git_commits_url":"https://api.github.com/repos/R4PaSs/nit/git/commits{/sha}","comments_url":"https://api.github.com/repos/R4PaSs/nit/comments{/number}","issue_comment_url":"https://api.github.com/repos/R4PaSs/nit/issues/comments{/number}","contents_url":"https://api.github.com/repos/R4PaSs/nit/contents/{+path}","compare_url":"https://api.github.com/repos/R4PaSs/nit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/R4PaSs/nit/merges","archive_url":"https://api.github.com/repos/R4PaSs/nit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/R4PaSs/nit/downloads","issues_url":"https://api.github.com/repos/R4PaSs/nit/issues{/number}","pulls_url":"https://api.github.com/repos/R4PaSs/nit/pulls{/number}","milestones_url":"https://api.github.com/repos/R4PaSs/nit/milestones{/number}","notifications_url":"https://api.github.com/repos/R4PaSs/nit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/R4PaSs/nit/labels{/name}","releases_url":"https://api.github.com/repos/R4PaSs/nit/releases{/id}","created_at":"2012-07-06T19:56:01Z","updated_at":"2014-12-09T16:44:12Z","pushed_at":"2015-05-20T13:53:11Z","git_url":"git://github.com/R4PaSs/nit.git","ssh_url":"git@github.com:R4PaSs/nit.git","clone_url":"https://github.com/R4PaSs/nit.git","svn_url":"https://github.com/R4PaSs/nit","homepage":"http://nitlanguage.org","size":61582,"stargazers_count":2,"watchers_count":2,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":2,"default_branch":"master"}},"base":{"label":"privat:master","ref":"master","sha":"2309d9308454a540fca94e325713c126c9082e8b","user":{"login":"privat","id":135828,"avatar_url":"https://avatars.githubusercontent.com/u/135828?v=3","gravatar_id":"","url":"https://api.github.com/users/privat","html_url":"https://github.com/privat","followers_url":"https://api.github.com/users/privat/followers","following_url":"https://api.github.com/users/privat/following{/other_user}","gists_url":"https://api.github.com/users/privat/gists{/gist_id}","starred_url":"https://api.github.com/users/privat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/privat/subscriptions","organizations_url":"https://api.github.com/users/privat/orgs","repos_url":"https://api.github.com/users/privat/repos","events_url":"https://api.github.com/users/privat/events{/privacy}","received_events_url":"https://api.github.com/users/privat/received_events","type":"User","site_admin":false},"repo":{"id":328597,"name":"nit","full_name":"privat/nit","owner":{"login":"privat","id":135828,"avatar_url":"https://avatars.githubusercontent.com/u/135828?v=3","gravatar_id":"","url":"https://api.github.com/users/privat","html_url":"https://github.com/privat","followers_url":"https://api.github.com/users/privat/followers","following_url":"https://api.github.com/users/privat/following{/other_user}","gists_url":"https://api.github.com/users/privat/gists{/gist_id}","starred_url":"https://api.github.com/users/privat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/privat/subscriptions","organizations_url":"https://api.github.com/users/privat/orgs","repos_url":"https://api.github.com/users/privat/repos","events_url":"https://api.github.com/users/privat/events{/privacy}","received_events_url":"https://api.github.com/users/privat/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/privat/nit","description":"Nit language","fork":false,"url":"https://api.github.com/repos/privat/nit","forks_url":"https://api.github.com/repos/privat/nit/forks","keys_url":"https://api.github.com/repos/privat/nit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/privat/nit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/privat/nit/teams","hooks_url":"https://api.github.com/repos/privat/nit/hooks","issue_events_url":"https://api.github.com/repos/privat/nit/issues/events{/number}","events_url":"https://api.github.com/repos/privat/nit/events","assignees_url":"https://api.github.com/repos/privat/nit/assignees{/user}","branches_url":"https://api.github.com/repos/privat/nit/branches{/branch}","tags_url":"https://api.github.com/repos/privat/nit/tags","blobs_url":"https://api.github.com/repos/privat/nit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/privat/nit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/privat/nit/git/refs{/sha}","trees_url":"https://api.github.com/repos/privat/nit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/privat/nit/statuses/{sha}","languages_url":"https://api.github.com/repos/privat/nit/languages","stargazers_url":"https://api.github.com/repos/privat/nit/stargazers","contributors_url":"https://api.github.com/repos/privat/nit/contributors","subscribers_url":"https://api.github.com/repos/privat/nit/subscribers","subscription_url":"https://api.github.com/repos/privat/nit/subscription","commits_url":"https://api.github.com/repos/privat/nit/commits{/sha}","git_commits_url":"https://api.github.com/repos/privat/nit/git/commits{/sha}","comments_url":"https://api.github.com/repos/privat/nit/comments{/number}","issue_comment_url":"https://api.github.com/repos/privat/nit/issues/comments{/number}","contents_url":"https://api.github.com/repos/privat/nit/contents/{+path}","compare_url":"https://api.github.com/repos/privat/nit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/privat/nit/merges","archive_url":"https://api.github.com/repos/privat/nit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/privat/nit/downloads","issues_url":"https://api.github.com/repos/privat/nit/issues{/number}","pulls_url":"https://api.github.com/repos/privat/nit/pulls{/number}","milestones_url":"https://api.github.com/repos/privat/nit/milestones{/number}","notifications_url":"https://api.github.com/repos/privat/nit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/privat/nit/labels{/name}","releases_url":"https://api.github.com/repos/privat/nit/releases{/id}","created_at":"2009-10-06T15:03:00Z","updated_at":"2015-05-08T11:40:18Z","pushed_at":"2015-05-20T14:07:05Z","git_url":"git://github.com/privat/nit.git","ssh_url":"git@github.com:privat/nit.git","clone_url":"https://github.com/privat/nit.git","svn_url":"https://github.com/privat/nit","homepage":"http://nitlanguage.org","size":85674,"stargazers_count":65,"watchers_count":65,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":40,"mirror_url":null,"open_issues_count":115,"forks":40,"open_issues":115,"watchers":65,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/privat/nit/pulls/1309"},"html":{"href":"https://github.com/privat/nit/pull/1309"},"issue":{"href":"https://api.github.com/repos/privat/nit/issues/1309"},"comments":{"href":"https://api.github.com/repos/privat/nit/issues/1309/comments"},"review_comments":{"href":"https://api.github.com/repos/privat/nit/pulls/1309/comments"},"review_comment":{"href":"https://api.github.com/repos/privat/nit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/privat/nit/pulls/1309/commits"},"statuses":{"href":"https://api.github.com/repos/privat/nit/statuses/a58f9f346209964ef8bf8bbe9edbe717d92b629c"}}}}