Re: [nodejs] vm module API breakage in 0.11

2014-02-06 Thread Arnout Kazemier
Running in the exact same issues with my own module that heavily depends on this functionality. Where I need to introduce the “global” as global in my script. On Thursday 6 February 2014 at 05:11, Tim Cuthbertson wrote: Hi all, The StratifiedJS (http://onilabs.com/stratifiedjs) runtime

Re: [nodejs] vm module API breakage in 0.11

2014-02-06 Thread Nathan Rajlich
Probably try creating an issue on the issue tracker. On Thu, Feb 6, 2014 at 12:18 AM, Arnout Kazemier i...@3rd-eden.com wrote: Running in the exact same issues with my own module that heavily depends on this functionality. Where I need to introduce the global as global in my script. On

[nodejs] Is it optional to add the err argument to callbacks?

2014-02-06 Thread ami
Must of async' function of nodejs get a callback with first parameter is err. *like:* request('',callback) fs.readFile('',callback) express.get(callback) *Do I must to add the err argument?* *can I use this function:* function mycallback(data){ } *Instead of:* function mycallback(err,

Re: [nodejs] Is it optional to add the err argument to callbacks?

2014-02-06 Thread Nathan Rajlich
Nope. The `err` arg is mandatory. Sorry. On Thu, Feb 6, 2014 at 1:37 AM, ami aminad...@gmail.com wrote: Must of async' function of nodejs get a callback with first parameter is err. *like:* request('',callback) fs.readFile('',callback) express.get(callback) *Do I must to add the err

Re: [nodejs] Terminal does not recognize node in Mac

2014-02-06 Thread Ryan Schmidt
That may be, but this user is running OS X, and I am not aware of a single OS X installer package (i.e. a .pkg file) that installs a binary to that location. Are you? I have very occasionally seen applications installed to ~/Applications (instead of the system-wide /Applications), but OS X

Re: [nodejs] A really silly-novice question about events

2014-02-06 Thread Angel Java Lopez
The line sink.on(radiation, function(){console.log(¡Detected!)}) says: when sink object emit radiation event, do something But your event emitter is the source object. So, to take an event from source, and act on sink, you must write something like source.on(radiation, function () {

[nodejs] Re: A really silly-novice question about events

2014-02-06 Thread Gagle
El jueves, 6 de febrero de 2014 00:45:47 UTC+1, q2dg2b escribió: Hello friends Isn't possible to emit an event by an object and to receive this event by another object, then? Thanks!! Nope -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines:

Re: [nodejs] New module xpkg

2014-02-06 Thread Gagle
Would you store configuration data in a .java class? This is the same case. http://stackoverflow.com/questions/18255226/storing-configuration-data-json Use yaml, properties, ini, xml or your own format, but please, don't use json or javascript files... People like comments. If I remember

Re: [nodejs] A really silly-novice question about events

2014-02-06 Thread Angel Java Lopez
A refinement source.on(radiation, function (dataradiation) { sink.process(dataradiation) }); could be written as source.on(radiation, sink.process); On Thu, Feb 6, 2014 at 6:56 AM, Angel Java Lopez ajlopez2...@gmail.comwrote: The line sink.on(radiation,

Re: [nodejs] Is it optional to add the err argument to callbacks?

2014-02-06 Thread Angel Java Lopez
As @tootallnate said, arg is mandatory But an alternative is dosomething( ., function (err, data) { if (err) { ; return; } myfunc(data); }); function myfunc(data) { } On Thu, Feb 6, 2014 at 6:42 AM, Nathan Rajlich nat...@tootallnate.netwrote: Nope. The `err` arg is mandatory.

Re: [nodejs] Re: Print form node

2014-02-06 Thread Lincoln Lemos
@William Yes. Is this. So far, with the knowledge I have about Node, this was the way I could think to build the project. *The idea is to make an application to receive subscriptions from Instagram in real time and apply my custom layout. Ideally generate a jpeg and send to the printer, but I

Re: [nodejs] Re: Konfig : Config management module. Automatic, environment specific and dynamic.

2014-02-06 Thread Ali Davut
I changed the description as 'Config Loader', thanks :) On Monday, February 3, 2014 11:18:27 PM UTC+2, Alex Kocharin wrote: Application itself shouldn't even know how configs are stored, not mentioning modifying the objects. It is a job of a config manager to change configuration

[nodejs] Standardize npm registry HTTP API

2014-02-06 Thread Francesco Mari
In the last few days I played around with a local npm registry mirror, and I went through some code from the NPM tool and related utility modules. I found out that the current HTTP API exposed from the npm registry is too tied to the CouchDB HTTP API, especially regarding authentication,

[nodejs] Re: nodejs 0.10.x on yocto1.3

2014-02-06 Thread nicovailliet
Hi all, I was trying to compile node-js for Intel Quark architecture, using Yocto when I got the same error. Indeed, it's quite explicit and a simple way to avoid an argument list too long is to reduce path length. To solve my problem, I renamed a folder, whose name was 50 character long... And

Re: [nodejs] Standardize npm registry HTTP API

2014-02-06 Thread Alex Kocharin
 +1 Different non-couchdb implementations already exist, but npm can change protocol at any point of time (npm v1.3.19), and all these tools need to be changed accordingly. I'd much rather see npm own protocol rather than couchdb. It feels like a classic example of a vendor locking right now.  

Re: [nodejs] New module xpkg

2014-02-06 Thread Alex Kocharin
 I believe reserved words issue was fixed in ES5. :) $ node -e 'console.log(x={var: 1, function: 2, new: 3});console.log(x.var)'{ var: 1, function: 2, new: 3 }1 Yes, this approach solves all of the beefs I have with json. You can represent dates this way, and you can even include other files. It's

Re: [nodejs] CERT_UNTRUSTED Error

2014-02-06 Thread Alex Kocharin
 "npm config ..." sets npm settings, but you're using node.js. Those are two entirely different applications. In this case you can do:$ node -e "require('https').request({host: 'solarems.net',rejectUnauthorized: false}, function(res){console.log(res.statusCode)}).end()"But please be careful where

[nodejs] Re: A really silly-novice question about events

2014-02-06 Thread q2dg2b
Ook! Thanks a lot!! -- -- 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] Help with a Hubot script?

2014-02-06 Thread sapg
Hello all, I'm trying to wrote a hubot script that will use the API at http://www.macvendorlookup.com to give me information on a Vendor for a MAC. My script is over at https://github.com/sapg/hubot-scripts/blob/master/mac-lookup.coffee I'm not sure how to get what I want in the format I

Re: [nodejs] Help with a Hubot script?

2014-02-06 Thread Stanley Stuart
Your json is returning an array, so to get to the first object in the array, you'd need to do json = json[0] On Thu, Feb 6, 2014 at 4:56 PM, sapg sapan.gang...@gmail.com wrote: Hello all, I'm trying to wrote a hubot script that will use the API at http://www.macvendorlookup.com to give me

Re: [nodejs] New module xpkg

2014-02-06 Thread Oleg Slobodskoi
json5 already added. Best, Oleg Slobodskoi http://www.facebook.com/oleg.slobodskoi https://www.xing.com/profile/Oleg_Slobodskoi https://twitter.com/oleg008 https://github.com/kof Am 05.02.2014 um 13:37 schrieb Alex Kocharin a...@kocharin.ru: 05.02.2014, 15:47, zladuric zladu...@gmail.com:

Re: [nodejs] Standardize npm registry HTTP API

2014-02-06 Thread Francesco Mari
I will try to flesh out a more detailed description of what I expect (theoretically) from the HTTP API exposed by an npm registry. That will be only my personal point of view, but I hope that it will help to start a productive discussion with the community. 2014-02-06 Alex Kocharin

Re: [nodejs] New module xpkg

2014-02-06 Thread Alex Kocharin
Oleg, Yeah, I saw that, thanks. But I'm still worrying about having to run xpkg every time. :) Can it be changed to this?: -{    name: 'xpkg',    description: 'Write x-package.json once and generate package.json, bower.json whatever.json.',    version: '0.1.1',    author: {    name: 'Oleg

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

2014-02-06 Thread Dmytro Semenov
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

Re: [nodejs] Help with a Hubot script?

2014-02-06 Thread Sapan Ganguly
Hi, thanks for the reply. If I do something like this - msg.send #{json[0]} I get this in the chat [object Object] What am I missing? On 6 February 2014 23:09, Stanley Stuart dstanley.stu...@gmail.com wrote: Your json is returning an array, so to get to the first object in the array,

Re: [nodejs] Help with a Hubot script?

2014-02-06 Thread Alex Kocharin
 json[0] is an object, not a string maybe `msg.send "#{require('util').inspect(json[0])}"` ?  07.02.2014, 04:54, "Sapan Ganguly" sapan.gang...@gmail.com:Hi, thanks for the reply.  If I do something like this -  msg.send "#{json[0]}"I get this in the chat   [object Object]What am I missing?On 6

Re: [nodejs] New module xpkg

2014-02-06 Thread Oleg Slobodskoi
Started 2 discussions: https://github.com/component/component/issues/475 https://github.com/bower/bower/issues/1092 doesn't looks like there will be a better solution in the near feature ... Best, Oleg Slobodskoi http://www.facebook.com/oleg.slobodskoi

[nodejs] Re: Standardize npm registry HTTP API

2014-02-06 Thread tjholowaychuk
big +1 from me, the API Couch gives you is awful to work with On Thursday, 6 February 2014 05:14:19 UTC-8, Francesco Mari wrote: In the last few days I played around with a local npm registry mirror, and I went through some code from the NPM tool and related utility modules. I found 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

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

2014-02-06 Thread Dmytro Semenov
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,

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

2014-02-06 Thread ming
Hi, A few days back we received vendor FOO's documentation in electronic format and we put the document root at /path/to/vendor/FOO/doc/root With node-static and the usual: var static = require('node-static'); var file = new static.Server('/path/to/vendor/FOO/doc/root'); ... we

Re: [nodejs] CERT_UNTRUSTED Error

2014-02-06 Thread Pratik Sathaye
Can you please change the host name here or delete the post for security issues. Thanks On Friday, February 7, 2014 1:37:55 AM UTC+5:30, Alex Kocharin wrote: npm config ... sets npm settings, but you're using node.js. Those are two entirely different applications. In this case you

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

2014-02-06 Thread Alex Kocharin
 If your vendor documentation uses relative links, it should work as is. But I guess it's not the case. I'd suggest to place it on a subdomain instead.  07.02.2014, 09:24, "ming" hseum...@gmail.com:Hi,A few days back we received vendor FOO's documentation in electronic format and we put the

Re: [nodejs] CERT_UNTRUSTED Error

2014-02-06 Thread Alex Kocharin
 I have no way to do either, it's a mailing list. If you want it to be removed from google groups, you can ask moderators, I won't have any objections about removing/changing those. However, this post (as well as your initial post) stays in the archives forever

[nodejs] [Blog post] Near-Realtime Analytics with MongoDB, Node.js SmoothieCharts

2014-02-06 Thread Tobias Trelle
In case someone is interested in NoSQL and realtime analytics: I recently published a blog post called Near-Realtime Analytics with MongoDB, Node.js SmoothieCharts https://blog.codecentric.de/en/2014/01/realtime-analytics-mongodb-nodejs-smoothiecharts/ The demo code is on github:

Re: [nodejs] [Blog post] Near-Realtime Analytics with MongoDB, Node.js SmoothieCharts

2014-02-06 Thread Arunoda Susiripala
Very nice to see, you are using the oplog. We are using a similar approach. As an additional step we are using incremental map-reduce to pre-aggregate data we are getting. So that makes runtime aggregations much faster. On Fri, Feb 7, 2014 at 12:45 PM, Tobias Trelle ttre...@gmail.com wrote: