Re: [nodejs] Re: Nodejs listening to a server port and every time you get a 'request' record in database and show to the client.

2013-08-27 Thread Martin Cooper
-- Martin Cooper On Tue, Aug 27, 2013 at 8:43 AM, Felipe Silveira cont...@felipems.com.brwrote: The example of nodejs.org listen the port 1337 on http but I need to listen in TCP/IP or UDP have some mode to do? On Tuesday, August 27, 2013 9:42:38 AM UTC-3, Felipe Silveira wrote: Hello Guys, I'm

Re: [nodejs] process out of memory error with 0-wait setTimeout

2013-08-27 Thread Martin Cooper
I ran it with v0.10.15 initially. With v0.8.22, it's been running for over 1.5 hours now, with no problems. So I still think the problem must be with the ... sections. -- Martin Cooper On Mon, Aug 26, 2013 at 10:28 PM, ming hseum...@gmail.com wrote: Hi Martin, Thanks for the input. i

Re: [nodejs] Re: The problem with the current working directory

2013-08-26 Thread Martin Cooper
, someone running multiple instances of their app from different working directories, specifically to pick up different configs from those directories, shouldn't be faced with a slew of warnings when their app is working as designed. -- Martin Cooper The process.root solution is already implemented

Re: [nodejs] Problem with Node.js in For in

2013-08-23 Thread Martin Cooper
And that is exactly the problem. The for ... in construct is defined as enumerating the properties of objects, not the elements of arrays. -- Martin Cooper On Fri, Aug 23, 2013 at 4:39 AM, .//Hack dsshac...@gmail.com wrote: if you look closely, I use array of objects. And iteration in array

Re: [nodejs] process out of memory error with 0-wait setTimeout

2013-08-23 Thread Martin Cooper
I think you'll find that the problem is in one of the ... sections you've omitted. Your foo1 code has been running on my machine all day without any issue at all. -- Martin Cooper On Wed, Aug 21, 2013 at 8:22 PM, ming hseum...@gmail.com wrote: Hi, My node.js program crashed and i saw

Re: [nodejs] Modules by Author

2013-08-21 Thread Martin Cooper
any reason you shouldn't be able to post there. Odd. -- Martin Cooper On Wed, Aug 21, 2013 at 9:46 AM, Michael Schoonmaker michael.r.schoonma...@gmail.com wrote: Maybe I'm missing something obvious, but hunting around the various docs hasn't revealed a way to get all modules by author. All

Re: [nodejs] Rewriting paths with fstream, tar

2013-08-21 Thread Martin Cooper
/utils/tar.js#L212 Hope that helps. -- Martin Cooper On Wed, Aug 21, 2013 at 3:53 PM, Brian Lalor bla...@bravo5.org wrote: This isn't pertinent to core node.js, but I'm hoping someone might be able to give me a hand. I want to accomplish the equivalent of tar -cf output.tar -C /tmp/whatever

Re: [nodejs] Quick question about npmjs.org

2013-08-18 Thread Martin Cooper
args to limit the data, when you use 'npm search'; you can use '-dd' to see the URLs that npm sends to the registry. -- Martin Cooper On Sun, Aug 18, 2013 at 10:26 AM, Stewart Obert ceditsoftw...@gmail.comwrote: Hi, I wanted to find out with the site (npmjs.org) is there any method to retrieve

Re: [nodejs] Will it be possible to dispose module cache?

2013-08-17 Thread Martin Cooper
not be so much of an issue, but it's still a risk, especially if the modules being removed from the cache are non-trivial and / or not written by the framework designer. -- Martin Cooper On Sat, Aug 17, 2013 at 2:42 AM, George Stagas gsta...@gmail.com wrote: function removeCached(mod) { delete

Re: [nodejs] how to get object using nodejs from cypher query?

2013-08-17 Thread Martin Cooper
The literal you pasted is an array of objects. You appear to be assuming it's already the first object in that array. So if 'rels' is actually what you pasted, you want rels[0].rels.type. -- Martin Cooper On Sat, Aug 17, 2013 at 2:45 AM, Jyoti Chhetri nitrous.ooox...@gmail.comwrote: I have

Re: [nodejs] Will it be possible to dispose module cache?

