Re: [node-dev] Re: [nodejs] Version 0.8.6 (Stable)

2012-08-07 Thread Ben Noordhuis
On Tue, Aug 7, 2012 at 9:10 PM, Matt hel...@gmail.com wrote:
 Did the libuv fix to not accept all incoming connections make it into this
 one (the one to improve cluster load balancing)?

No, it only exists in master. It's commit 9f7cdb2[1] in case you want
to back-port it.

[1] https://github.com/joyent/libuv/commit/9f7cdb2.patch


[node-dev] Re: Version 0.8.6 (Stable)

2012-08-07 Thread R i S
well done!
I know you guys are in the thick of it, and probably can't see the wood for 
the trees, but-
I would suggest, NodeJS has a massive following in the x86, x64 area, 
You probably have more (admittedly end-user types - not developers) people 
interested in the ARM arena.
V8 needs to be compiled with an x86 machine, before porting the rest to any 
ARM, 
It would be really 'nice' if you released an ARM (say ARM5) version for the 
ARM community to be able to work from as you are now trialing with the 
linux ports
thanks for reading this far.




Re: [node-dev] Re: Version 0.8.6 (Stable)

2012-08-07 Thread Nathan Rajlich
I would like to get linux-arm binaries up at some point, but they would
need to work on as many ARM devices as possible, and as Tim Caswell says,
portable arm binaries are an oxymoron. That said, if a copy of node
compiled for ARMv5 processors is the lowest common denominator for ARM
devices (I'm just getting started in this area), then maybe that would be
the way to go.

I welcome comments from more ARM-knowing people on the feasibility of this
:)

On Tue, Aug 7, 2012 at 2:56 PM, R i S hairyon...@gmail.com wrote:

 well done!
 I know you guys are in the thick of it, and probably can't see the wood
 for the trees, but-
 I would suggest, NodeJS has a massive following in the x86, x64 area,
 You probably have more (admittedly end-user types - not developers) people
 interested in the ARM arena.
 V8 needs to be compiled with an x86 machine, before porting the rest to
 any ARM,
 It would be really 'nice' if you released an ARM (say ARM5) version for
 the ARM community to be able to work from as you are now trialing with the
 linux ports
 thanks for reading this far.





[node-dev] Re: Version 0.8.6 (Stable)

2012-08-07 Thread Bry

If the binary package is an experimental feature, why was it introduced in 
an even numbered release (stable)? 

On Tuesday, August 7, 2012 3:06:36 PM UTC-4, Isaac Schlueter wrote:

 2012.08.07, Version 0.8.6 (Stable) 

 This is the first release to include binary distributions for all 
 supported Unix operating systems (Linux, Darwin, and SunOS).  To use 
 the binary distribution tarballs, you can unpack them directly into a 
 destination directory: 

 cd ~/node/ # or /usr/local if you're feeling brave 
 tar xzvf /path/to/binary.tar.gz --strip=1 

 This is an experimental feature.  Please use it and provide feedback. 

 * npm: Upgrade to v1.1.48 

 * Add 'make binary' to build binary tarballs for all Unixes (Nathan 
 Rajlich) 

 * zlib: Emit 'close' on destroy(). (Dominic Tarr) 

 * child_process: Fix stdout=null when stdio=['pipe'] (Tyler Neylon) 

 * installer: prevent ETXTBSY errors (Ben Noordhuis) 

 * installer: honor --without-npm, default install path (Ben Noordhuis) 

 * net: make pause work with connecting sockets (Bert Belder) 

 * installer: fix cross-compile installs (Ben Noordhuis) 

 * net: fix .listen({fd:0}) (Ben Noordhuis) 

 * windows: map WSANO_DATA to UV_ENOENT (Bert Belder) 


 Source Code: http://nodejs.org/dist/v0.8.6/node-v0.8.6.tar.gz 

 Macintosh Installer (Universal): 
 http://nodejs.org/dist/v0.8.6/node-v0.8.6.pkg 

 Windows Installer: http://nodejs.org/dist/v0.8.6/node-v0.8.6-x86.msi 

 Windows x64 Installer: 
 http://nodejs.org/dist/v0.8.6/x64/node-v0.8.6-x64.msi 

 Windows x64 Files: http://nodejs.org/dist/v0.8.6/x64/ 

 Linux 32-bit Binary Package: 
 http://nodejs.org/dist/v0.8.6/node-v0.8.6-linux-x86.tar.gz 

 Linux 64-bit Binary Package: 
 http://nodejs.org/dist/v0.8.6/node-v0.8.6-linux-x64.tar.gz 

 Solaris 32-bit Binary Package: 
 http://nodejs.org/dist/v0.8.6/node-v0.8.6-sunos-x86.tar.gz 

 Solaris 64-bit Binary Package: 
 http://nodejs.org/dist/v0.8.6/node-v0.8.6-sunos-x64.tar.gz 

 Other release files: http://nodejs.org/dist/v0.8.6/ 

 Website: http://nodejs.org/docs/v0.8.6/ 

 Documentation: http://nodejs.org/docs/v0.8.6/api/ 

 Shasums: 

 ``` 
 c23a57601150b3ec59aeeb0eef607d9e430e17c2  node-v0.8.6-darwin-x64.tar.gz 
 8f7e4e837f61991eff4605678ab27c82e854bc38  node-v0.8.6-darwin-x86.tar.gz 
 32ce9d28d6a294878ce9ee8f23b6fa7ecb3130e7  node-v0.8.6-linux-x64.tar.gz 
 6f71518f044705ff1a7d9400a573906a99c5834c  node-v0.8.6-linux-x86.tar.gz 
 ec9c02e9713a81d8f4848924cc38e5ed28a06fc4  node-v0.8.6-sunos-x64.tar.gz 
 ac96cc4ce3eee4dc54ef7936ad4fd8eb04fbe359  node-v0.8.6-sunos-x86.tar.gz 
 0a2aca229c9cb2ec4a4a82ff88de7ea0868d1890  node-v0.8.6-x86.msi 
 84127d73a968f5951a9682b592a79779d1396c9e  node-v0.8.6.pkg 
 34c7ad2bb5450653748c65840155852d67742258  node-v0.8.6.tar.gz 
 42f3b792326efdfc9b0d95eebd7f9f716cadb1c0  node.exe 
 fc56e816081ebef450ce7ed92bfd543d53191ac3  node.exp 
 e91f1648e4e8f7586790443248326222101c286c  node.lib 
 8106b33d1cdae69103ca07b16c7f5d690308d751  node.pdb 
 6226474859e1cf2f1314d92b6207183bb36c6007  x64/node-v0.8.6-x64.msi 
 3c1ac597956ea9f1e7eab62f85a23e3e436cd0e8  x64/node.exe 
 599df091faecff536f52d17463c70e07cf9ed54f  x64/node.exp 
 70bac4dcb9f845c8c8cb9443ff09f839fc86aac7  x64/node.lib 
 eb59a0ed841c9e93c406b4c636b2048973cbfae4  x64/node.pdb 
 ``` 



[node-dev] Re: Version 0.8.6 (Stable)

2012-08-07 Thread Isaac Schlueter
On Tue, Aug 7, 2012 at 3:07 PM, Bry brandon.add...@gmail.com wrote:

 If the binary package is an experimental feature, why was it introduced in
 an even numbered release (stable)?

Good question!

This is not really a feature of node itself, but just a feature of the
build process.

We've frequently added new build artifacts in stable release families.
 For example, adding the OS X pkg installer in 0.6.2, and a signed pkg
installer in 0.8.5, or npm in 0.6.6.

It's experimental because there may be odd edge cases we haven't
encountered.  I would not be surprised if some binary addon stopped
working because it was built in some way that it's sensitive to a
subtle difference in compiler, etc.

Building from source should work as always, of course, and the
existing binary installers for OS X and Windows have been tested
extensively.


[nodejs] mongodb client

2012-08-07 Thread Angelo Chen
Hi,

looking for for  a mongdb client, any suggestions? not so particular
about ORM. thanks,

Angelo

-- 
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] mongodb client

2012-08-07 Thread Luca Morettoni
On Tue, Aug 7, 2012 at 8:30 AM, Angelo Chen angelochen...@gmail.com wrote:
 Hi,

 looking for for  a mongdb client, any suggestions? not so particular
 about ORM. thanks,

https://github.com/christkv/node-mongodb-native
http://mongodb.github.com/node-mongodb-native/api-articles/nodekoarticle1.html

-- 
Luca Morettoni luca(AT)morettoni.net | http://www.morettoni.net
gtalk/msn: luca(AT)morettoni.net | http://twitter.com/morettoni
Google+ profile: http://bit.ly/morettoni_plus
Member of Python User Group Perugia: http://www.pypg.org/

-- 
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] mongodb client

2012-08-07 Thread Ken Koontz
https://github.com/LearnBoost/mongoose

On Mon, Aug 6, 2012 at 11:42 PM, Luca Morettoni l...@morettoni.net wrote:

 On Tue, Aug 7, 2012 at 8:30 AM, Angelo Chen angelochen...@gmail.com
 wrote:
  Hi,
 
  looking for for  a mongdb client, any suggestions? not so particular
  about ORM. thanks,

 https://github.com/christkv/node-mongodb-native

 http://mongodb.github.com/node-mongodb-native/api-articles/nodekoarticle1.html

 --
 Luca Morettoni luca(AT)morettoni.net | http://www.morettoni.net
 gtalk/msn: luca(AT)morettoni.net | http://twitter.com/morettoni
 Google+ profile: http://bit.ly/morettoni_plus
 Member of Python User Group Perugia: http://www.pypg.org/

 --
 Job Board: http://jobs.nodejs.org/
 Posting guidelines:
 https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
 You received this message because you are subscribed to the Google
 Groups nodejs group.
 To post to this group, send email to nodejs@googlegroups.com
 To unsubscribe from this group, send email to
 nodejs+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/nodejs?hl=en?hl=en


-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups nodejs group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


[nodejs] Re: mongodb client

2012-08-07 Thread Angelo Chen

looking at mongojs and mongode, too many options for mongdb.

On Aug 7, 2:42 pm, Luca Morettoni l...@morettoni.net wrote:
 On Tue, Aug 7, 2012 at 8:30 AM, Angelo Chen angelochen...@gmail.com wrote:
  Hi,

  looking for for  a mongdb client, any suggestions? not so particular
  about ORM. thanks,

 https://github.com/christkv/node-mongodb-nativehttp://mongodb.github.com/node-mongodb-native/api-articles/nodekoarti...

 --
 Luca Morettoni luca(AT)morettoni.net |http://www.morettoni.net
 gtalk/msn: luca(AT)morettoni.net |http://twitter.com/morettoni
 Google+ profile:http://bit.ly/morettoni_plus
 Member of Python User Group Perugia:http://www.pypg.org/

-- 
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: mongodb client

2012-08-07 Thread Martin Wawrusch
We use mongoose and mongoskin for testing. It really depends on your
scenario. In general though mongoose is a good choice.

On Tue, Aug 7, 2012 at 12:44 AM, Angelo Chen angelochen...@gmail.comwrote:


 looking at mongojs and mongode, too many options for mongdb.

 On Aug 7, 2:42 pm, Luca Morettoni l...@morettoni.net wrote:
  On Tue, Aug 7, 2012 at 8:30 AM, Angelo Chen angelochen...@gmail.com
 wrote:
   Hi,
 
   looking for for  a mongdb client, any suggestions? not so particular
   about ORM. thanks,
 
 
 https://github.com/christkv/node-mongodb-nativehttp://mongodb.github.com/node-mongodb-native/api-articles/nodekoarti.
 ..
 
  --
  Luca Morettoni luca(AT)morettoni.net |http://www.morettoni.net
  gtalk/msn: luca(AT)morettoni.net |http://twitter.com/morettoni
  Google+ profile:http://bit.ly/morettoni_plus
  Member of Python User Group Perugia:http://www.pypg.org/

 --
 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] How do you execute a function asynchronously?

