[nodejs] Re: reload a child_process if the process die unexpectedly?

2012-03-22 Thread mscdex
On Mar 22, 12:51 am, dshaw ds...@dshaw.com wrote: var exec = require('child_process').exec; exec's callback is executed when the process exits. spawn() is what emits the exit event. or instead of using spawn, just call respawn() inside exec's callback. Simplest way to respawn with spawn(): var

Re: [nodejs] Re: NodeConf 2012

2012-03-22 Thread Dan Shaw
I'm sure they will be. Last years videos can be found here: http://blip.tv/jsconf Daniel Shaw @dshaw -- Job Board: http://jobs.nodejs.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: NodeConf 2012

2012-03-22 Thread Alexey Petrushin
Yep, it would be nice to have recorded videos. On Wednesday, March 21, 2012 3:20:51 AM UTC+4, weyus wrote: All, I found out that there is apparently going to be a Node.js conference in Portland this summer. Is there any other information about it besides what is shown here:

[nodejs] Is there any way to control the distribution of request to workers in cluster?

2012-03-22 Thread darcy
When using cluster module, the requests from different connections are distributed to workers randomly, which inconvenience the summary of client ip. Is there any way to distribute request from the same ip to fixed worker process? Or in future versions? I think it's useful in some cases. --

Re: [nodejs] Is there any way to control the distribution of request to workers in cluster?

2012-03-22 Thread Ryan Schmidt
On Mar 22, 2012, at 05:29, darcy wrote: which inconvenience the summary of client ip It does what? -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the

Re: [nodejs] node-inspector and v8

2012-03-22 Thread Jorge
On Mar 22, 2012, at 3:05 PM, Ben Noordhuis wrote: On Wed, Mar 21, 2012 at 21:27, Maurits mauritslam...@gmail.com wrote: Hi all, I have been fighting a memory leak in my node server application for some time, but as node-inspector cannot handle the memory snapshots at the moment with the

Re: [nodejs] Snooping on event queue?

2012-03-22 Thread Ben Noordhuis
On Thu, Mar 22, 2012 at 05:03, C. Mundi cmu...@gmail.com wrote: I may have seen evidence that I could overflow event queues.  I rewrote my code to avoid the problem.  (The code was a horrible mess anyway.).  But I'm curious, especially after reading the Minimalist OS thread, to know what kit

Re: [nodejs] Re: Make errors: Linux ia32, for node-v0.6.6 and node-v0.4.8

2012-03-22 Thread Ben Noordhuis
On Thu, Mar 22, 2012 at 04:35, Dmitry Bochkarev dimabochka...@gmail.com wrote: but without tls support node useless. 1) download opnessl sources from openssl.org 2) ./config shared 3) cd ../node-v0.6.13 4) export PYTHON=python2.4;export CC=/usr/bin/gcc4;export CXX=/usr/ bin/g++4;./configure

Re: [nodejs] Isolates removed [threads_a_gogo] updated

2012-03-22 Thread alFReD NSH
I have tried threads_a_gogo for something, didn't find anything wrong about it and it's much easier to use than forking or clustering for some cases. On Wednesday, 21 March 2012 18:24:13 UTC+8, Jorge wrote: On Mar 13, 2012, at 2:14 PM, Jorge wrote: On Feb 3, 2012, at 10:28 PM, Isaac

Re: [nodejs] stdout/stderr blocking

2012-03-22 Thread C. Mundi
Bummer. I never thought about that, but it makes sense now that I do. One more reason not to rely on stdin/stdout for stuff I don't want interrupted I guess. On Mar 22, 2012 7:21 AM, Ben Noordhuis i...@bnoordhuis.nl wrote: On Thu, Mar 22, 2012 at 05:37, C. Mundi cmu...@gmail.com wrote:

Re: [nodejs] stdout/stderr blocking

2012-03-22 Thread Matt
I think it's just a reason not to rely on running your process interactively in a production environment. Use runit or forever or some other backgrounding solution. I have no idea why people are getting their pants in a knot over ctrl-s pausing a process. On Thu, Mar 22, 2012 at 10:55 AM, C.

