{"action":"opened","issue":{"url":"https://api.github.com/repos/ztellman/manifold/issues/144","repository_url":"https://api.github.com/repos/ztellman/manifold","labels_url":"https://api.github.com/repos/ztellman/manifold/issues/144/labels{/name}","comments_url":"https://api.github.com/repos/ztellman/manifold/issues/144/comments","events_url":"https://api.github.com/repos/ztellman/manifold/issues/144/events","html_url":"https://github.com/ztellman/manifold/issues/144","id":261880164,"number":144,"title":"joining streams - best practices","user":{"login":"mccraigmccraig","id":29339,"avatar_url":"https://avatars1.githubusercontent.com/u/29339?v=4","gravatar_id":"","url":"https://api.github.com/users/mccraigmccraig","html_url":"https://github.com/mccraigmccraig","followers_url":"https://api.github.com/users/mccraigmccraig/followers","following_url":"https://api.github.com/users/mccraigmccraig/following{/other_user}","gists_url":"https://api.github.com/users/mccraigmccraig/gists{/gist_id}","starred_url":"https://api.github.com/users/mccraigmccraig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mccraigmccraig/subscriptions","organizations_url":"https://api.github.com/users/mccraigmccraig/orgs","repos_url":"https://api.github.com/users/mccraigmccraig/repos","events_url":"https://api.github.com/users/mccraigmccraig/events{/privacy}","received_events_url":"https://api.github.com/users/mccraigmccraig/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-09-30T23:38:57Z","updated_at":"2017-09-30T23:38:57Z","closed_at":null,"author_association":"NONE","body":"i have a need to join some streams\r\n - to produce a new sorted stream from some streams sorted by the same key (i.e. the merge phase of a merge-sort)\r\n - to join associated records from some streams sorted by the same key - i.e. the join from a sort-merge join\r\n\r\nthe best approach i've come up with so far (which doesn't blow the stack with callbacks), is to use an intermediate stream and have a consumer of that forward output values to the output stream and put the next value on to the intermediate stream\r\n\r\nthis works, but it seems awkward - am i missing something ?\r\n\r\nhere's the core fn\r\n\r\nhttps://gist.github.com/mccraigmccraig/67bd74b4bb306631cd7e868d3a854b32\r\n\r\nand the context\r\n\r\nhttps://gist.github.com/mccraigmccraig/12027eb01be94459240193e69d7c1519"}}
{"actor":{"display_login":"mccraigmccraig"}}