Re: [nodejs] Re: trying to wrap my head around "promises" - async vs Q

2012-11-12 Thread Andy
One of them problems even with this approach is that you write and read 
code backwards. It executes bottom to top because you have to define named 
callback functions first. I find it much more natural with promises because 
not only is your code organized, but it reads top to bottom and is MUCH 
easier to trace flow.

On Monday, November 12, 2012 1:39:37 AM UTC-8, greelgorke wrote:
>
>
> function execCB(err, stdout,stderr){
> require('assert').ok(~stdout.indexOf( this ))
> }
>
> function lolAssert(){
>   var forClojure = 'lol'
>   require('child_process').exec('echo lol', execCB.bind(forClojure))
> }
>

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

2012-11-12 Thread Andy

On Sunday, November 11, 2012 10:46:05 PM UTC-8, Mikeal Rogers wrote:
>
>
> Some people clearly like promises, but the dominant pattern in node is not 
> promises, it's callbacks, with complex callback issues managed with async.
>
> Stating your opinion strongly does not make it a fact. This is your 
> preference, and many others, but not the majority.
>

I'm aware of the much larger async userbase on github. In my opinion this 
is because promises are a more complicated concept to learn and thus scare 
people off and reduce adoption. It's different than native javascript so 
there are people who do not want to explore the option.  

If you write a library, it better use callbacks if you want people to use 
> it.
>

I agree, as I said if you use expose an api you should still handle user 
responses with callbacks. but internally non promised code feels alien to 
me. I wouldn't give a user a promise as a response from my npm library.

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

2012-11-12 Thread Andy
 

>
> In JavaScript the order you define things doesn't matter.
>
 
It does if your function declaration style is var funcName = function() { 
}; which is the style I use. Personal preference obviously.
>
>

-- 
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] Having trouble replicating with npm repo (couchdb) - anyone tried it lately and/or seen this error?

2013-05-13 Thread andy
Based on the awesome feedback I got 
from https://groups.google.com/d/msg/nodejs/sX4mbsRPwls/WtDDE-To2o4J, we 
tried replicating the npm repo so we could use it in an offline environment.

We're essentially following the instructions 
at http://clock.co.uk/tech-blogs/how-to-create-a-private-npmjs-repository 
but replication fails after syncing about 17k documents.

We've tried reinstalling couch (found one issue that suggested using a 
patched version of SpiderMonkey) but the same thing keeps happening, even 
after restarting replication several times.

Here's our setup:

CentOS 6.4
CouchDB 1.3
SpiderMonkey 1.8.5-7 

Replication works fine for over 17,000 documents, then we see this error 
and can't get past it:

[Sat, 11 May 2013 00:55:39 GMT] [error] [<0.12970.4>] Replicator: couldn't 
write document `bufferhelper`, revision 
`19-d339684ee7f5eaf4cc18d84da753832d`, to target database `registry`. 
Error: `unauthorized`, reason: `Please log in before writing to the db`.

Any ideas?

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

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

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

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


Re: [nodejs] Wind.js : An elegant approach to asynchronies JavaScript

2012-08-23 Thread Andy
yeah, google groups can get a bit annoying at times

Regarding *eval*, I'm pretty wary of running your entire async code through 
it as a string. During this talk on v8 
internals at 
JSConf US, this Russian v8 developer with a long name talks about how v8 
runs and optimizes your code. Unfortunately it's not in the video, but 
during the Q&A section I asked him if v8 could perform the same 
optimizations for code instantiated with *new Function()*. He said *yes, 
but it could not optimize eval*. I think it had something to do with the 
ambiguity of the scope eval executes in.

I know this is a vague answer, and I hope I'm not misquoting him. I'd like 
to see some benchmarks of your compiled code vs the original. And it 
probably wouldn't be that big of a change to compile it to a capital F *
Function* instead, for which a benchmark would also be useful.

-- 
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: trying to wrap my head around "promises" - async vs Q

2012-11-11 Thread Andy
To reply to my own very old thread after getting some solid experiences 
with promises, the answers to my questions are:

1. *async* is a library that passes callbacks around. it's ugly and it 
sucks.

2. a* promise *is just an object. Don't let anyone tell you differently, 
they are just trying to confuse you. It's an object that has method names 
that everyone's agreed on, like *then *and *done *which will magically 
trigger your callbacks for you. With promises, you include *Q* and you just 
pass around Q objects (called deferreds and promises). It's just that 
everyone agreed that the promise object will have a *.then* method, which 
you can call and your function jumps next in line onto the promise chain 
magically.

The libraries should *not *be used together. Once you get your head around 
promises and use them in field you won't want to use anything else.

If you are exposing an API, you should still take/call a callback. If 
you're writing a database client you don't want to give the user a promise 
and force them into your model. Just call their callback at the end of your 
own, internal beautiful promise chain. It will be our terrible secret.

Promises aren't perfect and can get strange when doing some complex 
composition (lots of return statements to return promise chains), but they 
make writing async code soo nice.

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


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

2012-02-12 Thread Andy

Most of you probably know this, but sometimes I encounter modules that 
don't do this. 
And they do unexpected errors.

Now that you've discovered Crockford, you should discover when to ignore 
crockford

-- 
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: PHP v8 (a little off topic, but you'se are the best guys I know)

2012-03-15 Thread Andy
does anything else think it's terrible that integration with v8 made it 
into the CORE of php?

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


[nodejs] Re: how to avoid a call back in this case?

2012-03-19 Thread Andy
But isn't it a big hassle when you have a function that calls a function, 
and maybe those functions call 5 more functions, and only the deepest one 
needs a callback, so now the 5 functions above it, even though not doing 
any asynchronous work, need callbacks 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


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

2012-03-22 Thread Andy
node
> var a = {node: 1, cow: {moo: 'barf'}};
> require('sys').inspect(a);
'{ node: 1, cow: { moo: \'barf\' } }'

sys.inspect probably is all you ever need. Also, my logger library does 
auto object inspecting on log, which I find pretty handy. 
https://github.com/DelvarWorld/Simple-Node-Logger

-- 
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] trying to wrap my head around "promises" - async vs Q

2012-03-25 Thread Andy
*Note, I am not asking which tool is better, I am simply trying to 
understand the differences.

*I'm trying to wrap my head around promises in node. Right now I'm writing 
all my code in callback soup. I am researching libraries and I found 
async(duh) but I also found the horribly named 
but seemingly very popular 
q .

What I am trying to figure out is if these libraries are mutually 
exclusive. The async page mentions nothing about "promsies" and instead 
talks about "flow control." But it seems like both libraries are sugar for 
handling async function flow and callbacks. Do they both solve the same 
problem, or can / should they be used together?

Take this example:

async.waterfall([
function(callback){
callback(null, 'one', 'two');
},
function(arg1, arg2, callback){
callback(null, 'three');
},
function(arg1, callback){
// arg1 now equals 'three'
callback(null, 'done');
}
], function (err, result) {
   // result now equals 'done'
});


vs:

Q.call(step1).then(step2).then(step3).then(step4).then(function (value4) {
// Do something with value4}, function (error) {
// Handle any error from step1 through step4}).end();


Both libraries are doing things in a series, and both are passing their 
results to the next function. Is there really any difference between the 
two results other than Q returning a promise that you can chain to with 
.then? 

Is async really just a more versatile q? Or are there reasons to use one 
and the other and they could be used together?

And can you do parallel functions with promises? Or is that not what 
they're used for? (And if not, should you use async + q, or is there too 
much overlap?)

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


[nodejs] Re: How to avoid callback hell?

2012-04-09 Thread Andy
promises to the rescue! no need to worry. just play it 
cool. 
Don't let those callbacks and error passing get you down! B)

var q = require('q');

// ncall takes the function, the scope, then optional arguments
q.ncall(db.open, db)
.then(function() {
return q.ncall(db.collection, db, 'collection name')
}).then(function(collection) {
// Example for what to do if you need conditional logic
if(!collection) {
return q.ncall(db.createCollection, db, 'colllection name');
}
}).then(function(collection) {
return q.ncall(db.query, db, collection, 'query');
}).then(function (queryResults) {
// I have query results! yay!!
console.log(queryResults);
}).fail(function(err) {
console.log('one of the above steps went irreversibly wrong!', 
err);
});

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


[nodejs] Re: How to avoid callback hell?

2012-04-09 Thread Andy
*Callbacks are silly. Callbacks are bad! Just play it 
cool, 
there's fun to be had!
If your code is private, if it's no API, use promises my friend! You'll 
soon see why!
Tired of error passing? Tired of nests? With deferred functions, you will 
have no stress!*

var q = require('q');

q.ncall(db.open, db)
.then(function() {
// What we are doing here is WHEN the db.open statement is 
finished
// we return a NEW promise saying that hey, we want to wait for
// db.collection to finish.
return q.ncall(db.collection, db, 'collection name')
}).then(function(collection) {
// Now we know our db.colleciton statement is done. What if
// there is no collection!?

// Example for what to do if you need conditional logic
if(!collection) {
return q.ncall(db.createCollection, db, 'colllection name');
}
}).then(function(collection) {
return q.ncall(db.query, db, collection, 'query');
}).then(function (queryResults) {
// I have query results! yay!!
console.log(queryResults);
}).fail(function(err) {
console.log('one of the above steps went irreversibly wrong!', 
err);
});
*
But what, you ask, about external libs? Ones that need to use your code? 
Won't with q they quib?
It's simple you see. For them you say:
I can use q all I want. But when I'm done, I'll send a callback your way!*

-- 
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 Framework Author Throwdown

2012-04-19 Thread Andy
nodeup is nodedown?

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


[nodejs] How can I distribute my own node.js module using npm?

2012-12-17 Thread Andy Green
Is there any way to distribute node.js modules using npm? If I created a 
.js file called my-custom-module.js, how could I allow other users to 
install it using the command "sudo npm install my-custom-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] Find location of module folder

2012-12-20 Thread Andy Green
I'm trying to write a script that prints the name of all installed modules 
to the command line. In node.js, is there any way to find the location of 
the module folder (with globally installed modules?)

-- 
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: Find location of module folder

2012-12-20 Thread Andy Green
I've found the answer already: 
http://stackoverflow.com/questions/13981938/print-all-available-node-js-modules/13982458#13982458

On Thursday, December 20, 2012 7:03:08 PM UTC-5, Andy Green wrote:
>
> I'm trying to write a script that prints the name of all installed modules 
> to the command line. In node.js, is there any way to find the location of 
> the module folder (with globally installed modules?)

-- 
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] Need an "offline" npm-style repository - what's a good approach?

