Re: [nodejs] ender vs. browserify?

2012-04-24 Thread Alexey Petrushin
By the way there's also Brunch https://github.com/brunch/brunch

-- 
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


[nodejs] Send JQuery Error Message in ExpressJS Response

2012-04-24 Thread Feras Odeh


I want to show error messages for users in cases of wrong credentials. How 
could I do that in Express JS? I tried the following code but it doesn't 
work:

app.get('/', function(req, res, next) {
passport.authenticate('local', function(err, user, info) {
if (err) { return next(err) }
if (!user) { return res.send($( "YOUR MESSAGE" )
.css({ "display": "block", "opacity": 0.96, "top": 
$(window).scrollTop() + 100 })
.appendTo( $.mobile.pageContainer )
.delay( 800 )
.fadeOut( 400, function() {
$( this ).remove();
})
);  }
req.logIn(user, function(err) {
if (err) { return next(err); }
return res.redirect('/account');
});
})(req, res, next);
});

What is the problem with this?

Thanks,

Feras

-- 
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


[nodejs] Re: Is there any way to setInterval and execute the callback first time immediately?

2012-04-24 Thread darcy


> good ideas, thank you all!
>

-- 
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


[nodejs] Re: Node Philly is Live

2012-04-24 Thread bradleyg
Does anybody know if these talks will be uploaded somewhere?

I missed the stream.

On Monday, 23 April 2012 23:23:35 UTC+1, Nuno Job wrote:
>
> If you guys are curious about what is happening in Philly, and want to 
> see the talks, the event is being live streamed: 
>
> http://node.ph 
>
> Nuno 
>

-- 
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


Re: [nodejs] Re: Node Philly is Live

2012-04-24 Thread Nuno Job
I know they will, but don't know where.

Follow @timsavery and @nodephilly for updates I guess.

Nuno


On Tue, Apr 24, 2012 at 11:01 AM, bradleyg  wrote:
> anybody know if these talks will be uploaded somewhere?
>
> I missed the stream.

-- 
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


[nodejs] Queryable JSON Streams

2012-04-24 Thread manimal45
Hi,

I wanted to know if there was any existing module allowing for
handling json streams with an SQL like API.

