[nodejs] Re: Starting work on a Chrome Devtools addon

2013-07-10 Thread Floby
I was gonna answer that https://github.com/dannycoates/node-inspector already existed, but it hasn't been updated in 2 years. On Wednesday, 10 July 2013 01:32:29 UTC+2, Adam Crabtree wrote: > > Howdy all, > > I have LinkedIn's blessing to work full-time for 2 weeks on building a > node.js addon[

[nodejs] Re: First attempt at a node.js module

2013-07-10 Thread Floby
You're right you need tests. I personnally like nodeunit, but people like tape or mocha or vows. You'll see it's pretty simple to understand. The only trick is again the async nature of node. I tried your module and found this - Your module doesn't install. `npm install` errors when parsing J

Re: [nodejs] ChildProcess module not working on a real server

2013-07-10 Thread Ryan Schmidt
On Jul 9, 2013, at 20:03, Ket wrote: > Thanks, the code I use is exactly same as the example. It works on node.js > version 0.6.15 on windows but it's not working with version 0.11.3. Have you tried the latest stable version? 0.10.13? 0.6 is very old; I wouldn't bother with that anymore. --

[nodejs] Re: First attempt at a node.js module

2013-07-10 Thread Jean-Michel Hiver
Hello Thanks for this feedback, I'll be working on it! Cheers JM Le mercredi 10 juillet 2013 12:20:03 UTC+4, Floby a écrit : > > You're right you need tests. > I personnally like nodeunit, but people like tape or mocha or vows. You'll > see it's pretty simple to understand. The only trick is ag

[nodejs] nodejs cross-compiling target triplet patch

2013-07-10 Thread Adam Malcontenti-Wilson
Hi all, I'm looking at writing a patch to add the functionality to specify the target triplet in the configure to ease cross-compiling of nodejs. The idea is that, ideally, to cross-compile for another device or operating system, rather than requiring complex scripts like the android one recentl

[nodejs] Re: First attempt at a node.js module

2013-07-10 Thread Jean-Michel Hiver
Hummm looks like I'm getting stuck on something silly... now my package.json passes and 'npm install' doesn't barf when I run it. I have the following file structure so far: ./examples/synopsis.js ./lib/template-tal.js ./package.json ./README.md However the following statement in my synopsis.js

[nodejs] Node.js v0.8 Android porting

2013-07-10 Thread Peng Guo
I did a node.js v0.8 Android porting recently and just uploaded the code to github. If some one is interested, please have a try. The work is done on tag *v0.8.23 *and branch *v0.8*, but no '*npm*' support, you will get a 'node' executable for Android only. I think it runs quite stable. Modu

[nodejs] How to debug "Uncaught Exception : [RangeError: Maximum call stack size exceeded]"

2013-07-10 Thread Ashima Athri
Hi, I have code that ran fine with version <= 0.9.11 but encounters this error in versions greater than this. I understand that the cause of the error is probably infinite recursion, but do not know how to trace it, as the stack trace is undefined. This question

[nodejs] How to NodeJS addon with curl async work

2013-07-10 Thread Luís Miranda
Hi. I'm working in a project where the goal is to provide in JavaScript some functions to access to an hardware platform. The hardware platform provides a library and a header with the functions available. We are building some nodeJS addons on the top of these functions. The problem is , answe

[nodejs] Re: First attempt at a node.js module

2013-07-10 Thread Jean-Michel Hiver
Hello again Figured out i need import (./lib/template-tal.js) - sorry for the noise... -- -- 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 "nod

Re: [nodejs] Re: First attempt at a node.js module

2013-07-10 Thread Angel Java Lopez
Hi! In my module samples, I presume the module is not installed, and then, in your case, I would use: tal = require('..'); // it use the package.json of your root project folder The same for any tests. Example: https://github.com/ajlopez/SimpleMessages/blob/master/samples/Broadcast/server.js ht

Re: [nodejs] Node.js UV_THREADPOOL_SIZE environment variable