2012-08-07 Thread Jeremy Rudd

Hi Harsh,

I did not have the time/need to try that one out. threads_a_gogo 
sounded the most useful though.


Jeremy

On 8/7/2012 2:49 AM, Harsh Dev wrote:

Hi Jeremy,
I've been looking into TAGG as well so if possible, could you give us 
an overview of what your results are/were?


Thanks,
Harsh

On Wednesday, April 11, 2012 11:15:50 PM UTC-7, Jeremy Rudd wrote:

Thanks Jorge!

Fantastic information, it sounds like threads-a-gogo is the way to
go.
I'll use it and let you all know of my results.

Thanks again!
Jeremy



--
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] UUID's in javascript

2012-08-07 Thread Ted Young
Axel, that's interesting.  I was noticing the same issue, mainly that I have to 
create uuid's in batches, in the browser, and Date.now() was not granular 
enough, so they were all getting the same prefix.  Didn't seem very useful.  
Seems like there's no way to create strong, fast uuid's in the browser, but 
probably good enough for what I'm doing.  I will run a test at some point to 
see how frequently collisions actually occur.

Ted

On Aug 7, 2012, at 7:28 AM, Axel Kittenberger axk...@gmail.com wrote:

 This is what I do to create compact 96 bit UIDs in a fast way. 4 bits
 are per 6 characters but thats ok for me.
 
 var uid = function() {
var mime 
 ='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
var ua   = [];
for(var a = 0; a  3; a++) {
var r32  = Math.floor(0x1 * Math.random());
for(var b = 0; b  6; b++) {
ua.push(mime[r32  0x3F]);
r32 = r32  6;
}
}
return ua.join('');
 };
 
 I considered adding Date(), but figured it doesnt help me at all for
 possible collisions generated in the very moment (from multiple hosts)
 It may vary on the use case but I can handle collisions well with UIDs
 generated long ago, but not with the ones created in parallell. So in
 that case the space taken by Date() is far better used by yet another
 random() entity. I also use this notation to save space rather than
 the standarized UID type 4 things.
 
 Yes it is also not cryptographically strong, but in my case that isn't
 an issue and speed is more important. Also the web clients need to be
 able to create UIDs and that cancels out a lot possibilities anyway
 that might be available in 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

-- 
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] How do you execute a function asynchronously?

2012-08-07 Thread greelgorke
If you can split your calculation to partials, like recursive approach, you 
can use process.nextTick to execute the partial asynchronously. Check out 
this example https://gist.github.com/3284767



Am Dienstag, 7. August 2012 11:28:23 UTC+2 schrieb Jeremy Rudd:

  Hi Harsh,

 I did not have the time/need to try that one out. threads_a_gogo sounded 
 the most useful though.

 Jeremy

 On 8/7/2012 2:49 AM, Harsh Dev wrote: 

 Hi Jeremy, 
 I've been looking into TAGG as well so if possible, could you give us an 
 overview of what your results are/were?

  Thanks,
 Harsh

 On Wednesday, April 11, 2012 11:15:50 PM UTC-7, Jeremy Rudd wrote: 

 Thanks Jorge! 

 Fantastic information, it sounds like threads-a-gogo is the way to go. 
 I'll use it and let you all know of my results.

 Thanks again!
 Jeremy
  
  
  

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups nodejs group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


[nodejs] Re: [libuv] silent crash on large response + closing connection from client

2012-08-07 Thread Ben Noordhuis
On Tue, Aug 7, 2012 at 6:05 AM, Felix Halim felix.ha...@gmail.com wrote:
 On Tue, Aug 7, 2012 at 3:47 AM, Ben Noordhuis i...@bnoordhuis.nl wrote:
 No, libuv (and node.js) handles that fine. Chances are high that the
 bug is in your application.

 After further investigation, valgrind says that it got a SIGPIPE:

 ==17980== Process terminating with default action of signal 13 (SIGPIPE)
 ==17980==at 0x4E380D0: __write_nocancel (syscall-template.S:82)
 ==17980==by 0x40AC30: uv__write (stream.c:430)
 ==17980==by 0x40B9BA: uv__stream_io (stream.c:752)
 ==17980==by 0x4063D2: uv__io_rw (core.c:655)
 ==17980==by 0x41B533: ev_invoke_pending (ev.c:2145)
 ==17980==by 0x405A45: uv__poll (core.c:248)
 ==17980==by 0x405A8F: uv__run (core.c:257)
 ==17980==by 0x405AED: uv_run (core.c:265)
 ==17980==by 0x405040: main (webserver.c:174)


 So my guess is that my program get signalled when the client
 prematurely terminates the connection?
 So, I should handle SIGPIPE error in my application?

Yes, that's correct. Sorry, didn't realize Ryan's example didn't
handle SIGPIPE. A `signal(SIGPIPE, SIG_IGN)` is sufficient, libuv
takes care of the rest.

I have some half-baked plans to use `sendmsg(MSG_NOSIGNAL)` instead of
`write()` but that's only a partial solution - Linux and FreeBSD
support it, Solaris and OS X don't.

-- 
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] Javascript Communities

2012-08-07 Thread ankur agarwal
Hello Everyone,

Please suggest some javascript communities/groups to share a open source
project.

-- 
Cheers !!!
Ankur Agarwal

-- 
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: Introducting Mule - A worker process pool for CPU intensive tasks

2012-08-07 Thread Tim Caswell
It's only bad form if it doesn't fit your use case.  Every situation
is different.  That's the nature of software.  I tend to write mostly
small libraries and micro-sites.  Winston is overkill for me.  I don't
know what's best for other people because I'm not in their shoes.

On Tue, Aug 7, 2012 at 12:18 AM, kuhnza david.s.k...@gmail.com wrote:
 Interesting, thanks for that...what do you think about using something like
 winston (which we currently use for all our custom stuff)? Do the same
 principle still apply, or is it bad form to use third-party logging in libs?

 Dave


 On Monday, August 6, 2012 8:45:07 PM UTC-7, Tim Caswell wrote:

 I use console.log.  I override the function when I want to redirect the
 output.

 On Mon, Aug 6, 2012 at 3:08 PM, kuhnza david.s.k...@gmail.com wrote:
  One thing I am keen to know right off the bat is what's the standard
  practice for logging within node libraries? Right now mule simply uses
  console.log but I don't think this is an ideal solution.
 
  What are others doing here?
 
 
  On Monday, August 6, 2012 10:32:52 AM UTC-7, kuhnza wrote:
 
  Hey guys  girls,
 
  First time open sourcing something for the node community. Hope some
  find
  it useful. You can get it here:
 
  https://github.com/Hubify/node-mule, or here;
  npm install mule
 
  We created it for use at Hubify after trying some of the other options
  out
  there such as Q-Oper8 and found they weren't particularly up to date or
  suited to our problem.
 
  We'd love to hear your suggestions on how it could be made it better.
 
  Cheers,
  Dave
 
  --
  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


[nodejs] RedHat/Fedora/CentOS Package Manager Update

2012-08-07 Thread Rob Hicks
Anyone know,

Are there any plans to update the RedHat/Fedora/CentOS package management 
repos to the latest stable release?

