Re: [nodejs] what are the merits / demerits of require.extensions?
Encrypting source code is not something that can be done in v8 due to Function.toString and how v8 stores code for recompilation. The source will be present in v8's heap somewhere. However, if all JS is encrypted with a secret key and that must be provided before v8 starts it is possible to cause difficulty in obtaining actual source code. That and turning off the debugger are a must, but even in C++ you can disassemble and decompile to a somewhat functional point these days. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups nodejs group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[nodejs] Re: Can we rely on the semver implementation in npm?
See : https://github.com/isaacs/node-semver/blob/master/test.js Does not have all the '+' checks you may want, but on glance it looks like it would be fine except build.2 to build.11 (anything after + is lexically sorted, semvers are not recursive by definition) -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups nodejs group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[nodejs] Re: NPM Downloading Binaries
Arch specific registries using multiple registry support is much simpler. npm --registries=ubuntu.x64.prebuilt.local registry.npmjs.org when requesting against ubuntu.x64.prebuilt.local a proxy would prebuild the module if it 404s. end. Can be done as an internal proxy as well. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups nodejs group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[nodejs] Re: Curious question about node/lib/module.js
I am very wary of the module system needing to load modules, the less external dependencies the better. That being said, you could use the built in util functions, but then if a user application modifies the util functions it will cause problems in module.js; tradeoffs. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups nodejs group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[nodejs] Re: NodeJS modules --- implementation
Correct, however 2 pieces of bindings are used in node's case (dlopen and fs for reading files/dirs). The rest is all in Javascript. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups nodejs group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[nodejs] Re: NodeJS modules --- implementation
Also there is a shim for re-creating this in user space: https://github.com/bmeck/node-module-system , see example for `node`'s system. On Thursday, April 4, 2013 2:29:20 PM UTC-5, mscdex wrote: On Apr 4, 2:45 pm, Blaž Sovdat blaz.sov...@gmail.com wrote: I'd like to know where in the NodeJS source should to look for the implementation of the module loading system http://nodejs.org/api/modules.html#modules_modules? https://github.com/joyent/node/blob/master/lib/module.js Did you make changes to the V8 engine in order to implement it? No. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups nodejs group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [nodejs] $prefix/include/node/*.* headers missing in v0.10.x
The one downside I have noted with node-gyp is how much of a pain it is to bundle some package as a dependency that includes a different build manager like cmake. Perhaps that is the situation here. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups nodejs group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[nodejs] Re: ECMAScript 6, asm.js, can node.js dump V8 or be VM agnostic?
My main problem is not with JS but having native modules break if we do this. V8's C++ API is significantly easier to use than the other JS VMs when I have done experiments, however, that C++ API makes some assumptions that are not always true across JS Core, Nitro, or the Monkey engines. While moving Node core to an agnostic binding would be ideal, most of the more complex C/C++ bindings would remain bound to w/e VM you write the headers to. This would lead to fragmentation and needing to not only test your Node modules against multiple operating systems, but VM bindings as well. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups nodejs group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[nodejs] Re: customize local node.js ( switch to require module / .noderc.js ? )
I think this is a little out of scope for node-core, some test runners for example do automatically include various bootstraps and/or globals (chai in particular comes to mind). Having this in included as a CLI flag would need to have some serious points about why this would be beneficial over writing a wrapper like chai/vows/etc. (beyond mere CLI convenience) -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups nodejs group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [nodejs] Promises vs Async vs Stepdown vs etc... Request for non-trivial implementation ideas.
When we have been making large scale software a few things have come up. 1. Callbacks suck for linear workflows (a-b-c) This kind of workflow results in what I like to call the mudslide. Your code really wants to expand into some minor nesting once you have shared state (sometimes immutable state and idempotentcy is a perf issue in resource starved JS [rare use case generally]). But often when composing parallel workflows this is better for composability (using `.bind` or `npm i async`) vs many `.then` calls on a promise. 2. Promises suck for branching workflows (a-(bc)-d) When promises enter the parallel (not async) workflow we start to see some fun things happen. `.then` is called, a lot , which gets confusing to read. Promises on their own need some help when making a join after a fork (see `npm i q`). This parallels to the composability fixes using `async.waterfall` above. 3. Domain all the things IDC what it is, if you are serious, both need domains. That being said, there are wrappers both ways, but mostly: determine what kind of workflow you do most often. Most of my things would be awesome if they were linear, but often im grabbing multiple things at once using `async.parallel` combined with `async.waterfall`. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups nodejs group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [nodejs] Promises vs Async vs Stepdown vs etc... Request for non-trivial implementation ideas.
Domains are useful to categorize and debug the error, even if you shutdown, don't just throw them away. For performance starved JS (talking working under 50MB in a production area) idempotentcy / stateless arch generally results in memory usage or offloading to a single authority. Single authority requires well thought out recovery if the app dies from something bad happening. Statelessness if in a resource constrained system that cannot offload to say a remote DB is just going to be a TON of book keeping and memory management in JS is difficult to predict (generally we move to C/C++ at that point). Promises vs nested branch (sans q): ``` //make a promise to start the workflow onuser=db.getUser(x) //branch 1 onuser.then(db.isUserActive) //branch 2 ongroups= onuser.then(db.getGroupsForUser) //branch 2.1 ongroups.then(db.getPermForGroups.bind(db, 'dotask')) //branch 2.2 ongroups.then(db.getGroupsActive) ongroups.fail(onuser.fail.bind(onuser)) //branch 3 onuser.then(db.getPermForUser.bind(db, 'dotask')) //join // don't feel like writing the .then joins by hand... onuser.fail(joined.fail.bind(joined)) joined.then(win).fail(blah) ``` With Q fixing the anger; to look a lot like async.parallel ``` onuser=db.getUser(x) onuser.then(Q.all([ db.isUserActive, db.getGroupsForUser.then(Q.all([ db.getPermForGroups.bind(db, 'dotask'), db.getGroupsActive ])) db.getPermForUser.bind(db, 'dotask') ])).then(win).fail(blah) ``` -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups nodejs group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[nodejs] Re: Promises vs Async vs Stepdown vs etc... Request for non-trivial implementation ideas.
Manually combining state is something I do not want to give up. Passing by argument is my preferred method rather than introducing variables (async.waterfall). All compiler based syntaxes I have seen give me concerns about shared cache if multiple things are done in parallel and you use shared variables. If you feel a full benchmark (I think reference problem would be a a more appropriate term) feel free to spec out a simple task like MVC has for todo applications or a full spec for something to compare against. Tooling out an extendable task like a build service like: https://github.com/nodejitsu/module-smith/blob/master/lib/builder.js is painful and a real world example that utilized a ton of different techniques. Feel free to base the spec off that. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups nodejs group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[nodejs] Re: Promises vs Async vs Stepdown vs etc... Request for non-trivial implementation ideas.
https://gist.github.com/bmeck/5287456 Feel free to spec out a reference problem set by forking and modifying. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups nodejs group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[nodejs] Re: Native modules in the cloud
This should also specify if you are using Windows or not when making the decision. Native modules on Windows are less common due to the semi-long setup needed to make/secure a build server for me. On *nix modules are amazingly useful, but on windows I usually end up offloading complex native work to something else rather than a module due to complexity. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups nodejs group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[nodejs] Re: Is it possible to create a node.js module wich uses c libraries for database connection?
If you just want to call into C https://github.com/rbranson/node-ffi or If you actually need to deal with the event loop (such as doing things in multiple threads and queueing them on the loop): http://nodejs.org/api/addons.html On Friday, March 22, 2013 11:10:49 AM UTC-5, Gaurav Meena wrote: I am trying to connect monetdb with node.js. I have a simple (20 line) c program which can query moentdb using mapi libraries. can I use those libraries to build something(module/addon) for node.js which uses these libraries and connect to monetdb. (using odbc is an option but it have its own disadvantages.) -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups nodejs group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[nodejs] Re: Return-Code 7 while running npm from python
Did npm-debug.log say anything? Can you gist that output? On Thursday, March 21, 2013 4:13:57 AM UTC-5, Christian S. wrote: Hi, I always get the return code 7 when I run npm search term from python ( subprocess.check_output([ 'd:/nodejs/npm.cmd', 'search', 'connect' ], shell=True) ). When I run the command from the commandline ( # d:/nodejs/npm.cmd search connect ) it works as expected. I was already searching for the return code from npm/node but I didn't found anything about the return codes in general. So, now I'm wonder what the return code 7 ( from node/npm ) means? I'm working on windows at the moment. Thanks in advance and best regards Christian -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups nodejs group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[nodejs] Re: documents/second instead of seconds/document
Can't seem to click on the link (404ish style page saying missing or not shared). -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups nodejs group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[nodejs] Re: Missing execSync in NodeJS
https://github.com/joyent/node/issues/1167 - stdio options need to be specced out still. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups nodejs group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [nodejs] Missing execSync in NodeJS
Most real world use cases for this are not for performance, they are for shelling out to utilities, the alternatives are hideous as we found in nsh : https://github.com/AvianFlu/nsh/wiki/nsh -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups nodejs group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[nodejs] Re: Found a really nice video about NodeJS
For reference to those who are taking this seriously: multiple comments asking for sources/examples on many issues brought up (in video and comments) should lead to skepticism about many of his claims in the comments. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups nodejs group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[nodejs] Re: SSL termination
Unless you really need to script out SNI and/or NPN negotiation in your balancer, termination via `stud` or something else is recommended on 0.8.x unsure on 0.10.x. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups nodejs group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[nodejs] Re: [ANN] Modulus Node.js Hosting Platform Goes Live
Congratulations on going public :). Always good to see the Node community thriving. Cheers, Bradley -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups nodejs group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[nodejs] Re: Distributing an application
You should check out module-smith; let me know if you need help setting it up properly. Make tarballs / zips and distribute them directly as precompiled binaries. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups nodejs group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[nodejs] Re: Directory structure suggested in node docs
Well right now the cache (~/.npm) does follow this but does local copies instead of linking when using `npm install`. Linking is only going to happen with `npm link` so that nothing in a project can change out of band unless it was explicitly linked. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups nodejs group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[nodejs] Re: Directory structure suggested in node docs
This structure is currently present in node. * NPM uses local modules in a similar structure with `/usr/lib/node` replaced with the directory containing your `package.json`. * Global modules are installed as local modules name-spaced to the appropriate directory such as `/usr/lib/node_modules`. * Symbolic links work in as described above when using `npm link`. Linking is not the default behavior in `npm` workflows usually so this does not often come up. It is unlikely node will move to shared global modules as are present in other languages any time soon due to potential shared module version mismatches, and it is also unlikely for that reason that symlinks will be used by default. If you do need to use symlinks for w/e reason, look at `npm link`. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups nodejs group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[nodejs] Re: Self-contained and self-extracting Node.js applications
There are some projects on this already such as `nexe`. If you want to talk about it in depth feel free to ping me on irc. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups nodejs group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [nodejs] Re: Self-contained and self-extracting Node.js applications
I think both `nexe` (dont quote me im not on project) and the private versions I know of are looking to windows as the main usage for bundling. NJ is looking into security around bundled executables before we do anything public. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups nodejs group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[nodejs] Re: Run Meteor apps anywhere with Demeteorizer
Very interesting. Looks like some good things for us people who are used to vanilla node projects far more than meteor. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups nodejs group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[nodejs] Re: announcing browserify v2
We are doing some dark magic upcoming using https://github.com/bmeck/node-module-system +1 if we can get a standardized require shim. Does not need to be ours. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups nodejs group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[nodejs] Re: announcing browserify v2
Generally I abstract out my implementations and my interfaces. This means a more verbose code base, but allows me to have the renderer inserted via dependency injection. It is independent of bundling tech and I have used it with browserify as well as with AMD to great success. Decoupling those allows you to reuse interfaces on server side, but implementations will always need rewriting. If you do dep injection though only the renderer generally needs a rewrite though which is a huge win. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups nodejs group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[nodejs] Re: module.exports and property descriptors
Loading in modules can be time consuming for one off apps or resource constrained apps. This only requires them when they are being requested. For long running apps that can consume time and resources at startup this is generally not needed / wanted. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups nodejs group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [nodejs] Need an offline npm-style repository - what's a good approach?
Right now without compaction you are looking at 45~ GB of data it looks like on the current npm public registry, and it can be replicated without needing any permission. On Monday, February 18, 2013 1:01:33 PM UTC-6, andy wrote: Cool, thanks for the suggestion(s). Two quick questions: 1) Can anyone replicate w/ the npm couch repo? I take it that's a yes but maybe you need permission (then again maybe people are smart enough to not want to have to do this, unlike us...) 2) How big? 10GB? 100GB? 1TB+? Thanks, Andy On Mon, Feb 18, 2013 at 11:50 AM, Luke Arduini luke.a...@gmail.comjavascript: wrote: Touching on what Tim said, if you create a document for replication in /_replicator (not /_replicate) on couch you can turn couch off/on and have replication resume whenever. I do it all the time for my private npm and it works well, example: https://gist.github.com/st-luke/4165831 On Mon, Feb 18, 2013 at 1:46 PM, Tim Caswell t...@creationix.comjavascript: wrote: If you want a mirror of the public npm repo, one option is to replicate the couch database. It's pretty big, but once replicated would give you a full mirror. I'm pretty sure you can do delta updates later on by putting the couch database back online and syncing again. On Mon, Feb 18, 2013 at 12:42 PM, Luke Arduini luke.a...@gmail.comjavascript: wrote: You could set up git on a server on your lan and just specify dependencies in your projects' package.json files pointing to the git address. Seems like it would be the easiest way to go for private modules not on the internet. On Mon, Feb 18, 2013 at 1:23 PM, andy e virtu...@gmail.comjavascript: wrote: Apologies in advance because I've only glanced at this problem, but we work in a unique environment where we have no Internet connectivity. So, with our Java apps, we run an instance of Artifactory on our LAN and load it by running an instance that is connected, which we then export and bring into the 'offline' instance. That gives us a sort of mirror of Java dependencies for maven and what not when we're developing. Is there anything like Artifactory for npm? Do I need to roll my own somehow (i.e. would a simple WebDAV server work or is it more complex)? I've glanced at Mike's node-reggie idea so maybe that is a place to start (https://github.com/mbrevoort/node-reggie). We don't need anything fancy - just a way to add npm modules to a project without having to check them in or pass around a giant .zip copy with all possible repos...etc. (Right now I just have a node_modules_for_work folder where I load up a ton of modules, then I zip that up and bring it in.) I'm happy to go off and do some reading/digging, so links to similar ideas/attempts are appreciated. Thanks, Andy -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nod...@googlegroups.comjavascript: To unsubscribe from this group, send email to nodejs+un...@googlegroups.com javascript: For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups nodejs group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+un...@googlegroups.com javascript:. For more options, visit https://groups.google.com/groups/opt_out. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nod...@googlegroups.comjavascript: To unsubscribe from this group, send email to nodejs+un...@googlegroups.com javascript: For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups nodejs group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+un...@googlegroups.com javascript:. For more options, visit https://groups.google.com/groups/opt_out. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nod...@googlegroups.comjavascript: To unsubscribe from this group, send email to nodejs+un...@googlegroups.com javascript: For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups nodejs group. To
Re: [nodejs] Proxy server with authentication
Any reason not to use http-proxy and passport without express? -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups nodejs group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[nodejs] Re: http/ https server on same port
A long time ago I built a proof of concept for something like this: https://github.com/bmeck/kitsune After thinking about maintainability I decided to avoid doing this sort of behavior but left the code up as an example. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups nodejs group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[nodejs] Re: Re - How to add new row to existing document in couchDB Database .
GET the document from CouchDB, change the row appropriately, PUT it back to CouchDB. All using HTTP. CouchDB will complain about merge problems if the _rev field does not match, if so, retry. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups nodejs group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[nodejs] Re: Harmony Proxies for abstracting Mumps GlobalNodes
Proxies are a turtles all they way down approach for things like this, don't return the actual property, return a Proxy to the property that can have reference to the path used to get there. However, this ruins performance, and cannot represent primitives as values. A function for full path lookup makes more sense for tree structures with values attached to nodes in Javascript. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups nodejs group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[nodejs] Re: Harmony Proxies for abstracting Mumps GlobalNodes
I really like proxies, but they are not a cure all; in some situations they are very very beneficial (NodeList in the DOM spec for example), but they do not like valued tree structures. But yes a function that delegates out to a tree structures is what I would recommend. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups nodejs group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[nodejs] Re: pipe to node binary and still pass parameters
use xargs and -e instead of a direct pipe. On Wednesday, January 30, 2013 2:36:04 PM UTC-6, Kilian C. wrote: using /dev/stdin as file reference kinda works $ echo console.log(process.argv) | node /dev/stdin --myarg [ 'node', '/dev/stdin', '--myarg' ] but it messes with the node_modules folder, in this case node is looking for modules in /dev/node_modules… instead of cwd -- Kilian C. On Wednesday, January 30, 2013 at 8:58 PM, Kilian C. wrote: How do I make it work? $ echo console.log(process.argv) | node --myarg -- Kilian C. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups nodejs group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[nodejs] Re: Healthcare needs the help of the Node.js Community
Are there any conventions when sharing data between 2 mumps databases? Format or otherwise? -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, 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: Healthcare needs the help of the Node.js Community
Any errors in the interpreter/compiler could have impact on peoples well being, I would advise against doing this on old code that has been functional for long periods of time and may rely on edge cases. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, 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: Bangalore JS Meetup tomorrow at Microsoft offices in India
Dependencies on a resource is pretty fancy pantsy. I like it. Reflected web admin trigger admin... http://memegenerator.net/instance/33969625 -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups nodejs group. To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[nodejs] Re: Bangalore JS Meetup tomorrow at Microsoft offices in India
Good to see you around. Keep us up to date with any slides / videos :) -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, 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: Why I cannot send binary data file larger than 64k bytes
Are we talking about the frame limitation here? Packets above a certain size will be split into frames as appropriate. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, 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: Running javascript code safely
Austin : https://github.com/joyent/node/issues/2486 https://github.com/joyent/node/issues/3042 -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, 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] Running javascript code safely
Alexey, depends on the system. Long story put short: If you have persistent workers (say one per user not per request), this can be beneficial in some situations where running user code on your machines is less costly than sending things over network or for security you cannot (ie. something akin to couchdb/mongodb/etc. indexing). This is where this approach shines. Doing this per request... you lose some benefits from the arbiter. But the arbiter could be in any language and should exist spawning child processes if you run code anyway anyway. However, with things like SES you get pretty much full speed JS so you can get benefits from the evented nature of Node in workers while allowing some interesting interactions to take place if you are running distributed systems. Most applications see little to no gain over using a bootstrap to setup RPC and then dropping permissions from that though, which is why I mention up top that #7 is generally overkill. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, 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] Running javascript code safely
A better use of time is supporting SES ( https://github.com/drses/ses ). It needs a legitimate CommonJS wrapper without globals and documentation on usage. See bin/ses for an example. As a side note: you will want --harmony support. Once you have an OS protection layer and that you are in ok shape. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, 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: Running javascript code safely
Austin: won't go into great detail, but heres a fun little example: ```javascript function exploit() { console.log.constructor(process.exit(42))(); } var result = require('vm').runInNewContext([ 'use strict;', '('+exploit.toString()+')()' ].join('\n'), {console:console}); console.log('I SURVIVED THE STORM!'); // it wont ``` Thats pretty trivial and then prototype injection attacks can occur if you pass in natives and eventually use say... JSON.stringify if you override .toJSON, .toString, .constructor, .valueOf, .__proto__, ... Then it gets worse when you do something like say... get a hold of a non-strict mode function from a different scope by having it construct lets say a continuation callback ... Even still... get a hold of some options object that feeds into a secure area and set the options to something insecure (at a future point in time with lets say Object.defineProperty). ... it goes on... ... -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, 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: Running javascript code safely
See my earlier post with OS security and the various things about it. Even in a child process you can wreak havoc. Also, you need to pass in some sort of context or get some sort of output for you to do anything of value. It needs to be made into a string, fire some function, return a value, or something. Otherwise your function would not be doing anything that is observable / interacts with APIs. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, 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] Running javascript code safely
Yes, for basic scripts gf3's module works fine, but still stick to OS security as well in case a new JS exploit arises. The reasons it is ok is as follows: 1. Communication uses serialization in a safe runner generated inside the context that is in strict mode. (General idea from #7) 2. RPC is not possible from outside the context into the context and vice versa. It is a code dump and run. Potentially you could patch this using something ala process.send and pass strings around, but there are other solutions existing. Soo... #2 is generally not going to make life easy for you unless you have all the data up front. SES uses a wrapping/unwrapping (still classify this as #7, but done very thoroughly) technique that is a bit more thorough and allows using functions inside and outside the sandbox but limits you to some large subset of JS (you generally don't lose much). I really would need to know much more about what you are trying to do with user code beyond run it to give more input. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, 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] Running javascript code safely
A while back I discussed the problems with the node-sandbox module, I wrote a solution, but it broke on newer v8s, have not spent the time to track down the problem. Even then serious care must always be taken to not allow remote code execution. I know ways that horrify people using just type coercion. But lets get down to the truth of security: Go to the OS. Do not trust scrubbing things yourself and always enforce OS level security if you are serious. Here are the basics: 1. put people in a jail of some kind (kernel namespaces, classic fs jail, etc. according to needs) 2. strip them of ALL permissions possible (this also includes knowing how FS permissions work (ie, drop them to a low level folder they do not have access to, then put something inside for them to play in)) 3. put them in a different process that is started in a detached state 4. use a bootstrap to scrub the env the argv (particularly argv[0]) 5. set the resource limits on the Job/Process Group/Project/etc. that your OS calls a group of processes and children. similar to w/e user you drop them into (man quota or w/e apt.) 6. don't use a chroot as a jail. 7. if you are truly paranoid / have a highly specialized use case 7.1 use Function with a capital F started in a different context to run user code. 7.1.1 Enforce a strict mode wrapper to non-strict wrapper inside of the runner. 7.2 only allow people to pass around serialized data (JSON, strings, etc.) to the outer context. 7.3 no function sharing, no object sharing (use a deep copy from inside the target context that is not available from the target context due to being inside a closure). 7.3.1 deep copy should be in strict mode and used on anything you ever see from user code 7.4 if sharing privileged functions such as the deep copy in #6, do not use any `.` properties (save w/e you need before you get to code by users) 7.5 do not invoke a function call on anything you get from outside your function 7.6 do not use type coercion on any objects you get 7.7 do not return a value from your function 7.8 nest a function and check the inner function has the right new Error().stack (arguments.caller is overridable, stack is set). #7 is generally unnecessary, but depends on what you are trying for. I would talk to a PaaS for Node about the problems they have seen (probably results in small consulting fee `if` they are willing). Email me if you have questions. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, 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] Running javascript code safely
Hey Mark, Is there a sandbox to test out SES in, or binary I can run with examples? Looked in the SVN but did not see a Readme to get started with. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, 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: v8 profiler output question
What is `time node --prof x.js`, always check `time`. Also C++ level stuff for in depth profiling use a C++ profiler, `gprof` for gcc etc. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
[nodejs] Re: Running javascript code safely
You can run it perfectly safely, but always understand you want the OS for protection. That is the first line, not a module. Now running something with shared code... harder, but SES shows promise and does what I mentioned using wrappers; hopefully, we will see it usable in both browser and Node soon. Even then, OS first. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, 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: Debian Nodejs Package Maintainer
writing -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, 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: Memory used by an object in node.js
Profile the machine, 51 elements means very little overall. The elements could vary in size from a vast number of reasons (the simplest being you have strings of different sizes). You could also have a daemon watch RSS usage of the machine to react accordingly while you profile by making notifications etc. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
Re: [nodejs] Does events gets executed sync'd or async'd?
If you need to break something off as to not interfere for w/e reason, look at `process.nextTick`, if you need to chain together a reaction to an event from async functions look at `async` from https://github.com/caolan/async or `understudy` from https://github.com/bmeck/understudy depending on use case . -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, 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] Convention to preemptively break out of a domain/action?
Completely agree that not having the default action at the end would cause issues in a single middleware stack. I use middleware trees rather than single stack with Understudy, it would go to the end of an action (for example the default action such as just closing the HTTP request). I run into this problem a fair amount when making pluggable servers. For example: ```javascript server.before('http.auth', databaseLogin) server.before('http.auth', googleLogin) server.before('http.auth', twitterLogin) server.before('http.auth', anonymousLogin) ``` If one of these passes, we want to skip to the end of the 'http.auth' action. This gets even more complicated when you start using trees (example from an existing code base [sorry for the inlining]): ```javascript server.perform('http.auth', req, res, function (err, req, res) { // default action if middleware do not pick it up // people can listen on('end') if they really want to do odd things out of band with the req / res function finish(err, req, res) { res.writeHead(404); res.end() } // use apt middleware for state and just let them route if able if (req.authorization) { server.perform('http.authorized-request', req, res, finish); } else { server.perform('http.unauthorized-request', req, res, finish); } }) ``` Notice in the above example I rely on middleware to not call next() if it can handle a behavior to absolute completion. I think this is just a documentation issue personally for actions, but feel free to disagree. Standardizing if a middleware is a leaf of the control flow vs node is something that is too complex to write in code. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, 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] Convention to preemptively break out of a domain/action?
I am not sure I understand the use of a pull stream in this context. Can you explain in a small example of how to use a stream instead of domains/middleware/etc. in this fashion for control flow? On Tuesday, January 8, 2013 3:59:29 AM UTC-6, Raynos wrote: Sounds like you want a pull stream to me. You pull from the data until you dont need it anymore and then stop pulling. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, 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] Convention to preemptively break out of a domain/action?
Anyone have a sane and performant way that they break out of a domain or action such as middleware? I am trying to design such behavior but am faced with a multitude of interesting issues. The classic example of this problem can be seen with Array.prototype.forEach (though this has the easier synchronous execution for breaking): ```javascript // we only want to print first 2 items [1, 2, 3].forEach(function (item) { if (item 2) { return; } console.log(item); }); ``` We often see the error first callback cause a fast fail on waterfall style control flow, but what if we are not issuing an error, but rather a terminating condition (making all middleware after it ignored)? Right now my only solution is to add another callback to arguments ala: ```javascript function finish(creds, finish, next) { if (creds == 'secret') finish(null, 'user/mary'); else next(null, creds); } actor.perform('auth', creds, finish, next); ``` This seems, a bit... overkill to type out though. Anyways, looking for suggestions. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, 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] Convention to preemptively break out of a domain/action?
This is good, gets me thinking. This brings up that there are 2 styles of approaching this issue: abort style - manually cause the action to fast fail condition style - provide a condition to check on every step of the action May help others thinking about this as well to think of both perspectives, personally I prefer abort style when available to avoid unnecessary condition checks. But condition checks can be reduced to a boolean, so that may be a suitable solution still. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, 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: Autoload and autoinstall modules
What are the security features to prevent malware installation using this? -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, 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: convention for publishing modules requiring --harmony?
Well if its just runtime needs, you could throw an error on require if a global for w/e you need is not present? Placing Javascript dialect into the package.json would get complex and hairy quite quickly. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, 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: convention for publishing modules requiring --harmony?
If you are using a non-standard (harmony) expectation in your library you should test and bail on an environment that does not supply the interfaces expected. I think throwing on missing expectations is one solution the other is to require a shim if the expectation is not present. Both are pretty de-facto in JS. Putting this into package.json etc would mean that you are requiring CLI switches that are non-standard to be in place. Shimming and throwing are perfectly valid for this case. I see this as little difference from requiring a peer module or a module that expects a non-present global variable (lots of tests suites bootstrap in globals, errors are usually but not always obvious due to this). -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, 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] Substream of Streams2 ReadableStream
Fixed using nextTick in https://github.com/bmeck/node-tart/blob/b44c960b18904b4ba1b36f02c2e3f569af948503/lib/substream.js . Basically, when having a stream that has read the end of it's data and is also ending at the same time, you need to nextTick the cb(null, null) otherwise the consumer must do unnecessary reads. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, 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] requesting guidance on possible contributions: reassigning console.log to a different stream and enabling debugger programmatically
Debug: At least give a way to disable it for when im doing live debugging and want to regain the port and debug a different process. On Thursday, December 27, 2012 10:51:44 PM UTC-6, Isaac Schlueter wrote: On Thu, Dec 27, 2012 at 6:52 AM, Joel Brandt jobr...@adobe.comjavascript: wrote: There are two changes to node that I'm considering contributing. Before I get started, I wanted to get some guidance on whether these things might ever be accepted into master. As you've presented them here, not very likely. I'll explain why below. I believe it would be nice to be able to reassign these to any stream object. This would add complexity, and you can easily implement it yourself: function myConsoleLog() { var str = util.format.apply(util, arguments); myStream.write(str + \n); } The use case for me is when node is launched as a child process and stdout is used for IPC with the parent. Why not use node's built-in IPC and just don't use stdout/stderr as the IPC channel? var child = child_process.spawn(process.execPath, [script], { stdio: [ 'pipe', 'pipe', 'pipe', 'ipc ] }) That'll open up fd3 in the child as an IPC channel, and stdin/out/err will be streams that you can write to/read from. You'll be able to then do stuff like: // in the parent child.send({ some: message }) child.on(message, function(response) { ... }) // in the child: process.on(message, function(message) { ... }) process.send({ some: response }) An alternative to allowing this reassignment could be to have a call that sets all console logging functions to write to stderr. (Then stdout would be left free for IPC.) This might be drastically simpler. Then use console.error instead of console.log. - Where should the API call go? The 'util' package? And, any guidance on what the API should be? The API should go in npm, if you decide to create it. - Right now, writes to stdout/stderr are usually blocking. Would we be opening up a can of worms by trying to have console.log write to streams in non-blocking ways? Logging to a non-blocking stream will mean that chunks may be lost if you do `process.exit()` explicitly. But as long as there are pending writes, node won't automatically quit. - If we consider this change, would we also change the logging functions in the 'util' package? Would we allow the user to switch each separately, or would console.log/util.log always write to the same place (and the same for console.error/util.error)? The util.log/p/error/debug functions are deprecated in favor of console. - Are there logging functions other than console.log/info/debug/error and util.debug/error/puts/print/log? Well, someone can always write to process.stdout/err explicitly. 2. allow enabling the V8 debugger programmatically (from a JS call) There are already command-line arguments for turning on the debugger and controlling its port. The API to call into is internal and undocumented for a reason; it's not really to be started from within JavaScript. But I might be missing something here, and I can see that it could be useful. Fedor Indutny is our resident debugger expert. Post an issue on the github asking about this, and mention @indutny in it. If he says it's a bad idea, I'd believe him. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, 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] Substream of Streams2 ReadableStream
I have a situation where I want a sub-stream (in same manner as a sub-string) of a ReadableStream to be treated as a different stream entirely. Currently I have the following: ``` // // Create a stream that consumes a future part an existing stream // var ReadableStream = require('readable-stream'); function subStream(origin, length, pad) { var stream = new ReadableStream({allowHalfOpen: false}); stream._read = function (size, cb) { if (!length) { stream._readableState.ended = true; cb(null, null); return; } var data = origin.read(Math.min(size, length)); if (data) { length -= data.length; } cb(null, data); } return stream; } exports.subStream = subStream; ``` but am unable to determine how to end it properly after reading some docs in readable-stream and in the code I am still confused as to how to tell _read that the stream is done without forcing extra read()s to be done by the user when they would have no reason to do so. Any help in understanding _read's ending system would be greatly appreciated. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, 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: Stream2: How to create readable stream for redis subscribe?
Personally I did not want to write a buffering system for in memory _read and just used a PassThrough stream for node-tart's substream parts : https://github.com/bmeck/node-tart/blob/master/lib/substream.js . I'm trying as well to find a sane way to allow internal buffering from a different stream but have not thought of an elegant solution. On Friday, December 21, 2012 10:07:07 AM UTC-6, Arunoda Susiripala wrote: Hi, I was looking at the new readable stream documentation and it said that we've to implement _read() method in order to implement the readable stream. But I have a problem? I want to create a readable stream where it's source is redis subscribe(). How can I implement a readable stream for this with the new API? Do I need to buffer incoming data from redis? -- Arunoda Susiripala @arunoda http://twitter.com/arunoda http://gplus.to/arunodahttps://github.com/arunoda http://www.linkedin.com/in/arunoda -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, 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: The new game server demo written in node.js
Very interesting. Seems to still have some graphical jitters, but could be very promising. Cheers, Bradley -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, 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: Best Pattern to wrap class hierarchy
Encapsulated bindings. Make all bindings available w/ some naming convention for the namespaces. Have a constructor function per type * Have Animal.prototype be the members of Animal:: * Have Dog.prototype be the members of Dog:: Attach the static functions to constructor functions Add sugar if you need a destructor / be sure to call the parent function constructor inside of subclasses: function Dog() { Animal.call(this); return this; } Checking for instance type: // since people should be using our constructor that maps to an instance via ObjectWrap if (spot instanceof Dog) { ... } When using virtual static functions [ :-( ] you can add them to the constructor (this pattern is highly discouraged generally): function Dog() { ... } var DogStatics = Object.create(AnimalStatics) ... Object.keys(DogStatics).forEach(function (key) { Dog[key] = DogStatics[key] }); In general however, directly mapping C++ onto JS will meet with some confusion as the mentalities of the languages are vast, so be sure that this is what you want to do. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, 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: Need recomendation for a native folder compression tool
I think the main reason people encourage others to compile to JS is that it can be a prepublish script to npm (you don't have to change .coffee to .js manually every publish) and in doing so you do not require 'coffee-script' to be loaded by the module that uses yours, making requirements of modules that require yours can lead to odd assumptions, like if coffee-script should be at a specific version or if the parent module. Messing with parent modules is a big nono generally, since it basically is requiring global (usually) state to be modified to use your module. On Thursday, December 6, 2012 1:21:17 PM UTC-6, Alan Hoffmeister wrote: Than why bothering compiling it to js? It's much more easy to maintain it with coffee files. Em quinta-feira, 6 de dezembro de 2012, Nathan Rajlich escreveu: Not at all. In fact compiling into JS before runtime would make boot-up time faster as well. On Thu, Dec 6, 2012 at 10:43 AM, Alan Hoffmeister alanhoffmeis...@gmail.com wrote: Does it impact the module performance? -- Att, Alan Hoffmeister 2012/12/6 mscdex msc...@gmail.com On Dec 6, 1:34 pm, Nathan Rajlich nat...@tootallnate.net wrote: Very cool Alan! One recommendation though is to move coffee-script to devDependencies and then publish the compiled JS to npm, rather than (or alongside) the .coffee file. As a non-coffee user, I shouldn't have to install coffe-script if I wanna use your module. +1 -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, 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 -- -- Att, Alan Hoffmeister -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
Re: [nodejs] Re: find path of module require()ing
Depends, if a module holds a reference to the module being reloaded and there is a shared cache being used by that module. You would still end up with 2 references to different things. I would need to know way more about whats trying to be done / API to make any sane comment on if it looks like there is a reference leak and shared cache situation. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, 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: find path of module require()ing
If the module uses some form of internal storage (for caching, module level object registration, etc.) it would be duplicated and then you could see some interesting cache mismatch bugs. For example in the following module 2 registries would exist rather than the expected one if completely reloaded: ```javascript var registeredHandlers = {}; exports.register = function (event, fn) {registeredHandlers[event] = fn;} exports.fire = function (event) {registeredHandlers[event]();} ``` Soo... if you setup a prestart function, then it gets reloaded, and someone attempts to fire prestart on the reloaded module; it would not contain the function originally registered as prestart and be a cache mismatch, which would be very hard to debug. Don't introduce side effects into other authors' modules, so never ever do this without knowing you can cause cache mismatches. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, 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: trying to wrap my head around promises - async vs Q
Choose either, I do things in callback style personally to match the ecosystem when I write libraries, thats the expectation of the ecosystem. For application logic, do whatever makes it faster. There are exactly 0 absolute wins on either side. I can go on at length about the reason both have pitfalls, but they both do. Programming is about compromise generally, this is no different. Readability at the code of some interesting shared state, go promises. Explicit state at the cost of repetitive error handling (much alleviated with domains), go callback. Just remember for small cases of N terrible sorts are faster than sorts that have better O notation. For different problems, use different solutions. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, 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: Question about threads in node.js
Correct but people use factory functions based on string lookups in most of these modules for some forsaken reason (udp/tcp do not have same api basically). On Friday, November 9, 2012 1:32:39 PM UTC-6, Matt Sergeant wrote: Yeah that was the one. I thought mDNS was just DNS packets sent over UDP multicast? With a library that can parse DNS packets we should be able to see mDNS packets in userspace, no? On Fri, Nov 9, 2012 at 11:58 AM, Ben Noordhuis in...@bnoordhuis.nljavascript: wrote: On Fri, Nov 9, 2012 at 4:50 PM, Matt hel...@gmail.com javascript: wrote: On Wed, Nov 7, 2012 at 6:45 PM, Ben Noordhuis in...@bnoordhuis.nljavascript: wrote: While HTTP traffic is event-driven, the initial DNS lookup is done from inside the thread pool. That's because we use getaddrinfo(3) instead of c-ares, mostly because the latter doesn't support things like mDNS (think Bonjour, Avahi, etc.). I may switch it to getaddrinfo_a(3) on Linux someday but other platforms will keep on using the thread pool. Didn't I see somewhere a Node DNS library written in pure Node? That might be useful... You mean [1]? It has the same issue as c-ares in that it doesn't integrate with platform-specific services. mDNS is one but there are others, like NIS or NSS. [1] https://github.com/tjfontaine/node-dns -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nod...@googlegroups.comjavascript: To unsubscribe from this group, send email to nodejs+un...@googlegroups.com javascript: 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: PaaS that allows node.js to use non-http ports?
Yep, but there are interesting ways to do things still, like STUN and SOCKS bindings if you have a proxy of your own out there you can generally setup the tunnel inside most PaaS. Generally though the PaaS is stuck to preallocating port/host pairs and charging for them since most don't give you a full fledged IP. On Wednesday, November 7, 2012 12:27:29 PM UTC-6, Matt Sergeant wrote: The problem these PaaS providers face is that http (and even https with SNI) allow you to route incoming requests by hostname on a single IP address. Other TCP services (generally) do not allow this, forcing the provider to give you a unique IP address. This is relatively straightforward for someone like Amazon who have several /15s available to them (131k IP addresses each), but much more complicated for other PaaS providers. On Wed, Nov 7, 2012 at 11:58 AM, Evan evant...@gmail.com javascript:wrote: I've been looking for a PaaS provider with the same requirements as well, and haven't had much luck. I've tried appFog, Heroku, no.de (when it existed), and Nodejitsu and they all limit you to 1 (randomly assigned) http/s port. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, 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: PaaS that allows node.js to use non-http ports?
Having worked on load balancers I can say load balancing multiple apps on raw TCP is less than trivial. Basically you end up having to make users declare their socket needs before hand, and you assign a host:port that will map to their app inside the internals of the PaaS. If someone has good ideas on how to make this not painful for users, let me know. Cheers, Bradley On Tuesday, November 6, 2012 2:50:32 AM UTC-6, paul_tanner wrote: Hi, We have developed a webserivce built in node that susbcribes to TCP sockets to get realtime input. Having got excited about switching from dedicated severs to PaaS I seem to have hit a brick wall in that non-http ports are not yet supported on those I've looked at. This is a shame because quite a large class of apps are ruled out while this restriction remains. I hear that websockets will be supported real soon now. This is goodness but not enough for the above requirement. Have I missed anything or will I need to be super-patient on this? Regards, Paul -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
[nodejs] Re: extensible packages
This sounds like a shared state lookup. Document and specify an interface for the renderers (webgl and 2d in this case). Once you have done that, in getContext Surface.prototype.getContext = function (name, options) { var renderer = this._renderers[name] // _ prefix is for implementation detail if (!renderer) { throw ... } renderer.getContext(this, options) // or similar api } And then developers could extend the surface with a different api, it could require direct access to _renderers or some helper function like surface._addRenderer(name, interface). On Tuesday, November 6, 2012 2:39:06 AM UTC-6, Henri Tuhola wrote: I teamed up with author of node-openvg, and we need to make a shared API for videocontext handling. I'd like to keep it open as possible, so people could extend it with their own renderers later. surface.getContext(webgl, options) - this should grab API that's currently given by node-video. surface.getContext(2d, options) - this should grab API that's provided by node-openvg-canvas How to package it such that it's simple and easy to handle? Is it possible without changing the API? -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, 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: Module caching Caveats
Posix has the ability to have hard links on disk where they have the same inode but different paths, unsure if this affects Window's junctions in the same way though. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, 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] Weak references. Does node-weak and other simliar libraries, add significant overhead?
Take it to a different topic if it becomes unrelated also. On Wednesday, October 24, 2012 1:15:49 PM UTC-5, Marco Rogers wrote: Can you elaborate on domains just feel wrong. I'm interested in how the domains api comes across. I've expressed my concerns with it in the past. :Marco On Wednesday, October 24, 2012 7:28:06 AM UTC-7, Fredrik O wrote: Thank you Rick, it was good to know. Just for curiosity, what do you people thought, to emulate RAII within JavaScript for those object which need some clean up? Am I doing it completely wrong? I mean, an exception can easily get thrown in JavaScript and try..catch cannot catch error within callbacks. And domains just feel wrong. For those who does not know what RAII is, it is an automatic way to invoke a destructor when the object get out of reach, by normal control flow or an exception get thrown. See wikipedia: http://en.wikipedia.org/wiki/Resource_Acquisition_Is_Initialization And Nathan (or if there is someone else which can do a serious guess), because you have not answered I assume it will be fine to use your library heavily. With heavily do I mean having around 10 000 concurrent weak objects alive. If you believe it would not be case, please let me know. Thanks in advance. Den tisdagen den 23:e oktober 2012 kl. 01:20:19 UTC+2 skrev Rick Waldron: On Monday, October 22, 2012 at 5:22 PM, Fredrik O wrote: PS. How would weak maps be used to call a custom function on garbage collection? I think you've misunderstood, WeakMaps don't facilitate this Rick What are your thoughts? Thanks in advance! -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nod...@googlegroups.com To unsubscribe from this group, send email to nodejs+un...@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: Installing modules in a flat directory
1. npm dedup can help. 2. if that is not enough: all modules can reference parent module's node_modules, so if you recursively move all dirs into the root node_modules it should work. a/node_modules/b/node_modules/c - a/node_modules/c On Wednesday, October 17, 2012 1:07:54 PM UTC-5, Justin Beckwith wrote: Greetings folks, I'm trying to use a module on Windows that has many dependencies. Many of these dependencies have dependencies and the depth of node_modules increases pretty quick. Generally this isn't a problem, unless you're using Windows :) Windows (or specifically some of the software we're building on Windows with .NET) doesn't really like file paths longer than 260 characters. Is there a way to build a module where the deep level dependencies are all stored at the root of it's node_modules directory? Or am I stuck using the hierarchical model? Thanks! -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
[nodejs] [ann] module-smith
We at Nodejitsu are releasing a part of our build server, Module Smith. It is the NPM wrapper we are using after we have stripped out all of our fancy logic. As with most build servers, the permissions you run this under should be taken into consideration. We have stripped out a lot of our custom logic so what you get is the following: * Pull based repository downloading via `checkout` * Scaffolding to prevent some basic security attacks * Sane defaults for npm configuration via environmental variables via `suspawn` * Middleware extensibility via `understudy` Currently Windows support is missing; however, this should run under Windows if `suspawn` is patched to fully support environmental variables and `runas` on Windows machines. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, 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: [ann] module-smith
Link may be important: https://github.com/nodejitsu/module-smith -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, 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] NPM: How to install packages without compiling them
For future reference: https://groups.google.com/forum/?fromgroups#!topic/nodejs/0iosr9ln2AA On Thursday, October 11, 2012 4:07:24 PM UTC-5, Mariusz Nowak wrote: Bradley, thanks. I'll try that. Anyway it looks it needs to be done programmatically, maybe I'll come up with some neat module that would do that. On Thursday, October 11, 2012 9:30:12 PM UTC+2, Bradley Meck wrote: you can do something like ``` npm i cat package.json | json -e this.bundledDependencies='$(for FILE in $(ls -A node_modules); do printf $FILE ; done)'.split(/ /) package.json npm pack ``` We do something a bit more complex on our build server but this covers most cases (wont set env variables when spawning npm and such so rebuild-bundled will have to be set when you `npm i` on any other server if it has install scripts that need running even if it was bundled). On Thursday, October 11, 2012 12:19:56 PM UTC-5, Mariusz Nowak wrote: Bradley thanks, it's probably best way to install bundle that was already prepared, but do you know the way how can I create such bundle? This is what I'm missing (!) :) On Thursday, October 11, 2012 5:26:24 PM UTC+2, Bradley Meck wrote: Forgot to mention, bundle the dependencies on your build server. On Thursday, October 11, 2012 10:25:56 AM UTC-5, Bradley Meck wrote: https://npmjs.org/doc/config.html#rebuild-bundle On Thursday, October 11, 2012 8:49:10 AM UTC-5, Mariusz Nowak wrote: Daniel, I think 'npm rebuild' may work for installation of already created bundle, but still what's missing is how to download all dependencies into correct folders without compiling them. On Thursday, October 11, 2012 3:30:37 PM UTC+2, Daniel R. wrote: I believe the easiest way to achieve what you want to do is by using the npm rebuild command. -- Daniel R. dan...@neophi.com [http://danielr.neophi.com/] On Thu, Oct 11, 2012 at 6:06 AM, Mariusz Nowak mar...@medikoo.com wrote: I'd like to create application bundle with all it's dependencies, so it can be installed on any platform without need of internet connection (other case is that it shouldn't be dependent on npm repository state - let's say I want to be sure I can install it without issues in 5 years time). So technically all packages with it's dependencies need to be downloaded as usually `npm install` does, but compile step shouldn't proceed. Afterwards when I load such bundle on any platform, `npm install` should (without need of downloading anything) just compile already present packages for given platform, What would be the easiest way to achieve that? Thanks! -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nod...@googlegroups.com To unsubscribe from this group, send email to nodejs+un...@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: multiple applications in single node.js process
Isolates were taken a look at a while ago. They are similar to what you want, but still unable to do so. It would generally be more sane to just scale out processes was what was decided. The edge cases of giving multiple light weight isolates proved to be very difficult to prevent Isolates from affecting each other (env variables, cwd, ulimits, etc.). If you are running large numbers of processes and having memory issues I might recommend you look into where that memory is coming from, node itself is around 10Mb overhead. The rest is most likely some kind of cache or non-GCable objects in your application. Note: Code source is cached, and coffeescript can compound things in unexpected ways (not always bad, inspect yourself). On Saturday, October 13, 2012 4:29:17 AM UTC-5, Alexey Guskov wrote: Hello everybody. I'm a huge fan of node.js and ve're actively using it in our project for creating various services. Recently we've faced a problem of significant ram overhead required to run each node.js instance (about 40Mb). This is an issue since we are running a number of different node.js services on one machine, and the memory is limited. So what we trying to use is run multiple services in single node.js process using vm.runInNewContext(), but compared this approach is missing some functionality: 1) We cannot monitor amount of memory allocated by each subprocess. 2) We cannot cancel all setTimeouts and process.nextTicks for given process to effectively stop its execution. 3) We cannot get a list of open sockets and file descriptors for given process. With this functionality we could use node.js similar to erlang - run a number of processes inside a single vm - and use some erlang features (like 'let it fail') that would certanly lead us to world domination ;) So, is there any projects targeted to solve similar problem? -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, 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] peeves current best practices?
My problem is not with using Travis, it is a warning. Travis does sometimes fail, and we have had situations where commits cause tests to fail according to travis while all local tests run on all machines we test. The cause of this has generally been the problems mentioned. On Friday, October 12, 2012 2:40:56 AM UTC-5, Tim Oxley wrote: Great, I agree, especially on the basic CI since travis makes it so simple. It amazes me how long some projects sit with failing travis tests… when failure is the norm it reduces the benefit of having CI in the first place. Time constraints are probably the issue here, though perhaps the solution is if you can't get your changes passing, push them onto a separate branch and restore the main branch to a passing state. Again, the primary benefit here is inspiring confidence in contributors and module consumers. - Tim On Friday, 12 October 2012 07:14:26 UTC+10, tedsuo wrote: All good points! I would add: *When in doubt, use callbacks* One gotcha that only occurs once you are well into a project is having a synchronous operation that returns a value turn into an asynchronous operation that requires a callback or event notification. This can create an untold amount of refactoring, as any code that depended on this operation may have to change *it's* api to use a callback, and so on up the chain. That can add major drag to your development. So, when in doubt, use a callback as your api. *Basic CI is too easy, there's no excuse not to use it* You can get your module tests up and running on travis-ci in like, 5 minutes. If it takes longer than that, there's probably some kind of deployment issue you need to deal with. So at minimum you should be using travis-ci or something similar for all production-ready modules. I feel a lot better about modules and services if I see them running on CI successfully. Ted On Oct 11, 2012, at 1:36 PM, Adam Crabtree atcra...@gmail.com wrote: It's a best practice because it helps those unfamiliar with the reasoning to keep from shooting themselves or their users in the foot. There are several ways that this may affect you, but a quick summary can be found here: http://howtonode.org/understanding-process-next-tick How slow is process.nextTick? A quick benchmark reveals it's not just 1ms, but in fact is roughly 1µs (0.001ms for the lazy): var i = 0, sum = 0 ;(function foo() { var t = process.hrtime() process.nextTick(function() { sum += process.hrtime(t)[1] if(++i1000) return foo() console.log('Average time: ', sum/i) }) })() That being said, there are always exceptions to the rule, and if you understand the tradeoffs and have a need to shave off µs, then go for it. Chances are though, for the other 99.9% it's a micro-optimization (no pun intended ;P). Again, this requires a special set of circumstances to be an issue, but when it is, discovering that the cause was a cache hit and a synchronous call to callback can be frustrating. Cheers, Adam Crabtree On Thu, Oct 11, 2012 at 12:50 PM, Axel Kittenberger axk...@gmail.comwrote: I'd rather see client patterns that are immune to callbacks being called before the function returns sometimes. Ditto! We should encourage people to write callers that are good, rather than libraries that deliberately waste performance and tell the callers its alright you wrote bad code, they have to put in a process.nextTick anyway. And 1ms can be a lot in some areas. Document your function accordingly, if it guarantees a particular callback/return order or not. In many situations, standard is, callback immediately if you have all what is needed for the callback. If the caller fucks up, that one should be fixed, instead of the callee. Or in other words, cure the problem, not the symptom. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nod...@googlegroups.com To unsubscribe from this group, send email to nodejs+un...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en -- Better a little with righteousness than much gain with injustice. Proverbs 16:8 -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nod...@googlegroups.com To unsubscribe from this group, send email to nodejs+un...@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:
Re: [nodejs] peeves current best practices?
Probably true especially regarding code complexity, but disk space is cheap. Though, the time to install all that stuff is a real bummer. If `npm install` was faster, would this be less of an issue? Disk is cheap, but if you actually do end up loading all the libraries at once you can see serious memory bloat for what could be a small one off script (have seen 20MB of bloat on some user's apps). -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, 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] NPM: How to install packages without compiling them
https://npmjs.org/doc/config.html#rebuild-bundle On Thursday, October 11, 2012 8:49:10 AM UTC-5, Mariusz Nowak wrote: Daniel, I think 'npm rebuild' may work for installation of already created bundle, but still what's missing is how to download all dependencies into correct folders without compiling them. On Thursday, October 11, 2012 3:30:37 PM UTC+2, Daniel R. wrote: I believe the easiest way to achieve what you want to do is by using the npm rebuild command. -- Daniel R. dan...@neophi.com [http://danielr.neophi.com/] On Thu, Oct 11, 2012 at 6:06 AM, Mariusz Nowak mar...@medikoo.com wrote: I'd like to create application bundle with all it's dependencies, so it can be installed on any platform without need of internet connection (other case is that it shouldn't be dependent on npm repository state - let's say I want to be sure I can install it without issues in 5 years time). So technically all packages with it's dependencies need to be downloaded as usually `npm install` does, but compile step shouldn't proceed. Afterwards when I load such bundle on any platform, `npm install` should (without need of downloading anything) just compile already present packages for given platform, What would be the easiest way to achieve that? Thanks! -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nod...@googlegroups.com To unsubscribe from this group, send email to nodejs+un...@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] NPM: How to install packages without compiling them
Forgot to mention, bundle the dependencies on your build server. On Thursday, October 11, 2012 10:25:56 AM UTC-5, Bradley Meck wrote: https://npmjs.org/doc/config.html#rebuild-bundle On Thursday, October 11, 2012 8:49:10 AM UTC-5, Mariusz Nowak wrote: Daniel, I think 'npm rebuild' may work for installation of already created bundle, but still what's missing is how to download all dependencies into correct folders without compiling them. On Thursday, October 11, 2012 3:30:37 PM UTC+2, Daniel R. wrote: I believe the easiest way to achieve what you want to do is by using the npm rebuild command. -- Daniel R. dan...@neophi.com [http://danielr.neophi.com/] On Thu, Oct 11, 2012 at 6:06 AM, Mariusz Nowak mar...@medikoo.com wrote: I'd like to create application bundle with all it's dependencies, so it can be installed on any platform without need of internet connection (other case is that it shouldn't be dependent on npm repository state - let's say I want to be sure I can install it without issues in 5 years time). So technically all packages with it's dependencies need to be downloaded as usually `npm install` does, but compile step shouldn't proceed. Afterwards when I load such bundle on any platform, `npm install` should (without need of downloading anything) just compile already present packages for given platform, What would be the easiest way to achieve that? Thanks! -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nod...@googlegroups.com To unsubscribe from this group, send email to nodejs+un...@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] NPM: How to install packages without compiling them
you can do something like ``` npm i cat package.json | json -e this.bundledDependencies='$(for FILE in $(ls -A node_modules); do printf $FILE ; done)'.split(/ /) package.json npm pack ``` We do something a bit more complex on our build server but this covers most cases (wont set env variables when spawning npm and such so rebuild-bundled will have to be set when you `npm i` on any other server if it has install scripts that need running even if it was bundled). On Thursday, October 11, 2012 12:19:56 PM UTC-5, Mariusz Nowak wrote: Bradley thanks, it's probably best way to install bundle that was already prepared, but do you know the way how can I create such bundle? This is what I'm missing (!) :) On Thursday, October 11, 2012 5:26:24 PM UTC+2, Bradley Meck wrote: Forgot to mention, bundle the dependencies on your build server. On Thursday, October 11, 2012 10:25:56 AM UTC-5, Bradley Meck wrote: https://npmjs.org/doc/config.html#rebuild-bundle On Thursday, October 11, 2012 8:49:10 AM UTC-5, Mariusz Nowak wrote: Daniel, I think 'npm rebuild' may work for installation of already created bundle, but still what's missing is how to download all dependencies into correct folders without compiling them. On Thursday, October 11, 2012 3:30:37 PM UTC+2, Daniel R. wrote: I believe the easiest way to achieve what you want to do is by using the npm rebuild command. -- Daniel R. dan...@neophi.com [http://danielr.neophi.com/] On Thu, Oct 11, 2012 at 6:06 AM, Mariusz Nowak mar...@medikoo.com wrote: I'd like to create application bundle with all it's dependencies, so it can be installed on any platform without need of internet connection (other case is that it shouldn't be dependent on npm repository state - let's say I want to be sure I can install it without issues in 5 years time). So technically all packages with it's dependencies need to be downloaded as usually `npm install` does, but compile step shouldn't proceed. Afterwards when I load such bundle on any platform, `npm install` should (without need of downloading anything) just compile already present packages for given platform, What would be the easiest way to achieve that? Thanks! -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nod...@googlegroups.com To unsubscribe from this group, send email to nodejs+un...@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] peeves current best practices?
Just beware of Travis CI failing for situations that are beyond your control. Missing C libraries, OS issues, and external resource needs can all be problematic. Also I have noted at least in the past sometimes travis fails to provision VMs appropriately. Running tests in your environment is the best way to test a module. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, 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: Poll for v0.10 feature: Crypto default to 'binary' strings vs defaulting to buffers
a. who is actually messing with crypto after the fact. I would like to know the reasons to do so. On Monday, October 8, 2012 6:24:36 PM UTC-5, Isaac Schlueter wrote: Currently, the crypto module defaults to using 'binary' encoded strings everywhere as the default input and output encoding. This is problematic for a few reasons: 1. It's slower than necessary. 2. It doesn't match the rest of Node. The reason for this is that crypto predates Buffers, and no one ever bothered to go through and change it. (The same reason it's got some odd hodgepodge of update/digest methods vs the Stream interface you see everywhere else in node.) The reason it persists in 0.8 (and perhaps in 0.10) is that we (perhaps overly optimistically) labelled that API stable, and don't want to break anyone's programs. It's going to change eventually to match the rest of node. The only question is whether the change will come in 0.10 or 0.12. A stream interface to all the crypto classes is coming in 0.10; using 'binary' strings by default is thus even more obviously a departure from the rest of node. Note that, if you only use crypto for hashes, and set the 'hex' encoding, then it won't affect you. If you only ever pass the output of one crypto function to the input of another (sign/verify, for example) then it also won't affect you; you'll just pass buffers around instead of binary strings. Please select one, and reply with your choice and perhaps any other feedback you have on this issue. Thanks. a) Go for it. This won't affect me, and if by chance it does, I don't mind putting 'binary' args here and there. b) Please wait. Mark the API as unstable in 0.10, but don't change it until 0.12. c) I have no opinion, because I don't use the crypto API directly. (Disclaimer: Node is not a democracy. The winning vote might still be out-voted by reasonable considerations of the core dev team. This is informative only ;) -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
[nodejs] Re: Node.jar - Java port by Oracle
As long as NPM works, since it uses Node's module loader apparently, I am sure some horrible but interesting bridges will be crossed on the NPM registry. Looking forward to it. On Thursday, October 4, 2012 12:16:24 PM UTC-5, Jonathan Buchanan wrote: I'm at JavaOne, for my sins, and I've been attending all the sessions related to Oracle's new JavaScript implementation in Java, called Nashorn. What initially caught my eye was that they're also porting the Node.js APIs, module system etc. in a project called Node.jar. Nashorn itself is going to be open-source, but it sounds like it's hard to get a hold of Node.jar even if you work for Oracle, and there are no plans to open-source Node.jar, but it could be another deployment option in the future and another way to get at multi-threading. These are what I can decipher from my scribbled notes: https://insin-notes.readthedocs.org/en/latest/JavaOne2012/meet_nashorn_bof.html https://insin-notes.readthedocs.org/en/latest/JavaOne2012/nashorn_node_jpa_persistence_bof.html They at pains to point out they hadn't looked at any other implementations to keep the JavaScript engine pure, but it sounds like the Node port is trying to reuse as much of the Node JS libs as possible and Node's tests. Has the Node dev team been involved with or consulted about any of this stuff? --- Jonny -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, 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: A quest for a more accurate net.isIP() for IPv6
split is a fairly expensive operation, for the most part I would guess the regex compiler would do a better job and avoid GC fluff. Ugly though. http://jsperf.com/ipv4-regex -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, 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: eventlocal and the need for a threadlocal like feature
Look into domains. You can just add a property to process.domain was something that was discussed at NodeConf summer camp. On Thursday, September 20, 2012 9:07:23 AM UTC-5, David Boon wrote: Forgive me for reviving this debate about threadlocals. Before anyone loses their heads, I'm not suggesting a need for threads or anything like that. However, I've used threadlocal a bit in other languages and and the lack of threadlocal(or something with a less contentious name that has nothing to do with threads) in node.js makes me wonder how people would solve problems like distributed transaction coordination? In frameworks I've used in the past it was common to associate transaction context in threadlocal. That way, if any part of the program needed to interact with the transaction coordinator (start, rollback, pause, resume, commit) the transaction coordinator could look in thread local for the transaction context and know exactly which transaction was in progress on this thread. That concept doesn't go away in node.js just because things are processed in an event loop, each pass of the event loop could be for different transactions. It seems that the only way around this is to always have a direct reference to the transaction context, meaning passed to every function that might need the transaction context. This approach seems to require transaction api details be litered throughout the code, and makes it nearly impossible for a 3rd party to quietly manage transactions. I use mongoose, and have created a plugin for tracking some audit information for each record change: module.exports.auditAttributesPlugin = function(schema, options) { schema.add({ createdOn: {type: Date, default: Date.now, required: true} , changedOn: {type: Date, default: Date.now, required: true} , createdBy: {type: Schema.ObjectId} , changedBy: {type: Schema.ObjectId} }); schema.pre('save', function (next) { this.createdOn = this.createdOn || Date.now; this.changedOn = Date.now; this.createdBy = this.createdBy || app.context.userId; this.changedBy = app.context.userId; console.log('orm plugin createdOn: %s, createdBy: %s, updatedOn: %s, updatedBy: %s', this.createdOn, this.createdBy, this.changedOn, this.changedBy); next() }); }; The part where I do app.context.userId, without a threadlocal, I need access directly to the request or session that contains the user id. Typically(in threaded languages) I'd use threadlocal to store information like the userid executing in this iteration of the event loop. This technique is pretty common, distributed transaction coordination, JAAS, etc. all use this technique. So far I haven't seen any solutions to this problem, so this post is either about to start a flame war, or could just be considered a vote for threadlocal like behavior, or if anyone has any good suggestions, I'd like to hear them. Thanks, 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
[nodejs] Re: Threading, and Dogmatisms.
There are long discussions in the Node community about what happened when we did try to use Isolates. The lack of thread level protections from things like mucking with process.* and the fact that native modules need to add complex support for Isolates to be first class (many C level libraries deal poorly with Isolates due to them not being exactly like threads from what I understand) are fairly well discussed. In addition things like C's abort(), and any shared memory still cause problems with Isolates. It would be interesting to delve into these problems, but for example if you use rust the runtime has explicit knowledge of threads rather than v8 so you can reduce most of the problems with concurrency to message passing and the same problems as process.* . People who complain about threads generally do not have in depth knowledge of difficulties in doing so with Node's environment, but should feel free to look them up and discuss solutions rather than simply stating it should have threads. I personally really like what Threads a Go Go does, but it still faces the difficulties listed above difficulties when you start to delve deep into it. On Sunday, September 16, 2012 4:51:43 PM UTC-5, rektide wrote: TL;DR: 1. Threads are a feature, one that will unlock new exciting things we can do and make existing features better (namely child_process.fork()). 2. We don't have that feature is not a feature, is not a pro. 3. Being dogmatic about what others ought do is bad: accept if not embrace input liberally. 4. Doing threads, safe concurrency right is what makes Rust so attractive, and Node can do it safely, cleanly too and nearly did, in the isolates branch. https://github.com/joyent/node/tree/isolates Onwards: On Sat, Sep 15, 2012 at 11:32:56AM -0700, Mark Hahn wrote: @rektide, are you saying that joyent is asleep at the wheel because they are stopping the community from using threads?� The community doesn't want threads because they violate the founding principle of Node, which is to use non-blocking event loops and get rid of threads. violate the founding principle? community doesn't want? As for doesn't want and founding principles, before threads became an awful horrible thing the Node community would have nothing to do with ever, there was a feature that got canned for being too complicating called Isolates, that, shock and awe, Node leads were hard at work on which would have added threading as a drop in replacement for child_process.fork(). Certainly no one was calling the feature anti-Node at the time, it would have been an implementation detail, offered the same functionality as already exists in Node today, and would have made us capable of doing more. https://groups.google.com/forum/?fromgroups=#!msg/nodejs/zLzuo292hX0/F7gqfUiKi2sJ https://github.com/joyent/node/tree/isolates Threading is not evil. Shared state is evil. Which is why the rest of the JavaScript world has Transferables, a way to move ownership of an object from one isolated thread/container to another. Processes preservation [read: apropo exclamative], Node is already a multi-reactor not a reactor, and there's no harm, nothing but technical gain (faster context switches, Transferables), from allowing that multi-reactor to run on threads as easily as it runs on processes. Aside from the work to get there, there's no cause to keep ourselves locked in to just using processes. http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#transfer-a-transferable-object I'm not at all saying Joyent is asleep at the wheel. They punted on this topic, this big hard hairy to implement topic: fine. It does hurt us, is a killer feature a mature runtime ought have in it's toolkit, but I have faith eventually we'll go to bat on the topic again in a serious manner in due time and I'm not sweating the innings lost between now and then. In the mean time, Joyent has been doing great things with Node and I'm delighted they continue doing so much to further Node. I know Ryah has gone on twitter and said he still sees Node as a web runtime. Isaac has similarly lamented allowing other languages to play in Node's pool. Online discussions have a lot of people defending node's lack of threading. I think much of this makes us look bad, (hipster-ish, dogmatic, and even jingoistic), to soapbox about what this thing is for, to rather than find value and positives define negatives and ills, to proscribe. For comparison, I'd champion Larry Wall's Perl: a super flexible language, but what I love more than anything else is how a-dogmatic it was, an explicitly post-modern language with an explicitly post-modern culture, where people didn't tell each other what to think or do and couldn't do otherwise in any kind of definitive manner
[nodejs] Re: Threading, and Dogmatisms.
Depends on what you consider to be problematic with process.* , process.cwd() in particular bit me while trying a couple things, but could be worked around, a slightly more annoying error dealt with cluster using env variables, once again possible to work around. As stated, I really like the approach taken by threads a gogo. I am not against threading, just very cautious. On Sunday, September 16, 2012 6:11:48 PM UTC-5, rektide wrote: Thanks so much for the informative reply: that's a lot of things I don't know about! On Sunday, September 16, 2012 6:22:50 PM UTC-4, Bradley Meck wrote: There are long discussions in the Node community about what happened when we did try to use Isolates. The lack of thread level protections from things like mucking with process.* Caveat emptor, doesn't seem like a real issue, just a fact of life. and the fact that native modules need to add complex support for Isolates to be first class (many C level libraries deal poorly with Isolates due to them not being exactly like threads from what I understand) are fairly well discussed. This in particular would be great to read about! This seems like the chief potential show-stopper, and most open ended problem. In addition things like C's abort(), and any shared memory still cause problems with Isolates. I'm less willing to say caveat emptor here, sounds harrier, but again doing it and creating potential problems (particularly if they're exit case problems) seems preferable to not doing it. It would be interesting to delve into these problems, but for example if you use rust the runtime has explicit knowledge of threads rather than v8 so you can reduce most of the problems with concurrency to message passing and the same problems as process.* People who complain about threads generally do not have in depth knowledge of difficulties in doing so with Node's environment, but should feel free to look them up and discuss solutions rather than simply stating it should have threads. I have done some attempts at research on the topic: this has been considerably more informative than any threads I've turned up. Perhaps I was doing my search wrong. That all said, apologies for not being able to bring a more balanced perspective to my should have threads stance, I would like to be able to do better. personally really like what Threads a Go Go does, but it still faces the difficulties listed above difficulties when you start to delve deep into it. Thanks for contributing. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, 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] Unload entire module
How do people unload entire modules after they are done using them, we have some very long running apps we are trying to reduce the footprint on and unloading certain modules seems to be a good start. For example if we could eventually end up with something like: require.unload('nconf') after the configuration phase of startup. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, 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: Feature poll: Do you use the clientError event?
3 Hook into .on('request') or .on('connection') if you want it, thats how i do it already. On Wednesday, August 29, 2012 6:07:23 PM UTC-5, Isaac Schlueter wrote: Do you use the clientError event? Please choose one: 1. Yes, I use it all the time. Please don't change it ever, thank you. 2. I don't use it, but I'm aware of it, and I think I might someday. 3. I don't use it, and I think it's stupid. 4. The what now event? Thanks. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
[nodejs] Re: possible in npm to force architecture?
try setting the `npm_config_arch` environmental variable to your desired architecture when spawning `npm`. Related Code: https://github.com/TooTallNate/node-gyp/blob/master/lib/node-gyp.js#L142 https://github.com/TooTallNate/node-gyp/blob/master/lib/configure.js#L235 On Tuesday, August 28, 2012 7:23:11 AM UTC-5, sihorton wrote: I am on 64bit windows and am able to compile iconv. However I want to distribute the application to run on 32 bit windows. I am able to run the Windows SDK 7.1 Command Prompt and set the architecture to x86. However when I then do: npm install iconv I get the followng: node C:\Program Files (x86)\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js rebuild C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\x64\PlatformToolsets\Windows7.1SDK\Microsoft.Cpp.x64.Windows7.1SDK.targets(20,5): error : You are attempting to build an AMD64 application from an x86 environment. If using the Windows 7.1 SDK, type setenv /x64 [C:\Program Files (x86)\nodejs\node_modules\iconv\build\iconv.vcxproj] gyp ERR! rebuild error Error: `msbuild` failed with exit code: 1 gyp ERR! rebuild error at ChildProcess.onExit (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:215:23) Looking through the docs it appears that npm is trying to compile the 64bit version of iconv since that is what process.arch returns as the architecture. How do I force npm to build the 32bit version instead? /Simon -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
[nodejs] Re: Is npm 1.1.49 slightly broken for global installs on Windows?
I have heard of a different person with what sounds like a similar problem, but no idea how wide spread it is. On Friday, August 17, 2012 2:00:49 PM UTC-5, adrians wrote: With node 0.8.7 x64 (Windows 7), npm seems to not see global modules installed under userdir/npm/... It only seems to look at the node_modules dir inside the install location. As well, when trying to install modules with -g, there are errors because it's trying to put the global module under the install dir, c:\Program Files\nodejs\node_modules and for this it needs permissions which it doesn't have. Reverting back to node 0.8.6 and npm 1.1.48 shows correct behavior. Is this a known issue? Cheers, Adrian -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en