2013-08-17 Thread Martin Cooper
interface, understands all of this, you may be okay, but I do think it's fragile. -- Martin Cooper On Sat, Aug 17, 2013 at 9:35 AM, Tony Huang cnwz...@gmail.com wrote: @Martin I have noticed this risk. So: 1) This will be just a limited feature used in my framework, it might go open source

Re: [nodejs] Will it be possible to dispose module cache?

2013-08-17 Thread Martin Cooper
enough information for us to be able to determine that. But at least armed with the information, he can make an informed decision. -- Martin Cooper On Sat, Aug 17, 2013 at 10:48 AM, George Stagas gsta...@gmail.com wrote: @Martin We could list all the hypothetical breaking cases but I don't think

Re: [nodejs] zlib fails to extract concatenated files

2013-08-10 Thread Martin Cooper
it from the original buffer. But remember that only you know the structure of the file you are reading; there is no structure embedded within the file for some piece of code to interpret. -- Martin Cooper On Fri, Aug 9, 2013 at 11:45 PM, ribao wei riba...@gmail.com wrote: Hi, I just encounter

Re: [nodejs] zlib fails to extract concatenated files

2013-08-10 Thread Martin Cooper
multiple blocks (members), given that there's no provision in the API for calling the callback multiple times, once with the output of each block. Ben appears to have a different opinion, though, so I guess the API semantics just changed, in my mind. :-) -- Martin Cooper On Sat, Aug 10, 2013

Re: [nodejs] Help: Post query not working with express.js

2013-08-03 Thread Martin Cooper
You need to give the textarea a name. Try: textarea(name='thing') Type Something. -- Martin Cooper On Sat, Aug 3, 2013 at 7:31 AM, Ashutosh Das areos...@gmail.com wrote: I m coding simple cms using tinymce , Here is the code of Jade part : body form(method=post ,action

Re: [nodejs] Node.js - Domain per Express request, inside another domain

2013-07-19 Thread Martin Cooper
statements in process.nextTick() / setImmediate(), you'd be fine. -- Martin Cooper On Fri, Jul 19, 2013 at 6:52 AM, Lee l...@leebenson.com wrote: *Copied from http://stackoverflow.com/questions/17729900/node-js-domain-per-express-request-inside-another-domain * I'm trying to layout a basic

Re: [nodejs] Announcement/Plea for help: Golems.io a Fixtures-As-A-Service solution

2013-07-12 Thread Martin Cooper
What you're describing sounds a lot like this: http://www.generatedata.com/ What would be the key differentiators? -- Martin Cooper On Fri, Jul 12, 2013 at 12:45 PM, Ken ken.woodr...@gmail.com wrote: TL;DR: I started something I can't finish, want to help me? Many times in my career I've

Re: [nodejs] Re: Error handling: current state of affairs?

2013-07-08 Thread Martin Cooper
exception (e.g. from your '/throw' handler) will be caught by that, and not handled by the domain. The reason your '/database' handler works is that the exception is thrown outside of the request handler itself, because of that setTimeout() call. -- Martin Cooper On Saturday, July 6, 2013 4:17:28 AM UTC

Re: [nodejs] Assertion Error: Path must be string

2013-07-01 Thread Martin Cooper
to require(). The assertion was added in Node v0.10.x. I suspect the error is in your own code, since I can require('nodemailer') on Node v0.10.5 without any problems. -- Martin Cooper I am working in coffeescript. I do: nodemailer = require('nodemailer') Is this a known bug ? I reinstalled

Re: [nodejs] Looking for design pattern or module to invoke Re-Authentication in a REST client I am building

2013-06-26 Thread Martin Cooper
); _this._reqs[reqId] = ctx; _this._request.get(opts,ctx.func); //use the node-request module object to carry out the REST call Hope that helps. -- Martin Cooper After looking as many of the REST Client modules most handle basic HTTPAuth, but no hooks/tools for standard forms

Re: [nodejs] [ANN] ynpm: using package.yaml files instead of package.json

2013-06-24 Thread Martin Cooper
, yaml-pkg, ypnpm (yaml-patched npm). Did I say I was no good at naming things? :-) -- Martin Cooper Special keys are obviously ugly and generate too much noise. Besides, originally I wanted to comment dependencies, so it can't be used anyway. This was discussed over and over in the past

Re: [nodejs] How to report errors from streams

