00:00:09  <piscisaureus_>TooTallNate: sure we could add the report mouse events thing to it.
00:00:41  <TooTallNate>piscisaureus_: that's what i meant by normalize; windows has no notion of ansi codes; libuv does
00:01:13  <TooTallNate>bnoordhuis: i'm not sure, i think i found that code from somewhere
00:01:14  * mrb_bkjoined
00:02:02  <bnoordhuis>TooTallNate: on my gnome-terminal + screen, 1005 doesn't seem to do anything
00:02:12  <bnoordhuis>then again, 1000 doesn't do anything either, only 1003
00:02:42  <TooTallNate>bnoordhuis: ahh, good to know. i think i was just using the code from the original patch in that old mailing list thread
00:03:43  <TooTallNate>piscisaureus_: one nice thing about adding these escape codes is it adds functionality / cross-platform compatbility without any API expose/changes
00:04:12  * piscisaureus__joined
00:04:18  <TooTallNate>piscisaureus_: anyways, one of these days i'll try to patch that in. it's low on my prio list as well
00:05:03  <bnoordhuis>TooTallNate: http://cvsweb.xfree86.org/cvsweb/*checkout*/xc/programs/xterm/xcharmouse.h?rev=1.3
00:05:20  <TooTallNate>ooh nice
00:05:23  <TooTallNate>so confirmed
00:05:28  <TooTallNate>1005 can go
00:05:33  <bnoordhuis>yes
00:05:48  <bnoordhuis>and also that gnome-terminal doesn't support vt200 mode :)
00:06:14  <piscisaureus__>TooTallNate: ok
00:06:23  * piscisaureus_quit (Ping timeout: 245 seconds)
00:07:09  <TooTallNate>bnoordhuis: is that supposed to catch mouse movement as well or something?
00:09:08  <bnoordhuis>TooTallNate: yes - at least, i would assume that it also turns on mouse events
00:09:15  <bnoordhuis>anyway, it's not important
00:12:14  <bnoordhuis>okay, off to bed. sleep tight all
00:12:21  <TooTallNate>later
00:12:42  * sh1mmerquit (Quit: sh1mmer)
00:14:38  * mikealquit (Quit: Leaving.)
00:16:53  * bnoordhuisquit (Ping timeout: 260 seconds)
00:17:33  * mikealjoined
00:17:49  * piscisaureus__quit (Quit: ~ Trillian Astra - www.trillian.im ~)
01:00:28  * sj26quit (Excess Flood)
01:01:35  * sj26joined
01:09:02  * mikealquit (Quit: Leaving.)
01:11:27  * mikealjoined
01:33:55  * coderarityjoined
01:36:35  * mikealquit (Quit: Leaving.)
01:36:55  * abraxasjoined
01:40:36  <mjr_>My UDP-based metrics aggregator is a lot slower than I thought it would be.
01:40:43  <mjr_>I have this awesome flame graph of where the time is going though: http://ranney.com/metrics.svg
02:04:12  * mikealjoined
02:19:01  * piscisaureus_joined
02:19:23  <piscisaureus_>mjr_: it looks like most of the time is spent in your own code.
02:19:42  <piscisaureus_>mjr_: but garbage collection triggered by Buffer::New also eats up a big chunk
02:19:47  <mjr_>Is it? I still don't know how to interpret these things.
02:20:09  <piscisaureus_>mjr_: So probably we should just use a slab allocator similar to the one we use for streams
02:20:21  <piscisaureus_>mjr_; it's not that hard :-)
02:20:23  <mjr_>So I think I can re-use my buffers, because I am doing new Buffer a lot.
02:20:40  <mjr_>But it seems like most of the time is in node.
02:21:16  <piscisaureus_>mjr_: yeah so for tcp we create a big SlowBuffer and we chip off small FastBuffers
02:21:37  <piscisaureus_>mjr_: but I think for udp we just allocate 1 slowbufer per packet
02:21:44  <mjr_>The TCP version of this program was about 10X faster.
02:21:55  <piscisaureus_>mjr_: that sounds like a lot
02:22:00  <mjr_>yeah, I was surprised.
02:24:29  <piscisaureus_>mjr_: so the rightmost apartment flat is mostly time spent in gc. But it would be much smaller if we used a slab allocator.
02:24:36  <mjr_>I think a UDP slab allocator would be a win.
02:24:54  <piscisaureus_>The wide mountain ridge is mostly your code
02:25:12  <mjr_>Hmm, yeah I guess so.
02:25:24  <mjr_>I can make lookup() faster by putting a cache in there.
02:25:31  <piscisaureus_>mjr_: so it seems you have to optimize it a little bit
02:26:40  <piscisaureus_>mjr_: the antenna tower on the left is a http server so you have some stuff going on there as well.
02:26:54  <piscisaureus_>mjr_: although it is mostly node code and not your own
02:27:06  <mjr_>It seems like the right two towers are both time spent in node allocating and de-allocating buffers.
02:27:20  <mjr_>The big one in the middle is my stuff, and it's good that it's big because I can fix that.
02:27:38  <mjr_>And yeah, that left tower of HTTP is amazing that I can see exactly how much all of the /ping requests are costing.
02:27:39  <piscisaureus_>yeah
02:27:46  <mjr_>More than I thought.
02:28:40  <mjr_>These flame graphs from node are pretty great.
02:28:56  <piscisaureus_>yeah
02:29:02  <piscisaureus_>how do you generate them?
02:29:28  <mjr_>https://github.com/brendangregg/FlameGraph
02:29:46  * mikealquit (Quit: Leaving.)
02:30:43  <piscisaureus_>noce
02:30:44  <piscisaureus_>nice
02:31:33  <mjr_>sadly does not yet include system time, due to Joyent limitations.
02:31:47  <dylukes>piscisaureus_: Hey, so what's the current timeframe on getting my patches in?
02:31:49  <dylukes>From the looks of it.
02:31:49  <mjr_>But happily, does include that awesome flame graph, due to Joyent awesomeness.
02:33:08  <piscisaureus_>mjr_: so it seems the slab allocator is already there
02:33:48  <piscisaureus_>dylukes: you submitted patches already?
02:34:00  <dylukes>Well, I asked before but never got an answer on how I should do so.
02:34:06  <dylukes>They're in a branch in my fork.
02:37:03  <TooTallNate>dylukes: pull requests are fine
02:37:27  <piscisaureus_>dylukes: send a pull request.
02:37:29  <dylukes>So then you'll just merge the branch when it comes time?
02:37:48  <piscisaureus_>dylukes: will be a couple of weeks because we will probably push this until after the 0.8 release
02:37:59  <dylukes>Sure.
02:39:06  <dylukes>Let me just document the changes in the pull request...
02:39:13  * benviequit
02:39:42  <piscisaureus_>dylukes: yeah. also make sure to sign the CLA
02:39:58  <piscisaureus_>dylukes: and squash commits if it makes sense
02:40:13  <piscisaureus_>mjr_: so we are not using the slab correctly in udp_wrap.cc :-/
02:40:32  <mjr_>shall I file a bug?
02:40:43  <piscisaureus_>I will
02:40:59  <dylukes>perhaps I should squash them first, indeed.
02:41:01  <dylukes>CLA is where?
02:43:39  <piscisaureus_>mjr_: is that flame graph "secret" or can I reference it from a ticket?
02:43:50  <mjr_>Not secret at all
02:44:09  <piscisaureus_>dylukes: http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CCkQFjAA&url=http%3A%2F%2Fnodejs.org%2Fcla.html&ei=0tdvT4vSLdHtObSDnPkF&usg=AFQjCNH_gVNUyleDN1fcvLaL_4oSyou2kQ
02:44:24  <mjr_>This kind of stuff is what I've been looking forward to with the move to Joyent and SmartOS.
02:44:30  <piscisaureus_>mjr_: https://github.com/joyent/node/issues/3010
02:44:54  <mjr_>nice
02:45:27  <piscisaureus_>Ok, I am going to bed. 4:45am already.
02:52:53  <dylukes>https://github.com/joyent/libuv/pull/359
02:52:53  <dylukes>done
02:52:57  <piscisaureus_>dylukes: I am not doing the review right now.
02:53:01  <dylukes>Of course :P.
02:53:09  <dylukes>I'm just saying "it's there"
02:53:09  <piscisaureus_>dylukes: but I don't think those printf's should be in there
02:53:30  <dylukes>Did I leave one in?
02:53:39  <piscisaureus_>oh wait it's just tests
02:53:43  <dylukes>Or are you just trying to make me paranoid. :|
02:54:31  <piscisaureus_>dylukes: although - printf'ing the error in every send cb seems a little excessive to me
02:54:39  <piscisaureus_>even in tests
02:55:01  <dylukes>I feel like that must be one left over from debugging.
02:55:05  <dylukes>File:line?
02:56:03  <piscisaureus_>test-udp-send-and-recv.c @@ cl_send_cb
02:56:11  <piscisaureus_>ok, /me gone
02:56:15  <dylukes>Ah, right. Yeah, that was because that test broke...
02:56:20  <dylukes>that's what the third patch there fixes :).
02:56:23  <dylukes>Alright, good night!
02:56:26  * piscisaureus_quit (Quit: ~ Trillian Astra - www.trillian.im ~)
03:20:52  * mikealjoined
03:22:09  * sh1mmerjoined
03:25:55  * benviejoined
03:26:50  * benviequit (Client Quit)
03:27:04  * benviejoined
03:32:44  * indutnyjoined
03:49:37  * dshaw_joined
03:52:09  * mikealquit (Quit: Leaving.)
04:05:47  * pfox___joined
04:11:20  * orlandovftwjoined
04:12:16  * orlandovftwquit (Client Quit)
04:12:30  * orlandovftwjoined
04:12:33  * orlandovftwquit (Client Quit)
04:12:57  * orlandovftwjoined
04:32:17  * dshaw_quit (Quit: Leaving.)
04:35:31  * pfox___quit (Ping timeout: 248 seconds)
04:58:53  * dshaw_joined
05:37:10  * paddybyersquit (Quit: paddybyers)
05:44:08  * paddybyersjoined
05:52:22  * mmalecki[away]changed nick to mmalecki
06:06:31  * dylukesquit (Quit: Pipes are broken. Sending packets via Fedex.)
06:42:45  * stephankquit (Quit: *Poof!*)
06:51:50  * sh1mmerquit (Quit: sh1mmer)
07:09:49  * mikealjoined
07:16:57  * mmaleckichanged nick to mmalecki[away]
07:31:18  * TooTallNatequit (Quit: Linkinus - http://linkinus.com)
07:42:40  * mikealquit (Quit: Leaving.)
07:43:27  * mikealjoined
07:45:25  * mikealquit (Client Quit)
07:48:17  * mikealjoined
08:06:01  <mjr_>Just caught another one of those "stuck in TLS forever" bugs.
08:06:11  <mjr_>But this time I got a core file, truss output, and a fucking flame graph
08:06:19  <mjr_>http://ranney.com/stuck.svg
08:14:22  * theColejoined
08:15:38  * txdvjoined
08:17:56  * rendarjoined
08:19:49  * txdv_quit (Ping timeout: 264 seconds)
08:20:38  * mikealquit (Quit: Leaving.)
08:40:52  * orlandovftwquit (Ping timeout: 252 seconds)
08:45:36  * mikealjoined
08:59:54  * abraxasquit
09:21:17  * Raynosjoined
09:26:10  * paddybyersquit (Quit: paddybyers)
09:32:17  * dshaw_quit (Quit: Leaving.)
09:42:12  * paddybyersjoined
10:02:08  * paddybyersquit (Ping timeout: 246 seconds)
10:56:40  * bnoordhuisjoined
11:11:46  * paddybyersjoined
11:44:17  * bnoordhuisquit (Remote host closed the connection)
11:54:24  * bnoordhuisjoined
12:05:24  * piscisaureus_joined
12:06:39  * bnoordhuisquit (Remote host closed the connection)
12:10:03  * bnoordhuisjoined
12:11:10  <CIA-99>node: Shigeki Ohtsu master * re7792e5 / test/simple/test-tls-honorcipherorder.js : test: add test of tls.createServer(honorCipherOrder=true) - http://git.io/XfvVUQ
12:12:41  <benvie>I think I found it
12:13:02  <benvie>_PollableReadPipe and _PollableWritePipe from Twisted Python
12:14:17  <benvie>http://twistedmatrix.com/trac/attachment/ticket/2157/win32_console_io.2.patch
12:16:13  <benvie>that is the piece of magic that libuv is missing
12:16:26  <benvie>mostly the read pipe
12:17:18  <benvie>probably because it's specifically not for performance, but it sure helps for the stdin issue
12:17:26  <benvie>for the console
12:25:06  <benvie>at least I know I'm talking about the right thing now
12:27:35  * travis-cijoined
12:27:35  <travis-ci>[travis-ci] joyent/node#643 (master - e7792e5 : Shigeki Ohtsu): The build is still failing.
12:27:35  <travis-ci>[travis-ci] Change view : https://github.com/joyent/node/compare/0dd8e01...e7792e5
12:27:35  <travis-ci>[travis-ci] Build details : http://travis-ci.org/joyent/node/builds/948454
12:27:35  * travis-cipart
12:30:57  <benvie>I think I see it all now
12:31:24  <benvie>there just isn't a callback with iocp on pipe stdin except per line
12:31:50  <benvie>so you have to pool PeekBytes or whatever it's called
12:32:09  <benvie>to see if anything new has come in, if you want an alert sooner than once per new line
12:32:12  <benvie>err poll
12:33:14  <benvie>well once per new line or the buffer max which is whatever bytes, like a few kb
12:41:36  * dylukesjoined
12:46:51  <piscisaureus_>benvie: on windows a pipe is not line buffered. You have to roll your own line buffering if you need it.
12:53:25  * benviequit
12:57:01  <bnoordhuis>piscisaureus_: Local<> seems to fix the issue
12:57:12  <bnoordhuis>which i suppose is to be expected
12:57:24  <bnoordhuis>now to check all MakeCallback call sites...
13:00:08  <piscisaureus_>bnoordhuis: rather check for all Handle<Value> x = y
13:12:33  <bnoordhuis>i've got to leave something for you
13:15:24  <dylukes>piscisaureus_: I cleaned up the fprintf you mentioned. I also nixed a stdio include. So, it should be all clean now.
13:15:45  <dylukes>Tests are still failing, but no more than before. The only one that started failing, I fixed.
13:17:03  * paddybyersquit (Quit: paddybyers)
13:22:23  <piscisaureus_>dylukes: ok
13:22:49  <dylukes>So... there you go. I'll just leave it there. And perhaps fix it up to keep it easy to merge.
13:22:58  <dylukes>Have a good day ^_^.
13:46:46  * coderarityquit (Read error: Connection reset by peer)
13:47:48  * Raynosquit (Read error: Connection reset by peer)
13:47:53  * indutnyquit (Ping timeout: 246 seconds)
13:48:09  * mrb_bkquit (Write error: Connection reset by peer)
13:57:57  <piscisaureus_>dylukes: ok, we'll merge it one day
14:21:51  * benviejoined
14:26:21  * indutnyjoined
14:33:22  * mrb_bkjoined
14:37:39  <bnoordhuis>piscisaureus_: https://github.com/bnoordhuis/node/compare/issue2981 <- review?
14:38:11  * paddybyersjoined
14:40:37  * indutny_joined
14:49:45  * Raynosjoined
15:01:58  * piscisaureus_quit (Quit: ~ Trillian Astra - www.trillian.im ~)
15:06:03  * piscisaureus_joined
15:23:17  * pfox___joined
15:34:27  * piscisaureus_quit (Ping timeout: 265 seconds)
15:41:31  * sh1mmerjoined
15:50:31  * mikealquit (Quit: Leaving.)
15:54:56  * txdvquit (Ping timeout: 246 seconds)
15:55:00  * AndreasMadsenjoined
16:03:30  * mikealjoined
16:05:37  * dapjoined
16:06:52  * orlandovftwjoined
16:07:33  * orlandovftwquit (Client Quit)
16:07:47  * orlandovftwjoined
16:11:24  * coderarityjoined
16:14:45  * isaacsjoined
16:14:53  * seebeespart
16:15:56  * theColequit (Quit: theCole)
16:20:39  * mikealquit (Quit: Leaving.)
16:21:36  * TooTallNatejoined
16:23:02  <CIA-99>node: Alex Kocharin master * rab518ae / lib/readline.js :
16:23:02  <CIA-99>node: readline: fix for terminals that insert newlines automatically
16:23:02  <CIA-99>node: Fixes #2985. - http://git.io/5S0xAQ
16:25:30  * piscisaureus_joined
16:27:05  * sh1mmerquit (Quit: sh1mmer)
16:29:06  * stephankjoined
16:29:07  * mikealjoined
16:31:55  * txdvjoined
16:39:42  * travis-cijoined
16:39:42  <travis-ci>[travis-ci] joyent/node#644 (master - ab518ae : Alex Kocharin): The build is still failing.
16:39:42  <travis-ci>[travis-ci] Change view : https://github.com/joyent/node/compare/e7792e5...ab518ae
16:39:42  <travis-ci>[travis-ci] Build details : http://travis-ci.org/joyent/node/builds/950101
16:39:42  * travis-cipart
16:41:37  * AndreasMadsenquit (Remote host closed the connection)
16:51:06  * piscisaureus__joined
16:51:45  * piscisaureus_quit (Read error: Connection reset by peer)
16:55:13  * bnoordhuisquit (Ping timeout: 264 seconds)
16:57:18  <piscisaureus__>igorzi: hey
16:57:43  <piscisaureus__>igorzi: that write failure patch you did friday - I don't think it properly works
16:58:01  <piscisaureus__>igorzi: If I overflow the write queue the process just exits
16:58:49  <piscisaureus__>igorzi oh right nevermind heh
16:59:41  <piscisaureus__>ah right node just exits with no error on allocation failure :-;
17:07:29  * hij1nxjoined
17:21:36  <TooTallNate>well thats lovely :p
17:22:14  * dshaw_joined
17:32:13  * sh1mmerjoined
17:34:30  * perezdjoined
17:39:43  <isaacs>piscisaureus__: this is on v0.6 or master?
17:39:49  <isaacs>(exiting with no error)
17:55:56  <piscisaureus__>isaacs: v0.6
17:56:03  <piscisaureus__>have to reboot, back in a sec
17:56:15  * piscisaureus__quit (Quit: ~ Trillian Astra - www.trillian.im ~)
17:58:08  * piscisaureus_joined
18:03:46  * AvianFlujoined
18:04:33  * `3rdEdenjoined
18:04:49  * hij1nxquit (Quit: hij1nx)
18:05:49  * indutnychanged nick to indutny_znc
18:05:49  * indutny_changed nick to indutny
18:08:49  * theColejoined
18:11:27  * mikealquit (Quit: Leaving.)
18:14:02  * brsonjoined
18:14:14  * orlandovftwquit (Ping timeout: 246 seconds)
18:14:29  <igorzi>piscisaureus_: hey
18:14:40  <igorzi>piscisaureus_: do you have code that reproduces it?
18:15:31  * hij1nxjoined
18:18:59  * mikealjoined
18:24:56  * mikealquit (Quit: Leaving.)
18:27:26  <piscisaureus_>igorzi: what? buffer overflow?
18:27:30  <piscisaureus_>igorzi: easy
18:27:52  <piscisaureus_>igorzi:
18:27:52  <piscisaureus_>var a=[]; for(;;) a.push(new Buffer(1024*1024));
18:28:43  * mikealjoined
18:28:54  * theColequit (Quit: theCole)
18:29:19  <igorzi>piscisaureus_: no, you were saying that the queued write patch breaks if the write queue is overflowed
18:30:44  <igorzi>piscisaureus_: do you have code to reproduce that?
18:38:34  * pieternjoined
18:42:09  * isaacsquit (Remote host closed the connection)
18:43:21  * isaacsjoined
18:46:34  * TooTallNatequit (Read error: Connection reset by peer)
18:46:42  * TooTallNatejoined
18:50:25  * avsejquit (Ping timeout: 264 seconds)
18:50:47  * avsejjoined
18:57:06  * mikealquit (Quit: Leaving.)
18:58:34  * mikealjoined
19:03:22  * orlandovftwjoined
19:03:28  * orlandovftwquit (Client Quit)
19:03:40  * orlandovftwjoined
19:10:18  <piscisaureus_>igorzi: yeah I was kind of mistaken.
19:10:27  <piscisaureus_>igorzi: it was just node exiting after a buffer overflow
19:10:37  <igorzi>piscisaureus_: ahh ok
19:11:02  <piscisaureus_>igorzi: but...
19:11:16  <piscisaureus_>igorzi: there is one user on the mailing list who says het gets ENOBUFS
19:11:26  <piscisaureus_>igorzi: and there is another user that has npm freeze again
19:12:51  * perezdquit (Quit: perezd)
19:12:52  <igorzi>piscisaureus_: https://github.com/joyent/node/issues/2999 (npm freeze)?
19:13:15  <piscisaureus_>igorzi: yep
19:14:46  <igorzi>piscisaureus_: we should ask for npm log? it'd be good to know where exactly it's getting stuck
19:15:04  <isaacs>igorzi: asked :)
19:22:08  * `3rdEdenquit (Quit: Leaving...)
19:27:11  * txdvquit (Ping timeout: 260 seconds)
19:33:43  * mikealquit (Quit: Leaving.)
19:36:47  * mikealjoined
19:43:41  * theColejoined
19:51:59  * piscisaureus_quit (Ping timeout: 252 seconds)
19:52:34  * piscisaureus_joined
20:09:18  * dvvjoined
20:10:05  * `3rdEdenjoined
20:16:46  * dvvquit (Ping timeout: 260 seconds)
20:23:06  * mikealquit (Ping timeout: 244 seconds)
20:26:56  * mikealjoined
20:31:25  * dvvjoined
20:31:42  * dvvpart
20:32:02  * skomskijoined
20:41:21  * perezdjoined
20:42:20  <TooTallNate>yo guys
20:42:26  <TooTallNate>so basically this is done
20:42:27  <TooTallNate>https://github.com/TooTallNate/node/compare/tty-readline-migration2
20:42:37  <TooTallNate>i need to squash them into a few logical commits still
20:42:56  <piscisaureus_>TooTallNate: did you do the options for createInterface?
20:43:03  <TooTallNate>piscisaureus_: yes
20:43:40  <piscisaureus_>nice
20:44:00  <piscisaureus_>TooTallNate: yeah, do the squashing and let's get in landed then
20:44:17  <TooTallNate>cool
20:44:21  <piscisaureus_>TooTallNate: I can also review it first
20:44:26  <piscisaureus_>actually I think that is better
20:44:36  <piscisaureus_>so you don't have to squash again if I find something :-)
20:44:40  <TooTallNate>how many commits you think it should end up being?
20:44:45  <TooTallNate>piscisaureus_: ok that would be good :)
20:45:28  <piscisaureus_>TooTallNate: re the number of commits - I don't care much, as long as you don't have commits that fixup or undo an earlier commit.
20:47:12  <piscisaureus_>TooTallNate: why call it "enabled" and not something more descriptive
20:47:21  <TooTallNate>piscisaureus_: i would love to change that
20:47:40  <TooTallNate>piscisaureus_: the "enabled" was just the legacy variable name being used already
20:47:48  <TooTallNate>but we should make it something better while we have the chance
20:47:54  <piscisaureus_>yeah
20:47:57  <piscisaureus_>isaacs: any ideas?
20:48:03  <piscisaureus_>ansi? vt100? terminal?
20:48:10  <piscisaureus_>advanced?
20:48:28  <TooTallNate>i was just thinking advanced...
20:48:39  <TooTallNate>i don't know if i like that much better...
20:48:41  <piscisaureus_>yeah, that would be okay with me
20:48:50  <piscisaureus_>well, better than enabled
20:48:59  <TooTallNate>true :p
20:49:12  <piscisaureus_>because enabled is like "on" while you probably mean "not cripple" :-)
20:52:44  <piscisaureus_>TooTallNate: the useColors option is mentioned but not documented
20:53:37  <TooTallNate>piscisaureus_: i was just taking that out; `useColors` should be a repl-specific prop (currently it's not), but i was gonna do that in another patch
20:54:42  <piscisaureus_>ok
20:58:17  <piscisaureus_>TooTallNate: actually I have a few more comments. Do you want me to post them here or comment on the issue?
20:58:39  <TooTallNate>here is fine i guess
20:58:52  <piscisaureus_>Ok so here it is
20:59:16  <piscisaureus_>Why infinity columns when the size could not be obtained?
20:59:26  <piscisaureus_>Does refreshSize have to be exported?
21:00:10  <piscisaureus_>can emitKeyPressEvents be an EventEmitter on it's own instead of emitting events on a foreign object?
21:00:42  <piscisaureus_>sorry for the C-ism. Does refreshSize have to be part of the public API?
21:00:59  <piscisaureus_>I am open for debate of course :-)
21:01:02  <piscisaureus_>TooTallNate: ^
21:01:09  <TooTallNate>1) is there a better default? i had it at 80 earlier but doesn't seem to make a difference
21:01:59  <TooTallNate>2) could be private (_refreshSize), but it's used in src/node.js (stdout.refreshSize()). we should make it private
21:02:32  <TooTallNate>3) you don't like that style? i like it actually, and it keeps backwards compatibility (process.stdout.on('keypress'))
21:03:33  <piscisaureus_>1) Actually since it is local to the readline I can live with Infinity (not for process.stdout.columns though)
21:03:58  <TooTallNate>process.stdout.columns will *always* be set
21:04:06  <piscisaureus_>2) it should be private. If you are worried about node.js calling it, call it from the tty.*Stream constructor instead
21:04:20  <piscisaureus_>TooTallNate: oh really
21:04:26  <piscisaureus_>TooTallNate: also if it is a pipe for example?
21:04:40  <TooTallNate>oh, no, not in that case. i mean when it's a tty.WriteStream instance
21:04:48  <piscisaureus_>yeah
21:04:57  <piscisaureus_>so why call refreshSize from node.js
21:05:07  <piscisaureus_>you could just call it from the WriteStream constructor right?
21:05:23  <TooTallNate>seems like the SIGWINCH catching code should be there
21:05:37  <piscisaureus_>yes
21:06:02  <TooTallNate>i kinda had pty.js in mind, where he creates an fd, which could potentially be used with tty.ReadStream/tty.WriteStream
21:06:22  <piscisaureus_>hmm
21:06:31  <TooTallNate>then pty.js has it's own native calls for resize(), which would in turn call "refreshSize()"
21:06:55  <isaacs>sorry, just got back
21:07:17  <piscisaureus_>TooTallNate: I don't think it matters much - but I also don't think tty.WriteStream should really be overloadable.
21:07:21  <isaacs>i think calling it "terminal" is good. "ansi" means a LOT of things.
21:07:28  <isaacs>and vt00 is too geeky
21:07:33  <isaacs>*vt100
21:07:35  <isaacs>and hard to type
21:07:37  <TooTallNate>isaacs: what about "advanced"?
21:07:44  <isaacs>sure, that's fine,too
21:07:46  <TooTallNate>i like "terminal" though too
21:07:51  <TooTallNate>im impartial
21:07:54  <piscisaureus_>TooTallNate: I'll let you decide
21:07:57  <TooTallNate>let's do "terminal"
21:08:01  <piscisaureus_>TooTallNate: +1
21:08:16  <piscisaureus_>TooTallNate: so now on (3)
21:08:37  <piscisaureus_>TooTallNate: sure it keeps backwards compat, but the style is kind of weird and uncommon
21:08:52  <piscisaureus_>TooTallNate: so how many people rely on keypress events anyway
21:09:01  <piscisaureus_>it was never documented :-)
21:09:02  <TooTallNate>not a lot, it wasn't documented
21:09:15  <piscisaureus_>TooTallNate: I like to compare it with http.Server
21:09:23  <piscisaureus_>it's basically a wrapper for a tcp socket
21:09:38  <piscisaureus_>and a keypress parser is a wrapper for a ttyin stream
21:10:41  <TooTallNate>sure makes sense. just seems a little wasteful is all :p
21:11:05  <TooTallNate>i've been doing it for a little while :p https://gist.github.com/1785026
21:12:39  <TooTallNate>i just think of them like "upgrades" to the stream
21:13:28  <piscisaureus_>call some second opinions
21:17:53  * mikealquit (Quit: Leaving.)
21:20:29  <TooTallNate>piscisaureus_: ok 'enabled' changed to 'terminal'
21:20:42  <TooTallNate>isaacs: you have a preference on this emitKeypressEvents() thing?
21:21:02  <piscisaureus_>igorzi: hey, yt?
21:24:09  <isaacs>TooTallNate: i don't know. i mean, i can see how it could be useful, but i'd be fine with removing it.
21:24:18  <isaacs>it's not a webpage.
21:25:03  <TooTallNate>isaacs: i think the debate is about whether it should return a new EventEmitter rather then emit events on the existing stream
21:25:14  <isaacs>meh
21:25:28  <isaacs>returning a new emitter seems awkward for a thing that's actually happening on the existing stream
21:25:44  <piscisaureus_>isaacs: so my point was that http is basically the same
21:26:09  <isaacs>piscisaureus_: you mean, that there's a http object that connects and re-interprets an underlying tcp connection?
21:26:17  <TooTallNate>piscisaureus_: i think the main difference is that http alters the Stream itself, the 'data' events
21:26:18  <isaacs>s/connects/wraps/
21:26:42  <TooTallNate>with this "upgrade" style you can still pipe the original stream untouched
21:26:45  <isaacs>piscisaureus_: in the http/socket case, though, there's a LOT of changes, both semantically and in terms of the actual data.
21:26:56  <piscisaureus_>yeah, that's true
21:27:00  <piscisaureus_>ok, whatever
21:27:02  <isaacs>in this case, it's just "oh, also do this other event"
21:27:16  <isaacs>we could even just hook onto the "on" method, and only emit if there's a listener.
21:27:19  <piscisaureus_>isaacs: ... which happens only when the repl is started
21:27:42  <piscisaureus_>isaacs: the idea was to make the keypress parser an implementation detail
21:27:44  <isaacs>yeah, we could even just patch the readline object in repl.js
21:27:52  <isaacs>but yeah, keypress parser should be an implementation detail.
21:27:57  <isaacs>let's actually hide it
21:29:20  <TooTallNate>isaacs: piscisaureus_: ok i'm fine with hiding it (so we should remove all the ansi writing function from readline's exports as well then?)
21:29:48  <isaacs>actually, scratch hiding it. that's too agressive, probably
21:30:24  <TooTallNate>ok
21:30:43  <TooTallNate>so i need to change refreshSize() to _refreshSize() and undocument it
21:30:47  <TooTallNate>then we should be good to go
21:30:52  <TooTallNate>oh, and squashing :(
21:30:54  <piscisaureus_>yeah
21:31:33  <piscisaureus_>isaacs: do you have any opinion on https://github.com/joyent/node/issues/3006 ?
21:32:40  <isaacs>piscisaureus_: well, it'd be better for fs.unlink to work the same across platforms.
21:32:54  <isaacs>piscisaureus_: i think the lack of atomicity is less problematic (and easily worked around with docs) than the lack fo working at all.
21:34:32  <TooTallNate>ughh, dissecting this is going to suck
21:34:33  <isaacs>piscisaureus_: is it even reasonable to work around at a lower level, though?
21:34:38  <TooTallNate>can i just squash it into 1 commit?
21:35:26  * mikealjoined
21:36:36  * skomskiquit (Quit: skomski)
21:36:41  * k-schanged nick to k-s[AWAY]
21:43:28  <piscisaureus_>TooTallNate: yeah, why not
21:43:37  <piscisaureus_>just squash if you want to
21:43:52  * `3rdEdenquit (Quit: Linkinus - http://linkinus.com)
21:45:06  <piscisaureus_>isaacs: what do you mean with "work around at a lower level"?
21:47:48  * mikealquit (Quit: Leaving.)
21:49:03  <TooTallNate>piscisaureus_: ok ready. final comments? https://github.com/TooTallNate/node/commit/4ec4c2253933cc8acc0f3b732fed21928b84959d
21:49:05  <isaacs>piscisaureus_: well, i can add a workaround in graceful-fs or something to essentially do what arturadib is doing.
21:49:16  <isaacs>piscisaureus_: and we could do that in lib/fs.js
21:49:25  <isaacs>piscisaureus_: but does it make sense to work around this in libuv?
21:49:39  * mikealjoined
21:50:49  <piscisaureus_>isaacs: well, we could maybe work around this
21:51:05  * theCole_joined
21:51:11  <piscisaureus_>isaacs: whether it makes sense is something I'd like your opinion on
21:51:55  <piscisaureus_>isaacs: I think we can make it work by opening the file and specifying FILE_FLAG_DELETE_ON_CLOSE
21:51:56  * theColequit (Ping timeout: 246 seconds)
21:52:05  <piscisaureus_>the question is, is it worth the effort :-)
21:52:30  <isaacs>sure
21:52:50  <isaacs>if you don't think it's worth patching in libuv, we should pull artur's workaround into lib/fs.js, i thikn
21:53:04  <piscisaureus_>right
21:53:05  <isaacs>it's confusing to have fs.unlink not work when rm/del would work
21:53:19  <piscisaureus_>isaacs: well `del` would not work with read-only files
21:53:32  <isaacs>rm won't either, unless you add -f
21:53:46  <isaacs>it'll prompt you
21:53:55  <piscisaureus_>same for del
21:53:59  <piscisaureus_>will work with /f
21:54:23  <isaacs>hm.
21:55:24  <isaacs>hm. i see. so, rm without -f prompts, but unlink(2) just goes ahead and unlinks it, if you have write perms on the dir.
21:55:25  <piscisaureus_>isaacs: so if we are going to fix it, it should be in libuv
21:55:29  <isaacs>i agree
21:55:36  <isaacs>this would also be confusing in other libuv's
21:55:57  <isaacs>it doesn't rise above the v0.6 waterline, though
21:56:11  <isaacs>ie, i'm not going to do a node release just for this.
21:56:20  <piscisaureus_>isaacs: so far we have been trying to make it as unix-y as it gets
21:56:26  <isaacs>but if it gets in, i don't think anyone will mind.
21:56:26  <isaacs>yeah
21:56:27  <piscisaureus_>isaacs: yeah, and there are more issues like this
21:56:27  <TooTallNate>isaacs: piscisaureus_: any last comments on the repl/readline stuff?
21:56:42  <piscisaureus_>like, lstat is not working, rename doesn't replace the target (I think) etc
21:56:42  <TooTallNate>if not i'll land it
21:56:43  <isaacs>TooTallNate: the "stream" arg... i notice that you're passing in process there.
21:56:52  <isaacs>TooTallNate: is "stream" supposed to be a thing with stdin/stdout?
21:57:06  <isaacs>TooTallNate: if so, that's confusing, because it's not a "instanceof Stream"
21:57:15  <TooTallNate>isaacs: either a duplex socker *or* and object with "stdin" and "stdout" props
21:57:19  <TooTallNate>*socket
21:57:34  <TooTallNate>isaacs: it mentions it in the docs for that option
21:57:34  <isaacs>TooTallNate: right
21:57:41  <isaacs>TooTallNate: yeah, that's kinda weird.
21:57:49  <isaacs>why not just explicitly specify input and output streams?
21:57:51  <igorzi>piscisaureus_: what's up?
21:57:55  <isaacs>{ input: socket, output: socket, ... }
21:57:56  <TooTallNate>isaacs: we could just make it "input" and "output" like readline
21:58:02  <TooTallNate>ok ya sounds good
21:58:23  <isaacs>then it'd also be possible to do something funky like {input: fileReadStream, output: fileWriteStream }
21:58:40  <isaacs>instead of { stream: { stdin: fileReadStream, stdout: fileWriteStream }, ... }
21:59:00  * isaacsstill reading
21:59:10  <piscisaureus_>isaacs: I mostly reviewed it
21:59:16  <TooTallNate>isaacs: haha, we were doing what you don't like already in _debugger
21:59:17  <TooTallNate>https://github.com/joyent/node/blob/master/lib/_debugger.js#L748-751
21:59:17  <piscisaureus_>TooTallNate: exports.emitKey ?
21:59:25  <piscisaureus_>crap
21:59:38  <piscisaureus_>go fix it !!!1
21:59:49  <piscisaureus_>igorzi: are you working on node these days?
22:00:09  <TooTallNate>piscisaureus_: we could probably remove emitKey() from exports
22:00:13  <igorzi>piscisaureus_: yeah
22:00:22  <piscisaureus_>TooTallNate: yes
22:00:30  <TooTallNate>ok
22:00:34  <piscisaureus_>TooTallNate: also, I still see mentions of "enabled" in node.js
22:00:35  <igorzi>piscisaureus_: i'm going to have that tcp connections patch ready later today
22:00:40  <piscisaureus_>igorzi: ok, kewl
22:00:45  <piscisaureus_>igorzi: I also have another question
22:00:57  <TooTallNate>piscisaureus_: shoot, good catch
22:01:06  <isaacs>TooTallNate: ok, yeah. s/enabled/terminal/, and the "stream" option switch. i don't see any other issues (mostly all reviewed already)
22:01:15  <TooTallNate>ok on it
22:01:15  <piscisaureus_>igorzi: can you check whether GetFileInformationByHandle makes multiple NtQueryInformationFile calls?
22:01:32  <piscisaureus_>igorzi: (I am thinking of ways to make lstat() work on windows)
22:03:13  <piscisaureus_>igorzi: the implementation should be in windows\base\client\filehops.c
22:12:17  * mikealquit (Quit: Leaving.)
22:13:32  * mikealjoined
22:15:04  <TooTallNate>isaacs: piscisaureus_: ok should be ready now!
22:15:05  <TooTallNate>https://github.com/TooTallNate/node/commit/tty-readline-migration-squash
22:16:17  <piscisaureus_>TooTallNate: I think it won't work
22:16:29  <piscisaureus_>TooTallNate: you made emitKey private but you are still calling exports.emitKey
22:16:53  * rendarquit
22:16:57  <TooTallNate>piscisaureus_: no?
22:17:02  <TooTallNate>where?
22:17:09  <TooTallNate>oh there
22:17:11  <TooTallNate>:)
22:17:42  * bnoordhuisjoined
22:18:32  <TooTallNate>piscisaureus_: ok fixed
22:19:07  <piscisaureus_>TooTallNate: ok
22:19:13  <piscisaureus_>TooTallNate: so I have no more comments.
22:19:25  <piscisaureus_>TooTallNate: it would be nice if you could actually test it and if it works, land it :-)
22:21:34  <TooTallNate>piscisaureus_: found a bug; fixed
22:25:16  <TooTallNate>ok i'm gonna land it
22:25:21  * dylukesquit (Quit: Computer has gone to sleep.)
22:27:51  <CIA-99>node: Nathan Rajlich master * raad12d0 / (8 files in 3 dirs):
22:27:51  <CIA-99>node: readline: migrate ansi/vt100 logic from tty to readline
22:27:51  <CIA-99>node: The overall goal here is to make readline more interoperable with other node
22:27:51  <CIA-99>node: Streams like say a net.Socket instance, in "terminal" mode.
22:27:51  <CIA-99>node: See #2922 for all the details.
22:27:51  <CIA-99>node: Closes #2922. - http://git.io/5tyeTA
22:28:20  * dylukesjoined
22:29:48  <TooTallNate>mjr_: that one was for you ^
22:30:28  <piscisaureus_>TooTallNate++
22:30:29  <kohai>TooTallNate has 11 beers
22:31:19  * mikealquit (Quit: Leaving.)
22:31:49  <TooTallNate>and with that i'm off to get some food :)
22:37:58  * TooTallNatequit (Quit: Leaving...)
22:39:41  * dylukesquit (Quit: Computer has gone to sleep.)
22:49:59  * dylukesjoined
22:54:48  * mikealjoined
23:02:48  * mikealquit (Quit: Leaving.)
23:10:54  * dylukesquit (Quit: Pipes are broken. Sending packets via Fedex.)
23:14:32  * mikealjoined
23:16:41  <piscisaureus_>igorzi: still here?
23:34:27  * dylukesjoined
23:39:25  <piscisaureus_>damn, why does it have to be so hard. Some unlink() code for windows:
23:39:25  <piscisaureus_>https://github.com/homes410/cygwin-git/blob/master/cygwin/syscalls.cc#L578-895 <-- cygwin
23:39:25  <piscisaureus_>Unfortunately I cannot paste the DeleteFile source code here, but it's similarly bad
23:46:07  * perezdquit (Quit: perezd)
23:46:28  * perezdjoined
23:48:36  * dylukesquit (Quit: Computer has gone to sleep.)
23:54:13  * TooTallNatejoined
23:59:03  <piscisaureus_>bnoordhuis: yt?