Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
How to avoid callback hell?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  Messages 51 - 75 of 139 - Collapse all  -  Translate all to Translated (View all originals) < Older  Newer >
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Joe Ferner  
View profile  
 More options Apr 10 2012, 11:32 am
From: Joe Ferner <j...@fernsroth.com>
Date: Tue, 10 Apr 2012 08:32:45 -0700 (PDT)
Local: Tues, Apr 10 2012 11:32 am
Subject: Re: How to avoid callback hell?
On Apr 10, 11:12 am, Bruno Jouhier <bjouh...@gmail.com> wrote:

> Your bench does not make sense. There is no async call at all. So there is no reason to have an _ in the streamline source.

> Streamline does not transform sync fonctions. So the Streamline version of this bench should take 3 ms.

> Callback != asynchronous

> Try again with an async call

I was trying to demonstrate the call overhead but here is an example
with some async code https://gist.github.com/2352116 again a bit
contrived because I really didn't want to spend much time on this.

streamline did close the gap a bit which is what I suspected when I
said "I will agree that for many real world cases this is a tiny piece
of the overall time". But it was still twice as slow. (node 565ms and
streamline 1049ms)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Axel Kittenberger  
View profile  
 More options Apr 10 2012, 2:14 pm
From: Axel Kittenberger <axk...@gmail.com>
Date: Tue, 10 Apr 2012 20:14:22 +0200
Local: Tues, Apr 10 2012 2:14 pm
Subject: Re: [nodejs] Re: How to avoid callback hell?

On Tue, Apr 10, 2012 at 3:37 PM, Yi Tan <yi2...@gmail.com> wrote:
> you really should spend a few hours learning coffee script if the js
> callback syntax make you uncomfortable

Unless coffee script fixes its "implicit local variable is global if
the names match and just dont take care to not accidently name it
equally" I will not touch it with a long stick.

Anyway, I find this node.js and callback arguments popping up again
and again very similar to what happens when asking the PHP guys and
gals why func()[1] is not a valid language construct? They get all
miffed usual arguments follow, and it happens all the time again. I
suppose simply because deeply within they know there is some
fundamental problem, but convince themselves with far fetched
arguments like "just get a larger screen" etc. at least as much as the
repeated questions. Only long after the lifecycle of software solution
people come, well yes that sucked didn't it? We kinda knew it all the
way, but we just decided to ignore it.

Maybe you have other good examples?
Ask GNOME 3 why the panel is no longer customizeable.
Ask TCL what the they where thinking when they handled every integer
variable as string.
Ask Java why multiple inheritence was that bad after all, and all the
workarounds they later needed for it. You got an Inputstream object
and Outputstream object, but how to get an InputOutputStream?
Ask Javascript, about 'this'.
Ask terminal guys, about why terminal emulations are that complicated
and never compitabitle to anything else.
Ask Windows why \r\n, ask why they never ever managed to abolish drive letters.
Ask Apple why \n\r
Ask Linux why inotify and fanotify while both being non-satisfactory
for any usecase but the single one they were designed for.
etc.

So now that I annoyed every tech group there is, I better get logged
of for a while :-)))


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Marcel Laverdet  
View profile  
 More options Apr 10 2012, 3:03 pm
From: Marcel Laverdet <mar...@laverdet.com>
Date: Tue, 10 Apr 2012 14:03:01 -0500
Local: Tues, Apr 10 2012 3:03 pm
Subject: Re: [nodejs] Re: How to avoid callback hell?

func()[1] not being allowed in PHP is just a silly deficiency in the
language grammar and runtime. I "fixed" it in 2009 with a rewrite rule
(right before APC in the compile chain). func()[1] -> _helper(func(), 1). I
have a habit of not accepting languages the way they're given to me I guess.

Anyway I don't think that's a very good comparison. Or maybe it is because
they're both easily fixable problems.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Axel Kittenberger  
View profile  
 More options Apr 10 2012, 3:13 pm
From: Axel Kittenberger <axk...@gmail.com>
Date: Tue, 10 Apr 2012 21:13:27 +0200
Local: Tues, Apr 10 2012 3:13 pm
Subject: Re: [nodejs] Re: How to avoid callback hell?

