You are reading content from Scuttlebutt
@dan %p2UNCp7kQF7JdI7mvjehqW6omqPB6NEPdA1uRfKrNs4=.sha256

https://github.com/dominictarr/pull-stream-examples/blob/master/pull.js

pull-streams don't really have a writable stream per se. "writable" implys that
the writer is the active partner, and the stream which is written to is passive.
(like you are when you watch TV. the TV writes its lies into neocortex via your retinas)

instead of a writable, pull streams have a "sink", that is a reader.
here the reader is the active party, actively consuming more data.
When you read a book, you are in control, and must actively turn the pages to get more information.
so, a sink is a function that you pass a source to,
which then reads from that function until it gets to the end or decides to stop.

by @dominic

@Dominic %OiWOmuiAR+MNG9yDWkCFjSXyE3UJlZNEZGUoRq4bSdE=.sha256

note: pull-streams are harmonious, because they combine a yang api (reader) with a yin api (readable). try to have a balanced proportion of 'ers and 'ables in your system. pull-streams do this well because every flowing pipeline has a equal number of yins and yangs. Every stream starts with a yin as it's source, and ends in a yang as it's sink. It may go through any number of transform streams, each is a yang that returns a yin. A duplex stream is yin and yang side by side.

@mikey %kiEjkBSHZN2PhEKh/LGpfKzCQBg5ZJyDpUUxFJ1ou4E=.sha256

for the record, this quote from pull-stream-examples is what opened my eyes to a style of documentation that is informative, accessible, and yet hella subversive. i aspire to write documentation like this, i wish our Scuttlebutt documentation could be this good. :cat:

Join Scuttlebutt now