Re: [nodejs] Uncaught TypeError: PouchDB is not a constructor

2018-10-23 Thread Joshua Holbrook
A tiny hint maybe: it looks like pouchdb uses es6 module syntax
https://github.com/pouchdb/pouchdb/blob/master/packages/node_modules/pouchdb/src/pouchdb.js
and this is presumably compiled via babel - so the way that require works
might be funky. Dunno though. Either way, I'd see if PouchDB here is
actually an object with, say a "default" property whose value is the
PouchDB constructor. console.log will probably help you here.

Good luck!

--Josh

On Tue, Oct 23, 2018 at 3:57 PM Matias Salimbene 
wrote:

> Hello,
>
> I'm using pouchDB as a cdb for an app and I'm struggling to understand
> this error: *Uncaught TypeError: PouchDB is not a constructor*
> The declaration is as follows:
>
> var PouchDB = require("pouchdb");var db = new PouchDB("scr");
>
> I've read about how it may be related to types and that adding:
>
>  "@types/node": "^10.12.0",
>  "@types/pouchdb": "^6.3.2",
>
>
> to my package.json should help, but it isn't. I've tested on another
> simple .js file and works, but on my main app it isn't. Still, I don't
> understand why it wouldn't work. The pouch documentation is quite clear
> https://pouchdb.com/api.html#create_document. I should mention I'm
> running this on the context of an electron app, not in the browser.
>
> Any tip is greatly appreciated,
>
> Cheers, Matias.
>
> --
> Job board: http://jobs.nodejs.org/
> New group rules:
> https://gist.github.com/othiym23/9886289#file-moderation-policy-md
> Old group rules:
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to nodejs+unsubscr...@googlegroups.com.
> To post to this group, send email to nodejs@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/nodejs/ba0ec025-ed76-491c-8e25-559051d07c3f%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/CAHL2YmphKJOffZG1gK3fT6%3DrSnscF-Ep3dpTgxkCZ0ssrtBqCA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [nodejs] How to free memory after require(JSON) ?

2017-09-20 Thread Joshua Holbrook
I suspect that your caching theory is a likely culprit. One approach is to
sidestep the cache and use fs.readFileSync + JSON.parse. That kind of thing
is pretty easy to hand-roll. Give it a shot and combine with your data =
null dereferencing strategy and see if it helps?

--Josh

On Tue, Sep 19, 2017 at 10:42 PM, Валерий Дубчак 
wrote:

> Node version 8.5.0
> There are 100 JSON files of 8 mb each.
> I read them in the node:
>
> var files = fs.readdirSync ('./ path /');
>
> files.forEach (filename => {
>
> var data = require ('./ path /' + filename);
> data = null;
>
> });
>
> after reading all the files, the program takes 1.2 GB.
>
> Question: why is not the memory freed after data = null; ?
> I try to do:
>
> delete require.cache ['./ path /' + filename];
> global.gc ();
>
> But it did not help.
>
> --
> Job board: http://jobs.nodejs.org/
> New group rules: https://gist.github.com/othiym23/9886289#file-
> moderation-policy-md
> Old group rules: 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 unsubscribe from this group and stop receiving emails from it, send an
> email to nodejs+unsubscr...@googlegroups.com.
> To post to this group, send email to nodejs@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/nodejs/8b208af4-22bb-43e8-8c50-5bf0369d1b0a%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/CAHL2YmpeDA4wUyTuskEYNX3L0yd8va%2BLSFYRr5LnGjRvaxjxSw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [nodejs] Appending to array - Not working as expected

2016-08-03 Thread Joshua Holbrook
It looks like jsontemp is a global variable here, due to the lack of a
'var', 'let' or similar.

fwiw adding 'use strict'; at the top of your file should make this
complain rather than silently doing what you don't want.

--Josh

On Wed, Aug 3, 2016 at 3:12 PM, Tippur  wrote:
> I have a json object that has an array field
>
> I want to take that object and break it into individual json objects.
>
> For example { a:[ 'x', 'y'], rest: 'fdsf', ff: 'll' } should be broken into
>
> { a: 'x', rest: 'fdsf', ff: 'll' } and { a: 'y', rest: 'fdsf', ff: 'll' }
>
>
> Here is my code:
> ##
>
> var str='{ \
>
> "a": ["x", "y"], \
>
> "rest": "fdsf", \
>
> "ff": "ll" \
>
> }'
>
> jsonstr=JSON.parse(str);
>
> var payload=[];
>
> if (Array.isArray(jsonstr['a'])){
>
> console.log("Is array");
>
> var payload=[];
>
> jsonstr['a'].forEach(function(item, index) {
>
> console.log(item);
>
> jsontemp=jsonstr;
>
> jsontemp.a=item;
>
> console.log(jsontemp);
>
> payload.push(jsontemp);
>
> });
>
> }
>
> console.log(payload);
>
> ##
>
> Here is the output
>
> [ { a: 'y', rest: 'fdsf', ff: 'll' },
>
>   { a: 'y', rest: 'fdsf', ff: 'll' } ]
>
>
> As you can see, the object appended to the final payload has the same
> element (payload.a)
>
>
> What am I doing wrong?
>
>
> - Shekar
>
>
>
>
>
>
> --
> Job board: http://jobs.nodejs.org/
> New group rules:
> https://gist.github.com/othiym23/9886289#file-moderation-policy-md
> Old group rules:
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to nodejs+unsubscr...@googlegroups.com.
> To post to this group, send email to nodejs@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/nodejs/8275a391-bc72-4bba-a43f-a17be42f0d61%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/CAHL2Ymq4iOQXLmbrC%2BW22iG7X9nj35WzHvXZXDeaoce2hPKofg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [nodejs] What is () => ?

2016-07-02 Thread Joshua Holbrook
> Hi. () => {} is shorthand for:

Possibly being pedantic, but I think it's important to point out that
there are significant and relevant differences in behavior wrt the
'this' keyword (meaning it's not strictly a shorthand). The MDN
article speaks to this. (heh. this.)

--Josh

On Sat, Jul 2, 2016 at 9:55 PM, Miike Ramos  wrote:
> Hi. () => {} is shorthand for:
>
> function() {
>  ...
> }
>
> It's syntax you will see in ECMAScript 6. You can learn more about the new
> syntax at https://babeljs.io/ and start writing the future of JavaScript
> today!
>
>
> On Sat, Jul 2, 2016 at 3:38 AM, Ömer  wrote:
>>
>> What is the () => sign ? I see it on examples. Is it used for only
>> pseudo-code purposes or is it used in code? What it means? I cannot search
>> it on google.
>>
>> maybeSync(true, () => {
>>  foo();
>> });
>> bar();
>>
>>
>> Thanks in advance..
>>
>> --
>> Job board: http://jobs.nodejs.org/
>> New group rules:
>> https://gist.github.com/othiym23/9886289#file-moderation-policy-md
>> Old group rules:
>> 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 unsubscribe from this group and stop receiving emails from it, send an
>> email to nodejs+unsubscr...@googlegroups.com.
>> To post to this group, send email to nodejs@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/nodejs/cf4a6847-73b3-4ed8-9ff0-b160d574db72%40googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> Job board: http://jobs.nodejs.org/
> New group rules:
> https://gist.github.com/othiym23/9886289#file-moderation-policy-md
> Old group rules:
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to nodejs+unsubscr...@googlegroups.com.
> To post to this group, send email to nodejs@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/nodejs/CALPwyBTt%3DV2-jKOYsnf0%2BjPyaewqYNDX82Nx%2Bohvypfn%2BUupSQ%40mail.gmail.com.
>
> For more options, visit https://groups.google.com/d/optout.

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/CAHL2YmoCo7AEQ%3DU4O6oaY9zcDsB-p_hEExkr3yRhS7Ka_iYWjA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [nodejs] Nodejs Search Engine

2016-04-19 Thread Joshua Holbrook
I don't know much about featherjs, but maybe it wouldn't be so bad to
write your own plugin?

Regarding implementation details: Definitely use an external server
like solr or elasticsearch, because writing something like lucene is
relatively hard.

--Josh

On Mon, Apr 18, 2016 at 10:56 PM, Duy Nguyen  wrote:
>
> Seems I didn't explain clearly my need, so it caused some problems, my
> intention is that I want to know who had built any  search engine plugin to
> work with featherjs framework, so I can use it without much effort to setup.
>
> As you can see here, featherjs supported some built-in modules allow you to
> interact with stripe or twilio easily, but not any module for search.
>
> I'm working on POC, so built-in plugin is much more helpful than independent
> solution like ElasticSearch. Full text search by mongodb is second option
> also.
>
> Anw, thanks guys for you help, and hope I explained clearly my need :)
>
> Thanks,
>
>
> On Tue, Apr 19, 2016 at 4:58 AM, Matt  wrote:
>>
>> I sometimes wonder if people even try and google their problems these
>> days...
>>
>> Fifth entry on the first page for "mongodb full text search":
>> https://www.compose.io/articles/full-text-search-with-mongodb-and-node-js/
>>
>> On Sun, Apr 17, 2016 at 7:10 AM, Duy Nguyen 
>> wrote:
>>>
>>> Hi,
>>>
>>> I'm working on my side project using FeathersJS(feathersjs.com)
>>> framework. As design I need to create full text Search service, can anyone
>>> share your experience which Search engine is good for you with pros and
>>> cons?
>>>
>>> I'm using mongodb btw.
>>>
>>> Thanks,
>>> --
>>> Nguyen Hai Duy
>>> Mobile : 0914 72 1900
>>> Skype: nguyenhd2107
>>>
>>> --
>>> Job board: http://jobs.nodejs.org/
>>> New group rules:
>>> https://gist.github.com/othiym23/9886289#file-moderation-policy-md
>>> Old group rules:
>>> 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 unsubscribe from this group and stop receiving emails from it, send an
>>> email to nodejs+unsubscr...@googlegroups.com.
>>> To post to this group, send email to nodejs@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/nodejs/CAGOR8-0WB7kwp0E%3DPxYhNDr6PGwNNazMgH3nhXBEZvqmKLUcRQ%40mail.gmail.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>> --
>> Job board: http://jobs.nodejs.org/
>> New group rules:
>> https://gist.github.com/othiym23/9886289#file-moderation-policy-md
>> Old group rules:
>> 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 unsubscribe from this group and stop receiving emails from it, send an
>> email to nodejs+unsubscr...@googlegroups.com.
>> To post to this group, send email to nodejs@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/nodejs/CAPJ5V2YqjmZJGds4NycVAWTihNw9YTrTbBn-%3DU%2BRCUTTcz8qgw%40mail.gmail.com.
>>
>> For more options, visit https://groups.google.com/d/optout.
>
>
>
>
> --
> Nguyen Hai Duy
> Mobile : 0914 72 1900
> Skype: nguyenhd2107
>
> --
> Job board: http://jobs.nodejs.org/
> New group rules:
> https://gist.github.com/othiym23/9886289#file-moderation-policy-md
> Old group rules:
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to nodejs+unsubscr...@googlegroups.com.
> To post to this group, send email to nodejs@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/nodejs/CAGOR8-0_QXjqh0cfnSdq5d%2BTPHPbR7BSHbkRmA-iMutHekhvWA%40mail.gmail.com.
>
> For more options, visit https://groups.google.com/d/optout.

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/CAHL2Ymq6ijghBupeFKvJQ6FCHpLK9zn0P6VqoWJpkjL-CqvEKg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [nodejs] Re: Node static directory case sensitive

2015-05-31 Thread Joshua Holbrook
How are you hosting these static files?

My guess is that the usual suspects in terms of static file serving in
pure node---ie, express static, hapi static and ecstatic, do not have
built-in support for this kind of thing (I can confirm this in the
case of ecstatic). If you really really need this you might be able to
hack it in by adding functionality that somehow does lookups against
filename.toLowerCase() versions of whatever you're looking for, but
this is likely non-trivial.

Another option, if you're hosting static files with nginx (a good idea
for production) is to see if nginx has support for this (my guess is
not).

Like has already been suggested, symlinks should work on a
case-sensitive filesystem such as what you'd see on linux, but will
cause a world of hurt on case-insensitive filesystems like with osx.

Honestly, the easiest thing for you is to probably decide this
behavior isn't crucial and leave it be. Note that this is different
from you don't want this, rather what I'm saying is more, you
probably don't want this *bad enough* to go through the trouble. :)

--Josh

On Sun, May 31, 2015 at 4:59 PM, Ryan Graham r.m.gra...@gmail.com wrote:
 A symlink for this won't work out well if you do development on Mac and/or
 Windows, since they default to using case-insensitive/case-folding
 filesystems. This gets doubly annoying if you are using git, since it is
 case-sensitive, even if the underlying filesystem is not.

 ~Ryan

 On Sun, 31 May 2015 at 13:51 Eiríkur eirikur.hallgrims...@gmail.com wrote:

 This is a good use case for a symbolic link in the file system.

 On Saturday, May 30, 2015 at 5:42:16 PM UTC-4, dan krutz wrote:

 I have a plain old html file within a static directory running under
 public. When a user hits server.com/caa/ I'd like to serve up the static
 html page. However, if they user also goes to server.com/CAA/ I'd like them
 to go to the same directory, so case sensitivity should not matter. Right
 now, when the user enters in a capital CAA they visit a different folder
 than a lowercase caa ... I'd like this not to be the case.

 Can anyone tell me where I can fix this inside node? I am a node newbie.

 Thanks all.

 --
 Job board: http://jobs.nodejs.org/
 New group rules:
 https://gist.github.com/othiym23/9886289#file-moderation-policy-md
 Old group rules:
 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 unsubscribe from this group and stop receiving emails from it, send an
 email to nodejs+unsubscr...@googlegroups.com.
 To post to this group, send email to nodejs@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/nodejs/f25dadff-0550-4b01-83ca-7952786be33e%40googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

 --
 Job board: http://jobs.nodejs.org/
 New group rules:
 https://gist.github.com/othiym23/9886289#file-moderation-policy-md
 Old group rules:
 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 unsubscribe from this group and stop receiving emails from it, send an
 email to nodejs+unsubscr...@googlegroups.com.
 To post to this group, send email to nodejs@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/nodejs/CAGjmZGw1eFcoiYLXAdynytckOEkE3YkcTD1Zk%2B8OG_v2Cyiitw%40mail.gmail.com.

 For more options, visit https://groups.google.com/d/optout.

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/CAHL2YmrM8if%2Bdvt6Jv2FoYE0DV6%3DKDnqKSEsGde7%3DpxboDo91g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [nodejs] Ah! didn't believe Nodejs.org not running on Node.js itself