2013-02-18 Thread andy e
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 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?

2013-02-18 Thread andy e
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 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  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 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  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 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.
>>>>
>>>>
>>>>
>>>
>>>  --
>>> --
>>> 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
>>> Gr

Re: [nodejs] Need an "offline" npm-style repository - what's a good approach?

2013-02-18 Thread andy e
OK, great, thanks for the info. I'll chat it over and maybe give a shot at
replicating the couch instance.

Thanks for the help!

Andy

On Mon, Feb 18, 2013 at 12:08 PM, Bradley Meck wrote:

> 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 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<https://gist.github.com/st-luke/4165831>
>>>
>>>
>>> On Mon, Feb 18, 2013 at 1:46 PM, Tim Caswell 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 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  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<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<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
>>>>&

Re: [nodejs] Need an "offline" npm-style repository - what's a good approach?

2013-02-18 Thread andy e
This would be ideal in our scenario. It's what Artifactory does for us in
Java land (if a module doesn't exist in our local repo, it grabs it from
maven central) and would be awesome to see in npm.

If someone does an "Enterprise NPM Repo" Kickstarter I'll certainly kick in
a few bucks to support it. :)

andy

On Mon, Feb 18, 2013 at 1:10 PM, nwhite  wrote:

> I wish it was trivial to have a sparse npm server. One where I could
> publish my private modules to and replicate only the packages I'm
> interested in. Then have all npm package requests that are not found
> automatically forwarded to the official server.
>
>
>
>
> On Mon, Feb 18, 2013 at 12:14 PM, andy e  wrote:
>
>> OK, great, thanks for the info. I'll chat it over and maybe give a shot
>> at replicating the couch instance.
>>
>> Thanks for the help!
>>
>> Andy
>>
>>
>> On Mon, Feb 18, 2013 at 12:08 PM, Bradley Meck wrote:
>>
>>> 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 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<https://gist.github.com/st-luke/4165831>
>>>>>
>>>>>
>>>>> On Mon, Feb 18, 2013 at 1:46 PM, Tim Caswell 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 
>>>>>> 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  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<https://github.com/mbrevoort/node-reggie>
>>>>>>>&

Re: [nodejs] Need an "offline" npm-style repository - what's a good approach?

2013-02-19 Thread Andy Ennamorato
Wow, that link is awesome. Thank you.

Andy

Sent from my iPhone

On Feb 19, 2013, at 1:56 AM, Floby  wrote:

> You can set up a npm repository of your own pretty easily [1]. It doesn't 
> have to replicate the public npm repository.
> I don't know how hard it would be to patch it so it does "if package not 
> locally availbale then fetch from the net" but it could be another approach
> 
> [1] http://clock.co.uk/tech-blogs/how-to-create-a-private-npmjs-repository
> 
> On Tuesday, 19 February 2013 05:09:34 UTC+1, andy wrote:
>> 
>> This would be ideal in our scenario. It's what Artifactory does for us in 
>> Java land (if a module doesn't exist in our local repo, it grabs it from 
>> maven central) and would be awesome to see in npm. 
>> 
>> If someone does an "Enterprise NPM Repo" Kickstarter I'll certainly kick in 
>> a few bucks to support it. :)
>> 
>> andy
>> 
>> On Mon, Feb 18, 2013 at 1:10 PM, nwhite  wrote:
>>> I wish it was trivial to have a sparse npm server. One where I could 
>>> publish my private modules to and replicate only the packages I'm 
>>> interested in. Then have all npm package requests that are not found 
>>> automatically forwarded to the official server.
>>> 
>>> 
>>> 
>>> 
>>> On Mon, Feb 18, 2013 at 12:14 PM, andy e  wrote:
>>>> OK, great, thanks for the info. I'll chat it over and maybe give a shot at 
>>>> replicating the couch instance.
>>>> 
>>>> Thanks for the help!
>>>> 
>>>> Andy
>>>> 
>>>> 
>>>> On Mon, Feb 18, 2013 at 12:08 PM, Bradley Meck  wrote:
>>>>> 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  
>>>>>> 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  
>>>>>>> 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  
>>>>>>>> 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  wrote:
>>>>>>>>>> Apologies in advance because I've only glanced at this problem, but 
>>>>>>>>>> we work in a unique environment where we have no Internet 
>>>>>>>>>> connecti

Re: [nodejs] Node.js VS Scala VS Clojure: what for an API with a we-love-java-we-dont-even-know-why business component in the company?

2013-02-26 Thread andy e
Not much help here, but maybe vert.x is a good compromise (JVM based, but
you can use an async approach and write JS code): http://vertx.io

The other thing that comes to mind is something I saw Mike Brevoort present
on. See
https://speakerdeck.com/mbrevoort/node-dot-js-and-me-denverjs-january-2013,
specifically the slides on Aggregation and Spindrift.

andy

On Tue, Feb 26, 2013 at 2:28 PM, andreacode  wrote:

> Hi everybody!
>
> I need some help on getting together as much information as possible on
> node.js (and its competitors), as we're going to start a quite project in
> our company, and we currently are in that phase in which you have to
> convince yourself and everybody else that this or that technology choice is
> the right one.
>
> The project is about a "Proxy API", as I often call it, a *central
> routing app* that should handle all the connections between our already
> existing applications. These are like 7 at the moment, but we want to
> separate some of them (especially the main one, a huge Ruby on Rails app
> that computes and displays quite everything behind it), so we want to
> create something very configurable, abstract, and prepared for future
> expansion of new apps.
>
> Obviously, the main point here is *availability*, as everything in the
> company (and perhaps, one day, our external clients as well) will
> constantly hit this API, and ask (and post) data, but almost nothing as to
> be computed in the API itself, we just pass the data to other apps, and
> maybe do some nice *caching* to not constantly hit other apps always for
> the same  data.
>
> That said, we have to *convince the business counterpart* (we are a
> financial company) that node.js is well-suited for our use case, is ready
> for big numbers, and that (don't ask me why everyone in this damn sector
> thinks this) Java, or better the JVM, may not be the best way to go.
> Anyway, a nice comparison between the proposed languages would be very
> appreciated!
>
> Thank you in advance in any 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
>
> ---
> 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.
>
>
>

-- 
-- 
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] Anyone using Vagrant for, say, testing with multiple browsers or as a type of CI server?

2013-02-26 Thread andy e
Just curious if anyone is using Vagrant for a sort-of-CI server (i.e. have
vagrant run your tests via another OS) or for testing across browsers (i.e.
a vagrant box running an old version of Firefox or something) or anything
along those lines?

Somehow signed myself up to give a basic intro on Vagrant and I'm still a
noob (idea was to follow Christian's approach here:
http://blog.christian-schwartz.net/blog/2012/08/07/a-continuous-integration-vagrant-box-for-lets-code-javascript/)
so if you have a repo you can point me at or any tips...or any opinions
good/bad I'm happy to gather 'em up.

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 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] Anyone using Vagrant for, say, testing with multiple browsers or as a type of CI server?

2013-02-27 Thread Andy Ennamorato
Very cool. Thanks for the tip/link!

Andy

Sent from my iPhone

On Feb 27, 2013, at 2:03 PM, Tauren Mills  wrote:

