00:00:00  * ircretaryquit (Remote host closed the connection)
00:00:07  * ircretaryjoined
00:05:58  * paddybyersquit (Ping timeout: 245 seconds)
00:19:46  * EhevuTovjoined
00:25:30  * loladirojoined
00:28:47  <txdv>"i know but you could use it to make a js interpreter that supported the event loop" -> this is what node.js is, the google chromes v8 + libuv
00:34:45  * brsonquit (Quit: leaving)
00:44:48  * c4miloquit (Remote host closed the connection)
00:58:36  * TheJHquit (Read error: Operation timed out)
01:05:01  * mmaleckichanged nick to mmalecki[zzz]
01:06:46  <isaacs>ok. i'm back to thinking that actually streams2 refactor for net.js is what made our net-pipe.js suck.
01:06:57  <isaacs>so.. now to figure out what i'm doing differently.
01:06:59  <isaacs>ugh.
01:36:25  <isaacs>what's really interesting is that streams1 *http* is not significantly faster than master.
01:36:42  <isaacs>maybe i have to run this regression comb for http instead of net...
01:50:52  <garbagecollectio>txdv: yes but its not client side
01:52:54  <txdv>em
01:52:58  <txdv>garbagecollectio: are you still there?
01:57:25  <garbagecollectio>yes
01:59:34  * perezdquit (Quit: perezd)
02:07:46  * EhevuTovquit (Quit: This computer has gone to sleep)
02:08:17  * mikealquit (Quit: Leaving.)
02:08:51  <tjfontaine>isaacs: heh
02:15:23  * `3rdEdenjoined
02:23:28  * `3rdEdenquit (Ping timeout: 245 seconds)
02:26:32  * loladiroquit (Quit: loladiro)
02:38:30  * mikealjoined
02:49:53  * stagasjoined
02:57:08  * loladirojoined
02:59:09  * hzquit
03:19:38  * brsonjoined
03:30:03  * indexzerojoined
03:48:57  * jmar777joined
03:51:42  * perezdjoined
03:52:33  * perezd_joined
03:56:23  * perezdquit (Ping timeout: 245 seconds)
03:56:25  * perezd_changed nick to perezd
04:26:09  * c4milojoined
04:29:03  * c4miloquit (Remote host closed the connection)
04:33:01  * mikealquit (Quit: Leaving.)
04:37:04  * stagasquit (Read error: Connection reset by peer)
04:38:27  * mikealjoined
04:38:37  * stagasjoined
04:43:32  * stagas_joined
04:45:01  * stagasquit (Ping timeout: 245 seconds)
04:45:13  * stagas_changed nick to stagas
04:50:19  * mikealquit (Quit: Leaving.)
05:27:13  * garbagecollectioquit (Quit: garbagecollectio)
05:40:43  * mikealjoined
05:54:43  * mikealquit (Quit: Leaving.)
06:30:36  * TheJHjoined
06:40:48  * mikealjoined
07:10:47  * jmar777quit (Remote host closed the connection)
07:19:59  * TheJHquit (Ping timeout: 255 seconds)
07:21:55  * loladiroquit (Quit: loladiro)
07:29:16  * brsonquit (Quit: leaving)
07:34:34  * mikealquit (Read error: Connection reset by peer)
07:40:05  * mikealjoined
07:40:56  * stagasquit (Ping timeout: 244 seconds)
07:44:19  * indexzeroquit (Quit: indexzero)
07:48:03  * indexzerojoined
08:45:16  * txdvquit (Read error: Connection reset by peer)
08:45:19  * perezdquit (Quit: perezd)
08:45:33  * txdvjoined
08:52:42  * indexzeroquit (Quit: indexzero)
08:57:16  * paddybyersjoined
09:13:17  * rendarjoined
09:49:13  * Raltjoined
09:49:44  * hzjoined
09:51:04  <Ralt>hello people
09:51:19  <Ralt>I'm trying to get into node.js dev with C++ -- ain't easy stuff! :-)
09:51:53  <Ralt>specifically, right now, there is something that won't compile -- and I don't get why: everything seems fine https://github.com/Ralt/node-ssh/blob/master/src/ssh.cc#L54
10:07:14  * TheJHjoined
10:08:44  * V1joined
10:10:43  * V1changed nick to `3rdEden
10:18:53  * paddybyersquit (Ping timeout: 245 seconds)
10:44:01  * paddybyersjoined
10:56:48  <indutny>Ralt: hello
10:56:55  <indutny>so what's heppning
10:56:59  <Ralt>indutny: hi
10:56:59  <indutny>s/hep/hap/
10:57:03  <Ralt>solved the problem :)
10:57:05  <indutny>ok
10:57:09  <Ralt>I mixed my stuff
10:57:16  <Ralt>tried attaching C++ objects to JS objects
10:59:00  <Ralt>indutny: but thanks!
11:01:56  * EhevuTovjoined
11:35:59  * paddybyersquit (Ping timeout: 252 seconds)
12:01:05  * `3rdEdenquit (Remote host closed the connection)
12:01:38  * mmalecki[zzz]changed nick to mmalecki
12:09:06  <Ralt>I can't believe there isn't a C++ "console.log" method (or template)
12:10:05  * TheJHquit (Ping timeout: 252 seconds)
12:26:53  <indutny>fprintf() ?
12:41:18  * EhevuTovquit (Quit: This computer has gone to sleep)
12:46:28  * TheJHjoined
13:01:46  * `3rdEdenjoined
13:10:44  * hzquit
13:26:23  * `3rdEdenquit (Remote host closed the connection)
13:31:51  * c4milojoined
13:46:30  * stagasjoined
13:49:49  * bnoordhuisjoined
13:56:02  * paddybyersjoined
14:06:13  * Raltquit (Remote host closed the connection)
14:18:54  * piscisaureus_joined
14:19:06  <piscisaureus_>saghul ?
14:24:43  * Raltjoined
14:37:42  <Ralt>indutny: fprintf doesn't really accepts Handle<T> values, unfortunately
14:38:29  <bnoordhuis>Ralt: v8::String::Utf8Value val(handle); printf("handle=%s\n", *val);
14:38:48  <Ralt>hm. Trying out
14:40:25  <Ralt>bnoordhuis: nice! thanks
14:40:29  <bnoordhuis>np
14:56:36  * AvianFlujoined
15:21:28  <Ralt>"error: ‘libssh2_session_handshake’ was not declared in this scope" when every other function works, driving me crazy
15:24:36  * piscisaureus_quit (Ping timeout: 248 seconds)
15:30:10  <bnoordhuis>Ralt: could be several things
15:30:19  <bnoordhuis>try wrapping the #include in a external "C" { } block
15:30:30  <Ralt>done
15:30:36  <Ralt>other libssh2 functions work just fine
15:30:47  <Ralt>it's just this one
15:30:53  <Ralt>so I thought about libssh2 version
15:30:54  <bnoordhuis>check if the header actually contains that function
15:32:52  <Ralt>yep, isn't, the version is too old
15:33:00  <Ralt>http://www.libssh2.org//libssh2_session_handshake.html introduced in 1.2.8
15:33:07  <Ralt>my header says it's 1.2.6
15:34:38  <Ralt>I have no idea what I should use in this version...
15:35:10  <Ralt>oh, libssh2_session_startup
15:35:24  <Ralt>visiting the headers helps, thanks bnoordhuis
15:36:04  <bnoordhuis>welcome to the wonderful world of OSS. when in doubt, check the sources :)
15:36:54  <Ralt>s/OSS/missing doc/ :P
15:38:28  <bnoordhuis>it's true. i've been involved in OSS for ~15 years now and my general experience is that the docs are either missing, incomplete or outright lies
15:47:02  * TheJHquit (Ping timeout: 255 seconds)
15:55:43  <Ralt>btw, this issue raises a question. I guess I have to use preprocessor instructions to use either libssh2_session_handshake or libssh2_session_startup depending on libssh2's version
15:55:54  <Ralt>but it means I'll have to compile 2 different versions, right?
15:56:52  <Ralt>is there a way to manually define preprocessor values? this way, I can put this in a makefile and compile the 2 versions, even if I don't have the correct libssh2 version
16:10:55  <bnoordhuis>Ralt: -DFOO=42
16:11:08  <bnoordhuis>conversely, -UFOO undefines macro FOO
16:12:21  * bradleymeckjoined
16:12:40  * stagas_joined
16:13:41  * stagasquit (Ping timeout: 255 seconds)
16:13:49  * stagas_changed nick to stagas
16:14:03  <Ralt>oh, didn't know I could "undefine", cool
16:39:43  * paddybyersquit (Ping timeout: 245 seconds)
17:01:03  * piscisaureus_joined
17:14:36  * perezdjoined
17:20:51  * mikealquit (Quit: Leaving.)
17:24:09  * jmar777joined
17:27:33  * paddybyersjoined
17:31:18  * c4miloquit (Remote host closed the connection)
17:35:08  * paddybyersquit (Ping timeout: 245 seconds)
17:49:48  * perezdquit (Quit: perezd)
17:51:33  * Ralt_joined
17:53:46  * Raltquit (Ping timeout: 245 seconds)
18:17:15  * TheJHjoined
19:09:23  * c4milojoined
19:18:27  * `3rdEdenjoined
19:51:46  * c4miloquit (Remote host closed the connection)
20:04:24  <isaacs>good morning
20:04:27  * c4milojoined
20:04:43  <isaacs>bnoordhuis: so, the diff in net-pip.js does appear to be roughly 100% due to the streams2 refactor in net.js
20:05:04  <isaacs>bnoordhuis: but i'm still very confused as to why the tcp_raw tests are lower in master than in v0.8, when they don't use streams at all.
20:05:39  <isaacs>bnoordhuis: also, using pre-streams2 net.js and http.js doesn't get us back our http_simple regressions.
20:05:43  * isaacscontinues the search.
20:11:28  * paddybyersjoined
20:13:10  * Ralt_quit (Remote host closed the connection)
20:16:28  * mikealjoined
20:17:13  <indutny>isaacs: yt?
20:17:19  <indutny>morning
20:17:21  <isaacs>hola
20:17:30  <isaacs>indutny: today i review your tls streams2 patch
20:17:35  <indutny>erm?
20:17:41  <indutny>well, do not pull it ;)
20:17:45  <indutny>its still WIP
20:17:47  * felixgequit (Quit: felixge)
20:17:48  <isaacs>indutny: nono, but i'll look over it more carefully
20:17:52  <indutny>cool!
20:17:52  <isaacs>meditate on it, etc :)
20:17:57  <indutny>I've a question for you
20:17:59  <isaacs>k
20:18:31  <indutny>https://github.com/joyent/node/blob/master/test/simple/test-https-byteswritten.js
20:18:39  <indutny>actually, this https://github.com/joyent/node/blob/master/test/simple/test-https-byteswritten.js#L52
20:18:47  <indutny>shouldn't it contain `agent: false`?
20:19:01  <indutny>I wonder how it works now
20:20:53  <indutny>brb
20:20:54  <indutny>dinner
20:21:48  <isaacs>i don't see why agent:false is relevant to this test.
20:21:51  <isaacs>enjoy your dinner :)
20:26:31  * bradleymeckquit (Read error: Connection reset by peer)
20:26:50  * bradleymeckjoined
20:36:15  * mikealquit (Quit: Leaving.)
20:43:51  <indutny>isaacs: well, connection won't be closed otherwise
20:43:55  <indutny>it'll be keep-alive
20:44:01  <isaacs>ok, right
20:44:06  <indutny>so test will never end
20:44:14  <indutny>but its ending :)
20:44:18  <indutny>for some reason
20:44:21  <indutny>which is pretty odd
20:44:26  <isaacs>indutny: oh, because our client doesn't do keepalive unless there's another request pending
20:44:34  <indutny>ah
20:44:36  <indutny>interesting
20:44:38  <isaacs>indutny: talk to your boss about how annoying that is :)
20:44:43  <indutny>:)
20:44:44  <isaacs>planned for change in 0.12
20:44:50  <indutny>good
20:44:57  <indutny>ok, so my implementation lacks something
20:45:01  <isaacs>the plan is to .unref() sockets when they're not in use, and .ref() them when they are.
20:45:04  <indutny>I guess either it is order of events or some other thing
20:45:06  <isaacs>rather than destroy them when they're not in use
20:45:12  <indutny>yeah, good thing
20:45:17  <isaacs>but, later.
20:48:07  <indutny>can you explain me in a few words how 'finish', 'end' and 'close' events works?
20:48:11  <indutny>and in which order they should happen
20:48:14  <indutny>isaacs: ?
20:48:21  <indutny>please
20:48:22  <indutny>:)
20:51:00  <indutny>or at least correct me
20:51:26  <indutny>'finish' when socket was asked to close gracefully and all queued data was written
20:51:53  <indutny>'end' when other side has shutdown connection
20:52:12  <indutny>and 'close' when socket is closed by one of two sides
20:52:16  <indutny>is it right?
20:52:53  * Raltjoined
20:53:04  * loladirojoined
20:53:44  * stagas_joined
20:53:46  * stagasquit (Ping timeout: 245 seconds)
20:53:48  * stagas_changed nick to stagas
21:01:07  * c4milo_joined
21:03:55  * mikealjoined
21:06:01  * mikealquit (Client Quit)
21:13:59  * mikealjoined
21:15:20  * Raltquit (Remote host closed the connection)
21:22:46  * perezdjoined
21:27:00  <bnoordhuis>back
21:27:36  <indutny>hi
21:27:37  <indutny>howdy?
21:28:19  <bnoordhuis>i'm fine. how are you, fedor?
21:28:39  <bnoordhuis>https://github.com/joyent/node/issues/4698 <- haha, i told the guy to open the issue because he was technically correct
21:28:46  <bnoordhuis>the best kind of correct, according to some
21:28:51  <indutny>:)
21:28:53  <indutny>I'm fine too
21:29:06  * jmar777quit (Remote host closed the connection)
21:29:42  * jmar777joined
21:31:37  * piscisaureus_quit (Quit: ~ Trillian Astra - www.trillian.im ~)
21:32:24  * jmar777_joined
21:33:45  * jmar777quit (Read error: Connection reset by peer)
21:34:05  * mikealquit (Quit: Leaving.)
21:35:04  <isaacs>indutny: 'end' is readable. it means 'no more bytes are going to be available ever'
21:35:21  <isaacs>indutny: 'finish' is writable. it means 'i am done with all the writes you gave me'
21:35:36  <isaacs>indutny: 'close' is implementation-specific. it means 'i threw away all the things'
21:35:53  <isaacs>indutny: the order is completely arbitrary
21:36:15  <isaacs>indutny: it depends on what you do, and what kind of stream it is
21:36:29  <bnoordhuis>isaacs: btw, if you want a quick & dirty way of checking what the expensive objects/properties are, run node with --log_code
21:36:40  <isaacs>bnoordhuis: kewl, thanks
21:36:46  <bnoordhuis>and then: $ cat v8.log | cut -d, -f2,6 | sort | uniq -c | sort -nr | head -5 651 LoadIC,"" 318 LoadIC,"_events" 132 LoadIC,"_handle" 128 Builtin,"A builtin from the snapshot" 116 StoreIC,"_bytesDispatched"
21:36:50  <isaacs>bnoordhuis: hahaha
21:36:54  <bnoordhuis>eh, paste fail but you get the idea
21:37:13  <isaacs>bnoordhuis: then now i get to be the bad guy this time. makes up for the times that i tell someone to post an issue, and you immediately close it ;)
21:37:22  <mmalecki>isaacs: hey
21:37:36  <mmalecki>isaacs: so node is a trademark, is it?
21:37:48  <isaacs>mmalecki: yes.
21:38:03  <mmalecki>isaacs: can I make myself a tattoo of the logo?
21:38:24  <mmalecki>(don't ask me how drunk I am, this 12 year old scotch is fucking awesome)
21:38:31  <isaacs>mmalecki: as long as you're not network programming software, sure :)
21:38:32  <bnoordhuis>yes. you'll have to pay royalties though
21:38:41  <isaacs>mmalecki: oh, yeah, you'll be property of joyent.
21:38:47  <isaacs>mmalecki: i assume that you already knew that, though
21:38:57  <bnoordhuis>mmalecki: i'll send you bank account details
21:39:05  <mmalecki>I shall deliver
21:39:13  <mmalecki>once I get that JS tattoo done
21:39:21  <isaacs>generally, getting a tattoo is considered fair use
21:40:00  * perezdquit (Quit: perezd)
21:40:07  <mmalecki>isaacs: joyent should sponsor getting a node tattoo, in general
21:40:18  <isaacs>hahah
21:40:22  <mmalecki>or like, smartos.
21:40:24  <isaacs>i doubt that very much
21:40:26  <isaacs>smartos, maybe.
21:42:20  <isaacs>bnoordhuis: so, the numbers that show up in the v8.log file..
21:42:29  <bnoordhuis>yes?
21:42:30  <isaacs>bnoordhuis: is that the count of calls, or the count of ticks spent in them?
21:42:46  <isaacs>bnoordhuis: or should i be looking at the LoadIC/StoreIC differently?
21:42:50  <bnoordhuis>no, that's the number of times v8 had to synthesize a code stub
21:42:55  <bnoordhuis>code stub / IC
21:43:13  <isaacs>ohh, ok
21:43:19  <isaacs>interesting.
21:43:26  <isaacs>net-pipe calls .length a lot, i guess
21:43:35  <bnoordhuis>yep
21:43:37  <isaacs>1388 LoadIC,"length"
21:43:37  <isaacs>1236 StoreIC,"length"
21:43:37  <isaacs>1226 LoadIC,"ended"
21:43:37  <isaacs>1226 LoadIC,"buffer"
21:43:43  <isaacs>very interesting.
21:44:35  <bnoordhuis>it's a little crude but it gives you a feel for what's expensive
21:44:56  * wolfeidauquit (Remote host closed the connection)
21:48:07  <isaacs>yeah
21:48:12  <isaacs>thanks, that's a good tim
21:48:13  <isaacs>*tip
21:51:38  <isaacs>this is less than helpful: 1911 LoadIC,""
21:51:42  * rendarquit
21:52:07  * mikealjoined
21:53:35  * c4milo_quit (Remote host closed the connection)
21:58:44  * indexzerojoined
22:02:40  * wolfeidaujoined
22:05:23  <indutny>isaacs: yeah, but order matters when piping
22:05:46  <isaacs>indutny: ok.
22:05:59  <indutny>isaacs: so I wanted to ask you
22:06:07  <isaacs>indutny: if you do r.pipe(w)
22:06:15  <isaacs>indutny: r.emit('end') MUST come before w.emit('finish')
22:06:23  <indutny>isaacs: in .pipe() routine it removes `unpipe` callback for 'close' event after receiving 'finish'
22:06:26  <isaacs>indutny: becuase you won't w.end() until r.emit('end')
22:06:35  <indutny>interesting
22:07:17  <indutny>can I ask why? :)
22:07:28  <indutny>why can't I end writable before readable ends
22:07:40  <indutny>ah
22:07:43  <indutny>pipes
22:07:45  <indutny>stupid me
22:07:53  <indutny>ok, I got it
22:07:58  <indutny>so what about 'close' in pipe?
22:08:33  <isaacs>indutny: well, 'close' in pipe should be pretty unusual
22:08:41  <isaacs>indutny: that would mean that you sock.destroy()'ed or something
22:08:42  <indutny>why?
22:08:43  <isaacs>or closed the file
22:08:47  <indutny>ah
22:08:53  <isaacs>typically 'close' comes way after 'end' or 'finish'
22:09:02  <isaacs>on duplex streams, 'close' usally comes after both events
22:09:09  <isaacs>but, you know, things happen :)
22:09:37  <indutny>so basically, 'close' may not happen at all
22:09:45  <isaacs>correct
22:09:48  <isaacs>i'm gonna go drink some more coffee and take a walk, and then rewrite stream.Writable
22:09:55  <indutny>hahaha
22:09:57  <indutny>great
22:09:58  <indutny>:)
22:10:08  <isaacs>to get back the last 1% regression in fs.writeStream with buffers.
22:10:16  <isaacs>because this is a matter of pride :)
22:10:23  <isaacs>it's already faster with strings, but not faster enough.
22:10:34  <isaacs>and i think that might also reclaim a lot of what's sucking down net-pipe
22:10:41  <isaacs>and perhaps http_simple, though that's less simple
22:11:22  <isaacs>the problem with a lot of this stream stuff, really the whole story of streams from the beginning, is that you write the impl not knowing all the things that the impl has to do, then try to refactor it into shape
22:11:36  <isaacs>so, there's some complex ugly stuff in there now.
22:11:58  <isaacs>before, all streams were sipmle, but they were also inconsistent, and lacked a lot of features that people expected (like a 'pause' that works, for instance)
22:12:17  * isaacsout for a bit
22:19:45  * paddybyersquit (Read error: Connection reset by peer)
22:20:22  * paddybyersjoined
22:23:44  * mikealquit (Quit: Leaving.)
22:44:28  * `3rdEdenquit (Quit: Zzzz)
22:53:55  * mikealjoined
22:55:24  * EhevuTovjoined
22:56:38  * EhevuTovquit (Remote host closed the connection)
22:59:35  * hzjoined
23:02:31  * mikealquit (Ping timeout: 245 seconds)
23:18:12  * TheJHquit (Ping timeout: 252 seconds)
23:19:16  * hzquit
23:26:14  * indutny&
23:26:14  <LOUDBOT>COALITION FOR THE LIBERATION OF ITINERANT TREE-DWELLERS
23:26:24  <indutny>LOUDBOT: go fix your regexps
23:26:25  <LOUDBOT>indutny: WHAT? KIRK CHEATED ON SPOCK? BESIDES WITH MCCOY?
23:26:47  <isaacs>so..
23:26:56  <isaacs>what if Writable._write *always* gets 3 args?
23:27:11  <isaacs>Writable.prototype._write = function(chunk, encoding, cb)
23:27:37  <isaacs>we're spending a lot of time doing array shuffling bs
23:27:44  <isaacs>because of this stupid chunkEncoding pair
23:28:25  <isaacs>indutny: ^?
23:28:37  <isaacs>LOUDBOT: GIVE ME A LOUD, SIR, I BESEECH THEE
23:28:38  <LOUDBOT>isaacs: I'M GOING TO WRITE A BLOG USING AS MANY JQUERY SELECTORS AS POSSIBLE
23:28:41  <isaacs>LOUDBOT: GIVE ME A LOUD, SIR, I BESEECH THEE
23:28:41  <LOUDBOT>isaacs: GOING DOWN TO THE WHORE STORE TO BUY SOME WHORES
23:28:45  <isaacs>LOUDBOT: GIVE ME A LOUD, SIR, I BESEECH THEE
23:28:46  <LOUDBOT>isaacs: THE FIRST RULE OF TAUTOLOGY CLUB IS THE FIRST RULE OF TAUTOLOGY CLUB.
23:28:50  <isaacs>LOUDBOT: twitlast
23:29:05  <isaacs>oh no
23:29:15  <isaacs>i think loudbot's twitter connection is borkd
23:30:15  * mikealjoined
23:36:59  * brsonjoined
23:42:13  * paddybyersquit (Ping timeout: 245 seconds)
23:51:55  * indexzeroquit (Quit: indexzero)
23:56:34  <isaacs>Is there any reason why we don't have writeUtf8String et al for files?
23:57:41  * loladiroquit (Quit: loladiro)
23:58:17  <bnoordhuis>isaacs: you mean at the binding layer?
23:58:37  <isaacs>bnoordhuis: yeah
23:58:57  <isaacs>or, more specifically, is the reason "because no one's done it"?
23:59:05  <bnoordhuis>yes, exactly :)
23:59:10  <isaacs>ok, kewl.
23:59:13  <isaacs>we should do that before 0.10
23:59:14  <bnoordhuis>same for udp
23:59:18  <isaacs>and crypto, i presume