2014-08-27 Thread Joshua Holbrook
Node core did not write, and does not endorse, node-http-proxy. It was
entirely written by a third party.

For most people, there is absolutely no reason to not just use nginx
for balancing/proxying and serving static content in concert with
node. In fact, for me it's worked really well.

--Josh

On Wed, Aug 27, 2014 at 11:07 AM, TigerNassau
john.tigernas...@gmail.com wrote:
 Nodejs.org should run node-http-proxy instead of nginx - if the team really 
 does not think its as strong, then it should be improved - eat your own 
 dogfood!

 Sent from my LG Mobile

 Alex Kocharin a...@kocharin.ru wrote:

 --
 Job board: http://jobs.nodejs.org/
 New group rules: 
 https://gist.github.com/othiym23/9886289#file-moderation-policy-md
 Old group rules: 
 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 unsubscribe from this group and stop receiving emails from it, send an 
 email to nodejs+unsubscr...@googlegroups.com.
 To post to this group, send email to nodejs@googlegroups.com.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/nodejs/iy8ruhdx5c0it0h8udg8xb00.1409152026462%40email.android.com.
 For more options, visit https://groups.google.com/d/optout.

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/CAHL2YmpW%3Dy8SZBqbW4M%3Dhd7Yx-0_%2B0zUrcwXvYARVFhtLJVZiA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [nodejs] Announcing: Abraxas- A new Gearman client/worker/admin library

2014-07-03 Thread Joshua Holbrook
Looking forward to that server implementation! Being able to write
custom logic for job delegation would be sick.

--Josh

On Tue, Jul 1, 2014 at 7:42 PM, Aria Stewart aredri...@nbtsc.org wrote:
 The mix and match interface really has me excited.

 On 30 Jun 2014, at 10:19, Rebecca Turner m...@re-becca.org wrote:

 Abraxas is a end-to-end streaming Gearman client and worker library. (Server 
 implementation coming soon.)

 https://www.npmjs.org/package/abraxas

 Standout features:

 * Support for workers handling multiple jobs at the same time over a single 
 connection. This is super useful if your jobs tend to be bound by external 
 resources (eg databases).
 * Built streaming end-to-end from the start, due to being built on 
 gearman-packet.
 * Most all APIs support natural callback, stream and promise style usage.
 * Support for the gearman admin commands to query server status.
 * Delayed background job execution built in, with recent versions of the C++ 
 gearmand.

 Things I learned on this project:

 * Nothing in the protocol stops clients and workers from sharing the same 
 connection. This was imposed by arbitrary library restrictions.
 * In fact, the plain text admin protocol can be included cleanly on the same 
 connection as the binary protocol.
 * Nothing stops workers from handling multiple jobs at the same time, 
 except, again, arbitrary library restrictions.
 * The protocol documentation on gearman.org is out of date when compared to 
 the C++ gearmand implementation– notably, SUBMIT_JOB_EPOCH has been 
 implemented. I've begun updating the protocol documentation here:
   https://github.com/iarna/gearman-packet/blob/master/PROTOCOL.md

 Because everything is a stream, you can do things like this:

 process.stdin.pipe(client.submitJob('toUpper')).pipe(process.stdout);

 Or as a promise:

 client.submitJob('toUpper', 'test string').then(function (result) {
 console.log(Upper:, result);
 });

 Or as a callback:

 client.submitJob('toUpper', 'test string', function(error, result) {
 if (error) console.error(error);
 console.log(Upper:, result);
 });

 Or mix and match:

 process.stdin.pipe(client.submitJob('toUpper')).then(function(result) {
 console.log(Upper:, result);
 });


 -- Rebecca


 --
 Job board: http://jobs.nodejs.org/
 New group rules: 
 https://gist.github.com/othiym23/9886289#file-moderation-policy-md
 Old group rules: 
 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 unsubscribe from this group and stop receiving emails from it, send an 
 email to nodejs+unsubscr...@googlegroups.com.
 To post to this group, send email to nodejs@googlegroups.com.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/nodejs/etPan.53b17213.327b23c6.587b%40Sierra-2.local.
 For more options, visit https://groups.google.com/d/optout.


-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/CAHL2Ymr7i%2BU%3D-pEbCOsLB6_xTwkqqhCNo0FVFQFqpXgR3siTaw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [nodejs] Before I reinvent the wheel

2014-06-26 Thread Joshua Holbrook
You might find https://www.npmjs.org/package/groovebasin of use! Worst
case, you can use libgroove to take care of all the pesky bits
involved in actually playing jams.

--Josh

On Wed, Jun 25, 2014 at 1:54 PM, Ω Alisson thelinuxl...@gmail.com wrote:
 I'm thinking about developing a Node.js app specifically for parties. It
 plays random music from a folder and displays a voting system seconds before
 the current music ends. Is there anything similar that I can build upon?

 --
 Job board: http://jobs.nodejs.org/
 New group rules:
 https://gist.github.com/othiym23/9886289#file-moderation-policy-md
 Old group rules:
 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 unsubscribe from this group and stop receiving emails from it, send an
 email to nodejs+unsubscr...@googlegroups.com.
 To post to this group, send email to nodejs@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/nodejs/CACZE8Y5Gy0UqDzHhEAwZwEF-t7OQE0OgV-3a3PswBTPHpRuuzg%40mail.gmail.com.
 For more options, visit https://groups.google.com/d/optout.

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/CAHL2Ymog9e2ziSt1ysR198B%2BZ5Q6Z5ap2RqCHM6gR7Ke9tzCKQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [nodejs] Alternative to DNode (RPC)?

2014-06-09 Thread Joshua Holbrook
Less abandoned, more done. You can feel about that however you like,
but I'm p sure testling still uses dnode in prod without too many
problems.

--Josh

On Mon, Jun 9, 2014 at 5:49 PM, Alexey Petrushin
alexey.petrus...@gmail.com wrote:
 DNode is very cool library (especially with Fibers - magically your remote
 calls looks like usual local calls), but I have two issues with it:

 - Sometimes its client can't connect to remote server (don't know why,
 happens randomly, sometimes connect sometimes just hands and waits for
 something).
 - Seems like it's abandoned.

 Is there any alternative?

 --
 Job board: http://jobs.nodejs.org/
 New group rules:
 https://gist.github.com/othiym23/9886289#file-moderation-policy-md
 Old group rules:
 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 unsubscribe from this group and stop receiving emails from it, send an
 email to nodejs+unsubscr...@googlegroups.com.
 To post to this group, send email to nodejs@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/nodejs/5b69ccc0-b838-435e-8876-dbf9284cdcef%40googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/CAHL2YmodRc7eBqmfqwUZ-UPy%3DygnWRA2ni0TDhQWBE_YRzgCUQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [nodejs] mongodb is so confusing!

2014-04-08 Thread Joshua Holbrook
 Conrad Pankoff bills himself as a Professional Cyber Bully

I sure HOPE so! Otherwise, wth are we paying him for??

--Josh

On Wed, Apr 9, 2014 at 12:39 AM, Martín Ciparelli mcipare...@gmail.com wrote:
 Sorry Frank if I did sound a little bit mean, it wasn't my intention. I just
 assumed that you don't know the language because you posted one line of code
 that makes use of two Javascript variables and an error that tells you there
 is one of them that is not defined and as a result your subject was:
 mongodb is so confusing!.
 As you may know from others already:
 - your variable user is not defined
 - mongo is running fine
 - mongo has nothing to do with a Javascript variable being undefined
 - you can check out in github some libraries for using mongodb from node
 that will help you get along with it
 - my virginity is a private variable

 On Apr 8, 2014 9:10 PM, Frank Z frankz...@gmail.com wrote:

 I installed mongodb through my unbuntu terminal after installing node.js.

 When I run sudo service mongodb start

 I get back start: Job is already running: mongodb from the terminal

 So my assumption is that everything is running properly here...

 I'm trying to make this todo list from an example in my book, using
 express.js. I used the package.json file to install the depenencies:

 {
   name: application-name,
   version: 0.0.1,
   private: true,
   scripts: {
 start: node app.js
   },
   dependencies: {
 express: 3.5.1,
 jade: *,
 mongoose:3.8.4
   }
 }

 Then I run npm install in my terminal...

 Everything is correct in my app.js file, all the variables declared
 properly with mongoose and everything...

 I run node app.js and get back:

 /home/frankz/Desktop/nodesandbox/connect_to_mongo/app.js:40
 app.get('/users', user.list);
   ^
 ReferenceError: user is not defined
 at Object.anonymous
 (/home/frankz/Desktop/nodesandbox/connect_to_mongo/app.js:40:19)
 at Module._compile (module.js:456:26)
 at Object.Module._extensions..js (module.js:474:10)
 at Module.load (module.js:356:32)
 at Function.Module._load (module.js:312:12)
 at Function.Module.runMain (module.js:497:10)
 at startup (node.js:119:16)
 at node.js:902:3

 So what's going on here?

 --
 --
 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

 ---
 You received this message because you are subscribed to the Google Groups
 nodejs group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to nodejs+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

 --
 --
 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

 ---
 You received this message because you are subscribed to the Google Groups
 nodejs group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to nodejs+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
nodejs group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [nodejs] Re: Ben Noordhuis's Departure

2013-12-09 Thread Joshua Holbrook
I hate you all.

--Josh


On Mon, Dec 9, 2013 at 2:56 PM, Mikeal Rogers mikeal.rog...@gmail.comwrote:


 On Dec 9, 2013, at 12:38PM, Ben Noordhuis i...@bnoordhuis.nl wrote:

 On the contrary, it's 100% accurate.  The reason I stepped down is not
 because of the Twitter brouhaha, I was unmoved by that.  It's because
 I feel I can no longer trust Isaac to do the right thing and that
 makes working together impossible.


 Bert was fine with the change, Bert force pushed out your commit, do you
 share the same distrust of Bert?

 --
 --
 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

 ---
 You received this message because you are subscribed to the Google Groups
 nodejs group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to nodejs+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups nodejs group.
To post to this group, send email to 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

--- 
You received this message because you are subscribed to the Google Groups 
nodejs group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [nodejs] Ben Noordhuis's Departure

2013-12-04 Thread Joshua Holbrook
I base my commits on gut feeling, how scared I am of losing my place, and
whatever I thought was a good idea after a couple beers.

--Josh


On Wed, Dec 4, 2013 at 2:38 PM, Rick Waldron waldron.r...@gmail.com wrote:




 On Wed, Dec 4, 2013 at 2:16 PM, Alex Kocharin a...@kocharin.ru wrote:



  The issue in that in opensource it's customary to base all commits on
 technical reasons.


 Apparently you don't use underscore...


 Rick

 --
 --
 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

 ---
 You received this message because you are subscribed to the Google Groups
 nodejs group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to nodejs+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups nodejs group.
To post to this group, send email to 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

--- 
You received this message because you are subscribed to the Google Groups 
nodejs group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [nodejs] node.js needs a new home

2013-12-03 Thread Joshua Holbrook
Disagree. Joyent holds it down, and ASF is where software projects go to
collect dust.

--Josh


On Tue, Dec 3, 2013 at 10:24 AM, Darren DeRidder drderid...@gmail.comwrote:

 Be it proposed that the community of Node.JS users and supporters will be
 better served by moving the Node.JS project and its affiliated trade marks
 and copyrights under the control of the Apache Software Foundation.

 Refer to http://gigaom.com/2013/12/02/slap-fight-in-node-js-land/ and to
 the mixed reaction to Ryan's original announcement on Joyent  Node, where
 you'll see several prescient comments from names you recognize.
 https://groups.google.com/forum/#!topic/nodejs/lWo0MbHZ6Tc
 https://groups.google.com/forum/#!topic/nodejs/lWo0MbHZ6Tc

 --
 --
 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

 ---
 You received this message because you are subscribed to the Google Groups
 nodejs group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to nodejs+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups nodejs group.
To post to this group, send email to 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

--- 
You received this message because you are subscribed to the Google Groups 
nodejs group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [nodejs] Checking for requires that aren't in package.json?

2013-11-06 Thread Joshua Holbrook
Sup Jamison,

Give https://github.com/substack/node-detective and maybe
https://github.com/nodejitsu/require-analyzer a shot.

--Josh


On Wed, Nov 6, 2013 at 6:35 PM, Jamison Dance jerga...@gmail.com wrote:

 Are there any tools that will check your node project for require calls
 that aren't in the package.json? I want to eliminate the surprises that
 happen when a dev has a package installed locally but doesn't put it in
 node_modules, and then the code gets deployed and blows up in a different
 environment.

 --
 --
 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

 ---
 You received this message because you are subscribed to the Google Groups
 nodejs group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to nodejs+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups nodejs group.
To post to this group, send email to 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

--- 
You received this message because you are subscribed to the Google Groups 
nodejs group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [nodejs] Show Me Your Blog

2013-06-12 Thread Joshua Holbrook
I just use gh pages/jekyll, and I mostly get people to read my stuff
by linking in twitter and irc. Someone asked for an rss feed once, so
I added that.

--Josh

On Wed, Jun 12, 2013 at 2:56 PM, Alan Gutierrez a...@prettyrobots.com wrote:
 I'd like to start to write a about the stuff I'm doing with Node.js. I'd like 
 to
 make it as easy for you to read as possible, so I'd like your input on what is
 the best platform for writing about Node.js.

 I read the following when they update...

  * http://www.futurealoof.com/archive.html
  * http://bjouhier.wordpress.com/author/bjouhier/
  * http://blog.izs.me/
  * http://howtonode.org/

 If there is already a blog roll, I'll happily take a pointer to that. 
 Otherwise,
 if you blog about Node.js, please let me know here or off list. (Depends on 
 how
 off topic everyone feels this message is.) I'll make a gist or something.

 It's no fun to just post something in a vacuum, so what do you do to solicit
 feedback? Is there anything that people do to solicit feedback that annoys 
 you?

 --
 Alan Gutierrez ~ @bigeasy

 --
 --
 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

 ---
 You received this message because you are subscribed to the Google Groups 
 nodejs group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to nodejs+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.