> We are using vagrant, but I didn't do any of the setup so can't provide much 
> insight. But if you need to test IE environments, we've found this project is 
> awesome to spin up IE6/7/8/9/10 into different VMs:
> 
> https://github.com/xdissent/ievms
> 
> 
> On Wed, Feb 27, 2013 at 9:19 AM, Jacob Groundwater  wrote:
>> We use Vagrant sometimes, but it can take a while to find the workflow that 
>> works best for you.
>> 
>> I also recommend checking out veewee which is great for building new vagrant 
>> boxes.
>> 
>> On a final note, the mounted partition does not support symlinks natively. 
>> If you need symlinks at all, you'll need to shut down the VM, and use the 
>> Virutalbox Manager to enable them. Here is my quick-and-dirty script to 
>> enable symlinks.
>> 
>> VBoxManage list vms | sed "s/^\"\(.*\)\".*$/\1/" | while read name; do 
>> VBoxManage setextradata $name 
>> VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root 1;done
>> 
>> 
>> 
>> 
>> On Tue, Feb 26, 2013 at 8:44 PM, andy e  wrote:
>>> Just curious if anyone is using Vagrant for a sort-of-CI server (i.e. have 
>>> vagrant run your tests via another OS) or for testing across browsers (i.e. 
>>> a vagrant box running an old version of Firefox or something) or anything 
>>> along those lines?
>>> 
>>> Somehow signed myself up to give a basic intro on Vagrant and I'm still a 
>>> noob (idea was to follow Christian's approach here: 
>>> http://blog.christian-schwartz.net/blog/2012/08/07/a-continuous-integration-vagrant-box-for-lets-code-javascript/)
>>>  so if you have a repo you can point me at or any tips...or any opinions 
>>> good/bad I'm happy to gather 'em up.
>>> 
>>> 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 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.
>> 
>> -- 
>> -- 
>> 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.
> 
> -- 
> -- 
> 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.
>  
>  

-- 
-- 
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] Anyone using Vagrant for, say, testing with multiple browsers or as a type of CI server?

2013-02-27 Thread Andy Ennamorato
I saw an issue with symlinks too but that script looks pretty handy. Thanks for 
the links/feedback!

Andy

Sent from my iPhone

On Feb 27, 2013, at 10:19 AM, Jacob Groundwater  wrote:

> We use Vagrant sometimes, but it can take a while to find the workflow that 
> works best for you.
> 
> I also recommend checking out veewee which is great for building new vagrant 
> boxes.
> 
> On a final note, the mounted partition does not support symlinks natively. If 
> you need symlinks at all, you'll need to shut down the VM, and use the 
> Virutalbox Manager to enable them. Here is my quick-and-dirty script to 
> enable symlinks.
> 
> VBoxManage list vms | sed "s/^\"\(.*\)\".*$/\1/" | while read name; do 
> VBoxManage setextradata $name 
> VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root 1;done
> 
> 
> 
> 
> On Tue, Feb 26, 2013 at 8:44 PM, andy e  wrote:
>> Just curious if anyone is using Vagrant for a sort-of-CI server (i.e. have 
>> vagrant run your tests via another OS) or for testing across browsers (i.e. 
>> a vagrant box running an old version of Firefox or something) or anything 
>> along those lines?
>> 
>> Somehow signed myself up to give a basic intro on Vagrant and I'm still a 
>> noob (idea was to follow Christian's approach here: 
>> http://blog.christian-schwartz.net/blog/2012/08/07/a-continuous-integration-vagrant-box-for-lets-code-javascript/)
>>  so if you have a repo you can point me at or any tips...or any opinions 
>> good/bad I'm happy to gather 'em up.
>> 
>> 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 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.
> 
> -- 
> -- 
> 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.
>  
>  

-- 
-- 
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] options for private npm registries?

2013-05-01 Thread andy e
In a similar boat, so interested to see what you find out/which route you
take (previous thread I started at
https://groups.google.com/d/topic/nodejs/sX4mbsRPwls/discussion).

There's things like node-reggie by Mike (
https://github.com/mbrevoort/node-reggie) and I also just realized that you
could just point to URIs for your dependencies (see the second answer at
http://stackoverflow.com/questions/14609131/can-i-run-a-private-npm-repository-without-replicating-the-public-repository).
That's not ideal obviously (I wrote a little script to help that will
re-write the dependency in any package.json's of other modules I'm
depending upon) but might end up working for us in our bizarro environment.

andy


On Wed, May 1, 2013 at 3:58 PM, Laurie  wrote:

> Hi, I'm looking into the options for setting up a private npm repository
> and the trade-offs in terms of operational and infrastructure costs. So far
> I've found:
>
>  * irisnpm.com hosting; originally provided by Iris Couch, but seems to
> be unsupported / defunct?
>  * GemFury npm hosting; inexpensive, but limited service plans, and no
> central registry mirroring :-/
>  * set up a registry on a (hosted or internally managed) CouchDB instance,
> with mirroring of central registry
>  * set up a registry without mirroring, use the new StrongLoop node dist's
> modified npm
>
> Mirroring the central registry is sub-optimal (especially with a hosted
> Couch instance, given the resulting increase in costs); on the other hand,
> using a private registry without mirroring is rather limiting unless you
> use StrongLoop (or an otherwise patched npm or registry -- I think I saw a
> fork of the registry couch app that supported proxying to the central
> registry somewhere?).
>
> Are there other options I'm missing? Are there plans to integrate
> StrongLoop's changes to npm in the (foreseeable ;-) future?
>
> Thanks,
>
> L.
>
> --
> --
> 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.
>
>
>

-- 
-- 
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] Node v0.11.2 (Unstable)

2013-05-14 Thread Andy Wingo


On Tuesday, May 14, 2013 5:21:03 AM UTC+2, Tim Caswell wrote:
>
> I just noticed this has the version of V8 with harmony generators! (behind 
> a flag)
>

There is a bug in 3.19.0 with 
generators: http://code.google.com/p/v8/issues/detail?id=2681

I would wait for the import of 3.19.1 to try out generators in anger.

Regards,

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 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: Having trouble replicating with npm repo (couchdb) - anyone tried it lately and/or seen this error?

2013-05-16 Thread andy e
Kevin,