2013-06-19 Thread Martin Cooper
handler, if it ends up being caught and handled elsewhere. -- Martin Cooper Here's a simplified example of what I'm working on. This is a small express app that uses request to download an image from a server, pipes it through ImageMagick's convert program to resize it, and pipes that to the http

Re: [nodejs] Re: Having trouble replicating with npm repo (couchdb) - anyone tried it lately and/or seen this error?

2013-05-18 Thread Martin Cooper
like shadow-npm, for example: https://github.com/dominictarr/shadow-npm (Caveat - I haven't actually used this, I just know it's out there.) -- Martin Cooper On Tuesday, May 14, 2013 7:16:51 AM UTC+4, andy wrote: Based on the awesome feedback I got from https://groups.google.com/d/msg/nodejs

Re: [nodejs] preferred license for node modules?

2013-05-07 Thread Martin Cooper
the terms, and there's a need, someone else will write one with more acceptable terms. You won't force anyone to pay. -- Martin Cooper -- // alex 07.05.2013, 16:51, Saleem Abdul Hamid meel...@gmail.com: Is there a license that says most people can do whatever you want with my stuff

Re: [nodejs] api in npm for getting the number or list of dependent packages?

2013-05-04 Thread Martin Cooper
The simplest way is to grab the package metadata from the registry with this URL: http://registry.npmjs.org/package/latest That will get you a JSON version of the same object you see with 'npm view package', at which point you can just pluck out the 'dependencies' object. -- Martin Cooper

Re: [nodejs] Re: AngularJS inspired dependency injection in Node (feedback?)

2013-04-25 Thread Martin Cooper
The piece I'm still missing is, how do I inject modules I didn't write? For instance, how would I inject 'fs' or 'http'? Or perhaps 'request'? -- Martin Cooper On Thu, Apr 25, 2013 at 12:04 PM, Scott Corgan scottcor...@gmail.comwrote: Put together a quick blog post describing the problem I am

Re: [nodejs] extracting a github tarball archive using streams

2013-04-25 Thread Martin Cooper
' } ) ) (with the requisite error handling, of course). -- Martin Cooper */ -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs

Re: [nodejs] NPM - Working around SSH firewall blocks

2013-03-26 Thread Martin Cooper
/dominictarr/shadow-npm. -- Martin Cooper On Mar 25, 2013, at 8:29 PM, Martin Cooper mfncoo...@gmail.com wrote: My own perspective is that relying on projects that declare their dependencies this way is a really bad idea. They're relying on unreleased versions of packages that aren't

Re: [nodejs] NPM - Working around SSH firewall blocks

2013-03-25 Thread Martin Cooper
that this is a bigger issue than just having npm futz around with the specified protocols to see if it can find one that works. -- Martin Cooper On Mon, Mar 25, 2013 at 4:46 PM, Daniel Wabyick dwaby...@gmail.com wrote: We have a build environment where our build servers do not have external

Re: [nodejs] npm link and global-ness

2013-03-25 Thread Martin Cooper
location to be found in which to put the links. However, you're free to put these wherever you like, since the location is actually based on the configured `prefix` value, which you can change at will. So you're by no means tied to a location that requires sudo. -- Martin Cooper Before I bothered

Re: [nodejs] [ANN] address-rfc2822

2013-03-18 Thread Martin Cooper
On Mon, Mar 18, 2013 at 8:16 AM, Matt hel...@gmail.com wrote: Travis is great, but covers one OS and one version of Node (from what I can tell). Just FYI, it's 3 versions of Node right now. You can choose one or more of 0.6, 0.8, 0.10. -- Martin Cooper Cpantesters covers about 15

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

2013-03-13 Thread Martin Cooper
) npm init only creates the package.json file for you, so I wouldn't anticipate any use strict usage there. :) -- Martin Cooper AJ ONeal (317) 426-6525 On Wed, Mar 13, 2013 at 4:26 PM, Luke Arduini luke.ardu...@gmail.comwrote: Since use strict; is function scoped people should just use

Re: [nodejs] Objects in node.js