While most might do development on other platforms (I don't), when 
deploying Linux is the platform of choice.

Rob

-- 
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: Introducting Mule - A worker process pool for CPU intensive tasks

2012-08-07 Thread Matt
I prefer if you at least have a level of indirection away from console.log,
so that I can override it (or pass in a log function to a constructor of
some sort) without having to stomp on console.log.

On Mon, Aug 6, 2012 at 4:08 PM, kuhnza david.s.k...@gmail.com wrote:

 One thing I am keen to know right off the bat is what's the standard
 practice for logging within node libraries? Right now mule simply uses
 console.log but I don't think this is an ideal solution.

 What are others doing here?


 On Monday, August 6, 2012 10:32:52 AM UTC-7, kuhnza wrote:

 Hey guys  girls,

 First time open sourcing something for the node community. Hope some find
 it useful. You can get it here:

 https://github.com/Hubify/**node-mulehttps://github.com/Hubify/node-mule,
 or here;
 npm install mule

 We created it for use at Hubify http://hubify.com after trying some of
 the other options out there such as 
 Q-Oper8https://github.com/robtweed/Q-Oper8and found they weren't 
 particularly up to date or suited to our problem.

 We'd love to hear your suggestions on how it could be made it better.

 Cheers,
 Dave

  --
 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: Introducting Mule - A worker process pool for CPU intensive tasks

2012-08-07 Thread Arnout Kazemier
Just create an EventEmitter instance and emit your log events to there. People 
who then want to have logging enabled can hook up their own logging library. Or 
just listen to the emitted log messages using console.log


On Monday 6 August 2012 at 22:08, kuhnza wrote:

 One thing I am keen to know right off the bat is what's the standard practice 
 for logging within node libraries? Right now mule simply uses console.log but 
 I don't think this is an ideal solution.
 
 What are others doing here?
 
 On Monday, August 6, 2012 10:32:52 AM UTC-7, kuhnza wrote:
  Hey guys  girls,
  
  First time open sourcing something for the node community. Hope some find 
  it useful. You can get it here:
  
  https://github.com/Hubify/node-mule, or here;
  npm install mule
  
  We created it for use at Hubify (http://hubify.com) after trying some of 
  the other options out there such as Q-Oper8 
  (https://github.com/robtweed/Q-Oper8) and found they weren't particularly 
  up to date or suited to our problem.
  
  We'd love to hear your suggestions on how it could be made it better.
  
  Cheers,
  Dave 
 
 -- 
 Job Board: http://jobs.nodejs.org/
 Posting guidelines: 
 https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
 You received this message because you are subscribed to the Google
 Groups nodejs group.
 To post to this group, send email to nodejs@googlegroups.com 
 (mailto:nodejs@googlegroups.com)
 To unsubscribe from this group, send email to
 nodejs+unsubscr...@googlegroups.com 
 (mailto:nodejs+unsubscr...@googlegroups.com)
 For more options, visit this group at
 http://groups.google.com/group/nodejs?hl=en?hl=en

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups nodejs group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


[nodejs] Connect/Express Static with a prefix url

2012-08-07 Thread Gustavo Machado
Hi,

I am using the following folder structure for an expressjs website:

/app.www
/app.uploads

I would like to use the static middleware to server the files in the
app.uploads folder, but with the following prefix: /uploads:

http://localhost:3000/b.jpg -- /app.www/b.jpg
http://localhost:3000/uploads/b.jpg -- /app.uploads/b.jpg

(Obviously I would like to keep the uploads folder outside of the www folder)

Any ideas?

Thanks,
Gus

-- 
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: [libuv] silent crash on large response + closing connection from client

2012-08-07 Thread Felix Halim
On Tue, Aug 7, 2012 at 8:42 PM, Ben Noordhuis i...@bnoordhuis.nl wrote:
 On Tue, Aug 7, 2012 at 6:05 AM, Felix Halim felix.ha...@gmail.com wrote:
 On Tue, Aug 7, 2012 at 3:47 AM, Ben Noordhuis i...@bnoordhuis.nl wrote:
 No, libuv (and node.js) handles that fine. Chances are high that the
 bug is in your application.

 After further investigation, valgrind says that it got a SIGPIPE:

 ==17980== Process terminating with default action of signal 13 (SIGPIPE)
 ==17980==at 0x4E380D0: __write_nocancel (syscall-template.S:82)
 ==17980==by 0x40AC30: uv__write (stream.c:430)
 ==17980==by 0x40B9BA: uv__stream_io (stream.c:752)
 ==17980==by 0x4063D2: uv__io_rw (core.c:655)
 ==17980==by 0x41B533: ev_invoke_pending (ev.c:2145)
 ==17980==by 0x405A45: uv__poll (core.c:248)
 ==17980==by 0x405A8F: uv__run (core.c:257)
 ==17980==by 0x405AED: uv_run (core.c:265)
 ==17980==by 0x405040: main (webserver.c:174)


 So my guess is that my program get signalled when the client
 prematurely terminates the connection?
 So, I should handle SIGPIPE error in my application?

 Yes, that's correct. Sorry, didn't realize Ryan's example didn't
 handle SIGPIPE. A `signal(SIGPIPE, SIG_IGN)` is sufficient, libuv
 takes care of the rest.


Would you mind adding notes in uv.h regarding this issue, especially
for the uv_write() function.
It should say that uv_write() will silently crash if the client
terminates the connection before the uv_write's callback is called.
Unless, we handle SIGPIPE in our application by ignoring it:
signal(SIGPIPE, SIG_IGN)


 I have some half-baked plans to use `sendmsg(MSG_NOSIGNAL)` instead of
 `write()` but that's only a partial solution - Linux and FreeBSD
 support it, Solaris and OS X don't.


Does this mean, in the future, libuv will handle the SIGPIPE issue internally?
So, we don't have to handle the SIGPIPE in our application.
In the mean time, please add notes to uv.h


Felix Halim

-- 
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] RedHat/Fedora/CentOS Package Manager Update

2012-08-07 Thread Tim Caswell
I develop on linux and deploy to linux.  I just use nvm to manage my
node versions.  It's easy enough to get a compiler on all my
production boxes.  Also I've heard rumors that nodejs.org will start
distributing node binaries for linux some time in the future.

On Tue, Aug 7, 2012 at 9:28 AM, Rob Hicks r...@hixfamily.org wrote:
 Anyone know,

 Are there any plans to update the RedHat/Fedora/CentOS package management
 repos to the latest stable release?

 While most might do development on other platforms (I don't), when deploying
 Linux is the platform of choice.

 Rob

 --
 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: Introducting Mule - A worker process pool for CPU intensive tasks

2012-08-07 Thread Tim Caswell
On Tue, Aug 7, 2012 at 9:54 AM, Matt hel...@gmail.com wrote:
 I prefer if you at least have a level of indirection away from console.log,
 so that I can override it (or pass in a log function to a constructor of
 some sort) without having to stomp on console.log.

The thing is, what is the purpose of console.log?  It is a log
function after all.  If I want to write data to stdout, I use
process.stdout.write().  If I want to log something to the console, I
use console.log.  In vfs-child where I use stdout as a data channel, I
redirect console.log to stderr and all code continues working as
expected.


 On Mon, Aug 6, 2012 at 4:08 PM, kuhnza david.s.k...@gmail.com wrote:

 One thing I am keen to know right off the bat is what's the standard
 practice for logging within node libraries? Right now mule simply uses
 console.log but I don't think this is an ideal solution.

 What are others doing here?


 On Monday, August 6, 2012 10:32:52 AM UTC-7, kuhnza wrote:

 Hey guys  girls,

 First time open sourcing something for the node community. Hope some find
 it useful. You can get it here:

 https://github.com/Hubify/node-mule, or here;
 npm install mule

 We created it for use at Hubify after trying some of the other options
 out there such as Q-Oper8 and found they weren't particularly up to date or
 suited to our problem.

 We'd love to hear your suggestions on how it could be made it better.

 Cheers,
 Dave

 --
 Job Board: http://jobs.nodejs.org/
 Posting guidelines:
 https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
 You received this message because you are subscribed to the Google
 Groups nodejs group.
 To post to this group, send email to nodejs@googlegroups.com
 To unsubscribe from this group, send email to
 nodejs+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/nodejs?hl=en?hl=en


 --
 Job Board: http://jobs.nodejs.org/
 Posting guidelines:
 https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
 You received this message because you are subscribed to the Google
 Groups nodejs group.
 To post to this group, send email to nodejs@googlegroups.com
 To unsubscribe from this group, send email to
 nodejs+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/nodejs?hl=en?hl=en

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups nodejs group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


Re: [nodejs] CraftyJS, Node.js, SocketIO, V8 woes.

2012-08-07 Thread Gustavo Machado
Adam, which other ones do you recommend?

Gus

On Sun, Aug 5, 2012 at 7:41 PM, Adam Reynolds awjreyno...@gmail.com wrote:
 I know this is slightly off-topic but why did you choose crafty over the
 other game engine that are out there?

 --
 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] CraftyJS, Node.js, SocketIO, V8 woes.

2012-08-07 Thread Adam Reynolds
Well I looked at Crafty and it doesn't seem to support touch screen.

I don't think it's a wrong choice. I'm assuming you evaluated all of these
:)

EaselJS
ImpactJS
CraftyJS
MelonJS
Spaceport.io
LimeJS

On Tue, Aug 7, 2012 at 4:39 PM, Gustavo Machado machad...@gmail.com wrote:

 Adam, which other ones do you recommend?

 Gus



-- 
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] How do you handle if/else with async inside

2012-08-07 Thread Dan Milon

I am wondering which are the different patterns to handle cases like


var results
if (cond) {
  async1(function (err, res) {
results = res
  })
}
else {
  async2(function (err, res) {
results = res
  })
}
// here need to do something with results.

The problem is obvious, but i cannot see any good way to overcome it.

--
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] How do you handle if/else with async inside

2012-08-07 Thread Mark Volkmann
On Tue, Aug 7, 2012 at 11:35 AM, Dan Milon danmi...@gmail.com wrote:

 I am wondering which are the different patterns to handle cases like

 var results
 if (cond) {
   async1(function (err, res) {
 results = res
   })
 }
 else {
   async2(function (err, res) {
 results = res
   })
 }
 // here need to do something with results.

 The problem is obvious, but i cannot see any good way to overcome it.


How about this?

var results;
var fn = cond ? async1 : async2;
fn(function (err, res) {
  results = res;
  // Do something with results here.
});

-- 
R. Mark Volkmann
Object Computing, Inc.

-- 
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] How do you handle if/else with async inside

2012-08-07 Thread Martin Cooper
On Tue, Aug 7, 2012 at 9:35 AM, Dan Milon danmi...@gmail.com wrote:
 I am wondering which are the different patterns to handle cases like


 var results
 if (cond) {
   async1(function (err, res) {
 results = res
   })
 }
 else {
   async2(function (err, res) {
 results = res
   })
 }
 // here need to do something with results.

 The problem is obvious, but i cannot see any good way to overcome it.

It'll depend on the individual case, but what I'd probably do in the
specific case above is:

var asyncFn = cond ? async1 : async2
var results
asyncFn(function (err, res) {
// here need to do something with results.
})

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


Re: [nodejs] UUID's in javascript

2012-08-07 Thread Mark Hahn
My use of UUIDs as DB keys has nothing to do with security.  Just global
uniqueness.  The term UUID doesn't imply any security.

