Re: [nodejs] execve in node

2017-01-16 Thread Fedor Indutny
I'm not sure if it helps, but have you already tried child_process.spawnSync? On Mon, Jan 16, 2017 at 09:11 Daniel Risacher wrote: > I find deep irony in your answer, in that I was trying to rewrite a simple > script that I'd already written in perl with a nodejs version to

Re: [nodejs] How to return Handle from Native C++ Module?

2016-09-24 Thread Fedor Indutny
Hello! Have you tried `NanNew`? Thanks, Fedor. On Fri, Sep 23, 2016 at 3:53 AM, NodeNinja wrote: > node version : v0.12.12 > > I was porting some legacy code to nodev0.12.12 using node nan. > The ported work seemed to work when I built it on a 32bit system. > Now I have

Re: [nodejs] Re: OpenSSL context transfer

2016-04-20 Thread Fedor Indutny
ges in Node.js with new versions. But the layout of having >> the TLSWrap stored in _handle seems pretty much set in stone. Thanks for >> the info, the fact that you didn't say this was completely impossible >> helped a lot. >> >> Den söndag 17 april 2016 kl

Re: [nodejs] Re: OpenSSL context transfer

2016-04-17 Thread Fedor Indutny
t > (tls.TLSSocket) to the native underlying structure? Do you know how I > should do this? I'm sure I could figure it out by looking some more in the > code but I thought someone might already know this and could guide me a > little? > > Den fredag 15 april 2016 kl. 21:25:17 UT

Re: [nodejs] Re: OpenSSL context transfer

2016-04-15 Thread Fedor Indutny
Hello! Have you tried accessing `._external` property of `SecureContext` instance? It is basically a wrapped pointer to `SSL_CTX`. Hope this helps, Fedor. On Fri, Apr 15, 2016 at 8:45 AM, Alex Hultman wrote: > I have found that TLSWrap exposes a function, ssl() which

Re: [nodejs] SSL error

2016-04-15 Thread Fedor Indutny
Do you have `https.createServer()` in your application? What kind of error do you get? On Fri, Apr 15, 2016 at 1:24 PM, Alappan K wrote: > I have node js application i can access the http domain from node js but i > got open ssl error while accessing https domain .Any idea

Re: [nodejs] Does socket.destroy() imply/include socket.end()?

2015-07-16 Thread Fedor Indutny
Hello! You may want to give a try to: socket.destroySoon(). socket.destroy() - is supposed to kill the socket as soon as possible. On Thu, Jul 16, 2015 at 11:49 AM, 'Michael Hasenstein' via nodejs nodejs@googlegroups.com wrote: Because I think it should, but it doesn't, see this issue I

Re: [nodejs] V8 deoptimizations

2015-05-09 Thread Fedor Indutny
Doesn't seem to be! $ ./iojs --trace-deopt -e 'function* a() { yield 1}; var x = a(); console.log(x.next())' [deoptimize global object @ 0x243990e18d41] { value: 1, done: false } NOTE: this global object thing is unrelated, and happens anyway. On Sat, May 9, 2015 at 5:33 AM, Ω Alisson

Re: [nodejs] Any naming conventions regarding custom properties on NodeJS socket object

2015-03-23 Thread Fedor Indutny
I guess the important question to ask is: do you really need it in a first place? Is it possible to wrap the net.Socket into some other object on your application level, and set the properties on it instead? On Monday, March 23, 2015, Aria Stewart aredri...@nbtsc.org wrote: On Monday, March 23,

Re: [nodejs] Re: TLSSocket.destroy() and its underlying TCP socket

2015-02-18 Thread Fedor Indutny
Hello! Please file a bug here: https://github.com/iojs/io.js/issues Cheers, Fedor. On Wed, Feb 18, 2015 at 9:44 AM, alessio b aless...@gmail.com wrote: Nobody would have an idea whats going on? I really somewhat puzzled, as - from my understanding - the return value of tls.connect() should

Re: [nodejs] Nodejs randomly hitting 100% CPU

2014-12-17 Thread Fedor Indutny
Hello Karim, I'd suggest profiling the application during such spikes. It seems that the app is spinning in JS and doing lots of allocations (because of mmap() calls in strace output). Cheers, Fedor. On Wed, Dec 17, 2014 at 5:03 PM, Karim Tarek karim.tarek.abdelha...@gmail.com wrote: We

Re: [nodejs] Nodejs randomly hitting 100% CPU

2014-12-17 Thread Fedor Indutny
suggestions? On Wednesday, December 17, 2014 3:55:03 PM UTC+2, Fedor Indutny wrote: Hello Karim, I'd suggest profiling the application during such spikes. It seems that the app is spinning in JS and doing lots of allocations (because of mmap() calls in strace output). Cheers, Fedor. On Wed

Re: [nodejs] Re: 0.12 intro?

2014-12-16 Thread Fedor Indutny
Sam, This overview is clearly missing lots of TLS and Crypto stuff, probably even more in other fields. On Wed, Dec 17, 2014 at 11:13 AM, Simon simon.stur...@gmail.com wrote: ES6 Arrow functions? I get tired of writing .bind(this) all the time. On Tuesday, December 16, 2014 11:21:27 AM

