{"action":"created","issue":{"url":"https://api.github.com/repos/mafintosh/hyperdrive/issues/2","labels_url":"https://api.github.com/repos/mafintosh/hyperdrive/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/mafintosh/hyperdrive/issues/2/comments","events_url":"https://api.github.com/repos/mafintosh/hyperdrive/issues/2/events","html_url":"https://github.com/mafintosh/hyperdrive/issues/2","id":120494474,"number":2,"title":"crash on feed access","user":{"login":"maxogden","id":39759,"avatar_url":"https://avatars.githubusercontent.com/u/39759?v=3","gravatar_id":"","url":"https://api.github.com/users/maxogden","html_url":"https://github.com/maxogden","followers_url":"https://api.github.com/users/maxogden/followers","following_url":"https://api.github.com/users/maxogden/following{/other_user}","gists_url":"https://api.github.com/users/maxogden/gists{/gist_id}","starred_url":"https://api.github.com/users/maxogden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxogden/subscriptions","organizations_url":"https://api.github.com/users/maxogden/orgs","repos_url":"https://api.github.com/users/maxogden/repos","events_url":"https://api.github.com/users/maxogden/events{/privacy}","received_events_url":"https://api.github.com/users/maxogden/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-12-04T21:56:12Z","updated_at":"2015-12-05T19:46:59Z","closed_at":"2015-12-05T02:17:36Z","body":"when we asked for `feed.get` for an index that didnt exist:\r\n\r\n```\r\nundefined:5\r\n  if (!end) end = buf.length\r\n                     ^\r\n\r\nTypeError: Cannot read property 'length' of null\r\n    at Object.decode (eval at <anonymous> (/Users/max/src/js/hyperdrive/node_modules/protocol-buffers/node_modules/generate-function/index.js:55:21), <anonymous>:5:22)\r\n    at /Users/max/src/js/hyperdrive/lib/feed.js:61:32\r\n    at /Users/max/src/js/hyperdrive/lib/feed.js:42:71\r\n    at apply (/Users/max/src/js/hyperdrive/node_modules/thunky/index.js:16:28)\r\n    at Feed.open (/Users/max/src/js/hyperdrive/node_modules/thunky/index.js:27:3)\r\n    at Feed.get (/Users/max/src/js/hyperdrive/lib/feed.js:41:8)\r\n    at downloadNext (/Users/max/src/js/dat/index.js:106:10)\r\n    at /Users/max/src/js/dat/index.js:127:9\r\n    at done (/Users/max/src/js/run-series/index.js:11:7)\r\n    at Object.cb (/Users/max/src/js/dat/index.js:117:15)\r\n```"},"comment":{"url":"https://api.github.com/repos/mafintosh/hyperdrive/issues/comments/162240632","html_url":"https://github.com/mafintosh/hyperdrive/issues/2#issuecomment-162240632","issue_url":"https://api.github.com/repos/mafintosh/hyperdrive/issues/2","id":162240632,"user":{"login":"maxogden","id":39759,"avatar_url":"https://avatars.githubusercontent.com/u/39759?v=3","gravatar_id":"","url":"https://api.github.com/users/maxogden","html_url":"https://github.com/maxogden","followers_url":"https://api.github.com/users/maxogden/followers","following_url":"https://api.github.com/users/maxogden/following{/other_user}","gists_url":"https://api.github.com/users/maxogden/gists{/gist_id}","starred_url":"https://api.github.com/users/maxogden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxogden/subscriptions","organizations_url":"https://api.github.com/users/maxogden/orgs","repos_url":"https://api.github.com/users/maxogden/repos","events_url":"https://api.github.com/users/maxogden/events{/privacy}","received_events_url":"https://api.github.com/users/maxogden/received_events","type":"User","site_admin":false},"created_at":"2015-12-05T19:46:59Z","updated_at":"2015-12-05T19:46:59Z","body":"@mafintosh @karissa and I were wondering if you were gonna do a stream interface. currently fetch blocks in series https://github.com/maxogden/dat/blob/9fc1d9eb2abdf07b3729e4c59fd12d894af21c98/index.js#L105 but some level of parallelism would be better (as long as you can buffer the ones that come in out of order in memory until its their turn to be written). If you can come up with a good abstraction that lets you set the paralellism i think it is fine to put a block stream into hyperdrive"}}