On Mon, Aug 6, 2012 at 9:29 PM, Tim Caswell t...@creationix.com wrote:

 Isaac is correct.  Date.now is pretty guessable from a security standpoint
 and so is Math.random.  I was suggesting it for cases where that's not an
 issue.
  On Aug 6, 2012 8:11 PM, Isaac Schlueter i...@izs.me wrote:

 That looks like I was responding to Mark Hahn's commnet about sorting; I
 wasn't.

 Of course it's fine to put the date on there *also*, but my point is
 merely that (Date.now() + Math.random()) is not sufficiently random to
 call it a uuid.

 On Mon, Aug 6, 2012 at 6:09 PM, Isaac Schlueter i...@izs.me wrote:
  Math.random() is not cryptographically secure entropy, and Date.now()
  is extremely guessable.  If you are worried about someone *wanting* to
  cause collisions, then that's not so great.
 
  If you don't care about the IETF, and you are writing your program in
  Node, then the simplest approach is something like:
 
  var uuid = crypto.randomBytes(24).toString('base64')
 
  To do it asynchronously (since the crypto ops are a little slow):
 
  crypto.randomBytes(24, function (er, bytes) {
var uuid = bytes.toString('base64')
  })
 
  Make the number bigger or smaller to adjust the amount of entropy.
 
  Note that IETF uuids are only 16 bytes of entropy, so if you do want
  IETF-style uuids, you can do this:
 
  var uuid = crypto.randomBytes(16).toString('hex')
  var ietfStyle = uuid.replace(/^(.{8})(.{4})(.{4})(.{4})(.{12})$/,
  '$1-$2-$3-$4-$5')
 
  I'm going to be moving npm to just use base64 random bytes for salt
  eventually, just never got around to it.
 
 
  On Mon, Aug 6, 2012 at 4:02 PM, Mark Hahn m...@hahnca.com wrote:
  The advantage of starting off with the time is that the UUIDs sort by
 order
  generated which is useful for DB ids.  Coding a time into base 36 is a
 bit
  dangerous though as it may not sort right at some time in the future.
  That
  time may be centuries from now, not sure.  Sorting by hex is known to
 be far
  in the future.
 
 
  On Mon, Aug 6, 2012 at 3:56 PM, Mark Hahn m...@hahnca.com wrote:
 
  FWIW, here is the code to exactly match couchdb.
 
  UUID = - '0' + (new Date().getTime() * 1e3).toString(16) +
  Math.floor(Math.random() * 1e18).toString(16)
 
 
  On Mon, Aug 6, 2012 at 3:43 PM, Rick Waldron waldron.r...@gmail.com
  wrote:
 
  On Mon, Aug 6, 2012 at 6:28 PM, Mark Hahn m...@hahnca.com wrote:
 
  That isn't a hack.  It is almost a copy of what couchdb offers.  I
 use
  it all the time.
 
 
  One is an IETF (RFC) and the other isn't.
 
  http://www.ietf.org/rfc/rfc4122.txt
 
 
 
  On Mon, Aug 6, 2012 at 2:17 PM, Ted Young t...@radicaldesigns.org
  wrote:
 
  Thanks for the feedback, glad to know I found the defacto solution.
  Tim, that's funny, your hack is more or less what I started with,
 but I
  became suspicious that it was too easy somehow.  Maybe I'll switch
 back to
  that if file-size/performance becomes an issue (which it won't).
 
  Ted
 
  On Aug 6, 2012, at 8:27 PM, Tim Caswell t...@creationix.com
 wrote:
 
  Depending on how strict your requirements are, I often just use:
 
   Date.now.toString(36) + - + (Math.random() *
  0x1000).toString(36)
 
  Date.now is unique every ms and Math.random has a keyspace of
 2^32, so
  collisions are statistically impossible in most practical
  applications.
 
 
  On Mon, Aug 6, 2012 at 1:01 PM, Rick Waldron 
 waldron.r...@gmail.com
  wrote:
 
 
  On Monday, August 6, 2012 at 1:38 PM, Martin Cooper wrote:
 
  On Mon, Aug 6, 2012 at 10:28 AM, Ted Young t...@radicaldesigns.org
 
  wrote:
 
  Hey y'all,
 
  So, I have a need for global unique id's. Googling about, I've
 found
  the
  following implementations that seem decent:
 
  https://github.com/broofa/node-uuid
 
 
  FWIW, this is the package that npm uses.
 
  +1
 
  I've been using Robert Keiffer's impl in projects since before it
 was
  even
  on npm—I consider it a go to
 
  Rick
 
 
  --
  Martin Cooper
 
 
  https://gist.github.com/1308368
 
  Not really sure why I would pick one over the other (besides file
  size), or
  if there are any js-specific issues I should be aware of. Any
 advice?
 
  Cheers,
 
  Ted
 
  --
  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 

Re: [nodejs] Re: Introducting Mule - A worker process pool for CPU intensive tasks

2012-08-07 Thread kuhnza
Thanks Tim. Based on what you're saying I'm leaning to just leaving the 
console.log statements in there. Though, I'm a little unclear on how you'd 
 actually go about overriding console.(log|warn|error) etc. in client code. 
Are you able to provide an example of how you'd do it?

Something like this in my client code doesn't work because my winston 
config has the console logger transport setup which consequently blows the 
call stack:

console.log = function(msg) {
  logger.info(msg);
};

Dave

On Tuesday, August 7, 2012 7:39:59 AM UTC-7, Tim Caswell wrote:

 It's only bad form if it doesn't fit your use case.  Every situation 
 is different.  That's the nature of software.  I tend to write mostly 
 small libraries and micro-sites.  Winston is overkill for me.  I don't 
 know what's best for other people because I'm not in their shoes. 

 On Tue, Aug 7, 2012 at 12:18 AM, kuhnza david.s.k...@gmail.com wrote: 
  Interesting, thanks for that...what do you think about using something 
 like 
  winston (which we currently use for all our custom stuff)? Do the same 
  principle still apply, or is it bad form to use third-party logging in 
 libs? 
  
  Dave 
  
  
  On Monday, August 6, 2012 8:45:07 PM UTC-7, Tim Caswell wrote: 
  
  I use console.log.  I override the function when I want to redirect the 
  output. 
  
  On Mon, Aug 6, 2012 at 3:08 PM, kuhnza david.s.k...@gmail.com wrote: 
   One thing I am keen to know right off the bat is what's the standard 
   practice for logging within node libraries? Right now mule simply 
 uses 
   console.log but I don't think this is an ideal solution. 
   
   What are others doing here? 
   
   
   On Monday, August 6, 2012 10:32:52 AM UTC-7, kuhnza wrote: 
   
   Hey guys  girls, 
   
   First time open sourcing something for the node community. Hope some 
   find 
   it useful. You can get it here: 
   
   https://github.com/Hubify/node-mule, or here; 
   npm install mule 
   
   We created it for use at Hubify after trying some of the other 
 options 
   out 
   there such as Q-Oper8 and found they weren't particularly up to date 
 or 
   suited to our problem. 
   
   We'd love to hear your suggestions on how it could be made it 
 better. 
   
   Cheers, 
   Dave 
   
   -- 
   Job Board: http://jobs.nodejs.org/ 
   Posting guidelines: 
   https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines 
   You received this message because you are subscribed to the Google 
   Groups nodejs group. 
   To post to this group, send email to nodejs@googlegroups.com 
   To unsubscribe from this group, send email to 
   nodejs+unsubscr...@googlegroups.com 
   For more options, visit this group at 
   http://groups.google.com/group/nodejs?hl=en?hl=en 
  
  -- 
  Job Board: http://jobs.nodejs.org/ 
  Posting guidelines: 
  https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines 
  You received this message because you are subscribed to the Google 
  Groups nodejs group. 
  To post to this group, send email to nodejs@googlegroups.com 
  To unsubscribe from this group, send email to 
  nodejs+unsubscr...@googlegroups.com 
  For more options, visit this group at 
  http://groups.google.com/group/nodejs?hl=en?hl=en 


-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups nodejs group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


Re: [nodejs] How do you handle if/else with async inside

2012-08-07 Thread Dan Milon
True, that works on this simplified case, but there is more logic, 
depending on the cond, etc.


I recall reading a blog post about having async if.
like
if (cond, trueFn, falseFn, doneFn)

That was interesting.

On 08/07/2012 07:47 PM, Mark Volkmann wrote:
On Tue, Aug 7, 2012 at 11:35 AM, Dan Milon danmi...@gmail.com 
mailto:danmi...@gmail.com wrote:


I am wondering which are the different patterns to handle cases like

var results
if (cond) {
  async1(function (err, res) {
results = res
  })
}
else {
  async2(function (err, res) {
results = res
  })
}
// here need to do something with results.

The problem is obvious, but i cannot see any good way to overcome it.


How about this?

var results;
var fn = cond ? async1 : async2;
fn(function (err, res) {
  results = res;
  // Do something with results here.
});
--
R. Mark Volkmann
Object Computing, Inc.
--
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: Introducting Mule - A worker process pool for CPU intensive tasks

2012-08-07 Thread kuhnza
Not a bad idea. Are you aware of any other libraries that do this? Trying 
to gauge how common this approach is.

On Tuesday, August 7, 2012 7:59:10 AM UTC-7, 3rdEden wrote:

 Just create an EventEmitter instance and emit your log events to there. 
 People who then want to have logging enabled can hook up their own logging 
 library. Or just listen to the emitted log messages using console.log

 On Monday 6 August 2012 at 22:08, kuhnza wrote:

 One thing I am keen to know right off the bat is what's the standard 
 practice for logging within node libraries? Right now mule simply uses 
 console.log but I don't think this is an ideal solution.

 What are others doing here?

 On Monday, August 6, 2012 10:32:52 AM UTC-7, kuhnza wrote:

 Hey guys  girls,

 First time open sourcing something for the node community. Hope some find 
 it useful. You can get it here:

 https://github.com/Hubify/node-mule, or here;
 npm install mule

 We created it for use at Hubify http://hubify.com after trying some of 
 the other options out there such as 
 Q-Oper8https://github.com/robtweed/Q-Oper8and found they weren't 
 particularly up to date or suited to our problem.

 We'd love to hear your suggestions on how it could be made it better.

 Cheers,
 Dave

  -- 
 Job Board: http://jobs.nodejs.org/
 Posting guidelines: 
 https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
 You received this message because you are subscribed to the Google
 Groups nodejs group.
 To post to this group, send email to nodejs@googlegroups.com
 To unsubscribe from this group, send email to
 nodejs+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/nodejs?hl=en?hl=en
  
  
  

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups nodejs group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


[nodejs] Re: Avro lib?

2012-08-07 Thread Bruno Jouhier
To be truly compliant with the IETF specs, you cannot just use 128 random 
bits because 6 bits are imposed in version 4 UUIDs:

Version 4 UUIDs have the form --4xxx-yxxx- where xis 
any hexadecimal digit and 
y is one of 8, 9, A, or B. 
(from 
http://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_.28random.29)

Setting these 6 bits incorrectly (randomly) will likely be harmless most of 
the time but it takes a bit more work to generate truly compliant UUIDs.

Bruno 

On Monday, August 6, 2012 12:03:01 PM UTC+2, Tj Gabbour wrote:

 Good morning!

 Any recommendations for Avro serialization/schemas? Or is it best to roll 
 my own (or use a service external to my app)?

 Thanks,
   Tj


-- 
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: Introducting Mule - A worker process pool for CPU intensive tasks

2012-08-07 Thread kuhnza
Yeah that's exactly what I'm trying to avoid too Matt. I hate it when libs 
indiscriminately fill up my logs with no easy way to control the 
verbosity/formatting of their messages.

Is there anything like SLF4J for node? That way you could simply set the 
logging implementation at the module level and be done with it.

On Tuesday, August 7, 2012 10:04:06 AM UTC-7, Matt Sergeant wrote:

 On Tue, Aug 7, 2012 at 11:28 AM, Tim Caswell t...@creationix.com wrote:

 On Tue, Aug 7, 2012 at 9:54 AM, Matt hel...@gmail.com wrote:
  I prefer if you at least have a level of indirection away from 
 console.log,
  so that I can override it (or pass in a log function to a constructor 
 of
  some sort) without having to stomp on console.log.

 The thing is, what is the purpose of console.log?  It is a log
 function after all.  If I want to write data to stdout, I use
 process.stdout.write().  If I want to log something to the console, I
 use console.log.  In vfs-child where I use stdout as a data channel, I
 redirect console.log to stderr and all code continues working as
 expected.


 OP asked what was preferred and I gave my opinion. Not everyone is going 
 to use console.log in exactly the desired way. I'm just stating what I'd 
 prefer to see.

 Plus this way if I don't want to see messages from library X but I do from 
 library Y I can do so without having to carefully grep.

 Matt.


-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups nodejs group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


Re: [nodejs] Re: Introducting Mule - A worker process pool for CPU intensive tasks

2012-08-07 Thread Arnout Kazemier
Nope most libs create their own logging libs or make it really hard to silence 
the logs. Console log statements are a pita because as a developer you really 
dont want to override build in functionality because some module is using that 
as a logger 

On 7 aug. 2012, at 18:55, kuhnza david.s.k...@gmail.com wrote:

 Not a bad idea. Are you aware of any other libraries that do this? Trying to 
 gauge how common this approach is.
 
 On Tuesday, August 7, 2012 7:59:10 AM UTC-7, 3rdEden wrote:
 Just create an EventEmitter instance and emit your log events to there. 
 People who then want to have logging enabled can hook up their own logging 
 library. Or just listen to the emitted log messages using console.log
 
 On Monday 6 August 2012 at 22:08, kuhnza wrote:
 
 One thing I am keen to know right off the bat is what's the standard 
 practice for logging within node libraries? Right now mule simply uses 
 console.log but I don't think this is an ideal solution.
 
 What are others doing here?
 
 On Monday, August 6, 2012 10:32:52 AM UTC-7, kuhnza wrote:
 
 Hey guys  girls,
 
 First time open sourcing something for the node community. Hope some find 
 it useful. You can get it here:
 
 https://github.com/Hubify/node-mule, or here;
 npm install mule
 
 We created it for use at Hubify after trying some of the other options out 
 there such as Q-Oper8 and found they weren't particularly up to date or 
 suited to our problem.
 
 We'd love to hear your suggestions on how it could be made it better.
 
 Cheers,
 Dave
 
 -- 
 Job Board: http://jobs.nodejs.org/
 Posting guidelines: 
 https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
 You received this message because you are subscribed to the Google
 Groups nodejs group.
 To post to this group, send email to nodejs@googlegroups.com
 To unsubscribe from this group, send email to
 nodejs+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/nodejs?hl=en?hl=en
 
 -- 
 Job Board: http://jobs.nodejs.org/
 Posting guidelines: 
 https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
 You received this message because you are subscribed to the Google
 Groups nodejs group.
 To post to this group, send email to nodejs@googlegroups.com
 To unsubscribe from this group, send email to
 nodejs+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/nodejs?hl=en?hl=en

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups nodejs group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


Re: [nodejs] Re: Introducting Mule - A worker process pool for CPU intensive tasks

2012-08-07 Thread Tim Caswell
I should mention that I only leave console.log statements in
production code for rare cases (like noting an http server was created
and is listening).  I try to never do it in libraries I publish
because my users might not care about that information.

I like the idea of https://github.com/visionmedia/debug for
user-configurable (via environment variables) debug logs.  Node core
has something like this built-in as well.

On Tue, Aug 7, 2012 at 12:26 PM, Arnout Kazemier i...@3rd-eden.com wrote:
 Nope most libs create their own logging libs or make it really hard to
 silence the logs. Console log statements are a pita because as a developer
 you really dont want to override build in functionality because some module
 is using that as a logger

 On 7 aug. 2012, at 18:55, kuhnza david.s.k...@gmail.com wrote:

 Not a bad idea. Are you aware of any other libraries that do this? Trying to
 gauge how common this approach is.

 On Tuesday, August 7, 2012 7:59:10 AM UTC-7, 3rdEden wrote:

 Just create an EventEmitter instance and emit your log events to there.
 People who then want to have logging enabled can hook up their own logging
 library. Or just listen to the emitted log messages using console.log

 On Monday 6 August 2012 at 22:08, kuhnza wrote:

 One thing I am keen to know right off the bat is what's the standard
 practice for logging within node libraries? Right now mule simply uses
 console.log but I don't think this is an ideal solution.

 What are others doing here?

 On Monday, August 6, 2012 10:32:52 AM UTC-7, kuhnza wrote:

 Hey guys  girls,

 First time open sourcing something for the node community. Hope some find
 it useful. You can get it here:

 https://github.com/Hubify/node-mule, or here;
 npm install mule

 We created it for use at Hubify after trying some of the other options out
 there such as Q-Oper8 and found they weren't particularly up to date or
 suited to our problem.

 We'd love to hear your suggestions on how it could be made it better.

 Cheers,
 Dave

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


Re: [nodejs] Re: Introducting Mule - A worker process pool for CPU intensive tasks

2012-08-07 Thread Matt
I agree - it's not right. It's very annoying to have libraries do no
logging at all. It's fine when they work... but when they go wrong I want
logs!

On Tue, Aug 7, 2012 at 1:30 PM, kuhnza david.s.k...@gmail.com wrote:

 That's my feeling also. Just did a quick survey of my node_modules folder
 and found that most libs in there simply don't perform any logging at all
 (or even if they once did it's been stripped out). It's almost as though
 folks have thrown it in the too hard basket and moved on. Doesn't feel
 right.

 On Tuesday, August 7, 2012 10:26:08 AM UTC-7, 3rdEden wrote:

 Nope most libs create their own logging libs or make it really hard to
 silence the logs. Console log statements are a pita because as a developer
 you really dont want to override build in functionality because some module
 is using that as a logger

 On 7 aug. 2012, at 18:55, kuhnza david.s.k...@gmail.com wrote:

 Not a bad idea. Are you aware of any other libraries that do this? Trying
 to gauge how common this approach is.

 On Tuesday, August 7, 2012 7:59:10 AM UTC-7, 3rdEden wrote:

 Just create an EventEmitter instance and emit your log events to there.
 People who then want to have logging enabled can hook up their own logging
 library. Or just listen to the emitted log messages using console.log

 On Monday 6 August 2012 at 22:08, kuhnza wrote:

 One thing I am keen to know right off the bat is what's the standard
 practice for logging within node libraries? Right now mule simply uses
 console.log but I don't think this is an ideal solution.

 What are others doing here?

 On Monday, August 6, 2012 10:32:52 AM UTC-7, kuhnza wrote:

 Hey guys  girls,

 First time open sourcing something for the node community. Hope some
 find it useful. You can get it here:

 https://github.com/Hubify/**node-mulehttps://github.com/Hubify/node-mule,
 or here;
 npm install mule

 We created it for use at Hubify http://hubify.com after trying some
 of the other options out there such as 
 Q-Oper8https://github.com/robtweed/Q-Oper8and found they weren't 
 particularly up to date or suited to our problem.

 We'd love to hear your suggestions on how it could be made it better.

 Cheers,
 Dave

  --
 Job Board: http://jobs.nodejs.org/
 Posting guidelines: https://github.com/joyent/**node/wiki/Mailing-List-*
 *Posting-Guidelineshttps://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
 You received this message because you are subscribed to the Google
 Groups nodejs group.
 To post to this group, send email to nodejs@googlegroups.com
 To unsubscribe from this group, send email to
 nodejs+unsubscribe@**googlegroups.comnodejs+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/**group/nodejs?hl=en?hl=enhttp://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-Guidelineshttps://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
 You received this message because you are subscribed to the Google
 Groups nodejs group.
 To post to this group, send email to nodejs@googlegroups.com
 To unsubscribe from this group, send email to
 nodejs+unsubscribe@**googlegroups.comnodejs+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/**group/nodejs?hl=en?hl=enhttp://groups.google.com/group/nodejs?hl=en?hl=en

  --
 Job Board: http://jobs.nodejs.org/
 Posting guidelines:
 https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
 You received this message because you are subscribed to the Google
 Groups nodejs group.
 To post to this group, send email to nodejs@googlegroups.com
 To unsubscribe from this group, send email to
 nodejs+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/nodejs?hl=en?hl=en


-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups nodejs group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


Re: [nodejs] Re: Introducting Mule - A worker process pool for CPU intensive tasks

2012-08-07 Thread kuhnza
Found this discussion on the lists from last year: 
https://groups.google.com/forum/?fromgroups#!topic/nodejs/YoHblrE8JJM but 
it appears as though the discussion stalled. 

One of the comments says it's pretty easy to re-route console output which 
is true, but what do you do in the instance that your logging framework of 
choice is also logging to console? Surely you shouldn't have to sift 
through looking for what to keep and what to throw away/reformat...or am I 
looking at this the wrong way?

On Tuesday, August 7, 2012 10:32:40 AM UTC-7, Matt Sergeant wrote:

 I agree - it's not right. It's very annoying to have libraries do no 
 logging at all. It's fine when they work... but when they go wrong I want 
 logs!

 On Tue, Aug 7, 2012 at 1:30 PM, kuhnza david.s.k...@gmail.com wrote:

 That's my feeling also. Just did a quick survey of my node_modules folder 
 and found that most libs in there simply don't perform any logging at all 
 (or even if they once did it's been stripped out). It's almost as though 
 folks have thrown it in the too hard basket and moved on. Doesn't feel 
 right.

 On Tuesday, August 7, 2012 10:26:08 AM UTC-7, 3rdEden wrote:

 Nope most libs create their own logging libs or make it really hard to 
 silence the logs. Console log statements are a pita because as a developer 
 you really dont want to override build in functionality because some module 
 is using that as a logger 

 On 7 aug. 2012, at 18:55, kuhnza david.s.k...@gmail.com wrote:

 Not a bad idea. Are you aware of any other libraries that do this? 
 Trying to gauge how common this approach is.

 On Tuesday, August 7, 2012 7:59:10 AM UTC-7, 3rdEden wrote:

 Just create an EventEmitter instance and emit your log events to there. 
 People who then want to have logging enabled can hook up their own logging 
 library. Or just listen to the emitted log messages using console.log

 On Monday 6 August 2012 at 22:08, kuhnza wrote:

 One thing I am keen to know right off the bat is what's the standard 
 practice for logging within node libraries? Right now mule simply uses 
 console.log but I don't think this is an ideal solution.

 What are others doing here?

 On Monday, August 6, 2012 10:32:52 AM UTC-7, kuhnza wrote:

 Hey guys  girls,

 First time open sourcing something for the node community. Hope some 
 find it useful. You can get it here:

 https://github.com/Hubify/**node-mulehttps://github.com/Hubify/node-mule,
  
 or here;
 npm install mule

 We created it for use at Hubify http://hubify.com after trying some 
 of the other options out there such as 
 Q-Oper8https://github.com/robtweed/Q-Oper8and found they weren't 
 particularly up to date or suited to our problem.

 We'd love to hear your suggestions on how it could be made it better.

 Cheers,
 Dave

  -- 
 Job Board: http://jobs.nodejs.org/
 Posting guidelines: https://github.com/joyent/**node/wiki/Mailing-List-
 **Posting-Guidelineshttps://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
 You received this message because you are subscribed to the Google
 Groups nodejs group.
 To post to this group, send email to nodejs@googlegroups.com
 To unsubscribe from this group, send email to
 nodejs+unsubscribe@**googlegroups.comnodejs+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/**group/nodejs?hl=en?hl=enhttp://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-Guidelineshttps://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
 You received this message because you are subscribed to the Google
 Groups nodejs group.
 To post to this group, send email to nodejs@googlegroups.com
 To unsubscribe from this group, send email to
 nodejs+unsubscribe@**googlegroups.comnodejs+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/**group/nodejs?hl=en?hl=enhttp://groups.google.com/group/nodejs?hl=en?hl=en

  -- 
 Job Board: http://jobs.nodejs.org/
 Posting guidelines: 
 https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
 You received this message because you are subscribed to the Google
 Groups nodejs group.
 To post to this group, send email to nodejs@googlegroups.com
 To unsubscribe from this group, send email to
 nodejs+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/nodejs?hl=en?hl=en




-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups nodejs group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


Re: [nodejs] How do you handle if/else with async inside

2012-08-07 Thread Daniel Rinehart
I've handled this by passing along what to do next to the async function:

var next = function(results) {};
if (cond) {
  async1(next);
} else {
  async2(next);
}

Easy to turn that into an asyncIf function if you find yourself doing
it frequently.

-- Daniel R. dani...@neophi.com [http://danielr.neophi.com/]


On Tue, Aug 7, 2012 at 12:44 PM, Dan Milon danmi...@gmail.com wrote:
 True, that works on this simplified case, but there is more logic, depending
 on the cond, etc.

 I recall reading a blog post about having async if.
 like
 if (cond, trueFn, falseFn, doneFn)

 That was interesting.

 On 08/07/2012 07:47 PM, Mark Volkmann wrote:

 On Tue, Aug 7, 2012 at 11:35 AM, Dan Milon danmi...@gmail.com
 mailto:danmi...@gmail.com wrote:

 I am wondering which are the different patterns to handle cases like

 var results
 if (cond) {
   async1(function (err, res) {
 results = res
   })
 }
 else {
   async2(function (err, res) {
 results = res
   })
 }
 // here need to do something with results.

 The problem is obvious, but i cannot see any good way to overcome it.


 How about this?

 var results;
 var fn = cond ? async1 : async2;
 fn(function (err, res) {
   results = res;
   // Do something with results here.
 });
 --
 R. Mark Volkmann
 Object Computing, Inc.
 --
 Job Board: http://jobs.nodejs.org/
 Posting guidelines:
 https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
 You received this message because you are subscribed to the Google
 Groups nodejs group.
 To post to this group, send email to nodejs@googlegroups.com
 To unsubscribe from this group, send email to
 nodejs+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/nodejs?hl=en?hl=en


 --
 Job Board: http://jobs.nodejs.org/
 Posting guidelines:
 https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
 You received this message because you are subscribed to the Google
 Groups nodejs group.
 To post to this group, send email to nodejs@googlegroups.com
 To unsubscribe from this group, send email to
 nodejs+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/nodejs?hl=en?hl=en

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups nodejs group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


Re: [nodejs] How do you handle if/else with async inside

2012-08-07 Thread Gustavo Machado
Here is one approach which is pretty interesting:
http://joseoncode.com/2012/06/24/messing-with-cps-in-js/

We are currently using iced-coffee-script in a project and I couldn't
be any happier, what you wrote would translate to:

if cod
  await trueFn defer(err, result)
else
  await falseFn defer(err, result)

#here do whatever you want with err or result.

And if you like the other notation:

await trueFn defer(err, result) if cond
await falseFn defer(err, result) unless cond

#do whatever you want with err or result

Cheers!
Gustavo

On Tue, Aug 7, 2012 at 1:44 PM, Dan Milon danmi...@gmail.com wrote:
 True, that works on this simplified case, but there is more logic, depending
 on the cond, etc.

 I recall reading a blog post about having async if.
 like
 if (cond, trueFn, falseFn, doneFn)

 That was interesting.

 On 08/07/2012 07:47 PM, Mark Volkmann wrote:

 On Tue, Aug 7, 2012 at 11:35 AM, Dan Milon danmi...@gmail.com
 mailto:danmi...@gmail.com wrote:

 I am wondering which are the different patterns to handle cases like

 var results
 if (cond) {
   async1(function (err, res) {
 results = res
   })
 }
 else {
   async2(function (err, res) {
 results = res
   })
 }
 // here need to do something with results.

 The problem is obvious, but i cannot see any good way to overcome it.


 How about this?

 var results;
 var fn = cond ? async1 : async2;
 fn(function (err, res) {
   results = res;
   // Do something with results here.
 });
 --
 R. Mark Volkmann
 Object Computing, Inc.
 --
 Job Board: http://jobs.nodejs.org/
 Posting guidelines:
 https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
 You received this message because you are subscribed to the Google
 Groups nodejs group.
 To post to this group, send email to nodejs@googlegroups.com
 To unsubscribe from this group, send email to
 nodejs+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/nodejs?hl=en?hl=en


 --
 Job Board: http://jobs.nodejs.org/
 Posting guidelines:
 https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
 You received this message because you are subscribed to the Google
 Groups nodejs group.
 To post to this group, send email to nodejs@googlegroups.com
 To unsubscribe from this group, send email to
 nodejs+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/nodejs?hl=en?hl=en

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups nodejs group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


Re: [nodejs] Re: Introducting Mule - A worker process pool for CPU intensive tasks

2012-08-07 Thread Matt
On Tue, Aug 7, 2012 at 1:58 PM, Tim Caswell t...@creationix.com wrote:

 Matt, David,

 Ignore what I said about how I use console.log, but what do you think
 about TJ's debug library?  To me it seems to solve your problems in a
 really elegant way.


Yup absolutely. And I much prefer being able to control these things with
env vars.

-- 
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: Connect/Express Static with a prefix url

2012-08-07 Thread Gustavo Machado
Thanks Andreas!

It worked like a charm, I thought I had tried that already, but I must
have done something wrong.

Thanks,
Gus

On Tue, Aug 7, 2012 at 2:02 PM, papandreou
andreaslindpeter...@gmail.com wrote:
 Hi Gus,


 Use two instances of the express.static middleware:


 var path = require('path'),

 express = require('express'),

 app = express.createServer(),

 root = '/path/to/my/app'; // Better: path.resolve(__dirname,
 'relativePath')

 app

 .use('/uploads', express.static(path.resolve(root, 'app.uploads')))
 .use(express.static(path.resolve(root, 'app.www')));


 Best regards,
 Andreas Lind Petersen (papandreou)

 On Tuesday, August 7, 2012 5:18:37 PM UTC+2, Gustavo Machado wrote:

 Hi,

 I am using the following folder structure for an expressjs website:

 /app.www
 /app.uploads

 I would like to use the static middleware to server the files in the
 app.uploads folder, but with the following prefix: /uploads:

 http://localhost:3000/b.jpg -- /app.www/b.jpg
 http://localhost:3000/uploads/b.jpg -- /app.uploads/b.jpg

 (Obviously I would like to keep the uploads folder outside of the www
 folder)

 Any ideas?

 Thanks,
 Gus

 --
 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: Introducting Mule - A worker process pool for CPU intensive tasks

2012-08-07 Thread Arnout Kazemier
debug is quite okay, but again, the problem with it is that you cannot supply 
it your own logging
instance, it writes it to console.log and console.error.

On Tuesday, August 7, 2012 at 7:58 PM, Tim Caswell wrote:

 Matt, David,
 
 Ignore what I said about how I use console.log, but what do you think
 about TJ's debug library? To me it seems to solve your problems in a
 really elegant way.
 
 On Tue, Aug 7, 2012 at 12:44 PM, kuhnza david.s.k...@gmail.com 
 (mailto:david.s.k...@gmail.com) wrote:
  Found this discussion on the lists from last year:
  https://groups.google.com/forum/?fromgroups#!topic/nodejs/YoHblrE8JJM but it
  appears as though the discussion stalled.
  
  One of the comments says it's pretty easy to re-route console output which
  is true, but what do you do in the instance that your logging framework of
  choice is also logging to console? Surely you shouldn't have to sift through
  looking for what to keep and what to throw away/reformat...or am I looking
  at this the wrong way?
  
  
  On Tuesday, August 7, 2012 10:32:40 AM UTC-7, Matt Sergeant wrote:
   
   I agree - it's not right. It's very annoying to have libraries do no
   logging at all. It's fine when they work... but when they go wrong I want
   logs!
   
   On Tue, Aug 7, 2012 at 1:30 PM, kuhnza david.s.k...@gmail.com 
   (mailto:david.s.k...@gmail.com) wrote:

That's my feeling also. Just did a quick survey of my node_modules 
folder
and found that most libs in there simply don't perform any logging at 
all
(or even if they once did it's been stripped out). It's almost as though
folks have thrown it in the too hard basket and moved on. Doesn't feel
right.

On Tuesday, August 7, 2012 10:26:08 AM UTC-7, 3rdEden wrote:
 
 Nope most libs create their own logging libs or make it really hard to
 silence the logs. Console log statements are a pita because as a 
 developer
 you really dont want to override build in functionality because some 
 module
 is using that as a logger
 
 On 7 aug. 2012, at 18:55, kuhnza david.s.k...@gmail.com 
 (mailto:david.s.k...@gmail.com) wrote:
 
 Not a bad idea. Are you aware of any other libraries that do this?
 Trying to gauge how common this approach is.
 
 On Tuesday, August 7, 2012 7:59:10 AM UTC-7, 3rdEden wrote:
  
  Just create an EventEmitter instance and emit your log events to 
  there.
  People who then want to have logging enabled can hook up their own 
  logging
  library. Or just listen to the emitted log messages using 
  console.log
  
  On Monday 6 August 2012 at 22:08, kuhnza wrote:
  
  One thing I am keen to know right off the bat is what's the standard
  practice for logging within node libraries? Right now mule simply 
  uses
  console.log but I don't think this is an ideal solution.
  
  What are others doing here?
  
  On Monday, August 6, 2012 10:32:52 AM UTC-7, kuhnza wrote:
  
  Hey guys  girls,
  
  First time open sourcing something for the node community. Hope some
  find it useful. You can get it here:
  
  https://github.com/Hubify/node-mule, or here;
  npm install mule
  
  We created it for use at Hubify after trying some of the other 
  options
  out there such as Q-Oper8 and found they weren't particularly up to 
  date or
  suited to our problem.
  
  We'd love to hear your suggestions on how it could be made it 
  better.
  
  Cheers,
  Dave
  
  --
  Job Board: http://jobs.nodejs.org/
  Posting guidelines:
  https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
  You received this message because you are subscribed to the Google
  Groups nodejs group.
  To post to this group, send email to nodejs@googlegroups.com 
  (mailto:nodejs@googlegroups.com)
  To unsubscribe from this group, send email to
  nodejs+unsubscr...@googlegroups.com 
  (mailto:nodejs+unsubscr...@googlegroups.com)
  For more options, visit this group at
  http://groups.google.com/group/nodejs?hl=en?hl=en
  
 
 --
 Job Board: http://jobs.nodejs.org/
 Posting guidelines:
 https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
 You received this message because you are subscribed to the Google
 Groups nodejs group.
 To post to this group, send email to nodejs@googlegroups.com 
 (mailto:nodejs@googlegroups.com)
 To unsubscribe from this group, send email to
 nodejs+unsubscr...@googlegroups.com 
 (mailto:nodejs+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 

Re: [nodejs] Re: Introducting Mule - A worker process pool for CPU intensive tasks

2012-08-07 Thread kuhnza
TJ's lib looks alright, having the option to control via environment 
variables is probably an acceptable solution.

This discussion has led me to delve a little deeper into the winston source 
code and I think there's a problem there for which I've raised an 
issue/pull request on GitHub 
(https://github.com/flatiron/winston/issues/162). To your original point 
Tim I think I should be able to override console.log without nasty side 
effects and redirect those messages to my logging implementation of choice. 
The current implementation of winston makes that impossible.

Maybe that combined with some environment vars to suppress logging is the 
way to go?

On Tuesday, August 7, 2012 11:31:18 AM UTC-7, 3rdEden wrote:

 debug is quite okay, but again, the problem with it is that you cannot 
 supply it your own logging
 instance, it writes it to console.log and console.error.

 On Tuesday, August 7, 2012 at 7:58 PM, Tim Caswell wrote:

 Matt, David,

 Ignore what I said about how I use console.log, but what do you think
 about TJ's debug library? To me it seems to solve your problems in a
 really elegant way.

 On Tue, Aug 7, 2012 at 12:44 PM, kuhnza david.s.k...@gmail.com wrote:

 Found this discussion on the lists from last year:
 https://groups.google.com/forum/?fromgroups#!topic/nodejs/YoHblrE8JJM but 
 it
 appears as though the discussion stalled.

 One of the comments says it's pretty easy to re-route console output which
 is true, but what do you do in the instance that your logging framework of
 choice is also logging to console? Surely you shouldn't have to sift 
 through
 looking for what to keep and what to throw away/reformat...or am I looking
 at this the wrong way?


 On Tuesday, August 7, 2012 10:32:40 AM UTC-7, Matt Sergeant wrote:


 I agree - it's not right. It's very annoying to have libraries do no
 logging at all. It's fine when they work... but when they go wrong I want
 logs!

 On Tue, Aug 7, 2012 at 1:30 PM, kuhnza david.s.k...@gmail.com wrote:


 That's my feeling also. Just did a quick survey of my node_modules folder
 and found that most libs in there simply don't perform any logging at all
 (or even if they once did it's been stripped out). It's almost as though
 folks have thrown it in the too hard basket and moved on. Doesn't feel
 right.

 On Tuesday, August 7, 2012 10:26:08 AM UTC-7, 3rdEden wrote:


 Nope most libs create their own logging libs or make it really hard to
 silence the logs. Console log statements are a pita because as a developer
 you really dont want to override build in functionality because some module
 is using that as a logger

 On 7 aug. 2012, at 18:55, kuhnza david.s.k...@gmail.com wrote:

 Not a bad idea. Are you aware of any other libraries that do this?
 Trying to gauge how common this approach is.

 On Tuesday, August 7, 2012 7:59:10 AM UTC-7, 3rdEden wrote:


 Just create an EventEmitter instance and emit your log events to there.
 People who then want to have logging enabled can hook up their own logging
 library. Or just listen to the emitted log messages using console.log

 On Monday 6 August 2012 at 22:08, kuhnza wrote:

 One thing I am keen to know right off the bat is what's the standard
 practice for logging within node libraries? Right now mule simply uses
 console.log but I don't think this is an ideal solution.

 What are others doing here?

 On Monday, August 6, 2012 10:32:52 AM UTC-7, kuhnza wrote:

 Hey guys  girls,

 First time open sourcing something for the node community. Hope some
 find it useful. You can get it here:

 https://github.com/Hubify/node-mule, or here;
 npm install mule

 We created it for use at Hubify after trying some of the other options
 out there such as Q-Oper8 and found they weren't particularly up to date or
 suited to our problem.

 We'd love to hear your suggestions on how it could be made it better.

 Cheers,
 Dave

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

[nodejs] Re: How do you handle if/else with async inside

2012-08-07 Thread Bruno Jouhier
Pattern 1:

  if (cond) results = async1(_);
  else results = async2(_);

Pattern 2:

  results = cond ? async1(_) : async2(_);

See https://github.com/Sage/streamlinejs for details.

On Tuesday, August 7, 2012 6:35:20 PM UTC+2, Dan Milon wrote:

 I am wondering which are the different patterns to handle cases like 


 var results 
 if (cond) { 
async1(function (err, res) { 
  results = res 
}) 
 } 
 else { 
async2(function (err, res) { 
  results = res 
}) 
 } 
 // here need to do something with results. 

 The problem is obvious, but i cannot see any good way to overcome it. 


-- 
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] Version 0.8.6 (Stable)

2012-08-07 Thread Isaac Schlueter
2012.08.07, Version 0.8.6 (Stable)

This is the first release to include binary distributions for all
supported Unix operating systems (Linux, Darwin, and SunOS).  To use
the binary distribution tarballs, you can unpack them directly into a
destination directory:

cd ~/node/ # or /usr/local if you're feeling brave
tar xzvf /path/to/binary.tar.gz --strip=1

This is an experimental feature.  Please use it and provide feedback.

* npm: Upgrade to v1.1.48

* Add 'make binary' to build binary tarballs for all Unixes (Nathan Rajlich)

* zlib: Emit 'close' on destroy(). (Dominic Tarr)

* child_process: Fix stdout=null when stdio=['pipe'] (Tyler Neylon)

* installer: prevent ETXTBSY errors (Ben Noordhuis)

* installer: honor --without-npm, default install path (Ben Noordhuis)

* net: make pause work with connecting sockets (Bert Belder)

* installer: fix cross-compile installs (Ben Noordhuis)

* net: fix .listen({fd:0}) (Ben Noordhuis)

* windows: map WSANO_DATA to UV_ENOENT (Bert Belder)


Source Code: http://nodejs.org/dist/v0.8.6/node-v0.8.6.tar.gz

Macintosh Installer (Universal): http://nodejs.org/dist/v0.8.6/node-v0.8.6.pkg

Windows Installer: http://nodejs.org/dist/v0.8.6/node-v0.8.6-x86.msi

Windows x64 Installer: http://nodejs.org/dist/v0.8.6/x64/node-v0.8.6-x64.msi

Windows x64 Files: http://nodejs.org/dist/v0.8.6/x64/

Linux 32-bit Binary Package:
http://nodejs.org/dist/v0.8.6/node-v0.8.6-linux-x86.tar.gz

Linux 64-bit Binary Package:
http://nodejs.org/dist/v0.8.6/node-v0.8.6-linux-x64.tar.gz

Solaris 32-bit Binary Package:
http://nodejs.org/dist/v0.8.6/node-v0.8.6-sunos-x86.tar.gz

Solaris 64-bit Binary Package:
http://nodejs.org/dist/v0.8.6/node-v0.8.6-sunos-x64.tar.gz

Other release files: http://nodejs.org/dist/v0.8.6/

Website: http://nodejs.org/docs/v0.8.6/

Documentation: http://nodejs.org/docs/v0.8.6/api/

Shasums:

```
c23a57601150b3ec59aeeb0eef607d9e430e17c2  node-v0.8.6-darwin-x64.tar.gz
8f7e4e837f61991eff4605678ab27c82e854bc38  node-v0.8.6-darwin-x86.tar.gz
32ce9d28d6a294878ce9ee8f23b6fa7ecb3130e7  node-v0.8.6-linux-x64.tar.gz
6f71518f044705ff1a7d9400a573906a99c5834c  node-v0.8.6-linux-x86.tar.gz
ec9c02e9713a81d8f4848924cc38e5ed28a06fc4  node-v0.8.6-sunos-x64.tar.gz
ac96cc4ce3eee4dc54ef7936ad4fd8eb04fbe359  node-v0.8.6-sunos-x86.tar.gz
0a2aca229c9cb2ec4a4a82ff88de7ea0868d1890  node-v0.8.6-x86.msi
84127d73a968f5951a9682b592a79779d1396c9e  node-v0.8.6.pkg
34c7ad2bb5450653748c65840155852d67742258  node-v0.8.6.tar.gz
42f3b792326efdfc9b0d95eebd7f9f716cadb1c0  node.exe
fc56e816081ebef450ce7ed92bfd543d53191ac3  node.exp
e91f1648e4e8f7586790443248326222101c286c  node.lib
8106b33d1cdae69103ca07b16c7f5d690308d751  node.pdb
6226474859e1cf2f1314d92b6207183bb36c6007  x64/node-v0.8.6-x64.msi
3c1ac597956ea9f1e7eab62f85a23e3e436cd0e8  x64/node.exe
599df091faecff536f52d17463c70e07cf9ed54f  x64/node.exp
70bac4dcb9f845c8c8cb9443ff09f839fc86aac7  x64/node.lib
eb59a0ed841c9e93c406b4c636b2048973cbfae4  x64/node.pdb
```

-- 
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] Version 0.8.6 (Stable)

2012-08-07 Thread Matt
Did the libuv fix to not accept all incoming connections make it into this
one (the one to improve cluster load balancing)?

On Tue, Aug 7, 2012 at 3:06 PM, Isaac Schlueter i...@izs.me wrote:

 2012.08.07, Version 0.8.6 (Stable)

 This is the first release to include binary distributions for all
 supported Unix operating systems (Linux, Darwin, and SunOS).  To use
 the binary distribution tarballs, you can unpack them directly into a
 destination directory:

 cd ~/node/ # or /usr/local if you're feeling brave
 tar xzvf /path/to/binary.tar.gz --strip=1

 This is an experimental feature.  Please use it and provide feedback.

 * npm: Upgrade to v1.1.48

 * Add 'make binary' to build binary tarballs for all Unixes (Nathan
 Rajlich)

 * zlib: Emit 'close' on destroy(). (Dominic Tarr)

 * child_process: Fix stdout=null when stdio=['pipe'] (Tyler Neylon)

 * installer: prevent ETXTBSY errors (Ben Noordhuis)

 * installer: honor --without-npm, default install path (Ben Noordhuis)

 * net: make pause work with connecting sockets (Bert Belder)

 * installer: fix cross-compile installs (Ben Noordhuis)

 * net: fix .listen({fd:0}) (Ben Noordhuis)

 * windows: map WSANO_DATA to UV_ENOENT (Bert Belder)


 Source Code: http://nodejs.org/dist/v0.8.6/node-v0.8.6.tar.gz

 Macintosh Installer (Universal):
 http://nodejs.org/dist/v0.8.6/node-v0.8.6.pkg

 Windows Installer: http://nodejs.org/dist/v0.8.6/node-v0.8.6-x86.msi

 Windows x64 Installer:
 http://nodejs.org/dist/v0.8.6/x64/node-v0.8.6-x64.msi

 Windows x64 Files: http://nodejs.org/dist/v0.8.6/x64/

 Linux 32-bit Binary Package:
 http://nodejs.org/dist/v0.8.6/node-v0.8.6-linux-x86.tar.gz

 Linux 64-bit Binary Package:
 http://nodejs.org/dist/v0.8.6/node-v0.8.6-linux-x64.tar.gz

 Solaris 32-bit Binary Package:
 http://nodejs.org/dist/v0.8.6/node-v0.8.6-sunos-x86.tar.gz

 Solaris 64-bit Binary Package:
 http://nodejs.org/dist/v0.8.6/node-v0.8.6-sunos-x64.tar.gz

 Other release files: http://nodejs.org/dist/v0.8.6/

 Website: http://nodejs.org/docs/v0.8.6/

 Documentation: http://nodejs.org/docs/v0.8.6/api/

 Shasums:

 ```
 c23a57601150b3ec59aeeb0eef607d9e430e17c2  node-v0.8.6-darwin-x64.tar.gz
 8f7e4e837f61991eff4605678ab27c82e854bc38  node-v0.8.6-darwin-x86.tar.gz
 32ce9d28d6a294878ce9ee8f23b6fa7ecb3130e7  node-v0.8.6-linux-x64.tar.gz
 6f71518f044705ff1a7d9400a573906a99c5834c  node-v0.8.6-linux-x86.tar.gz
 ec9c02e9713a81d8f4848924cc38e5ed28a06fc4  node-v0.8.6-sunos-x64.tar.gz
 ac96cc4ce3eee4dc54ef7936ad4fd8eb04fbe359  node-v0.8.6-sunos-x86.tar.gz
 0a2aca229c9cb2ec4a4a82ff88de7ea0868d1890  node-v0.8.6-x86.msi
 84127d73a968f5951a9682b592a79779d1396c9e  node-v0.8.6.pkg
 34c7ad2bb5450653748c65840155852d67742258  node-v0.8.6.tar.gz
 42f3b792326efdfc9b0d95eebd7f9f716cadb1c0  node.exe
 fc56e816081ebef450ce7ed92bfd543d53191ac3  node.exp
 e91f1648e4e8f7586790443248326222101c286c  node.lib
 8106b33d1cdae69103ca07b16c7f5d690308d751  node.pdb
 6226474859e1cf2f1314d92b6207183bb36c6007  x64/node-v0.8.6-x64.msi
 3c1ac597956ea9f1e7eab62f85a23e3e436cd0e8  x64/node.exe
 599df091faecff536f52d17463c70e07cf9ed54f  x64/node.exp
 70bac4dcb9f845c8c8cb9443ff09f839fc86aac7  x64/node.lib
 eb59a0ed841c9e93c406b4c636b2048973cbfae4  x64/node.pdb
 ```

 --
 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: mongodb client

2012-08-07 Thread john.tiger

On 08/07/2012 01:48 AM, Martin Wawrusch wrote:
We use mongoose and mongoskin for testing. It really depends on your 
scenario. In general though mongoose is a good choice.


it is if you want to specify schema or use ORM - otherwise 
mongo-node-native is the defacto node mongo driver and works pretty well 
- it requires you to write a lot of callbacks, but that's life in the 
async world.






On Tue, Aug 7, 2012 at 12:44 AM, Angelo Chen angelochen...@gmail.com 
mailto:angelochen...@gmail.com wrote:



looking at mongojs and mongode, too many options for mongdb.

On Aug 7, 2:42 pm, Luca Morettoni l...@morettoni.net
mailto:l...@morettoni.net wrote:
 On Tue, Aug 7, 2012 at 8:30 AM, Angelo Chen
angelochen...@gmail.com mailto:angelochen...@gmail.com wrote:
  Hi,

  looking for for  a mongdb client, any suggestions? not so
particular
  about ORM. thanks,



https://github.com/christkv/node-mongodb-nativehttp://mongodb.github.com/node-mongodb-native/api-articles/nodekoarti...

 --
 Luca Morettoni luca(AT)morettoni.net http://morettoni.net
|http://www.morettoni.net
 gtalk/msn: luca(AT)morettoni.net http://morettoni.net
|http://twitter.com/morettoni
 Google+ profile:http://bit.ly/morettoni_plus
 Member of Python User Group Perugia:http://www.pypg.org/

--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups nodejs group.
To post to this group, send email to nodejs@googlegroups.com
mailto:nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
mailto:nodejs%2bunsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en






--
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines

You received this message because you are subscribed to the Google
Groups nodejs group.
To post to this group, send email to nodejs@googlegroups.com
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] RedHat/Fedora/CentOS Package Manager Update

2012-08-07 Thread Rob Hicks
Hi Tim.

Thanks for the note. Nodejs.org already has 
binarieshttps://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager.
 
My complaint is they are old. 

I'll look into nvm. 

Rob

On Tuesday, August 7, 2012 9:25:29 AM UTC-6, Tim Caswell wrote:

 I develop on linux and deploy to linux.  I just use nvm to manage my 
 node versions.  It's easy enough to get a compiler on all my 
 production boxes.  Also I've heard rumors that nodejs.org will start 
 distributing node binaries for linux some time in the future. 

 On Tue, Aug 7, 2012 at 9:28 AM, Rob Hicks r...@hixfamily.org wrote: 
  Anyone know, 
  
  Are there any plans to update the RedHat/Fedora/CentOS package 
 management 
  repos to the latest stable release? 
  
  While most might do development on other platforms (I don't), when 
 deploying 
  Linux is the platform of choice. 
  
  Rob 
  
  -- 
  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] RedHat/Fedora/CentOS Package Manager Update

2012-08-07 Thread Tim Caswell
On Tue, Aug 7, 2012 at 2:23 PM, Rob Hicks r...@hixfamily.org wrote:
 Hi Tim.

 Thanks for the note. Nodejs.org already has binaries. My complaint is they
 are old.

The binaries I was speaking of are in the dist folder.  They are quite
fresh, I assure you. http://nodejs.org/dist/


 I'll look into nvm.

nvm compiles from source at any released source tarball version.  Also
you can compile manually and install in the nvm area and it will
manage the custom builds for you.

I hope to soon add binary release support for nvm as well for newer
versions of node that have *nix binaries.

 Rob


 On Tuesday, August 7, 2012 9:25:29 AM UTC-6, Tim Caswell wrote:

 I develop on linux and deploy to linux.  I just use nvm to manage my
 node versions.  It's easy enough to get a compiler on all my
 production boxes.  Also I've heard rumors that nodejs.org will start
 distributing node binaries for linux some time in the future.

 On Tue, Aug 7, 2012 at 9:28 AM, Rob Hicks r...@hixfamily.org wrote:
  Anyone know,
 
  Are there any plans to update the RedHat/Fedora/CentOS package
  management
  repos to the latest stable release?
 
  While most might do development on other platforms (I don't), when
  deploying
  Linux is the platform of choice.
 
  Rob
 
  --
  Job Board: http://jobs.nodejs.org/
  Posting guidelines:
  https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
  You received this message because you are subscribed to the Google
  Groups nodejs group.
  To post to this group, send email to nodejs@googlegroups.com
  To unsubscribe from this group, send email to
  nodejs+unsubscr...@googlegroups.com
  For more options, visit this group at
  http://groups.google.com/group/nodejs?hl=en?hl=en

 --
 Job Board: http://jobs.nodejs.org/
 Posting guidelines:
 https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
 You received this message because you are subscribed to the Google
 Groups nodejs group.
 To post to this group, send email to nodejs@googlegroups.com
 To unsubscribe from this group, send email to
 nodejs+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/nodejs?hl=en?hl=en

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups nodejs group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


Re: [nodejs] Version 0.8.6 (Stable)

2012-08-07 Thread Peter Tribble
On Tue, Aug 7, 2012 at 8:06 PM, Isaac Schlueter i...@izs.me wrote:
 2012.08.07, Version 0.8.6 (Stable)

 This is the first release to include binary distributions for all
 supported Unix operating systems (Linux, Darwin, and SunOS).

Nice!

The SunOS binaries are only for modern versions (presumably
Illumos and derivatives and maybe Solaris 11); it would be handy
to know exactly where they're expected to work.

For Solaris 10 (x86 only, not sparc, as people occasionally ask)
I've got my packages available here:

http://www.petertribble.co.uk/Solaris/node.html

-- 
-Peter Tribble
http://www.petertribble.co.uk/ - http://ptribble.blogspot.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] Re: loading static files named 'server.js'

2012-08-07 Thread Roly Fentanes
That looks like a compile error. What does the stack trace look like? I 
doubt the error is coming from server.js

On Tuesday, August 7, 2012 12:39:28 PM UTC-7, yishayw wrote:

 Hi,

 I have a site which uses a library with a static file named server.js. 
 Node.js seems to be treating this as a file which needs to be interpreted 
 on the server side rather than a static file. Hence, I get an error: 
 'Uncaught 
 SyntaxError: Unexpected token  '

 Is there any way around this? 

 I created a small example of the problem with code snippets below.

 Thanks in advance,
 Yishay

 Here's my server code:

 

 /**
  * Module dependencies.
  */
  var express = require('express')
   , routes = require('./routes');
  var app = module.exports = express.createServer();
  // Configuration
  
 app.configure(function(){
   app.set('views', __dirname + '/views');
   app.set('view engine', 'jade');
   app.use(express.bodyParser());
   app.use(express.methodOverride());
   app.use(app.router);
   app.use(express.static(__dirname + '/public'));});
  
 app.configure('development', function(){
   app.use(express.errorHandler({ dumpExceptions: true, showStack: true }));});
  
 app.configure('production', function(){
   app.use(express.errorHandler());});
  // Routes
  
 app.get('/', routes.index);
  
 app.listen(process.env.port || 3000);
 console.log(Express server listening on port %d in %s mode, 
 app.address().port, app.settings.env);


 

 My index.html (under public/index.html)

 ==

 !DOCTYPE html
  html lang=en
 head
 meta charset=utf-8 /
 title/title
 /head
 body
 script src=Server.js/script
 hello
 /body/html


 ===


 And Server.js which is under the same dir


 ===


 alert('serving');


 ===





-- 
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] webinos app contest

2012-08-07 Thread Andreas M. Botsikas
Hi all,
 
webinos is a cross device platform built entirely on top of node js and is 
organizing an application competition so I thought of sharing this with you 
just in case you want to do a summer project and win some cool prizes.
 
More info at http://bit.ly/webinoscomp
 
Thanks in advance for your participations and good luck,
 
Andreas

-- 
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] webinos app contest

2012-08-07 Thread rektide
On Tue, Aug 07, 2012 at 01:10:39PM -0700, Andreas M. Botsikas wrote:
Hi all,

webinos is a cross device platform built entirely on top of node js and is
organizing an application competition so I thought of sharing this with
you just in case you want to do a summer project and win some cool prizes.

More info at [1]http://bit.ly/webinoscomp

From the site:

 What are the cool prizes then?

 We're cross-screen so we stay true to our word! We'll throw in a mix of
 state-of-the-art mobile handsets, tablets and uber-cool android-on-a-stick
 devices. Stay tuned for more details in the comming days!

Make it a BMW and I'll build you the best damned app ever.

Any way you want to lend me one to prototype out my application?

This banter is of course appropriate, as due this cause:
http://dev.webinos.org/specifications/draft/vehicle.html


Just to co-plug ya'll, since you're gonna hook me up with an 2014 M5 now,

Webinos is _awesome_ stuff. So, portable JavaScript sandbox for apps and 
services,
awesome, but, you ask, didn't Es, WebOS, Google Extensions,  soon Tizen all do 
the
same thing?

The killer feature for me is the Personal Zone Proxy, which turns Webinos into 
a fully
connected service mesh overlay of all your devices and services, wherever you 
go. I
submitted my own internetworking challenge to Knight's Network Challenge for a 
similar
construct, 
http://newschallenge1.tumblr.com/post/19482119635/extend-dbus-internetworking-to-the-www

, more protocol oriented (DBus) than your blind-runtime-just-makes-it system, 
but
the idea is near and dear to my heart, and to I think the omni-connected 
ubicomp nerd posse
out there. I haven't done any hardcore in depth review on Webinos's 
architecture in the past
month or two, but webinos goes really far with this concept, there are Personal 
Zone Hubs
which is a central relay for a perons's available Servies, and Personal Zone 
Proxies PZP
which form satellites to make all your Personal Hub services available, and you 
can talk to
other PZP's. There are Applications which can use anything in your Personal 
Zone. It's all
some very cool overlay/ internetworking tech, I think there may be provisions 
for sharing of
services across users beyond the core across device sharing it has. All to make 
a slick
cross device JavaScript runtime for Applications using Services found across 
devices.

Or, something to that effect. Andreas or anyone, is it possible to share 
services between
users? Can't remember what inter-user activity is possible.

Everyeone: Participate or no, I think everyone owes it to themself to check out 
some Webinos.

Ok, way late for the nerdiest of nerdy meetups, our regular EVE Online meetup. 
Cya all
later, 
-rektide

PS: https://plus.google.com/113218107235105855584/posts is my G+. JS, Ubicomp, 
hardware,
space,  writing at least as good/brain meltingly horrible as the above. Say hi.

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups nodejs group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


[nodejs] Re: Version 0.8.6 (Stable)

2012-08-07 Thread R i S
well done!
I know you guys are in the thick of it, and probably can't see the wood for 
the trees, but-
I would suggest, NodeJS has a massive following in the x86, x64 area, 
You probably have more (admittedly end-user types - not developers) people 
interested in the ARM arena.
V8 needs to be compiled with an x86 machine, before porting the rest to any 
ARM, 
It would be really 'nice' if you released an ARM (say ARM5) version for the 
ARM community to be able to work from as you are now trialing with the 
linux ports
thanks for reading this far.


-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups nodejs group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


[nodejs] Re: [node-dev] Re: Version 0.8.6 (Stable)

2012-08-07 Thread Nathan Rajlich
I would like to get linux-arm binaries up at some point, but they would
need to work on as many ARM devices as possible, and as Tim Caswell says,
portable arm binaries are an oxymoron. That said, if a copy of node
compiled for ARMv5 processors is the lowest common denominator for ARM
devices (I'm just getting started in this area), then maybe that would be
the way to go.

I welcome comments from more ARM-knowing people on the feasibility of this
:)

On Tue, Aug 7, 2012 at 2:56 PM, R i S hairyon...@gmail.com wrote:

 well done!
 I know you guys are in the thick of it, and probably can't see the wood
 for the trees, but-
 I would suggest, NodeJS has a massive following in the x86, x64 area,
 You probably have more (admittedly end-user types - not developers) people
 interested in the ARM arena.
 V8 needs to be compiled with an x86 machine, before porting the rest to
 any ARM,
 It would be really 'nice' if you released an ARM (say ARM5) version for
 the ARM community to be able to work from as you are now trialing with the
 linux ports
 thanks for reading this far.




-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups nodejs group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


[nodejs] Re: [node-dev] Re: Version 0.8.6 (Stable)

2012-08-07 Thread R i S
honestly - my preference is for the A10 (or A13) chip
you can load linux - then nodejs then you js code onto a memory stick and 
the A10 boots from the stick (either USB or SD)
The A10 is available in a number of tablets, and the brilliant MK802 stick.
If you want a device to try it on - tell me and I will arrange for a number 
of devices (using the A10) sent to you
There are probably 50 'JS hackers' out there for each programmer, and ARM 
devices are cheap and run JS really well

If you want some devices to test on - tell me - hairyone42 at gmail

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups nodejs group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


[nodejs] Re: How do you handle if/else with async inside

2012-08-07 Thread Andy
I would personally go with using promises.

var q = require('q');
q.ncall(function() {
   if(cond) {
   return async1(); // this is a promise
   }
   return async2(); // so is this
}).then(function(res) {
   // hooray! one of them finished
}).error(function(res) {
// something went wrong!
});

-- 
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: Simple Memcached server in Javascript with 100 lines of code

2012-08-07 Thread junyi sun
Hi guys, I have updated the code. Now, it is not just a memory store. With
LRU code added, it become a real Cache Daemon.

You can review the code here: https://gist.github.com/3291755

It still has many places to improve. Any idea to improve the LRU algorithm
or memory management?  please let me know, Thanks.


On Sat, Aug 4, 2012 at 9:04 PM, junyi sun ccnu...@gmail.com wrote:

 Thanks you all.

 I have tested my code with mc-benchamrk, and I started the server like
 this:

 node --nouse_idle_notification memcached.js


 The benchmark score is:

 == SET ==

  100 requests completed in 24.53 seconds

  50 parallel clients

 3 bytes payload

 keep alive: 1

 77.58% = 1 milliseconds

 99.95% = 2 milliseconds

 99.96% = 3 milliseconds

 99.99% = 4 milliseconds

 100.00% = 5 milliseconds

  40766.41 requests per second


 == GET ==

  100 requests completed in 23.54 seconds

  50 parallel clients

  3 bytes payload

  keep alive: 1

 0.00% = 0 milliseconds

 82.48% = 1 milliseconds

  99.97% = 2 milliseconds

  99.98% = 3 milliseconds

 99.99% = 4 milliseconds

 100.00% = 5 milliseconds

 42479.08 requests per second



 On Sat, Aug 4, 2012 at 9:35 AM, Jimb Esser wastel...@gmail.com wrote:

 Best thing to try, add --nouse_idle_notification to the node command
 line, this disables the full garbage collects when node tells V8 it thinks
 its idle, but V8's garbage collection it does on every allocation should
 still take care of collecting garbage.  Give that a try, watch the RSS in
 top or your favorite process monitor to make sure it's still garbage
 collecting (doesn't just leak), and hopefully the stalls will also go away.
  We found this totally eliminated the giant garbage collect stalls and did
 not noticeably impact process memory usage in our application.


 On Thursday, August 2, 2012 11:48:15 PM UTC-7, sunjoy wrote:

 Hi guys,

 I am studying node.js. It is a wonderful utility to write network-based
 application.

 Now, I have written a memcached server using node.js.  You can have a
 look at https://gist.github.com/**3244607https://gist.github.com/3244607

 I tested the program, and found it could reach 12000/s throughput.
 However, during the test, I found sometimes the speed suddenly decreased
 due to the GC pause from my mind.


 Is there a way to improve my code ?



 Thanks

 Junyi


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