Re: [nodejs] Re: Retrieving values asynchroniously

2013-05-23 Thread Baz
I'm a node newb and I don't know enough to make my own judgments between various (generally very professionally written) frameworks/libs. I rely on the wisdom of the community and generally my first step in researching a solution is to search github and order by most stars. I then google to be

RE: [nodejs] Re: Retrieving values asynchroniously

2013-05-23 Thread Peter Rust
is there a resource somewhere that lists the most popular libs by useful categories? The closest thing I know of is to work down NPM's most depended on list (https://npmjs.org/browse/depended), for each package, you can look at the description and keywords to get a sense of what the category

Re: [nodejs] Re: Retrieving values asynchroniously

2013-05-23 Thread Alexey Petrushin
The best rating I know https://github.com/languages/JavaScript/most_watched By the way, not only for JS but for other langs too, usually, when I need something and don't know where to start - I start there, and after reading 3-10 pages found all major solutions for my problem. I don't like

Re: [nodejs] Re: Retrieving values asynchroniously

2013-05-23 Thread Mark Hahn
The most_watched https://github.com/languages/JavaScript/most_watched list is awesome. Thanks for the tip. On Thu, May 23, 2013 at 8:42 AM, Alexey Petrushin alexey.petrus...@gmail.com wrote: The best rating I know https://github.com/languages/JavaScript/most_watched By the way, not only

RE: [nodejs] Re: Retrieving values asynchroniously

2013-05-23 Thread Peter Rust
There's also nipster (http://jiyinyiyong.github.io/nipster/), which combines github rankings with npm packages. -- peter -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you

Re: [nodejs] Re: Retrieving values asynchroniously

2013-05-01 Thread greelgorke
strong loop does Am Dienstag, 30. April 2013 18:53:34 UTC+2 schrieb Mark Hahn: My Opinion on that matter is that people who think node should provide opinionated utilities and structures should make a distro with their opinions. That is an awesome idea. -- -- Job Board:

Re: [nodejs] Re: Retrieving values asynchroniously

2013-05-01 Thread Floby
Yes, and I find it awesome that they do ;) On Wednesday, 1 May 2013 08:36:29 UTC+2, greelgorke wrote: strong loop does Am Dienstag, 30. April 2013 18:53:34 UTC+2 schrieb Mark Hahn: My Opinion on that matter is that people who think node should provide opinionated utilities and structures

[nodejs] Re: Retrieving values asynchroniously

2013-04-30 Thread Slobodan Blazeski
Thanks to everybody for their replies, I tried few options and settled on async for time being and so far it works fine. If I have special needs in the future I'll take a look at the other options. best Slobodan -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines:

Re: [nodejs] Re: Retrieving values asynchroniously

2013-04-30 Thread Mark Hahn
My Opinion on that matter is that people who think node should provide opinionated utilities and structures should make a distro with their opinions. That is an awesome idea. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines:

[nodejs] Re: Retrieving values asynchroniously

2013-04-28 Thread Liam
Slobodan, Sadly the node.js list sometimes generates more heat than light. Here's a bit of the latter: DB.retrieve('id1', cb); // start all retrieves in parallel, a key benefit of Node DB.retrieve('id2', cb); // providing the object name in the callback arguments may require passing it to

[nodejs] Re: Retrieving values asynchroniously

2013-04-27 Thread Bruno Jouhier
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 =

Re: [nodejs] Re: Retrieving values asynchroniously

2013-04-27 Thread Jorge
On 24/04/2013, at 23:50, Mikeal Rogers wrote: I feel really bad for people that ask incredibly simple questions on this list. I feel really bad whenever I read *your* posts dismissing other people's work. The solution nearly everyone in this community uses is the async library: snip How

Re: [nodejs] Re: Retrieving values asynchroniously

2013-04-27 Thread Mikeal Rogers
On Apr 27, 2013, at 6:46AM, Jorge jo...@jorgechamorro.com wrote: On 24/04/2013, at 23:50, Mikeal Rogers wrote: I feel really bad for people that ask incredibly simple questions on this list. I feel really bad whenever I read *your* posts dismissing other people's work. Nobody is

Re: [nodejs] Re: Retrieving values asynchroniously

2013-04-27 Thread Mikeal Rogers
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

Re: [nodejs] Re: Retrieving values asynchroniously

2013-04-27 Thread Herman Junge
In shorter words: we should converge, not diverge. H.- Sent from my iPhone On 27-04-2013, at 13:01, Mikeal Rogers mikeal.rog...@gmail.com wrote: On Apr 27, 2013, at 6:46AM, Jorge jo...@jorgechamorro.com wrote: On 24/04/2013, at 23:50, Mikeal Rogers wrote: I feel really bad for people

Re: [nodejs] Re: Retrieving values asynchroniously

2013-04-27 Thread Bruno Jouhier
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).

Re: [nodejs] Re: Retrieving values asynchroniously

2013-04-27 Thread Isaac Schlueter
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

Re: [nodejs] Re: Retrieving values asynchroniously

2013-04-27 Thread Mark Hahn
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. +1, however I predict a troublesome, contentious process to reach agreement. :-) -- -- Job Board:

Re: [nodejs] Re: Retrieving values asynchroniously

2013-04-27 Thread Bruno Jouhier
Hi Isaac, Thanks for taking the time. It helps. Just replying to selected fragments 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

Re: [nodejs] Re: Retrieving values asynchroniously