-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups nodejs group.
To post to this group, send email to 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

--- 
You received this message because you are subscribed to the Google Groups 
nodejs group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [nodejs] Re: please include the full MIT license in your modules or they have none

2013-03-28 Thread Joshua Holbrook
Interesting discussion! Unfortunately this does not change the fact that I
am INCREDIBLY LAZY. Typing License: MIT is easy.

If you got a problem with that, send me a PR.

--Josh


On Wed, Mar 27, 2013 at 9:36 AM, Dick Hardt dick.ha...@gmail.com wrote:

 Thanks for the useful anecdote Mark.

 Isaac: NOT having a license is an issue for anyone that has a requirement
 for understanding the intellectual property rights of the module they are
 using.

 My suggestion was to not enforce a license, but to print a warning if one
 does not exist.

 fwiw: I was pretty heavily involved in the OSS movement when it started in
 the 90s and have spent far to much time with lawyers who had widely
 differing opinions about software license issues when I was dealing with a
 myriad of them when I was running ActiveState.

 In my experience, I learned that distribution happens when someone
 downloads the package, and the license needs to communicated to the person
 who downloads. Inclusion of a LICENSE file in the package or in each source
 file is common practice. Not having a license, or referring to a license
 that is not ambiguous can be problematic. (MIT is ambiguous, Apache
 License, Version 2.0 is not).

 As Mark points out, not having a clear intellectual property declaration
 can render useful software useless to some people. By encouraging best
 practices, we make it a non-issue.

 -- Dick


 On Mar 27, 2013, at 10:22 AM, Mark Hahn m...@hahnca.com wrote:

 Even as a non-lawyer, I can assert that having no mention of any license
 at all is a real problem.  My company won't allow any software to be used
 without a license.

 By coincidence our lawyers contacted me a few days ago and wanted to know
 the licensing for the software we use.  I went to google on every module
 and I found four different modules with no mention of any license.  I sent
 a request for a license to each author (usually submitting an issue).

 I am bummed because I have gotten only one response.  I will have to
 remove the non-licensed code, replace it, and rewrite my code.  I hate
 doing work just for lawyers.


 On Wed, Mar 27, 2013 at 10:14 AM, Isaac Schlueter i...@izs.me wrote:

 I had no idea there were so many experienced IP lawyers on this
 mailing list!  How lucky we are!  It's amazing that you all found time
 to learn JavaScript, what with going to law school, passing the bar,
 and then becoming familiar with the massive libraries of case-law on
 this subject!

 Sadly, I'm not a lawyer, just a simple programmer.  So I'm not an
 expert on these matters, and as a non-expert, I'm not really
 comfortable encoding strong opinions in npm on the subject.  This way,
 npm is a tool, and humans can work out their preferences using it,
 however they like.

 Depending on who you ask, to be valid/enforceable, a license must be
 one or more of the following:

 1. declared in every file
 2. declared in any file
 3. declared somewhere in a file along with the source
 4. mentioned by the author, ever, in any context (even verbally)
 5. mentioned along with a link to the full text
 6. mentioned by name
 7. exist in a database of osi-approved licenses
 8. exist in the author's head, even if never mentioned, linked, or
 printed anywhere else
 9. differentiate between variants of the name (ie, BSD is not ok,
 but BSD-2-clause is)
 10. Nothing.  OSS/Free Software licenses aren't actually enforceable.

 Yes, all of these are real statements that real people have made to
 me, very confident that they were correct.  Some of those people were
 lawyers.  Most were just programmers playing pretend.  But as a
 non-legal-expert myself, I have a hard time telling the difference
 between a good lawyer, a bad lawyer, and a duck in a lawyer costume.

 npm has a license field, and the common pattern is to also put a
 LICENSE (or LICENCE, for imperials) file in the root of your project.
 Do whatever you want.  I'm not going to get more involved than that.

 For me, if you send me a pull req with the same BSD license that I put
 on all my code, I'll accept it without question.



 On Wed, Mar 27, 2013 at 10:00 AM, Dick Hardt dick.ha...@gmail.com
 wrote:
  Actually, that is not true. There are several MIT licenses, so unless
 the
  actual license text is included, it is ambiguous what the license is:
 
  http://en.wikipedia.org/wiki/MIT_License#Various_versions
 
  Having a LICENSE file in the package makes it clear what the license
 is, or
  alternatively stating the full license in the README.md
 
  -- Dick
 
  On Mar 27, 2013, at 9:55 AM, Austin William Wright
  diamondma...@users.sourceforge.net wrote:
 
  A license is something that is granted by the author at
 distribution-time,
  it need not be included in the package contents. If an author wholly
 owns
  the copyright on their work, they can offer the program to you under any
  license they want, regardless of what the file inside the repository or
  package says.
 
  So that paragraph doesn't actually, really, do 

Re: [nodejs] Re: How do I link bootstrap to node.js?

2013-03-14 Thread Joshua Holbrook
I wrote https://github.com/jesusabdullah/node-ecstatic for this kind of
stuff, there are a bunch of code samples and a bin script for quickly
serving static assets from a folder. Flatiron was using it when I worked at
Nodejitsu so it's fairly well-tested.

--Josh


