{"action":"created","comment":{"url":"https://api.github.com/repos/rdfjs/representation-task-force/pulls/comments/56903179","id":56903179,"diff_hunk":"@@ -117,3 +117,56 @@ Triples always have `.graph` set to DefaultGraph.\n - `DefaultGraph .defaultGraph()` returns an instance of DefaultGraph.\n - `Triple .triple(Term subject, Term predicate, Term object, [Term graph])` returns a new instance of Triple.\n - `Quad .quad(Term subject, Term predicate, Term object, [Term graph])` returns a new instance of Quad.\n+\n+## Stream interfaces\n+\n+Streams are used only in a readable manner.\n+This requires only a single queue per stream, which simplifies implementations and doesn't have performance drawbacks, compared to writeable streams.\n+\n+### Stream extends EventEmitter\n+\n+**Methods:**\n+\n+- `Quad .read()`\n+  This method pulls a quad out of the internal buffer and returns it.\n+  If there is no quad available, then it will return null. \n+\n+**Events:**\n+\n+- `readable`\n+  When a quad can be read from the stream, it will emit this event. \n+\n+- `end`\n+  This event fires when there will be no more quads to read.\n+\n+- `error`\n+  This event fires if any error occurs.\n+  The error message is forwarded to the event listener.\n+\n+- `data`\n+  This event is emitted for every quad that can be read from the stream.\n+  The quad is forwarded to the event listener.\n+\n+### Source\n+\n+- `Stream .read([Term|RegExp subject], [Term|RegExp predicate], [Term|RegExp object], [Term|RegExp graph])`\n+  Returns a stream that processes all quads matching the pattern.\n+\n+### Sink\n+\n+- `undefined .write(Stream stream)`","path":"interface-spec.md","position":41,"original_position":41,"commit_id":"45fa997731f0769217d28f4fd28b7ef19142f66e","original_commit_id":"45fa997731f0769217d28f4fd28b7ef19142f66e","user":{"login":"bergos","id":626142,"avatar_url":"https://avatars.githubusercontent.com/u/626142?v=3","gravatar_id":"","url":"https://api.github.com/users/bergos","html_url":"https://github.com/bergos","followers_url":"https://api.github.com/users/bergos/followers","following_url":"https://api.github.com/users/bergos/following{/other_user}","gists_url":"https://api.github.com/users/bergos/gists{/gist_id}","starred_url":"https://api.github.com/users/bergos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bergos/subscriptions","organizations_url":"https://api.github.com/users/bergos/orgs","repos_url":"https://api.github.com/users/bergos/repos","events_url":"https://api.github.com/users/bergos/events{/privacy}","received_events_url":"https://api.github.com/users/bergos/received_events","type":"User","site_admin":false},"body":"The `.write` method could be confusing. It's more like a reverse `.pipe`, but that method name should be reserved, because some classes may implemented full featured streams. Another proposed method name was `.consume`.\r\n\r\nIt's the same for `.read`. Reading triples from a source could be also described as writing all triples from the source to a stream. `.filter` could be used, but would be confusing if the filter feature isn't used.","created_at":"2016-03-21T21:44:04Z","updated_at":"2016-03-21T21:44:04Z","html_url":"https://github.com/rdfjs/representation-task-force/pull/55#discussion_r56903179","pull_request_url":"https://api.github.com/repos/rdfjs/representation-task-force/pulls/55","_links":{"self":{"href":"https://api.github.com/repos/rdfjs/representation-task-force/pulls/comments/56903179"},"html":{"href":"https://github.com/rdfjs/representation-task-force/pull/55#discussion_r56903179"},"pull_request":{"href":"https://api.github.com/repos/rdfjs/representation-task-force/pulls/55"}}},"pull_request":{"url":"https://api.github.com/repos/rdfjs/representation-task-force/pulls/55","id":63378215,"html_url":"https://github.com/rdfjs/representation-task-force/pull/55","diff_url":"https://github.com/rdfjs/representation-task-force/pull/55.diff","patch_url":"https://github.com/rdfjs/representation-task-force/pull/55.patch","issue_url":"https://api.github.com/repos/rdfjs/representation-task-force/issues/55","number":55,"state":"open","locked":false,"title":"added initial draft for stream interfaces","user":{"login":"bergos","id":626142,"avatar_url":"https://avatars.githubusercontent.com/u/626142?v=3","gravatar_id":"","url":"https://api.github.com/users/bergos","html_url":"https://github.com/bergos","followers_url":"https://api.github.com/users/bergos/followers","following_url":"https://api.github.com/users/bergos/following{/other_user}","gists_url":"https://api.github.com/users/bergos/gists{/gist_id}","starred_url":"https://api.github.com/users/bergos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bergos/subscriptions","organizations_url":"https://api.github.com/users/bergos/orgs","repos_url":"https://api.github.com/users/bergos/repos","events_url":"https://api.github.com/users/bergos/events{/privacy}","received_events_url":"https://api.github.com/users/bergos/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-03-18T14:02:48Z","updated_at":"2016-03-21T21:44:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7f563ede350c62c3cc8c83ed3301a5e84068a91d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rdfjs/representation-task-force/pulls/55/commits","review_comments_url":"https://api.github.com/repos/rdfjs/representation-task-force/pulls/55/comments","review_comment_url":"https://api.github.com/repos/rdfjs/representation-task-force/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rdfjs/representation-task-force/issues/55/comments","statuses_url":"https://api.github.com/repos/rdfjs/representation-task-force/statuses/45fa997731f0769217d28f4fd28b7ef19142f66e","head":{"label":"bergos:stream","ref":"stream","sha":"45fa997731f0769217d28f4fd28b7ef19142f66e","user":{"login":"bergos","id":626142,"avatar_url":"https://avatars.githubusercontent.com/u/626142?v=3","gravatar_id":"","url":"https://api.github.com/users/bergos","html_url":"https://github.com/bergos","followers_url":"https://api.github.com/users/bergos/followers","following_url":"https://api.github.com/users/bergos/following{/other_user}","gists_url":"https://api.github.com/users/bergos/gists{/gist_id}","starred_url":"https://api.github.com/users/bergos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bergos/subscriptions","organizations_url":"https://api.github.com/users/bergos/orgs","repos_url":"https://api.github.com/users/bergos/repos","events_url":"https://api.github.com/users/bergos/events{/privacy}","received_events_url":"https://api.github.com/users/bergos/received_events","type":"User","site_admin":false},"repo":{"id":47921844,"name":"representation-task-force","full_name":"bergos/representation-task-force","owner":{"login":"bergos","id":626142,"avatar_url":"https://avatars.githubusercontent.com/u/626142?v=3","gravatar_id":"","url":"https://api.github.com/users/bergos","html_url":"https://github.com/bergos","followers_url":"https://api.github.com/users/bergos/followers","following_url":"https://api.github.com/users/bergos/following{/other_user}","gists_url":"https://api.github.com/users/bergos/gists{/gist_id}","starred_url":"https://api.github.com/users/bergos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bergos/subscriptions","organizations_url":"https://api.github.com/users/bergos/orgs","repos_url":"https://api.github.com/users/bergos/repos","events_url":"https://api.github.com/users/bergos/events{/privacy}","received_events_url":"https://api.github.com/users/bergos/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bergos/representation-task-force","description":"The RDFJS Representation Task Force creates specifications for JavaScript RDF library interoperability.","fork":true,"url":"https://api.github.com/repos/bergos/representation-task-force","forks_url":"https://api.github.com/repos/bergos/representation-task-force/forks","keys_url":"https://api.github.com/repos/bergos/representation-task-force/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bergos/representation-task-force/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bergos/representation-task-force/teams","hooks_url":"https://api.github.com/repos/bergos/representation-task-force/hooks","issue_events_url":"https://api.github.com/repos/bergos/representation-task-force/issues/events{/number}","events_url":"https://api.github.com/repos/bergos/representation-task-force/events","assignees_url":"https://api.github.com/repos/bergos/representation-task-force/assignees{/user}","branches_url":"https://api.github.com/repos/bergos/representation-task-force/branches{/branch}","tags_url":"https://api.github.com/repos/bergos/representation-task-force/tags","blobs_url":"https://api.github.com/repos/bergos/representation-task-force/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bergos/representation-task-force/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bergos/representation-task-force/git/refs{/sha}","trees_url":"https://api.github.com/repos/bergos/representation-task-force/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bergos/representation-task-force/statuses/{sha}","languages_url":"https://api.github.com/repos/bergos/representation-task-force/languages","stargazers_url":"https://api.github.com/repos/bergos/representation-task-force/stargazers","contributors_url":"https://api.github.com/repos/bergos/representation-task-force/contributors","subscribers_url":"https://api.github.com/repos/bergos/representation-task-force/subscribers","subscription_url":"https://api.github.com/repos/bergos/representation-task-force/subscription","commits_url":"https://api.github.com/repos/bergos/representation-task-force/commits{/sha}","git_commits_url":"https://api.github.com/repos/bergos/representation-task-force/git/commits{/sha}","comments_url":"https://api.github.com/repos/bergos/representation-task-force/comments{/number}","issue_comment_url":"https://api.github.com/repos/bergos/representation-task-force/issues/comments{/number}","contents_url":"https://api.github.com/repos/bergos/representation-task-force/contents/{+path}","compare_url":"https://api.github.com/repos/bergos/representation-task-force/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bergos/representation-task-force/merges","archive_url":"https://api.github.com/repos/bergos/representation-task-force/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bergos/representation-task-force/downloads","issues_url":"https://api.github.com/repos/bergos/representation-task-force/issues{/number}","pulls_url":"https://api.github.com/repos/bergos/representation-task-force/pulls{/number}","milestones_url":"https://api.github.com/repos/bergos/representation-task-force/milestones{/number}","notifications_url":"https://api.github.com/repos/bergos/representation-task-force/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bergos/representation-task-force/labels{/name}","releases_url":"https://api.github.com/repos/bergos/representation-task-force/releases{/id}","deployments_url":"https://api.github.com/repos/bergos/representation-task-force/deployments","created_at":"2015-12-13T14:13:59Z","updated_at":"2016-01-29T15:58:08Z","pushed_at":"2016-03-18T14:01:08Z","git_url":"git://github.com/bergos/representation-task-force.git","ssh_url":"git@github.com:bergos/representation-task-force.git","clone_url":"https://github.com/bergos/representation-task-force.git","svn_url":"https://github.com/bergos/representation-task-force","homepage":"http://rdfjs.org/","size":776,"stargazers_count":0,"watchers_count":0,"language":null,"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":"rdfjs:master","ref":"master","sha":"f3197c3187cec460f7e77dc48579319aed1f7375","user":{"login":"rdfjs","id":6156399,"avatar_url":"https://avatars.githubusercontent.com/u/6156399?v=3","gravatar_id":"","url":"https://api.github.com/users/rdfjs","html_url":"https://github.com/rdfjs","followers_url":"https://api.github.com/users/rdfjs/followers","following_url":"https://api.github.com/users/rdfjs/following{/other_user}","gists_url":"https://api.github.com/users/rdfjs/gists{/gist_id}","starred_url":"https://api.github.com/users/rdfjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rdfjs/subscriptions","organizations_url":"https://api.github.com/users/rdfjs/orgs","repos_url":"https://api.github.com/users/rdfjs/repos","events_url":"https://api.github.com/users/rdfjs/events{/privacy}","received_events_url":"https://api.github.com/users/rdfjs/received_events","type":"Organization","site_admin":false},"repo":{"id":46638608,"name":"representation-task-force","full_name":"rdfjs/representation-task-force","owner":{"login":"rdfjs","id":6156399,"avatar_url":"https://avatars.githubusercontent.com/u/6156399?v=3","gravatar_id":"","url":"https://api.github.com/users/rdfjs","html_url":"https://github.com/rdfjs","followers_url":"https://api.github.com/users/rdfjs/followers","following_url":"https://api.github.com/users/rdfjs/following{/other_user}","gists_url":"https://api.github.com/users/rdfjs/gists{/gist_id}","starred_url":"https://api.github.com/users/rdfjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rdfjs/subscriptions","organizations_url":"https://api.github.com/users/rdfjs/orgs","repos_url":"https://api.github.com/users/rdfjs/repos","events_url":"https://api.github.com/users/rdfjs/events{/privacy}","received_events_url":"https://api.github.com/users/rdfjs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rdfjs/representation-task-force","description":"The RDFJS Representation Task Force creates specifications for JavaScript RDF library interoperability.","fork":false,"url":"https://api.github.com/repos/rdfjs/representation-task-force","forks_url":"https://api.github.com/repos/rdfjs/representation-task-force/forks","keys_url":"https://api.github.com/repos/rdfjs/representation-task-force/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rdfjs/representation-task-force/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rdfjs/representation-task-force/teams","hooks_url":"https://api.github.com/repos/rdfjs/representation-task-force/hooks","issue_events_url":"https://api.github.com/repos/rdfjs/representation-task-force/issues/events{/number}","events_url":"https://api.github.com/repos/rdfjs/representation-task-force/events","assignees_url":"https://api.github.com/repos/rdfjs/representation-task-force/assignees{/user}","branches_url":"https://api.github.com/repos/rdfjs/representation-task-force/branches{/branch}","tags_url":"https://api.github.com/repos/rdfjs/representation-task-force/tags","blobs_url":"https://api.github.com/repos/rdfjs/representation-task-force/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rdfjs/representation-task-force/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rdfjs/representation-task-force/git/refs{/sha}","trees_url":"https://api.github.com/repos/rdfjs/representation-task-force/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rdfjs/representation-task-force/statuses/{sha}","languages_url":"https://api.github.com/repos/rdfjs/representation-task-force/languages","stargazers_url":"https://api.github.com/repos/rdfjs/representation-task-force/stargazers","contributors_url":"https://api.github.com/repos/rdfjs/representation-task-force/contributors","subscribers_url":"https://api.github.com/repos/rdfjs/representation-task-force/subscribers","subscription_url":"https://api.github.com/repos/rdfjs/representation-task-force/subscription","commits_url":"https://api.github.com/repos/rdfjs/representation-task-force/commits{/sha}","git_commits_url":"https://api.github.com/repos/rdfjs/representation-task-force/git/commits{/sha}","comments_url":"https://api.github.com/repos/rdfjs/representation-task-force/comments{/number}","issue_comment_url":"https://api.github.com/repos/rdfjs/representation-task-force/issues/comments{/number}","contents_url":"https://api.github.com/repos/rdfjs/representation-task-force/contents/{+path}","compare_url":"https://api.github.com/repos/rdfjs/representation-task-force/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rdfjs/representation-task-force/merges","archive_url":"https://api.github.com/repos/rdfjs/representation-task-force/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rdfjs/representation-task-force/downloads","issues_url":"https://api.github.com/repos/rdfjs/representation-task-force/issues{/number}","pulls_url":"https://api.github.com/repos/rdfjs/representation-task-force/pulls{/number}","milestones_url":"https://api.github.com/repos/rdfjs/representation-task-force/milestones{/number}","notifications_url":"https://api.github.com/repos/rdfjs/representation-task-force/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rdfjs/representation-task-force/labels{/name}","releases_url":"https://api.github.com/repos/rdfjs/representation-task-force/releases{/id}","deployments_url":"https://api.github.com/repos/rdfjs/representation-task-force/deployments","created_at":"2015-11-21T23:37:47Z","updated_at":"2016-03-09T20:04:22Z","pushed_at":"2016-03-18T14:02:48Z","git_url":"git://github.com/rdfjs/representation-task-force.git","ssh_url":"git@github.com:rdfjs/representation-task-force.git","clone_url":"https://github.com/rdfjs/representation-task-force.git","svn_url":"https://github.com/rdfjs/representation-task-force","homepage":"http://rdfjs.org/","size":775,"stargazers_count":17,"watchers_count":17,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":28,"forks":6,"open_issues":28,"watchers":17,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rdfjs/representation-task-force/pulls/55"},"html":{"href":"https://github.com/rdfjs/representation-task-force/pull/55"},"issue":{"href":"https://api.github.com/repos/rdfjs/representation-task-force/issues/55"},"comments":{"href":"https://api.github.com/repos/rdfjs/representation-task-force/issues/55/comments"},"review_comments":{"href":"https://api.github.com/repos/rdfjs/representation-task-force/pulls/55/comments"},"review_comment":{"href":"https://api.github.com/repos/rdfjs/representation-task-force/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rdfjs/representation-task-force/pulls/55/commits"},"statuses":{"href":"https://api.github.com/repos/rdfjs/representation-task-force/statuses/45fa997731f0769217d28f4fd28b7ef19142f66e"}}}}