2013-04-27 Thread greelgorke
On original topic: I truly believe that a good and clean software design paired with a small switch in the mindset, is more than enough to handle most of complexity in a node program. That's why a almost always advise to go pure js way, it forces you to actually learn how to do good software

[nodejs] Re: Retrieving values asynchroniously

2013-04-27 Thread Alexey Petrushin
I guess the answer for novices should be - don't use any async library, write ugly but simple code that works. The debate about callbacks libraries are because none of it solves the problem completely, everyone has one or other tradeoffs. And to be able to pick a right solution - you need to

[nodejs] Re: Retrieving values asynchroniously

2013-04-25 Thread Peter Rust
Slobodan Blazeski, As others have said, the idiomatic way to do this in node is to use the async library and to have callback functions that take an error (err) as the first argument. The reason why it's important to have each asynchronous function pass an error object to your callback is

[nodejs] Re: Retrieving values asynchroniously

2013-04-25 Thread Peter Rust
Addendum: Caolan McMahon (the author of async library) provides a nice example and more details regarding prefering closures over object methods in the first point of his article http://caolanmcmahon.com/posts/nodejs_style_and_structure/. Many of his other points are also helpful to someone

Re: [nodejs] Re: Retrieving values asynchroniously

2013-04-24 Thread greelgorke
where's the fibers guy? :D Am Dienstag, 23. April 2013 22:31:57 UTC+2 schrieb azer: I wrote a guide for defining async values previously; https://github.com/azer/declarative-js On Tue, Apr 23, 2013 at 9:23 AM, Bruno Jouhier bjou...@gmail.comjavascript: wrote: With streamline.js

Re: [nodejs] Re: Retrieving values asynchroniously

2013-04-24 Thread Mikeal Rogers
I feel really bad for people that ask incredibly simple questions on this list. The solution nearly everyone in this community uses is the async library: https://npmjs.org/package/async https://github.com/caolan/async Its currently depended on by 1901 other packages. It's the defacto-standard

Re: [nodejs] Re: Retrieving values asynchroniously

2013-04-24 Thread Mark Hahn
You are asking to censor replies. This is obviously not acceptable. On Wed, Apr 24, 2013 at 2:50 PM, Mikeal Rogers mikeal.rog...@gmail.comwrote: I feel really bad for people that ask incredibly simple questions on this list. The solution nearly everyone in this community uses is the async

Re: [nodejs] Re: Retrieving values asynchroniously

2013-04-24 Thread Nathan White
You are asking to censor replies. This is obviously not acceptable. Relax. No one is stopping anything... just encouraging best practice for communication to the whole audience. In a technical forum I think it's best to disclose affiliation to a project. A good habit when suggesting

Re: [nodejs] Re: Retrieving values asynchroniously

2013-04-24 Thread Mikeal Rogers
Exactly, I said discourage, which isn't sensor. I'm not saying we should delete their posts, I'm saying we should turn them in to social pariahs :P On Apr 24, 2013, at 3:34PM, Nathan White changereal...@gmail.com wrote: You are asking to censor replies. This is obviously not acceptable.

Re: [nodejs] Re: Retrieving values asynchroniously

2013-04-24 Thread Mark Hahn
Or at least a compare/contrast on why I might use your package. Giving a link to a solution is a perfectly acceptable forum answer. On Wed, Apr 24, 2013 at 3:34 PM, Nathan White changereal...@gmail.comwrote: You are asking to censor replies. This is obviously not acceptable. Relax. No

[nodejs] Re: Retrieving values asynchroniously

2013-04-23 Thread greelgorke
you could use the async library or similar. other solution is to restructure your code: var num1, num2, num3 function sum(){ if(num1 != null num2 != null num3 != null) return (num1 + num2) / num3 } Object1.retrieveNum1Async(sum); Object2.retrieveNum2Async(sum);

[nodejs] Re: Retrieving values asynchroniously

2013-04-23 Thread Mariusz Nowak
Take a look into promises concept. e.g. with Deferred libraryhttps://github.com/medikoo/deferred you can configure it that way: deferred(Object1.retrieveNum1(), Object1.retrieveNum2(), Object1.retrieveNum3()).match(function (num1, num2, num3) { var result = (num1 + num2) / num3; }); On

[nodejs] Re: Retrieving values asynchroniously

2013-04-23 Thread James Basco
The parallel function in Async should make this pretty easy var async = require('async'); async.parallel([ function(callback){ Object1.retrieveNum1Async(function(err, num1){ callback(err, num1); }); }, function(callback){ Object2.retrieveNum2Async(function(err, num2){

[nodejs] Re: Retrieving values asynchroniously

2013-04-23 Thread Bruno Jouhier
With streamline.js (https://github.com/Sage/streamlinejs), you just need one line of code: var result = (Object1.retrieveNum1(_) + Object2.retrieveNum2(_)) / Object3.retrieveNum3(_); On Monday, April 22, 2013 9:54:50 PM UTC+2, Slobodan Blazeski wrote: Hi All I'm looking for suggestions of

Re: [nodejs] Re: Retrieving values asynchroniously

2013-04-23 Thread Azer Koçulu
I wrote a guide for defining async values previously; https://github.com/azer/declarative-js On Tue, Apr 23, 2013 at 9:23 AM, Bruno Jouhier bjouh...@gmail.com wrote: With streamline.js (https://github.com/Sage/streamlinejs), you just need one line of code: var result =