2013-07-10 Thread Ben Noordhuis
On Tue, Jul 9, 2013 at 7:42 PM, Kiki wrote: > One of the changes made by Ben Noordhius in Node v0.10.0 was to "honor > UV_THREADPOOL_SIZE environment variable" in Unix. The "threadpool.c" source > file seems to do just that. > > If I don't set this env variable, I can verify that I am limited to a

Re: [nodejs] How to debug "Uncaught Exception : [RangeError: Maximum call stack size exceeded]"

2013-07-10 Thread Ben Noordhuis
On Wed, Jul 10, 2013 at 12:17 AM, Ashima Athri wrote: > Hi, > > I have code that ran fine with version <= 0.9.11 but encounters this error > in versions greater than this. I understand that the cause of the error is > probably infinite recursion, but do not know how to trace it, as the stack > tra

Re: [nodejs] How to NodeJS addon with curl async work

2013-07-10 Thread Ben Noordhuis
On Wed, Jul 10, 2013 at 11:25 AM, Luís Miranda wrote: > Hi. > > I'm working in a project where the goal is to provide in JavaScript some > functions to access to an hardware platform. The hardware platform provides > a library and a header with the functions available. We are building some > nodeJ

Re: [nodejs] Re: Starting work on a Chrome Devtools addon

2013-07-10 Thread Ben Noordhuis
On Wed, Jul 10, 2013 at 10:01 AM, Floby wrote: > I was gonna answer that https://github.com/dannycoates/node-inspector > already existed, but it hasn't been updated in 2 years. See [1], we've taken over maintenance. We'll probably update Danny's repo soon. [1] https://github.com/strongloop/node

Re: [nodejs] How to NodeJS addon with curl async work

2013-07-10 Thread Luís Miranda
So, what you are telling me is something like this will work: #include #include #include "hardware.h" using namespace v8; uv_loop_t *loop; uv_async_t async; void *Interruption_handler*(*data){ async.data = data; *uv_async_send*(&async); } Handle *RunCallback*(const Arguments& args) {

[nodejs] Re: First attempt at a node.js module

2013-07-10 Thread Jean-Michel Hiver
Hello, I have done quite a bit of debugging, fixed some docs, added examples and a test suite. Would you be so kind as to retest and let me know if you spot anything fishy? I want to make sure the module works reasonably well before pushing it to npm... Thanks! Cheers JM -- -- Job Board: h

Re: [nodejs] You're going to have to rewrite it anyway

2013-07-10 Thread Louis Santillan
There was the v8 abstraction layer, k7 [1]. [1] https://github.com/sebastien/k7/ -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 "nodej

Re: [nodejs] Re: Starting work on a Chrome Devtools addon

2013-07-10 Thread Adam Crabtree
First, I'm definitely not interested in duplicating any work. As a software engineer, my goal has always been to write as little code as possible to achieve my goals. Second, with regards to node-inspector... It's my understanding that node-inspector, and it's step-brother node-webkit-agent[1] bo

Re: [nodejs] Re: Starting work on a Chrome Devtools addon

2013-07-10 Thread Adam Crabtree
Also, checkout https://github.com/CrabDude/lookingglass/blob/master/GettingStarted.mdwhere I've copied Pavel's high-level overview of what's involved. Essentially, node will be a lot like debugging a remote webworker, so I guess that obviates the UI issues. On Wed, Jul 10, 2013 at 8:33 AM, Adam C

Re: [nodejs] nodejs cross-compiling target triplet patch

2013-07-10 Thread Nathan Rajlich
Regarding the gyp issue you created, you can specify a "flavor" to create the Makefile for, by doing something like `gyp -f make-linux --depth=.`. That ends up creating a Makefile equivalent to what would be created if ran directly on linux. That's how I do cross-compiling for my RPi from OS X: htt

Re: [nodejs] You're going to have to rewrite it anyway