2013-03-11 Thread Martin Cooper
node.js and JavaScript. It will be great help to me, if somebody can give some insights on how to do simple OOP in node.js. Thanks in advance. Did you export DBManager from smailer.js? -- Martin Cooper Venki function DBManager(port, host, dbname) { // Retrieve var MongoClient = require('mongodb

Re: [nodejs] Re: learning NodeJS and looking for something similar to Apache Wicket (or similar component framework)

2013-03-08 Thread Martin Cooper
from Component wrapped in partials : I would like everything (e.g. my extended mixings) to behave as components as well. Maybe I should give it a try and create want I want myself;-) You might want to take a look at Mojito: https://github.com/yahoo/mojito -- Martin Cooper -- Regards

Re: [nodejs] fs.createWritestream change path dynamically

2013-03-07 Thread Martin Cooper
as the client. -- Martin Cooper Is there a way to handle this more dynamically?? Perhaps creating the stream first like an global object and later set the filename and then using the stream via something like a method??? Regards Thorsten -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines

[nodejs] [ANN] mockery 1.4.0, now with cache control

2013-01-20 Thread Martin Cooper
://npmjs.org/package/mockery https://github.com/mfncooper/mockery Note: Please don't confuse 'mockery' with 'Mockery', which someone else created a few months after 'mockery' was released and then deprecated but which is still in the registry. -- Martin Cooper -- Job Board: http://jobs.nodejs.org/ Posting

Re: [nodejs] [Idea]: npm as a dependancy injector.

2013-01-20 Thread Martin Cooper
for. -- Martin Cooper My idea is to make node more flexible in the directories it chooses to look for node modules by providing an alternative mode for it to look in - ie if *NODE_MODE* is set to test, then npm will first try to look in ./test_node_modules for a package before looking in ./node_modules

Re: [nodejs] [ANN] middler - an embeddable middleware runner

2013-01-17 Thread Martin Cooper
to write all your own middleware. :-) That said, I accept that this will minimise dependencies that you won't be using. -- Martin Cooper It's also worth saying that the middleware included in connect is a great companion to a middler-driven app, and likewise middler can be used to build advanced

Re: [nodejs] [ANN] middler - an embeddable middleware runner

2013-01-13 Thread Martin Cooper
connect, since they look very much alike to me. Could you say some more about when it would benefit me to pick middler over connect? -- Martin Cooper Other nice things: - used in production ~5 months, with great results - tested on travis-ci - very fast - benchmarks included - no dependencies

Re: [nodejs] comments in package.json

2013-01-05 Thread Martin Cooper
3. No multiline comments comment: [ This, is, a, multiline, comment ] -- Martin Cooper 4. Isn't allowed by strict javascript (so, we might expect some trouble in the far future) 5. Looks ugly -- Regards, Alex 06.01.2013, 02:21, Dick

Re: [nodejs] Manually install module that isn't in NPM