On Thu, Mar 14, 2013 at 1:14 AM, Crenshinibon
dirkporsch...@googlemail.comwrote:

 If you like to achieve quick results. I can recommend 
 Meteorhttp://meteor.com.
 It uses bootstrap and node underneath.

 Regards
 Dirk


 Am Mittwoch, 13. März 2013 11:15:19 UTC+1 schrieb Timo Schmidt:

 Hi,

 i am quite new to node.js. I am trying to use bootstrap to node.js and
 tried the classic way. I simply wrote the getting started code of
 bootstrap to node.js just to try it. But when I'm trying to use simple
 rows/spans I get no good output. When I check it with firebug, I can see,
 that there would be no rule in the bootstrap.css (but there are).

 Node.js Code:
   function onRequest(req, res) {
 var postData = ;
 var pathname = url.parse(req.url).pathname;
 console.log(Request recieved);

res.writeHead(200, {Content-Type: text/html});
   res.write(head);
   res.write(titleBootstrap 101 Template/title);
   res.write(meta name='viewport' content='width=device-width,
 initital-scale=1.0');
   res.write(link href='css/bootstrap.min.css' rel='stylesheet'
 media='screen');
   res.write(/head);

   res.write(body);
   res.write(div class='container');
   res.write(div class='row show-grid');
   res.write(div class='span4'4/div);
   res.write(div class='span8'8/div);
   res.write(/div);
   res.write(/div);
   res.write(script src='jquery/jquery'/script**);
   res.write(script src='js/bootstrap.min.js'/**script);
   res.write(/body);
   res.end();

   }

   http.createServer(onRequest).**listen();
   console.log('Server has started!');


 HTML Code:
 html debug=true
 head
 titleBootstrap 101 Template/title
 meta name=viewport content=**width=device-width, initital-scale=1.0
 /
 link href=css/bootstrap.min.**css rel=stylesheet media=s**creen/
 style type=text/css/
 /head
 body
 div class=container
 script src=jquery/jquery/
 script src=js/bootstrap.min.**js/
 /body
 script src=chrome-extension:**//**bmagokdooijbeehmkpknfglimnifen**
 ch/googleChrome.js/
 /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

 ---
 You received this message because you are subscribed to the Google Groups
 nodejs group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to nodejs+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups nodejs group.
To post to this group, send email to 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

--- 
You received this message because you are subscribed to the Google Groups 
nodejs group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [nodejs] Buggy ES3 Code: Never Again!

2013-03-13 Thread Joshua Holbrook
I seriously don't understand: Why bother? Why make things that used to
work no longer work? That's basically the only thing that use strict
at the global level will do for you.

--Josh

On Wed, Mar 13, 2013 at 11:21 AM, AJ ONeal coola...@gmail.com wrote:
 Ben,

 That is correct.

 See http://stackoverflow.com/a/4304187

 Although some shells or OSes may allow arguments to shebang, I've had issues
 with it on my setup (OSX and Linux with Bash and ZSH).

 And then there's Windows...

 I believe my solution will also work on Windows, but it's certainly not the
 ideal solution.
 I think that would be a native bin that invokes node with strict mode.

 AJ ONeal
 (317) 426-6525


 On Wed, Mar 13, 2013 at 11:18 AM, Ben Noordhuis i...@bnoordhuis.nl wrote:

 On Wed, Mar 13, 2013 at 6:03 PM, AJ ONeal coola...@gmail.com wrote:
  Perhaps the very best part of node v0.10.0 is that all of the core
  modules
  are finally fully ES5 compliant!!!
 
  Although, you can't use es5-compliant mode with a shebang
  (because you can't pass the --use_strict argument),
  so I made a shim that will run node in es5 (strict) mode for you. [0]
 
  Install
 
  sudo npm install -g node-es5
 
  Usage
 
  #!/usr/bin/env node-es5
 
  (P.S. Dear core devs: please provide a native cli for strict mode node)
 
  Except in the case that you're writing code that also runs in the
  browser,
  you can now skip the obligatory
 
  (function () {
use strict;
 
// code goes here
  }());
 
  Not that there's any harm in putting it in... but it's just annoying.
 
  You can also take out `strict: true` from your `.jshintrc` for your node
  projects. (An `implicitstrict` option may come soon [1]).
 
  Anyway, this is certainly a GIANT step forward in eliminating the
  excuses of
  using bug-prone ES3 code.
 
  Hurrah to the Node Devs!
 
  AJ ONeal
 
  [0]: https://github.com/coolaj86/node-es5
  [1]: https://github.com/jshint/jshint/issues/924

 AJ, am I missing something?

   #!/path/to/node --use_strict
   console.log('Hello, world.');

 You're saying that doesn't work for you?

 --
 --
 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

 ---
 You received this message because you are subscribed to the Google Groups
 nodejs group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to nodejs+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.



 --
 --
 Job Board: http://jobs.nodejs.org/
 Posting guidelines:
 https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
 You received this message because you are subscribed to the Google
 Groups nodejs group.
 To post to this group, send email to 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

 ---
 You received this message because you are subscribed to the Google Groups
 nodejs group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to nodejs+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.



-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups nodejs group.
To post to this group, send email to 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

--- 
You received this message because you are subscribed to the Google Groups 
nodejs group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [nodejs] Buggy ES3 Code: Never Again!

2013-03-13 Thread Joshua Holbrook
 Why would you ever allow indeterminate, unsafe, or code that causes your vm
 to implement runtime hacks to work around it to run at all?
 Just because the code would run without throwing an exception doesn't mean
 that it worked.

Yeah but I've been using that (hypothetical) code for ages and never
had a problem with it. Plus, the unit tests pass. Solid empirical data
is more than enough for me.

 In my mind working code is code that runs the same way every time without
 ambiguity of execution or intent.

AFAIK 'non-strict' code can and does run the same way every time
without ambiguity of execution or intent. Especially when it's been
used in production and has a reasonable test suite. I find these
things more compelling than knowing that the code only used some
safe subset of the language.

--Josh

On Wed, Mar 13, 2013 at 11:41 AM, AJ ONeal coola...@gmail.com wrote:
 The better question is: Why would you dare not to?

 Why would you ever allow indeterminate, unsafe, or code that causes your vm
 to implement runtime hacks to work around it to run at all?
 Just because the code would run without throwing an exception doesn't mean
 that it worked.

 (sidenote: I liked that when I upgrade to node v0.10.0 I had to fix some of
 my code in one of my projects because it threw exceptions instead of
 allowing me to leave out error-handling callbacks. This project skipped from
 0.6 to 0.10, so maybe that was added in 0.8)

 In my mind working code is code that runs the same way every time without
 ambiguity of execution or intent.

 If a person believes that a function is defined conditionally or that a
 variable exists in a particular context when it actually exists in another
 one, then it doesn't work. It just runs and hasn't yet defied expectations
 (or at least the inconsistency hasn't been noticed and fixed).

 And if you're using JSHint or some other quality checking tool, there's a
 good chance that there will be no breakage.

 AJ ONeal
 (317) 426-6525


 On Wed, Mar 13, 2013 at 1:26 PM, Joshua Holbrook josh.holbr...@gmail.com
 wrote:

 I seriously don't understand: Why bother? Why make things that used to
 work no longer work? That's basically the only thing that use strict
 at the global level will do for you.

 --Josh

 On Wed, Mar 13, 2013 at 11:21 AM, AJ ONeal coola...@gmail.com wrote:
  Ben,
 
  That is correct.
 
  See http://stackoverflow.com/a/4304187
 
  Although some shells or OSes may allow arguments to shebang, I've had
  issues
  with it on my setup (OSX and Linux with Bash and ZSH).
 
  And then there's Windows...
 
  I believe my solution will also work on Windows, but it's certainly not
  the
  ideal solution.
  I think that would be a native bin that invokes node with strict mode.
 
  AJ ONeal
  (317) 426-6525
 
 
  On Wed, Mar 13, 2013 at 11:18 AM, Ben Noordhuis i...@bnoordhuis.nl
  wrote:
 
  On Wed, Mar 13, 2013 at 6:03 PM, AJ ONeal coola...@gmail.com wrote:
   Perhaps the very best part of node v0.10.0 is that all of the core
   modules
   are finally fully ES5 compliant!!!
  
   Although, you can't use es5-compliant mode with a shebang
   (because you can't pass the --use_strict argument),
   so I made a shim that will run node in es5 (strict) mode for you. [0]
  
   Install
  
   sudo npm install -g node-es5
  
   Usage
  
   #!/usr/bin/env node-es5
  
   (P.S. Dear core devs: please provide a native cli for strict mode
   node)
  
   Except in the case that you're writing code that also runs in the
   browser,
   you can now skip the obligatory
  
   (function () {
 use strict;
  
 // code goes here
   }());
  
   Not that there's any harm in putting it in... but it's just annoying.
  
   You can also take out `strict: true` from your `.jshintrc` for your
   node
   projects. (An `implicitstrict` option may come soon [1]).
  
   Anyway, this is certainly a GIANT step forward in eliminating the
   excuses of
   using bug-prone ES3 code.
  
   Hurrah to the Node Devs!
  
   AJ ONeal
  
   [0]: https://github.com/coolaj86/node-es5
   [1]: https://github.com/jshint/jshint/issues/924
 
  AJ, am I missing something?
 
#!/path/to/node --use_strict
console.log('Hello, world.');
 
  You're saying that doesn't work for you?
 
  --
  --
  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
 
  ---
  You received this message because you are subscribed to the Google
  Groups
  nodejs group.
  To unsubscribe from this group and stop receiving emails from it, send
  an
  email to nodejs+unsubscr...@googlegroups.com.
  For more options, visit https

Re: [nodejs] Open Science with Node.js

2013-01-25 Thread Joshua Holbrook
 Actually, I think it's likely to be (much) faster for the same accuracy, 
 since you can use a bigger step size.

Yes, in order to compare their speeds you need to compare on the same
accuracy scale and not on the same step size. Forward Euler requires a
comparatively small step size to get anywhere near the accuracy of
RK4. :)

 But of course, it's a little bit more programming.

A little bit, but you should be able to find the equations on wikipedia, no?

--Josh

On Sat, Jan 26, 2013 at 12:10 AM, Harald Hanche-Olsen
han...@math.ntnu.no wrote:
 [Postlethwaite post.ben.h...@gmail.com (2013-01-25 17:29:52 UTC)]

  The forward Euler step is employed for simplicity and speed
  Please please please use RK4 instead of foward Euler, it's way way
  more accurate. https://en.wikipedia.org/wiki/RK4


 Ha, of course I should be using RK4! But it's slower [...]

 Actually, I think it's likely to be (much) faster for the same
 accuracy, since you can use a bigger step size. But of course, it's a
 little bit more programming.

 I mean, you have to understand that for many problems in scientific
  computing, the matrices are large enough that you really want to bust
  out C and fortran libraries.

 Indeed. But scientific computing needs vary a lot, from the stuff you
 do with a calculator and the back of an envelope, to the really hard
 problems that require supercomputers. And as hardware (and javascript)
 gets faster, the boundaries keeps moving, and you can do more with
 simple means as time passes.

 - Harald

 --
 --
 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] Open Science with Node.js

2013-01-24 Thread Joshua Holbrook
 Love science and love node.js?

Yes. In fact, I learned programming primarily for implementing/using
numerical methods when I was an engineering major. ;)

 I know of Brain which is awesome, anything else?

Was reading about http://www.numericjs.com/ which looks pretty sweet.
I've also been meaning to use
https://github.com/albertosantini/node-rio or similar to integrate
node with R.

 The forward Euler step is employed for simplicity and speed

Please please please use RK4 instead of foward Euler, it's way way
more accurate. https://en.wikipedia.org/wiki/RK4

 For all those javascript-is-bad-at-computation naysayers

I mean, you have to understand that for many problems in scientific
computing, the matrices are large enough that you really want to bust
out C and fortran libraries. That's not to say that v8 isn't fast or
that you can't do good science with javascript, it's to say that big
problems need big iron. Of course, when it comes to making native
modules in node, v8 is at a disadvantage to, say, python, when it
comes to the speed of the interface. I love javascript, but
unfortunately that's the reality of things.

Personally, my approach has typically been to use node for juggling
IO, and then delegating the hard stuff to basic services written in
more appropriate environments.

Cheers,

--Josh

On Fri, Jan 25, 2013 at 11:29 AM, Postlethwaite post.ben.h...@gmail.com wrote:
 Love science and love node.js? What are some of your favourite tools and
 libraries for doing science with Javascript and Node? I know of Brain which
 is awesome, anything else?

 I am interested in putting together some hands-on tools for exploring math
 and science with node.js. To that end I have written a 100% javascript
 pde-engine equation solver which can be used for visualization and
 investigation. For all those javascript-is-bad-at-computation naysayers,
 guess what, with Typed Arrays it's FAST! I have put it to use on my website
 as an example (just click the wave or heat buttons and click the screen 
 ignore everything else. All your clicks - sources - are visible to anyone
 else who is on the website along with the time evolving solution, huzzah
 node!). There is also a nice colormaps library I have ported over from
 matlab to pretty up visualization and D3 etc.

 My first idea is to expose some of the parameters in pde-engine within each
 time step and link them to a few of Substack's slideways. Then users could
 explore how changing parameters on the wave equation change it in real-time,
 with multiple users watching and contributing. Monkey Social, Learn, Do!

 Any other ideas?

 --
 --
 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: node + raspi + Internet of Things (IoT)

2013-01-12 Thread Joshua Holbrook
  I've been spending a bunch of time with a team at Texas Instruments
doing similar.

I did a little bit with the msp430 line, it's good stuff. I seriously
considered buying those $4.30 msp boards but my thesis got in the way. :( I
wish the barriers to entry were lower for the platform (think Arduino-low)
though.

Speaking of arduino: Y'all know about the firmata library for node right?

--Josh

On Sat, Jan 12, 2013 at 3:48 PM, Rinie Kervel rinie.ker...@gmail.comwrote:

 See http://jeelabs.org/2013/01/06/node-js-on-raspberry-pi/

 Op vrijdag 11 januari 2013 10:47:24 UTC+1 schreef paul_tanner het volgende:

 Hi,

 If you have no interest in IoT then this will not be relevant, sorry.

 Now that we have all these cheap and low-power linux platforms I want
 to use those for controlling custom hardware in the way we have used
 Arduino up to now.

 I recently tested node on Raspberry Pi and it seems to work great.  I
 also tried the Mosquitto MQTT broker and its node module and also
 some hardware interfacing (written in C).

 The next step is to explore node Addons to make the hardware
 interfacing accessible to node. I have in mind to create some open
 source examples to take to the OSHUG meetup in March.

 While pondering that I wondered if any of you node folks have done
 this or are thinking about it.  If so we should tallk.

 Thx. Paul

  --
 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: What happens to hook.io?

2012-11-27 Thread Joshua Holbrook
 Am I Right?

I would just like to point out here, that two people can have accounts that
appear to be contradicting, and yet both people can be telling the truth. I
highly suspect that is the case here.

--Josh

-- 
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: How to keep node running without using Forever?

2012-11-27 Thread Joshua Holbrook
 I have a Node.js implementation Foreman that can export upstart scripts.

You know what would be fantastic? A foreman-like tool that reads
package.json scripts:start fields.

--Josh


On Tue, Nov 27, 2012 at 12:13 PM, Brian Link cpsubr...@gmail.com wrote:

 We use upstart with upstarter https://github.com/carlos8f/node-upstarteras 
 our jumping-off point (it creates upstart scripts).


 On Monday, November 26, 2012 9:04:38 PM UTC-8, Ket wrote:

 Hi,

 I feel that I don't like Forever much to keep my app restarted when it
 stopped.

 Is there any other methods around to replace Forever.

 Thanks

  --
 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
Head of Support
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


Re: [nodejs] Re: How to keep node running without using Forever?

2012-11-27 Thread Joshua Holbrook
Word. I'll keep an eye.

--Josh


On Tue, Nov 27, 2012 at 4:21 PM, Jacob Groundwater ja...@nodefly.comwrote:

 Actually Josh, if you have no Procfile define, but do have a package.json
 file, node-foreman will attempt to call 'npm start'

 There are a lot of node-specific updates I have made. For example, you can
 throw a round-robin proxy server in front of your app to test scaling
 issues.

 nf start web=4 -x 8080


 This will start 4 web processes, and balance them behind a proxy on port
 8080.

 You can also specify your environmental variables in a a nested json
 documents, and node-foreman will concatenate them down to ENV vars.

 See http://nodefly.github.com/node-foreman/ for details

 On Tue, Nov 27, 2012 at 12:18 PM, Joshua Holbrook josh.holbr...@gmail.com
  wrote:

  I have a Node.js implementation Foreman that can export upstart
 scripts.

 You know what would be fantastic? A foreman-like tool that reads
 package.json scripts:start fields.

 --Josh


 On Tue, Nov 27, 2012 at 12:13 PM, Brian Link cpsubr...@gmail.com wrote:

 We use upstart with upstarterhttps://github.com/carlos8f/node-upstarteras 
 our jumping-off point (it creates upstart scripts).


 On Monday, November 26, 2012 9:04:38 PM UTC-8, Ket wrote:

 Hi,

 I feel that I don't like Forever much to keep my app restarted when it
 stopped.

 Is there any other methods around to replace Forever.

 Thanks

  --
 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
 Head of Support
 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


  --
 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
Head of Support
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


Re: [nodejs] Poll for v0.10 feature: Crypto default to 'binary' strings vs defaulting to buffers

2012-10-08 Thread Joshua Holbrook
I say go for it. :)

--Josh

On Mon, Oct 8, 2012 at 4:24 PM, Isaac Schlueter i...@izs.me wrote:
 Currently, the crypto module defaults to using 'binary' encoded
 strings everywhere as the default input and output encoding.

 This is problematic for a few reasons:

 1. It's slower than necessary.
 2. It doesn't match the rest of Node.

 The reason for this is that crypto predates Buffers, and no one ever
 bothered to go through and change it.  (The same reason it's got some
 odd hodgepodge of update/digest methods vs the Stream interface you
 see everywhere else in node.)

 The reason it persists in 0.8 (and perhaps in 0.10) is that we
 (perhaps overly optimistically) labelled that API stable, and don't
 want to break anyone's programs.  It's going to change eventually to
 match the rest of node.  The only question is whether the change will
 come in 0.10 or 0.12.  A stream interface to all the crypto classes is
 coming in 0.10; using 'binary' strings by default is thus even more
 obviously a departure from the rest of node.

 Note that, if you only use crypto for hashes, and set the 'hex'
 encoding, then it won't affect you.  If you only ever pass the output
 of one crypto function to the input of another (sign/verify, for
 example) then it also won't affect you; you'll just pass buffers
 around instead of binary strings.

 Please select one, and reply with your choice and perhaps any other
 feedback you have on this issue.  Thanks.

 a) Go for it.  This won't affect me, and if by chance it does, I don't
 mind putting 'binary' args here and there.
 b) Please wait.  Mark the API as unstable in 0.10, but don't change it
 until 0.12.
 c) I have no opinion, because I don't use the crypto API directly.


 (Disclaimer: Node is not a democracy.  The winning vote might still
 be out-voted by reasonable considerations of the core dev team.  This
 is informative only ;)

 --
 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
Head of Support
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


Re: [nodejs] Why `fs.exists` has signature `(exists)` instead of `(err, exists)` ?

2012-08-17 Thread Joshua Holbrook
Look at the sauce for fs.exists. I think you'll find it enlightening.

(tl;dr: use fs.stat instead.)

--Josh

On Fri, Aug 17, 2012 at 3:57 PM, Alexey Petrushin
alexey.petrus...@gmail.com wrote:
 Wondering why `fs.exists` doesn't comply to async methods pattern and
 doesn't return error as a first argument?

 It uses

 fs.exists('/etc/passwd', function (exists) {
   util.debug(exists ? it's there : no passwd!);
 });


 Instead of

 fs.exists('/etc/passwd', function (err, exists) {
   util.debug(exists ? it's there : no passwd!);
 });

 --
 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
Head of Support
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


Re: [nodejs] Re: Raft - PaaS - Advice from nodester / nodejitsu / haibu

2012-08-15 Thread Joshua Holbrook
/FLYBYME/Raft


 Thanks all
 Tim

 --
 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



-- 
Joshua Holbrook
Head of Support
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


Re: [nodejs] Raft - PaaS - Advice from nodester / nodejitsu / haibu

2012-08-11 Thread Joshua Holbrook
 with the cluster module?

 To nodester. On average what are your costs running 3000+ app on AWS's?

 OK so this is what im going to ask for now. I do have more question but i
 would like to see if i get any answers for these ones.

 Gota love node!

 The code for now. Please note that this is not a release but a QA
 https://npmjs.org/package/raft
 https://github.com/FLYBYME/Raft


 Thanks all
 Tim

 --
 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
Head of Support
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


Re: [nodejs] Node Cookbook [ANN]

2012-08-09 Thread Joshua Holbrook
Congrats!

--Josh

On Thu, Aug 9, 2012 at 8:50 PM, Dave Clements
huperekch...@googlemail.com wrote:
 Hello Everyone

 I was looking for a good practical book about Node about 10 months ago, but
 I couldn't really find anything beyond the highly theoretical and
 everything I looked at seemed to have negative reviews. So I thought I'd do
 the research and write the book I wanted.

 So without further ado, I give you Node Cookbook, it's been published by
 Packt[1], and is available on Amazon[2], Safari Books Online[3] and other
 places (but getting it direct from Packt would save you money).

 I've tried to include recipes from beginner to advanced, Chapter 1 starts
 with a recipe not dissimilar to the standard hello world recipe,
  and takes you through to recipes that help you to secure your static file
 server etc. There's loads of stuff covered, like WebSockets,
 Jade/Stylus/Express, Redis/MongoDB/CouchDb/MySQL, SMTP, sending SMS text
 messages.

 Here's the TOC:

 Chapter 1: Making a Web Server
 Chapter 2: Exploring the HTTP Object
 Chapter 3: Working with Data Serialization
 Chapter 4: Interfacing with Databases
 Chapter 5: Transcending AJAX: Using WebSockets
 Chapter 6: Accelerating Development with Express
 Chapter 7: Implementing Security, Encryption, and Authentication
 Chapter 8: Integrating Network Paradigms
 Chapter 9: Writing Your Own Node Modules
 Chapter 10: Taking It Live

 This group has been an invaluable source of information, and also in
 identifying what would be useful for people so I just want to say
 a big thank you to everyone on this group for all the questions and answers
 and willingness to help. You guys are beautiful,

 Best regards,
 Dave


 [1]
 http://www.packtpub.com/node-to-guide-in-the-art-of-asynchronous-server-side-javascript-cookbook/book

 [2] http://www.amazon.com/dp/1849517185/   or
 http://www.amazon.co.uk/dp/1849517185/

 [3] http://my.safaribooksonline.com/9781849517188

 --
 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
Head of Support
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


Re: [nodejs] Feature request: be able to delete a non-empty directory with fs.rmdir

2012-07-24 Thread Joshua Holbrook
I got your rm -rf right here:

npm install rimraf

DUN done.

--Josh

On Tue, Jul 24, 2012 at 3:53 PM, Dashku ad...@dashku.com wrote:
 I'm running into a case where I want to remove a non-empty directory, and I
 can't because it contains some files and directories.

 I would like to suggest being able to pass a force option to the fs.rmdir
 command, for example:

 fs.rmdir(features,{force:true},function(err){

   // do something here

 });


 Is that a sane request, or can this already be achieved with another API
 call in Node.js?

 Regards,

 Paul

 --
 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
Head of Support
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


Re: [nodejs] Re: e-Commerce platform

2012-07-22 Thread Joshua Holbrook
What usefulness does coffeescript have? It seems to be canceled out by
the build step at best.

--Josh

On Sat, Jul 21, 2012 at 11:59 PM, Mark Hahn m...@hahnca.com wrote:
 Adding thin arrow is about 0.1% of coffeescript's usefulness.


 On Sat, Jul 21, 2012 at 10:56 PM, Rick Waldron waldron.r...@gmail.com
 wrote:


 On Sunday, July 22, 2012 at 1:50 AM, Mark Hahn wrote:

   there are a lot more JS programmers than CS programmers out there.

 And there are a lot more PHP programmers than JS.  Popularity is not an
 excuse to stay in the past.

 On Sat, Jul 21, 2012 at 10:18 PM, josh macmillan.jos...@gmail.com wrote:

 1) for any open source project your goal is to get as many people as
 possible participating.
 there are a lot more JS programmers than CS programmers out there.
 by choosing CS you are reducing the number of people who can contribute to
 your project.

 2) ECMAScript 6 is going to add the - operator

 So far, this is not the case - but the book isn't closed on adding thin
 arrow.



 so if you like CS since you type less, this advantage is about to
 disappear (at least on the server).



 --
 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


 --
 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
Head of Support
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


Re: [nodejs] Re: Standard Test Runner for Node

2012-07-17 Thread Joshua Holbrook
 There's no test runner for all frameworks.

I use one that's pretty sweet, it's called `node`. ;)

(nevermind that vows tests usually export instead of run.)

--Josh

On Tue, Jul 17, 2012 at 1:44 AM, Nuno Job nunojobpi...@gmail.com wrote:
 There's no test runner for all frameworks.

 That would be a great idea though but it's very unlikely that someone
 reaches a compromise between features that is acceptable for different test
 framework developers.

 Nuno


 On Tue, Jul 17, 2012 at 2:43 AM, Dominic Tarr dominic.t...@gmail.com
 wrote:

 _everyone_ a strong opinion on this.

 our test frameworks need to be rewritten now that we have domains.

 maybe, write through exercises in the book?

 On Tue, Jul 17, 2012 at 8:32 AM, Roly Fentanes roly...@gmail.com wrote:
  If you can get your tests' point across clearly by using node's `assert`
  module and it's not that much difficult to structure compared to a full
  featured test framework, then consider using it.
 
  Otherwise, mocha is the popular recent one, and my personal choice.
  nodeunit
  is easy to understand too, and has been around for a while. vows used to
  be
  the choice, there's still a lot of popular modules with their tests
  written
  with vows. But it's no longer maintained and it shows.
 
  chai is often used along with these to make assertions easier to
  understand.
 
 
  On Monday, July 16, 2012 9:56:14 AM UTC-7, Alex Young wrote:
 
  Hello,
 
  I write about Node a lot, and I often illustrate concepts using tests.
  However, there isn't a standard test runner for Node.
 
  So, let's say I'm writing a book about Node.  I'd like to include
  examples
  using a test runner that's idiomatic, lightweight, and likely to be
  around
  in a year or two.  I'm thinking Mocha or Nodeunit might be a good idea.
 
  My projects from 2010-2011 seemed to use Nodeunit, and I've switched a
  few
  to Mocha with very little trouble.  Their APIs aren't directly
  compatible
  but the same concepts can be readily gleaned in both.
 
  Does anyone have any strong opinions about this? What test runner would
  you expect (or want) to see in books about Node?
 
  Thanks,
 
  Alex
 
  --
  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



-- 
Joshua Holbrook
Head of Support
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


Re: [nodejs] Re: Standard Test Runner for Node

2012-07-17 Thread Joshua Holbrook
 Not really. Node.js does't run tests for all frameworks, actually very few 
 will work as standalone node.

Yeah, I know :( It makes me sad because if everyone's tests would run
with standard node everything would be so much easier. tbh I'm
daydreaming here.

 Also if doesn't run files, you need some bash fu which translates to doesnt 
 work on windows.

Semantics. ;)

Seriously, though: Weren't you writing a test runner that was
basically just the xargs one-liner in javascript? Cause I would use
that.

--Josh

On Tue, Jul 17, 2012 at 1:56 AM, Nuno Job nunojobpi...@gmail.com wrote:
 Not really. Node.js does't run tests for all frameworks, actually very few
 will work as standalone node.

 Also if doesn't run files, you need some bash fu which translates to doesnt
 work on windows.

 Nuno

 On Tue, Jul 17, 2012 at 9:49 AM, Joshua Holbrook josh.holbr...@gmail.com
 wrote:

  There's no test runner for all frameworks.

 I use one that's pretty sweet, it's called `node`. ;)

 (nevermind that vows tests usually export instead of run.)

 --Josh

 On Tue, Jul 17, 2012 at 1:44 AM, Nuno Job nunojobpi...@gmail.com wrote:
  There's no test runner for all frameworks.
 
  That would be a great idea though but it's very unlikely that someone
  reaches a compromise between features that is acceptable for different
  test
  framework developers.
 
  Nuno
 
 
  On Tue, Jul 17, 2012 at 2:43 AM, Dominic Tarr dominic.t...@gmail.com
  wrote:
 
  _everyone_ a strong opinion on this.
 
  our test frameworks need to be rewritten now that we have domains.
 
  maybe, write through exercises in the book?
 
  On Tue, Jul 17, 2012 at 8:32 AM, Roly Fentanes roly...@gmail.com
  wrote:
   If you can get your tests' point across clearly by using node's
   `assert`
   module and it's not that much difficult to structure compared to a
   full
   featured test framework, then consider using it.
  
   Otherwise, mocha is the popular recent one, and my personal choice.
   nodeunit
   is easy to understand too, and has been around for a while. vows used
   to
   be
   the choice, there's still a lot of popular modules with their tests
   written
   with vows. But it's no longer maintained and it shows.
  
   chai is often used along with these to make assertions easier to
   understand.
  
  
   On Monday, July 16, 2012 9:56:14 AM UTC-7, Alex Young wrote:
  
   Hello,
  
   I write about Node a lot, and I often illustrate concepts using
   tests.
   However, there isn't a standard test runner for Node.
  
   So, let's say I'm writing a book about Node.  I'd like to include
   examples
   using a test runner that's idiomatic, lightweight, and likely to be
   around
   in a year or two.  I'm thinking Mocha or Nodeunit might be a good
   idea.
  
   My projects from 2010-2011 seemed to use Nodeunit, and I've switched
   a
   few
   to Mocha with very little trouble.  Their APIs aren't directly
   compatible
   but the same concepts can be readily gleaned in both.
  
   Does anyone have any strong opinions about this? What test runner
   would
   you expect (or want) to see in books about Node?
  
   Thanks,
  
   Alex
  
   --
   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



 --
 Joshua Holbrook
 Head of Support
 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

Re: [nodejs] Using `http.request` for calling `http.server` in the same process causes error sometimes.

2012-07-14 Thread Joshua Holbrook
Probably a race condition between the server listening and the request
trying to hit it. Try listening for a ready event from the server
before making the request.

--Josh

On Sat, Jul 14, 2012 at 6:54 PM, Alexey Petrushin
alexey.petrus...@gmail.com wrote:
 I'm having strange node.js behavior - using `http.request` for calling
 `http.server` in the same process sometimes causes error.

 This snippet of code will result in error ( https://gist.github.com/3114352
 )

 // Server returning 'okay' to everyone.
 require('http').createServer(function(req, res){
   process.nextTick(function(){
 res.end('okay')
   })
 }).listen(3000)

 // Calling server.
 var data = []
 var opts = {host: 'localhost', port: 3000, path: '/', method: 'get'}
 var req = require('http').request(opts, function(res){
   res.on('data', function(chunk){data.push(chunk)})
   res.on('end', function(){console.log(data.join())})
 })
 req.on('error', function(err){console.log(err)})
 req.write(hello)
 req.end()

 Strange thing - if You remove `nextTick` from the server or remove
 `req.write` from request - the result will be ok.

 Why? Is this a bug?

 --
 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
Head of Support
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


Re: [nodejs] Fwd: [CTTE #614907] Resolution of node/nodejs conflict

2012-07-12 Thread Joshua Holbrook
Wow, the debian community sounds kinda scary. I'm definitely not used
to these sort of top-down edicts. Is it just me?

--Josh

On Thu, Jul 12, 2012 at 2:41 PM, Carl Fürstenberg azat...@gmail.com wrote:
 -- Forwarded message --
 From: Don Armstrong d...@debian.org
 Date: Thu, Jul 12, 2012 at 8:59 PM
 Subject: [CTTE #614907] Resolution of node/nodejs conflict
 To: debian-devel-annou...@lists.debian.org



 === Resolution ===
 The Technical Committee reaffirms the importance of preventing namespace
 collisions for programs in the distribution, while recognizing that
 compatibility with upstreams and with previous Debian releases is also
 important and that sometimes an imperfect balance must be struck between
 these three goals.

 The Committee therefore resolves that:

 1. The nodejs package shall be changed to provide /usr/bin/nodejs, not
/usr/bin/node.  The package shall declare a Breaks: relationship with any
packages in Debian that reference /usr/bin/node.
 2. The nodejs source package shall also provide a nodejs-legacy binary
package at Priority: extra that contains /usr/bin/node as a symlink to
/usr/bin/nodejs.  No package in the archive may depend on or recommend
the nodejs-legacy package, which is provided solely for upstream
compatibility.  This package shall also declare a Conflicts: relationship
with the node package.
 3. The node source package shall rename its binary to /usr/sbin/ax25-node,
and its binary package to ax25-node.
 4. The node source package shall continue to build a transitional 'node'
binary package for compatibility with deployed Debian installations,
which provides /usr/sbin/node as a symlink to /usr/sbin/ax25-node.  This
package shall declare a reciprocal Conflicts: relationship with the
nodejs-legacy package.  Other packages may reference the 'node' package
as a dependency or recommendation, but are encouraged to transition to
'ax25-node'.
 5. The maintainers of these packages are required to implement the above
changes immediately in unstable.  Failing that, the Technical Committee
reserves the right to NMU to implement these changes.
 6. Once the above changes are implemented, the packages shall be considered
suitable for release with respect to the Debian policy on conflicting
packages.

 === End Resolution ===

 Please see http://bugs.debian.org/614907 for the background and discussion.


 Don Armstrong

 --
 I may not have gone where I intended to go, but I think I have ended
 up where I needed to be.
  -- Douglas Adams _The Long Dark Tea-Time of the Soul_

 http://www.donarmstrong.com  http://rzlab.ucr.edu


 --
 Carl Fürstenberg

 --
 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
Head of Support
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


Re: [nodejs] Fwd: [CTTE #614907] Resolution of node/nodejs conflict

2012-07-12 Thread Joshua Holbrook
I mean, at some point someone's gonna ask why all the scripts with
#!/usr/bin/env node don't work at some point in the future, and we're
gonna have a big thread about whether Deblian made the right choice
and how everyone on linux should just compile from source anyway.

Might as well cross that bridge when we come to it.

--Josh

On Thu, Jul 12, 2012 at 3:31 PM, Mark Hahn m...@hahnca.com wrote:
 I assume we can all move on and ignore this.


 On Thu, Jul 12, 2012 at 2:52 PM, Mikeal Rogers mikeal.rog...@gmail.com
 wrote:

 Finally, a triumph of process and committee over usability.

 Well done. *slow clap*

 -Mikeal

 On Jul 12, 2012, at July 12, 20122:41 PM, Carl Fürstenberg wrote:

  -- Forwarded message --
  From: Don Armstrong d...@debian.org
  Date: Thu, Jul 12, 2012 at 8:59 PM
  Subject: [CTTE #614907] Resolution of node/nodejs conflict
  To: debian-devel-annou...@lists.debian.org
 
 
 
  === Resolution ===
  The Technical Committee reaffirms the importance of preventing namespace
  collisions for programs in the distribution, while recognizing that
  compatibility with upstreams and with previous Debian releases is also
  important and that sometimes an imperfect balance must be struck between
  these three goals.
 
  The Committee therefore resolves that:
 
  1. The nodejs package shall be changed to provide /usr/bin/nodejs, not
/usr/bin/node.  The package shall declare a Breaks: relationship with
  any
packages in Debian that reference /usr/bin/node.
  2. The nodejs source package shall also provide a nodejs-legacy binary
package at Priority: extra that contains /usr/bin/node as a symlink to
/usr/bin/nodejs.  No package in the archive may depend on or recommend
the nodejs-legacy package, which is provided solely for upstream
compatibility.  This package shall also declare a Conflicts:
  relationship
with the node package.
  3. The node source package shall rename its binary to
  /usr/sbin/ax25-node,
and its binary package to ax25-node.
  4. The node source package shall continue to build a transitional 'node'
binary package for compatibility with deployed Debian installations,
which provides /usr/sbin/node as a symlink to /usr/sbin/ax25-node.
  This
package shall declare a reciprocal Conflicts: relationship with the
nodejs-legacy package.  Other packages may reference the 'node'
  package
as a dependency or recommendation, but are encouraged to transition to
'ax25-node'.
  5. The maintainers of these packages are required to implement the above
changes immediately in unstable.  Failing that, the Technical
  Committee
reserves the right to NMU to implement these changes.
  6. Once the above changes are implemented, the packages shall be
  considered
suitable for release with respect to the Debian policy on conflicting
packages.
 
  === End Resolution ===
 
  Please see http://bugs.debian.org/614907 for the background and
  discussion.
 
 
  Don Armstrong
 
  --
  I may not have gone where I intended to go, but I think I have ended
  up where I needed to be.
  -- Douglas Adams _The Long Dark Tea-Time of the Soul_
 
  http://www.donarmstrong.com  http://rzlab.ucr.edu
 
 
  --
  Carl Fürstenberg
 
  --
  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
  signature.asc

 --
 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



-- 
Joshua Holbrook
Head of Support
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

Re: [nodejs] Fwd: [CTTE #614907] Resolution of node/nodejs conflict

2012-07-12 Thread Joshua Holbrook
I understand the sentiment, but after all the hullabaloo surrounding
fs.exists/path.exists and require('sys')/require('util') I don't
really want to change /anything/. I'd rather deal with the confused
debian users than make more changes due to being the right thing.

--Josh

On Thu, Jul 12, 2012 at 8:54 PM, Felipe Gasper fel...@felipegasper.com wrote:
 On 12.7.12 9:52 PM, Ryan Schmidt wrote:


 What would speak against officially renaming the node binary to
 nodejs? I understand the reluctance to make changes for no reason,
 but this change would have a reason: it would fix the name collision,
 and would make the program name less generic and more recognizable.
 Possibly even more searchable on e.g. Google.


 Hear, hear.

 How many widely-used meanings can the word “node” have in software
 development? It’s a very generic name that requires context in order to
 understand what it means, whereas “perl” and “php” are very clear, and, at
 least in computing, “python” and “ruby” are almost as much so. (But don’t
 get me started on the spidermonkey binary!)

 “nodejs”++.

 -FG


 --
 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
Head of Support
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


Re: [nodejs] spawn and stdout in 8.1

2012-07-03 Thread Joshua Holbrook
I'd just start patching them, especially if the library's just
shelling out on the backend. Seems like it wouldn't be too bad. :)

--Josh

On Tue, Jul 3, 2012 at 12:47 PM, Mark Hahn m...@hahnca.com wrote:
 Thanks...

 I guess I'll have to wait until modules I use have been updated for 0.8.


 On Tue, Jul 3, 2012 at 12:28 PM, Charlie McConnell
 char...@charlieistheman.com wrote:

 The most likely cause is that you now want to listen for the 'close' event
 instead of 'exit'.  'exit' now fires when the child actually exits, 'close'
 fires when all stdio streams have closed.

 On Tue, Jul 3, 2012 at 11:25 AM, Mark Hahn m...@hahnca.com wrote:

 After switching to 8.1 several modules I use, like imagemagick, seem to
 be having trouble getting stdout back from a spawn.  Did something change in
 spawn?

 --
 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




 --
 Charlie McConnell
 Head of Developer Operations
 Nodejitsu, Inc.
 avian...@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


 --
 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


Re: [nodejs] [ANN]: ansi.js - Advanced ANSI formatting tool for Node.js

2012-06-28 Thread Joshua Holbrook
curl bbs? https://gist.github.com/1292314

--Josh

On Thu, Jun 28, 2012 at 2:48 PM, Louis Santillan lpsan...@gmail.com wrote:
 Lunduke.com has some of the original bbs games being served.

 -L

 On Thursday, June 28, 2012, mscdex wrote:

 On Jun 28, 4:54 pm, Glenn Block glenn.bl...@gmail.com wrote:
  LOL now we just need bbs.js and we're all set!

 Hey, I started working on that at one point just for fun, including z-
 modem support ;-)

 --
 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



-- 
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


Re: [nodejs] Re: remove engines from package.json?

2012-06-28 Thread Joshua Holbrook
 skipping the
 question entirely, and I'm not sure that the benefit is a big enough
 deal to matter.


 On Wed, Jun 27, 2012 at 11:04 PM, Vitaly Puzrin vit...@rcdesign.ru
 wrote:
  From the other hand, users never read warnings. If i've marked my module
  as
 = 0.6,
  then i'll get complains now, that it produces strange bugs under 0.4.

 Vitaly, I think some of your foreboding is a bit extreme here.  I get
 more node bugs landing in my inbox than probably anyone else on this
 list.  0.4 is dead.  Virtually no one is using it, and the people that
 ARE using it, are using it specifically because they're not upgrading
 everything or doing new work.  This is not a real concern, and if it
 ever becomes one, it won't be all that hard to address.


 On Wed, Jun 27, 2012 at 7:26 PM, Marcel Laverdet mar...@laverdet.com
 wrote:
  If this is a bad problem I feel the correct solution would be
  to add a flag to npm install such that you could skip the engines check:
  `npm install --force some-legacy-package`.

 Marcel, the fact that you suggest we add this is proof to me that it
 is insufficient.  --force has behaved this way for many months now.

  Regarding engines, I'm using it in node-fibers.. node:=0.5.2. There
  are
  older versions of fibers that work with older versions of node, and
  those
  are also marked correctly in their metadata.

 The current version of npm requires node 0.6, and breaks super badly
 on node 0.4.  So really, this is a question about how node will change
 moving forward.  (New thread coming soon, regarding our stance on
 future api breakage, stay tuned.)


 If it causes massive problems, we can just revert it.  It's not THAT
 big of a deal.  The main issue is that `npm init` was for several
 versions too restrictive about the defualt engines value, and people
 didn't even realize that they were making work for themselves in the
 future.  (And in nodes =0.4, it was a much greater need to specify
 the working engine precisely.)  Since I removed a default engine from
 `npm init`, most people don't even use it, and it's usually just a
 silly reason to not upgrade.

 --
 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



-- 
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


Re: [nodejs] Deprecation

2012-06-28 Thread Joshua Holbrook
 parts you like, and what
 parts are confusing or lacking.

 We are not committing to always support every API we release, forever.
  We are committing to considering breaking changes as a high-cost
 activity.  Some high-cost things are worth it.  Even some superficial
 things.  The cost of changing experimental APIs is a bit lower, since
 we've communicated with the stability index that changes are planned.

 For example, the cluster even name should really be exit, because
 that's consistent with the ChildProcess and process event names.  The
 consistency is important there, because it's actually the same sort of
 thing (ie, a javascript object representing a specific operating
 system process) and it's confusing to have different names for it.
 Once we get some more feedback about 0.8's cluster, we will probably
 move it to Unstable or even Stable in a future release, at which
 point, you WILL have the assurance that programs using it will not be
 broken unless absolutely necessary.

 --
 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


Re: [nodejs] Node.js Guide?

2012-06-26 Thread Joshua Holbrook
No idea. I can point you to http://docs.jit.su though, which I know
has code examples (I wrote some of the content).

--Josh

On Tue, Jun 26, 2012 at 12:06 PM, Jim Byrnes jf_byr...@comcast.net wrote:
 I am just getting started with Node.js and was reading the Node.js Guide.  I
 came across numerous places where I expected to see code examples but did
 not.

 On [1] I see Imagine this piece of code: but nothing follows it.

 [1] http://nodemanual.org/latest/nodejs_dev_guide/using_closures.html

 Looking at the error console I see: Many 404 errors pointing at
 http://snippets.c9.io/

 I am running Firefox 13 on Ubuntu 10.04. Do you suppose I have a setting I
 need to change or maybe is there a problem with that page?

 Thanks,  Jim

 --
 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


Re: [nodejs] remove engines from package.json?

2012-06-26 Thread Joshua Holbrook
We use the engines field for application deployment to nodejitsu,
since we need to know what version of node the user prefers their
application to run on. That said, this is for applications and not for
libraries, and I'm not sure it makes much sense for libraries
excepting for special cases where a deprecated version of a library is
known to only work with certain versions (in which case you set the
versions deliberately), which should be much less common now that the
0.4/0.6 jump is complete.

I suppose an engines field could also be useful for binary package
builds, maybe. Not sure.

--Josh

On Tue, Jun 26, 2012 at 10:06 PM, Isaac Schlueter i...@izs.me wrote:
 Do people actually rely on the engines hash being respected in npm
 installs any more?  It was super essential in the early days when the
 API was changing constantly, but now, it seems like it just makes it
 unnecessarily difficult to upgrade stuff.

 If no one is relying on this right now, I'm going to reduce it to a
 warning.  If in time, people start complaining that the warning is to
 warny, we can remove it, and just let engines be a thing of the
 past.  (Note that `npm init` already doesn't bother with it, and for a
 while has just defaulted to {node:*}.)

 Please let me know what you think.  Thanks :)

 --
 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


Re: [nodejs] Re: crazy ideas in proxing.

2012-06-15 Thread Joshua Holbrook
 What made substack change tactics?

This:

 Although in http 1.1 multiple requests may be made in the same tcp
 connection, a well behaved client is not allowed
 to make requests to different hosts in the same connection

That is, multiple requests on the same tcp connection was desirable
for Sub. Dominic, however, isn't supporting that for the sake of
simplicity.

--Josh

On Fri, Jun 15, 2012 at 11:46 AM, Jeff Barczewski
jeff.barczew...@gmail.com wrote:
 Dominic,

 Sounds like a nice and simple solution!

 I would have picked a different name, but that is just me :-)

 Thanks for sharing!

 Jeff

 --
 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


Re: [nodejs] Ideas for contribution to node.js in the context of a Master's Thesis

2012-06-12 Thread Joshua Holbrook
 things like hard real-time, complex math, etc.

To elaborate on the math aspect: Because of the significant js/C
barrier and the need for optimized code, node is a poor choice for
significant computation. I would recommend python and numpy/scipy for
this kinda stuff.

One approach you may consider is to use node to manage basic web ui
stuff, and then use the child_process module to shell out to workers
written in more appropriate languages as necessary. For a scientific
application this would probably even be a good fit.

 The extra learning curve of a new language and framework will just get
in the way of getting things done.

There's definitely a truth to this. When I did my masters, the biggest
lesson was that your time is worth *way* more than both money and
cool-factor. Flask might be boring but it's worth it if you're able to
ship faster in the short term (and with the timescale of a masters you
definitely want to be thinking short-term). Just something to think
about.

--Josh


On Tue, Jun 12, 2012 at 12:20 PM, Ben Noordhuis i...@bnoordhuis.nl wrote:
 On Tue, Jun 12, 2012 at 3:08 PM, Igor Skoric sk.i...@gmail.com wrote:
 It will be a suite of tools for a geological lab. I plan to create a simple
 customer/project management suite and plug in a handful of applications for
 different processes. If you would like to recommend a different (but cutting
 edge) technology for this I would also be grateful.

 Igor, see my previous email. node.js may or may not work for you. If
 you're already familiar with, say, flask or django, I'd go with that.
 The extra learning curve of a new language and framework will just get
 in the way of getting things done.

 --
 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


Re: [nodejs] Ideas for contribution to node.js in the context of a Master's Thesis

2012-06-12 Thread Joshua Holbrook
Python has a python/c barrier yes, but python's runtime is better
equipped to handle crossing the boundary with low overhead because it
was written with that use case in mind. v8, on the other hand, is
optimized for running javascript code and so making the jump back and
forth is considerably more effort for the vm.

I'm sure someone with more experience with node C bindings (or python
C bindings for that matter) could give a more technical explanation.
I'm more of an end-user and not as much a developer when it comes to
such bindings.

To further elaborate: You *can* do basic math in javascript just fine,
and at a reasonable rate. For heavy lifting though, ya gotta go
lapack/atlas/etc.

--Josh

On Tue, Jun 12, 2012 at 2:18 PM, Matt hel...@gmail.com wrote:
 On Tue, Jun 12, 2012 at 3:29 PM, Joshua Holbrook josh.holbr...@gmail.com
 wrote:

 To elaborate on the math aspect: Because of the significant js/C
 barrier and the need for optimized code, node is a poor choice for
 significant computation. I would recommend python and numpy/scipy for
 this kinda stuff.


 Python has the same barrier. What makes it different? i.e. why couldn't
 someone created a NumNode/SciNode?

 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



-- 
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


Re: [nodejs] Ideas for contribution to node.js in the context of a Master's Thesis

2012-06-12 Thread Joshua Holbrook
 people said that at first about numerical calculations in Python before NumPy 
 existed

I doubt it. Scientists *love* having a scripting language on top of
their fortrans. It's a very old idea.

--Josh

On Tue, Jun 12, 2012 at 3:15 PM, Matt hel...@gmail.com wrote:
 On Tue, Jun 12, 2012 at 6:09 PM, Joshua Holbrook josh.holbr...@gmail.com
 wrote:

  it's not something that can't be done, it just hasn't been done yet,
  IMHO.

 Right. It's doable, it's just not actually that great of an idea.


 Hah, well people said that at first about numerical calculations in Python
 before NumPy existed, and Perl before PDL existed - after all that's what
 Mathematica and FORTRAN were for ;-)

 --
 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


Re: [nodejs] Re: path.exists: bug?

2012-06-04 Thread Joshua Holbrook
Yeah, I mean, while I agree that statting is the right way to solve
this particular problem, it is kinda lame that fs.exists isn't
consistent with, say, bash.

--Josh

On Mon, Jun 4, 2012 at 8:54 PM, dhruvbird dhruvb...@gmail.com wrote:
 Hello,

 I think Massimo has a point here. If /myfile is a regular file, then
 pathname resolution to /myfile/. should fails and exists should imho
 return false. Only in the case that /myfile is a directory should
 the call return true.

 Regards,
 -Dhruv.

 On Jun 1, 12:00 pm, Mark Hahn m...@hahnca.com wrote:
 You want `existsSync` to tell you if a path is a directory or a file. But
  `existsSync` doesn't do that.  You would need to make that a feature
 request.







 On Fri, Jun 1, 2012 at 11:51 AM, Massimo Melina reje...@gmail.com wrote:
  clear enough, thank you!
  i consider it an unwanted side-effect of the normalization.

  --
  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



-- 
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


Re: [nodejs] Re: path.exists: bug?

2012-06-04 Thread Joshua Holbrook
Oh! Then we're good! :D

This thread is now about ponies.

--Josh

On Mon, Jun 4, 2012 at 9:15 PM, Isaac Schlueter i...@izs.me wrote:
 That's already how it works, though.

 $ mkdir a
 $ touch x
 $ node
 fs.existsSync('x/.')
 false
 fs.existsSync('a/.')
 true

 In 0.6.18:

 path.existsSync('x/.')
 false
 path.existsSync('a/.')
 true

 On Mon, Jun 4, 2012 at 8:54 PM, dhruvbird dhruvb...@gmail.com wrote:
 Hello,

 I think Massimo has a point here. If /myfile is a regular file, then
 pathname resolution to /myfile/. should fails and exists should imho
 return false. Only in the case that /myfile is a directory should
 the call return true.

 Regards,
 -Dhruv.

 On Jun 1, 12:00 pm, Mark Hahn m...@hahnca.com wrote:
 You want `existsSync` to tell you if a path is a directory or a file. But
  `existsSync` doesn't do that.  You would need to make that a feature
 request.







 On Fri, Jun 1, 2012 at 11:51 AM, Massimo Melina reje...@gmail.com wrote:
  clear enough, thank you!
  i consider it an unwanted side-effect of the normalization.

  --
  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



-- 
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


Re: [nodejs] I have a proposal!!

2012-06-01 Thread Joshua Holbrook
-1 as I like my modules exactly as they are.

--Josh

On Fri, Jun 1, 2012 at 12:32 PM, Angel Java Lopez ajlopez2...@gmail.com wrote:
 neither to add some sync function at core ;-)


 On Fri, Jun 1, 2012 at 4:31 PM, Alan Hoffmeister alanhoffmeis...@gmail.com
 wrote:

 +1 to the idea.

 Btw, don't mention PHP or you will get in troubles here...

 --
 Att,
 Alan Hoffmeister


 2012/6/1 Angel Java Lopez ajlopez2...@gmail.com:
  Interesting... but
 
  A key property of a require is the isolation of its product, something
  like namespaces in other languages/technologies.
 
  So myrequire.abs is clearly different from yourrequire.abs
 
  Paraphrasing David Hilbert (about Cantor)
  No one shall expel us from the paradise that require(...) has created
  for
  us
  http://www.brainyquote.com/quotes/authors/d/david_hilbert.html
 
 
  On Fri, Jun 1, 2012 at 2:26 PM, Seiji Sam Lee seijisam...@gmail.com
  wrote:
 
  Due the great expectation around node.js, libs and functions grow up
  without control.
 
  Nowadays we have a lot of requires and we need to memorize a lot of
  names (fs, path, vm, ...); with time, we'll spend more and more time
  reading
  documentation :-(
 
  My proposal is incorporate the mechanism of register the module, for
  example, phpjs library could register the function isset into
  utils, and
  abs function into math
 
  So we could have libraries well sorted !!
 
 
  El 01/06/12 15:17, Alan Hoffmeister escribió:
 
  Hello there!
 
  I had just ported php.js (http://phpjs.org) for Node.js.
  My motivation was to available new functions that could help
  programmers
  to accomplish simple tasks and yup, I came from PHP and I was really
  missing
  some basic functions :)
 
  A list of functions is available at http://phpjs.org, install guide
  and
  usage, here: https://github.com/cranic/node-phpjs.
 
  Have an idea? Shout it out! :)
 
  --
  Att,
  Alan Hoffmeister
  --
  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

 --
 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



-- 
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


Re: [nodejs] lambdas in node

2012-05-28 Thread Joshua Holbrook
First of all, these all look like named functions and not anonymous
functions. The difference is that anonymous functions don't have a
name in between the function keyword and the parens, basically. So,
nothing special.

Are you trying to do something like:

var first = function () { return 'first'; },
second = function () { return 'second'; };

function runFunctions (a, b) {
  console.log(a());
  console.log(b());
}

runFunctions(first, second);

this ?

--Josh

On Mon, May 28, 2012 at 11:07 AM, Joshua Bowles bowlesl...@gmail.com wrote:
 I'm clearly missing something about anonymous functions in node. As a
 learning exercise I'm trying to pass multiple lambdas to a function.
 I've got a gist https://gist.github.com/2820160  (and a comparison in
 Ruby of what I'm trying to do https://gist.github.com/2820073).

 Thanks in advance!

 I can do this in node:

 function executeThree(someFunction, value) {
  someFunction(value);
 }
 executeThree(function(word) {console.log(word); }, lambda_three);


 I'm not able to figure out how to pass multiple anonymous functions to
 a function such as this:

 function lambda_good( ) {
  function executeOne(someFunction, someValue) {
    someFunction(someValue);
  }
  function executeTwo(anotherFunction, anotherValue){
    anotherFunction(anotherValue);
  }
 }


 I've toyed with a lot of different definitions for lambda_good but I
 can't seem to get it to work. Can someone help me see what I'm missing
 here?

 SIDE NOTE: this is how I can do it Ruby;

 def func_one
  func_one = lambda do
    puts lambda_one
  end
  #func_one.call
 end

 def func_two
  func_two = lambda do
    puts lambda_two
  end
  #func_two.call
 end

 def lambda_good(func1,func2)
  func1.call
  func2.call
 end

 --
 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


Re: [nodejs] recommended flow control library?

2012-05-26 Thread Joshua Holbrook
+1 to async. We bundle it with flatiron's util library. :)

--Josh

On Sat, May 26, 2012 at 2:55 PM, Jarka est.ri...@gmail.com wrote:
 Well there are programming cases where you can not use async way.

 On Saturday, 26 May 2012 22:59:17 UTC+3, Tim Caswell wrote:

 I recommend not using one, but if you prefer to have a library for this,
 async is the most popular and quite robust.

 On Sat, May 26, 2012 at 2:38 PM, Mark Volkmann r.mark.volkm...@gmail.com
 wrote:

 Many people, including me, recommend https://github.com/caolan/async.

 ---
 R. Mark Volkmann
 Object Computing, Inc.

 On May 26, 2012, at 1:54 PM, Davis Ford davisf...@gmail.com wrote:

 There does not appear to be a shortage of libraries out there that help
 with flow control.  I'm looking for something that is well tested,
 maintained, and has the capability to deal with parallel and sequential
 workflows - functional programming syntactic sugar is a plus...don't care
 about coffeescript, and documentation that is in coffeescript only is a
 minus.

 https://github.com/joyent/node/wiki/modules#wiki-async-flow

 I've been browsing a lot of these on github, and a number of them look
 good, but it is quite time consuming to investigate them all, so I'd love to
 hear any feedback from the group.  Are you using any of these (or other libs
 not listed) -- happy with them?  Any you would recommend?

 Thanks in advance,
 Davis

 --
 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



-- 
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


Re: [nodejs] nd: a documentation viewer for node

2012-05-24 Thread Joshua Holbrook
/r/ fallback to globally-installed modules :)

Besides that, I dig it a lot.

--Josh

On Thu, May 24, 2012 at 3:29 PM, Nuno Job nunojobpi...@gmail.com wrote:
 THIS IS AWESOME

 npm install -g nd jsontool cdir

 Is a must if you use node. Here's why:

 http://codestre.am/34d0a6ae7872687b1ded83945

 Nuno


 On Thu, May 24, 2012 at 10:31 PM, Russ Frank m...@russfrank.us wrote:

 Hi,

 I wrote this small tool to make it easer to read documentation for node
 modules in a terminal window:

 https://github.com/russfrank/nd

 It respects the module's package.json.directories.doc field, but will fall
 back to just looking for a readme.md.  It displays markdown pages using a
 modified version of marked and pipes to less.  On windows it uses a simple
 pager I wrote in javascript.  It will also just render markdown files, or
 load them from a url. Maybe some of you will find it useful.

 --
 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



-- 
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


Re: [nodejs] Re: Zero Window error when nodejs as TCP server

2012-05-24 Thread Joshua Holbrook
What is `buffer`? What is `parsePacket`?

--Josh

On Thu, May 24, 2012 at 5:38 PM, xzYue xzyue2...@gmail.com wrote:
 No one meet this kind of problems?
 xzYue

 On 5月24日, 下午8時03分, xzYue xzyue2...@gmail.com wrote:
 Any idea?

 On 5月24日, 上午11時17分, xzYue xzyue2...@gmail.com wrote:

  Hi all,
  I created a tcp server using nodejs codes below:

  var net = require('net');
  var server = net.createServer(function(c) { //'connection' listener
    console.log('server connected');

    c.on('data', function(data) {
            console.log(raw data: +data.toString());
            buffer += data.toString();
            buffer = parsePacket(buffer);
    });

    c.on('end', function() {
        console.log('server disconnected');
    });

  });

  After a period of time,it stops data receiving.
  I catch some packets using Wireshark.
  A lot of TCP ZeroWindow errors.
  I find the connection from the tcp client created by Java or C++
  appears this issues, but the nodejs tcp client is fine.

  Any replies are welcome.
  xzYue

 --
 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


Re: [nodejs] Re: Node.js bindings for HyperDex

2012-05-23 Thread Joshua Holbrook
Integrating the event loops will go a long way. Basically, instead of:

var putter = h.async_put(stuff, morestuff);
putter.wait(); // Presumably this blocks until putter gets a
result?? That's not good! D:

Do this:

// (non-blocking!)
h.put(stuff, morestuff, function (err, result) {
// do stuff with err and result
});

Remember, the non-blocking is the secret sauce that makes node fast!
;) It'd be a shame to have this cancel out the speed hyperdex seems to
be going for.

Also: How hard would it be to implement this with pure javascript
instead of requiring a c++ build step? That would've been the easier
thing for me by far, and people appreciate the portability anyway.

--Josh

On Wed, May 23, 2012 at 12:19 AM, Joran Greef jo...@ronomon.com wrote:
 Hi Robert, spotted the HyperDex project when it was released, the hyperspace
 hashing is really cool.


 On Tuesday, May 22, 2012 6:40:34 PM UTC+2, Robert Escriva wrote:

 Hello,

 I'm a core developer for the HyperDex[1] project.  One of the people
 working on the project has added complete Node.js bindings[2].

 The HyperDex team is committed to keeping these bindings updated, and
 would love feedback from the community to make them better.  WIth the
 Node.js community's help, we'll make HyperDex integrate with Node.js as
 seemlessly as possible.

 Right now, the API is a direct port of the Python API.  This means that
 HyperDex's event loop is not integrated with Node's event loop, and that
 applications may not follow all of Node.js' idioms as well as they
 could.

 I have a few questions for the Node.js community that I was hoping the
 folks on this mailing list can help answer:

  - I see one prior post to this list mentioning HyperDex[3].  Is there
    other interest in official HyperDex support for the Node.js bindings?

  - Are there developers close to the Node.js project who are willing
    to collaborate to make the bindings better?  We're specifically
    thinking that the Node.js community will know of some areas in which
    the HyperDex API can be expanded or altered to provide new and unique
    features to Node.js applications.

 I've CC'ed the HyperDex team.  Please feel free to contact us if you
 have any questions or suggestions about how we can make HyperDex work
 better for your Node.js app.

 Thanks,
 Robert

 1. http://hyperdex.org/
 2.
 https://github.com/rescrv/HyperDex/commit/b41377ccd539d2736134a7247aef335d6ef60d7e
 3.
  http://groups.google.com/group/nodejs/browse_thread/thread/1ec2908cd5fafa28/367ef183923601e4?lnk=gstq=hyperdex#367ef183923601e4

 --
 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


Re: [nodejs] standard content-type for streaming JSON (newline delimited JSON objects)?

2012-05-23 Thread Joshua Holbrook
Newline-delimited JSON is pretty common. I don't think there's a
standard content-type for it though.

 Stay with the standard.

Well, this *is* the standard, just combined with newline-delimited streaming.

--Josh

On Wed, May 23, 2012 at 2:05 PM, Mark Hahn m...@hahnca.com wrote:
 Stay with the standard.  Crockford has made it clear that the standard will
 never change.  It is one of json's strengths.  You can count on the fact
 that what you do now will work forever.


 On Wed, May 23, 2012 at 1:47 PM, Ken ken.woodr...@gmail.com wrote:

 There seem to be a growing number of tools  packages around that
 implement some form of JSON streaming where multiple standard JSON objects
 are delimited by extra newlines, e.g.

 { id: 1, foo: bar }
 { id: 2, foo: baz }
 ...

 This format seems both pragmatic and useful, but is not JSON compliant
 (i.e. doesn't parse with a standard JSON parser), so it seems inappropriate
 to serve up as application/json.   Request-JSONStream uses
 application/jsonstream, Google searching shows at least one use of
 application/x-json-stream, and there are a number of services that use
 application/json and expect clients to just deal with it (cf.
 https://github.com/senchalabs/connect/issues/538).

 Since I'm about to make heavy use of this technique in a way that will be
 a little difficult to unwind later I'd like if at all possible get on board
 with whatever will become the standard (defacto or official). Anyone aware
 of any efforts underway to standardize this, or packages/services that have
 enough momentum to drive a standard in the future?

 --
 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



-- 
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


Re: [nodejs] request an english name for a node development group

2012-05-01 Thread Joshua Holbrook
 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




 --
 With regards
 Er. Rajesh Kumar Jha
 Software Engineer
 mail : rkjha.it...@gmail.com
 Ph : +91-9560034877,7428444177

 --
 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


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 t...@radicaldesigns.org 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


Re: [nodejs] ender vs. browserify?

2012-04-22 Thread Joshua Holbrook
 Does browserify let you install npm modules, similar to `ender build npm
 package names, or do you have to manually download them?

You install modules with npm, and require them in your browser's
index.js . Then you do a browserify build against that index.js and it
bundles the deps automatically.

I don't know much of anything about ender, but if you're going for
client side require system browserify's pretty much where it's at.

-Josh

On Sun, Apr 22, 2012 at 10:43 PM, Jamison Dance jerga...@gmail.com wrote:
 Does browserify let you install npm modules, similar to `ender build npm
 package names, or do you have to manually download them?

 --
 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


Re: [nodejs] return callback(...); vs callback(...); return;

2012-04-10 Thread Joshua Holbrook
 BTW, the return in case B is ignored and not needed.

What about short circuiting? The example didn't illustrate
short-circuiting but it's somewhat common and probably the OP's
inspiration.

function (opts, cb) {
  thing(opts, function (err, data) {
if (err) {
  cb(err);
  return;
}
var result = transform(data);

cb(null, result);
  });
});

In this case, we use return to stop callback execution, and for async
use the actual return value doesn't matter because it can't get
assigned to anything so combining the lines into `return cb(err)`makes
for a reasonable shorthand. Other than that, they're roughly
equivalent.

--Josh

On Tue, Apr 10, 2012 at 4:26 PM, Mark Hahn m...@hahnca.com wrote:
 BTW, the return in case B is ignored and not needed.


 On Tue, Apr 10, 2012 at 4:24 PM, Mark Hahn m...@hahnca.com wrote:

 The only difference is that the return value of foo takes on the
 callback's return value instead of null.  There is no other difference at
 all.


 On Tue, Apr 10, 2012 at 4:17 PM, Ken ken.woodr...@gmail.com wrote:

 Assuming that the callback doesn't return a value, does v8 behave any
 differently when invoking callbacks in one of these forms vs. the other?  I
 find the first approach to be a convenient shorthand in many cases, but am
 wondering (after observing some unexpected timings when profiling async
 methods) if it leads to v8 doing something odd with the stack.

 Approach A, return the invoked callback:

 function foo(a, callback) {
   var bar = ...;
   return callback(bar);
 }

 foo(derp, function(b) { ...; return; });

 Approach B, invoke callback, then return:

 function foo(a, callback) {
    var bar = ...;
    callback(bar);
    return;
 }

 foo(derp, function(b) { ...; return; });

 --
 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



-- 
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


Re: [nodejs] Node in 1 year?

2012-04-02 Thread Joshua Holbrook
 So I would like to know where node thinks it will be in 1 year?

Well, node core, I think, is in a place where it's starting to
converge on an intended final state. You won't see any sweeping api
changes probably, and instead will see improvement in the user
experience and a  lot of stability fixes. In a year, node will be that
much more battle-hardened but not really fundamentally different.

All the action's gonna be in userspace, I think.

First of all, I think we're going to see improvements on the browsing
npm front, since they're sorely needed and something people are
already experimenting with.

I also think we're going to see a change/solidification in terms of
common node.js frameworks. Right now express is still really popular
but there are many new frameworks coming out (there was a podcast
about these frameworks on nodeUp not too long ago) and I think at
least a few of them are going to give express a run for their money.
Speaking of money: Mine's on flatiron, but hey, I'm biased.

With improvements on the native bindings experience, I hope we also
see some interesting new native bindings, though current trends
indicate people prefer pure js bindings for reasons other than oh
maan I have to compile something imo.

 At some point nodes going to run into a wall, and that wall is javascript.

I will admit that javascript has its limits (numerical stuffs as you
point out). However, I don't think these will be experienced as a
wall. Instead, I predict that other environments and languages will
get libuv bindings (along the lines of luvit), and that for certain
problems these will become popular. For example, I saw a branch on
julia-lang for binding the core to libuv, and that would be a great
way to create services that can data crunch. On a similar note, luvit
is already being used in places where v8 has been deemed to have too
large of a memory footprint.

Cheers,

--Josh

On Mon, Apr 2, 2012 at 4:09 PM, Mark Hahn m...@hahnca.com wrote:
  At some point nodes going to run into a wall, and that wall is
 javascript.

 In what way is javascript limiting?

 --
 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


Re: [nodejs] Re: Node in 1 year?

2012-04-02 Thread Joshua Holbrook
 Extending the language is where my mind drifts.

That's not really something node's interested in. The various working
groups might make language proposals and the v8 peeps might implement
some of them, but that stuff's outside node's scope.

 These are the improvements that node need to think about.

Ehh, it's not node's style. Node's really designed so other people can
write streaming json parsers for it. We already have more than one to
choose from.

--Josh

On Mon, Apr 2, 2012 at 7:07 PM, Tim Price price.ti...@gmail.com wrote:
 Can't this be dealt with in external modules?
 Yes it can but should it?

 Extending the language is where my mind drifts. JavaScript has a lot of
 baggage thanks to 20 years of crap browsers, and  think some of the baggage
 has been brought along with the coming of node.

 --
 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


Re: [nodejs] Re: New NPM package Node-OSC

2012-03-24 Thread Joshua Holbrook
 TUIO uses the OSC standard via udp... so it should just work out of
 the box :D

Awexome. You should play with it and do a demo! :D :D

(I built a tuio-enabled touchscreen for my senior project in college
but didn't get to actually do any dev for it so, like, this is a topic
that interests me.)

--Josh


On Sat, Mar 24, 2012 at 9:22 PM, TheAlphaNerd myles.bor...@gmail.com wrote:
 TUIO uses the OSC standard via udp... so it should just work out of
 the box :D

 On Mar 24, 11:32 pm, Joshua Holbrook josh.holbr...@gmail.com wrote:
 Has anyone tried this with TUIO yet? :)

 --Josh









 On Sat, Mar 24, 2012 at 7:45 PM, Elijah Insua tmp...@gmail.com wrote:
  Awesome! I tried to use this when hacking on tmpad r4, but it wasn't
  working.  So I went with node-midi instead.

  Now that it works, I'll need to revisit this! Thanks!

  --Elijah

  On Mar 24, 2012 5:42 AM, TheAlphaNerd myles.bor...@gmail.com wrote:

  So node-osc was broken / deprecated.  After banging my head against
  the wall I managed to get everything working again with node v0.6.13.

  You can install this package with npm install node-osc

  This package has abstracted objects for an osc Server, osc Client, and
  osc Message.  It makes sending OSC messages very very easy.

  The source is available athttps://github.com/TheAlphaNerd/node-osc

  --
  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

 --
 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



-- 
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


Re: [nodejs] Where is NODE_ENV documented

2012-03-18 Thread Joshua Holbrook
 I'm not sure where it is documented, but it enables you to define different
 environments.

It's not documented in node core because it's just a convention, made
popular by express. Node itself doesn't care what the environment vars
are really, it just lets you read and write them via
http://nodejs.org/docs/latest/api/process.html#process_process_env .

--Josh

On Sun, Mar 18, 2012 at 11:14 AM, dale tan wtd...@gmail.com wrote:
 I'm not sure where it is documented, but it enables you to define different
 environments.
 Say you want a dev and prod environment.  Before you fire up your app,
 you would do something like this:

 $ NODE_ENV={ENV} node app.js

 $ NODE_ENV=dev node app.js = dev environment
 $ NODE_ENV=prod node app.js = prod environment

 Then within your app, you can access this value like this:
 process.env.NODE_ENV

 This is especially prevalent in express where you can set different
 environment configurations:

 app.configure(dev, function (req, res) {
   // do only dev things here
 })

 app.configure(prod, function (req, res) {
   // do only prod things here
 })

 hope that helps.

 dale


 On Sun, Mar 18, 2012 at 1:13 PM, Peng Yu pengyu...@gmail.com wrote:

 Hi,

 I'm not able to find where NODE_ENV is documented and what it is for.
 Could anybody point me where the document is?

 Regards,
 Peng

 --
 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




 --
 --
 CONFIDENTIALITY NOTICE: This e-mail transmission, and any documents,
 files or previous e-mail messages attached to it may contain confidential
 information that is legally privileged and is intended for the designated
 recipient only. If you have received it in error, please notify the sender
 immediately and delete the original. Any other use of the email by you is
 STRICTLY PROHIBITED.

 --
 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


Re: [nodejs] Re: Eido: Tex+lisp style doumentation language

2012-03-12 Thread Joshua Holbrook
As a latex and lisp fan, this looks sweet! Could use a better readme
though. You should put what you said in this email into it! :)

--Josh

On Sat, Mar 10, 2012 at 9:36 AM, Belleve Invis typeof@gmail.com wrote:
 Overall compilation progress:

 Source doc --parse- Source Tree (lisp style) -- evaluation - Generated
 content

 And its output actions is controlled by the document itself (fileOut and
 consoleOut marco).

 在 2012年3月11日星期日UTC+8上午1时32分22秒,Belleve Invis写道:

 Hi. I am a node developer from China and I made eido for making douments.

 link: http://github.com/be5invis/eido

 Its kernel is Lisp and its syntax looks like TeX. Its system is entirely
 based on marcos --- or functons. defun is provided. It uses eager
 evaluation in most cases with some special auto-quoting rules defined by
 functions (for example: quote itself and lambda).

 Its basic syntax is \marco{arg}{arg}{{raw_arg}}{arg} and

 :marco{arg}{arg}
     indented block
     for last argument.

 {arg} patterns will contain nested expression with {{raw}} does not.

 Currently it is still under development, however, you can see some
 examples in my moescript project:
 https://github.com/be5invis/moescript/tree/master/src/doc

 The command path/to/eidoc index.ed will generate a HTML page at
 ../../doc/index.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



-- 
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


Re: [nodejs] was the Please reset your npm registry account legit?

2012-03-07 Thread Joshua Holbrook
I also received this email. I'm guessing it's legit.

Exhibit A: All of the links are legit.

Exhibit B: https://twitter.com/#!/izs/status/177564294899183616

It sure would be nice, though, if Isaac confirmed.

--Josh

On Wed, Mar 7, 2012 at 8:26 PM, mgutz mario.l.gutier...@gmail.com wrote:
 I received an email asking me to reset my account. Is this legit? No mention
 here.

 --
 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


Re: [nodejs] [meta] GPG?

2012-03-05 Thread Joshua Holbrook
I use gmail enough that I'd be willing to go as far as to use an
add-on/extension if it didn't suck.

--Josh


On Mon, Mar 5, 2012 at 12:48 PM, Dean Landolt d...@deanlandolt.com wrote:


 On Mon, Mar 5, 2012 at 3:30 PM, Jann Horn jannh...@googlemail.com wrote:

 Am Montag, den 05.03.2012, 12:20 -0800 schrieb Isaac Schlueter:
  Gmail doesn't make it easy enough to sign messages.

 True... and you see no other advantage in using a native mail client?

 Mhm... I guess there actually aren't many left...


 I see very few advantages. My data's already all over google's servers so
 hiding me email from them doesn't do me too many favors. It'd be great if
 the goog made gpg easy though. Is there a js gpg lib out there? I could
 totally see a bookmarklet to sign and verify. It'd be even more handy if it
 did encryption/decryption, but that wouldn't even be necessary. But it'd
 have to be js -- I doubt a browser extension would be worth the trouble.

 --
 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


Re: [nodejs] Re: NodeJS downloadable Docs

2012-02-25 Thread Joshua Holbrook
You, sir, have made an excellent point. I'm now wondering the same.

--Josh

On Sat, Feb 25, 2012 at 12:05 AM, dolphin 278 dolphin...@gmail.com wrote:
 Sorry guys, may be i don't get it - why to bother with chm, or any other
 efforts, if at any moment you
 have http://nodejs.org/docs/latest/api/all.html where all documentation
 already gathered in one single file?
 -
 Boris Egorov
 skype/gtalk/nickname: dolphin278
 mobile: +7 905 728 1543



 On Sat, Feb 25, 2012 at 2:16 AM, Martin Cooper mfncoo...@gmail.com wrote:

 On Fri, Feb 24, 2012 at 9:17 AM, Ryan Schmidt
 google-2...@ryandesign.com wrote:
 
  On Feb 24, 2012, at 00:52, Jeremy Rudd wrote:
 
  But .markdown files cannot be natively viewed on usual computers. HTML/
  CHM is a more friendly format.
 
  I would think that finding a markdown viewer would not be difficult.

 Yup. One great option is Showdown, which will render Markdown in the
 browser. The original domain went away, but the code is on Github
 here:

 https://github.com/coreyti/showdown

 --
 Martin Cooper


  --
  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



-- 
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


Re: [nodejs] Re: Intrinsic datastores for Node.js

2012-02-21 Thread Joshua Holbrook
...@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


Re: [nodejs] Node Hosting advice.

2012-02-21 Thread Joshua Holbrook
 see if you can get in on the beta.

protip: join #nodejitsu on freenode and ask about the beta, and
there's a good chance you'll get the mad hookups.

--Josh

On Tue, Feb 21, 2012 at 2:56 PM, Murvin Lai murvin...@gmail.com wrote:
 Recommendation:
 MongoDB: use the Instance wtih more memory.  It is memory intensive. (For
 single Mongo Server), and also one EBS for actual storage of the data
 (file).     i.e. you need 1 Ec2 (high memory) with 1 EBS.
 Node.js / expressJS : use a more CPU high instance. i.e. you need 1Ec2 (high
 CPU).   You probalby have 4CPU or more, so you can run cluster and utilize
 all CPU.

 How many users?  A lot.  i mean. it can take at least 2000+ req/sec  with
 one CPU.

 Other hints:  for Mongo, you need to also change your EC2 configure so that
 it has ulimit over 2 for optimal performance.
 same as Node.js, better to set ulimit over 2000 for each CPU.  or if you do
 http remote call from node.js, then you need to increase ulimit (# of socket
 / file open) to over 1.



 On Tue, Feb 21, 2012 at 11:19 AM, Amal raj.a...@gmail.com wrote:


 I am working on a node web app with a very simple architecture. The
 architecture is as follows:
 - MongoDB as the database
 - Nginx as the web server and as the reverse proxy.
 - ExpressJs for the app server.


 I was planning to use 2 large Amazon Large Ec2 instances for the same. One
 large instance for the DB and another for the Node App.
 But I got a few doubts.  Doubts are :

 - Large instance has 4 CPU EC2 units. But since Node does not yet use
 multi-cores well, will it make sense to use a Large instance for the same.
 Or Should I try to run multiple small instances.
 - Has anyone ever had experience in running Node on EC2 Small instance.
 How many users does it support simultaneously ?
 -

 Amal.

 --
 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



-- 
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] [ANN] Flatiron Mailing List

2012-02-06 Thread Joshua Holbrook
Hey everyone,

We're creating a Flatiron mailing list to discuss all things Flatiron! You
can find it at:

http://groups.google.com/group/flatironjs

Flatiron is a full-stack framework for application development with node.js
sponsored by Nodejitsu, and includes components for routing urls, building
templates, managing document stores, writing plugins, building cli apps and
more! You can learn more about Flatiron at http://flatironjs.org .

So, whether you want to lend a hand and help make Flatiron great, or would
just like a hand writing your first Flatiron application, this new mailing
list is the place for you!

Hope to see you there,

-- 
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