[nodejs] How do I set breakpoints in, and debug, Node.js C++ code on Windows?

2014-04-30 Thread Ryan Cole
I'm familiar with writing C++ libraries for Node.js, but have never figured out how to debug them using breakpoints, etc. Most of my libraries have been simple enough to not need any real debugging. I'm on Windows and I am unsure of how to go about doing this. Will I need something like gdb, or

[nodejs] Re: How do I set breakpoints in, and debug, Node.js C++ code on Windows?

2014-04-30 Thread Ryan Cole
It looks like the solution created by vcbuild.bat, on Windows, is able to just be opened in Visual Studio. The debug settings are all configured and ready to go, too. Pretty sweet! On Wednesday, April 30, 2014 5:20:00 PM UTC-5, Ryan Cole wrote: I'm familiar with writing C++ libraries

[nodejs] How to run node tests on Windows?

2014-04-29 Thread Ryan Cole
Hi all, I'm trying to run the unit tests for node, on Windows. I'm using `vcbuild.bat tests`, but all it does is rebuild the project, it does not run any tests. Is there anything additional that I need to be doing to run these tests? Thanks, Ryan -- -- Job Board: http://jobs.nodejs.org/

[nodejs] Re: How to run node tests on Windows?

2014-04-29 Thread Ryan Cole
Nevermind. For whatever reason, the tests are running now. Ryan On Tuesday, April 29, 2014 10:14:28 AM UTC-5, Ryan Cole wrote: Hi all, I'm trying to run the unit tests for node, on Windows. I'm using `vcbuild.bat tests`, but all it does is rebuild the project, it does not run any tests

[nodejs] How to properly pass LocalObject as function param?

2012-11-11 Thread Ryan Cole
In a C++ addon, I've got a function in which I instantiate a LocalObject. I want to pass that as an argument to another function. Should the argument be passed as a LocalObject, or PersistentObject? I'm unsure of when I should use either of those. Thanks -- Job Board: http://jobs.nodejs.org/

Re: [nodejs] How to properly pass LocalObject as function param?

2012-11-11 Thread Ryan Cole
progression but it's basically the only way I know how to, at the moment. Ryan On Sunday, November 11, 2012 7:19:15 PM UTC-6, Ben Noordhuis wrote: On Mon, Nov 12, 2012 at 1:54 AM, Ryan Cole ry...@rycole.com javascript: wrote: In a C++ addon, I've got a function in which I instantiate

Re: [nodejs] How to properly pass LocalObject as function param?

2012-11-11 Thread Ryan Cole
PersistentFunction, so that makes me think I'd use PersistentObject to cross those function calls? Thanks, Ryan On Sunday, November 11, 2012 8:53:20 PM UTC-6, Ben Noordhuis wrote: On Mon, Nov 12, 2012 at 2:35 AM, Roger WANG roger...@linux.intel.comjavascript: wrote: Ryan Cole ry...@rycole.com

Re: [nodejs] How to properly pass LocalObject as function param?

2012-11-11 Thread Ryan Cole
Ok thanks for the help. I think through this code I'm writing I've at least nailed down when to use those two handle types. Thanks again! Ryan On Sunday, November 11, 2012 9:19:44 PM UTC-6, Ben Noordhuis wrote: On Mon, Nov 12, 2012 at 4:16 AM, Ryan Cole ry...@rycole.com javascript: wrote

[nodejs] Returning Error from within C++ addon?

2012-11-10 Thread Ryan Cole
I'm writing an addon in C++ and would like to pass an Error to a callback function if an error occurs. I see how to throw exceptions, but in this case I simply want to pass an Error. I've looked through v8 docs and node.h but don't see any examples of returning an Error. I know this must be

Re: [nodejs] Returning Error from within C++ addon?

2012-11-10 Thread Ryan Cole
:19 AM, Ryan Cole ry...@rycole.comjavascript: wrote: I'm writing an addon in C++ and would like to pass an Error to a callback function if an error occurs. I see how to throw exceptions, but in this case I simply want to pass an Error. I've looked through v8 docs and node.h but don't see any

[nodejs] Acceptable actions to take inside a C++ addon's initialization function?

2012-11-10 Thread Ryan Cole
I'm getting a seg fault core dump in a simple module. I can eliminate the seg fault if I comment out a ThrowException call in the initialization function. My code: https://gist.github.com/4053133 (line #28) Things makes me wonder, what are the acceptable actions to take inside of this

[nodejs] When using Buffers, do the read methods also use the same initial Buffer heap memory?

2012-05-15 Thread Ryan Cole
I'm writing a module that parses data as it comes in from a tcp socket. When reading out data from a Buffer, is it better to stick to the slice method because of the fact that it uses the same heap memory as the initial Buffer? Do the read methods do this, as well? I've just assumed that the

Re: [nodejs] When using Buffers, do the read methods also use the same initial Buffer heap memory?

2012-05-15 Thread Ryan Cole
Yea, I meant the buf.readUInt32BE and friends. Thanks, Ryan -- 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

[nodejs] Re: Examples of C++ modules, for Node.js

2012-04-23 Thread Ryan Cole
Roy, I notice you mentioned this early in the email chain. I should have tried it earlier. It fixes the issue. I wonder why the ldflags in binding.gyp does not properly set this up, in my case? Or, is LD_LIBRARY_PATH just another required step no matter what? Also, I did not know about the ldd

[nodejs] Wrapping a C++ object, and adding properties directly onto args.This() = incorrect?

2012-04-23 Thread Ryan Cole
I'm wrapping a C++ object and then appending some properties. I'm calling Wrap(), and then Set()'ing the properties directly onto args.This(). This does not look or feel right to me, so I'm inclined to think I'm doing it wrong. I'm so new to this that none of the examples are standing out to me

[nodejs] Re: Examples of C++ modules, for Node.js

2012-04-22 Thread Ryan Cole
Oh, wow. I did not have email notifications enabled for responses, so I did not expect to sign in and see so many helpful responses. Thank you for these. I'm going over them now and will apply this insight to what I'm doing. Also, per Nathan's suggestion, I think I will update from node 0.6.7

[nodejs] Re: Examples of C++ modules, for Node.js

2012-04-22 Thread Ryan Cole
building your project again. Roy On Saturday, April 21, 2012 9:50:49 PM UTC-4, Ryan Cole wrote: Hello, I'm learning how to write C++ modules, for Node.js. I'm sort of brute-forcing my learning by looking at examples, referencing the documentation for v8 and trial and error. The only two modules

[nodejs] Re: Examples of C++ modules, for Node.js

2012-04-22 Thread Ryan Cole
I have adjusted the binding.gyp file to include the linker settings required for including the HDF5 libs I need. I believe that the current gyp file mirrors a Makefile that I am able to get working, for HDF5's stand alone compile. The only difference is that you're supposed to run the HDF5