Re: [nodejs] What does “info.GetReturnValue().Set(obj);” return

2019-05-01 Thread Ben Noordhuis
On Mon, Apr 29, 2019 at 9:00 PM Nitish Saboo wrote: > I am new to Nan and I want to get rid of the following code snippet > > But before that I need to understand what exactly is being returned from this > method. > > Local obj; > > NAN_METHOD(process) { > if (info.Length() == 0 || !info[0]->

Re: [nodejs] LCD display doesnt show values fore temperature and humidity

2017-07-17 Thread Ben Noordhuis
On Thu, Jul 13, 2017 at 11:07 PM, wrote: > I'm trying to finish my self-water plant system. > https://www.hackster.io/demirhanaydin/waterpi-houseplant-remote-watering-and-monitoring-system-340400?ref=platform&ref_id=424_respected___&offset=33. > I'm on the final stages but I'm unable to get my LC

Re: [nodejs] async callback using libuv not working

2017-05-26 Thread Ben Noordhuis
On Thu, May 25, 2017 at 3:33 AM, wrote: > Hello everyone, > > I have a node js service that calls into a native C library. The native > library, fire events repeatedly and continuously. These events are delivered > to a C callback function. My goal is to call a Javascript callback from this > nat

Re: [nodejs] Node js on BusyBox embedded system

2017-03-08 Thread Ben Noordhuis
On Tue, Mar 7, 2017 at 6:55 PM, Gabriel Yahav wrote: > Hi , > > I'm trying to explore the possibility of using node js as HTTP server on an > embedded real-time device running BusyBox platform . > > The issue here is that the device has limited resources . What do you think > about that idea ? > >

Re: [nodejs] Implications of running node with --debug argument

2016-12-08 Thread Ben Noordhuis
On Wed, Dec 7, 2016 at 6:03 PM, Bill Klein wrote: > I have a bug in my node server that I'm trying to track down. Unfortunately > it happens rarely and, so far, only on production. > > Therefore, I would like to be able to attach a debugger to my server > retrospectively, after the problem occurs.

Re: [nodejs] Advice please .... risks with "no standard" manipulation of packages in node_modules

2016-12-01 Thread Ben Noordhuis
On Wed, Nov 30, 2016 at 1:48 AM, Tom Fennelly wrote: > Hi. > > I'm just wondering what might be the risks associated with manipulating the > contents of the node_modules folder outside the normal "npm install" etc > commands. IOW ... are there reasons why the a raw "drop in" of packages into > the

Re: [nodejs] Tips for finding runaway CPU bugs

2016-10-12 Thread Ben Noordhuis
On Mon, Oct 10, 2016 at 1:43 AM, Bgsosh wrote: > Hi, > > I'm having a tough time tracking down an issue we currently have in > production. Our node processes will sometimes suddenly spike in CPU usage, > and then stay pegged at 100% until restarted. > > I'm not able to reproduce on development ma

Re: [nodejs] Business objects retained by Global Handles in heap dump

2016-10-10 Thread Ben Noordhuis
On Sat, Oct 8, 2016 at 9:11 PM, 'Russ Frank' via nodejs wrote: > Hey, > > I have a heap dump (obtained with bnoordhuis/node-heapdump) of a production > node process that had a large heap. I found a bunch of business objects > retained by "(Global Handles)". I'm wondering how a JS object can end up

Re: [nodejs] Building node.js with newer version of V8

2016-09-03 Thread Ben Noordhuis
On Fri, Sep 2, 2016 at 4:23 PM, wrote: > Hello all! > I would like to ask if it is possible/ advisable to build node.js with a > newer version of v8. I noticed that the current version of v8 used in node > is 5.1.xx while I need to use 5.3.xx onwards. > I am working on profiling jitted code with

Re: [nodejs] extern variable from one addon to another addon

2016-08-26 Thread Ben Noordhuis
On Mon, Aug 22, 2016 at 4:59 PM, Dheeraj Singh wrote: > Hi Friends, > > I have created two addons, what is expected is to extern a variable from one > addon to another addon. > But when I extern the global variable declared in one addon to another. > In the addon where I am doing extern, I am gett

Re: [nodejs] What does the property named "offset" (under class "Buffer") meaning?

2016-08-26 Thread Ben Noordhuis
On Tue, Aug 23, 2016 at 8:50 AM, Tom Fan wrote: > What does the property named "offset" (under class "Buffer") meaning? It's the offset into the parent buffer: buf.slice(1,1).offset === buf.offset + 1. -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886

Re: [nodejs] require('os').homedir() error on linux

2016-07-01 Thread Ben Noordhuis
On Fri, Jul 1, 2016 at 9:24 AM, Marco Stolle wrote: > Hello, > > i'm testing a library where i have to run the script with sudo, thats when i > get an error on the line > > var homedir =require('os').homedir() > > (i also get this error in a file with only this line, it's unrelated to the > librar

Re: [nodejs] dns.resolve only tries the first nameserver in /etc/resolv.conf??

2016-05-06 Thread Ben Noordhuis
On Fri, May 6, 2016 at 5:50 AM, Yun Feng Ma wrote: > 在此输入代码... > > > > 在 2016年5月6日星期五 UTC+8上午9:43:50,Ben Noordhuis写道: >> >> On Thu, May 5, 2016 at 9:00 AM, Yun Feng Ma wrote: >> > Hi everyone! >> > >> > The dns.resolve tries to send request

Re: [nodejs] dns.resolve only tries the first nameserver in /etc/resolv.conf??

2016-05-05 Thread Ben Noordhuis
On Thu, May 5, 2016 at 9:00 AM, Yun Feng Ma wrote: > Hi everyone! > > The dns.resolve tries to send request to only the first nameserver in > /etc/resolv.conf, and if the first nameserver fails to resolve the name, > dns.resolve just returns and doesn't try to send request to the second > nameserv

Re: [nodejs] Which version is the latest LTS? 4.4.3 or 4.2.0

2016-05-02 Thread Ben Noordhuis
On Fri, Apr 29, 2016 at 12:20 PM, Lucas wrote: > On the LTS schedule on github it looks like 4.2.0 is the latest LTS > (https://github.com/nodejs/LTS#lts_schedule) > > But on the homepage it says 4.4.3 is the latest LTS (https://nodejs.org/en/) 4.2.0 was the _first_ LTS release, 4.4.3 is the late

Re: [nodejs] How to track object allocations in node.js?

2016-05-02 Thread Ben Noordhuis
On Thu, Apr 28, 2016 at 7:31 PM, Haitao Li wrote: > Hi Ben, thanks for your reply. Somehow I didn't get the notification for it. > I've enabled logging and found that it's MarkSweepCompact that's taking > long. In each nodejs process in the past one hour, MarkSweepCompact occurs > almost exactly o

Re: [nodejs] Re: NodeJS with ECDHE ECC Certificate

2016-04-26 Thread Ben Noordhuis
On Mon, Apr 25, 2016 at 11:34 AM, Eugene Williams wrote: > Thanks again for the suggestion Johnny. > > I updated the server configuration with the new cipher suite. The final > setup is: > > var ciphersall = > 'ECDHE-ECDSA-RC4-SHA:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA

Re: [nodejs] Failure in call from addon into node New string using Nan

2016-04-24 Thread Ben Noordhuis
On Sat, Apr 23, 2016 at 10:19 PM, Stephen James wrote: > Attempting to call from c++ to v8 using async.c using Nan::New() > I keep ending up with the following > abort. > > void EventConnectedAsync(uv_async_t *handle) > { > if (!EventConnectedCB.IsEmpty()) > { > cout << (char*)handle->data

Re: [nodejs] What's the proper way to disable "early TLS" (TLS 1.0) in node?

2016-04-15 Thread Ben Noordhuis
On Wed, Apr 13, 2016 at 3:41 AM, Arthur Blake wrote: > What's the proper way to disable "early TLS" (TLS 1.0) in node? Apparently > this is now required for PCI compliance on new websites - see > https://www.pcisecuritystandards.org/documents/Migrating_from_SSL_Early_TLS_Information%20Supplement_v

Re: [nodejs] Offline documentation (html or pdf), possible?

2016-03-26 Thread Ben Noordhuis
On Sat, Mar 26, 2016 at 4:53 AM, Harry wrote: > Tried this tarball, > https://nodejs.org/dist/latest-v5.x/node-v5.9.1-linux-x64.tar.xz > > but could not find any doc/api directory in it. > > There are .md files such as: > node-v5.9.1-linux-x64/lib/node_modules/npm/doc/cli/npm-bugs.md Th

Re: [nodejs] Offline documentation (html or pdf), possible?

2016-03-25 Thread Ben Noordhuis
On Fri, Mar 25, 2016 at 4:21 AM, Harry wrote: > Hello, > > Can the full html or pdf documentation be provided with every stable Node > release for offline viewing? > > I can save the 'all.html' page from the browser but the index on the side > (that lets me jump straight a section) continues to ha

Re: [nodejs] A few newbie questions on Nodejs

2016-03-23 Thread Ben Noordhuis
Hello Harry, replies inline. On Wed, Mar 23, 2016 at 5:25 PM, Harry Simons wrote: > Hello, > > > I have not been able to see the following points addressed in all the online > material I have read to date on Node, and so, hope to be enlightened by some > very smart and knowledegable folks here th

Re: [nodejs] Nodejs Addons. C++ to JS type conversion

2016-03-18 Thread Ben Noordhuis
On Wed, Mar 16, 2016 at 9:59 PM, HungryHippo wrote: > hi, i'm really struggling to work with Nan and conversions of C++ to V8 > types. > > How would i convert this format ? std::vector data; > > > info.GetReturnValue().Set(Nan::New(convertedData)); > > > thanks for any help :-) if (data.empty())

Re: [nodejs] How to track object allocations in node.js?

2016-02-21 Thread Ben Noordhuis
On Sat, Feb 20, 2016 at 7:37 PM, Haitao Li wrote: > I have a node.js app with dependencies on 50+ modules. A worker process > consumes about 1G memory, as shown in RES column of "top" command output. > CPU load is light. Ever since I upgraded node.js from 0.10 to 4.2.3, I > noticed the response ti

Re: [nodejs] missing v0.10.42-release branch on GitHub?

2016-02-17 Thread Ben Noordhuis
On Wed, Feb 17, 2016 at 8:18 AM, Jens Eggers wrote: > Hi, I'm looking for the 0.10.42 release on GitHub and can't find the usual > release branch (which would be called v0.10.42-release). I can only see this > commit: > > https://github.com/nodejs/node/commit/0e0aa28871732c57a2e11bd6e4371f8f98331e

Re: [nodejs] Why HandleWrap is not managed by GC?

2015-12-28 Thread Ben Noordhuis
On Thu, Dec 24, 2015 at 6:38 AM, 贾凯 wrote: > I think nodejs can make HandleWrap to be Persist weak object, so v8 can > collect the inaccessible object and close the underlying file descriptor > automatically, but why it isn't ? > > var net = require('net'); > var PORT = 8000; > var tcpServer = net

Re: [nodejs] Node V5 has issues with installing behind proxies

2015-12-02 Thread Ben Noordhuis
On Tue, Dec 1, 2015 at 5:28 PM, Peter Rust wrote: > Any idea why 0.12 would behave differently? It's possible the proxy uses a certificate that's signed by a CA that's accepted by v0.12 but not by v4.x or v5.x. -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othi

Re: [nodejs] Node V5 has issues with installing behind proxies

2015-11-30 Thread Ben Noordhuis
On Mon, Nov 30, 2015 at 6:42 PM, Wyatt Biker wrote: > I am behind corporate proxy. I ve tried everything under the sun with flags > and configs. (yes i set up the --proxy and --https-proxy). I reverted back > to 0.12 and everything works fine. > > Any ideas? > > Here is the message: > Enter node

Re: [nodejs] Creating Buffers: What is the optimal way of creating a buffer from a different thread?

2015-11-17 Thread Ben Noordhuis
On Tue, Nov 17, 2015 at 5:29 AM, Eric Yen wrote: > Hi, > > I was wondering could point me in the in the right direction. > I have a C library running in a thread #1. When works arrive in thread #1, > work is queued on to a Queue, and the thread wakes up thread #2 through > uv_async_send, which wak

Re: [nodejs] Domain module in nodejs 4.0.0

2015-09-13 Thread Ben Noordhuis
On Sun, Sep 13, 2015 at 5:37 AM, Charles Dumas wrote: > I'm sorry if this has been discussed somewhere, but I can't seem to find it > with google: > > I noticed the domain module is marked as deprecated in 4.0.0 : > https://nodejs.org/api/domain.html > > The documentation isn't clear about what us

Re: [nodejs] Using MakeCallback for domain-based error propagation and setting recv

2015-07-16 Thread Ben Noordhuis
On Thu, Jul 16, 2015 at 12:44 AM, Jeff Waller wrote: >> Then args.This() equals |addon|, the native module object, and won't >> normally have the .domain property that MakeCallback() looks for. > > > Much thanks, that clarifies. > > I have a followup question. There are multiple functions my > add

Re: [nodejs] Using MakeCallback for domain-based error propagation and setting recv

2015-07-15 Thread Ben Noordhuis
On Wed, Jul 15, 2015 at 2:17 AM, Jeff Waller wrote: > When dispatching from an asynchronous operation using C++, the function > node::MakeCallback is > supposed to automatically set the domain of the callback. So if method > throws, then an event will > be sent to the domain. At least that's the

Re: [nodejs] Need help understanding Node.js CPU consumption

2015-07-07 Thread Ben Noordhuis
On Tue, Jul 7, 2015 at 5:44 AM, Sunil Agrawal wrote: > If my entire Node.js program is the following > > setInterval(function() {}, Infinity) > > 'top' shows it consumes 15-20% CPU > > If I change it to > > setInterval(function() {}, 10) > > it drops down to < 1% CPU consumption. > > Any insig

Re: [nodejs] Accessing stack traces of an Error object is extremely slow

2015-06-26 Thread Ben Noordhuis
On Fri, Jun 26, 2015 at 2:54 AM, wrote: > Hi, > While profiling one of my tests I noticed that accessing the `stack` > property of an Error object is extremely slow; anywhere from 5 to 100ms on > my pretty new MBP (I can reliably reproduce one test case where it takes > 100ms to access the proper

Re: [nodejs] event loop lag hunting

2015-05-26 Thread Ben Noordhuis
On Mon, May 25, 2015 at 9:40 PM, Gregg Caines wrote: > Hey all, > > Does anyone have any experience hunting down causes of event-loop lag? I've > determined that our app is heavily affected by it (See the attached png > where I graph api response time in red against event-loop lag in blue), but >

Re: [nodejs] Cross Compiling Node.js

2015-05-12 Thread Ben Noordhuis
On Mon, May 11, 2015 at 8:25 PM, Fabrício Lélis wrote: > I' ve tried to make cross compiling node.js but I get this error: > ./node: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.15' not found > (required by ./node) > > This is my script: > > #!/bin/sh -e > 2 > 3 #Define our target devi

Re: [nodejs] is it possible to start-stop CPU profiling on runtime and get the v8.log file?

2015-05-11 Thread Ben Noordhuis
On Mon, May 11, 2015 at 3:40 PM, Irina Tchernouchina wrote: > Hello all, > > I know that I can either > > 1) pass node.js --prof --log-timer-events app.js and get v8.log file for > the whole execution, > 2) or node.js app.js, but use binding from > https://github.com/node-inspector/v8-profiler an

Re: [nodejs] Node.js Addon - Creating And Returning An Object

2015-05-08 Thread Ben Noordhuis
On Thu, May 7, 2015 at 6:08 AM, Jon Lederman wrote: > I have the following two wrappers listed below. I want the Api method of B > to return an A in javascript. How do I do this? I can’t figure out how to > construct the B class from the A Api method and return it? Any help would > be greatly

Re: [nodejs] Fatal error CHECK(cpu.has_sse2()) failed

2015-04-16 Thread Ben Noordhuis
On Wed, Apr 15, 2015 at 9:41 PM, Guy Dillen wrote: > Thanks for the info. > I ll try to build it taking into account the flags in configure. > Can i build it in my VM (running the same OS Voyage Linux but with a > different processor with more RAM) by using the configure flags and use the > resu

Re: [nodejs] Fatal error CHECK(cpu.has_sse2()) failed

2015-04-15 Thread Ben Noordhuis
On Wed, Apr 15, 2015 at 10:51 AM, Guy Dillen wrote: > Hi, > > When running (trying to :-) ) nodejs (after doing the build in a VM with > same OS but other processor) I get a Fatal error in > .../deps/v8/src/ia32/assembler-ia32.cc, line 54 > CHECK(cpu.has_sse2()) failed. > > - Does this mean nodejs

Re: [nodejs] NodeJS 12 ARMv5 Problem

2015-02-11 Thread Ben Noordhuis
On Wed, Feb 11, 2015 at 12:17 AM, Michael Boldischar wrote: > I'm having trouble compiling NodeJS version 12 for ARMv5. When I try > running node, I get an "Illegal instruction" error. The last known version > to work for someone in my group was NodeJS version 10. > > I suspect it has something

Re: [nodejs] v8 profiling: 0.11.15 and 0.11.16 give two v8.log files

2015-02-02 Thread Ben Noordhuis
On Mon, Feb 2, 2015 at 2:42 PM, Irina Tchernouchina wrote: > Hi, > > I have a question concerning V8 profiling. > Starting from 0.11.15, for versions 0.11.15 and 0.11.16, using > > node --prof --log-timer-events --logfile=v8_02_02_15.log > > I see two log files created, with names like > "isolate-

Re: [nodejs] How to create an rpm of nodejs

2015-01-28 Thread Ben Noordhuis
On Wed, Jan 28, 2015 at 7:55 AM, Raju Ahuja wrote: > Hi, > > I need the rpm spec file to create an rpm package out of nodejs source > tarball. > > > Thanks > Raju Does https://github.com/iojs/io.js/tree/v1.x/tools/rpm work for you? -- Job board: http://jobs.nodejs.org/ New group rules: https:/

Re: [nodejs] Node.js on Linux, e5500 PowerPC (Freescale P5020)

2015-01-23 Thread Ben Noordhuis
On Fri, Jan 23, 2015 at 12:55 PM, Raphael wrote: > Hi > > I'm in the process of evaluating a server side technology to build a new > product from scratch. It must run on Linux, Win, OSX and on (Yocto-) Linux > running on self-made hardware: An embedded system using Freescale P5020 > PowerPC (and o

Re: [nodejs] Trigger the event loop to be processed

2015-01-22 Thread Ben Noordhuis
On Thu, Jan 22, 2015 at 8:27 PM, Fredrik O wrote: > Sorry Matt, I was not precise enough. It was only an example. The reality is > that I am building a new sort of platform above node and was curious if > there is something I can invoke to force the event loop immediately to be > processed. > > I

Re: [nodejs] NodeJs running in command line shows “Aborted”

2014-12-23 Thread Ben Noordhuis
On Tue, Dec 23, 2014 at 7:34 AM, Aneek Mukhopadhyay wrote: > > Hello, > > I am using an Amazon EC2 instance using CentOs 5.4. I installed nodejs in > different servers that follow the same architecture. In the current server I > installed nodejs by following the below steps. > > INSTALL PYTHON 2

Re: [nodejs] Nodejs randomly hitting 100% CPU

2014-12-18 Thread Ben Noordhuis
On Wed, Dec 17, 2014 at 3:09 PM, Karim Tarek wrote: > is there any way to profile the node app at the spike time only in order to > be able to process it via the node-tick-processor ? We (StrongLoop) recently added a new paid feature to our strong-agent[0] product that profiles selectively during

Re: [nodejs] Re: node.js and io.js reconciliation

2014-12-12 Thread Ben Noordhuis
On Fri, Dec 12, 2014 at 3:00 PM, Dave Horton wrote: > Putting all of the political discussion to one side (I don't find it that > interesting, and I am not one that is concerned the sky is falling because > of this fork) I have one very simple tactical question: > >what are the considerations

Re: [nodejs] does node actually use process.config.variables?

2014-11-16 Thread Ben Noordhuis
On Sun, Nov 16, 2014 at 12:20 AM, Andreas Marschke wrote: > That'd be `andreas-marschke` > > See also: https://github.com/andreas-marschke > > Thanks! Invite's in your inbox, Andreas. -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderati

Re: [nodejs] does node actually use process.config.variables?

2014-11-15 Thread Ben Noordhuis
On Sat, Nov 15, 2014 at 3:46 AM, Andreas Marschke wrote: > Hi Ben! > > The node repo for node-forward doesn't exist for me I'm not a contributor > (yet -- maybe soon). So I can't see if you have a private repo in the > Organisation or anythin. > > If you have I'd be interested though ;) > > Cheers

Re: [nodejs] does node actually use process.config.variables?

2014-11-14 Thread Ben Noordhuis
On Fri, Nov 14, 2014 at 10:49 PM, Andreas Marschke wrote: > I was wondering if setting flags such as --nouse-idle-notification and v8 > options that you can set from the commandline was possible from inside > the node process. --nouse_idle_notification is a no-op in v0.10 and newer. That said, t

Re: [nodejs] does node actually use process.config.variables?

2014-11-11 Thread Ben Noordhuis
On Tue, Nov 11, 2014 at 3:45 PM, Andreas Marschke wrote: > Hi! > > I've looked at process.config which is like this in my environment: > > { target_defaults: >{ cflags: [], > default_configuration: 'Release', > defines: [], > include_dirs: [], > libraries: > [ '-lz',

Re: [nodejs] Performance Monitoring in NodeJS without external Services (StrongLoop, AppDynamics, nodetime, etc.)

2014-11-11 Thread Ben Noordhuis
On Tue, Nov 11, 2014 at 12:04 PM, Andreas Marschke wrote: > Hi Ben, > > thanks for your pointers. > > The fact that I need an API-key and have to (If I understand you correctly) > still send my data to the service provider (in worst case > even through the same network interface as my data I need

Re: [nodejs] Performance Monitoring in NodeJS without external Services (StrongLoop, AppDynamics, nodetime, etc.)

2014-11-10 Thread Ben Noordhuis
On Mon, Nov 10, 2014 at 9:03 PM, Andreas Marschke wrote: > Hi, > > first off: Don't get me wrong I like the fact, that there are companys out > ther supporting nodejs with > extra services and "consulting". I would however prefer to be the master > over my data and learn from it > myself without a

Re: [nodejs] node.js heapdump ... how to understand the memorydump ?

2014-11-10 Thread Ben Noordhuis
On Sun, Nov 9, 2014 at 11:47 PM, Balaganesh Krishnamoorthy wrote: > http://i.stack.imgur.com/bb5C4.png > > > Hi, > > I am having memory leak in my node application which i am running as a > service. I took memory dump using heapdump node_module > after that i put it on a chrome profiler

Re: [nodejs] Re: Network performance on AIX 7.1 with v0.10.32 seems to be slow

2014-10-29 Thread Ben Noordhuis
On Wed, Oct 29, 2014 at 7:02 PM, Jérémy Lal wrote: > I'm not aware v8 runs on AIX ? Maybe the port is incomplete and runs > mostly in emulation mode (that's when v8 does not compile just in > time) ? The port is here: https://github.com/andrewlow/v8ppc (Andrew is an IBM employee.) I can't attest

Re: [nodejs] Re: Network performance on AIX 7.1 with v0.10.32 seems to be slow

2014-10-29 Thread Ben Noordhuis
On Wed, Oct 29, 2014 at 3:50 PM, Matt wrote: > Could it be related to the fact that uv will have to use poll() on AIX > instead of epoll/kqueue? The AIX port uses the pollset_*() family of functions. Pollsets should have performance characteristics comparable to epoll and friends, at least in th

Re: [nodejs] recommended way to open a pipe in a child process

2014-10-27 Thread Ben Noordhuis
On Sun, Oct 26, 2014 at 5:12 PM, Tim Kuijsten wrote: > The docs clearly state that the parent end of a pipe can be opened via the > stdio array on the child_process instance. But the docs do not state > anything about how to open the pipe in the child. Now with some > experimenting I've found that

Re: [nodejs] fs exclusive mode

2014-10-22 Thread Ben Noordhuis
On Wed, Oct 22, 2014 at 5:22 PM, Mark Volkmann wrote: > Thanks for explaining that! Doesn't your explanation mean that the > documentation is wrong? From what you said, "ax" does NOT fail if path > exists and does NOT ensure that path is newly created. No, the documentation is correct. If what y

Re: [nodejs] fs exclusive mode

2014-10-22 Thread Ben Noordhuis
On Wed, Oct 22, 2014 at 3:24 AM, Mark Volkmann wrote: > The docs say ... > " 'ax' - Like 'a' but fails if path exists." > and a bit later ... > "The exclusive flag 'x' ensures that path is newly created." > > What is the point is using the 'ax' mode if it can't append to an existing > file? > It s

Re: [nodejs] c++ addon: How to prevent GC for event triggered in another thread

2014-10-15 Thread Ben Noordhuis
On Wed, Oct 15, 2014 at 2:04 AM, Grant Hutchins wrote: > I have a Node ObjectWrap subclass object that handles a uv_async_send from a > thread I don't control (from a key-value store library I'm using that can > trigger an event at any time). I would like to make sure that if > uv_async_send is tr

Re: [nodejs] Building Node addon on AIX

2014-10-14 Thread Ben Noordhuis
On Tue, Oct 14, 2014 at 1:15 PM, Michael Pyne wrote: > I'm looking for help with building an addon for Node.js on AIX. > > I'm working on an AIX 7.1 powerpc box, with Node.js 0.11.13 for powerpc from > andrewlow/node on GitHub. > Make is GNU Make v 3.81; gcc is v4.8.2. > > I don't have root access

Re: [nodejs] Running node on port 80?

2014-09-29 Thread Ben Noordhuis
On Sat, Sep 27, 2014 at 6:14 PM, Craig Coleman wrote: > I'd like to try running nodejs on port 80 on a debian and gentoo server > I've seen a lot post how people do this but I'd like to get some additional > advice so I don't screw things up on our test servers. > I'm just getting started with nod

Re: [nodejs] Building "Source Code" on any Java based IDE in windows.

2014-09-22 Thread Ben Noordhuis
On Mon, Sep 22, 2014 at 1:01 PM, Dilip Manjunath wrote: > Can somebody tell me how to build and compile the "NodeJS Source code" on > and Java based IDE(ex. Eclipse, VXWorks). You can't officially but unofficially: - open the configure file - scroll down to the bottom - find the line that says:

Re: [nodejs] Get the context of a script

2014-09-17 Thread Ben Noordhuis
On Wed, Sep 17, 2014 at 1:09 PM, Peter Stoyanov wrote: > It is in the javascript file, that i pass to node::CreateEnvironmet(): > > function stateInit() > { > return 0; > } > > and it is called later from C++. > > I am trying to figure out, where exactly in node.js the javascript file that > i

Re: [nodejs] Get the context of a script

2014-09-16 Thread Ben Noordhuis
On Tue, Sep 16, 2014 at 9:10 PM, Peter Stoyanov wrote: > --corrected > > Hi Ben, > > I want to get the context after the javascript file is executed from > node::CreateEnvironment(). I am trying like this: > > Isolate* isolate = Isolate::GetCurrent(); > HandleScope handleScope(isolate); >

Re: [nodejs] Get the context of a script

2014-09-15 Thread Ben Noordhuis
On Mon, Sep 15, 2014 at 3:10 AM, Peter Stoyanov wrote: > Hello, > > I am embedding node.js(v0.11.13) into my C++ application. I use node::Init() > and node::CreateEnvironment(). I pass a .js file to CreateEnvironment and it > is executed. > > How can I get the context of the executed script, becau

Re: [nodejs] V8 Stack Trace API

2014-09-11 Thread Ben Noordhuis
Sorry, missed your reply. Replies inline. On Fri, Sep 5, 2014 at 5:37 PM, enormouspenguin wrote: > Great explanation. Although, It took novice-me quite some time to dig in and > digest. V8 is really "pretty large and complex" just as you said. The topic > of V8 deserve full-time dedication in or

Re: [nodejs] buffer toString with partial utf8 character?

2014-09-08 Thread Ben Noordhuis
On Fri, Sep 5, 2014 at 10:08 AM, Mark Hahn wrote: >> So if I find \uFFFD as the last character of a valid but truncated utf8 >> buffer and I strip it, I should always end up with a valid string, right? >> >> That was an awkward sentence. Let me try in code. If buf is the first >> 512 bytes of a

Re: [nodejs] buffer toString with partial utf8 character?

2014-09-03 Thread Ben Noordhuis
On Wed, Sep 3, 2014 at 10:28 AM, Mark Hahn wrote: > What happens if I convert an entire buffer to a string using toString and > the end of the buffer only has a partial character encoding? Will it just > ignore the extra byte(s)? (This is what I want). Or will it have garbage > at the end of th

Re: [nodejs] V8 Stack Trace API

2014-09-03 Thread Ben Noordhuis
On Wed, Sep 3, 2014 at 10:32 AM, enormouspenguin wrote: > Looks like I have just wandered myself far off into some pretty low level C++ > stuff that I have little to no knowledge about. Sorry but I couldn't > understand over half of your reply (only the "stack top" function explanation > part t

Re: [nodejs] V8 Stack Trace API

2014-09-02 Thread Ben Noordhuis
On Tue, Sep 2, 2014 at 5:12 PM, enormouspenguin wrote: > I was just playing around with V8 Stack Trace API and came up with the > following stupid code: > > [snip] > > Is that expected behavior? And if so, could anyone please explain it? I > think it involve some kind of optimization that V8 does

Re: [nodejs] Windows 8.3 File Names

2014-08-20 Thread Ben Noordhuis
On Wed, Aug 20, 2014 at 7:39 AM, Joran Dirk Greef wrote: > I am working on file synchronization and would like to know how Node.js > receives file names from Windows when calling fs.stat or fs.readdir? Node.js (or rather, libuv) uses the wide character versions of the NT API for most things. For

Re: [nodejs] Does `node --harmony` works stable on all platforms?

2014-08-15 Thread Ben Noordhuis
On Thu, Aug 14, 2014 at 10:25 PM, Alexey Petrushin wrote: > Want to try generators `node --harmony` but worried a little about: > > - if it works on all platforms? > - does the API stable and won't be changed in future? No and no, in general. --harmony is for experimental features whose spec hasn

Re: [nodejs] why "node --prof test.js" does not work ?

2014-08-05 Thread Ben Noordhuis
On Tue, Aug 5, 2014 at 3:04 PM, Hyanglan Park wrote: > Does anyone know why "node --prof test.js" not work ? > > What I did are followings: > > git clone https://github.com/joyent/node.git > ./configure > make > sudo make install > cd node/deps/v8/ > make dependencies > make native > vim test.js >

Re: [nodejs] Callbacks vs Fibers Memory Consumption Benchmark

2014-08-02 Thread Ben Noordhuis
On Fri, Aug 1, 2014 at 11:07 PM, Alexey Petrushin wrote: > There where talk about disadvantage of using Fibers because it has huge > stack and consumes more memory. > > I wanted to know exactly how much more memory it consumes and created simple > test - it creates 8000 callbacks & 8000 fibers and

Re: [nodejs] Repercussions of GN replacing GYP upstream?

2014-07-09 Thread Ben Noordhuis
On Wed, Jul 9, 2014 at 2:56 AM, Johan Bergström wrote: > It's pretty clear that Google is moving away and effectively abandoning Gyp > at the end of this year. That means that everything within chromium (v8 and > zlib is the only stuff that would affect node, right?) will be built by gn. > Reading

Re: [nodejs] Cross compiling node.js for microblaze

2014-07-09 Thread Ben Noordhuis
On Tue, Jul 8, 2014 at 9:22 PM, Simon Vincent wrote: > Will node.js work on other hardware platforms other than X86 and ARM? > If I managed to get it to compile for microblaze would it work or would I be > wasting my time? Just making it compile won't do you much good. V8 (the JS engine) is a ru

Re: [nodejs] Re: Here's your Node.js performance tip of the week - how garbage collection works and how to monitor it

2014-06-28 Thread Ben Noordhuis
On Fri, Jun 27, 2014 at 1:17 PM, Zlatko Đurić wrote: > Where can one look for this code, write barriers and stuff? (I guess > curiosity is getting the better out of me, or however the saying goes.) I'm afraid it's scattered all over deps/v8/src. Grep around for 'WriteBarrier' and make sure you h

Re: [nodejs] Re: Here's your Node.js performance tip of the week - how garbage collection works and how to monitor it

2014-06-26 Thread Ben Noordhuis
On Thu, Jun 26, 2014 at 12:08 PM, zladuric wrote: > What I'd like to add is a little bit of wisdom I've picked up at the > MLOC-JS.com conference in Budapest this February. Ben Titzer from Google > Chrome division was explaining a little bit of this, how does GC work in V8, > and he's shared a gre

Re: [nodejs] Is it possible yet to use cluster and UDP on Windows environment.

2014-06-21 Thread Ben Noordhuis
On Sat, Jun 21, 2014 at 5:32 AM, Ket wrote: > Base on my google research, something like this is working fine on Linux > environment: > http://stackoverflow.com/questions/16724216/node-js-0-10-7-cluster-support-for-udp-dgram > > But I work mostly on Windows 7 and 8 before upload things to the Linu

Re: [nodejs] libuv and timerfd

2014-05-08 Thread Ben Noordhuis
On Thu, May 8, 2014 at 10:26 AM, Kees k wrote: > Why the pool size is 4; is it a pragmatic choice? More or less. The actual number is fairly arbitrary but the reason it's fixed is that I couldn't make an auto-scaling thread pool always perform better than a fixed one. I've tried several approac

Re: [nodejs] libuv and timerfd

2014-05-07 Thread Ben Noordhuis
On Wed, May 7, 2014 at 2:01 PM, Kees k wrote: > Hello all, > > I have a difficulty with integrating timerfd worker threads with another > worker thread. Basically my app has two types of external threads: > 1. worker thread that sleeps 10 ms ('does some blocking task') and returns > 2. worker thre

Re: [nodejs] Node v0.10.27 (Stable)

2014-05-01 Thread Ben Noordhuis
On Fri, May 2, 2014 at 12:47 AM, Timothy J Fontaine wrote: > 2014.05.01, Version 0.10.27 (Stable) > > * npm: upgrade to v1.4.8 > > * openssl: upgrade to 1.0.1g > > * uv: update to v0.10.27 > > * dns: fix certain txt entries (Fedor Indutny) > > * assert: Ensure reflexivity of deepEqual (Mike Pennis

Re: [nodejs] v8 Uint32Value performance

2014-05-01 Thread Ben Noordhuis
On Thu, May 1, 2014 at 4:34 PM, Kees k wrote: > Managed to solve this problem. The same piece of code takes now < 100 usec. > > Strange thing is still that there is a big difference when i measure the > execution time of my whole modbus reply function when measured from > javscript or in c++. > >

Re: [nodejs] CMS Websites Services in USA | UK | SINGAPORE | CANADA | Malaysia | India

2014-05-01 Thread Ben Noordhuis
On Thu, May 1, 2014 at 3:32 PM, Aria Stewart wrote: > > On May 1, 02014, at 9:24, Alexey Petrushin wrote: > >> Doesn't Google Groups to just ban spammers? I believe it should be possible. > > I’ve been reporting, but no motion yet. I’m not sure I can glean the system > behind it if there is one.

Re: [nodejs] v8 Uint32Value performance

2014-04-30 Thread Ben Noordhuis
On Wed, Apr 30, 2014 at 3:51 PM, Kees k wrote: > I get an error with v8: '3.11.10.25': > FATAL ERROR: v8::Object::SetIndexedPropertiesToExternalArrayData() JSArray > is not supported > > Now I am trying this option: > GetPointerFromInternalField (int index) Pass it a normal object, not an array (

Re: [nodejs] v8 Uint32Value performance

2014-04-30 Thread Ben Noordhuis
On Wed, Apr 30, 2014 at 11:10 AM, Kees k wrote: > Hello all, > > I am writing a piece of code to interface with a modbus library > (libmodbus),which should be really fast. One bottleneck is that I have to > convert a Local to uint8_t array: > >>> uint8_t req[req_length]; >>> Local req_arr = Local:

Re: [nodejs] MS SqlServer driver?

2014-04-18 Thread Ben Noordhuis
On Fri, Apr 18, 2014 at 8:24 PM, Bruno Jouhier wrote: > Just looked at the official driver project > (https://github.com/Azure/node-sqlserver) and was very disappointed to see > that it has not been updated for more than 1 year. > > Tedious (https://github.com/pekim/tedious) seems to be the only r

Re: [nodejs] Best Digital Marketing Services by Professional Web Designing Company

2014-04-16 Thread Ben Noordhuis
Can whoever is moderating the mailing list these days be a little more discriminatory, please? I don't want to have to sift through spam every morning. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received

Re: [nodejs] dynamically linking shared libraries using relative paths?

2014-04-07 Thread Ben Noordhuis
On Mon, Apr 7, 2014 at 1:42 PM, Alan Koshy John wrote: > Hi, > > I would like to dynamically link a shared library file. I used the following > code > > "link_settings":{ > "ldflags":["-L../lib/linux/ia32/","-lLib.so"], > } > > I have specified the relative pat

Re: [nodejs] V8 Security Patches

2014-03-24 Thread Ben Noordhuis
On Mon, Mar 24, 2014 at 2:29 PM, Charles Shuller wrote: > From CERT: Multiple unspecified vulnerabilities in Google V8 before > 3.23.17.18 > > We're preparing to deploy node apps in our production environment, and we > need to be able to address security concerns like the one above. An

Re: [nodejs] Re: Ben Noordhuis's Departure

2013-12-09 Thread Ben Noordhuis
On Mon, Dec 9, 2013 at 9:38 PM, Ben Noordhuis wrote: > On Mon, Dec 9, 2013 at 7:29 PM, Mikeal Rogers wrote: >> On Dec 9, 2013, at 9:13AM, Jorge Chamorro wrote: >> >> stepping over the guy who is in charge of libuv and pissing him off >> >> >> No part o

Re: [nodejs] Re: Ben Noordhuis's Departure

2013-12-09 Thread Ben Noordhuis
On Mon, Dec 9, 2013 at 7:29 PM, Mikeal Rogers wrote: > On Dec 9, 2013, at 9:13AM, Jorge Chamorro wrote: > > stepping over the guy who is in charge of libuv and pissing him off > > > No part of this is accurate. On the contrary, it's 100% accurate. The reason I stepped down is not because of the

Re: [nodejs] How do you catch close_notify on tls sockets

2013-11-26 Thread Ben Noordhuis
On Tue, Nov 26, 2013 at 3:59 PM, Matt wrote: > From: https://tools.ietf.org/html/rfc5246#page-29 > > We need to be able to detect this in Haraka because Exim does some horrible > nastiness with downgrading TLS and restarting the SMTP session in plaintext. > > I can't see anything in the TLS or Soc

Re: [nodejs] Memory Usage and disparity between RSS and Heap size

2013-11-25 Thread Ben Noordhuis
On Mon, Nov 25, 2013 at 6:39 PM, Steve Freegard wrote: > On 23/11/13 15:22, Ben Noordhuis wrote: >> I can't really reproduce that. Below is what IMO the test case >> reasonably should look like and that has RSS hovering around 60 MB >> with --max_old_space_size=64. Tes

Re: [nodejs] Should I use 64bit or 32bit of node

2013-11-24 Thread Ben Noordhuis
On Sun, Nov 24, 2013 at 8:08 PM, Mark Hahn wrote: >> Running a 32 bits binary on a 64 bits operating system is certainly >> possible but system call performance generally takes a hit. > > I thought it was the opposite. All 64-bit does is give you more address > space. 64-bit is slower because t

Re: [nodejs] Should I use 64bit or 32bit of node

2013-11-24 Thread Ben Noordhuis
On Sun, Nov 24, 2013 at 4:33 AM, Ket wrote: > Sorry for a dumb question. I'm not an IT guy so I don't know the different > of the two. > I've a 2GB RAM server on a2hosting.com and planned to upgrade in a near > future. > Which package is better suit for me. > > PS. I run a 32bit package previously

Re: [nodejs] Memory Usage and disparity between RSS and Heap size

2013-11-23 Thread Ben Noordhuis
On Sat, Nov 23, 2013 at 2:31 AM, Steve Freegard wrote: > On 23/11/13 01:02, Ben Noordhuis wrote: >> Right. I see that your test case creates 1M file watchers in a loop. >> Those won't be released right away and calling gc() won't change that. >> Disposing a file wat

Re: [nodejs] Re: How does round-robin clustering work in Node?

2013-11-23 Thread Ben Noordhuis
On Sat, Nov 23, 2013 at 3:01 AM, Marco Rogers wrote: > I have a naive question here. If cluster doesn't know if the worker is busy, > what happens when a new connection comes in and it is still busy? Do > requests queue at each worker? What behavior should be expected if you're > using round robin

  1   2   3   4   5   6   7   8   9   10   >