On Tue, Apr 10, 2012 at 9:03 PM, Marcel Laverdet <mar...@laverdet.com> wrote:
> func()[1] not being allowed in PHP is just a silly deficiency in the
> language grammar and runtime. I "fixed" it in 2009 with a rewrite rule
> (right before APC in the compile chain). func()[1] -> _helper(func(), 1). I
> have a habit of not accepting languages the way they're given to me I guess.

You are right, the problems don't compare well, but I compared the
community reactions when yet another time someone new mentions it, yet
another time, and everybody goes "oh no, not again. stop trolling us.
you can work around this or that or thut way." but in the core its a
silly deficiency.

I suppose when generators come to V8 we might see a new generation of
workarounds 'ehhh I mean solutions.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bruno Jouhier  
View profile  
 More options Apr 10 2012, 3:24 pm
From: Bruno Jouhier <bjouh...@gmail.com>
Date: Tue, 10 Apr 2012 12:24:22 -0700 (PDT)
Local: Tues, Apr 10 2012 3:24 pm
Subject: Re: How to avoid callback hell?

Still, your bench is wrong because the two programs do different things:

* The streamline program calls socket.write from the callback of the
previous socket.write. So it does proper flow control and it won't overflow
output buffers.
* The callback program calls socket.write in a loop, without chaining them
through the callbacks. No flow control here!

So please, go back to the drawing board and come back with a fair bench.

Hint: the callback version should not run the bench with a for loop, it
should transform the loop into a recursion (which is what streamline does).


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alexey Petrushin  
View profile  
 More options Apr 10 2012, 3:48 pm
From: Alexey Petrushin <alexey.petrus...@gmail.com>
Date: Tue, 10 Apr 2012 12:48:34 -0700 (PDT)
Local: Tues, Apr 10 2012 3:48 pm
Subject: Re: [nodejs] Re: How to avoid callback hell?

When a question rises again and again it's a good sign of problem.

To make clear I'm not in any way blame the node on it, it has tons of
advantages and it's ok to have problem.
Every advanced machinery have some sort of problems or limitations - it's
ok.

But what's not ok - is to have false delusion, to believe that a problem is
a feature, or even worse - call it "The Rails/Node way".

Because if You call the problem as it deserves - the problem - there's
always room for progress and improvement. And maybe someday it will be
completely fixed and become not a problem but another advantage.

But when You ignore it or believe that it's a "feature" or "the right way"
- the problem always will be there, it's a way to stagnation.

Yes You can become tolerable to ugly code and buy wider screen to fit all
those callbacks, but it doesn't matter.
Perceptions doesn't change the objective reality, no matter how much people
believe that false is true, false still and always will be the false.

So, maybe it's worth to stop call this problem a "feature"?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joe Ferner  
View profile  
 More options Apr 10 2012, 4:01 pm
From: Joe Ferner <j...@fernsroth.com>
Date: Tue, 10 Apr 2012 13:01:07 -0700 (PDT)
Local: Tues, Apr 10 2012 4:01 pm
Subject: Re: How to avoid callback hell?
I think I'm done writing benchmarks.  Even if I come up with a
benchmark that shows streamline is faster I'm still not going to use
it and I couldn't recommend anyone else use it either. The community
as a whole doesn't back that kind of syntax so I couldn't submit a
module to npm if I wrote it using streamline. As I said before I can't
easily run my unit tests or deploy to my server environment. From the
little that I used it, it screws up the stack trace, you get weird
errors like "Function contains async calls but does not have _
parameter" which IMO shouldn't be an error at all. And it obscures
what is really going on under the covers which you pointed out quite
well in your most recent comments.

On Apr 10, 3:24 pm, Bruno Jouhier <bjouh...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Axel Kittenberger  
View profile  
 More options Apr 10 2012, 4:07 pm
From: Axel Kittenberger <axk...@gmail.com>
Date: Tue, 10 Apr 2012 22:07:17 +0200
Local: Tues, Apr 10 2012 4:07 pm
Subject: Re: [nodejs] Re: How to avoid callback hell?

> errors like "Function contains async calls but does not have _
> parameter" which IMO shouldn't be an error at all.

By all respect you just got little clue. This error is *good*, since
it does not allow functions to "yield under your ass", which would
technically be impossible in streamline anyway.

Rest of the argument now you fail with benchmarking is "because I say
so.". Streamline will run in full potential since it does nothing else
than to write the correct javascript for you. The only drawback is,
that its syntax is not natively understood by V8 thus error messages
contain different text, and if you are using some debugger, it might
look a different else than what you expected.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Naouak  
View profile  
 More options Apr 10 2012, 4:13 pm
