Re: [nodejs] Possible to select globally installed module over locally install one?

2015-09-13 Thread Sam Roberts
On Sun, Sep 13, 2015 at 1:21 AM, Zlatko wrote: > What do you mean, they're not requireable? They aren't. > [zlatko@zlatko-mint /tmp]$ npm i -G express > \ > [...cut...] You misspelled -g as -G, npm ignored you, and installed it locally. :-) Do an "ls node_modules/express", and you

Re: [nodejs] Possible to select globally installed module over locally install one?

2015-09-12 Thread Sam Roberts
On Thu, Sep 10, 2015 at 2:51 PM, Bgsosh wrote: > When there is both a globally locally installed version of a module, does > anyone know if it is possible to require() the global version, over the > local one? Global modules are misnamed, they are only scripts that you intend to run, they are NEV

Re: [nodejs] Node-gyp build error

2015-08-02 Thread Sam Roberts
> make: *** No rule to make target `Release/obj.target/example/example.o', You didn't provide your binding.gyp or a description of your source file names, but it looks like your .gyp file expects to be building an example.cpp into an example.o, and then an example.node. Do you have an example.cc?

Re: [nodejs] RSA Crypto ?

2015-07-15 Thread Sam Roberts
On Wed, Jul 15, 2015 at 9:02 AM, Aaron Gray wrote: > Does native node.js have RSA encryption functions at all ? https://iojs.org/api/crypto.html#crypto_crypto_publicencrypt_public_key_buffer etc. also, sign/verify > The node library gives blowfish, why does it not give > RSA ? RSA is not a sym

[nodejs] If a parent doesn't take a callback, but its children do, will the parent be ran asynchronously?

2015-07-12 Thread sam
``` /* somewhere deep inside a module... */ var token = Tokens.create(); pair(email, token); send(email, token); ``` ``` /* in another module */ Tokens.create = function() { crypto.randomBytes(48, function(ex, buf) { var token = buf.toString('hex'); return token; }) } ``` Will the `

Re: [nodejs] Limit and handling of spawning child_process of ffmpeg

