you can put the stream in `objectMode` and then calling `.push("")` will
append a the literal value `""` to the internal buffer. So calling
`.read()` will return "".

Of course in objectMode there is no buffer concatenation so you can't do
`read(bytes)`


On Fri, Mar 29, 2013 at 10:57 AM, Mark Hahn <[email protected]> wrote:

> > How is an empty string "no data"?
>
> +1
>
> In general, if I tell something to do something then it should do
> something.  I hate SW that tries to be clever and override me.
>
>
> On Fri, Mar 29, 2013 at 10:54 AM, Marco Rogers <[email protected]>wrote:
>
>> Is that a real question? Let me repeat, I know the arguments. But
>> consider it from a socket standpoint. The empty string is converted to a
>> Buffer. That buffer has zero length and no bytes in it. It's reasonable for
>> the underlying system to determine that there is nothing to do. The
>> question I'm bringing up, and just bringing up mind you because I have no
>> stomach to argue about it, is whether this reasonable assumption belongs at
>> the level of the streams api.
>>
>> And again, I've done no research whatsoever into this. What I'm talking
>> about may not even be the problem here. Just talking out loud while I avoid
>> doing actual work. Please carry on.
>>
>> :Marco
>>
>>
>>
>> On Fri, Mar 29, 2013 at 10:50 AM, Matt <[email protected]> wrote:
>>
>>>
>>> On Fri, Mar 29, 2013 at 1:42 PM, Marco Rogers <[email protected]>wrote:
>>>
>>>> I'm not sure why this stopped working. But I'm also not sure why you
>>>> would expect pushing no data to do something. Don't get me wrong, I
>>>> understand the argument. I just don't know which behavior really makes the
>>>> most sense. There's an argument that the new behavior is better.
>>>>
>>>
>>> How is an empty string "no data"?
>>>
>>> --
>>> --
>>> Job Board: http://jobs.nodejs.org/
>>> Posting guidelines:
>>> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
>>> You received this message because you are subscribed to the Google
>>> Groups "nodejs" group.
>>> To post to this group, send email to [email protected]
>>> To unsubscribe from this group, send email to
>>> [email protected]
>>> For more options, visit this group at
>>> http://groups.google.com/group/nodejs?hl=en?hl=en
>>>
>>> ---
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "nodejs" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/nodejs/xzt5CLqIJe0/unsubscribe?hl=en.
>>> To unsubscribe from this group and all its topics, send an email to
>>> [email protected].
>>>
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>>
>>>
>>
>>
>>
>> --
>> Marco Rogers
>> [email protected] | https://twitter.com/polotek
>>
>> Life is ten percent what happens to you and ninety percent how you
>> respond to it.
>> - Lou Holtz
>>
>> --
>> --
>> Job Board: http://jobs.nodejs.org/
>> Posting guidelines:
>> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
>> You received this message because you are subscribed to the Google
>> Groups "nodejs" group.
>> To post to this group, send email to [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]
>> For more options, visit this group at
>> http://groups.google.com/group/nodejs?hl=en?hl=en
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "nodejs" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>  --
> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "nodejs" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to