From: Naouak <tard...@gmail.com>
Date: Tue, 10 Apr 2012 22:13:25 +0200
Local: Tues, Apr 10 2012 4:13 pm
Subject: Re: [nodejs] Re: How to avoid callback hell?

Am I the only one that thinks that we talk about Callback Hell only because
we are not used to used callback everywhere ?

Naouak, Grade 2 de Kobal.
Site web: http://www.naouak.net


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bruno Jouhier  
View profile  
 More options Apr 10 2012, 4:35 pm
From: Bruno Jouhier <bjouh...@gmail.com>
Date: Tue, 10 Apr 2012 13:35:50 -0700 (PDT)
Local: Tues, Apr 10 2012 4:35 pm
Subject: Re: How to avoid callback hell?

Streamline translates its special syntax to vanilla JS with callbacks. So,
if you implement a function like

  function foo(x, y, _) { ... }

Normal JS modules (not written with streamline) will be able to call it as:

  foo(x, y, function(err, result) { ... });

Streamline is just a tool that helps you write your code. This tool
produces vanilla JS that follows the standard node callback conventions. So
you can publish it to NPM, you won't be forcing anyone else to use
streamline. That's like coding a module in CoffeeScript.

Regarding the stack traces, streamline reconstructs the "synchronous" stack
that led to the exception. This is a big plus as the callback stack is
usually not very helpful (and if you really want it, you have it with
ex.rawStack).

The error message that bugs you is a feature. It ensures that all the
yielding points are explicit.

Regarding performance, there is still a need for real benchmarks that
compare apples with apples (code that does flow control with code that does
flow control). Your half baked pseudo benches are just useless.

Bruno


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joe Ferner  
View profile  
 More options Apr 10 2012, 4:36 pm
From: Joe Ferner <j...@fernsroth.com>
Date: Tue, 10 Apr 2012 13:36:59 -0700 (PDT)
Local: Tues, Apr 10 2012 4:36 pm
Subject: Re: How to avoid callback hell?
On Apr 10, 4:07 pm, Axel Kittenberger <axk...@gmail.com> wrote:

> > errors like "Function contains async calls but does not have _
> > parameter" which IMO shouldn't be an error at all.

> By all respect you just got little clue. This error is *good*, since
> it does not allow functions to "yield under your ass", which would
> technically be impossible in streamline anyway.

This error happened when I tried to mix the syntax.

socket.connect(1111, 'localhost', function() {
 ...

});

instead of

socket.connect(1111, 'localhost', _);

If I want to mix the syntax, let me, don't error out.

> Rest of the argument now you fail with benchmarking is "because I say
> so.". Streamline will run in full potential since it does nothing else
> than to write the correct javascript for you. The only drawback is,
> that its syntax is not natively understood by V8 thus error messages
> contain different text, and if you are using some debugger, it might
> look a different else than what you expected.

I just don't have time to write more benchmarks that no mater what I
come up with Bruno will find another reason why it isn't valid.

It's not just different text it's a completely different stack trace
so I would have no hope in finding out what failed, especially if it
happened in production. As far as debuggers go, the code looks
completely different not just a little different, it does give me line
numbers which is nice.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Axel Kittenberger  
View profile  
 More options Apr 10 2012, 5:01 pm
From: Axel Kittenberger <axk...@gmail.com>
Date: Tue, 10 Apr 2012 23:01:19 +0200
Local: Tues, Apr 10 2012 5:01 pm
Subject: Re: [nodejs] Re: How to avoid callback hell?

> If I want to mix the syntax, let me, don't error out.

I lets you mix it, you just have to do it correctly. E.g: this works
without error:

function foo(_) {
    process.nextTick(_);
    console.log('a');
    process.nextTick(function() {
        console.log('b');
    });

}

foo(_);

Don't blame streamline for your own shortcomings. I know of its
drawbacks in debugging mode, but thats about it, i get tired and angry
about the FUD spread around it, and you made a ton of it.

> I just don't have time to write more benchmarks that no mater what I
> come up with Bruno will find another reason why it isn't valid.

Its not like Bruno is doing an evil plot here. Since as long your
benchmark does not compare apple with oranges, it will always be just
as fast as vanilla written code, since in the end, it translates to
vanilla code.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mark Hahn  
View profile  
 More options Apr 10 2012, 5:24 pm