Re: [nodejs] Does 0.11.13 or 0.11.14 come with the POODLE patch?

2014-10-30 Thread Fedor Indutny
Hello Matt, I'd just recommend using the latest version from `v0.12` branch. Next `v0.11.x` wasn't yet released, and the last one does not contain a patch for POODLE. Cheers, Fedor. On Thu, Oct 30, 2014 at 10:15 AM, Matt Fletcher naiveamo...@gmail.com wrote: Hi, I'm running v0.11.13 on my

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

2014-10-15 Thread Fedor Indutny
Hello! Every interaction with v8 should happen in main thread. Ref() sounds like something that you may want to do. On Wed, Oct 15, 2014 at 4:04 AM, Grant Hutchins ghutch...@pivotal.io wrote: I have a Node ObjectWrap subclass object that handles a uv_async_send from a thread I don't control

Re: [nodejs] Canvas rendering from V9

2014-10-11 Thread Fedor Indutny
V9!! On Sat, Oct 11, 2014 at 8:48 PM, Łukasz Jagodziński luke.jagodzin...@gmail.com wrote: Hi, have you ever considered puting in Node.js V9 implementation of Canvas rendering? I know that Node is server side but it would be nice to have the same api in both client and server without need to

Re: [nodejs] Node.js Addon Examples with V8 Version 3.22

2014-09-23 Thread Fedor Indutny
Hello! Have you seen: https://github.com/joyent/node/blob/master/doc/api/addons.markdown#hello-world Cheers. On Tue, Sep 23, 2014 at 11:48 AM, blazs blaz.sov...@gmail.com wrote: Hi, I am looking for Node.js C++ Addon examples, written for v0.12 version of the Node.js --- the one that uses

Re: [nodejs] Node.js Addon Examples with V8 Version 3.22

2014-09-23 Thread Fedor Indutny
, and I want the C++ callback for v.shuffle() to create the new vector.) On Tuesday, September 23, 2014 4:35:16 PM UTC+2, Fedor Indutny wrote: Hello! Have you seen: https://github.com/joyent/node/blob/master/doc/api/ addons.markdown#hello-world Cheers. On Tue, Sep 23, 2014 at 11:48 AM, blazs

[nodejs] Important RFC for Addon authors

2014-09-12 Thread Fedor Indutny
Hello people! Please feel free to ignore this if you don't write/maintain C++ addons for node. With this PR: https://github.com/joyent/node/pull/8355#issuecomment-55395952 I'm going to export some External-wrapped pointers to structs like SSL, SSL_CTX to make it possible to write some

Re: [nodejs] Re: Crypto and the event loop

2014-09-02 Thread Fedor Indutny
This totally depends on what kind of crypto are you going to be using. For example the 2048bit RSA decryption takes 1ms on my MBP, so using it on every request will limit your RPS to around 700-800. On Sun, Aug 31, 2014 at 10:28 PM, Sanjeev Koranga sanjeev.kora...@gmail.com wrote: So if an

Re: [nodejs] Fundamentals: Callbacks in Node?

2014-08-11 Thread Fedor Indutny
It is created only once. However, if you define function in a closure - it'll be allocated each time the closure is executed. On Sun, Aug 10, 2014 at 6:13 PM, David J Lima dave.j.l...@gmail.com wrote: In the plain javaScript world I've learned that nested functions can be problematic because

Re: [nodejs] Fundamentals: Callbacks in Node?

2014-08-11 Thread Fedor Indutny
Matt, This couldn't happen with any other js-engine, because of the ECMAScript semantics. The code that creates request handler closure is executed only once, which means that the closure is created only once. Cheers, Fedor. On Mon, Aug 11, 2014 at 10:00 PM, Matt hel...@gmail.com wrote: I

[nodejs] Libuv Logo and T-Shirts

2014-07-22 Thread Fedor Indutny
Heya! Just wanted to share this with you: http://teespring.com/libuv Libuv has a new logo and we are selling T-Shirts with it! Cheers, Fedor. -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules:

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

2014-07-10 Thread Fedor Indutny
The best question to ask is - what problems do we have with GYP? Is it hard to support it when google will drop it? I had some problems with GYP, but generally it is very easy to use and to configure. Looks like GN is quite good too, but not that much to make all addons authors move to it. On

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

2014-07-09 Thread Fedor Indutny
Some of the addon's gyp files could be translated to the GN without even requiring author to do so. The syntax is generally pretty similar: https://code.google.com/p/chromium/wiki/GNQuickStart, https://code.google.com/p/chromium/wiki/GNCookbook . I'm +1 for moving to GN if it is better than GYP,

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

2014-07-09 Thread Fedor Indutny
, 2014 4:03:31 PM UTC+10, Fedor Indutny wrote: Some of the addon's gyp files could be translated to the GN without even requiring author to do so. The syntax is generally pretty similar: https://code.google. com/p/chromium/wiki/GNQuickStart, https://code. google.com/p/chromium/wiki/GNCookbook

Re: [nodejs] Scaling a spdyproxy Node.js server