2012-12-30 Thread Martin Cooper
process, etc. -- Martin Cooper Changed socket.io-client to socket.io.client-1.0 in some files, because they except the first name. And then I run sample application: var io = require('socket.io-1.0')(7001); io.on('connection', function(socket){ socket.on('event', function(data

Re: [nodejs] Manually install module that isn't in NPM

2012-12-30 Thread Martin Cooper
, as Jose said, are *not* the same as install from the registry. We understand you can't install from the registry. We're trying to give you workable alternatives. :) -- Martin Cooper 2012/12/30 Nuno Job nunojobpi...@gmail.com Use npm. Nuno Sent from my iPhone On Dec 30, 2012, at 4:13 PM

Re: [nodejs] Manually install module that isn't in NPM

2012-12-30 Thread Martin Cooper
://github.com/LearnBoost/socket.io-client.git#1.0 $ npm install git://github.com/LearnBoost/socket.io.git#1.0 It worked for me. -- Martin Cooper 2012/12/30 Martin Cooper mfncoo...@gmail.com On Sun, Dec 30, 2012 at 8:55 AM, Kamil Krzyszczuk krzyszczukka...@gmail.com wrote: Nuno, read posts

Re: [nodejs] new concept for structured asynchronous programming

2012-12-29 Thread Martin Cooper
. Right now, we don't have any of those, so we can only speculate about what it might look like if we tried to use it for something real. -- Martin Cooper I don't know. If nodejs team believes current solutions are optimal, so be it. -- Job Board: http://jobs.nodejs.org/ Posting

Re: [nodejs] Load Html file.

2012-12-28 Thread Martin Cooper
appropriate responses there, from people who know the framework you're using. -- Martin Cooper LayoutController.layout = function(obj) { var http = require('http'), fs = require('fs'); var html = fs.readFileSync('./app/views/'+ obj.__action+'/'+obj.fileName); http.createServer(function(request

Re: [nodejs] Re: require() MODULE_NOT_FOUND - yet it does exist

2012-12-27 Thread Martin Cooper
is required. -- Martin Cooper - /users/thatguy/dev/foo/bar/baz/node_modules/fob.js - /users/thatguy/dev/foo/bar/baz/node_modules/fob/index.js - /users/thatguy/dev/foo/bar/node_modules/fob.js - /users/thatguy/dev/foo/bar/node_modules/fob/index.js - /users/thatguy/dev/foo/node_modules

Re: [nodejs] Inconsistent method names?

2012-12-27 Thread Martin Cooper
(), sandbox); console.log(sandbox.myDate instanceof Date); will output 'false', because Date in the new context is not the same as Date in the original context. Just one of those little things to be aware of. -- Martin Cooper Rick On Thu, Dec 27, 2012 at 11:47 AM, David Habereder david.habere

Re: [nodejs] Load Html file.

2012-12-27 Thread Martin Cooper
not be good! You would need to look at the request, in your server, to determine what you should be sending back. Again, the tutorials should help you understand this better. -- Martin Cooper It might be a good idea for you to work through one or two tutorials on Node, so that you get a clearer

Re: [nodejs] Load Html file.

2012-12-26 Thread Martin Cooper
to several of those in the archives of this list. Those at http://www.nodetuts.com/ and http://www.nodebeginner.org/ seem to be fairly frequently referenced here. -- Martin Cooper http.createServer(function(request, response) { response.writeHeader(200, {Content-Type: text/html}); response.write(html

Re: [nodejs] describe is not defined

2012-12-24 Thread Martin Cooper
' is not defined almost certainly because mocha was not started properly. -- Martin Cooper This is my code: var Mocha = require('mocha'); var assert = require(assert) describe('Array', function(){ describe('#indexOf()', function(){ it('should return -1 when the value is not present

Re: [nodejs] execute child process as root user?

2012-12-24 Thread Martin Cooper
#child_process_child_process_spawn_command_args_options -- Martin Cooper --regards --kuno -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups

Re: [nodejs] preferred license for node modules?

2012-12-15 Thread Martin Cooper
instead of being forced to use GPL because a dependency is GPL? Earlier Martin Cooper raised the question of what does it mean to link in JavaScript. That wasn't just an idle question, because IIRC the GPL viralness kicks in when you link code together. In JavaScript there's no linking

Re: [nodejs] preferred license for node modules?

2012-12-14 Thread Martin Cooper
terms. Hope that helps. -- Martin Cooper + David Herron - nodejs.davidherron.com -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs

Re: [nodejs] preferred license for node modules?

2012-12-14 Thread Martin Cooper
why you consider those extremes. :-) If you're looking for a license that is not either of those, what is it that you want to achieve with the license, and how do you anticipate enforcing your choice? -- Martin Cooper + David Herron -- Job Board: http://jobs.nodejs.org/ Posting guidelines

Re: [nodejs] ReadableStream from Buffer

2012-12-12 Thread Martin Cooper
://github.com/mjijackson/bufferedstream -- Martin Cooper I found 2 modules, both of which seem unrelated: https://github.com/dodo/node-bufferstream https://github.com/bnoordhuis/node-buffertools Regards, -Dhruv. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent

Re: [nodejs] Waiting for multiple runs of Mongoskin

2012-12-08 Thread Martin Cooper
enclosing function to take in a callback, as mentioned above, then you can call that callback here, instead of trying to return. -- Martin Cooper } }); }); I also tried wrapping db.collection in a function and passing it to async.parallel without luck. Any suggestions? -- Job Board: http

Re: [nodejs] Re: Should stream.pipe forward errors?

2012-11-28 Thread Martin Cooper
are interspersed within my pipe setup, because it gives me flexibility in both determining, and reporting, what went wrong. If I don't want to make use of that flexibility, then I can reuse the same handler, as in your example. But I have that choice. -- Martin Cooper -- Job Board: http://jobs.nodejs.org

Re: [nodejs] Streams Pipes for non Buffer / String use cases?