From: Mark Hahn <m...@hahnca.com>
Date: Tue, 10 Apr 2012 14:24:38 -0700
Local: Tues, Apr 10 2012 5:24 pm
Subject: Re: [nodejs] Re: How to avoid callback hell?

>  Unless coffee script fixes its "implicit local variable is global if

the names match and just dont take care to not accidently name it
equally" I will not touch it with a long stick.

I and a number of other coffeescripters have been bitching about this over
and over. So far we haven't budged the BDFL.

However, there is a pretty simple workaround.  You can use the var
statement by using backticks which passes it through to the javascript:
 `var x;`   I use this all the time.  It isn't even that ugly.

If you are ignoring coffeescript because of this then that is a shame.  I
use absolutely nothing but coffeescript and I can't imagine living without
it.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Marcel Laverdet  
View profile  
 More options Apr 10 2012, 6:53 pm
From: Marcel Laverdet <mar...@laverdet.com>
Date: Tue, 10 Apr 2012 17:53:49 -0500
Local: Tues, Apr 10 2012 6:53 pm
Subject: Re: [nodejs] Re: How to avoid callback hell?

Joe your stubbornness speaks volumes. If you'd have quit everything in life
after spending 10 minutes and messing up once you wouldn't get anywhere.
There's an ever-growing number of supporters of this kind of
technology (435 followers on github for fibers, 222 for streamline) and to
not even explore it because of baseless assumptions is silly. It's not my
problem if you don't want to use fibers or streamline, I don't care.. but
it becomes my problem when you literally make up lies about this software.
It's good and robust software, I promise. There's a one time cost to learn
some simple rules about how the software works and then you can look
forward to *significant* reductions in lines of code written.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joe Ferner  
View profile  
 More options Apr 10 2012, 8:16 pm
From: Joe Ferner <j...@fernsroth.com>
Date: Tue, 10 Apr 2012 17:16:01 -0700 (PDT)
Local: Tues, Apr 10 2012 8:16 pm
Subject: Re: How to avoid callback hell?

On Apr 10, 5:01 pm, Axel Kittenberger <axk...@gmail.com> wrote:

Ok then perhaps you can fix my code because this gives me the error
and from what I can tell it looks to follow your pattern...

var net = require('net');

function foo(_) {
  var socket = new net.Socket();
  socket.connect(1111, 'localhost', function() {
    var start = new Date();
    for (var i = 0; i <= 100000; i++) {
      socket.write(new Buffer([i]), _);
    }
    var end = new Date();
    console.log("done: " + (end - start));

    socket.end();
  });

}

foo(_);

> > I just don't have time to write more benchmarks that no mater what I
> > come up with Bruno will find another reason why it isn't valid.

> Its not like Bruno is doing an evil plot here. Since as long your
> benchmark does not compare apple with oranges, it will always be just
> as fast as vanilla written code, since in the end, it translates to
> vanilla code.

I disagree about my benchmarks being incorrect.  Benchmark 1 was to
purely compare the overhead of calling functions using traditional
methods vs streamline. Methods with callbacks are not required to have
async code in them, they just generally do. If you replace doIt with
say a getUserFromCache method where 99% of the time you get cache hits
and the function just returns the user this would be completely valid
and you would incur the penalty. But I played along and tossed in an
async call. Benchmark 2 is valid if you want to send data as fast as
possible to the other side.  I would love to see this magical
benchmark that streamline is as fast or faster than node but I have
yet to see it.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joe Ferner  
View profile  
 More options Apr 10 2012, 8:23 pm
From: Joe Ferner <j...@fernsroth.com>
Date: Tue, 10 Apr 2012 17:23:09 -0700 (PDT)
Local: Tues, Apr 10 2012 8:23 pm
Subject: Re: How to avoid callback hell?
By that logic we should also be using Coffeescript with it's 4,800+
followers but if you listen to any of the node core team I think you
would hear quite a different story.

On Apr 10, 6:53 pm, Marcel Laverdet <mar...@laverdet.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mark Hahn  
View profile  
 More options Apr 10 2012, 8:30 pm
From: Mark Hahn <m...@hahnca.com>
Date: Tue, 10 Apr 2012 17:30:08 -0700
Local: Tues, Apr 10 2012 8:30 pm
Subject: Re: [nodejs] Re: How to avoid callback hell?