2013-07-10 Thread Tim Caswell
On Tue, Jul 9, 2013 at 7:30 PM, Marcel Laverdet wrote: > But if you're unfamiliar with C/C++ then "myType *pointer = > js_get_pointer(C, myObject);" is no more familiar than "Local > my_value = arguments[2]->This();" or whatever. You don't necessarily have > to understand what's happening with th

Re: [nodejs] You're going to have to rewrite it anyway

2013-07-10 Thread Stephen Belanger
C++ also becomes pretty awkward when trying to interact with the API of a VM that expects to do things in a very specific way. You can't really use the inheritance mechanics on V8 types without making things even more awkward, so the class-based advantage of C++ deteriorates rather quickly. I fe

Re: [nodejs] You're going to have to rewrite it anyway

2013-07-10 Thread Michael Schoonmaker
Another point to consider is that libuv is itself written in C. Cognitively-speaking, the more similar we can make the two in terms of concept and feel, the better. On Wed, Jul 10, 2013 at 11:15 AM, Stephen Belanger wrote: > C++ also becomes pretty awkward when trying to interact with the API of

Re: [nodejs] What are the qualifications to learn Node.js

2013-07-10 Thread whatnow1204
Wow. Thanks for the long detailed information. I will look into it and REST. Thanks, Ravi. On Tuesday, July 9, 2013 5:57:16 PM UTC-7, // ravi wrote: > > On Jul 9, 2013, at 1:42 PM, whatnow1204 > > wrote: > > > > I'm interested into learning node.js. Before I dive into Node.js, I have > no kno

[nodejs] Re: What are the qualifications to learn Node.js

2013-07-10 Thread whatnow1204
I thank y'all for your good replies. I'll look into it. Thanks. On Tuesday, July 9, 2013 10:42:56 AM UTC-7, whatnow1204 wrote: > > Hi, > > I'm interested into learning node.js. Before I dive into Node.js, I have > no knowledge in back-end development in any areas (my knowledge in HTTP is > very,

[nodejs] nodejs local variables

2013-07-10 Thread Jean-Michel Hiver
Hello Please consider the following code: var foo = "bar"; function one() { var foo = "baz"; two(); } function two() { console.log (foo); } one(); two(); Outputs: bar bar Question: in one() function, is there a way to override

Re: [nodejs] nodejs local variables

2013-07-10 Thread Angel Java Lopez
No, maybe function one() { var foo = "baz"; two(); function two() { console.log (foo); } } On Wed, Jul 10, 2013 at 6:35 PM, Jean-Michel Hiver wrote: > Hello > > Please consider the following code: > > var foo = "bar"; > > function on

Re: [nodejs] nodejs local variables

2013-07-10 Thread Mark Hahn
What you are trying to do isn't exactly elegant. I would consider it an anti-pattern. On Wed, Jul 10, 2013 at 2:46 PM, Angel Java Lopez wrote: > No, maybe > > function one() { > var foo = "baz"; > two(); > function two() { >console.log (foo); > }

Re: [nodejs] Get old behaviour under cluster for server.listen(0)

2013-07-10 Thread Isaac Schlueter
Yes, we definitely need to have a way to say "listen independently, as if I'm not in a cluster" from a cluster worker. On Tue, Jul 9, 2013 at 10:33 AM, Matt wrote: > > On Tue, Jul 9, 2013 at 1:28 PM, Sam Roberts wrote: >> >> https://npmjs.org/package/net-cluster (never used) > > > Assuming this

[nodejs] Re: What are the qualifications to learn Node.js

2013-07-10 Thread mgutz
The qualifications for learning is only the desire to learn. You already have the basics if you have played with JavaScript. In fact, I think the stumbling block for most developers new to node is that they've done so much synchronous programming that they fight the async programming nature of

[nodejs] Node.js confusion

2013-07-10 Thread Aaron Gray
Hi, I have installed the latest Node.js v0.10.13 tried both x86 and 64bit. Tried the most basic code from the Node.js web site front page :- var http = require('http'); http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('Hello World\n'); }).lis