Re: [nodejs] Snooping on event queue?

2012-03-22 Thread Ben Noordhuis
On Thu, Mar 22, 2012 at 16:08, C. Mundi cmu...@gmail.com wrote: Glad you asked.  I mean the node user-space events that we connect to with listeners, like emitted.on('eventname',...).  What I'd like is a tool which can snoop by walking the whole queue for 'eventname' without dequeuing any

[nodejs] Node-soap args

2012-03-22 Thread loom3
New to node and soap. Trying a simple test with node-soap: var url = 'http://www.webservicex.net/periodictable.asmx?WSDL'; var args = {ElementName:'Hydrogen'}; soap.createClient(url, function(err, client) { console.log(JSON.stringify(client.describe()));

Re: [nodejs] stdout/stderr blocking

2012-03-22 Thread Dan North
A couple of events can't be trapped (KILL and STOP) so you'll never receive events for those. -Original Message- From: C. Mundi cmu...@gmail.com Sender: nodejs@googlegroups.com Date: Wed, 21 Mar 2012 21:37:12 To: nodejs@googlegroups.com Reply-To: nodejs@googlegroups.com Subject: Re:

Re: [nodejs] stdout/stderr blocking

2012-03-22 Thread C. Mundi
Well and plainly spoken, Matt. I use upstart (don't even get me going on forever). I will admit that I sometimes pound out an interactive tool out of expedience and that it would be nice to suppress some signals as a guard against my fat fingers, but that's an informed choice and not any

Re: [nodejs] stdout/stderr blocking

2012-03-22 Thread Ilya Dmitrichenko
don't even get me going on forever = +1k! -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to

Re: [nodejs] node-inspector and v8

2012-03-22 Thread billywhizz
yes. +1 for node-inspector in core. it's a really useful tool and is a pain to have to install it separately... -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to

Re: [nodejs] getting key/value pair from json object

2012-03-22 Thread Mark Hahn
areas = [{news:1}, {story:1}] console.log areas for e, i of areas console.log e console.log i On Thu, Mar 22, 2012 at 4:09 AM, Ryan Schmidt google-2...@ryandesign.comwrote: On Mar 22, 2012, at 05:58, Angelo Chen wrote: var areas = [{news:1}, {story:1}] console.log(areas)

[nodejs] html with swf file served by nodejs

2012-03-22 Thread s j
Hello, When i embed a swf file on an html file, and try to serve it through node js server, the swf file doesn't appear. how can i fix this? (*the callhttpservice.html file has the swf embedded on it, attached is the html page)* var fs = require('fs'); var server =

Re: [nodejs] node-inspector and v8

2012-03-22 Thread Camilo Aguilar
I think we are talking about including bindings to v8-profiler in nodejs core, which make complete sense to me, and shouldn't require a lot of effort if we re-use webkit bindings. In this scenario node-inspector will be replaced by the web inspector that comes by default in webkit and node will

Re: [nodejs] node-inspector and v8

2012-03-22 Thread Camilo Aguilar
I'm also willing to write and/or port these bindings to nodejs. On Thu, Mar 22, 2012 at 1:33 PM, Camilo Aguilar cam...@cloudescape.comwrote: I think we are talking about including bindings to v8-profiler in nodejs core, which make complete sense to me, and shouldn't require a lot of effort if

[nodejs] NodeJS Best Practices and Multi channel guidelines by Photon's Phresco

2012-03-22 Thread Senthil kumar
NodeJS Best Practices and Multi channel guidelines by Photon's Phresco Framework http://www.youtube.com/watch?v=Svnh-A5ZjOg Thanks Senthil -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message

Re: [nodejs] Snooping on event queue?

2012-03-22 Thread C. Mundi
Ben, that's at least part of the solution. I have seen a situation where I am sure an event has been emitted and sure that a listener is (already) registered, but the listener never executes. More precisely, I think I may have managed to overwhelm the queue for a particular event. I've done

Re: [nodejs] stdout/stderr blocking

2012-03-22 Thread C. Mundi
I wasn't trying to practice Zen...it just happened. :) On Mar 22, 2012 9:56 AM, Ilya Dmitrichenko errordevelo...@gmail.com wrote: don't even get me going on forever = +1k! -- Job Board: http://jobs.nodejs.org/ Posting guidelines:

Re: [nodejs] node-inspector and v8

2012-03-22 Thread Camilo Aguilar
fwiw, the remote protocol doesn't seem to support profiling yet On Thu, Mar 22, 2012 at 1:35 PM, Camilo Aguilar cam...@cloudescape.comwrote: I'm also willing to write and/or port these bindings to nodejs. On Thu, Mar 22, 2012 at 1:33 PM, Camilo Aguilar cam...@cloudescape.comwrote: I think

[nodejs] Re: Shred HTTP library for Node.js and Browsers

2012-03-22 Thread Steven Campbell
This looks nice. Can you contrast it with the request module that I am currently using on the server-side? (Obviously the browser-side thing is a distinguishing feature, so besides that)... On Friday, January 20, 2012 2:09:17 PM UTC-6, Nicolas LaCasse wrote: Shred v0.7 has been released.

Re: [nodejs] Re: Shred HTTP library for Node.js and Browsers

2012-03-22 Thread Mikeal Rogers
Actually, @substack figured out a way to get request in the browser using browserify. It will eventually get merged in to request proper. On Mar 22, 2012, at March 22, 201211:16 AM, Steven Campbell wrote: This looks nice. Can you contrast it with the request module that I am currently using

Re: [nodejs] html with swf file served by nodejs

2012-03-22 Thread Nathan Rajlich
Your http server is currently hard-coded to serve the callhttpservice.html file, regardless of what url was actually requested. You should be looking into using a web framework like express (and the static() middleware) to serve static files properly for you. On Thu, Mar 22, 2012 at 9:50 AM, s j

Re: [nodejs] getting key/value pair from json object

2012-03-22 Thread C. Mundi
I got tired of having to do this over and over. So here's a little thing I wrote just for fun. Recursive depth-first preorder traversal for objects and arrays. I hacked this out pretty quickly from some real code, so you might^H^H^H^H^H will find bugs. Not sure how deep the JS stack but I

Re: [nodejs] getting key/value pair from json object

2012-03-22 Thread Ryan Schmidt
On Mar 22, 2012, at 12:12, Mark Hahn wrote: areas = [{news:1}, {story:1}] console.log areas for e, i of areas console.log e console.log i You've just rewritten the original non-working JavaScript code in CoffeeScript. My code, which you quoted, worked. -- Job Board:

Re: [nodejs] getting key/value pair from json object

2012-03-22 Thread Andy
node var a = {node: 1, cow: {moo: 'barf'}}; require('sys').inspect(a); '{ node: 1, cow: { moo: \'barf\' } }' sys.inspect probably is all you ever need. Also, my logger library does auto object inspecting on log, which I find pretty handy. https://github.com/DelvarWorld/Simple-Node-Logger --

Re: [nodejs] Re: minimalist OS for web server: Raspberry Pi?

2012-03-22 Thread AJ ONeal
On Thu, Mar 22, 2012 at 2:14 PM, AJ ONeal coola...@gmail.com wrote: On Mar 21, 3:36 pm, AJ ONeal coola...@gmail.com wrote: I can see that setTimeout is actually losing events (console.log before, after, and inside), but I'm still trying to reproduce it without the heavy io load. What

Re: [nodejs] Re: [ANN] reified, Binary Data API for Node + Browsers. Powerful, easy to use, and performance conscious. ES6 binary data spec inspired.

2012-03-22 Thread Oliver Leics
Found it: var message = new Message(new reified.Buffer(buffer)); and for SlowBuffer: var message = new Message(new reified.Buffer(Array.prototype.slice(buffer, 0))); Thank you again for this library. -- Job Board: http://jobs.nodejs.org/ Posting guidelines:

Re: [nodejs] Re: [ANN] reified, Binary Data API for Node + Browsers. Powerful, easy to use, and performance conscious. ES6 binary data spec inspired.

2012-03-22 Thread Brandon Benvie
Hmm I'll take a look because it should have worked with initializing only the buffer with var message = new Message(buffer). I changed out the to using the new buffer code last night which may have caused an issue, although it was passing all the tests so I'm not sure what the issue is. --

Re: [nodejs] Re: [ANN] reified, Binary Data API for Node + Browsers. Powerful, easy to use, and performance conscious. ES6 binary data spec inspired.

2012-03-22 Thread Brandon Benvie
Oh I see, it looks like the buffer is indeed to fault. It's filling buffers with zero's when you initialize with another type of buffer when it converts it internally to a DataBuffer (reified's internal Buffer class) On Thursday, March 22, 2012 6:04:56 PM UTC-4, Brandon Benvie wrote: Hmm I'll

Re: [nodejs] Snooping on event queue?

2012-03-22 Thread Ben Noordhuis
On Thu, Mar 22, 2012 at 18:52, C. Mundi cmu...@gmail.com wrote: Ben, that's at least part of the solution.  I have seen a situation where I am sure an event has been emitted and sure that a listener is (already) registered, but the listener never executes.  More precisely, I think I may have

[nodejs] coffeescript with nodejs tutorial

2012-03-22 Thread Angelo Chen
Hi, I'd like to code something in coffeescript for a nodejs project, there is no need to complete in CS, just some service type modules, and I searched this group, see a lot of discussions, what I'm looking for is just a 'hello world' type tutorial that can get me started asap, any like this?

[nodejs] Re: html with swf file served by nodejs

2012-03-22 Thread s j
First of all thanks for replying. Can you direct me to a link that talks about using web frameworks and nodejs? thanks again for your help On Thursday, March 22, 2012 9:50:17 AM UTC-7, s j wrote: Hello, When i embed a swf file on an html file, and try to serve it through node js server,

[nodejs] Komodo 7.0.2 released with improved support for Node

2012-03-22 Thread Todd Whiteman
Hi all. I’m the lead developer for Komodo Edit (the free open-source editor) and Komodo IDE at ActiveState. I wanted to announce that the newest versions of Komodo, 7.0.2, have just been released. If you've had issues with previous versions, try Komodo 7.0.2 as we have fixed breakpoint problems

[nodejs] Re: html with swf file served by nodejs

2012-03-22 Thread s j
Thanks for your help, everything is fine now On Thursday, March 22, 2012 5:06:32 PM UTC-7, s j wrote: First of all thanks for replying. Can you direct me to a link that talks about using web frameworks and nodejs? thanks again for your help On Thursday, March 22, 2012 9:50:17 AM UTC-7,

[nodejs] just curious ...

2012-03-22 Thread Mark Hahn
... did everyone on this list get an email titled Impressed – Want to Work With You? It mentions that they saw me on this forum. It seems kind of like a form-letter. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines

Re: [nodejs] coffeescript with nodejs tutorial

2012-03-22 Thread Mark Hahn
I assume you checked out the coffeescript website? On Thu, Mar 22, 2012 at 4:59 PM, Angelo Chen angelochen...@gmail.comwrote: Hi, I'd like to code something in coffeescript for a nodejs project, there is no need to complete in CS, just some service type modules, and I searched this group,

Re: [nodejs] Komodo 7.0.2 released with improved support for Node

2012-03-22 Thread Mark Hahn
You don't support coffeescript yet, do you? On Thu, Mar 22, 2012 at 6:09 PM, Todd Whiteman tod...@activestate.comwrote: Hi all. I’m the lead developer for Komodo Edit (the free open-source editor) and Komodo IDE at ActiveState. I wanted to announce that the newest versions of Komodo, 7.0.2,

[nodejs] Re: Komodo 7.0.2 released with improved support for Node

2012-03-22 Thread Bradley Meck
I use it and love it! Wish it had profiler integration, but other than that it is wonderful. Code completion is good, and all the extensibility lets you do some fancy stuff. Cheers, Bradley On Thursday, March 22, 2012 8:09:39 PM UTC-5, Todd Whiteman wrote: Hi all. I’m the lead developer for

[nodejs] Internship for node-webkit at Intel Open Source Technology Center

2012-03-22 Thread Roger WANG
(Apologies if this violates any posting guidelines for this list) We are looking for local Interns for the node-webkit¹ project in Shanghai, China. node-webkit is a project which brings WebKit to Node platform and opens a new way of writing native application with Web technologies. The job role

Re: [nodejs] Snooping on event queue?

2012-03-22 Thread C. Mundi
Wow. That is concise. I don't recall ever seeing that error, but I could have missed in among a lot of debugging output. Thanks! On Mar 22, 2012 3:14 PM, Ben Noordhuis i...@bnoordhuis.nl wrote: On Thu, Mar 22, 2012 at 18:52, C. Mundi cmu...@gmail.com wrote: Ben, that's at least part of the

Re: [nodejs] getting key/value pair from json object

2012-03-22 Thread C. Mundi
I could readily be proved wrong, but I assume the OP actually intends to do something in addition to printing the data. At least that's why I wrote a walker...because I wished that util.inspect could take an action on each node. My 'real' code takes a function which actually rewrites nodes using

Re: [nodejs] Is there any way to control the distribution of request to workers in cluster?

2012-03-22 Thread darcy
In my case, limiting the connections and requests from same ip. In other cases, such as some data should be shared between all connections from same ip. 在 2012年3月22日星期四UTC+8下午6时33分40秒,ryandesign写道: On Mar 22, 2012, at 05:29, darcy wrote: which inconvenience the summary of client ip It

Re: [nodejs] Re: reload a child_process if the process die unexpectedly?

2012-03-22 Thread C. Mundi
That's useful and also an opportunity to ask questions. These respawn() functions are recursive and, in particular, tail recursive (or could be assuming no sneaky side effects). So (a) how is the depth of the node stack set, and (b) does node support any tail recursion elimination? Granted, if

Re: [nodejs] Request for feedback: Native addon memory management

2012-03-22 Thread Matt Gollob
Great! Thanks so much :) -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to

[nodejs] Re: reload a child_process if the process die unexpectedly?

2012-03-22 Thread mscdex
On Mar 22, 11:20 pm, C. Mundi cmu...@gmail.com wrote: These respawn() functions are recursive and, in particular, tail recursive (or could be assuming no sneaky side effects).  So (a) how is the depth of the node stack set, and (b) does node support any tail recursion elimination? The effect

Re: [nodejs] Re: authentication scheme / model

2012-03-22 Thread deitch
Yeah, rolled my own too, because: a) I wanted it independent of actual password storage b) Wanted authorization as a middleware with a *ton* of flexibility but still easy to use c) Wanted it to store sessions across servers So I rolled my own and published it as cansecurity

[nodejs] Re: coffeescript with nodejs tutorial

2012-03-22 Thread Ian Young
It depends how comfortable you are with JavaScript. If you're fairly experienced with JavaScript, reading http://coffeescript.org/ should get you a pretty good overview of the language and how it differs - enough to get you started. You can implement simple hello-world examples written for

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

2012-03-22 Thread Louis Santillan
Ever hear of TurboVision or Curses? -L On Friday, January 27, 2012, Tim Caswell t...@creationix.com wrote: Ok, now you've tempted me to make a gui toolkit for the terminal. Watch out, I might write a non-sdl usb gamepad interface too. On Thu, Jan 26, 2012 at 12:55 PM, Nathan Rajlich

[nodejs] mongoose-amqp-plugin

2012-03-22 Thread James Carr
Hey All, On a recent project I wanted to publish one of my mongoose models to rabbitMQ to be routed to a java application that needed to do something whenever one of my models changed. So I just put together a new plugin that publishes messages to an amqp broker whenever the model is saved or