Ok, gentlemen, let's take the intensity down a notch here... :)
Streamline is great. It's super useful to Bruno and some other people. All software is awesome, and you all do wonderful work. As Bruno pointed out in his blog http://bjouhier.wordpress.com/2013/04/27/nodes-social-pariahs/ he's not in the business of writing npm modules, and if he was, he'd think twice before writing them with Streamline. Though, to be fair, as long as you *publish* JavaScript, it's perfectly same. In that regard, Streamline is no different than CoffeeScript or any other compile-to-js tool. Async is incredibly widely used. If you ARE in the business of writing npm modules, then you'll have lots of company if you're using async. Mikeal is not the node police. He curates NodeConf, is incredibly outspoken, and has been around Node for a long time, and is the author of a few very widely used npm modules. We're lucky to have him around here. But he gets to be somewhat boisterous and freely outspoken with his opinions, because he is not in power. I actually AM the node police. (At least, insofar as Node even HAS police.) However, even my opinions are not necessarily the opinions of Node, and in many cases, my opinions about opinions as such override my actual opinions about code! (Being human is so complicated!) When we make recommendations to new users, it is important to communicate not just the options, but something *about* those options as well. Saying "Most node users use async for this sort of thing" is about as substantiated by evidence as we could want. It's not just the most popular control flow module in npm, it's the ONLY popular control flow module in npm. Every other one vanishes next to it. We'd probably be fine answering questions like this by saying "Here's the concept. Here's the module-free pure-js way to do it. Most people who use a library for this use async." Personally, I don't care how you write your JavaScript, whether you use JSLint or Streamline or IcedCoffee or tea leaves or whisper the contents of your heart into the ear of a fairy who then sprinkles the JavaScript into the file with a liberal mix of extraneous comments, sourcemaps, semicolons, and pre-hoisted vars. Just don't make ME have to deal with that crap when I'm using your module. Publish JavaScript, not fairy whispers. Also, as I prefer not to whisper to fairies, I'll be less likely to contribute to your module in that case. These are the facts of the tradeoffs. You choose the pants policy in your own house, and this choice affects who feels comfortable there. Same as semicolons or other inconsequential things that people nonetheless have opinions about. I find control flow utilities objectionable on principle, Promises and Streamline and Async included. I've used a few, and I think everyone should write one. It's not that I think you should do control flow "by hand" -- I think that you should write such simple and focused programs that these techniques are largely *unnecessary*. If your module depends on async (or for that matter, underscore) then I consider that a code smell. If your module has 10 levels of indentation, and is doing 30 things using a hand-rolled async.map, well.. that's probably even worse. Anyone who has seen the npm source code will know that I am a hypocrite when I say that you should not use control flow libs, as I use "slide" all over the damn place in there. But part of learning from your mistakes is making mistakes, and npm is nothing if not a collection of all the biggest mistakes you can make in a Node program, going back several years. Note that even though Isaac The Node Developer gives a crap about these things, Node The Community regards these specific opinions as flat-out wrong, and Node The Platform has no opinions on this matter at all! Wearing the hat as Node Project Leader and Node Mailing List Admin, the important thing is that we are nice to each other, and give new users facts and truth. If a new user asks a question about doing 3 things asynchronously, and they get these answers: 1. use async 2. use streamline then it looks like the two answers are representative, and roughly equivalent, which is a bit misleading. It rubs (at least) Mikeal the wrong way because it seems like Streamline is being promoted as equivalently popular or relevant in the community as Async, which, according to literally all the data we have on this question, it certainly is not. What's worse, this equivalent representation is often followed up by a lengthy spiteful debate where we all complain about each other. So the communicated answer seems to be: 1. You should use ether Async or Streamline (and they're about the same). 2. Don't ask, unless you want to see Node people fight and get mad. I don't think anyone wants that. (From my point of view, both points are terrible advice!) Bruno, I appreciate that you're trying to be a good citizen etc. Towards that point, I think it would actually be much better if your "one liner" came along with a link to a longer post or something that very objectively explains what Streamline is, what it's good for, who it's (un)popular with, and what the drawbacks are. Ironically, perhaps, the shortness of the reply may be what causes some of the problems here. (Certainly, a long explanation of how great and perfect Streamline is for everything and how everyone uses it, would be inappropriate, but I see that you grok that already.) I can see that you both very much want to help new users be successful, and that is great. The fact that the debate is over HOW we should help newcomers most effectively is *awesome*. This question comes up often enough, and is enough of a source of disruptive disagreement, that maybe we three should just hash out a single wiki page or something that we can all be moderately happy with, and agree to send users there when they have this question. Does that sound like a reasonable idea? On Sat, Apr 27, 2013 at 10:31 AM, Bruno Jouhier <[email protected]> wrote: > I searched into google groups and my previous mention of streamline on this > mailing list dates back from October 4th. It was an exchange with Fedor > Indutny about testing his spoon library. This is what you call excessive > promotion! > > And I usually limit my posts to a one-liner (except this one). > > The OP was not asking how to perform a simple async operation. He had > figured it out by himself. He was asking whether there was a better way. I > answered his question. > > We should be allowed to talk about the control flow library and tools that > we have written when people ask specifically about this topic. Your > statement that we are "confusing new users" is pure dogmatism. I don't see > anything wrong in giving pointers to people. Rather the opposite. > > Bruno > > > > On Saturday, April 27, 2013 6:19:27 PM UTC+2, Mikeal Rogers wrote: >> >> That's a good response, and a better characterization of the streamline >> compatibility/incompatibility than I state in my article. >> >> I'd like to make on thing clear. >> >> While I think that some of your ideas might be better served as a less if >> not entirely incompatible fork I don't intend to disparage the work. >> >> I think that most people who have reacted negatively to you on this list, >> myself included, take little or no issue *with your work* but in how you >> choose to promote it. >> >> When new users ask how to accomplish a simple async operation they aren't >> asking "can someone tell me about every flow control library" and even if >> that is the answer to their question they should at least see a response of >> libraries representative of their usage. >> >> There are many other discussions that happen here about es6, generators, >> alternative concurrency patterns, even discussions about approaches in >> general to flow control. In all of those discussions your input is valued >> and I can't remember a time when someone was negative about it. >> >> -Mikeal >> >> >> On Apr 27, 2013, at 6:28AM, Bruno Jouhier <[email protected]> wrote: >> >> FWIW my response to Mikeal: >> http://bjouhier.wordpress.com/2013/04/27/nodes-social-pariahs/ >> >> On Monday, April 22, 2013 9:54:50 PM UTC+2, Slobodan Blazeski wrote: >>> >>> Hi All >>> >>> I'm looking for suggestions of how to retrieve values asynchronously: >>> >>> In the synchronous world I have >>> >>> var num1 = Object1.retrieveNum1(); >>> var num2 = Object2.retrieveNum2(); >>> var num3 = Object3.retrieveNum3(); >>> >>> var result = (num1 + num2) / num3; >>> >>> >>> but since functions Object1.retrieveNum1,Object2.retrieveNum2 & >>> Object3.retrieveNum3 >>> retrieve data from the database or represent long calculation I need to >>> pass callbacks, >>> that leads me to below >>> >>> Object1.retrieveNum1Async(function(num1){ >>> Object2.retrieveNum2Async(function(num2){ >>> Object3.retrieveNum3Async(function(num3){ >>> var result = (num1 + num2) / num3; >>> }); >>> }); >>> }); >>> >>> is this the idiomatic way of doing this or there is something better >>> >>> >>> thanks >>> Bobi >>> >>> >>> >>> >> >> -- >> -- >> 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.
