Live data from Hacker News

How I want to write Node: Stream all the things

caolanmcmahon.com

1–10 of 118 posts

Re: How I want to write Node: Stream all the things

#3
Forgive me for being "That Guy" but I really think Javascript is ill-suited for this paradigm!

Streams, honestly, are hard to keep straight when the program gets big without a stronger type system. IMHO.

Some really sharp people have been working on stream computing software in Haskell for a while - Gabriel's Pipes package is a good example of generalized stream computing with strong equational reasoning as its foundation.

Maybe if you really want to try and do this in Node you can gain some inspiration from his journey: http://hackage.haskell.org/package/pipes

Re: How I want to write Node: Stream all the things

#4
post #2

This sounds intriguing. I wish there were some more complex examples. Part of the greatness of Promises is taking a big chunk of pyramid code and turning it into a set of simple steps... I'd like to see how this would handle that.

Loads of examples at http://highlandjs.org/.

Re: How I want to write Node: Stream all the things

#5
post #2

This sounds intriguing. I wish there were some more complex examples. Part of the greatness of Promises is taking a big chunk of pyramid code and turning it into a set of simple steps... I'd like to see how this would handle that.

Good idea, I'll definitely post a follow-up with some real code done using async/callbacks and highland/streams. The comparisons usually start to look more favourable with longer examples, due to the Highland API being so composable.

Re: How I want to write Node: Stream all the things

#8
I get that arrays are meant to stand in for more asynchronous sources of data but those things seem so different to me that I don't understand why you'd want a library that treats them the same. If you need to map an array that's taken care of. I know I'm being dense, I just don't get it.

Re: How I want to write Node: Stream all the things

#10
This is highly intriguing, but I must ask why the JS community has this fascination with obscure identifiers like "_". It decreases readability when what should be a logically-chosen descriptive identifier for your class is replaced with a single character that visually recedes into the language syntax. Edit: I've grudgingly given jquery a pass on this because of its ubiquity, but come on, a stream library? Not to mention the fact that a reasonably popular lib already seems to have squatted on underscore.
Post reply on HN