2012-11-23 Thread Martin Cooper
On Fri, Nov 23, 2012 at 6:14 AM, Darach Ennis dar...@gmail.com wrote: Hi guys, Are there any plans to further generalize streams and pipes? Are you perhaps looking for something like this? https://github.com/dominictarr/event-stream -- Martin Cooper I would like to use them in process

Re: [nodejs] Re: [EARLY ANN] V8 clone exposed to node.js

2012-11-22 Thread Martin Cooper
those, even if Node has a fast clone built in. -- Martin Cooper четверг, 22 ноября 2012 г., 18:05:18 UTC+7 пользователь Alexey Kupershtokh написал: I see that almost every framework (underscore, lodash, moo, etc) creates its own clone function. But v8 engine already has it. So I've created

Re: [nodejs] Re: find path of module require()ing

2012-11-17 Thread Martin Cooper
for trouble, now or in the future. For an example, see: https://github.com/joyent/node/issues/4233#issuecomment-10046241 -- Martin Cooper On Monday, November 12, 2012 3:46:29 AM UTC-5, greelgorke wrote: guess there is no other way. but the whole task smells like hell to me. why does your module need

Re: [nodejs] Re: require

2012-11-15 Thread Martin Cooper
https://github.com/joyent/node/blob/master/src/node.js#L726 https://github.com/joyent/node/blob/master/lib/module.js#L453 NativeModule.require() is used to get at those modules that are baked into Node itself; a regular 'require' is used for everything else. -- Martin Cooper On Nov 15, 8:21 pm

Re: [nodejs] Error: spawn EMFILE

2012-11-15 Thread Martin Cooper
-- Martin Cooper On Friday, February 10, 2012 12:25:00 PM UTC-5, JoshK wrote: Actually I found out that ulimit is only a modification for the shell session. If I run `ulimit -n 1` in the same session as the node process it works (or appears to). Regards, –Josh

Re: [nodejs] Please provide feedback as to best practice for reading files from a specific directory

2012-11-13 Thread Martin Cooper
it for a file system path and not a URL. Keep those separate so you don't trip yourself up later. -- Martin Cooper On Mon, Nov 12, 2012 at 4:07 AM, kinghokum butt...@gmail.com wrote: Hi all, Just wondering if this is any better. I've tried to implement what Martin has suggested best to my

Re: [nodejs] Please provide feedback as to best practice for reading files from a specific directory

2012-11-11 Thread Martin Cooper
this, though.) * You should use the 'path' module to resolve the paths to your directories and files, instead of gluing them together as strings. Hope that helps. -- Martin Cooper On Fri, Nov 9, 2012 at 9:56 PM, Chris Buttery butt...@gmail.com wrote: Hi Everyone, I'm a long time reader, first time

Re: [nodejs] fs.read'ing a stream.fd

2012-11-10 Thread Martin Cooper
. On the other hand, if you want to read the file manually, you'll need to open it using fs.open() first. Then you can use fs.read() calls to get the data. I'd recommend the stream approach, unless there's some reason you can't do that. -- Martin Cooper On Sat, Nov 10, 2012 at 12:00 PM, Volkan

Re: [nodejs] Socket.io, answer WELL, don't lock.

2012-10-31 Thread Martin Cooper
! node install.js ERR! You can get their info via: ERR! npm owner ls ws which should have sent you to the 'ws' issue tracker right away. -- Martin Cooper and I also didn't know much about the path variable. Op woensdag 31 oktober 2012 15:22:29 UTC+1 schreef Dan Milon het volgende: You

Re: [nodejs] npm and NodeJS versions: got rid of package hell, now have node version hell?

2012-10-21 Thread Martin Cooper
); process.exit(1); } -- Martin Cooper On Sun, Oct 21, 2012 at 12:16 PM, ack a.c.kal...@gmail.com wrote: First off, I'm new to Node.js and npm, but I like it quite a lot already. I installed and tinkered with quite a few packages and tools, and I must say, I'm quite impressed with what npm

Re: [nodejs] Stop readline Writing Input to the Output

2012-10-14 Thread Martin Cooper
what you want by using 'read' instead: https://github.com/isaacs/read -- Martin Cooper On Sunday, October 14, 2012 10:16:11 PM UTC+3, Alex Kocharin wrote: Replace process.stdout with a custom stream? -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node