2015-07-06 Thread Sam Roberts
'-r', (1/3), '-an', '-y', '-update', '1', '1.jpg' ]; var ff = []; console.log('ffmpeg %s', args.join(' ')); for (var i = 0; i < 10; i++) { var c = spawn('ffmpeg', args, {std

Re: [nodejs] JSON safe size

2015-07-05 Thread Sam Roberts
On Sun, Jul 5, 2015 at 5:45 PM, Ω Alisson wrote: > What would you guys consider the maximum "safe" size for a JSON string to be > parsed without blocking the event loop? Every single line of javascript "blocks" the event loop, in some sense. cpu intensive activity isn't a binary: blocking vs non-

Re: [nodejs] Limit and handling of spawning child_process of ffmpeg

2015-07-05 Thread Sam Roberts
On Sun, Jul 5, 2015 at 7:53 PM, Matt wrote: > On Sun, Jul 5, 2015 at 6:12 PM, Sam Roberts wrote: >> On Mon, Jun 29, 2015 at 10:37 AM, Matt wrote: >> > You've exhausted the threadpool. Try setting the UV_THREADPOOL_SIZE env >> > var >> > higher a

Re: [nodejs] Re: How to handle multiple, dynamically created listeners to a single ChildProcess in NodeJS?

2015-07-05 Thread Sam Roberts
none of your code shows the definition of `io`, so its not possible to comment. On Sun, Jun 28, 2015 at 10:03 AM, Konrad Moskal wrote: > I have already found out that this should be a reasonable solution, right? > :) > > //foobar.js > worker.on('message', function(responseData) { > // assuming

Re: [nodejs] node-dogstatsd increment and incrementBy Function

2015-07-05 Thread Sam Roberts
by values greater than/less than 1, that calculation would be meaningless. Sam -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines ---

Re: [nodejs] long-running node process unexpectedly exits without error

2015-07-05 Thread Sam Roberts
uld give an indication of why node is exiting, and what happened in terms of system calls just before the exit. The output will be copious, of course, but you only care about the end! :-) Sam -- http://StrongLoop.com makes it easy to develop APIs in Node, plus get DevOps capabilities like mon

Re: [nodejs] Limit and handling of spawning child_process of ffmpeg

2015-07-05 Thread Sam Roberts
Can you provide minimal code to reproduce this problem? I could try and build it from your example, but don't have time, if you gave me a snippet I could just run, I would, and could see what your issue is. On Mon, Jun 29, 2015 at 10:37 AM, Matt wrote: > You've exhausted the threadpool. Try sett

Re: [nodejs] Node Cluster scheduling policy | Load Balancing for Read Scalability

2015-06-23 Thread Sam Roberts
On Sun, Jun 21, 2015 at 9:51 PM, Emerson Rocha Luiz wrote: > So, on this type of load balancing (workers scheduling policy based on > WRITE/READ request), is possible use node-cluster? node-cluster is for "symetrical" servers: ones in which each server is identical. For routing requests based on

Re: [nodejs] Need help reading ancillary messages from unix domain socket

2015-06-23 Thread Sam Roberts
On Tue, Jun 23, 2015 at 3:09 AM, prerak jain wrote: > I have a server which needs to run multiple process on 443 port, for that I > have a proxy server which will actually listen on 443 port and based on the > TLS Client Hello server name(SNI) field it forwards the socket fds to the > respective p

[nodejs] Streaming Videos with nodejs

2015-05-09 Thread Sam
I have tried to stream videos with node like youtube with the help html5. -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines --- You recei

Re: [nodejs] Re: learning javascript or jumping straight to Node.js

2015-02-24 Thread Sam Roberts
On Sun, Feb 22, 2015 at 11:27 PM, Suk Khoi wrote: > i am 12+ yrs of development vb,asp and asp.net, but i was using JavaScript > for validation and alerts thats it, iam reading books loudly understanding > little, Browser-based js books make it look worse than it is in node. For example, the biza

Re: [nodejs] Re: learning javascript or jumping straight to Node.js

2015-02-23 Thread Sam Roberts
On Thu, Feb 19, 2015 at 9:36 AM, mgutz wrote: > I think learning javascript in the browser first is easier. I think you are a front-end developer, Mario! I've never written a line of front-end js, I learned node directly. Well, first I spent about a day reviewing js syntax/semantics, ignoring al

Re: [nodejs] Make error

2015-02-17 Thread Sam Roberts
On Fri, Feb 13, 2015 at 3:59 AM, Mikael Mollberg wrote: > Hi. I tried installing node.js on my linux machine today but it gave me an > error. Why not use the pre-compiled binaries? > ./configure > make > sudo make test Don't use sudo. -- Job board: http://jobs.nodejs.org/ New group rules: ht

Re: [nodejs] NPM and sudo

2015-01-05 Thread Sam Roberts
e any module, pretty much. So, don't use install-time package scripts. But, other people might use them. And maybe you won't know... until you finally track down a mysterious bug, and realize that its because the install or post-install script didn't actually work. Cheers, Sam --

Re: [nodejs] NPM and sudo

2015-01-05 Thread Sam Roberts
On Mon, Jan 5, 2015 at 2:43 PM, Aria Stewart wrote: > >> On Jan 5, 2015, at 5:22 PM, Sam Roberts wrote: >> >> On Mon, Jan 5, 2015 at 12:54 PM, Aria Stewart wrote: >>>> If you are setting up a production machine, probably best to install >>>> node a

Re: [nodejs] NPM and sudo

2015-01-05 Thread Sam Roberts
By latest, you mean fixed in npm2? npm2 is pretty much mandatory on Windows, the pain of not using it is greater than any risk, but I've been a bit reluctant to recommend Linux user's upgrade to it in production. Maybe unreasonably reluctant. But once 0.12 is out the world will start

Re: [nodejs] NPM and sudo

2015-01-05 Thread Sam Roberts
On Sun, Jan 4, 2015 at 9:51 AM, Christopher Rust wrote: > Maybe it's common but I've never heard of anyone chowning /usr/local to > their main user. Let me introduce you to Isaac Schlueter: http://foohack.com/2010/08/intro-to-npm/ And almost everyone I know. If you are setting up a production m

Re: [nodejs] TCP server not closing properly when using cluster

2014-12-28 Thread Sam Roberts
tures of cluster. This code won't be portable across v0.10 and v0.11/0.12, but if you poke around in the cluster master's undocumented internal properties, I think you can find the data structures it uses to store the server sockets. If you can get the handles, you can close them yourself.

Re: [nodejs] TCP server not closing properly when using cluster

2014-12-24 Thread Sam Roberts
has giant caveats when used in other ways. Such as opening a TCP server, and closing it, but not exiting the cluster... which is what you are doing, is an edge case. Is this actually causing you problems, or did it just surprise you when poking around? Why are trying to close a TCP server, but not e

Re: [nodejs] which framework to use (express, meteor or koa)

2014-12-22 Thread Sam Roberts
On Mon, Dec 22, 2014 at 10:44 AM, Alexander Praetorius wrote: > @Sam > > how would you compare sailsjs to loopback, because i agree with you, that > the metrics i chose are lacking, but its also to so easy to compare... I would compare by features relevant to intended use. And I ag

Re: [nodejs] which framework to use (express, meteor or koa)

2014-12-21 Thread Sam Roberts
at the same time giving you the opportunity, once you've developed your own preferences, to swap out components once you discover the areas where specialization is truly important to you or your app. That's my two bits, Sam -- Job board: http://jobs.nodejs.org/ New group rules: htt

Re: [nodejs] Cluster question

2014-12-16 Thread Sam Roberts
On Wed, Dec 10, 2014 at 8:15 PM, Ω Alisson wrote: > Interesting Sam, but what if I set a flag that is checked every > process.nextTick You will eat 100% CPU, rather than waiting on event from the master saying that its time to go away, and being able to do the cleanup you want: > suspe

Re: [nodejs] 0.12 intro?

2014-12-16 Thread Sam Roberts
On Tue, Dec 16, 2014 at 11:20 AM, // ravi wrote: > Rather than the more common “please sir may I have some 0.12?”, I want to ask > if anyone better informed than I am wants to take a shot, for the edification > of the list, at introducing 0.12 to us? What’s new, what’s exciting… v8 > features a

Re: [nodejs] Windows Forever Cluster Issue

2014-12-10 Thread Sam Roberts
ver is doing something, like spawning a child that triggers windows to spawn a console, then that alone won't help, and more info about what your code does will be needed. And your node version, etc. Sam -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23

Re: [nodejs] Cluster question

2014-12-10 Thread Sam Roberts
redis clients. LIke yours, likely. You can trap the disconnect message if you are willing to use node internals: https://gist.github.com/sam-github/8185222 node cluster should really expose that event, IMO, but so it goes, for the moment. Most supervisors, strongloops's included, offe

Re: [nodejs] What's the best version of npm to use?

2014-12-07 Thread Sam Roberts
IMO, npm1 from node v0.10 works ok on linux/os x. On Windows, though, I'd say npm2 is mandatory. I consistently see Windows issues cleared away by updating to npm2, major bugs were fixed. -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-modera

Re: [nodejs] Re: cwd option in child_process.spawn

2014-11-20 Thread Sam Roberts
On Wed, Nov 19, 2014 at 3:13 PM, Rajasekhar Chinnam wrote: > Found the issue: > > Now 'arguments' should be array not string. 1. arguments hasn't been a string EVER in 0.10, can't speak to before 2. if arguments is NOT an array in position args[1], it was assumed you had not passed the optional a

Re: [nodejs] cwd option in child_process.spawn

2014-11-20 Thread Sam Roberts
On Wed, Nov 19, 2014 at 12:01 PM, Rajasekhar Chinnam wrote: > I am running node on Windows. The 'cwd' option of the child_process.spawn > method is ignored after upgrading to node to '0.10.29'. Do you have a complete reproduction? Because I don't think you can spawn test.bat on windows (you can

Re: [nodejs] fs.fchmod on a socket

2014-11-17 Thread Sam Roberts
On Mon, Nov 17, 2014 at 5:24 AM, Tim Kuijsten wrote: > I'd like to make a UNIX domain socket world writable after I've chrooted. > But I have two problems. > > Using fs.open on a socket throws errno: -1, code: 'UNKNOWN'. > > I've also tried to get a handle using net.connect: > > var socket = net.c

Re: [nodejs] does node actually use process.config.variables?

2014-11-14 Thread Sam Roberts
On Wed, Nov 12, 2014 at 1:40 AM, Andreas Marschke wrote: > Ah too bad. Is there another way to modify the runtime env during runtime? What do you mean by runtime env? What do you want to modify? Most things in process.config (all?) are immutable: you can't change the gcc version node was compiled

Re: [nodejs] privilege separation

2014-11-03 Thread Sam Roberts
On Mon, Nov 3, 2014 at 11:00 AM, Tim Kuijsten wrote: >> Tim, is your server storing passwords in plain text? If so, that's >> probably your biggest security problem. > > Hi Sam, yes, but I'll use a file that only the superuser can read. That's what i meant,

Re: [nodejs] Which version of node built node_modules

2014-11-03 Thread Sam Roberts
* an `npm rebuild -g`... but right now I've a find script that looks for .gyp files. Works OK. I know when I change node versions. Sam -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://githu

Re: [nodejs] privilege separation

2014-11-03 Thread Sam Roberts
On Mon, Nov 3, 2014 at 6:58 AM, Tim Kuijsten wrote: > Matt schreef op 02-11-14 om 22:01: >> Having said that, it's not a terrible idea to implement this kind of >> thing, it just seems like you may be over-thinking it. It's far more >> important to get the basics of security right in your applicat

Re: [nodejs] Which version of node built node_modules

2014-10-31 Thread Sam Roberts
On Fri, Oct 31, 2014 at 5:26 AM, Ryan Schmidt wrote: > Is there a way to determine, by inspecting the node_modules directory in some > way or by running some npm command, what version of node built the modules > therein, especially the binary modules? You might be able to see by running nm on t

Re: [nodejs] Re: To check node_modules or not

2014-10-31 Thread Sam Roberts
he receive side the package should be prepared to run using npm rebuild (which will involve *no network access*). strong-pm does this on receive and redeploy of an app: https://github.com/strongloop/strong-pm#life-cycle Cheers, Sam -- Job board: http://jobs.nodejs.org/ New group rules: https:/

Re: [nodejs] "Pipeing" stuff to a child process

2014-10-31 Thread Sam Roberts
c = child_process.spawn(... { stdio: ['pipe'], // fd 0 is child's stdin ...}) c.stdin.write('hey, you'); -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/wiki/Mailing-List-P

Re: [nodejs] To check node_modules or not

2014-10-29 Thread Sam Roberts
when npm is down or unreachable Sam -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines --- You received this message because you are

[nodejs] Debugger becomes unresponsive after pausing when already paused

2014-10-09 Thread Sam Barnes
killed by Ctrl-C. I'm trying to debug an issue on a Digital Ocean server which has its networking turned off, so I've only got one VNC connection to play with and can't kill the debugger process via another terminal. Sam -- Job board: http://jobs.nodejs.org/ New group rules:

Re: [nodejs] Having trouble getting started with Node.js

2014-09-26 Thread Sam Roberts
There's lots of frameworks, but http://loopback.io/ supports most of what you want out of the box, it looks like a good fit for you. You can ask more about it at https://groups.google.com/forum/#!forum/loopbackjs Sam -- Job board: http://jobs.nodejs.org/ New group rules:

Re: [nodejs] lifetime of net sockets

2014-08-22 Thread Sam Roberts
On Wed, Aug 20, 2014 at 10:58 PM, wrote: > Why do the sockets keep working after the 'connection' event handler > returns? Because the server keeps references to all its connections (until they close). And the (internal) epoll loop keeps a reference to the server, because it is attached and list

Re: [nodejs] facing problems with concurrency

2014-08-20 Thread Sam Roberts
unts. Consider using vasync, it is more inspectable, might make it much easier to dump current state. Also, it appears you may benefit from its barrier(). For "interrupting", I'd suggest finding a way with all outgoing requests to cancel, to teardown the connection and terminate it

Re: [nodejs] what happens to orphan processes while using cluster

2014-08-15 Thread Sam Roberts
On Fri, Aug 15, 2014 at 9:35 AM, Jimb Esser wrote: > Hmm, on my OSX machine, it seems the behavior is roughly the same as I > recall from Windows - hitting Ctrl+C delivers SIGINT to all of the > processes, not just the master, so the cluster children are exiting > immediately because of that. Sou

Re: [nodejs] what happens to orphan processes while using cluster

2014-08-14 Thread Sam Roberts
On Wed, Aug 13, 2014 at 8:53 PM, Tushar Jain wrote: >> sorry for the ambiguity.. > > I mean node example.js > (ctrl-c node) master is killed (assuming default SIGINT behaviour) ipc connections to all workers closed by OS all workers notice IPC connection closed all workers exit >

Re: [nodejs] what happens to orphan processes while using cluster

2014-08-13 Thread Sam Roberts
On Tue, Aug 12, 2014 at 11:08 PM, Tushar Jain wrote: > Hi, I am trying to figure out what actually happens when we re-execute the > master process without killing the child processes of the previous run using > cluster. > When i re-execute my code, it seems the previous workers also run again and

Re: [nodejs] error with Cluster + Express

2014-08-11 Thread Sam Roberts
a post request handler means", you should provide example code and also the stack trace so we can see what calls is EINVALed. Sam -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyen

Re: [nodejs] How to extend ChildProcess prototype?

2014-08-09 Thread Sam Roberts
> ChildProcess.prototype.kill = function() { > cp.exec("kill -TERM -" + this.pid, function(error, stdout, stderr) { > if(error) console.error(error); > }); Why not just write a module, that exposes the kindof kill you want? Your version isn't even API compatible with the or

Re: [nodejs] Java Houses Adopting Node.js

2014-07-24 Thread Sam Roberts
vers that were first developed for mobile). http://loopback.io/ is squarely targeted at this use-case, mobile apps with enterprise back-end data sources, though you and I may just call this "modern web app architecture". Cheers, Sam -- Job board: http://jobs.nodejs.org/ New group rules: h

Re: [nodejs] Re: A question on usage of require

2014-07-15 Thread Sam Roberts
/usr/local to be owned by my login, this is the npm happy path, allowing installation into /usr/local without sudo. Cheers, Sam -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/

Re: [nodejs] (C++) Emitting events from another thread?

2014-07-02 Thread Sam Roberts
ut returning an Event > emitter with events for start, data, end and such. But is this even possible > from another thread? Not sure why you are contemplating this, but if you want a hybrid language app, check out mongrel2: http://mongrel2.org/features/languages.html It supports php an

Re: [nodejs] Node.js & NPM on a multi-user-machine

2014-06-15 Thread Sam Roberts
> Am Freitag, 13. Juni 2014 17:26:39 UTC+2 schrieb Forrest L Norvell: >> As an aside, you may want to build and install node from source. The >> Debian packaging of node is quirky, and using either the official binary I agree with above (and I build from source, myself), but I've found quality of

Re: [nodejs] Node.js & NPM on a multi-user-machine

2014-06-13 Thread Sam Roberts
putting symlinks in ~/.npm/links/, and support a `npm link -g`, for installing global cli scripts as links to your dev env. Current scheme is an unfortunate intermixing of global installs and links. Sam -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/

Re: [nodejs] Deployment techniques

2014-06-12 Thread Sam Roberts
they execute to make it as transparent as possible about what its actually doing to your source. I'd love to have some feedback if you give it a whirl. Cheers, Sam -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old gr

Re: [nodejs] "engines" setting in package.json

2014-05-27 Thread Sam Roberts
On Mon, May 26, 2014 at 7:07 PM, Shane Niu wrote: > Hi, > > I am trying to specify node version in package.json, but it seems not work. Its just advisory, pretty much. Mostly ignored, probably not worth putting in. Read more here: https://www.npmjs.org/doc/files/package.json.html -- Job board

Re: [nodejs] Strength of TLS checksums vs TCP checksums

2014-05-15 Thread Sam Roberts
quot;checksums", it uses cryptographic message digests, which is what you would use in your app layer protocol/data format if you wanted equivalent levels of protection. Sam -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-po

Re: [nodejs] Memory leak with Buffer.toArrayBuffer

2014-05-12 Thread Sam Roberts
Node version? I get ``` var ab = buf.toArrayBuffer(); ^ TypeError: Object ``` -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-

Re: [nodejs] Re: node.lib

2014-04-22 Thread Sam Roberts
On Thu, Apr 17, 2014 at 7:42 AM, Pawel Por wrote: > Thanks for your patience but I still don't understand one thing. Why there > is something node specific (I mean node.lib) required to link addon under > windows while there is nothing node specific required to link the addon > under Linux ? Beca

[nodejs] Re: Looking for Node JS- Lead Developer-(Perm Hire) in Pune------------------------------------------------------------------------------

2014-04-22 Thread Sam
I am interested. On Monday, April 21, 2014 10:52:16 PM UTC+3, Daniel Peters wrote: > > Node JS- Lead Developer-(Perm Hire) > > -- > > > > *Experience- *3-5 Yrs years. > > > > *Position Qty *– 4 > > > > *S

Re: [nodejs] Re: Cycle require()

2014-03-25 Thread Sam IT
Your implementation works on my end. The object is cached, see the output below: --- samit@random:~/temp$ cat test.js var a = require('./plugin-factory').PluginFactory, b = require('./plugin-factory').PluginFactory, c = (a === b); console.log(c); samit@random:~/temp$ node test.js PluginFa

Re: [nodejs] Worry about Cluster Stability: (1 - Experimental)

2014-03-20 Thread Sam Roberts
On Tue, Mar 18, 2014 at 8:01 PM, Ryan J wrote: > how far away is a stable release? I would very much like to use this in my > development. cluster is in stable v0.10, use it in your development. Cheers, Sam -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://gith

Re: [nodejs] Process.stdin documentation inconsistency ?

2014-03-20 Thread Sam Roberts
On Thu, Mar 20, 2014 at 11:32 AM, q2dg2b wrote: > Hello. > http://nodejs.org/docs/v0.11.10/api/process.html#process_process_stdin says > "The stdin stream is paused by default, so one must call > process.stdin.resume() to read from it" > > But I try this code (which is the same from the official e

Re: [nodejs] Re: file system API race conditions

2014-02-27 Thread Sam Roberts
On Wed, Feb 26, 2014 at 4:40 PM, Alex Kocharin wrote: > > This sounds like a very good idea... I wonder, is there any downside to it? > Performance maybe? Its good idea if its what you want to do. It doesn't work with directories on systems that don't allow hard links between directories (do any

Re: [nodejs] Plans to make nodejs an embedable language?

2014-02-21 Thread Sam Roberts
d node. I see chat and questions about it occaisonlly. Google around, check the issue tracker and libuv list. Its not officially supported, but its apparently doable. Node uses global state... signal handlers, process.exit(), ... there are decisions to be made. Sam -- -- Job Board: http://jobs.n

Re: [nodejs] printing thread id

2014-02-13 Thread Sam Roberts
On Thu, Feb 13, 2014 at 4:11 AM, Pawel Por wrote: > but "ps" linux command shows that my node application consumes 2 threads. Yeah, but your javascript always runs in the main process, which has a tid === pid. What exactly are you looking for? Just poking around out of curiosity? In that case, c

Re: [nodejs] Upgrade application from 0.8.x to 0.10.x

2014-02-11 Thread Sam Roberts
e lost. Running their unit tests on 0.10 (or check http://nodechecker.com/) might give a smoke-screen. And of course, just trying... :-(. Cheers, Sam -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this

Re: [nodejs] When is 0.11.x stable?

2014-02-11 Thread Sam Roberts
On Tue, Feb 11, 2014 at 1:25 PM, Filipe Deschamps wrote: > Adam, are you sure? > > > On Sunday, February 9, 2014 8:24:57 PM UTC-2, Adam Reynolds wrote: >> >> Of note I believe 0.12 will be the last release before 1.0 It is the intention. Whether it is achieved ;-) -- -- Job Board: http://jobs.

Re: [nodejs] is there a non-traumatic way to approach this: http-proxy + a static file server target

2014-02-07 Thread Sam IT
Here are some options, sorted by, in my opinion, the more viable and easy solutions first: 1. Use subdomains, as Alex proposed No modification to the source files, which means it could be easily updated when you vendor updates it. 2. Add an HTML "base" element

[nodejs] Do any existing node test runners support the following better than mocha?

2014-01-27 Thread Sam Roberts
better CI integration we could be looking at before sinking time into mocha? Cheers, Sam -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups &

Re: [nodejs] Error compiling NodeJS (v0.10.25) on Debian Wheezy (7.0)

2014-01-24 Thread Sam Roberts
On Fri, Jan 24, 2014 at 3:26 PM, Blaine LaFreniere wrote: > g++: internal compiler error: Killed (program cc1plus) > Please submit a full bug report, > with preprocessed source if appropriate. > See for instructions. ^- gcc might appreciate the bug report, but then again, you have an old com

Re: [nodejs] handling long running task

2014-01-21 Thread Sam Roberts
check out node's cluster, you can send your jobs to the children, and they can send the results back -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Googl

Re: [nodejs] Parser

2014-01-09 Thread Sam Roberts
r languages was required. FYI, eval criteria: http://www.rfc-editor.org/rfc/rfc3117.txt Cheers, Sam -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Gr

Re: [nodejs] Parser

2014-01-09 Thread Sam Roberts
nk, if you want. > And HTTP is not so compact. You want a "text human-readable protocol" that is also more "compact" than minimal http? I doubt that what you want exists, but check out BEEP. Also, FTP, though it splits the binary and text channels (for maximal compactness).

[nodejs] option parser that is MOST similar to getopt_long?

2014-01-08 Thread Sam Roberts
--this-is-not-a-flag-to-cmd.js ... and other random stuff Up to NOTANOPTION are all known options to cmd.js, NOTANOPTION and everything after it should NOT be examined by the options parser. Cheers, Sam -- http://strongloop.com, Node.js products, support, and consulting -- -- Job Board: h

Re: [nodejs] AutoExec or AutoRun in node

2014-01-06 Thread Sam Roberts
epl? https://gist.github.com/sam-github/8290255 -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group,

Re: [nodejs] Multi process app does not use all CPUs

2014-01-03 Thread Sam Roberts
27;ab'. Check whether you are getting all most of the tcp connections all directed to a single worker. This can happen, node 0.11 implements round robin by default for linux systems (but won't help you on windows). Unless you are deploying to windows, try running on another O/S. Sam

Re: [nodejs] Node.js documentation about domains: what makes "throw" special in JS compared to Python/Ruby?

2014-01-03 Thread Sam Roberts
ible idea. Thus the docs. Since you are actually thinking about this, you clearly aren't that kind of user, though. > As I said, my main point is that the warning, as stated, doesn't really > provided a basis for learning why and, subsequently, intelligently using and > handlin

Re: [nodejs] Node.js documentation about domains: what makes "throw" special in JS compared to Python/Ruby?

2014-01-03 Thread Sam Roberts
ithely ignoring errors is a bad idea in node, or any other dynamic language where fundamental problems like invalid syntax, non-existent modules during require, attempts to call undefined methods or functions, servers failing to listen because a port is used, etc., are all errors that can be caught

Re: [nodejs] Multi process app does not use all CPUs

2014-01-02 Thread Sam Roberts
st on the other CPUs that all you see is the load-generator on its CPU? If that is not the case, node version, system, and how you are generating load, all would be useful. Sam -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Po

Re: [nodejs] Working with dependencies

2013-12-31 Thread Sam Roberts
Its hard to understand what you mean by "depend", but check out npm link. Sounds like it might be what you want. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed

Re: [nodejs] path.resolve HOME flattening

2013-12-24 Thread Sam Roberts
odules that will do this (sorry, don't know one off top of my head). Finding home across unix/windows is not trivial, but if you don't care, just do regex replace on /^~\// with process.env.HOME. Sam -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/

Re: [nodejs] HTTP request method getting mangled. Is this a bug in my code, or in http.request?

2013-12-23 Thread Sam Roberts
able), and something happening differently at that transition, such as pipelining occurring on one of the streams (which should be kept alive). Sam -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this messa

[nodejs] npm install failure

2013-12-23 Thread Sam Darwin
sometimes when running "npm install" on a machine which has already had npm before, there will be an install failure.various errors appear. the modules don't all get installed.you might refer to this as an "upgrade" process, because the version of node might be new, also. many times,

Re: [nodejs] npm package mutability

2013-12-22 Thread Sam Roberts
On Sat, Dec 21, 2013 at 4:01 AM, Alex Kocharin wrote: > 20.12.2013, 00:13, "Sam Roberts" : >> I've found force republish invaluable in the last weeks when publishes >> to npmjs.org silently half-work, leaving the tarball missing from >> cloudfare. I'd pre

Re: [nodejs] npm package mutability

2013-12-19 Thread Sam Roberts
lishes to npmjs.org silently half-work, leaving the tarball missing from cloudfare. I'd prefer a build number, but like you say, its not respected by npm, and I'm not really happy with having to use patch number as a publish-retry number. Sam -- -- Job Board: http://jobs.nodejs.or

Re: [nodejs] horizontal scaling with NodeJS on same physical machine

2013-12-19 Thread Sam Roberts
On Thu, Dec 19, 2013 at 11:50 AM, Bijuv V wrote: > Thanks Alex. > > So the options finally are - > > a. Use Cluster - used in many prod applications as mentioned by Luke Yeah, ignore the experimental, it means node is allowed to changes its API, if they need to. It's API is a bit low-level, you

Re: [nodejs] Re: npm in production

2013-11-15 Thread Sam Roberts
On Fri, Nov 15, 2013 at 9:37 AM, Valery Carpentier wrote: > You can also specify which versions you are using in your package.json. This works poorly, it only locks down top-level deps, from then on down, you are subject to the dep specs of your dependencies. shrinkwrap is better than that. tar

[nodejs] npm in production

2013-11-15 Thread Sam Darwin
when deploying node.js code onto production servers, we run "npm install" as one of the steps. is this standard practice? what is the recommended procedure? the problem is that "npm install" downloads a million little modules, and if even one module is buggy that morning, because the develop

Re: [nodejs] What's the unicorn for Node? How should I think of deployment?

2013-11-14 Thread Sam Roberts
ngloop.com/loopback/ If you do use it (or even don't use it), I'd be interested in feedback. Cheers, Sam -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are su

Re: [nodejs] How does one set the process user?

2013-11-08 Thread Sam Roberts
On Fri, Nov 8, 2013 at 9:11 AM, Robert Steckroth wrote: > I can set the user with a process.setuid(uid) command but this requires > knowledge of the UID of the user I need. I was hoping for a different/better > solution than manually parsing the /etc/passwd file. ??? Sets the user identity of th

Re: [nodejs] Re: [ann] control-rod, control-rod-assembly : add and remove event listeners in groups

2013-10-28 Thread Sam Roberts
a clunky replacement for streams. Sam -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, sen

Re: [nodejs] Re: Spawn child process with stdout & stderr going to the same file

2013-10-28 Thread Sam Roberts
ces as [ null, f, f], so the open file is duped in child to fd 1 and 2 (stdout and stderr). Sam -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google

Re: [nodejs] Alleviating pressure on "dependencies", the registry, and the module system

2013-10-25 Thread Sam Roberts
verage its install capabilities, but not its decision making about where packages come from. Sam -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Grou

Re: [nodejs] TFTP client and server

2013-10-01 Thread Sam Roberts
ed, in purpose, or security model. And you are correct, TFTP is not general purpose. Sam -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups &

Re: [nodejs] Best practice to share data between processes (cluster)

2013-09-19 Thread Sam Roberts
cluster-connect-store If you are interested in looking at this approach, you can find some tutorials and docs up here: http://docs.strongloop.com/strongnode/#getting-started-with-strong-store-for-cluster Cheers, Sam -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github

Re: [nodejs] [NEW MODULE] argp - Command-line option parser

2013-09-13 Thread Sam Roberts
h! > https://github.com/observing/argh At first glance the above appears very similar to: https://npmjs.org/package/optimist Sam -- http://xkcd.com/927/ -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You receive

Re: [nodejs] Suggestions for alternatives to private npm repos?

2013-08-22 Thread Sam Roberts
your dep. Probably other ways, too, if the above don't strike your fancy. Check out npm docs on the format for the right-hand-side of a package dependency spec. Cheers, Sam -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting

  1   2   >