>  By that logic we should also be using Coffeescript with it's 4,800+

followers but if you listen to any of the node core team I think you
would hear quite a different story.

Can you please elaborate on what the core team has said about coffeescript?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joe Ferner  
View profile  
 More options Apr 10 2012, 8:53 pm
From: Joe Ferner <j...@fernsroth.com>
Date: Tue, 10 Apr 2012 17:53:33 -0700 (PDT)
Local: Tues, Apr 10 2012 8:53 pm
Subject: Re: How to avoid callback hell?

On Apr 10, 8:30 pm, Mark Hahn <m...@hahnca.com> wrote:

> >  By that logic we should also be using Coffeescript with it's 4,800+

> followers but if you listen to any of the node core team I think you
> would hear quite a different story.

> Can you please elaborate on what the core team has said about coffeescript?

I think it was episode 10 of nodeup (http://nodeup.com/ten) where they
railed on it for 10 minutes. There is also a pull request (https://
github.com/joyent/node/pull/2472) where they complain about it that is
pretty funny.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joe Ferner  
View profile  
 More options Apr 10 2012, 9:08 pm
From: Joe Ferner <j...@fernsroth.com>
Date: Tue, 10 Apr 2012 18:08:15 -0700 (PDT)
Local: Tues, Apr 10 2012 9:08 pm
Subject: Re: How to avoid callback hell?
Ah never mind my fault. Needed "socket.connect(1111, 'localhost',
function(_) {" (missing underscore here).

On Apr 10, 8:16 pm, Joe Ferner <j...@fernsroth.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mark Hahn  
View profile  
 More options Apr 10 2012, 9:13 pm
From: Mark Hahn <m...@hahnca.com>
Date: Tue, 10 Apr 2012 18:13:15 -0700
Local: Tues, Apr 10 2012 9:13 pm
Subject: Re: [nodejs] Re: How to avoid callback hell?

>  I think it was episode 10 of nodeup (http://nodeup.com/ten) where they

railed on it for 10 minutes. There is also a pull request (https://
github.com/joyent/node/pull/2472) where they complain about it that is
pretty funny.

They didn't trash coffeescript, they were trashing the idea of using it for
node core.  There is a big difference.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joe Ferner  
View profile  
 More options Apr 10 2012, 9:26 pm
From: Joe Ferner <j...@fernsroth.com>
Date: Tue, 10 Apr 2012 18:26:21 -0700 (PDT)
Local: Tues, Apr 10 2012 9:26 pm
Subject: Re: How to avoid callback hell?
Not sure if 10 was it, that's the only one I could find from searching
the text of the episodes. They are definitely not coffeescript fans if
you listen through a couple of the episodes.

On Apr 10, 9:13 pm, Mark Hahn <m...@hahnca.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mark Hahn  
View profile  
 More options Apr 10 2012, 9:36 pm
From: Mark Hahn <m...@hahnca.com>
Date: Tue, 10 Apr 2012 18:36:47 -0700
Local: Tues, Apr 10 2012 9:36 pm
Subject: Re: [nodejs] Re: How to avoid callback hell?

>   They are definitely not coffeescript fans if you listen through a

couple of the episodes.

I'll take your word for it.  I can see where people working at the core
level may not be excited about higher-level languages. These same people
use c++.

I'm working at the app level and I have 10,000 lines of coffeescript.  I
can't imagine coding all that in javascript.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mikeal Rogers  
View profile  
 More options Apr 10 2012, 9:49 pm
From: Mikeal Rogers <mikeal.rog...@gmail.com>
Date: Tue, 10 Apr 2012 18:49:00 -0700
Subject: Re: [nodejs] Re: How to avoid callback hell?
NodeUp is not exclusively node core committers nor has it ever included the full list of committers so the views represented should not be viewed as "core".

While our personal views about coffeescript may be negative node is committed to support (but not include or bundle) the use compile target languages. No one will ever have the level of support that javascript has but we won't be going out of our way to disable it.

GitHub Followers are a good indication that something is interesting, they should not be considered supporters or an accurate representation of adoption. For instance:

express: 5,823
npm: 2,605

There is no question that npm has wider adoption than express. While express is hugely popular it *requires* npm to be installed :)

One thing I've noticed is that GitHub followers mean you have something interesting, not that you have something they use. My suspicion is that many followers don't actually use the project they are following but find it interesting enough to keep an eye on.

The closest metric we have for adoption is "depended on" http://search.npmjs.org/. But, this metric also falls short. For instance, depending on express is an indicator of how well it's been adopted by people building plugins, same with connect, but not a good indicator for it's actual adoption since web frameworks are mainly used by applications which are not pushed to the registry. Similarly, coffeescript has a larger representation that it's actual usage since *any* module written in coffeescript includes it as a dependency.

Fibers has about 12 modules that depend on it. Streamline has about 4. If you want to compare that against common utilities that use standard node practices for async (request:420,socket.io.202,redis:175) it's quite low. Even comparing fibers and streamline to popular flow control libraries that use standard node practices (async:354,step:64) fibers and streamline have sparse adoption.

Not saying nobody uses them or that they don't have a bit of a following, but by the actual numbers we have their adoption is quite limited compared with standard node practices, especially when compared to how vocal they are championed on this list whenever a thread like this appears.

It would seem that the majority of node developers are content with standard callbacks and find ways to deal with them and are not running towards blocking style abstractions, they just don't care enough to yell a lot on every thread like the authors of alternatives.

On Apr 10, 2012, at April 10, 20126:26 PM, Joe Ferner wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mikeal Rogers  
View profile  
 More options Apr 10 2012, 9:50 pm
From: Mikeal Rogers <mikeal.rog...@gmail.com>
Date: Tue, 10 Apr 2012 18:50:19 -0700
Local: Tues, Apr 10 2012 9:50 pm
Subject: Re: [nodejs] Re: How to avoid callback hell?

On Apr 10, 2012, at April 10, 20126:36 PM, Mark Hahn wrote:

> >   They are definitely not coffeescript fans if you listen through a couple of the episodes.

> I'll take your word for it.  I can see where people working at the core level may not be excited about higher-level languages. These same people use c++.

The vast majority of commits to node are in JavaScript. As of 0.5 the majority of C++ heavy lifting is in libuv which has a different committer list (although there is some overlap).

> I'm working at the app level and I have 10,000 lines of coffeescript.  I can't imagine coding all that in javascript.

I have about 10 times that in javascript and it's quite easy, when things break I even get line numbers :)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Isaac Schlueter  
View profile  
 More options Apr 10 2012, 10:16 pm
From: Isaac Schlueter <i...@izs.me>
Date: Tue, 10 Apr 2012 19:16:58 -0700
Local: Tues, Apr 10 2012 10:16 pm
Subject: Re: [nodejs] Re: How to avoid callback hell?

On Tue, Apr 10, 2012 at 18:49, Mikeal Rogers <mikeal.rog...@gmail.com> wrote:
> NodeUp is not exclusively node core committers nor has it ever included the full list of committers so the views represented should not be viewed as "core".

I think Felix and I are the only core committers that have been on NodeUp.

> While our personal views about coffeescript may be negative node is committed to support (but not include or bundle) the use compile target languages.

Node is committed to supporting JavaScript programs.  How you write
those JavaScript programs is your own business.

In retrospect, I think require.extensions was a mistake.  But it's a
mistake we're stuck with.  It mostly stays out of the way, which is
good, I suppose.

> One thing I've noticed is that GitHub followers mean you have something interesting, not that you have something they use. My suspicion is that many followers don't actually use the project they are following but find it interesting enough to keep an eye on.

It also indicates that you need to know when to update a thing.  npm
gets updated whenever you get a new version of node.  However, a lot
of people post bugs with Express, contribute to it, etc.  It's a
run-time dependency, not a dev-time one.

The primary major goal of the Node.js project is to make easy to build
fast network programs.  Making things simpler makes them easier, and
hiding the true nature of IO only makes it harder in the long run.

It is not our goal to fix JavaScript syntax (that's tc-39's job).
It is not our goal to make programs look blocking when they are in
fact parallel (that's a bad complexity trade-off).

> I'll take your word for it.  I can see where people working at the core level may not be excited about higher-level languages. These same people use c++.

We are excited about writing high performance network programs.
JavaScript is a very easy and effective way to do that.  Most of
Node.js is in JavaScript.  JavaScript is a higher-level language.
We're very interested in it.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Messages 51 - 75 of 139 < Older  Newer >
« Back to Discussions « Newer topic     Older topic »