Re: [nodejs] Why there's no callback for opening stream?

2012-10-07 Thread Martin Cooper
for? -- Martin Cooper -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to nodejs

Re: [nodejs] Re: Request for feedback- Yet another client-side module loader (it's different, I promise:))

2012-10-05 Thread Martin Cooper
GPLv3? Really? That seems like an odd choice in Node's predominantly MIT / BSD world, especially if you're looking for adoption. -- Martin Cooper On Fri, Oct 5, 2012 at 10:24 AM, Saleem Abdul Hamid meel...@gmail.com wrote: More updates :) I added a plugin api, and wrote two example plugins

Re: [nodejs] NPM without https-proxy

2012-09-17 Thread Martin Cooper
https-proxy to it complains that it must be a full url. is there a way around this? Have you updated the registry URL to specify http instead of https? npm config set registry http://registry.npmjs.org/ -- Martin Cooper Malcolm -- Job Board: http://jobs.nodejs.org/ Posting guidelines

[nodejs] Creating zip files

2012-09-06 Thread Martin Cooper
being maintained. Anything else out there that I've missed? -- Martin Cooper -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group

Re: [nodejs] Creating zip files

2012-09-06 Thread Martin Cooper
for you? No, unfortunately. That would simplify things, for sure. The consumer of these files needs them to be zips, though. -- Martin Cooper On Thu, Sep 6, 2012 at 7:24 PM, Martin Cooper mfncoo...@gmail.com wrote: Any good packages out there for creating zip files? I found adm-zip

Re: [nodejs] Analyzing All Require Calls

2012-08-25 Thread Martin Cooper
try this and see if the output might help you: node -pe require('mockery').enable();require('your-lib') (This is a long way from what 'mockery' was designed for, but may just help!) -- Martin Cooper Best, Azer -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com

Re: [nodejs] Re: Choose an extension is suit for nodejs ?

2012-08-11 Thread Martin Cooper
expose mappings from page extensions to implementation engines any more. Instead, probably the most common pattern is route mapping in the style of Express and others. You may want to take a look at that. -- Martin Cooper -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https

Re: [nodejs] Counting on Object Insertion Order

2012-08-09 Thread Martin Cooper
= { database: [ { id: pg, url: psql://localhost/database }, { id: mysql, url: mysql://localhost/database } ] }; -- Martin Cooper for (var type in conf.database) { try { useDatabase(require(type), conf.database[type]); } catch (e) { if (e.code

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

2012-08-07 Thread Martin Cooper
need to do something with results. }) -- Martin Cooper -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group

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

2012-08-05 Thread Martin Cooper
does. :) It returns an array containing the elements that were spliced out of the original array. -- Martin Cooper Any answers or additional links are really appreciated. When I search for javascript help, I end up on HTML javascript pages, which obviously doesn't work as I expect. -- Job

Re: [nodejs] how to do performance test of my POST service

2012-08-03 Thread Martin Cooper
, instead of writing it to disk first and then immediately reading it back just so that you can stream it out again. I'm not sufficiently familiar with formidable to know how this capability is exposed in the API, but I see the low-level events in the parser, so I'm assuming there's a way. -- Martin Cooper

Re: [nodejs] Any library for getting NPM version from a module?

2012-07-29 Thread Martin Cooper
' + pkg.version); -- Martin Cooper , like following; var currentVersion = require('current-version'); currentVersion(function(error, v){ console.log( 'v'+ v); }); Azer -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting

Re: [nodejs] sending a file using HTTP PUT

2012-07-23 Thread Martin Cooper
your Node code is doing. Instead, if you have a small amount of data, just provide that as 'body' (not inside 'multipart') in the request options. Better, though, is to stream the body data, as in one of the earlier examples in the request library readme. -- Martin Cooper Here is the way I do

Re: [nodejs] Best practices for sharing code and data between the server and client

2012-05-30 Thread Martin Cooper
.) -- Martin Cooper I have come across many ideas: express-expose: this is a nice replacement for parsing JSON objects rendered by the the server. https://github.com/visionmedia/express-expose This article exposes a hack to share backbone models on the Node server, and they are trying to neat

Re: [nodejs] NPM can't install appjs. Error: Cannot find module 'graceful-fs'