For instance, let's say the module's name is querystreams, the
expected API would allow for code like this  :
var s = new StreamProducer("a stream from a thrid party outputting
json rows"); // 'data', {a : 1, b :2} ...
var filter = querystream(s, { a : 1}) ; // creates a stream which
outputs only rows with #.a=1

var s1 = new StreamProducer("a stream from a thrid party outputting
json rows");
var s2 = new StreamProducer("a stream from a thrid party outputting
json rows");
var join = querystreams.join(s1,s2, { "s1.a = s2.a && s1.b ==
s2.b"}); // creates a stream resulting in joining s1 and s2 on the
given condition


var unsorted = new StreamProducer("a stream from a thrid party
outputting json rows");
var sorted = querystream.sort(unsorted, {a : 'desc'}); // creates a
stream where values are sorted depending on the #. property



-- 
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


Re: [nodejs] Send JQuery Error Message in ExpressJS Response

2012-04-24 Thread Richard Marr
Not sure what the main problem is as I'm not familiar with the tools and
don't have enough info to guess, but there are a couple of style points
that I'd make:

   - You seem to have a load of jQuery code in your Express response. I'd
   recommend staying well away from that approach for most applications as
   it's harder to control in terms of separation of concerns, encapsulation,
   caching, etc.
   - Your function looks like it will return either an HTML fragment or an
   HTTP redirect, which to me is a confusing combination, do you mean to
   redirect the entire browser or just tell the XHR object to fetch a
   different fragment from "/account"?

Also, if you're stuck it's helpful to throw a few console.log() statements
in there and make sure what's happening matches your expectations.



On 24 April 2012 08:54, Feras Odeh  wrote:

> I want to show error messages for users in cases of wrong credentials. How
> could I do that in Express JS? I tried the following code but it doesn't
> work:
>
> app.get('/', function(req, res, next) {
> passport.authenticate('local', function(err, user, info) {
> if (err) { return next(err) }
> if (!user) { return res.send($( "YOUR MESSAGE" )
> .css({ "display": "block", "opacity": 0.96, "top": 
> $(window).scrollTop() + 100 })
> .appendTo( $.mobile.pageContainer )
> .delay( 800 )
> .fadeOut( 400, function() {
> $( this ).remove();
> })
> );  }
> req.logIn(user, function(err) {
> if (err) { return next(err); }
> return res.redirect('/account');
> });
> })(req, res, next);
> });
>
> What is the problem with this?
>
> Thanks,
>
> Feras
>
> --
> 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 nodejs@googlegroups.com
> To unsubscribe from this group, send email to
> nodejs+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>



-- 
Richard Marr

-- 
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


Re: [nodejs] Send JQuery Error Message in ExpressJS Response

2012-04-24 Thread Martin Wawrusch
Look into this module here.  https://github.com/visionmedia/express-messages
and this one if you use bootstrap:
https://github.com/JasonGiedymin/express-messages-bootstrap

cheers
Martin

On Tue, Apr 24, 2012 at 4:31 AM, Richard Marr wrote:

> Not sure what the main problem is as I'm not familiar with the tools and
> don't have enough info to guess, but there are a couple of style points
> that I'd make:
>
>- You seem to have a load of jQuery code in your Express response. I'd
>recommend staying well away from that approach for most applications as
>it's harder to control in terms of separation of concerns, encapsulation,
>caching, etc.
>- Your function looks like it will return either an HTML fragment or
>an HTTP redirect, which to me is a confusing combination, do you mean to
>redirect the entire browser or just tell the XHR object to fetch a
>different fragment from "/account"?
>
> Also, if you're stuck it's helpful to throw a few console.log() statements
> in there and make sure what's happening matches your expectations.
>
>
>
> On 24 April 2012 08:54, Feras Odeh  wrote:
>
>> I want to show error messages for users in cases of wrong credentials.
>> How could I do that in Express JS? I tried the following code but it
>> doesn't work:
>>
>> app.get('/', function(req, res, next) {
>> passport.authenticate('local', function(err, user, info) {
>> if (err) { return next(err) }
>> if (!user) { return res.send($( "YOUR MESSAGE" )
>> .css({ "display": "block", "opacity": 0.96, "top": 
>> $(window).scrollTop() + 100 })
>> .appendTo( $.mobile.pageContainer )
>> .delay( 800 )
>> .fadeOut( 400, function() {
>> $( this ).remove();
>> })
>> );  }
>> req.logIn(user, function(err) {
>> if (err) { return next(err); }
>> return res.redirect('/account');
>> });
>> })(req, res, next);
>> });
>>
>> What is the problem with this?
>>
>> Thanks,
>>
>> Feras
>>
>> --
>> 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 nodejs@googlegroups.com
>> To unsubscribe from this group, send email to
>> nodejs+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/nodejs?hl=en?hl=en
>>
>
>
>
> --
> Richard Marr
>
> --
> 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 nodejs@googlegroups.com
> To unsubscribe from this group, send email to
> nodejs+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>

-- 
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


Re: [nodejs] Send JQuery Error Message in ExpressJS Response

2012-04-24 Thread Feras Odeh
Hello Richard,

All I'm trying to do is to send a JQuery error message to the User that 
tell him what is the error. How could send it or just to notify the user of 
the error without any redirection (using XHR).

Thanks,
Feras

On Tuesday, April 24, 2012 2:31:10 PM UTC+3, Richard Marr wrote:
>
> Not sure what the main problem is as I'm not familiar with the tools and 
> don't have enough info to guess, but there are a couple of style points 
> that I'd make:
>
>- You seem to have a load of jQuery code in your Express response. I'd 
>recommend staying well away from that approach for most applications as 
>it's harder to control in terms of separation of concerns, encapsulation, 
>caching, etc. 
>- Your function looks like it will return either an HTML fragment or 
>an HTTP redirect, which to me is a confusing combination, do you mean to 
>redirect the entire browser or just tell the XHR object to fetch a 
>different fragment from "/account"? 
>
> Also, if you're stuck it's helpful to throw a few console.log() statements 
> in there and make sure what's happening matches your expectations.
>
>
>
> On 24 April 2012 08:54, Feras Odeh  wrote:
>
>> I want to show error messages for users in cases of wrong credentials. 
>> How could I do that in Express JS? I tried the following code but it 
>> doesn't work:
>>
>> app.get('/', function(req, res, next) {
>> passport.authenticate('local', function(err, user, info) {
>> if (err) { return next(err) }
>> if (!user) { return res.send($( "YOUR MESSAGE" )
>> .css({ "display": "block", "opacity": 0.96, "top": 
>> $(window).scrollTop() + 100 })
>> .appendTo( $.mobile.pageContainer )
>> .delay( 800 )
>> .fadeOut( 400, function() {
>> $( this ).remove();
>> })
>> );  }
>> req.logIn(user, function(err) {
>> if (err) { return next(err); }
>> return res.redirect('/account');
>> });
>> })(req, res, next);
>> });
>>
>> What is the problem with this?
>>
>> Thanks,
>>
>> Feras
>>
>> -- 
>> 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 nodejs@googlegroups.com
>> To unsubscribe from this group, send email to
>> nodejs+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/nodejs?hl=en?hl=en
>>
>
>
>
> -- 
> Richard Marr
>  

-- 
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


[nodejs] Re: Queryable JSON Streams

2012-04-24 Thread Roly Fentanes
there is this
https://github.com/bevry/query-engine

not sql like, mongo like.

On Tuesday, April 24, 2012 4:18:41 AM UTC-7, manimal45 wrote:
>
> Hi, 
>
> I wanted to know if there was any existing module allowing for 
> handling json streams with an SQL like API. 
>
> For instance, let's say the module's name is querystreams, the 
> expected API would allow for code like this  : 
> var s = new StreamProducer("a stream from a thrid party outputting 
> json rows"); // 'data', {a : 1, b :2} ... 
> var filter = querystream(s, { a : 1}) ; // creates a stream which 
> outputs only rows with #.a=1 
>
> var s1 = new StreamProducer("a stream from a thrid party outputting 
> json rows"); 
> var s2 = new StreamProducer("a stream from a thrid party outputting 
> json rows"); 
> var join = querystreams.join(s1,s2, { "s1.a = s2.a && s1.b == 
> s2.b"}); // creates a stream resulting in joining s1 and s2 on the 
> given condition 
>
>
> var unsorted = new StreamProducer("a stream from a thrid party 
> outputting json rows"); 
> var sorted = querystream.sort(unsorted, {a : 'desc'}); // creates a 
> stream where values are sorted depending on the #. property 
>
>
>
>

-- 
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


Re: [nodejs] Send JQuery Error Message in ExpressJS Response

2012-04-24 Thread Feras Odeh
Thank you all,

Martin I looked at express-messages but I don't know if it works with 
JQuery Mobile? as I 'm using JQuery Mobile. Richard all I'm trying to do is 
to send JQuery Error Message in case of error. I don't wont to redirect the 
user Just send Ajax response with the message.

Thanks,
Feras

On Tuesday, April 24, 2012 2:37:45 PM UTC+3, Martin Wawrusch wrote:
>
> Look into this module here.  
> https://github.com/visionmedia/express-messages  and this one if you use 
> bootstrap:  https://github.com/JasonGiedymin/express-messages-bootstrap 
>
> cheers
> Martin
>
> On Tue, Apr 24, 2012 at 4:31 AM, Richard Marr wrote:
>
>> Not sure what the main problem is as I'm not familiar with the tools and 
>> don't have enough info to guess, but there are a couple of style points 
>> that I'd make:
>>  
>>- You seem to have a load of jQuery code in your Express response. 
>>I'd recommend staying well away from that approach for most applications 
>> as 
>>it's harder to control in terms of separation of concerns, encapsulation, 
>>caching, etc. 
>>- Your function looks like it will return either an HTML fragment or 
>>an HTTP redirect, which to me is a confusing combination, do you mean to 
>>redirect the entire browser or just tell the XHR object to fetch a 
>>different fragment from "/account"? 
>>
>> Also, if you're stuck it's helpful to throw a few console.log() 
>> statements in there and make sure what's happening matches your 
>> expectations.
>>
>>
>>
>> On 24 April 2012 08:54, Feras Odeh wrote:
>>
>>> I want to show error messages for users in cases of wrong credentials. 
>>> How could I do that in Express JS? I tried the following code but it 
>>> doesn't work:
>>>
>>> app.get('/', function(req, res, next) {
>>> passport.authenticate('local', function(err, user, info) {
>>> if (err) { return next(err) }
>>> if (!user) { return res.send($( "YOUR MESSAGE" )
>>> .css({ "display": "block", "opacity": 0.96, "top": 
>>> $(window).scrollTop() + 100 })
>>> .appendTo( $.mobile.pageContainer )
>>> .delay( 800 )
>>> .fadeOut( 400, function() {
>>> $( this ).remove();
>>> })
>>> );  }
>>> req.logIn(user, function(err) {
>>> if (err) { return next(err); }
>>> return res.redirect('/account');
>>> });
>>> })(req, res, next);
>>> });
>>>
>>> What is the problem with this?
>>>
>>> Thanks,
>>>
>>> Feras
>>>
>>> -- 
>>> 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 nodejs@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> nodejs+unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/nodejs?hl=en?hl=en
>>>
>>
>>
>>
>> -- 
>> Richard Marr
>>  
>> -- 
>> 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 nodejs@googlegroups.com
>> To unsubscribe from this group, send email to
>> nodejs+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/nodejs?hl=en?hl=en
>>
>
>
>
>
>
>
>
>  

-- 
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


[nodejs] Re: Queryable JSON Streams

2012-04-24 Thread manimal45
It does not seem to support streams, does it ?

It's a module which enables use of mongodb semantics without using
mongodb itself, which is a good idea on itself !
Though, what I wanted to know is whether or not there exists a stream
manipulation API.
Maybe something like spouts and bolts from twitter storm project :
- https://github.com/nathanmarz/storm
- 
http://www.slideshare.net/nathanmarz/storm-distributed-and-faulttolerant-realtime-computation

I think that node.js streams are a powerful interface, usually under
used by module writters.
There ought to be some stream manipulation (grouping, sorting,
joining) outhere which would open the way for amazing use cases like
twitter's storm.

Anyone with same vision ?



On 24 avr, 14:02, Roly Fentanes  wrote:
> there is thishttps://github.com/bevry/query-engine
>
> not sql like, mongo like.
>
>
>
>
>
>
>
> On Tuesday, April 24, 2012 4:18:41 AM UTC-7, manimal45 wrote:
>
> > Hi,
>
> > I wanted to know if there was any existing module allowing for
> > handling json streams with an SQL like API.
>
> > For instance, let's say the module's name is querystreams, the
> > expected API would allow for code like this  :
> > var s = new StreamProducer("a stream from a thrid party outputting
> > json rows"); // 'data', {a : 1, b :2} ...
> > var filter = querystream(s, { a : 1}) ; // creates a stream which
> > outputs only rows with #.a=1
>
> > var s1 = new StreamProducer("a stream from a thrid party outputting
> > json rows");
> > var s2 = new StreamProducer("a stream from a thrid party outputting
> > json rows");
> > var join = querystreams.join(s1,s2, { "s1.a = s2.a && s1.b ==
> > s2.b"}); // creates a stream resulting in joining s1 and s2 on the
> > given condition
>
> > var unsorted = new StreamProducer("a stream from a thrid party
> > outputting json rows");
> > var sorted = querystream.sort(unsorted, {a : 'desc'}); // creates a
> > stream where values are sorted depending on the #. property

-- 
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


Re: [nodejs] Re: Queryable JSON Streams

2012-04-24 Thread Nuno Job
Yup, I share your vision :)

- https://github.com/dscape/clarinet
- https://github.com/thejh/node-jsos/issues/2#issuecomment-3548882
(routing like idea)
- https://github.com/substack/node-trumpet (css selectors style, but for html)

Go build it :)

Nuno

On Tue, Apr 24, 2012 at 1:17 PM, manimal45  wrote:
> It does not seem to support streams, does it ?
>
> It's a module which enables use of mongodb semantics without using
> mongodb itself, which is a good idea on itself !
> Though, what I wanted to know is whether or not there exists a stream
> manipulation API.
> Maybe something like spouts and bolts from twitter storm project :
> - https://github.com/nathanmarz/storm
> - 
> http://www.slideshare.net/nathanmarz/storm-distributed-and-faulttolerant-realtime-computation
>
> I think that node.js streams are a powerful interface, usually under
> used by module writters.
> There ought to be some stream manipulation (grouping, sorting,
> joining) outhere which would open the way for amazing use cases like
> twitter's storm.
>
> Anyone with same vision ?
>
>
>
> On 24 avr, 14:02, Roly Fentanes  wrote:
>> there is thishttps://github.com/bevry/query-engine
>>
>> not sql like, mongo like.
>>
>>
>>
>>
>>
>>
>>
>> On Tuesday, April 24, 2012 4:18:41 AM UTC-7, manimal45 wrote:
>>
>> > Hi,
>>
>> > I wanted to know if there was any existing module allowing for
>> > handling json streams with an SQL like API.
>>
>> > For instance, let's say the module's name is querystreams, the
>> > expected API would allow for code like this  :
>> > var s = new StreamProducer("a stream from a thrid party outputting
>> > json rows"); // 'data', {a : 1, b :2} ...
>> > var filter = querystream(s, { a : 1}) ; // creates a stream which
>> > outputs only rows with #.a=1
>>
>> > var s1 = new StreamProducer("a stream from a thrid party outputting
>> > json rows");
>> > var s2 = new StreamProducer("a stream from a thrid party outputting
>> > json rows");
>> > var join = querystreams.join(s1,s2, { "s1.a = s2.a && s1.b ==
>> > s2.b"}); // creates a stream resulting in joining s1 and s2 on the
>> > given condition
>>
>> > var unsorted = new StreamProducer("a stream from a thrid party
>> > outputting json rows");
>> > var sorted = querystream.sort(unsorted, {a : 'desc'}); // creates a
>> > stream where values are sorted depending on the #. property
>
> --
> 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 nodejs@googlegroups.com
> To unsubscribe from this group, send email to
> nodejs+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en

-- 
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


Re: [nodejs] Re: Queryable JSON Streams

2012-04-24 Thread Roly Fentanes
I agree node streams are usually underused and underlooked.

If the json stream you have in mind continously prints json, you might find
this useful https://github.com/fent/node-jstream

Not sure what you mean by sorting streams.

On Tue, Apr 24, 2012 at 5:27 AM, Nuno Job  wrote:

> Yup, I share your vision :)
>
> - https://github.com/dscape/clarinet
> - https://github.com/thejh/node-jsos/issues/2#issuecomment-3548882
> (routing like idea)
> - https://github.com/substack/node-trumpet (css selectors style, but for
> html)
>
> Go build it :)
>
> Nuno
>
> On Tue, Apr 24, 2012 at 1:17 PM, manimal45 
> wrote:
> > It does not seem to support streams, does it ?
> >
> > It's a module which enables use of mongodb semantics without using
> > mongodb itself, which is a good idea on itself !
> > Though, what I wanted to know is whether or not there exists a stream
> > manipulation API.
> > Maybe something like spouts and bolts from twitter storm project :
> > - https://github.com/nathanmarz/storm
> > -
> http://www.slideshare.net/nathanmarz/storm-distributed-and-faulttolerant-realtime-computation
> >
> > I think that node.js streams are a powerful interface, usually under
> > used by module writters.
> > There ought to be some stream manipulation (grouping, sorting,
> > joining) outhere which would open the way for amazing use cases like
> > twitter's storm.
> >
> > Anyone with same vision ?
> >
> >
> >
> > On 24 avr, 14:02, Roly Fentanes  wrote:
> >> there is thishttps://github.com/bevry/query-engine
> >>
> >> not sql like, mongo like.
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >> On Tuesday, April 24, 2012 4:18:41 AM UTC-7, manimal45 wrote:
> >>
> >> > Hi,
> >>
> >> > I wanted to know if there was any existing module allowing for
> >> > handling json streams with an SQL like API.
> >>
> >> > For instance, let's say the module's name is querystreams, the
> >> > expected API would allow for code like this  :
> >> > var s = new StreamProducer("a stream from a thrid party outputting
> >> > json rows"); // 'data', {a : 1, b :2} ...
> >> > var filter = querystream(s, { a : 1}) ; // creates a stream which
> >> > outputs only rows with #.a=1
> >>
> >> > var s1 = new StreamProducer("a stream from a thrid party outputting
> >> > json rows");
> >> > var s2 = new StreamProducer("a stream from a thrid party outputting
> >> > json rows");
> >> > var join = querystreams.join(s1,s2, { "s1.a = s2.a && s1.b ==
> >> > s2.b"}); // creates a stream resulting in joining s1 and s2 on the
> >> > given condition
> >>
> >> > var unsorted = new StreamProducer("a stream from a thrid party
> >> > outputting json rows");
> >> > var sorted = querystream.sort(unsorted, {a : 'desc'}); // creates a
> >> > stream where values are sorted depending on the #. property
> >
> > --
> > 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 nodejs@googlegroups.com
> > To unsubscribe from this group, send email to
> > nodejs+unsubscr...@googlegroups.com
> > For more options, visit this group at
> > http://groups.google.com/group/nodejs?hl=en?hl=en
>
> --
> 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 nodejs@googlegroups.com
> To unsubscribe from this group, send email to
> nodejs+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>



-- 
*Roly Fentanes*
r...@markover.me
480 200 3369

-- 
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


Re: [nodejs] Re: Queryable JSON Streams

2012-04-24 Thread Nuno Job
Roly you could have told me this existed :PP God damnit :)

Stoked!

Nuno

On Tue, Apr 24, 2012 at 1:35 PM, Roly Fentanes  wrote:
> in mind continously prints j

-- 
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


Re: [nodejs] Re: Examples of C++ modules, for Node.js

2012-04-24 Thread Ben Noordhuis
On Tue, Apr 24, 2012 at 06:11, rhasson  wrote:
> I found out that for Solaris ELF executables you can pass a "-R/path/to/lib"
> argument which will record the path and library name into the executable
> which will allow it to find it at runtime without needing to update the
> LD_LIBRARY_PATH.  Is there an equivalent argument for Linux?

Yes. `man ld` and search for rpath. Restrictions may apply to setuid
root programs (which node shouldn't be).

-- 
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


[nodejs] Re: Queryable JSON Streams

2012-04-24 Thread manimal45
It's all good and creative, nonetheless, does anyone outthere has
looked at twitter's storm.
It's closer to what I've got in mind (see first post) and goes a
little step further with algorithmics:
- joins
- aggregates
- ...

For instance joining two json streams coming from two different
databases can be achieved simply by bolts in storm (which i don't know
and don't want to use at all because configuration seems not that
simple !!).

Most of existing module focus on parsing json chunks to ouptut json
rows.
I instead assume json is parsed (thanks to wonderful modules outhere)
and want to compose streams.

Go and look at storm to get an idea of the use cases better than i
could explain myself.


On 24 avr, 14:43, Nuno Job  wrote:
> Roly you could have told me this existed :PP God damnit :)
>
> Stoked!
>
> Nuno
>
>
>
>
>
>
>
> On Tue, Apr 24, 2012 at 1:35 PM, Roly Fentanes  wrote:
> > in mind continously prints j

-- 
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


[nodejs]Hide cursor in CLI

2012-04-24 Thread jason . 桂林
I want to write a CLI program, but I got a little problem

var x = 0; setInterval(function(){ process.stdout.write('\r' + (++x)) }, 10)

I wrote this simple program ,  how to hide cursor in CLI?
--
Best regards,

Jason Green
桂林

-- 
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


Re: [nodejs]Hide cursor in CLI

2012-04-24 Thread Ryan Schmidt

On Apr 24, 2012, at 09:28, jason.桂林 wrote:

> I want to write a CLI program, but I got a little problem
> 
> var x = 0; setInterval(function(){ process.stdout.write('\r' + (++x)) }, 10)
> 
> I wrote this simple program ,  how to hide cursor in CLI?

That's a shell programming question, not a node question.

http://www.unix.com/shell-programming-scripting/176837-bash-hide-terminal-cursor.html

-- 
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


Re: [nodejs]Hide cursor in CLI

2012-04-24 Thread jason . 桂林
Many node CLI program.

2012/4/24 Ryan Schmidt :
>
> On Apr 24, 2012, at 09:28, jason.桂林 wrote:
>
>> I want to write a CLI program, but I got a little problem
>>
>> var x = 0; setInterval(function(){ process.stdout.write('\r' + (++x)) }, 10)
>>
>> I wrote this simple program ,  how to hide cursor in CLI?
>
> That's a shell programming question, not a node question.
>
> http://www.unix.com/shell-programming-scripting/176837-bash-hide-terminal-cursor.html
>
> --
> 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 nodejs@googlegroups.com
> To unsubscribe from this group, send email to
> nodejs+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en



-- 
Best regards,

Jason Green
桂林

-- 
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


Re: [nodejs]Hide cursor in CLI

2012-04-24 Thread Ryan Schmidt

On Apr 24, 2012, at 09:33, Ryan Schmidt wrote:

> On Apr 24, 2012, at 09:28, jason.桂林 wrote:
> 
>> I want to write a CLI program, but I got a little problem
>> 
>> var x = 0; setInterval(function(){ process.stdout.write('\r' + (++x)) }, 10)
>> 
>> I wrote this simple program ,  how to hide cursor in CLI?
> 
> That's a shell programming question, not a node question.
> 
> http://www.unix.com/shell-programming-scripting/176837-bash-hide-terminal-cursor.html

I guess there are node modules to help you do this. Here's an example of 
someone using cursor.hide() and cursor.show(), where cursor is obtained from 
require('ansi').

https://gist.github.com/2299368

There's also node-ncurses which has showCursor.

https://github.com/mscdex/node-ncurses

etc.

-- 
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


Re: [nodejs] Your thoughts wanted on a node AI project

2012-04-24 Thread David Whitten
This level of AI is closer than you think.

This is not exactly the same sentences, because RACE
isn't quite smart enough for your original English sentence,
but a small change does produce interesting results.
 I went to  http://attempto.ifi.uzh.ch/race/
and put in these axioms:

Joe is a wild boy.
Mike is a crazy boy.

and the query:

Who is the crazy boy?

and got back this:

overall time: 2.86 sec; RACE time: 0.04 sec

*Axioms*: Joe is a wild boy. Mike is a crazy boy.

*Query*: Who is the crazy boy?

*Parameters*:

There is 1 message.
ImportanceTypeSentenceProblemDescription/Suggestionwarninganaphor1The
definite noun phrase 'the boy' does not have an antecedent and thus is not
interpreted as anaphoric reference, but as a new indefinite noun phrase.If
the definite noun phrase 'the boy' should be an anaphoric reference then
you must introduce an appropriate antecedent.

The following minimal subsets of the axioms answer the query:
Subset 1

   - 2: Mike is a crazy boy.
   - Substitution: who = Mike



On Mon, Apr 23, 2012 at 11:14 PM, Dennis Kane  wrote:

> Hey, thanks!  This is really a labor of love at the moment, but I do have
> some pretty big ambitions.  I just think that with all of this Siri
> business floating around, there are very real expectations for general AI
> capabilities being built up in people's heads.  Many people think that IBM
> Watson is an example of AI.  I don't believe that is true.  Watson is just
> meant to sift through a static corpus of facts based on keywords and then
> fashion an answer based on levels of confidence.  From what I've seen,
> there is no facility to correctly handle these two simple  statements
> (which I believe is an absolute minimum example of AI capabilities):
>
> There is a wild boy named Joe and a crazy boy named Mike
> Who is the crazy boy?
>
> This is meant to be something of a very high-level programming language
> that does not internally (at the parser level) make policy decisions about
> statements of fact.  In their common vernacular, people will be able to
> "teach" their computers about whatever facts/subjects they are interested
> in, and then execute natural language programs: with conditionals, loops
> and all.
>
> I think that such a tool as this is necessary if there is ever going to be
> a truly semantic web that people will be able to navigate purely with human
> logic.  And when enough of these kinds of services are populating the web,
> we will begin to be able to see the emergence of systems that even
> laypeople will recognize as particularly responsive to their needs, and yes
> -- even "intelligent".
>
> On Monday, April 23, 2012 12:53:14 PM UTC-7, tedsuo wrote:
>>
>> Really nifty.  It would be fun to play with.  One way to do it would be
>> to open source the AI engine, but keep the large scale hosting and support
>> architecture hidden.  That way academics and users with other needs could
>> play with it and contribute.
>>
>> Ted
>>
>> On Apr 23, 2012, at 10:50 AM, Dennis Kane wrote:
>>
>> The site is powered by an express server, which exec's a separate node AI
>> process for each new IP address.  Each process will automatically end after
>> 10 minutes of inactivity.  You can interface with the process either
>> through a browser at ai.webcyte.net or by sending a URL encoded GET
>> request to http://ai.webcyte.net/send.  So, the comand line for the
>> phrase, "there is a boy named joe" using curl will look like:
>>
>> $ curl 
>> http://ai.webcyte.net/send/**there%20is%20a%20boy%20named%**20joe
>>
>> Detailed instructions can be found at ai.webcyte.net.
>>
>> This project is currently meant to be a prototype in order to build
>> interest in developing a robust AI system that "just works" (read: NOT
>> another chatterbot!).  It can possibly be used as the intelligent backend
>> to a Siri-like voice interface in the not too distant future.
>>
>> I am interested in getting in touch with academic/research types as well
>> as business types.
>>
>> Will probably want to develop an open source version for non-business
>> purposes that can be used on the client side (eventually) and keep the
>> supported commercial version well hidden from prying eyes on the server
>> side.
>>
>> Thoughts?
>>
>> --
>> 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 nodejs@googlegroups.com
>> To unsubscribe from this group, send email to
>> nodejs+unsubscribe@**googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/**group/nodejs?hl=en?hl=en
>>
>>
>>
> On Monday, April 23, 2012 12:53:14 PM UTC-7, tedsuo wrote:
>>
>> Really nift

Re: [nodejs] Your thoughts wanted on a node AI project

2012-04-24 Thread Jann Horn
On Mon, Apr 23, 2012 at 10:50:25AM -0700, Dennis Kane wrote:
> Detailed instructions can be found at ai.webcyte.net.
> 
> This project is currently meant to be a prototype in order to build 
> interest in developing a robust AI system that "just works" (read: NOT 
> another chatterbot!).  It can possibly be used as the intelligent backend 
> to a Siri-like voice interface in the not too distant future.

> Will probably want to develop an open source version for non-business 
> purposes that can be used on the client side (eventually) and keep the 
> supported commercial version well hidden from prying eyes on the server 
> side.
> 
> Thoughts?

Looks cool, I want the source! :D

How much time did you spend on that so far?

I think you should query wiktionary.org or so for unknown words. It doesn't 
even understand "cake is delicious". :( Also, you'll have to somehow support 
names it doesn't know about - how do you want to do that?


pgpzqaA0DIq7Q.pgp
Description: PGP signature


[nodejs] Re: Your thoughts wanted on a node AI project

2012-04-24 Thread Dennis Kane
Hi Jann,

I'm not sure you really want the source at this point... at least not
without some pretty detailed explanation to go along with it!

I first started working on the algorithm six years ago in perl, which
also happened to be when I was first learning how to program.  Given
my inexperience, that effort didn't amount to much.  But it has only
been less than a month since I began from scratch in Javascript.  So
the overall algorithm has been sitting in my head for quite some time,
but it has only been very recently that I've decided to take up the AI
challenge again... this time with far more programming ability.

As far as it goes, I have so far put zero effort into having a decent
variety of words being recognized.  On the site, you will find
instructions to see what words are recognized, and how to add to the
list.

At present, there is no facility to refer to things without using some
kind of article or possessive...  So to do something like what you
want, you will have to type the following two lines to get it to
recognize the words:

nouns:cake
adjs:delicious

Then you can type something like:

There is a delicious cake

or...

There is a cake
It is delicious

or even...

There is a cake and it is delicious

Then you can say...

There is a boy named mike
He has the cake
Mikes cake is blue

The idea of saying "cake is delicious" is much more dangerous because
it labels an entire type class.  This would disallow the existence of
bad tasting cakes.  I think at this early phase, it is much better to
think in terms of instances rather than entire classes.  Then once the
logic of instances gets worked out, we can start thinking about
classes (carefully!).

The program does allow you to give arbitrary names like this:

There is a boy named Zebulon

or

There is a girl
She is named Zelda

It currently looks for any arbitrary sequence of characters after the
word "named" and then adds this sequence into the list of recognized
names.

On Apr 24, 7:51 am, Jann Horn  wrote:
> On Mon, Apr 23, 2012 at 10:50:25AM -0700, Dennis Kane wrote:
> > Detailed instructions can be found at ai.webcyte.net.
>
> > This project is currently meant to be a prototype in order to build
> > interest in developing a robust AI system that "just works" (read: NOT
> > another chatterbot!).  It can possibly be used as the intelligent backend
> > to a Siri-like voice interface in the not too distant future.
> > Will probably want to develop an open source version for non-business
> > purposes that can be used on the client side (eventually) and keep the
> > supported commercial version well hidden from prying eyes on the server
> > side.
>
> > Thoughts?
>
> Looks cool, I want the source! :D
>
> How much time did you spend on that so far?
>
> I think you should query wiktionary.org or so for unknown words. It doesn't 
> even understand "cake is delicious". :( Also, you'll have to somehow support 
> names it doesn't know about - how do you want to do that?
>
>  application_pgp-signature_part
> < 1KViewDownload

-- 
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


Re: [nodejs]Hide cursor in CLI

2012-04-24 Thread jason . 桂林
Thanks very much

2012/4/24 Ryan Schmidt :
>
> On Apr 24, 2012, at 09:33, Ryan Schmidt wrote:
>
>> On Apr 24, 2012, at 09:28, jason.桂林 wrote:
>>
>>> I want to write a CLI program, but I got a little problem
>>>
>>> var x = 0; setInterval(function(){ process.stdout.write('\r' + (++x)) }, 10)
>>>
>>> I wrote this simple program ,  how to hide cursor in CLI?
>>
>> That's a shell programming question, not a node question.
>>
>> http://www.unix.com/shell-programming-scripting/176837-bash-hide-terminal-cursor.html
>
> I guess there are node modules to help you do this. Here's an example of 
> someone using cursor.hide() and cursor.show(), where cursor is obtained from 
> require('ansi').
>
> https://gist.github.com/2299368
>
> There's also node-ncurses which has showCursor.
>
> https://github.com/mscdex/node-ncurses
>
> etc.
>
> --
> 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 nodejs@googlegroups.com
> To unsubscribe from this group, send email to
> nodejs+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en



-- 
Best regards,

Jason Green
桂林

-- 
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


[nodejs] network benchmark heat map?

2012-04-24 Thread jason . 桂林
I ever saw some chart like heat map, but it is for http server
benchmark, it has x y, also a depth color dot, I need some information
about this, but I don't know what the keyword should I google. Google
heat map I got something like geography heat map, not what I want.

-- 
Best regards,

Jason Green
桂林

-- 
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


[nodejs] Segfault using node.io in node.js v0.6.15

2012-04-24 Thread wizard113
looking for pointers on what I need to dive into next - I suspect
something horrible is happening in node.io: htmlparser.js.

I am using node.io to scrape
http://www.reuters.com/article/2012/03/30/utilities-southern-kemper-idUSL2E8EUAHQ20120330?feedType=RSS&feedName=utilitiesSector

and I get a segfault each time.

information:
valgrind & strace output - http://pastebin.com/McidkC0g

System info - Linux  2.6.18-194.3.1.el5 #1 SMP Thu May 13 13:09:10 EDT
2010 i686 athlon i386 GNU/Linux
$ free -m
 total   used   free sharedbuffers
cached
Mem:  3034   2809224  0531
1593
-/+ buffers/cache:684   2349
Swap: 2047  0   2047

$ node -v
v0.6.15
$ npm -v
1.1.18

node.io scrape options:
var scrapeOptions = {
silent:  true,
jsdom:   true,  // enable
parsing of js files
external_resources: ['script'],
timeout: 10,//Timeout after 10
seconds
max: 1,
retries: 3  //Threads can retry 3
times before failing
};

FWIW, I also had this error in node.js v0.4.11, and one of the first
steps I took was to upgrade node.js, npm and relevant npm modules.

-- 
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


Re: [nodejs] network benchmark heat map?

2012-04-24 Thread Ben Noordhuis
On Tue, Apr 24, 2012 at 19:38, jason.桂林  wrote:
> I ever saw some chart like heat map, but it is for http server
> benchmark, it has x y, also a depth color dot, I need some information
> about this, but I don't know what the keyword should I google. Google
> heat map I got something like geography heat map, not what I want.

https://github.com/brendangregg/FlameGraph ?

-- 
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


Re: [nodejs] Your thoughts wanted on a node AI project

2012-04-24 Thread Ted Young

> Hi Jann,
> 
> I'm not sure you really want the source at this point... at least not
> without some pretty detailed explanation to go along with it!

Haha I used to think that way too.  But it's better to just open source early 
if open source is your goal, and slap a warning label on it saying it's in the 
very early stages.  I've found people to be pretty understanding and 
non-judgemental about code quality, unless you are proposing that it is 
production ready when it is not.  :)

-- 
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


Re: [nodejs] Your thoughts wanted on a node AI project

2012-04-24 Thread Joshua Holbrook
> The first AI that impressed me and has value for me is the one that delivers 
> me what I want in the day before I consciously realize I want it.

Welcome to consumer analytics. :) If you have enough data you can
extract all kinds of trends.

--Josh

On Tue, Apr 24, 2012 at 12:35 PM, Ted Young  wrote:
>
>> Hi Jann,
>>
>> I'm not sure you really want the source at this point... at least not
>> without some pretty detailed explanation to go along with it!
>
> Haha I used to think that way too.  But it's better to just open source early 
> if open source is your goal, and slap a warning label on it saying it's in 
> the very early stages.  I've found people to be pretty understanding and 
> non-judgemental about code quality, unless you are proposing that it is 
> production ready when it is not.  :)
>
> --
> 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 nodejs@googlegroups.com
> To unsubscribe from this group, send email to
> nodejs+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en



-- 
Joshua Holbrook
Engineer
Nodejitsu Inc.
j...@nodejitsu.com

-- 
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


[nodejs] Expressjs Gzip compress - nodejitsu?

2012-04-24 Thread Hakan Guzelgoz
Hi,

I am using Express and am quite new on it. I just started to work on a
simple website.
On top of that, I've setup an account with nodejitsu.com and want to deploy
my website there - as it works and seems easy enough.

Anyway, my question is about Gzip compression. I've seen that on production
people recommending to use Nginx - but I don't think I can use that
configuration with nodejitsu.
1. Is there any easy way of doing CSS, JS, and other static file
compression under Express?
2. Anyway to setup nodejitsu maybe to do the Gzip compress?
3. I've seen the middleware connect and it seems that there is some
compression there - but even though my code seems to work, Chrome inspector
tells me that CSS has not been compressed.

Many thanks.
Hakan Guzelgoz

-- 
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


[nodejs] Why doesn't URL.parse decode the URI?

2012-04-24 Thread Matt
> url.parse("http://host/path/some+thing%20with%20spaces+in+it/bar";, true);
{ protocol: 'http:',
  slashes: true,
  host: 'host',
  hostname: 'host',
  href: 'http://host/path/some+thing%20with%20spaces+in+it/bar',
  search: '',
  query: {},
  pathname: '/path/some+thing%20with%20spaces+in+it/bar',
  path: '/path/some+thing%20with%20spaces+in+it/bar' }

I kind of hoped it would set the path to '/path/some thing with spaces in
it/bar' which would be appropriate for passing to the filesystem. How come
it doesn't decode the path?

-- 
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


Re: [nodejs] Why doesn't URL.parse decode the URI?

2012-04-24 Thread Matt Patenaude
If Node automatically performed a URL decode on the pathname, you lose data — 
e.g., if your application depended on knowing whether someone encoded a space 
as a "+" or %20 (it seems silly, but let's say you can contrive an example 
where that matters), you'd have no way to tell from that information. URL 
parsing and decoding are conceptually separate steps, and the implementation in 
Node reflects that.

You should be able to get a correctly-decoded URL using something like:


decodeURIComponent(url.parse("http://host/path/some+thing%20with%20spaces+in+it/bar";,
 true).path.replace(/\++/g, ' '))

Just make sure you always resolve the +'s first, because if someone 
percent-encodes a literal + sign, that would then be translated into a space if 
done in the wrong order.

Hope that helps!

-Matt


On Apr 24, 2012, at 4:25 PM, Matt wrote:

> > url.parse("http://host/path/some+thing%20with%20spaces+in+it/bar";, true);
> { protocol: 'http:',
>   slashes: true,
>   host: 'host',
>   hostname: 'host',
>   href: 'http://host/path/some+thing%20with%20spaces+in+it/bar',
>   search: '',
>   query: {},
>   pathname: '/path/some+thing%20with%20spaces+in+it/bar',
>   path: '/path/some+thing%20with%20spaces+in+it/bar' }
> 
> I kind of hoped it would set the path to '/path/some thing with spaces in 
> it/bar' which would be appropriate for passing to the filesystem. How come it 
> doesn't decode the path?
> 
> -- 
> 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 nodejs@googlegroups.com
> To unsubscribe from this group, send email to
> nodejs+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en

-- 
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


Re: [nodejs] Why doesn't URL.parse decode the URI?

2012-04-24 Thread Matt Patenaude
Sorry, that replace statement collapses multiple plus signs into a single 
space, but that's probably never what you want, my mistake! Should be this:


decodeURIComponent(url.parse("http://host/path/some+thing%20with%20spaces+in+it/bar";,
 true).path.replace(/\+/g, ' '))

Alternatively, there's this little trick, but I prefer the above personally!


decodeURIComponent(url.parse("http://host/path/some+thing%20with%20spaces+in+it/bar";,
 true).path.split('+').join(' '))

-Matt


On Apr 24, 2012, at 4:51 PM, Matt Patenaude wrote:

> If Node automatically performed a URL decode on the pathname, you lose data — 
> e.g., if your application depended on knowing whether someone encoded a space 
> as a "+" or %20 (it seems silly, but let's say you can contrive an example 
> where that matters), you'd have no way to tell from that information. URL 
> parsing and decoding are conceptually separate steps, and the implementation 
> in Node reflects that.
> 
> You should be able to get a correctly-decoded URL using something like:
> 
>   
> decodeURIComponent(url.parse("http://host/path/some+thing%20with%20spaces+in+it/bar";,
>  true).path.replace(/\++/g, ' '))
> 
> Just make sure you always resolve the +'s first, because if someone 
> percent-encodes a literal + sign, that would then be translated into a space 
> if done in the wrong order.
> 
> Hope that helps!
> 
> -Matt
> 
> 
> On Apr 24, 2012, at 4:25 PM, Matt wrote:
> 
>> > url.parse("http://host/path/some+thing%20with%20spaces+in+it/bar";, true);
>> { protocol: 'http:',
>>   slashes: true,
>>   host: 'host',
>>   hostname: 'host',
>>   href: 'http://host/path/some+thing%20with%20spaces+in+it/bar',
>>   search: '',
>>   query: {},
>>   pathname: '/path/some+thing%20with%20spaces+in+it/bar',
>>   path: '/path/some+thing%20with%20spaces+in+it/bar' }
>> 
>> I kind of hoped it would set the path to '/path/some thing with spaces in 
>> it/bar' which would be appropriate for passing to the filesystem. How come 
>> it doesn't decode the path?
>> 
>> -- 
>> 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 nodejs@googlegroups.com
>> To unsubscribe from this group, send email to
>> nodejs+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/nodejs?hl=en?hl=en
> 
> 
> -- 
> 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 nodejs@googlegroups.com
> To unsubscribe from this group, send email to
> nodejs+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en

-- 
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


Re: [nodejs] Your thoughts wanted on a node AI project

2012-04-24 Thread Dennis Kane
To open source or not to open source... THAT is the question!

Do I want to SAVE the world or do I want to OWN it, haha ;)

I really do want to keep it close to the vest at the moment.  I am not 
feeling too liberal right now.

But I would like to start getting a team together to help make it 
commercially viable (wink wink nudge nudge).  This, to me, is by far the 
best way to attract the best talent for such a demanding sort of project. 
 Will keep my ears open for any interested VC's sniffing around here...


On Tuesday, April 24, 2012 12:35:43 PM UTC-7, tedsuo wrote:
>
>
> Haha I used to think that way too.  But it's better to just open source 
> early if open source is your goal, and slap a warning label on it saying 
> it's in the very early stages.  I've found people to be pretty 
> understanding and non-judgemental about code quality, unless you are 
> proposing that it is production ready when it is not.  :)
>
>

-- 
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


[nodejs] what's the correct/best license for an open-source client library to a non-open-source service?

2012-04-24 Thread Ken
I'm in the processing of releasing open-source clients (including one for 
node) for a currently free but planned freemium service (which is not open 
source).  I don't care at all about people copying/modifying the code of 
the client (so would default to MIT or similar) but in its default mode the 
only thing the client does is communicate with the service and thus its use 
should adhere to the terms of service.  Anyone have pointers (or precedent) 
for the right kind of license to use for this?

--Ken

-- 
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


Re: [nodejs] Why doesn't URL.parse decode the URI?

2012-04-24 Thread Matt
On Tue, Apr 24, 2012 at 4:51 PM, Matt Patenaude wrote:

> If Node automatically performed a URL decode on the pathname, you lose
> data — e.g., if your application depended on knowing whether someone
> encoded a space as a "+" or %20 (it seems silly, but let's say you can
> contrive an example where that matters), you'd have no way to tell from
> that information. URL parsing and decoding are conceptually separate steps,
> and the implementation in Node reflects that.
>

But the encoding would still be present in the "path" part. Just decoded in
"pathname".

I get the "don't throw away data" part.

And I'm also not suggesting fixing this - because I'm sure it would break a
bunch of things. Just curious why it was done that way?

FWIW I was testing this because Ruby's Sinatra treats %3F in the URL as the
end of the path and start of the querystring. How ridiculous is that? I
wanted to make sure Node (express) didn't have the same bug.

Matt.

-- 
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


Re: [nodejs] what's the correct/best license for an open-source client library to a non-open-source service?

2012-04-24 Thread Matt
Just stick with MIT. It makes everyone the most comfortable.

On Tue, Apr 24, 2012 at 5:07 PM, Ken  wrote:

> I'm in the processing of releasing open-source clients (including one for
> node) for a currently free but planned freemium service (which is not open
> source).  I don't care at all about people copying/modifying the code of
> the client (so would default to MIT or similar) but in its default mode the
> only thing the client does is communicate with the service and thus its use
> should adhere to the terms of service.  Anyone have pointers (or precedent)
> for the right kind of license to use for this?
>
> --Ken
>
> --
> 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 nodejs@googlegroups.com
> To unsubscribe from this group, send email to
> nodejs+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>

-- 
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


Re: [nodejs] what's the correct/best license for an open-source client library to a non-open-source service?

2012-04-24 Thread Ben Noordhuis
On Tue, Apr 24, 2012 at 23:09, Matt  wrote:
> Just stick with MIT. It makes everyone the most comfortable.

Or the Apache 2.0 license if you want a patent grant. MIT, BSD and ISC
are fine too but they don't say anything about patents.

-- 
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


Re: [nodejs] Re: Request events handlers must be added in the same tick of the http request handler execution (I guess)

2012-04-24 Thread Kilian C.
I did it https://github.com/kilianc/node-buffered-request

-- 
Kilian C.


On Thursday, April 19, 2012 at 9:01 PM, Charlie Robbins wrote:

> YES! Although would have loved to see this in 0.7.
> 
> On Wed, Apr 18, 2012 at 2:20 PM, Mikeal Rogers  (mailto:mikeal.rog...@gmail.com)> wrote:
> > Not yet, expect it in 0.9 along with an option `size` param that will set 
> > the number of bytes to buffer before returning false on write. 
> > 
> > On Apr 18, 2012, at April 18, 20121:59 PM, Tim Caswell wrote:
> > > Doesn't .pause() now buffer internally?  In my testing I haven't missed 
> > > any events as long as I .pause() on the first tick.  I would like to know 
> > > if this is supported behavior.
> > > 
> > > On Wed, Apr 18, 2012 at 3:49 PM, Mark Hahn  > > (mailto:m...@hahnca.com)> wrote:
> > > > There is a buffered stream available from Mikeal that solves this 
> > > > problem.
> > > > 
> > > > 
> > > > On Wed, Apr 18, 2012 at 1:47 PM, mscdex  > > > (mailto:msc...@gmail.com)> wrote:
> > > > > On Apr 18, 4:42 pm, "Kilian C."  > > > > (mailto:kilian.ciuff...@gmail.com)> wrote:
> > > > > > As I wrote in the subject:
> > > > > > Are request events handlers must be added in the same tick of the 
> > > > > > http
> > > > > > request handler execution?
> > > > > 
> > > > > Yes, you should add a handler immediately so as not to miss any data
> > > > > chunks from the request. You are not required to do so however.
> > > > > 
> > > > > --
> > > > > 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 nodejs@googlegroups.com 
> > > > > (mailto:nodejs@googlegroups.com)
> > > > > To unsubscribe from this group, send email to
> > > > > nodejs+unsubscr...@googlegroups.com 
> > > > > (mailto:nodejs%2bunsubscr...@googlegroups.com)
> > > > > For more options, visit this group at
> > > > > http://groups.google.com/group/nodejs?hl=en?hl=en
> > > > 
> > > > 
> > > > -- 
> > > > 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 nodejs@googlegroups.com 
> > > > (mailto:nodejs@googlegroups.com)
> > > > To unsubscribe from this group, send email to
> > > > nodejs+unsubscr...@googlegroups.com 
> > > > (mailto:nodejs%2bunsubscr...@googlegroups.com)
> > > > For more options, visit this group at
> > > > http://groups.google.com/group/nodejs?hl=en?hl=en
> > > 
> > > 
> > > -- 
> > > 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 nodejs@googlegroups.com 
> > > (mailto:nodejs@googlegroups.com)
> > > To unsubscribe from this group, send email to
> > > nodejs+unsubscr...@googlegroups.com 
> > > (mailto:nodejs+unsubscr...@googlegroups.com)
> > > For more options, visit this group at
> > > http://groups.google.com/group/nodejs?hl=en?hl=en
> > 
> > -- 
> > 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 nodejs@googlegroups.com 
> > (mailto:nodejs@googlegroups.com)
> > To unsubscribe from this group, send email to
> > nodejs+unsubscr...@googlegroups.com 
> > (mailto:nodejs%2bunsubscr...@googlegroups.com)
> > For more options, visit this group at
> > http://groups.google.com/group/nodejs?hl=en?hl=en
> 
> -- 
> 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 nodejs@googlegroups.com 
> (mailto:nodejs@googlegroups.com)
> To unsubscribe from this group, send email to
> nodejs+unsubscr...@googlegroups.com 
> (mailto:nodejs+unsubscr...@googlegroups.com)
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en

-- 
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


Re: [nodejs] network benchmark heat map?

2012-04-24 Thread jason . 桂林
Thanks, Unlike the images in your link, what I saw is depth color in
each dot not block

2012/4/25 Ben Noordhuis :
> On Tue, Apr 24, 2012 at 19:38, jason.桂林  wrote:
>> I ever saw some chart like heat map, but it is for http server
>> benchmark, it has x y, also a depth color dot, I need some information
>> about this, but I don't know what the keyword should I google. Google
>> heat map I got something like geography heat map, not what I want.
>
> https://github.com/brendangregg/FlameGraph ?
>
> --
> 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 nodejs@googlegroups.com
> To unsubscribe from this group, send email to
> nodejs+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en



-- 
Best regards,

Jason Green
桂林

-- 
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


[nodejs] Re: network benchmark heat map?

2012-04-24 Thread mscdex
On Apr 24, 8:30 pm, jason.桂林  wrote:
> Thanks, Unlike the images in your link, what I saw is depth color in
> each dot not block

This kind of graph?: 
http://joyeur.com/2011/12/13/presenting-file-system-latency/

-- 
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


[nodejs] Re: network benchmark heat map?

2012-04-24 Thread mscdex
On Apr 24, 9:43 pm, mscdex  wrote:
> On Apr 24, 8:30 pm, jason.桂林  wrote:
>
> > Thanks, Unlike the images in your link, what I saw is depth color in
> > each dot not block
>
> This kind of 
> graph?:http://joyeur.com/2011/12/13/presenting-file-system-latency/

which is more or less this: http://howtonode.org/heat-tracer

-- 
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


Re: [nodejs]will kilos setTimeout spend too much resourece?

2012-04-24 Thread alFReD NSH
I think for something like that you should decide how accurate you want to 
be and use a function on an interval to remove all expired things. Like run 
the function on every minute or every second, depending on your need. A  A 
lot of timers are not a good, and not that much accurate.

On Monday, 23 April 2012 13:49:08 UTC+8, Jason.桂林 wrote:
>
> I need to write a service use something like in memory cache, and I want 
> to do `expire` things in setTimeout, will it very slow, If I expire too 
> much things, about kilos to millions.
>
> -- 
> Best regards,
>
> Jason Green
> 桂林
>
>
>

-- 
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


[nodejs] Re: mobile web ui with node

2012-04-24 Thread Filipe
Really nice answers guys, thanks for the discussion.

I quit using jQuery Mobile because I'm having to much bugs too in
elements, slides and renderings. But what I REALLY liked was the  and then access it easily  with 


john.tiger, how are your tests with those new frameworks?

Best regards,

Filipe

-- 
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


[nodejs] Re: Your thoughts wanted on a node AI project

2012-04-24 Thread Dennis Kane
Now that I think about it more, Javascript makes the entire issue of open 
source much less urgent given that one can pass in their own custom 
functions, either for replacement purposes or for extension.  I'll just 
have to provide the API for what kinds of arguments will be passed in and 
what should be returned.  You'll be able to save the functions on the 
client side through the HTML5 File API, and then send them via XHR into the 
process at runtime.

And when it comes to how the program works in general, I would much rather 
give people a conceptual understanding through pseudocode examples and have 
them develop their own implementations.  I know that this way requires 
actual time and thought, but hey... these things never hurt anyone did they?

I do find the whole open source movement a tad pointless.  For me, the 
source code always takes a back seat to good API documentation, well 
commented header files, decent man pages, a good bug reporting/fixing 
system, etc.

-- 
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


Re: [nodejs] Re: Queryable JSON Streams

2012-04-24 Thread Dominic Tarr
performing a join like operation on a two streams is certainly possible,
as is filtering or mapping a stream.

I have a lib for some of this stuff
https://github.com/dominictarr/event-stream

max, min, sort, count etc, unfortunately cannot return a correct answer
until they have received the end event, so using the Stream interface in
that case looses the purpose of streams.

although, if you are interested in streaming aggregates that periodically
emit the most uptodate aggregate (rather than a single final answer) I also
played around with making a realtime map reduce lib. I havn't used it for
anything, but it has tests.

https://github.com/dominictarr/reducer

It can also deal with the case where a row is updated and that has changed
the total.
I've implemented several ways of handling updates.



On Wed, Apr 25, 2012 at 2:10 AM, manimal45  wrote:

> It's all good and creative, nonetheless, does anyone outthere has
> looked at twitter's storm.
> It's closer to what I've got in mind (see first post) and goes a
> little step further with algorithmics:
> - joins
> - aggregates
> - ...
>
> For instance joining two json streams coming from two different
> databases can be achieved simply by bolts in storm (which i don't know
> and don't want to use at all because configuration seems not that
> simple !!).
>
> Most of existing module focus on parsing json chunks to ouptut json
> rows.
> I instead assume json is parsed (thanks to wonderful modules outhere)
> and want to compose streams.
>
> Go and look at storm to get an idea of the use cases better than i
> could explain myself.
>
>
> On 24 avr, 14:43, Nuno Job  wrote:
> > Roly you could have told me this existed :PP God damnit :)
> >
> > Stoked!
> >
> > Nuno
> >
> >
> >
> >
> >
> >
> >
> > On Tue, Apr 24, 2012 at 1:35 PM, Roly Fentanes  wrote:
> > > in mind continously prints j
>
> --
> 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 nodejs@googlegroups.com
> To unsubscribe from this group, send email to
> nodejs+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>

-- 
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


[nodejs] Expressjs Gzip compress - nodejitsu?

2012-04-24 Thread dvbportal
At Cloudnode we use gzippo (http://tomg.co/gzippo) for that. It works great and 
needs just two lines to include the compression code. It keeps everything in 
memory, so you need some amount for that, but in return it is really fast. 

-- 
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en