News for hackers. Stuff that matters.
Re:Node Streams: How do they work? by tantalor on Tuesday April 17, 2012 @11:14PM (#3856291)
Had to look that up,

> A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. http://nodejs.org/docs/v0.3.1/api/buffers.html

Are streams limited to binary buffers, or may they also emit JavaScript objects or primitives? Binary may be great for low-level I/O streams, but I'd expect more nuanced events for high-level streams.

Re:Node Streams: How do they work? by maxogden on Tuesday April 17, 2012 @11:20PM (#3856309)
You can emit anything but it just so happens that 99% of the streams used in node core are Buffers for performance reasons (Buffers are allocated outside of V8's heap). An example of emitting objects is in here https://github.com/maxogden/dominode/blob/master/example.htm...