2014-05-24 Thread Fedor Indutny
23, 2014 10:09:02 PM UTC+5:30, Fedor Indutny wrote: Hey! You need to add `spdy/3.1`, `spdy/3` to the `npn` array. On Fri, May 23, 2014 at 4:11 PM, Sai psaikri...@gmail.com wrote: Hi Fedor, I have tried bud as well. I don't think it working on this proxy server. Here is my conf.json file

Re: [nodejs] Scaling a spdyproxy Node.js server

2014-05-23 Thread Fedor Indutny
can I inspect what is causing this cluster process to die? Thank You Sai On Thursday, May 22, 2014 9:31:19 PM UTC+5:30, Fedor Indutny wrote: Hello! You could try setting `bud` (https://github.com/indutny/bud) in front of your servers, or using latest development version of node.js (0.11

Re: [nodejs] Scaling a spdyproxy Node.js server

2014-05-23 Thread Fedor Indutny
any connect requests or anything. Just let me know if I'm doing anything wrong? Here is the log file of both bug and spdyproxy ( http://pastebin.com/8MvtEjvR) Thank You Sai On Thursday, May 22, 2014 9:31:19 PM UTC+5:30, Fedor Indutny wrote: Hello! You could try setting `bud` (https

Re: [nodejs] Scaling a spdyproxy Node.js server

2014-05-22 Thread Fedor Indutny
Hello! You could try setting `bud` (https://github.com/indutny/bud) in front of your servers, or using latest development version of node.js (0.11.x). Both have much better performance than node v0.10 Cheers, Fedor. On Thu, May 22, 2014 at 7:37 PM, Sai psaikrishna@gmail.com wrote: Hi,

Re: [nodejs] Re: [RFC] Debugger

2014-04-09 Thread Fedor Indutny
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Miroslav, This email sent to accumulate user feedback on the node's debugger, what does seem wrong to you? How do you feel about making it more gdb-like? Cheers, Fedor. -BEGIN PGP SIGNATURE- Version: GnuPG v1

Re: [nodejs] [RFC] Debugger

2014-04-04 Thread Fedor Indutny
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello! Few bits from me. To my mind, it would be cool to remove all that repl-like functionality and make it just parse a subset of commands instead of allowing entering any javascript expression. +1 for gdb-like commands, I got pretty much used to

Re: [nodejs] problems with https.Agent

2014-03-24 Thread Fedor Indutny
Hello! How are you doing client requests? Are you calling `.end()` on each of them? Could you paste some code snippets here to let us help you? Cheers! On Mon, Mar 24, 2014 at 6:27 PM, d.hostett...@geatec.ch wrote: I have a https server and a https client, both with node. I want to send

Re: [nodejs] Pointer allocated in native library [ffi]

2014-03-18 Thread Fedor Indutny
Hello! Try following code: https://gist.github.com/indutny/bc2b05d3f75f6dd81e77 I may be missing some nuances regarding FFI signature, but the main thing is that you are overwriting local variable in a C function, not writing a value to the pointer which it contains. Changing it to `char**` and

Re: [nodejs] crypto: createSign() question

2014-03-03 Thread Fedor Indutny
Hi! It is just a convenience thing, the key itself is usually PEM encoded and you could pass it as a string or Buffer, without any additional encoding set. However, if you do following thing: var key = fs.readFileSync('key.pem').toString('hex'); s.sign(key, 'hex'); The additional encoding

Re: [nodejs] crypto: createSign() question

2014-03-03 Thread Fedor Indutny
exporting binary, hex or base64 private key formats. On Monday, March 3, 2014 10:01:56 AM UTC-7, Fedor Indutny wrote: Hi! It is just a convenience thing, the key itself is usually PEM encoded and you could pass it as a string or Buffer, without any additional encoding set. However, if you do

Re: [nodejs] crypto: createSign() question

2014-03-03 Thread Fedor Indutny
1:32:17 PM UTC-7, Fedor Indutny wrote: Hm... could you please paste an example of code that doesn't work for you? On Mon, Mar 3, 2014 at 10:13 PM, jas jason@gmail.com wrote: Also, here is the error from using crypto.createSign.update('msg').sign(privateKey, 'hex') due to the export

Re: [nodejs] NodeJS Buffer Endianess is all wrong

2014-02-27 Thread Fedor Indutny
Hello! I think you are a bit confused about endians and buffer representation in console. When you type `myBuff` it prints bytes in the same order as they'll be sent on network or written to file. i.e. `Buffer 36 02 00 00` means that `buf[0] === 0x36` and `buf[1] === 0x02`, which is exactly how

Re: [nodejs] Does zlib use the thread pool?

2014-02-24 Thread Fedor Indutny
Hi! Yes, it does. On Mon, Feb 24, 2014 at 12:19 PM, Joran Dirk Greef jo...@ronomon.com wrote: Does zlib use the thread pool for compression/decompression? If not, would it be something that can be considered? -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines:

Re: [nodejs] Re: How do I make a stream that can _write() multiple messages at the same time?

2014-02-24 Thread Fedor Indutny
Joseph, I think you could try calling `writecb` immediately up until your internal queue will fill up, and then starts calling it as soon as you can do next write. On Mon, Feb 24, 2014 at 5:14 PM, greelgorke greelgo...@gmail.com wrote: may be examples of your code would help Am Montag, 24.

Re: [nodejs] Re: How do I make a stream that can _write() multiple messages at the same time?

2014-02-24 Thread Fedor Indutny
Joseph, Take a look at following snippet: https://gist.github.com/indutny/e3fcb35fc25399bb7f7b On Tue, Feb 25, 2014 at 1:40 AM, Arnout Kazemier i...@3rd-eden.com wrote: Primus is still using the Streams 1 interface. On Monday 24 February 2014 at 19:33, Joseph Gentle wrote: Does anyone know

Re: [nodejs] (C++) Add function into nodejs even tloop.

2014-02-23 Thread Fedor Indutny
I don't think that you need to run separate loop for `uv_idle_t`. Just call `uv_idle_init(uv_default_loop(), idle)` and `uv_idle_start(idle, cb)`. Make sure to allocate `idle` in heap (not on stack) with malloc/new or whatever. On Sun, Feb 23, 2014 at 2:35 AM, Kevin Ingwersen

Re: [nodejs] v0.12 Release

2014-02-23 Thread Fedor Indutny
Hello guys! Sorry for not responding early, I have pretty long backlog in my inbox. While I'm not the leader of node.js project (TJ Fontaine is), I could perhaps shed some light on the current state of things. I think we are almost done with update to v8 3.24 and I'm quite sure that we will

Re: [nodejs] Adding function to libuv

2014-02-20 Thread Fedor Indutny
Hi! You could use `uv_prepare_t`, or `uv_idle_t`, or `uv_check_t` depending on your needs. See https://github.com/joyent/libuv/blob/master/include/uv.h#L1253 for details. Cheers, Fedor. On Fri, Feb 21, 2014 at 12:56 AM, Kevin Ingwersen ingwie2...@googlemail.com wrote: Hey there. I need to

Re: [nodejs] Adding function to libuv

2014-02-20 Thread Fedor Indutny
type definition - that should be OK. I just need to pull the uv_loop_t ^^. Kind regards, Ingwie Am Do. Feb. 20 2014 22:07:13 schrieb Fedor Indutny: Hi! You could use `uv_prepare_t`, or `uv_idle_t`, or `uv_check_t` depending on your needs. See https://github.com/joyent/libuv/blob/master

Re: [nodejs] Adding function to libuv

2014-02-20 Thread Fedor Indutny
, it now works in the same loop. much cleaner, more embedded and integrated :) Thanks, and kind regards! Am Do. Feb. 20 2014 23:21:58 schrieb Fedor Indutny: This is exactly the loop that node.js runs on, it is using the only default one. On Fri, Feb 21, 2014 at 2:19 AM, Kevin Ingwersen ingwie2

Re: [nodejs] Adding function to libuv

2014-02-20 Thread Fedor Indutny
This is exactly the loop that node.js runs on, it is using the only default one. On Fri, Feb 21, 2014 at 2:19 AM, Kevin Ingwersen ingwie2...@googlemail.com wrote: And this won't cause any troubble with the already existing uv_loop? Am Do. Feb. 20 2014 23:12:45 schrieb Fedor Indutny: You could

Re: [nodejs] Re: HTTPS proxy with a self-signed certificate

2014-02-18 Thread Fedor Indutny
Then you are connecting with HTTP client to HTTPS server. On Tue, Feb 18, 2014 at 11:16 AM, Alexandre Kirszenberg a.kirszenb...@gmail.com wrote: No, `secureConnection` is never fired. On Monday, February 17, 2014 9:58:02 PM UTC+1, Fedor Indutny wrote: Wait, are you connecting with a plain

Re: [nodejs] Re: HTTPS proxy with a self-signed certificate

2014-02-18 Thread Fedor Indutny
making the connections. How can I make a HTTPS proxy in NodeJS? On Tuesday, February 18, 2014 9:02:08 AM UTC+1, Fedor Indutny wrote: Then you are connecting with HTTP client to HTTPS server. On Tue, Feb 18, 2014 at 11:16 AM, Alexandre Kirszenberg a.kirs...@gmail.com wrote

Re: [nodejs] Re: HTTPS proxy with a self-signed certificate

2014-02-18 Thread Fedor Indutny
in the address field, the server doesn't receive any connections at all and I get unable to connect to proxy server in Chrome. On Tuesday, February 18, 2014 9:18:30 AM UTC+1, Fedor Indutny wrote: How are you setting it, as `https://localhost:.../` or just `localhost:...` (if the latter one

Re: [nodejs] Re: HTTPS proxy with a self-signed certificate

2014-02-18 Thread Fedor Indutny
header, but the server doesn't pick it up and doesn't emit a `connect` event. On Tuesday, February 18, 2014 9:36:02 AM UTC+1, Fedor Indutny wrote: Perhaps you should add your server's certificate to the certificate chain to make OS trust it. On Tue, Feb 18, 2014 at 12:32 PM, Alexandre

Re: [nodejs] Scaling node.js project

2014-02-18 Thread Fedor Indutny
Hi! Handling millions of simultaneous connections is not the same thing as handling millions requests per second. On Tue, Feb 18, 2014 at 2:27 PM, Nitin Gupta nitinguptaweb...@gmail.com wrote: Hi, This is regarding scaling node.js application. I have heard a lot of buzz around handling

Re: [nodejs] Re: HTTPS proxy with a self-signed certificate

2014-02-17 Thread Fedor Indutny
Wait, are you connecting with a plain text socket to it? `connection` event emits raw TCP socket, does `secureConnection` happen at all? On Mon, Feb 17, 2014 at 6:31 PM, Alexandre Kirszenberg a.kirszenb...@gmail.com wrote: var https = require('https'); var fs = require('fs'); var server =

Re: [nodejs] HTTPS proxy with a self-signed certificate

2014-02-14 Thread Fedor Indutny
Heya! Check out `connect` event: http://nodejs.org/api/http.html#http_event_connect On Fri, Feb 14, 2014 at 9:40 PM, Martin Gonzalez tinchog...@gmail.com wrote: I think this might be related to a bug in openssl implementation. Try adding this options to the request:

Re: [nodejs] Question on V8 version

2014-02-08 Thread Fedor Indutny
Hello! This rule is that we don't update v8 in a stable branch of node.js, i.e. all patch version of v0.10 will contain 3.14.5.xxx . I think we are using 3.22.24 in v0.11 node.js, which we are currently working on. It contains few floating patches, but they are mostly backports from the latest

Re: [nodejs] Strange bug in benchmark, Express.js is slower than Ruby on Rails

2014-01-23 Thread Fedor Indutny
I think you could be hitting this: http://nodejs.org/api/http.html#http_agent_maxsockets On Thu, Jan 23, 2014 at 1:57 PM, Alexey Petrushin alexey.petrus...@gmail.com wrote: I ran a benchmark for Ruby on Rails and Express.js using `siege` - and Express for some reason performed worse than Rails.

Re: [nodejs] Parsing GYP files?

2014-01-23 Thread Fedor Indutny
Won't work either, I guess. As it may contain comments. On Thu, Jan 23, 2014 at 6:15 PM, Arnout Kazemier i...@3rd-eden.com wrote: eval it? On Thursday 23 January 2014 at 15:01, Kevin Ingwersen wrote: Hey! Is it possible to parse GYP files in nodejs? JSON.parse fails at the first

Re: [nodejs] Parsing GYP files?

2014-01-23 Thread Fedor Indutny
Function(‘return ‘+ gyp)())` to get the data. Founder: 3rd-Eden Product: Observe.it Lead Software Engineer: Nodejitsu.com Twitter: @3rdEden Github: @3rd-Eden Skype: arnoutkazemier Facebook: arnout.kazemier Mobile: +31623254031 On Thursday 23 January 2014 at 15:15, Fedor Indutny wrote

Re: [nodejs] Strange bug in benchmark, Express.js is slower than Ruby on Rails

2014-01-23 Thread Fedor Indutny
You are welcome! On Thu, Jan 23, 2014 at 7:19 PM, Alexey Petrushin alexey.petrus...@gmail.com wrote: Fedor, you are right, thanks. That was the problem, after fixing it node became more than 10 times faster. Issue resolved. On Thursday, 23 January 2014 14:15:19 UTC+4, Fedor Indutny wrote

Re: [nodejs] Parsing GYP files?

2014-01-23 Thread Fedor Indutny
But what is that about python comments? I never did python myself. Am Do. Jan. 23 2014 16:00:18 schrieb Arnout Kazemier: Yeah, I noticed that after pressing send, and a find/replace should take out most of these. On Thursday 23 January 2014 at 15:58, Fedor Indutny wrote: I meant python comments

Re: [nodejs] HTTPS, NPN, freeParser

2013-12-17 Thread Fedor Indutny
Hello! Yes, this is possible. But you'll need to remove either `request` or `connection` event handler (I prefer latter one), save it, and call it if the HTTPS handler should be activated. That's how I do it in node-spdy: https://github.com/indutny/node-spdy/blob/master/lib/spdy/server.js#L91

Re: [nodejs] Tail file with node.

2013-12-09 Thread Fedor Indutny
Hello! Perhaps, you are trying to create a Buffer of negative length? Also, I believe, that you do not need to pass encoding argument to the Buffer's constructor if you're creating just a fixed-size buffer. On Mon, Dec 9, 2013 at 1:58 PM, Felipe Silveira cont...@felipems.com.br wrote: Hi

Re: [nodejs] Tail file with node.

2013-12-09 Thread Fedor Indutny
) { console.log(err); }; console.log(newData.toString()); }); fNameStat = fs.statSync(fName); }); }); On Monday, December 9, 2013 8:00:56 AM UTC-2, Fedor Indutny wrote: Hello! Perhaps, you are trying to create a Buffer of negative length? Also, I believe

Re: [nodejs] Tail file with node.

2013-12-09 Thread Fedor Indutny
-9310 (Tim) cont...@felipems.com.br 2013/12/9 Fedor Indutny fe...@indutny.com What does it log to console? What node.js version are you using? On Mon, Dec 9, 2013 at 2:17 PM, Felipe Silveira cont...@felipems.com.br wrote: Thank bro to help, I change to this code and get the same error

Re: [nodejs] Tail file with node.

2013-12-09 Thread Fedor Indutny
version is v0.6.17 Att, Felipe Silveira Mendes Site - Twitter - Blog Web Developer (31) 8370-9090 (Claro) (31) 9433-9310 (Tim) cont...@felipems.com.br 2013/12/9 Fedor Indutny fe...@indutny.com You're logging much more data than this, are you sure it prints out only the error

Re: [nodejs] Tail file with node.

2013-12-09 Thread Fedor Indutny
comands I need to do? Att, Felipe Silveira Mendes Site - Twitter - Blog Web Developer (31) 8370-9090 (Claro) (31) 9433-9310 (Tim) cont...@felipems.com.br 2013/12/9 Fedor Indutny fe...@indutny.com Hm... this version is really really old, may I ask you to try upgrading to at least v0.6.21

Re: [nodejs] Tail file with node.

2013-12-09 Thread Fedor Indutny
...@felipems.com.br 2013/12/9 Fedor Indutny fe...@indutny.com Depends on what ppa are you using. I'd recommend trying: https://launchpad.net/~chris-lea/+archive/node.js/ On Mon, Dec 9, 2013 at 2:37 PM, Felipe Silveira cont...@felipems.com.br wrote: Ok, How can I upgrade my node? I'm using ubuntu

Re: [nodejs] Tail file with node.

2013-12-09 Thread Fedor Indutny
from 101644 to 101650 6 Buffer 8c e0 0f 09 ac ad 11 0 Buffer 12 Att, Felipe Silveira Mendes Site - Twitter - Blog Web Developer (31) 8370-9090 (Claro) (31) 9433-9310 (Tim) cont...@felipems.com.br 2013/12/9 Fedor Indutny fe...@indutny.com So, don't tell me it isn't printing

Re: [nodejs] Tail file with node.

2013-12-09 Thread Fedor Indutny
...@felipems.com.br 2013/12/9 Fedor Indutny fe...@indutny.com Ok, so you create 0 length buffer here, and doing 0-size read :) That's totally not supported. On Mon, Dec 9, 2013 at 6:57 PM, Felipe Silveira cont...@felipems.com.br wrote: Ooh Sorry yeah I forgot, here is: file changed

Re: [nodejs] node.js needs a new home

2013-12-09 Thread Fedor Indutny
+1 for status quo. In my opinion, there're not so many problems with current node's home as advertised in this thread. On Mon, Dec 9, 2013 at 10:25 PM, Isaac Schlueter i...@izs.me wrote: Meanwhile, also looking as an outsider, I *don't* see the consensus forming around either Joyent's control

Re: [nodejs] node.js needs a new home

2013-12-09 Thread Fedor Indutny
, Fedor Indutny fe...@indutny.com: +1 for status quo. In my opinion, there're not so many problems with current node's home as advertised in this thread. On Mon, Dec 9, 2013 at 10:25 PM, Isaac Schlueter i...@izs.me wrote: Meanwhile, also looking as an outsider, I *don't* see the consensus forming

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

2013-12-05 Thread Fedor Indutny
Which node.js version are we talking about? On Thu, Dec 5, 2013 at 8:25 PM, Matt hel...@gmail.com wrote: On Tue, Nov 26, 2013 at 10:36 AM, Ben Noordhuis i...@bnoordhuis.nl wrote: No. OpenSSL moves the TLS connection into shutdown mode when a CLOSE_NOTIFY alert arrives. As far as node.js is

Re: [nodejs] Ben Noordhuis's Departure

2013-12-04 Thread Fedor Indutny
I'm not very active here, usually. But wanted to share my opinion here with you, rude people are always here and the fact that the company that holds trademark is showing such behavior has not much to do with what we are observing now. People always have their reasons, and for example, if the

Re: [nodejs] Re: [ANN] Introducing Bud, A build tool for humans!

2013-12-03 Thread Fedor Indutny
Heya! Its quite interesting to see you naming your project bud, since I've just released a TLS terminator with the same name: https://github.com/indutny/bud . Hehe, but thumbs up for it! Looking quite promising. Cheers, Fedor. On Tue, Dec 3, 2013 at 12:39 PM, Vladimir Varankin

Re: [nodejs] Assertion failed: (handle-InternalFieldCount() 0), function Unwrap on inheritance of add-on prototype

2013-11-16 Thread Fedor Indutny
Heya! May I ask you put links to your code here? On Sat, Nov 16, 2013 at 7:14 PM, i...@bodokaiser.io wrote: Hello, I want to inherit from a C++ add-on prototype but get: Assertion failed: (handle-InternalFieldCount() 0), function Unwrap, file

Re: [nodejs] Assertion failed: (handle-InternalFieldCount() 0), function Unwrap on inheritance of add-on prototype

2013-11-16 Thread Fedor Indutny
-native-gpio/blob/master/test/src/gpio/inheritance.js GPIOWrap https://github.com/bodokaiser/node-native-gpio/blob/master/src/gpio_wrap.cc Best, Bo Am Samstag, 16. November 2013 16:25:51 UTC+1 schrieb Fedor Indutny: Heya! May I ask you put links to your code here? On Sat, Nov 16, 2013

Re: [nodejs] [Poll/RFC] Remove the built-in debugger

2013-11-12 Thread Fedor Indutny
I have used it a lot recently too. On Tue, Nov 12, 2013 at 8:21 PM, Forrest L Norvell forr...@newrelic.com wrote: I have used the debugger for several hundred hours in the last year alone. It is an absolutely essential part of my day-to-day workflow. node-inspector is cumbersome and

Re: [nodejs] Node v0.11.8 (Unstable)

2013-10-30 Thread Fedor Indutny
) * http: add statusMessage (Patrik Stutz) * http: expose supported methods (Ben Noordhuis) * http: provide backpressure for pipeline flood (isaacs) * process: Add exitCode property (isaacs) * tls: socket.renegotiate(options, callback) (Fedor Indutny) * util: format as Error if instanceof

Re: [nodejs] Crashing process on FATAL ERROR: CALL_AND_RETRY_2 Allocation failed - process out of memory

2013-10-27 Thread Fedor Indutny
domain. Any chances that it caught in node domain and lost there ? regards Vivek Goel On Sun, Oct 27, 2013 at 12:29 AM, Fedor Indutny fe...@indutny.com wrote: That basically means, that core dumps are enabled and the process isn't crashing, because OS is dumping data to disk. You should

Re: [nodejs] Crashing process on FATAL ERROR: CALL_AND_RETRY_2 Allocation failed - process out of memory

2013-10-26 Thread Fedor Indutny
Hi! Could it be that it was dumping a core file, and thus hanging (because there was a lot of memory to dump)? What's your `ulimit -c`? On Sat, Oct 26, 2013 at 5:44 PM, Vivek Goel goelvivek2...@gmail.com wrote: Hi, I have faced one issue, In stderr there was one log having message FATAL

Re: [nodejs] Crashing process on FATAL ERROR: CALL_AND_RETRY_2 Allocation failed - process out of memory

2013-10-26 Thread Fedor Indutny
. regards Vivek Goel On Sat, Oct 26, 2013 at 7:45 PM, Fedor Indutny fe...@indutny.com wrote: Hi! Could it be that it was dumping a core file, and thus hanging (because there was a lot of memory to dump)? What's your `ulimit -c`? On Sat, Oct 26, 2013 at 5:44 PM, Vivek Goel goelvivek2

Re: [nodejs] Efficient load balancing and SSL termination for WebSockets

2013-09-30 Thread Fedor Indutny
Hello! Nice post, have you tried benchmarking node.js version 0.11? We've rewritten most of TLS stuff and moved it into C++ (from javascript), on my local benchmarks it seems to be significantly faster than node.js 0.10 (and even more faster than 0.8). Looking forward for continuation! Cheers,

Re: [nodejs] Does reverting back nodejs to some commit reverts its dependencies too like V8 ?

2013-09-23 Thread Fedor Indutny
Hi! We upgrade v8 in separate commits, usually named using following template: `deps: update v8 to version number` Last update was here: a1cf3ada624b90673ac6bd53ec38a3d27fecbd01. And some of the previous ones: 83261e789eb903da39f279cb5a161611482e7df5, d22bd9e3c48bccb9c21980a88a24b7914dd47943

Re: [nodejs] Problem with Node.js in For in

2013-08-23 Thread Fedor Indutny
It seems that you've installed modules that are extending Array's or Object's prototype. Cheers, Fedor. On Fri, Aug 23, 2013 at 2:24 PM, Александр Крылов dsshac...@gmail.comwrote: Hello! I have problem. For test example code: var user = {} var action = 'test'; user[action] = [{

Re: [nodejs] Problem with Node.js in For in

2013-08-23 Thread Fedor Indutny
no problem. Only for in пятница, 23 августа 2013 г., 14:52:00 UTC+4 пользователь Fedor Indutny написал: It seems that you've installed modules that are extending Array's or Object's prototype. Cheers, Fedor. On Fri, Aug 23, 2013 at 2:24 PM, Александр Крылов dssh...@gmail.comwrote: Hello! I

Re: [nodejs] Problem using net module for TCP

2013-08-21 Thread Fedor Indutny
Hi! I'd suggest you to try using [Buffer][0] for binary data and send your line either in chunks: socket.write('string'); socket.write(binary_buffer); socket.write('rest'); Or in one buffer (if your server expects data to be in one chunk) by writing strings and binary data into one buffer,

Re: [nodejs] Re: The Future of Programming in Node.js

2013-08-14 Thread Fedor Indutny
Yikes! Another flame war here :) Obviously, stability is good. There're definitely some problems in core that worth fixing, but lets do a big 1.0 release first ;) Cheers, Fedor. On Wed, Aug 14, 2013 at 11:00 AM, Trevor Norris trev.nor...@gmail.comwrote: On Tuesday, August 13, 2013 11:35:11

Re: [nodejs] TLS/NPN and the HTTP server API

2013-07-13 Thread Fedor Indutny
Because its mostly a hack. You may want to take a look at how node-spdy handles similar problem: https://github.com/indutny/node-spdy Cheers, Fedor. On Sun, Jul 14, 2013 at 12:50 AM, Daniel Lamando m...@danopia.net wrote: Well that seems obvious enough - the event is even listed in the http

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

2013-07-08 Thread Fedor Indutny
+1, but lets keep it small and simple. Cheers, Fedor. On Mon, Jul 8, 2013 at 11:02 PM, Dean Mao dean...@gmail.com wrote: Is there a summary of ABI changes for us native module authors? On Mon, Jul 8, 2013 at 2:53 PM, Stephen Belanger cyruzdr...@gmail.comwrote: I feel like this is a good

Re: [nodejs] Re: Limit of 32786 concurrent connections in a nodejs server

2013-07-04 Thread Fedor Indutny
Are you sure you're not running out of ephemeral ports? Cheers, Fedor. On Fri, Jul 5, 2013 at 1:05 AM, mscdex msc...@gmail.com wrote: On Thursday, July 4, 2013 3:10:58 PM UTC-4, Guido García wrote: PD. There is no /proc/pid/limits in SmartOS. Solaris has to be so difficult ;-) It looks

Re: [nodejs] Undefined symbol on node.js addon

2013-06-22 Thread Fedor Indutny
On Sat, Jun 22, 2013 at 11:57 AM, Luís Miranda lui...@gmail.com wrote: ctest1 Where is ctest1 declared? Cheers, Fedor. -- -- 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

Re: [nodejs] How to store current versions of modules (analogue of gemfile.lock in ruby bundler)

2013-06-19 Thread Fedor Indutny
Hi! npm shrinkwrap Cheers, Fedor. On Wed, Jun 19, 2013 at 12:30 PM, Руслан Корнев oga...@gmail.com wrote: Hi, all. Sorry for bad English. I'am new in node.js and started using package manager npm. I don't want to specify specific versions in package.json and sit on last releases. But i

Re: [nodejs] Node.js SSL server frozen, high CPU, not crashed but no connections

2013-05-10 Thread Fedor Indutny
Can you try `strace`ing or `dtruss`ing process? strace -p process-id should do the job. Cheers, Fedor. On Fri, May 10, 2013 at 10:57 AM, Javier Cobos javiercobosm...@gmail.comwrote: Hi, I hope anyone could help me with this issue. In our company we are setting up a node.js server,

Re: [nodejs] preferred license for node modules?

2013-05-07 Thread Fedor Indutny
God, you either doing it for free or not. There's always an opportunity to make money on your thing by doing paid support for it, and that's how many opensource devs are receiving money for it. Cheers, Fedor. On Tue, May 7, 2013 at 5:28 PM, Jérémy Lal holi...@gmail.com wrote: Maybe

Re: [nodejs] [ANN] LXJS 2013

2013-05-05 Thread Fedor Indutny
Hey, Cool. Cheers, Fedor. On Mon, May 6, 2013 at 1:29 AM, Diogo Resende drese...@thinkdigital.ptwrote: On Sunday, May 5, 2013 at 19:32 , Nuno Job wrote: Hey, LXJS 2013 was a blast last year, with lots of fun from the links of substack, mikeal and dshaw :) Last year you mean 2012 :^)

Re: [nodejs] Re: EMFILE error in Async file reading

2013-04-30 Thread Fedor Indutny
Because you're reading file from start to end, and position changes at every read? Cheers, Fedor. On Tue, Apr 30, 2013 at 2:15 PM, Afshin Mehrabani afshin@gmail.comwrote: Sorry I didn't get it. Why should read an undefined position? or zero? On Tuesday, April 30, 2013 1:12:18 PM

Re: [nodejs] callback slower than promises?

2013-04-30 Thread Fedor Indutny
Surely, I see. They're using promises for benchmarking everything and, apparently, promises works best with promises. Cheers, Fedor. On Tue, Apr 30, 2013 at 8:51 PM, mgutz mario.l.gutier...@gmail.com wrote: Does anybody see anything wrong with the logic in these tests?

Re: [nodejs] callback slower than promises?

2013-04-30 Thread Fedor Indutny
AM, Fedor Indutny fe...@indutny.com wrote: Surely, I see. They're using promises for benchmarking everything and, apparently, promises works best with promises. Cheers, Fedor. On Tue, Apr 30, 2013 at 8:51 PM, mgutz mario.l.gutier...@gmail.com wrote: Does anybody see anything

Re: [nodejs] Streams writev API

2013-04-28 Thread Fedor Indutny
libuv has started doing it automatically recently. Cheers, Fedor. On Mon, Apr 29, 2013 at 1:12 AM, Jorge jo...@jorgechamorro.com wrote: On 23/04/2013, at 02:01, Isaac Schlueter wrote: There's a syscall called `writev` that lets you write an array (ie, Vector) of buffers of data rather

Re: [nodejs] Streams writev API

2013-04-28 Thread Fedor Indutny
No, only TCP so far, but it could be implemented for FS too, pull requests are welcome! :) Cheers, Fedor. On Mon, Apr 29, 2013 at 2:13 AM, Jorge jo...@jorgechamorro.com wrote: On 29/04/2013, at 00:00, Fedor Indutny wrote: It already landed in master and it works for every TCP socket

  1   2   >