Unfortunately, no. We tried a few of the tips mentioned here on the CouchDB
list (
http://mail-archives.apache.org/mod_mbox/couchdb-user/201305.mbox/%3cCAL+Y1nuP=wBwXn8eM7MBzZg2v3nKChTEVmo=bntwhf5ukfi...@mail.gmail.com%3e)
- for example, we didn't have an admin user set up, so we tried that and it
looked like it would work...but we restarted replication with a new DB (we
want this to be a repeatable process) and it failed after only 500 or so
documents. We were still trying Couch 1.3 so we're gonna drop down to 1.2.1
and see how that goes.

So, no real idea what is wrong. If anyone has more tips on replicating with
the public npm repo, or maybe wants to zip up their .couch file and put it
on bittorrent, I'm all ears, haha.

I'm really hoping StrongLoops additions to NPM work out well (see
http://blog.strongloop.com/whats-new-in-strong-loop-node-beta-3-private-repositories/)
and someone will create an 'enterprise' repo a la Nexus/Artifactory.

andy

On Thu, May 16, 2013 at 6:50 PM, Kevin Sawicki wrote:

> Hi Andy,
>
> I'm also seeing the exact same issue trying to replicate
> isaacs.iriscouch.com to another iriscouch.com database, it gets stuck at
> 17,286 documents (16gb) and those errors start to appear in the log.
>
> Have you found any more details about this issue?
>
> Sincerely,
> Kevin
>
>
> On Monday, May 13, 2013 8:16:51 PM UTC-7, andy wrote:
>>
>> Based on the awesome feedback I got from https://groups.google.**
>> com/d/msg/nodejs/sX4mbsRPwls/**WtDDE-To2o4J<https://groups.google.com/d/msg/nodejs/sX4mbsRPwls/WtDDE-To2o4J>,
>> we tried replicating the npm repo so we could use it in an offline
>> environment.
>>
>> We're essentially following the instructions at http://clock.co.uk/tech-*
>> *blogs/how-to-create-a-private-**npmjs-repository<http://clock.co.uk/tech-blogs/how-to-create-a-private-npmjs-repository>but
>>  replication fails after syncing about 17k documents.
>>
>> We've tried reinstalling couch (found one issue that suggested using a
>> patched version of SpiderMonkey) but the same thing keeps happening, even
>> after restarting replication several times.
>>
>> Here's our setup:
>>
>> CentOS 6.4
>> CouchDB 1.3
>> SpiderMonkey 1.8.5-7
>>
>> Replication works fine for over 17,000 documents, then we see this error
>> and can't get past it:
>>
>> [Sat, 11 May 2013 00:55:39 GMT] [error] [<0.12970.4>] Replicator:
>> couldn't write document `bufferhelper`, revision `19-**
>> d339684ee7f5eaf4cc18d84da75383**2d`, to target database `registry`.
>> Error: `unauthorized`, reason: `Please log in before writing to the db`.
>>
>> Any ideas?
>>
>> 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 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.
>
>
>

-- 
-- 
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: Having trouble replicating with npm repo (couchdb) - anyone tried it lately and/or seen this error?

2013-05-18 Thread Andy Ennamorato
Alex,
 Response inline. :)

Sent from my iPhone

On May 18, 2013, at 10:45 AM, Alex Kocharin  wrote:

> 
> Why do you want replication at all? I was thinking about it for myself 
> recently, but I found out that there're lots of libraries you won't ever use. 
> 
> So isn't it better to write something like proxying repository server that 
> would host your private projects, but proxy all other requests to npm central 
> repository (with caching of course to avoid heavy load)? 
> 
We don't have any other choice, sadly - we have no network connectivity to npm 
central where we have to develop from. 

So our thought was to replicate against npm while connected, then take a copy 
of couch/npm (even with a bunch of stuff we won't use) offline. 

I would prefer to use some sort of proxy/cache, were we only pull mods we need 
(ala Artifactory or Nexus in Java land) but I hadn't really seen anything like 
that. Ill have to check out shadow-npm.

Andy

> 
> 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/sX4mbsRPwls/WtDDE-To2o4J, we tried 
>> replicating the npm repo so we could use it in an offline environment.
>> 
>> We're essentially following the instructions at 
>> http://clock.co.uk/tech-blogs/how-to-create-a-private-npmjs-repository but 
>> replication fails after syncing about 17k documents.
>> 
>> We've tried reinstalling couch (found one issue that suggested using a 
>> patched version of SpiderMonkey) but the same thing keeps happening, even 
>> after restarting replication several times.
>> 
>> Here's our setup:
>> 
>> CentOS 6.4
>> CouchDB 1.3
>> SpiderMonkey 1.8.5-7 
>> 
>> Replication works fine for over 17,000 documents, then we see this error and 
>> can't get past it:
>> 
>> [Sat, 11 May 2013 00:55:39 GMT] [error] [<0.12970.4>] Replicator: couldn't 
>> write document `bufferhelper`, revision 
>> `19-d339684ee7f5eaf4cc18d84da753832d`, to target database `registry`. Error: 
>> `unauthorized`, reason: `Please log in before writing to the db`.
>> 
>> Any ideas?
>> 
>> 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 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.
>  
>  

-- 
-- 
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] product roadmap?

2013-05-21 Thread Andy Ennamorato
There's a webinar/online conf about that in 45mins or so: http://nodestack.org/

Andy

Sent from my iPhone

On May 20, 2013, at 7:42 PM, Gowrishankar Holalkere  
wrote:

> Has Joyent or node team announced their product roadmap? Is it something they 
> have talked about at any forums? I think for many folks to consider using 
> node, they would like to see the vision / strategy / roadmap for the product 
> so that they can commit to it. Any info around this, please share. 
> -- 
> -- 
> 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.
>  
>  

-- 
-- 
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: Having trouble replicating with npm repo (couchdb) - anyone tried it lately and/or seen this error?

2013-05-23 Thread andy e
Alex,

I think that's an awesome idea. But...a) I stink at node b) probably don't
have time to devote to help beyond complaints/a list of what I'd like to
see c) I'm full of excuses.

There is Mike Brevoort's node-reggie -
https://github.com/mbrevoort/node-reggie (I keep name dropping that hoping
he'll appear out of thin air with a bunch of commits that finish it up :)
), maybe that can be of some use.

I'll definitely keep my eye on your repo and maybe I can help out at some
point.

andy

On Wed, May 22, 2013 at 9:04 AM, Alex Kocharin  wrote:

> Andy,
>
>
> > I would prefer to use some sort of proxy/cache, were we only pull mods
> we need (ala Artifactory or Nexus in Java land) but I hadn't really seen
> anything like that.
>
> Well... what do you think about creating one? :)
>
> I started a project on github - https://github.com/rlidwka/npmrepod , and
> described how I would like to see this thingy. There's no code there, but
> it's expected to change soon enough. The idea was around for 6 months or
> so, and I more or less know how it would work (except for authentication
> and access rights...).
>
> Any thoughts on this?
>
>
> --
> // alex
>
>
> On Sunday, May 19, 2013 2:39:40 AM UTC+4, andy wrote:
>
>> Alex,
>>  Response inline. :)
>>
>> Sent from my iPhone
>>
>> On May 18, 2013, at 10:45 AM, Alex Kocharin  wrote:
>>
>>
>> Why do you want replication at all? I was thinking about it for myself
>> recently, but I found out that there're lots of libraries you won't ever
>> use.
>>
>>
>> So isn't it better to write something like proxying repository server
>> that would host your private projects, but proxy all other requests to npm
>> central repository (with caching of course to avoid heavy load)?
>>
>> We don't have any other choice, sadly - we have no network connectivity
>> to npm central where we have to develop from.
>>
>> So our thought was to replicate against npm while connected, then take a
>> copy of couch/npm (even with a bunch of stuff we won't use) offline.
>>
>> I would prefer to use some sort of proxy/cache, were we only pull mods we
>> need (ala Artifactory or Nexus in Java land) but I hadn't really seen
>> anything like that. Ill have to check out shadow-npm.
>>
>> Andy
>>
>>
>> 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/sX4mbsRPwls/**WtDDE-To2o4J<https://groups.google.com/d/msg/nodejs/sX4mbsRPwls/WtDDE-To2o4J>,
>>> we tried replicating the npm repo so we could use it in an offline
>>> environment.
>>>
>>> We're essentially following the instructions at http://clock.co.uk/tech-
>>> **blogs/how-to-create-a-private-**npmjs-repository<http://clock.co.uk/tech-blogs/how-to-create-a-private-npmjs-repository>but
>>>  replication fails after syncing about 17k documents.
>>>
>>> We've tried reinstalling couch (found one issue that suggested using a
>>> patched version of SpiderMonkey) but the same thing keeps happening, even
>>> after restarting replication several times.
>>>
>>> Here's our setup:
>>>
>>> CentOS 6.4
>>> CouchDB 1.3
>>> SpiderMonkey 1.8.5-7
>>>
>>> Replication works fine for over 17,000 documents, then we see this error
>>> and can't get past it:
>>>
>>> [Sat, 11 May 2013 00:55:39 GMT] [error] [<0.12970.4>] Replicator:
>>> couldn't write document `bufferhelper`, revision `19-**
>>> d339684ee7f5eaf4cc18d84da75383**2d`, to target database `registry`.
>>> Error: `unauthorized`, reason: `Please log in before writing to the db`.
>>>
>>> Any ideas?
>>>
>>> Thanks,
>>>
>>> Andy
>>>
>>  --
>> --
>> Job Board: http://jobs.nodejs.org/
>> Posting guidelines: https://github.com/joyent/**node/wiki/Mailing-List-**
>> 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<http://groups.google.com/group/nodejs?hl=en?hl=en

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

2013-05-24 Thread andy e
Joshwa,

Cool, thanks for the tip. Were you running Couch 1.2 or 1.3?

We still need to try a few of these suggestions (guy doing most of this has
been out for a week) but will definitely give this a shot.

Thanks!

Andy

On Thu, May 23, 2013 at 11:53 PM, Joshwa Fugett  wrote:

> Give this one a shot,
>
> curl -svX PUT http://admin:passwd@127.0.0.1:5984/_replicator/mirror_npm-d 
> '{"source":"
> http://isaacs.iriscouch.com/registry/";, "target":"registry", "user_ctx":
> {"name": "admin"}, "continuous": true' -HContent-Type:application/json
>
> Switch the admin in the user_ctx as well. Also make sure that the admin is
> added to the registry database as well as an admin so that it has full
> permissions. This worked for me for everything except for _design/app and I
> just replicated that separately through futon after this one finished.
>
> Hope it helps,
> Joshwa
>
> --
> --
> 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.
>
>
>

-- 
-- 
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: Best practices for token-based authentication in REST API

2013-05-29 Thread Andy Ennamorato
What about Persona (browserid) from Mozilla? I know it's a little off the mark 
but maybe it's useful as an example - https://github.com/mozilla/browserid

Interested to see what you come up with at any rate.

Andy

Sent from my iPhone

On May 29, 2013, at 6:50 AM, Alan Fay  wrote:

> On Tuesday, May 28, 2013 5:46:54 PM UTC-4, Roberto Modica wrote:
>> Your probably not going to find a "fully scoped" example because the 
>> protocol is complex and has a lot different routes and permitations and it 
>> depends on how you are going to use it.  Like i said we use passport.js and 
>> the different strategies with oAuth2rize and the sample app that has been 
>> put together does give a good outline to what is possible, thats how we 
>> worked it out.  We may decide to write our own implementation but for now 
>> our time is spent building core logic.
> 
> I'll just have to do the same (trial and error) until I get it working the 
> way I want with one of those libraries.  If that gets done, I'll post up the 
> fully working example, so there's at least one example of how to do this on 
> the internet.
> -- 
> -- 
> 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.
>  
>  

-- 
-- 
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: Having trouble replicating with npm repo (couchdb) - anyone tried it lately and/or seen this error?

2013-06-11 Thread Andy Ennamorato
Thanks for that update.

I forgot to follow up. Unfortunately I wasn't running the replication (a 
coworker was trying it at a separate location and he's too nervous/scared/old 
to post to the mailing list himself - haha) to know what exactly worked in 
terms of tweaking the settings. Ill try to find out though.

We tried it using 1.2 on Linux/OS X after trying 1.3 and it failed again. We 
then ran using Couch on Windows and it worked fine. So maybe we were building 
couch wrong. (I thought there were binaries for couch on *nix?)

So now we've got 48GB of modules we need to package up and I'm sure there will 
be more questions along the way.

Big thanks to all the suggestions and help its much appreciated (and if you 
ever come to Denver or the DenverJS meetup ill buy you a beer or three).

Andy



Sent from my iPhone

On Jun 11, 2013, at 2:18 AM, Erdem Agaoglu  wrote:

> A somewhat old post but for anyone stuck on this, it seems that the npmjs 
> couchapp (the thing that works for /registry/_design/app/...) has a 
> validate_doc_update function to user-control 'npm login' and 'npm publish' 
> operations. But it also effects the replication, simply the function does not 
> let replication user to write to the database. For couchdb 1.3. the 
> _replicator database also accepts a user_ctx parameter that the replication 
> process will use. So instead of using the old style _replicate command, 
> couchdb 1.3 users should do something like:
> 
> curl -X POST http://127.0.0.1:5984/_replicator -d '{"_id": "npmjs_repl", 
> "source":"http://isaacs.iriscouch.com/registry/";, "target":"registry", 
> "continuous":true, "user_ctx": {"name":"replicator", "roles":["_admin"]}}' -H 
> "Content-Type: application/json"
> 
> This will run the replication as an admin user (roles: _admin) and 
> validate_doc_update function will allow writes. My replication seems to 
> continue now
> 
> On Tuesday, May 14, 2013 6:16:51 AM UTC+3, andy wrote:
>> 
>> Based on the awesome feedback I got from 
>> https://groups.google.com/d/msg/nodejs/sX4mbsRPwls/WtDDE-To2o4J, we tried 
>> replicating the npm repo so we could use it in an offline environment.
>> 
>> We're essentially following the instructions at 
>> http://clock.co.uk/tech-blogs/how-to-create-a-private-npmjs-repository but 
>> replication fails after syncing about 17k documents.
>> 
>> We've tried reinstalling couch (found one issue that suggested using a 
>> patched version of SpiderMonkey) but the same thing keeps happening, even 
>> after restarting replication several times.
>> 
>> Here's our setup:
>> 
>> CentOS 6.4
>> CouchDB 1.3
>> SpiderMonkey 1.8.5-7 
>> 
>> Replication works fine for over 17,000 documents, then we see this error and 
>> can't get past it:
>> 
>> [Sat, 11 May 2013 00:55:39 GMT] [error] [<0.12970.4>] Replicator: couldn't 
>> write document `bufferhelper`, revision 
>> `19-d339684ee7f5eaf4cc18d84da753832d`, to target database `registry`. Error: 
>> `unauthorized`, reason: `Please log in before writing to the db`.
>> 
>> Any ideas?
>> 
>> 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 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.
>  
>  

-- 
-- 
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] Problems and Questions about replica npm repo on private network

2013-07-10 Thread andy e
After a lot of good advice in here, we eventually replicated a copy of the
npm repo (using couch 1.2.x and Windows - go figure).

We finally stood it up in our private environment and had some problems.

If we run 'npm --registry http://ourrepo.com/registry install Base64' it
will first resolve against our repo. The json file it returns points to a
tarball at 'http://repository.npmjs.org/...' though, which won't work for
us (we're offline). Is that a setting we can change during replication,
i.e. point to localhost or an IP/host instead of npmjs.org?

Even if we manually try to use curl to pull the .tgz by hitting '
http://ourrepo.com/registry/Base64/-/Base64-0.1.2.tgz' we get a 404 with
the following JSON error:

"{ error: 'not found', reason: 'document is missing attachment' }"

But if we hit ../registry/Base64/Base64-0.1.2.tar.gz, the file is there and
is valid. It's like our redirects don't work/resolve.

Any ideas? When I dig around in the couchapp (~/_utils) everything looks to
be there. This happens with all dep's, not just Base64 of course.

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 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] Best practice for Node module interface

2013-07-11 Thread Andy W.
I have seen a wide variety in different style for creating custom Node 
modules. What style do you prefer or are there any best practices? I'm 
fairly new to the Node community.

var module = require('module');

// A
var foo = new module.Foo();

// B
var foo = module.foo();

// C
var foo = module.createFoo();

// D
var foo = Module.Foo.create();

-- 
-- 
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: Problems and Questions about replica npm repo on private network

2013-07-15 Thread andy e
Looks like we finally (months later... :) ) got our npm replica running.

We forgot to install the couchapps as documented on
http://clock.co.uk/tech-blogs/how-to-create-a-private-npmjs-repository
Once we did that, things seemed to go easier ( we were able to replicate to
the latest without having to setup an admin user and a couple other hoops
we tried earlier).

We also had to fix the secure_rewrites issue as documented at
https://groups.google.com/d/topic/npm-/x1ha7x7zx5k/discussion (Isaac, it
might be good to put that tip in the npmjs.org repo readme). That solved
the "couchdb {"error":"insecure_rewrite_rule","reason":"too many ../..
segments"}" error we were getting.

We were then able to install from our repo using npm --registry... etc. So
thanks again for the help we've gotten in this list and at other places.
The more info on running your own replica (and eventually, something like
Artifactory?) the better.

andy

On Thu, Jul 11, 2013 at 12:45 AM, andy e  wrote:

> After a lot of good advice in here, we eventually replicated a copy of the
> npm repo (using couch 1.2.x and Windows - go figure).
>
> We finally stood it up in our private environment and had some problems.
>
> If we run 'npm --registry http://ourrepo.com/registry install Base64' it
> will first resolve against our repo. The json file it returns points to a
> tarball at 'http://repository.npmjs.org/...' though, which won't work for
> us (we're offline). Is that a setting we can change during replication,
> i.e. point to localhost or an IP/host instead of npmjs.org?
>
> Even if we manually try to use curl to pull the .tgz by hitting '
> http://ourrepo.com/registry/Base64/-/Base64-0.1.2.tgz' we get a 404 with
> the following JSON error:
>
> "{ error: 'not found', reason: 'document is missing attachment' }"
>
> But if we hit ../registry/Base64/Base64-0.1.2.tar.gz, the file is there
> and is valid. It's like our redirects don't work/resolve.
>
> Any ideas? When I dig around in the couchapp (~/_utils) everything looks
> to be there. This happens with all dep's, not just Base64 of course.
>
> 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 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] Node.JS in the DoD

2013-07-16 Thread andy e
Anyone know of any uses of Node.js within the DoD (or other secure/federal
gov't environments)? Feel free to ping me off list if so. Some folks are
looking for help getting approvals and pointing to existing instances/uses
can help.

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 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] local private npm repository

2013-07-31 Thread Andy Ennamorato
We had similar questions and issues (especially with setting up a local npm 
repo) so if you search back you'll see some recommendations from the list.

In the end we did get a replica working (couchdb 1.3 on Windows no less) and at 
~50GB it wasn't too bad to host on a local machine. 

FWIW the StrongLoop folks are hosting a webinar tomorrow about private npm 
repos so that might be worth attending: http://t.co/WcQDkHqLf5 

I think they are going to talk about the work they've done with their node 
distro and/or changes to node-reggie a lightweight repo option 
(https://github.com/mbrevoort/node-reggie). I'm hopeful that in the near future 
multiple repos (and npm's ability to use them) becomes a more realistic option.

Andy

Sent from my iPhone

On Jul 31, 2013, at 10:36 AM, Osher El-Netanany  wrote:

> Hi all,
> 
> 'ok, this is kind'a embarrassing a little, 
> we've tried few times in few ways but still did not get it right:
> we're trying to set a local npm repo for our packages
> we don't want to host an entire replica of the npm (which is HUGE these days, 
> and growing)
> i.e - the private replica should hold only our packages, the rest can come 
> from the public repo
> publishing should direct to our repo
> install should take our packages from our repo, and public packages from the 
> global repo
> What's the best way to do it?
> What's the best contemporary tutorial/doc/explanation about it on the web?
> 
> Thanks...
>   Don
> -- 
> -- 
> 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.
>  
>  

-- 
-- 
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] Dependencies for native module installs via npm/node-gyp (especially when offline)

2013-08-12 Thread andy e
When trying to install leveldown/levelup on Windows using node 0.10.9 &
npm, npm/node-gyp grabs dependencies from http://nodejs.org/dist//
i.e. http://nodejs.org/dist/v0.10.9/node-v0.10.9.tar.gz

This was on an offline (no Internet connection) machine. I'm trying to
figure out what other dependencies it's going to need (obviously the
install didn't finish).

However, when I try it now on Mac OS X on a connected machine, it works
fine and doesn't seem to look for anything on nodejs.org. Is that a Windows
only thing?

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 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] Dependencies for native module installs via npm/node-gyp (especially when offline)

2013-08-13 Thread Andy Ennamorato
Ben,

On Aug 13, 2013, at 1:03 AM, Ben Noordhuis  wrote:

> On Tue, Aug 13, 2013 at 5:45 AM, andy e  wrote:
>> When trying to install leveldown/levelup on Windows using node 0.10.9 & npm,
>> npm/node-gyp grabs dependencies from http://nodejs.org/dist/> version here>/
>> i.e. http://nodejs.org/dist/v0.10.9/node-v0.10.9.tar.gz
>> 
>> This was on an offline (no Internet connection) machine. I'm trying to
>> figure out what other dependencies it's going to need (obviously the install
>> didn't finish).
> 
> It downloads the tarball for the headers (v8.h, node.h, a few others.)

Thanks. I was hoping to find a list of what was required to build native 
modules on Windows when offline (that way I can grab them and bring them into 
my offline environment). I created a Win7 VM and tried an install and it grabs 
a few other things from nodejs.org/dist and it looks like it stuffs them into 
~/.node-gyp. So maybe I can pull that list from there (I guess it also needs 
Python and Visual Studio/.Net framework).

Then again building on Windows isn't a hard req but is our standard dev box so 
figured I'd try.

> 
>> However, when I try it now on Mac OS X on a connected machine, it works fine
>> and doesn't seem to look for anything on nodejs.org. Is that a Windows only
>> thing?
> 
> It's possible the module only compiles native code on Windows (either
> that or your OS X machine already has the tarball stashed away
> somewhere.)  There should be a binding.gyp in the module's top-level
> directory that you can check.

I looked in binding.gyp for leveldown 
(https://github.com/rvagg/node-leveldown/blob/master/binding.gyp) but it didn't 
make a ton of sense to me. I'm assuming it would stash things in that 
~/.node-gyp tho so ill look there too.

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

-- 
-- 
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] Suggestions for alternatives to private npm repos?

2013-08-22 Thread andy e
I think https://github.com/stagas/npm-server might help.
And/or node-reggie (https://github.com/mbrevoort/node-reggie - also see
http://blog.strongloop.com/deploy-a-private-npm-registry-without-couchdb-or-redis/
).

andy

On Thu, Aug 22, 2013 at 4:24 PM, Adam Crabtree  wrote:

> Though it doesn't address the larger issue, that's definitely a better
> approach than forking request. Thanks. =)
>
> I'd still prefer a better solution to the private npm issue though...
>
> Cheers,
> Adam Crabtree
>
>
> On Thu, Aug 22, 2013 at 2:48 PM, Kevin Swiber  wrote:
>
>>
>>
>>
>> On Thu, Aug 22, 2013 at 5:29 PM, Adam Crabtree wrote:
>>
>>> Howdy all,
>>>
>>> We needed to fork forever-agent for some additional functionality, but
>>> don't want to have to fork request as well since we have made no updates to
>>> it, and would lose semver.
>>>
>>> Currently, the only way to accomplish this that I know of, would be to
>>> run a private npm repo that uses our private version for forever-agent and
>>> falls back on the public request, which feels like overkill.
>>>
>>> Is there a simpler solution?
>>>
>>
>> You could update your calling code to use whatever combination of
>> options.agent, options.agentClass, and options.agentOptions makes sense.
>>
>> https://github.com/mikeal/request/blob/master/request.js#L342-L352
>>
>> If you wanted it to "just work" with no update to the code that calls
>> request, well... that's much trickier.
>>
>> --
>> Kevin Swiber
>> Projects: https://github.com/kevinswiber
>> Twitter: @kevinswiber
>>
>> --
>> --
>> 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.
>>
>
>
>
> --
> 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 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.
>

-- 
-- 
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] Suggestions for alternatives to private npm repos?

2013-08-23 Thread andy e
Ah, okay. I was thinking you needed the reverse (look in private first,
then public).

FWIW, support for multiple repositories in npm is apparently coming soon:
https://github.com/isaacs/npm/issues/1401#issuecomment-22586377 (which will
be awesome)

andy

On Thu, Aug 22, 2013 at 5:06 PM, Adam Crabtree  wrote:

> Unless I'm mistaken, it looks like those don't support my use-case, nor do
> they seem to support private+public dependency trees at all.
>
> Use case:
> npm install request # Get public request, but private forever-agent
>
> "Unfortunately npm client does not really support multiple registries
> (e.g. private and public), therefore you can't mix public and private
> packages in package.json dependencies."
>
> Cheers,
> Adam Crabtree
>
>
> On Thu, Aug 22, 2013 at 3:27 PM, andy e  wrote:
>
>> I think https://github.com/stagas/npm-server might help.
>> And/or node-reggie (https://github.com/mbrevoort/node-reggie - also see
>> http://blog.strongloop.com/deploy-a-private-npm-registry-without-couchdb-or-redis/
>> ).
>>
>> andy
>>
>>
>> On Thu, Aug 22, 2013 at 4:24 PM, Adam Crabtree wrote:
>>
>>> Though it doesn't address the larger issue, that's definitely a better
>>> approach than forking request. Thanks. =)
>>>
>>> I'd still prefer a better solution to the private npm issue though...
>>>
>>> Cheers,
>>> Adam Crabtree
>>>
>>>
>>> On Thu, Aug 22, 2013 at 2:48 PM, Kevin Swiber  wrote:
>>>
>>>>
>>>>
>>>>
>>>> On Thu, Aug 22, 2013 at 5:29 PM, Adam Crabtree wrote:
>>>>
>>>>> Howdy all,
>>>>>
>>>>> We needed to fork forever-agent for some additional functionality, but
>>>>> don't want to have to fork request as well since we have made no updates 
>>>>> to
>>>>> it, and would lose semver.
>>>>>
>>>>> Currently, the only way to accomplish this that I know of, would be to
>>>>> run a private npm repo that uses our private version for forever-agent and
>>>>> falls back on the public request, which feels like overkill.
>>>>>
>>>>> Is there a simpler solution?
>>>>>
>>>>
>>>> You could update your calling code to use whatever combination of
>>>> options.agent, options.agentClass, and options.agentOptions makes sense.
>>>>
>>>> https://github.com/mikeal/request/blob/master/request.js#L342-L352
>>>>
>>>> If you wanted it to "just work" with no update to the code that calls
>>>> request, well... that's much trickier.
>>>>
>>>> --
>>>> Kevin Swiber
>>>> Projects: https://github.com/kevinswiber
>>>> Twitter: @kevinswiber
>>>>
>>>> --
>>>> --
>>>> 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.
>>>>
>>>
>>>
>>>
>>> --
>>> 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 nodejs@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> nodejs+unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>&

Re: [nodejs] Private registry without full replication

2013-10-11 Thread Andy Ennamorato
node-reggie can do some of this:
https://github.com/mbrevoort/node-reggie/

There's some info on how to load with with a "cache" of modules from npm proper 
in one of the closed issues https://github.com/mbrevoort/node-reggie/issues/9

Andy


Sent from my iPhone

> On Oct 11, 2013, at 8:31 AM, Timothy Rupe  wrote:
> 
> I've been searching all over for a solution for this but always come across 
> unanswered questions, half-truths, and misinformation.  I'm trying to set up 
> a private npm registry within an enterprise environment without replicating 
> the GIGANTIC 71GB dataset from npmjs.org.  I only need to host our own 
> private modules and a few chosen open modules.  I've followed instructions 
> from github.com/isaacs/npmjs.org, and can use it, but only if I replicate the 
> entire thing.  The size of the replication isn't the part I'm most concerned 
> about.  Due to our legal need to be compliant with licenses, we can't just 
> include all public modules, and risk inadvertently including a transitive 
> dependency on a module that has a conflicting license.
> 
> Is there a way to set up a minimalistic registry that stores ONLY the modules 
> I want?
> -- 
> -- 
> Job Board: http://jobs.nodejs.org/
> Posting guidelines: 
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed 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.

-- 
-- 
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] Node DNS test failures?

2013-11-11 Thread Andy C
Hi,
I'm running the node tests, and I get a couple of consistent failures:

=== release test-http-dns-error === 
   
Path: simple/test-http-dns-error
assert.js:98
  throw new assert.AssertionError({
^
AssertionError: "EAI_SYSTEM" == "ENOTFOUND"
at ClientRequest. 
(/home/andrew/node/test/simple/test-http-dns-error.js:49:12)
at ClientRequest.EventEmitter.emit (events.js:98:17)
at TLSSocket.socketErrorListener (_http_client.js:234:9)
at TLSSocket.EventEmitter.emit (events.js:120:20)
at net.js:885:16
at process._tickCallback (node.js:598:11)
Command: out/Release/node 
/home/andrew/node/test/simple/test-http-dns-error.js
=== release test-net-dns-error === 

Path: simple/test-net-dns-error
assert.js:98
  throw new assert.AssertionError({
^
AssertionError: "EAI_SYSTEM" == "ENOTFOUND"
at Socket. 
(/home/andrew/node/test/simple/test-net-dns-error.js:49:10)
at Socket.EventEmitter.emit (events.js:109:17)
at net.js:872:12
at Object.asyncCallback [as callback] (dns.js:78:16)
at Object.onlookup [as oncomplete] (dns.js:91:17)
Command: out/Release/node 
/home/andrew/node/test/simple/test-net-dns-error.js

They are both failing because getaddrinfo returns EAI_SYSTEM, instead of 
the expected ENOTFOUND.

Running a little C program which attempts to resolve the host name 
"**", via getaddrinfo does indeed give error code -11 (EAI_SYSTEM).

errno is set to ENOENT (No such file or directory).

I'm running Mint Linux AMD64:
3.8.0-19-generic #30-Ubuntu SMP Wed May 1 16:35:23 UTC 2013 x86_64 x86_64 
x86_64 GNU/Linux

I have libc version 2.17 and am at the tip of master.

Any ideas or hints? Is this a known (or expected?) issue?
Thanks for any comments,
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 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] Node DNS test failures?

2013-11-11 Thread Andy C
Thanks for the suggestion.

I do have a resolver configured, if I switch the asterisks with a valid 
host name, then I get an IP address (also, I am posting this message from 
that machine. Without a resolver I wouldn't be getting too far...)

Those two tests create a host name consisting of 256 asterisks. Is it 
possible those tests are relying on the behaviour of a particular libc 
version/DNS lookup system for a particular failure case?

Andy


On Monday, 11 November 2013 20:52:13 UTC, Matt Sergeant wrote:
>
> Any chance you don't have a resolver set up? What's in /etc/resolv.conf?
>
>
> On Mon, Nov 11, 2013 at 1:54 PM, Andy C 
> > wrote:
>
>> Hi,
>> I'm running the node tests, and I get a couple of consistent failures:
>>
>> === release test-http-dns-error ===   
>>  
>> Path: simple/test-http-dns-error
>> assert.js:98
>>   throw new assert.AssertionError({
>> ^
>> AssertionError: "EAI_SYSTEM" == "ENOTFOUND"
>> at ClientRequest. 
>> (/home/andrew/node/test/simple/test-http-dns-error.js:49:12)
>> at ClientRequest.EventEmitter.emit (events.js:98:17)
>> at TLSSocket.socketErrorListener (_http_client.js:234:9)
>> at TLSSocket.EventEmitter.emit (events.js:120:20)
>> at net.js:885:16
>> at process._tickCallback (node.js:598:11)
>> Command: out/Release/node 
>> /home/andrew/node/test/simple/test-http-dns-error.js
>> === release test-net-dns-error ===   
>>   
>> Path: simple/test-net-dns-error
>> assert.js:98
>>   throw new assert.AssertionError({
>> ^
>> AssertionError: "EAI_SYSTEM" == "ENOTFOUND"
>> at Socket. 
>> (/home/andrew/node/test/simple/test-net-dns-error.js:49:10)
>> at Socket.EventEmitter.emit (events.js:109:17)
>> at net.js:872:12
>> at Object.asyncCallback [as callback] (dns.js:78:16)
>> at Object.onlookup [as oncomplete] (dns.js:91:17)
>> Command: out/Release/node 
>> /home/andrew/node/test/simple/test-net-dns-error.js
>>
>> They are both failing because getaddrinfo returns EAI_SYSTEM, instead of 
>> the expected ENOTFOUND.
>>
>> Running a little C program which attempts to resolve the host name 
>> "**", via getaddrinfo does indeed give error code -11 (EAI_SYSTEM
>> ).
>>
>> errno is set to ENOENT (No such file or directory).
>>
>> I'm running Mint Linux AMD64:
>> 3.8.0-19-generic #30-Ubuntu SMP Wed May 1 16:35:23 UTC 2013 x86_64 x86_64 
>> x86_64 GNU/Linux
>>
>> I have libc version 2.17 and am at the tip of master.
>>
>> Any ideas or hints? Is this a known (or expected?) issue?
>> Thanks for any comments,
>> 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.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
>>  
>> --- 
>> 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 .
>> 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 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] Node DNS test failures?

2013-11-12 Thread Andy C
Well spotted TC! I guess I won't worry about those particular tests for now.

Thanks!
Andy

On Monday, 11 November 2013 23:29:06 UTC, T.C. Hollingsworth wrote:
>
> On Mon, Nov 11, 2013 at 3:58 PM, Andy C > 
> wrote: 
> > Thanks for the suggestion. 
> > 
> > I do have a resolver configured, if I switch the asterisks with a valid 
> host 
> > name, then I get an IP address (also, I am posting this message from 
> that 
> > machine. Without a resolver I wouldn't be getting too far...) 
> > 
> > Those two tests create a host name consisting of 256 asterisks. Is it 
> > possible those tests are relying on the behaviour of a particular libc 
> > version/DNS lookup system for a particular failure case? 
>
> No, your libc implementation is just buggy.  ;-) 
>
> https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/1154599 
>
> Looks like it was only fixed in Ubuntu Saucy, so you'd need to wait 
> for/install a pre-release version of Linux Mint 16 for the fix.  :-/ 
>
> -T.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] test-http-client-parser-double-free.js test failure?

2013-12-10 Thread Andy C
Is anyone else seeing a failure failure in 
test-http-client-parser-double-free.js?

assert.js:98
  throw new assert.AssertionError({
^
AssertionError: 0 == 1
at process. 
(/home/xxx/node/test/simple/test-http-client-parser-double-free.js:58:10)
at process.EventEmitter.emit (events.js:120:20)

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 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: Having trouble replicating with npm repo (couchdb) - anyone tried it lately and/or seen this error?

2014-02-06 Thread andy e
Dmytro,

Thanks for following up. Glad you got it working.

Thankfully, someone else gained responsibility for running the repo (so we
didn't have to) but the more info there is on how to do this the better.
Hopefully npm, inc and the resulting changes they're planning will make it
easier to run your own repo and replicate from the main one as well.

andy



On Thu, Feb 6, 2014 at 6:42 PM, Dmytro Semenov  wrote:

> Quick update: the _design document has *validate_doc_update *which
> validate updates.
> By commenting out the following section fixed the issue:
>
>   // can't write to the db without logging in.
>   if (!user || !user.name) {
> throw { forbidden: "Please log in before writing to the db" }
>   }
>
> Regards,
> Dmytro
>
> On Thursday, February 6, 2014 4:42:16 PM UTC-8, Dmytro Semenov wrote:
>>
>> Hi Andy,
>>
>> I am not sure if you need this, but maybe some other folks would find
>> this helpful.
>>
>> I was able to reproduce this reliably on unrestricted couchdb (no login
>> required)
>>
>> 1. Replicate one module to a new db to make sure replication works:
>> curl http://localhost:5984/_replicate -X POST -d '{"source":"
>> http://isaacs.iriscouch.com/registry/","target":"pub-registry2",";
>> create_target":true,"continuous":false,"doc_ids":["system"]}' -H
>> "Content-Type: application/json"
>> 2. Replicate _design/app
>> curl http://npmjs-db.stratus.dev.ebay.com/_replicate -X POST -d
>> '{"source":"http://isaacs.iriscouch.com/registry/",";
>> target":"pub-registry2","create_target":true,"
>> continuous":false,"doc_ids":["_design/app"]}' -H "Content-Type:
>> application/json"
>> 3. Then try replicate some other module
>> curl http://npmjs-db.stratus.dev.ebay.com/_replicate -X POST -d
>> '{"source":"http://isaacs.iriscouch.com/registry/",";
>> target":"pub-registry2","create_target":true,"
>> continuous":false,"doc_ids":["socket.io"]}' -H "Content-Type:
>> application/json"
>> 4. Now delete _design/app and compact the DB and try replicating other
>> modue as socket.io would be marked as failed and probably would take
>> time to re-try by couchdb later.
>>
>> The root cause is _design/app (not sure if it is specific to one or any
>> design docs), once it gets replicated, the replication starts getting
>> //Error: `forbidden`, reason: `Please log in before writing to the db`.//
>> And _design/app is used to handle some requests to couchdb.
>>
>> So in your case it looks like the case where it was replicating till it
>> got some _design doc replicated which forbad further replication.
>>
>> In my case I was replicating from http://isaacs.iriscouch.com/registry/
>>
>> I have not found what part in _design/app restricts the replication and
>> require login first, just posting if someone got better clue faster than me.
>>
>> Regards,
>> Dmytro
>>
>> On Monday, May 13, 2013 8:16:51 PM UTC-7, andy wrote:
>>>
>>> Based on the awesome feedback I got from https://groups.google.
>>> com/d/msg/nodejs/sX4mbsRPwls/WtDDE-To2o4J, we tried replicating the npm
>>> repo so we could use it in an offline environment.
>>>
>>> We're essentially following the instructions at http://clock.co.uk/tech-
>>> blogs/how-to-create-a-private-npmjs-repository but replication fails
>>> after syncing about 17k documents.
>>>
>>> We've tried reinstalling couch (found one issue that suggested using a
>>> patched version of SpiderMonkey) but the same thing keeps happening, even
>>> after restarting replication several times.
>>>
>>> Here's our setup:
>>>
>>> CentOS 6.4
>>> CouchDB 1.3
>>> SpiderMonkey 1.8.5-7
>>>
>>> Replication works fine for over 17,000 documents, then we see this error
>>> and can't get past it:
>>>
>>> [Sat, 11 May 2013 00:55:39 GMT] [error] [<0.12970.4>] Replicator:
>>> couldn't write document `bufferhelper`, revision `19-
>>> d339684ee7f5eaf4cc18d84da753832d`, to target database `registry`.
>>> Error: `unauthorized`, reason: `Please log in before writing to the db`.
>>>
>>> Any ideas?
>>>
>>> Thanks,
>>>
>>> Andy
>>>
>>  --
> --
> Job B

[nodejs] Heavy computation best practices

2014-03-16 Thread Andy Zelinski
I am hoping for someone to point me in the right direction (examples, info) 
on how best to handle the need for some processor heavy computations that 
might best be executed with C++ math libraries.

example scenario pseudocode:

1. application user clicks "give me 10 movies to watch" button after 
entering age, iq, time of day,  and how much time he/she has to watch. 
(some post data needed as calculation parameters)
2. application pulls some historical data from database: an array of 
[person id, age, iq, movie watched, time watched, movie length, rating user 
gave] -- say a million data points in an array
3. application then needs to apply a sophisticated math model to all data 
points and includes other hard-coded parameters. 
4. assume after watching one movie, all the hard-coded parameters change as 
a side effect, so the algorithm should rank all movies in likelihood loved 
from 1 to n, choose the top ranked movie for user, and then iterate for the 
next 9, re-applying the math model

is this best handled by forking a child_process? use node-ffi? wrap a c++ 
object that can handle the math and pass the parameters?

thanks a million

-- 
-- 
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/d/optout.


Re: [nodejs] scripts to initialize MongoDB ??

2014-04-28 Thread andy e
Maybe too late for helping with an assignment but MongoDB offers online
training courses, one of which uses Node:
https://university.mongodb.com/courses/10gen/M101JS/2014_June/about

It's a pretty good class. I can't remember if when you sign up you can
watch old videos and see coursework or not (I think the answer is yes) but
you might be able to email 'em and ask about that.

The course covers things like connecting to mongodb from node, running
queries/extracting data, etc.

andy


On Mon, Apr 28, 2014 at 2:11 AM, Dipali Lohar  wrote:

> I have given a assignment to initialize the mongodb connectio to the
> existing project (https://github.com/ProfAvery/shortening) and need to
> run some jquery to display few data from the mongodb. I got stuck in the
> connecting mongodb to this project.
>
> can someone help me with this ???
> 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 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/d/optout.
>

-- 
-- 
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/d/optout.


Re: [nodejs] Licensing

2014-11-20 Thread andy e
http://choosealicense.com is a pretty good site, explains some use cases
and requirements when picking a license. (I don't know of any license that
requires permission to use - seems like usually someone just slaps GPLv2 on
things they want 'shared' but not necessarily used/copied.)

On Thu, Nov 20, 2014 at 6:37 AM, Kevin Ingwersen (Ingwie Phoenix) <
ingwie2...@googlemail.com> wrote:

> Okay, so let’s say I have coded a bunch of modules for a private site and
> I opensource them on my website, but do NOT want them to be used anywhere
> else without my permission. What license would be good? o.o
>
> --
> Job board: http://jobs.nodejs.org/
> New group rules:
> https://gist.github.com/othiym23/9886289#file-moderation-policy-md
> Old group rules:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> ---
> You received this message because you are 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.
> To post to this group, send email to nodejs@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/nodejs/B3B0AADC-102F-4F25-9797-4C63810620AC%40googlemail.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are 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.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/CALfshb1smQ-6ehW-tKpMrt5YB074OzBdmWNg7PyUkF7TyD_g8Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[nodejs] Passing a Buffer from C++ to a callback - object lifetime?

2015-08-13 Thread Andy C
Hi,
I am writing a C++ module for node. I have a JS callback registered which 
will receive regular callbacks with binary data (audio data).

My C++ to call the callback looks a bit like:

UniquePersistent dataCallback = // from somewhere...

HandleScope scope(isolate);

const unsigned argc = 1;
auto buffer = node::Buffer::New(dataSize);
std::memcpy(node::Buffer::Data(buffer), data.get(), dataSize);

Local argv[argc] = { buffer };

auto fn = Local::New(isolate, dataCallback);
auto context = isolate->GetCurrentContext();
auto global = context->Global();
fn->Call(global, argc, argv);

At the moment my callback is simply passing the buffer on to 
fs.writeFile(...):

var fs = require('fs');
mymodule.dosomething(function(data) {
fs.writeFile('raw_data', data, { flag: 'a' })
});

This appears to work, however the lifetime of the buffer object is suspect. 
This seems unsafe, as my understanding is that the Local is going 
to be cleared up when the HandleScope is destroyed after the callback has 
returned. Unfortunately, fs.writeFile() is probably still busy with the 
buffer.

The key would seem to be something to do with Persistent<> and 
UniquePersistent<> but I don't quite grok it.

Any tips, or pointers to examples would be great...


-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are 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.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/c1959e4b-0780-4a24-81e6-e67eef1e779e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[nodejs] Re: Passing a Buffer from C++ to a callback - object lifetime?

2015-08-14 Thread Andy C
Maybe it is not as bad as I thought. I missed a bit of a sentence in the V8 
embedder's guide:

When the destructor, HandleScope::~HandleScope, is called the handle scope 
> is deleted. Objects referred to by handles within the deleted handle scope 
> are eligible for removal in the next garbage collection *if there are no 
> other references to them*.


I *think* this means that because fs.writeFile() has a reference to the 
Buffer, it will not be garbage collected, and the memory held on to.

Andy


On Thursday, 13 August 2015 23:09:39 UTC+1, Andy C wrote:
>
> Hi,
> I am writing a C++ module for node. I have a JS callback registered which 
> will receive regular callbacks with binary data (audio data).
>
> My C++ to call the callback looks a bit like:
>
> UniquePersistent dataCallback = // from somewhere...
>
> HandleScope scope(isolate);
>
> const unsigned argc = 1;
> auto buffer = node::Buffer::New(dataSize);
> std::memcpy(node::Buffer::Data(buffer), data.get(), dataSize);
>
> Local argv[argc] = { buffer };
>
> auto fn = Local::New(isolate, dataCallback);
> auto context = isolate->GetCurrentContext();
> auto global = context->Global();
> fn->Call(global, argc, argv);
>
> At the moment my callback is simply passing the buffer on to 
> fs.writeFile(...):
>
> var fs = require('fs');
> mymodule.dosomething(function(data) {
> fs.writeFile('raw_data', data, { flag: 'a' })
> });
>
> This appears to work, however the lifetime of the buffer object is 
> suspect. This seems unsafe, as my understanding is that the Local 
> is going to be cleared up when the HandleScope is destroyed after the 
> callback has returned. Unfortunately, fs.writeFile() is probably still busy 
> with the buffer.
>
> The key would seem to be something to do with Persistent<> and 
> UniquePersistent<> but I don't quite grok it.
>
> Any tips, or pointers to examples would be great...
>
>
>

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are 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.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/e6575a48-fb38-4a92-ade5-dd5d0ab2470e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[nodejs] Re: Passing a Buffer from C++ to a callback - object lifetime?

2015-08-17 Thread Andy C
Thanks for the reply Loïc


On Saturday, 15 August 2015 21:48:11 UTC+1, Loïc PORTALES wrote:
>
>
> Hello,
>
> Yes, while your handles are in an handle scope they will not be deleted. 
> So in your case you do not need to use a persistent handle.
>
> You must use a persistent handle only in case you want to keep an object 
> which is no longer in a handle context. For example, if you got the handle 
> on a callback function from the main thread then you use it from an other 
> thread, you must use a persistent handle, to make sure it will not be 
> deleted while there is no handle context holding it.
>
> About the persistent handle, be careful to release it : 
> http://izs.me/v8-docs/classv8_1_1Persistent.html#a33e53191844272ba0f2da4f55fc12297
>
> Loïc
>
>
> Le vendredi 14 août 2015 21:33:24 UTC+8, Andy C a écrit :
>>
>> Maybe it is not as bad as I thought. I missed a bit of a sentence in the 
>> V8 embedder's guide:
>>
>> When the destructor, HandleScope::~HandleScope, is called the handle 
>>> scope is deleted. Objects referred to by handles within the deleted handle 
>>> scope are eligible for removal in the next garbage collection *if there 
>>> are no other references to them*.
>>
>>
>> I *think* this means that because fs.writeFile() has a reference to the 
>> Buffer, it will not be garbage collected, and the memory held on to.
>>
>> Andy
>>
>>
>> On Thursday, 13 August 2015 23:09:39 UTC+1, Andy C wrote:
>>>
>>> Hi,
>>> I am writing a C++ module for node. I have a JS callback registered 
>>> which will receive regular callbacks with binary data (audio data).
>>>
>>> My C++ to call the callback looks a bit like:
>>>
>>> UniquePersistent dataCallback = // from somewhere...
>>>
>>> HandleScope scope(isolate);
>>>
>>> const unsigned argc = 1;
>>> auto buffer = node::Buffer::New(dataSize);
>>> std::memcpy(node::Buffer::Data(buffer), data.get(), dataSize);
>>>
>>> Local argv[argc] = { buffer };
>>>
>>> auto fn = Local::New(isolate, dataCallback);
>>> auto context = isolate->GetCurrentContext();
>>> auto global = context->Global();
>>> fn->Call(global, argc, argv);
>>>
>>> At the moment my callback is simply passing the buffer on to 
>>> fs.writeFile(...):
>>>
>>> var fs = require('fs');
>>> mymodule.dosomething(function(data) {
>>> fs.writeFile('raw_data', data, { flag: 'a' })
>>> });
>>>
>>> This appears to work, however the lifetime of the buffer object is 
>>> suspect. This seems unsafe, as my understanding is that the Local 
>>> is going to be cleared up when the HandleScope is destroyed after the 
>>> callback has returned. Unfortunately, fs.writeFile() is probably still busy 
>>> with the buffer.
>>>
>>> The key would seem to be something to do with Persistent<> and 
>>> UniquePersistent<> but I don't quite grok it.
>>>
>>> Any tips, or pointers to examples would be great...
>>>
>>>
>>>

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are 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.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/3c0741ee-afe3-4225-93c1-4b185f07a267%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.