2012-05-30 Thread Martin Cooper
-fs, not from any install targets. How did you install node and npm, and what versions do you have? Can you run any npm commands (e.g. npm -v or npm view ini) successfully? -- Martin Cooper zephlon@zephlon-T5254:~$ npm install appjs node.js:201    throw e; // process.nextTick error, or 'error

Re: [nodejs] Get latest version

2012-05-28 Thread Martin Cooper
/repos/show/joyent/node/tags That doesn't include the specification of which version is the latest, but deriving that from the keys should be pretty straightforward. -- Martin Cooper -- Att, Alan Hoffmeister -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com

Re: [nodejs] hamljs issues with node 0.6.17

2012-05-11 Thread Martin Cooper
of the symlink also works, as in: var haml = require('hamljs/lib/haml.js'); -- Martin Cooper Thanks, K. --- http://blitz.io @k0ws1k -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message

Re: [nodejs] Re: mocking across tests

2012-04-07 Thread Martin Cooper
and newer versions of Node. -- Martin Cooper On Mon, Mar 12, 2012 at 12:12 AM, Aneil Mallavarapu an...@blipboard.com wrote: Hi Bryan - The way mockery suggests you handle this issue is by calling      mockery.registerAllowable(modulePath,true); Where the second argument is unhook, a signal

Re: [nodejs] travis-ci with node

2012-04-03 Thread Martin Cooper
/.travis.yml and here's the Makefile target it looks like that's firing off: https://github.com/joyent/node/blob/master/Makefile#L51 -- Martin Cooper  (travis site says it can use vovs or espresso)   experiences ? -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com

Re: [nodejs] Getting started with testing and using stubs

2012-03-24 Thread Martin Cooper
test calls authenticate(), that invocation will be using your mock users.get() instead of the real one. Hope that helps. -- Martin Cooper I've got a file called auth.js with a function that looks like: authenticate(email, password, callback). The authenticate function tries to fetch a user

Re: [nodejs] local npm mirror not behaving

2012-03-20 Thread Martin Cooper
top-of-host urls here: https://github.com/isaacs/npmjs.org/ -- Martin Cooper Any help is appreciated. Thank You Troy Dawson -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you

Re: [nodejs] which one is correct ?

2012-03-09 Thread Martin Cooper
of an array, since you could then simply reference users[id] instead of having to walk the array. In fact, even if you do need an array for other use cases, it may be worth considering keeping an object as well, especially if the number of users gets long and / or get_user is called a lot. -- Martin

Re: [nodejs] Error: failed to fetch from registry: tower on windows 7 x64

2012-02-27 Thread Martin Cooper
be because your browser is auto-configured with the appropriate proxy settings. -- Martin Cooper On Mon, Feb 27, 2012 at 5:32 PM, Liu Yongjian ggd...@gmail.com wrote: Here is the log message printed on the screen : npm http GET https://registry.npmjs.org/tower npm ERR! Error: failed to fetch

Re: [nodejs] can you install cloud9 ide now?

2012-02-25 Thread Martin Cooper
On Sat, Feb 25, 2012 at 7:57 AM, 李白字一日 calid...@gmail.com wrote: i was trying with npm -g install cloud9 and i got messages : npm WARN jsftp@0.1.6 package.json: bugs['web'] should probably be bugs['url'] npm WARN streamer@0.2.0 package.json: bugs['web'] should probably be bugs['url']

Re: [nodejs] Re: NodeJS downloadable Docs

2012-02-24 Thread Martin Cooper
not be difficult. Yup. One great option is Showdown, which will render Markdown in the browser. The original domain went away, but the code is on Github here: https://github.com/coreyti/showdown -- Martin Cooper -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node

Re: [nodejs] Re: Version 0.7.4

2012-02-17 Thread Martin Cooper
with the three main uses of 'module' in normal Node code. The first (module.exports) is very widely used. I'd also add a fourth: module.paths. -- Martin Cooper -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You

Re: [nodejs] how to write for-each loop in JavaScript properly

2012-02-12 Thread Martin Cooper
. Things are somewhat better in Node land, but in browser land, all it takes is some library you're using that augments Object.prototype and you're hosed unless you protect your own enumerations from such augmentation. -- Martin Cooper Or if you do make them DontEnum. Do you really write two-line