Re: [nodejs] nodejs cross-compiling target triplet patch

2013-07-10 Thread Adam Malcontenti-Wilson
Hi Nathan, On Thursday, 11 July 2013 02:46:36 UTC+10, Nathan Rajlich wrote: > > Regarding the gyp issue you created, you can specify a "flavor" to create > the Makefile for, by doing something like `gyp -f make-linux --depth=.`. > That ends up creating a Makefile equivalent to what would be crea

Re: [nodejs] Get old behaviour under cluster for server.listen(0)

2013-07-10 Thread Matt
What's the reasoning behind the listen(0) behaviour, Isaac? It seems like the reason you want a random available port (i.e. personally) is a private communication channel between two processes, one of which only implements TCP rather than something more private like a socketpair()/pipe(). I can't

Re: [nodejs] npm link in deployment

2013-07-10 Thread Marco Rogers
@greelgorke is right that npm link is meant for development and not deployment. But I think I understand your problem. You have a single module repo, myLib, that you want to share between projects. I assume it's an internally developed module and not suitable for publishing to the public npm re

[nodejs] Announce: node-phantom-simple

2013-07-10 Thread Matt
I just released node-phantom-simple to NPM. This module is API compatible with node-phantom, but completely changes the way communication is done to make it significantly more reliable (and work under cluster). I wrote about it here: http://blog.hubdoc.com/announcing-node-phantom-simple/ The usua

Re: [nodejs] npm link in deployment

2013-07-10 Thread Matt
Where is myLib hosted? Assuming git, just use git repos in your dependencies and specify a branch for each one (via #branchname). On Mon, Jul 8, 2013 at 8:09 AM, Maxim Yefremov wrote: > I have site1 and site2 on one server, they both depend on one library > myLib via npm link. > > I changed myL

[nodejs] Re: Node.js confusion

2013-07-10 Thread Aaron Gray
Sorry for the noise it was a Unicode problem with my editor ! On 11 July 2013 00:41, Aaron Gray wrote: > Hi, > > I have installed the latest Node.js v0.10.13 tried both x86 and 64bit. > Tried the most basic code from the Node.js web site front page :- > > var http = require('http'); > http.create

Re: [nodejs] nodejs cross-compiling target triplet patch

2013-07-10 Thread Nathan Rajlich
So the way I work around the "missing flock" issue is by setting the $LINK env variable to the same value I set the $CXX env variable to. As to the general topic of this thread, though, I'm +1. I wasn't a huge fan of the additional android-configure script going into the main node repo. On Wed,

Re: [nodejs] npm link in deployment

2013-07-10 Thread Maxim Yefremov
Thanx, Mat. myLib is hosted on bitbucked git repository. Allready starting to use git dependencies. It's little more time wasting in developement, but easy to deploy. On Thu, Jul 11, 2013 at 4:52 AM, Matt wrote: > Where is myLib hosted? Assuming git, just use git repos in your > dependencies an

[nodejs] Sessions

2013-07-10 Thread Marco Rogers
Why don't you describe your troubles with socket.io sessions. Maybe someone can help with that. :Marco -- -- 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 G

Re: [nodejs] Re: Starting work on a Chrome Devtools addon

2013-07-10 Thread mgutz
awesome, ty in advance On Wednesday, July 10, 2013 2:52:01 AM UTC-7, Ben Noordhuis wrote: > > On Wed, Jul 10, 2013 at 10:01 AM, Floby > > wrote: > > I was gonna answer that https://github.com/dannycoates/node-inspector > > already existed, but it hasn't been updated in 2 years. > > See [1], we

Re: [nodejs] Announce: node-phantom-simple

2013-07-10 Thread Charlie Crane
Awesome, we need it. On Thu, Jul 11, 2013 at 8:47 AM, Matt wrote: > I just released node-phantom-simple to NPM. This module is API compatible > with node-phantom, but completely changes the way communication is done to > make it significantly more reliable (and work under cluster). > > I wrote

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