00:00:09  <bnoordhuis>i like 'em like that
00:07:44  <piscisaureus>are you requesting 64kb buffers to read a single keystroke on linux?
00:07:49  <piscisaureus>or smarter than that?
00:09:49  <piscisaureus>bnoordhuis: can you answer some vt100 questions for me?
00:09:56  <piscisaureus>or anyone?
00:10:01  <bnoordhuis>piscisaureus: sure
00:10:45  <piscisaureus>- can you distinguish tab from shift-tab, ctrl-tab etc
00:10:45  <piscisaureus>- does ctrl+space have a special meaning? I remember something like ^@?
00:10:45  <piscisaureus>- can you capture ctrl+number key combos?
00:11:39  <bnoordhuis>piscisaureus: not with strict vt100 emulation
00:12:02  <piscisaureus>bnoordhuis: I am not. it's a mixture of vt100/xterm/rxvt/linux
00:12:39  <bnoordhuis>okay, first off: vt100 is not keystrokes, it's control sequences that may be mapped to keystrokes
00:13:17  <bnoordhuis>so asking if you can detect ctrl-tab is meaningless, you can only detect what ctrl-tab is mapped to
00:14:12  <piscisaureus>"there are no letters on a keyboard. there are only keys that are mapped to letters"
00:14:14  <piscisaureus>who cares
00:14:33  <piscisaureus>what is ctrl+tab usually mapped to?
00:14:33  <bnoordhuis>it matters because there's a lot of different mappings
00:14:48  <bnoordhuis>as i experience every time i log into a freebsd or sunos system >:(
00:15:00  <bnoordhuis>ctrl-tab? nothing
00:15:28  <piscisaureus>In plain english: sometimes keys are mapped to the wrong control sequences :-)
00:15:30  <piscisaureus>ok
00:15:34  <bnoordhuis>we're using termios so we could detect ctrl-tab
00:15:41  <piscisaureus>how?
00:16:27  <bnoordhuis>by reading a termios struct and checking the c_cc field
00:16:38  <bnoordhuis>(i think, it's been a while)
00:18:08  <piscisaureus>bnoordhuis: after fighting for weeks ryah defeated me - we're going for control sequences not keys
00:18:19  <bnoordhuis>okay, that's good
00:18:25  <piscisaureus>so I need to map keys to control sequences
00:18:37  <bnoordhuis>so now you just need to agree on a common set of control sequences
00:18:37  <piscisaureus>what do I map ctrl+tab to? what about ctrl+space? etc
00:19:03  <piscisaureus>there's some standard stuff that is the same on windows and linux
00:19:11  <piscisaureus>e.g. ctrl+a -> \x01
00:19:46  <piscisaureus>backspace -> \x08, ctrl+backspace -> \x7f etc
00:20:15  <piscisaureus>I also have the function keys, arrows, numpad figured out
00:20:33  <bnoordhuis>it works like this: if you press e.g. up arrow, you emit esc+a
00:20:38  <piscisaureus>but tab, enter, space, numbers w/ modifiers I have not figured out
00:21:00  <bnoordhuis>piscisaureus: http://ascii-table.com/ansi-escape-sequences-vt-100.php
00:21:38  <piscisaureus>bnoordhuis: https://gist.github.com/1236439
00:22:35  <bnoordhuis>piscisaureus: right, looks good
00:22:47  <piscisaureus>bnoordhuis: I am still missing enter, tab, space
00:22:52  <piscisaureus>that's what I was bugging you about
00:22:58  <piscisaureus>what does ctrl+space do etc
00:23:05  <bnoordhuis>ctrl+space or ctrl+tab does nothing
00:23:29  <bnoordhuis>enter, tab, space are simply \n, \t, \x20
00:24:01  <piscisaureus>crtl+enter -> \r ?
00:24:06  <piscisaureus>shift+tab -> ???
00:24:11  <piscisaureus>ctrl+space -> ???
00:24:18  * mralephjoined
00:24:33  <bnoordhuis>piscisaureus: there is no such thing as ctrl+enter, it just emits \n
00:24:48  <piscisaureus>bnoordhuis: try shift+enter
00:24:56  <bnoordhuis>ditto
00:24:59  <piscisaureus>hmm
00:25:11  <piscisaureus>I thought either of them would do \r
00:25:25  <bnoordhuis>\r is a heathen windows thing
00:25:57  <bnoordhuis>i kid but i don't think there's anything mapped to \r on a normal system
00:30:08  <piscisaureus>there are so many edge cases -- I actually need some kind of state machine
00:30:22  <piscisaureus>:-(
00:34:00  * isaacsquit (Quit: isaacs)
00:46:46  * mralephquit (Quit: Leaving.)
01:03:53  <piscisaureus>hey bnoordhuis, let's work on our goto stuff tomorrow
01:04:03  <bnoordhuis>piscisaureus: okay
01:04:37  <piscisaureus>bnoordhuis: we can also meet tomorrow or saturday
01:04:46  <piscisaureus>I am not going away
01:04:59  <bnoordhuis>piscisaureus: your gf is coming over?
01:05:13  <piscisaureus>no she's visiting friends
01:05:34  <bnoordhuis>'visiting friends'
01:05:43  <bnoordhuis>yes, she'd call it that, wouldn't she
01:05:50  <piscisaureus>so would I
01:05:57  <bnoordhuis>heh, tomorrow is fine
01:05:59  <piscisaureus>or rather, "work"
01:06:02  <bnoordhuis>want me to come over to delft?
01:06:13  <piscisaureus>yeah, for a change :-)
01:06:25  <bnoordhuis>sure, sometime in the afternoon?
01:06:47  <piscisaureus>eh
01:06:57  <piscisaureus>this works better over the phone
01:07:07  * ericktquit (Quit: erickt)
01:07:09  <bnoordhuis>okay, let me turn off dj tiesto
01:07:18  <piscisaureus>ah nice
01:07:20  <piscisaureus>leave it on
01:15:53  <bnoordhuis>i'm off to bed btw
01:16:00  <bnoordhuis>kqueue defies me another day >:(
01:16:05  <bnoordhuis>but i've a handle on it now
01:16:15  <bnoordhuis>anyway... sleep tight, piscisaureus
01:16:34  <piscisaureus>yes, vt100 is killing me too
01:16:37  <piscisaureus>goodbye
01:16:46  * bnoordhuisquit (Quit: Leaving)
01:20:36  <piscisaureus>every time I see pquerna in the users list I think of time sheets
01:49:08  * brsonquit (Quit: leaving)
02:38:54  <CIA-53>node: isaacs master * r74c0206 / test/simple/test-regress-GH-1726.js : Add broken test for #1726. - http://git.io/m8p_VQ
02:55:15  * isaacsjoined
02:58:34  * isaacsquit (Client Quit)
03:23:35  * ericktjoined
03:49:23  * piscisaureusquit (Ping timeout: 260 seconds)
04:09:35  * ericktquit (Quit: erickt)
04:44:23  <ryah>sigh, im really slacking off these days
05:01:53  <CIA-53>node: Ryan Dahl new-tty-binding * r11bca28 / (23 files in 6 dirs): upgrade libuv - http://git.io/_W0r7w
05:01:54  <CIA-53>node: Ryan Dahl new-tty-binding * rcb362d0 / (5 files in 2 dirs):
05:01:54  <CIA-53>node: Initial pass at new TTY js layer
05:01:54  <CIA-53>node: This breaks Windows. - http://git.io/pc9_Bg
05:01:54  <CIA-53>node: Ryan Dahl new-tty-binding * rfdeddb6 / (src/node.js src/tty_wrap.cc): Bind/use uv_guess_handle - http://git.io/LdnPJw
05:01:54  <CIA-53>node: Ryan Dahl new-tty-binding * r0c4a424 / (lib/readline.js lib/tty_uv.js src/tty_wrap.cc): Bind uv_tty_get_winsize - http://git.io/KiH6zQ
05:02:37  <CIA-53>libuv: Ryan Dahl master * r0365259 / (include/uv.h src/unix/tty.c src/win/tty.c test/test-tty.c): unix: add uv_guess_handle and uv_tty_get_winsize - http://git.io/FrLLFA
05:14:04  * isaacsjoined
05:27:07  <igorzi>ryah: please review/land the fs watcher binding: https://github.com/igorzi/node/commit/e86b443cd27ff986b1edf031476c7b790becb8ca
05:32:51  <ryah>igorzi: thanks
05:32:53  <CIA-53>node: Ryan Dahl master * r8d37b6c / (23 files in 6 dirs): upgrade libuv - http://git.io/cSyDUA
05:32:53  <CIA-53>node: Igor Zinkovsky master * r8fe5712 / (6 files in 4 dirs): fs watcher binding - http://git.io/txt99Q
06:04:19  * mralephjoined
06:23:17  * mralephquit (Read error: Connection reset by peer)
06:23:20  * mraleph1joined
06:42:55  <indutny>igorzi: yt?
06:43:36  <indutny>igorzi: https://github.com/joyent/node/commit/8fe5712477e94879664d5d420c72f273c0a888ff
06:57:22  * mraleph1quit (Quit: Leaving.)
07:15:04  <igorzi>indutny: thanks.. i'll get that fixed
07:17:12  * piscisaureusjoined
07:21:26  * piscisaureusquit (Ping timeout: 245 seconds)
07:47:36  <igorzi>ryah: https://github.com/igorzi/node/commit/2c4681e86c219912f73dbc01d11615a69b091a0f
07:48:00  <igorzi> ^---- fixes spelling in fs.js
07:59:18  * isaacsquit (Quit: isaacs)
07:59:37  <indutny>igorzi: where are you from?
09:08:54  <indutny>anyone around?
09:09:01  <indutny>libuv build is broken
09:09:04  <indutny>as far as I ca see
09:09:09  <indutny>s/ca/can
10:12:37  * dmkbotjoined
13:26:34  * dmkbotquit (Remote host closed the connection)
13:26:39  * dmkbotjoined
13:41:07  <CIA-53>node: Ben Noordhuis master * r9ad3340 / wscript : build: explicitly link in libz on non-win32 platforms - http://git.io/qeJXrw
14:01:22  * felixgejoined
14:01:22  * felixgequit (Changing host)
14:01:22  * felixgejoined
14:05:40  <indutny>pquerna: yt?
14:07:58  * piscisaureusjoined
14:08:59  * piscisaureus_joined
14:21:07  * piscisaureusquit (Quit: piscisaureus)
14:33:51  * ericktjoined
15:17:36  * ericktquit (Quit: erickt)
15:25:35  * ericktjoined
15:35:17  * ericktquit (Quit: erickt)
15:59:19  * pieternjoined
16:07:52  * felixgequit (Quit: felixge)
16:18:05  <ryah>indutny: how is libuv build broken?
16:18:17  <indutny>ryah: missed include
16:18:22  <indutny>ryah: posted pull request
16:20:47  <CIA-53>node: Igor Zinkovsky master * r66293f6 / lib/fs.js : fix spelling - http://git.io/xVSQeg
16:21:05  <indutny>ryah: https://github.com/joyent/libuv/pull/197
16:21:17  <CIA-53>libuv: Fedor Indutny master * r7ce34f2 / src/unix/tty.c : added missing headers file - http://git.io/YTHFIw
16:21:18  <ryah>indutny: thanks
16:21:22  <indutny>great
16:21:24  <indutny>thank you!
16:21:46  <indutny>ryah: btw, I think can finish tty stuff for libuv
16:22:05  <indutny>it can be ported from node_stdio, AFAIK
16:25:17  <ryah>indutny: what do you want to add?
16:25:30  <indutny>ryah: missing winapi bindings
16:25:33  <indutny>for tty
16:25:40  <ryah>piscisaureus_ is working on that
16:25:45  <indutny>ah, ok
16:25:46  <indutny>np
16:25:51  <ryah>thanks though
16:26:23  <ryah>indutny: i think there is a new problem you should attack with the debugger
16:26:32  <ryah>indutny: remote debugging
16:26:39  <indutny>haha
16:26:41  <indutny>nice
16:26:50  <indutny>should be quite simple, because everything goes in async now
16:26:58  <ryah>indutny: we used to have this thing where if you kill -SIGUSR1 `pgrep node`
16:27:03  <ryah>it would start the debugger agent
16:27:14  <ryah>but i removed that because it was effecting performance negatively
16:27:35  <indutny>ryah: restart with "--debug" option?
16:27:36  <ryah>i think it can be done in a better way
16:27:47  <ryah>indutny: no, we want to be able to debug production apps
16:27:52  <indutny>ryah: ah
16:27:53  <indutny>ryah: got it
16:28:09  <indutny>I'll think about it
16:28:12  <ryah>indutny: im not sure if using signals is the right route - especially since you don't really have signals on Windows
16:28:26  <indutny>yep
16:28:30  <ryah>but what would be great is if you could do "node debug $PID"
16:28:40  <ryah>and it would attach to a running program
16:28:57  <indutny>yep, that would be cool
16:29:17  <ryah>anyway - think about it. maybe you can come up with a good way of doing that
16:29:26  <ryah>it would be super useful
16:29:37  <indutny>k
16:31:21  <CIA-53>libuv: Erick Tryzelaar master * r7e8645d / (6 files in 4 dirs):
16:31:21  <CIA-53>libuv: unix,win: Make uv_freeaddrinfo to clean up addrinfo
16:31:21  <CIA-53>libuv: Fixes #196 - http://git.io/1iG-kA
16:39:04  <CIA-53>node: Fedor Indutny master * r1e37efb / (3 files in 2 dirs):
16:39:04  <CIA-53>node: initial tests
16:39:04  <CIA-53>node: * Don't buffer command, before it's execution (repl)
16:39:05  <CIA-53>node: * `quit` command, custom streams for .start, stubbed out test, disable
16:39:05  <CIA-53>node: history repeation for non-tty (debugger) - http://git.io/VyJp9w
16:39:40  <indutny>ryah: can you consider pulling round-5 fully
16:39:55  <indutny>I can open pull request if you wish
16:40:51  <ryah>indutny: can you link me?
16:41:08  <indutny>ryah: one sec
16:41:14  <indutny>ryah: http://github.com/indutny/node/tree/feature-debugger-round-5
16:41:35  <indutny>ryah: ah
16:41:35  <indutny>sorry
16:41:42  <indutny>ryah: we don't actually need this
16:41:45  <indutny>ryah: :D
16:41:49  <indutny>only isatty
16:41:56  <indutny>I'll create new branch later, nevermind
16:42:08  <ryah>indutny: k
16:44:20  <indutny>ryah: probably we can use windows messages for starting debugger?
16:44:32  <indutny>ryah: as fallback for SIGUSER1
16:44:44  <indutny>s/SIGUSER1/SIGUSR1
16:45:12  * pieternquit (Quit: pietern)
16:45:48  <ryah>indutny: i don't know. how does that work?
16:46:10  <indutny>ryah: http://msdn.microsoft.com/en-us/library/windows/desktop/ms644927(v=vs.85).aspx
16:46:24  <indutny>ryah: I don't know if that works for Console, actually
16:46:27  <indutny>ryah: but that's just a idea
16:46:46  <indutny>ryah: because I don't know any other way to notify already running program on windows
16:51:59  <ryah>indutny: there is also http://msdn.microsoft.com/en-us/library/ms683155(v=VS.85).aspx
16:52:56  <indutny>ryah: great, but what I just thought - is how will you get process handle/id on windows? is this info available in task manager?
16:55:03  <indutny>ryah: your API is definitely better
16:55:05  <indutny>btw
16:55:21  <indutny>I used to work with winapi 7 years ago :P
16:55:25  <indutny>but that was Delphi
16:55:33  <indutny>so I think that doesn't really count
16:56:04  * indutnyis going to eat something...
16:56:06  <indutny>brb
16:58:19  <CIA-53>node: Ryan Dahl new-tty-binding * r9f879ce / (src/node.js src/tty_wrap.cc): scope.Close in GuessHandleType; don't use uv_is_tty - http://git.io/pkgBzw
17:02:00  <CIA-53>libuv: Ryan Dahl master * r03d0c57 / (include/uv.h src/unix/tty.c src/win/tty.c test/test-tty.c): Remove uv_is_tty. Use uv_guess_handle instead. - http://git.io/htcaEQ
17:10:06  <ryah>piscisaureus_: i think everything is lined up for your tty branch
17:10:37  <ryah>we should be able to drop in - it's going to break the repl but then i think we can start adding the vt100 parsing
17:10:41  <ryah>and it will get better
17:15:52  * DrPizzaquit (Read error: Connection reset by peer)
17:17:46  * ericktjoined
17:19:19  <CIA-53>libuv: Ryan Dahl master * ree96a4c / (README.md README): Add link to docs - http://git.io/vB35zA
17:21:14  <CIA-53>libuv: Ryan Dahl master * rc226896 / README.md : Fix markdown headers in readme - http://git.io/HNMP_w
17:21:51  * brsonjoined
17:22:57  * ryahstarts on uv_ipc_t
17:26:18  <erickt>thanks to whomever committed my getaddrinfo commits :)
17:29:39  <ryah>erickt: thank you :)
17:31:24  <erickt>also, it looks like libuv is starting to turn into a platform abstraction library, rather than just a networking library. Since we're also using libuv in rust, is there a design doc somewhere on what's going to go in node and what will go in libuv?
17:32:13  <ryah>erickt: yes, it's the platform layer for node
17:32:14  * raggi_joined
17:32:20  <raggi_>sup
17:32:25  <ryah>raggi_: hi
17:32:30  <raggi_>hey, long time :)
17:32:35  <ryah>:)
17:32:59  <ryah>erickt: there's no design doc - just removing ifdefs from node and putting them here
17:33:03  <indutny>ryah: back
17:33:03  <raggi_>yeah, so i've been talking with a bunch of people, and i think there's some buy in in the ruby community for unification
17:33:12  <raggi_>(which would be awesome if it can be pulled off)
17:33:30  <raggi_>i wanna play with uv, as it looks great, especially as it's headed for iocp too
17:33:47  <raggi_>i like the api too :)
17:34:32  <raggi_>ryah: i'll do plenty of tests on my side as i get to that point, but do you know off hand what performance is like with stopping and starting the loop regularly?
17:34:48  <raggi_>(not creating new loops, just using the refcount to spin / not spin appropriately)
17:35:02  <raggi_>what i'm thinking is essentially replacing rb_thread_select, if you remember that old bean
17:36:03  <raggi_>i'm also trying to decide between single outboard reactor thread, or reactor thread per user thread
17:36:11  <erickt>ryah: Do you think it'll stay relatively lightweight, or do you think it'll ever add a big dependency like, oh, boost or webkit or something?
17:36:43  <raggi_>god, please dont' depend on boost :( (for anything)
17:37:53  <ryah>raggi_: not headed for iocp, it does it currently:)
17:38:00  <ryah>raggi_: quite well too
17:38:06  <raggi_>ryah: sweet, i hadn't looked if that was complete :D
17:38:36  <ryah>msft is doing a lot of performance testing and making sure it is on par with linux
17:38:42  <raggi_>ryah: btw, total aside, i was talking wiht lourens the other day, he's thinking about spinning up a new wrapper for zmq, i'm trying to persuade him to make a uv extension instead
17:38:43  <ryah>(which it is)
17:38:56  <raggi_>ryah: any interest in core contribs for that?
17:39:29  <ryah>erickt: it will not add a big dep like boost or webkit!
17:39:58  <ryah>erickt: but we have maybe a dozen platform calls left to move in.. i'll find you a list
17:40:26  <raggi_>ryah: yah, iocp can be pretty quick, although iirc you have to use a bunch of threads to get decent latency
17:40:30  <ryah>erickt: https://github.com/joyent/node/blob/372c208691e0fe8ea3f7a63f31b0a71c94706ade/src/platform.h
17:40:59  <ryah>raggi_: i don't remember what rb_thread_select does
17:41:27  <raggi_>ryah: it's the thread io scheduler, it's basically a central select loop that all ruby threads block on
17:41:40  <ryah>raggi_: contribs for what? zmq binding?
17:41:46  <raggi_>yes
17:42:02  <ryah>raggi_: it should stay external to libuv
17:42:02  <erickt>Thanks ryah
17:42:18  <raggi_>ryah: i thought so :)
17:42:25  <raggi_>just thought i'd ask
17:42:47  <ryah>raggi_: but we certainly are happy to add interfaces to make that binding possible
17:43:11  <ryah>especially if lourens does the work on windows
17:43:12  <raggi_>yep
17:43:26  <raggi_>that might be a harder sell, hehe
17:44:25  <raggi_>ryah: at the moment, i'm just wrapping stuff up at a pretty 1:1 level, exposing the uv api bound to sensible objects
17:44:47  <raggi_>ryah: i.e. a loop object, and connection objects, essentially wrapping each struct in a class
17:44:53  <raggi_>it's mapping quite well
17:45:23  <raggi_>i want to expose a sync api from it as well though, at least, to build one on top - this is where thoughts get a little more rocky
17:46:08  <ryah>if you do a sync api you should use coroutines to do it
17:46:13  <raggi_>the ref stuff makes batch style apis probably quite easy, but i havent' tested the performance of it yet, etc
17:47:08  <raggi_>ryah: why coroutines?
17:47:10  <ryah>we want more eyes on this library contributing bug fixes, it help us with node :)
17:47:19  <raggi_>yeah, that's what i'm thinking
17:47:40  <raggi_>i think you've done well to make this portable, there aren't really any alternatives for wrapping all this stuff up, so it seems like a great choice
17:48:37  <raggi_>ryah: at the moment, i'm thinking about just wrapping up the loop to an underlying thread io scheduler
17:49:21  <ryah>raggi_: i think you should use a single loop since you have the global interpreter lock in ruby
17:49:30  <ryah>multiple threads don't really help..
17:49:55  <ryah>(we have the same thing in v8)
17:49:57  <raggi_>ryah: so, the idea is, many threads may be blocked on io, all but one sleep, the one that doesnt' sleep cranks uv, if a sleeper is awoken, great, if the owner wakes, it'll hand over the loop repsonsibility
17:50:15  <raggi_>ryah: well, i can unblock the GIL in several implementations
17:50:23  <ryah>nothing in libuv blocks on io though
17:50:31  <raggi_>no, just the loop
17:50:57  <raggi_>it's also kinda tempting as i say, to just spawn a pthread and queue messages over
17:51:08  <ryah>hm
17:51:57  <ryah>not sure - im not so familiar with how ruby is working anymore. but my instinct is that it should be all one thread
17:52:00  <raggi_>where i want to go is to essentially replace the native socket.so, as well as provide a standard reactor style api, it's quite ambitious, but not at all impossible
17:56:46  <raggi_>ryah: nodes loop is basically a uv loop these days?
17:57:08  <raggi_>ryah: or is the v8 VM separated from uv via message queues?
18:03:38  <CIA-53>libuv: Ryan Dahl master * rf20297f / README.md : Add a list of features to readme - http://git.io/x24vOg
18:03:53  <ryah>raggi_: node loop = uv loop
18:04:04  <raggi_>makes sense :)
18:04:20  <raggi_>well, i'll finish the 1:1 wrapper, and then play around. i'll let you know
18:06:05  <ryah>raggi_: i added features to readme https://github.com/joyent/libuv/blob/f20297fffadff3918dd6896f0d525092ee6815c6/README.md
18:06:06  <raggi_>it's been *really* easy to implement so far, so good job
18:06:09  <indutny>ryah: can you please pull latest libuv into node?
18:06:28  <raggi_>ryah: you missed TCP ;)
18:06:56  <raggi_>ryah: do you use the thread pool scheduling anywhere in node?
18:07:05  <indutny>TCP is too hard to implement :P
18:07:15  <ryah>raggi_: using it for async zlib binding in node
18:07:21  <raggi_>aaah
18:07:28  <raggi_>so for outboard stuff
18:07:32  <raggi_>makes a lot of sense
18:10:38  <CIA-53>node: Ryan Dahl master * r94bedc6 / (12 files in 6 dirs): Upgrade libuv to f20297f - http://git.io/k0MVnQ
18:10:51  <ryah>^- indutny
18:10:56  <indutny>great
18:10:57  <indutny>thanks
18:12:34  <raggi_>ooh, you're heading for fork support, good stuff :)
18:13:10  <ryah>raggi_: yes, here's the API https://gist.github.com/1233593
18:14:18  <raggi_>hmm, interesting
18:14:58  <raggi_>so does ipc_init close all the shared fd's then you reopen after ipc_write ?
18:16:04  <ryah>raggi_: all fds are flagged CLOEXEC they must be explicitly sent to other processes
18:16:15  <raggi_>ah good deal
18:29:40  <CIA-53>libuv: Ryan Dahl master * r3ca382b / README.md : One more README cleanup' - http://git.io/mhzqng
18:42:16  * brsonquit (Quit: leaving)
18:49:37  <indutny>pquerna: ping
18:50:03  <indutny>ryah: http://github.com/indutny/node/tree/feature-debugger-round-6
18:50:12  <indutny>ryah: http://github.com/indutny/node/compare/master...feature-debugger-round-6
18:50:33  <indutny>oops
18:50:37  <indutny>sorry, updating branch
18:50:41  <indutny>not all commits were pushed
18:50:53  <indutny>ryah: updated
18:51:37  <indutny>oh, history messed
18:51:42  <indutny>wtf
18:51:57  <indutny>ok, fixed
18:52:02  <indutny>going to add #1707 fix
18:52:53  <indutny>so we got a simple test and some minor fixes
18:53:15  <indutny>ryah: if you don't mind - I'll work on .watch .unwatch now
18:53:51  <ryah>what's wrong with isTTY ?
18:54:33  <ryah>indutny: --^
18:54:47  <indutny>ryah: it's setup only for .stdout .stdin ?
18:54:48  <ryah>you're making extra syscalls with this
18:55:19  <indutny>ryah: but that allows me to use custom streams
18:55:22  <indutny>heh
18:55:32  <ryah>yeah - i'd rather save the syscall than support the questionable use-case of custom streams
18:55:47  <indutny>k, you persuaded me
18:56:38  <ryah>indutny: also the tty stream stuff is about to change
18:56:47  <ryah>indutny: so let's wait until then
18:56:59  <indutny>ryah: ok
18:57:06  <indutny>ryah: this branch will just hang up for awhile
18:57:17  <indutny>force pushing it w/o tty commits
18:57:50  <ryah>indutny: k
18:57:55  <indutny>pushed
18:58:25  <indutny>ryah: btw, I'm catching uncaughtException in test, because on exception 'exit' isn't called
18:58:33  <indutny>it's actually called only on process.exit() call
18:58:49  <indutny>but child needs to be killed anyway
19:03:22  <CIA-53>node: Ben Leslie master * ra4e10cd / lib/module.js : (log message trimmed)
19:03:22  <CIA-53>node: Raise an error when a malformed package.json file is found.
19:03:22  <CIA-53>node: The current behaviour will silently ignore any parsing errors
19:03:22  <CIA-53>node: that may occur when loading a package.json file. This makes
19:03:23  <CIA-53>node: debugging errors in the package.json file very difficult.
19:03:23  <CIA-53>node: This changes the behaviour that that errors opening and reading
19:03:24  <CIA-53>node: the file package.json file continue to be ignored, but errors
19:07:31  <ryah>indutny: is that a node bug?
19:07:41  <ryah>indutny: we should fix that...
19:12:25  <indutny>ryah: probably
19:13:40  <indutny>ryah: https://github.com/joyent/node/blob/master/src/node.js#L301
19:15:45  <indutny>ryah: btw, if I'll kill child_process, it won't receive 'exit'
19:17:31  <indutny>ryah: ok, I think I'll write a patch for it, right now
19:23:47  * DrPizzajoined
19:26:09  <ryah>piscisaureus_: what's your libuv php thing?
19:34:22  <indutny>ryah: https://github.com/joyent/node/pull/1760
19:34:44  <indutny>ryah: will on_exit builds on windows?
19:35:04  <indutny>ah, looks like no
19:35:23  <indutny>ryah: you're much more specialist in C++, what function should I choose to get exit code?
19:40:31  <indutny>oh, looks like windows has no analog of that
19:43:37  <indutny>ryah: any ideas?
19:43:50  <indutny>ryah: I can do #define exit ...
19:46:16  <indutny>but I'm not sure if it'll work with v8 and etc
19:46:58  <ryah>indutny: hm...
19:47:11  <ryah>indutny: in what situation are you exiting?
19:47:20  <ryah>or need the exit event?
19:47:29  <indutny>ryah: throw Error('123')
19:47:37  <indutny>ryah: uncaughtException, actually
19:47:44  <indutny>I added test
19:47:46  <ryah>why do you need that
19:48:05  <ryah>it's just that - i haven't needed that in the past couple years
19:48:10  <ryah>so im hesitant to add it
19:49:38  <indutny>ryah: for example
19:49:43  <indutny>ryah: from real world
19:50:07  <indutny>ryah: I'm running `node debug lib/fs.js` as child process, and it runs `node --debug-brk lib/fs.js` as sub-child process
19:50:23  <indutny>ryah: when killing parent process for `node debug ...`, sub-child won't be killed
19:50:34  <indutny>ryah: because child is waiting for `exit` event
19:51:23  <indutny>ryah: (btw, updated pull request with win support, and V8::IsDead() check)
19:52:38  <ryah>hm
19:52:43  <indutny>ryah: does this makes sense?
19:52:52  <ryah>why would the grandchild die?
19:53:04  <indutny>ryah: because it should die when his parent becomes dead
19:53:31  <indutny>https://github.com/joyent/node/blob/master/lib/_debugger.js#L716-718
19:56:05  <indutny>ryah: I think most of process.on('exit', ...) users expect that it will work this way
19:57:17  <ryah>indutny: hm
19:57:36  <ryah>indutny: i think grandfather should HUP father and father should HUP child
19:57:57  <ryah>since none have handlers for SIGHUP they all die
19:58:52  <indutny>ryah: that's very uncomfortable for writing debugger tests
19:59:16  <indutny>ryah: I even implemented new `quit` command for debugger, and trying to send it before test's process will die
19:59:30  <indutny>ryah: from that experience I'm assuming that this may be useful
19:59:36  <ryah>indutny: maybe i just dont understand the situation
20:00:00  <ryah>what are you doing in the on('exit') ?
20:00:36  <indutny>ryah: https://github.com/joyent/node/blob/master/test/simple/test-debugger-repl.js#L138-155
20:00:40  <indutny>ryah: where?
20:00:45  <indutny>ryah: inside debugger, or test?
20:01:49  * brsonjoined
20:03:49  <indutny>ryah: why not provide that information to script?
20:04:54  <ryah>because 'exit' is not meant as a place to perform i/o
20:05:05  <ryah>why do you need to tell the parent "quit" ?
20:05:21  <ryah>er- child
20:05:26  <ryah>just kill it
20:05:29  <ryah>or just exit
20:05:32  <ryah>it'll die
20:06:11  <indutny>ryah: I can't kill it, because I need to notify child process
20:06:21  <indutny>ryah: and only then child process will notify sub-child process
20:06:37  <indutny>child process won't receive 'exit' event
20:06:53  <indutny>maybe better add 'killed' event?
20:07:03  <indutny>and emit it only if code != 0 ?
20:07:24  <indutny>or anyway emit it
20:07:29  <ryah>:/
20:07:49  <ryah>indutny: why deos the child need to be notified?
20:07:59  <ryah>indutny: it'll be SIGHUP'd
20:08:02  <indutny>ryah: because it needs to kill sub-child on it's 'exit'
20:08:06  <indutny>ryah: will it?
20:08:15  <ryah>try
20:09:44  <indutny>ryah: oh, that's not interesting :)
20:09:53  <indutny>ryah: but what if parent process will die?
20:09:59  <indutny>w/o SIGHUP
20:10:06  <indutny>like killed by `killall node`
20:11:06  * dmkbotquit (Remote host closed the connection)
20:11:18  <indutny>indutny: it's not obvious that after child.kill() child process won't receive 'exit' event
20:13:10  * dmkbotjoined
20:15:56  <ryah>indutny: hm
20:16:12  <ryah>indutny: okay -but can we consider this as a spearate issue
20:16:22  <ryah>indutny: you don't need it for this test - right?
20:17:07  <indutny>ryah: right, but I can't remove uncaughtException handler from test, before it gets merged
20:17:30  <indutny>ryah: this is really a separate issue, not rellated to debugger, nor anything I worked on
20:18:04  <indutny>ryah: I think I need to post message on mailing list to convince you ;)
20:18:05  <indutny>:P
20:18:18  <indutny>I'm sure community won't be against that change
20:19:10  <ryah>indutny: i just want to understand why this is needed
20:19:27  <ryah>the 'exit' handler has very specific use-cases
20:19:33  <ryah>basically only to do asserts
20:20:01  <indutny>ryah: I talked to indexzero, he thinks it's useful too
20:20:37  <indutny>"(03:19:43 AM) Charlie Robbins: yes, I think that is useful
20:20:37  <indutny>(03:19:57 AM) Charlie Robbins: it's important to have a universal exit event
20:20:37  <indutny>(03:20:03 AM) Charlie Robbins: that is called on uncaughtException or not
20:20:37  <indutny>(03:20:15 AM) Charlie Robbins: you may not be handling SIGINT"
20:21:01  <indutny>ryah: I'm sure that most of people will agree with that
20:21:08  <indutny>probably we should use other event
20:21:16  <indutny>but having one unified event for all cases is good
20:21:27  <indutny>especially because it's handling some cases that other's don't
20:21:47  <ryah>the problem is that if we give people tools, then they start abusing :)
20:21:53  <indutny>hahahahaha
20:21:58  <ryah>we basically don't want people to have exit handlers
20:22:01  <indutny>that's what tools are supposed to be created for
20:22:07  <indutny>ryah: why not?
20:22:11  <indutny>:)
20:22:13  <ryah>there is no chance to enter the event loop again
20:22:19  <ryah>so things behave strange
20:23:18  <indutny>aarrgh :)
20:23:22  <indutny>how can I convince you?
20:23:30  <ryah>indutny: im playing with the debugger test now
20:23:34  <ryah>to see how it is.
20:23:41  <indutny>heh
20:23:44  <indutny>:)
20:24:25  <ryah>i think this is related to another bug
20:27:12  <indutny>ryah: what bug?
20:28:00  <ryah>#1726
20:28:37  <ryah>you shouldn't need to explicitly kill the grandchild
20:29:14  <indutny>one sec
20:29:57  <indutny>ryah: that's not it
20:30:07  <indutny>ryah: because processes are running and nothing gets freezed
20:30:21  <indutny>ryah: just ps aux | grep node reports two hanging processes
20:30:37  <ryah>i see that
20:31:16  <indutny>ryah: https://github.com/joyent/node/pull/1760 see, people a commenting ;)
20:31:30  <indutny>I agree with thejh's point, actually
20:35:02  <ryah>indutny: you want this merged? https://github.com/indutny/node/commits/feature-debugger-round-6
20:35:31  <indutny>ryah: would be good
20:36:44  * mralephjoined
20:41:21  * indutnyis going to take a shower, brb in 30 minutes and then sleep some hours
20:43:40  <CIA-53>node: Fedor Indutny master * r2010071 / (lib/_debugger.js lib/repl.js): readline: custom streams support - http://git.io/QSb4jA
20:43:40  <CIA-53>node: Fedor Indutny master * r78d91ff / lib/_debugger.js : don't use global vars - http://git.io/3Em7jQ
20:43:40  <CIA-53>node: Fedor Indutny master * re406613 / (2 files in 2 dirs): test-debugger-repl improvements - http://git.io/AQTCvg
20:43:41  <CIA-53>node: Fedor Indutny master * r39fec60 / (lib/_debugger.js test/simple/test-debugger-repl.js):
20:43:42  <CIA-53>node: debugger: remove useless clearlines, updated test
20:43:42  <CIA-53>node: * remove useless clearline call at Interface start
20:43:42  <CIA-53>node: * silence after .handleBreak()
20:43:42  <CIA-53>node: * output '\b' if this.stdout is not a tty (debugger)
20:43:43  <CIA-53>node: * add '\b' checks for clearline (test) - http://git.io/iS5YSA
20:43:43  <CIA-53>node: Fedor Indutny master * r43cb4ec / lib/_debugger.js : debugger fix for #1707 - http://git.io/7Z8KLA
20:43:49  <indutny>great!
20:44:38  <indutny>ryah: thank you
20:44:53  <ryah>indutny: no, thank you
20:45:34  <ryah>let's talk about the on('exit') stuff with bnoordhuis
20:45:42  <ryah>see what he thinks
21:01:14  <indutny>back
21:01:33  <indutny>ryah: ok, but I'm going to sleep right now
21:01:43  <indutny>so I'll read your conversation tomorrow
21:02:09  <indutny>ryah: consider having flags or different event name as pointed there https://github.com/joyent/node/pull/1760
21:04:32  <indutny>ttyl
21:04:36  <ryah>indutny: later
21:04:40  <ryah>indutny: thanks
21:18:17  * felixgejoined
21:18:17  * felixgequit (Changing host)
21:18:17  * felixgejoined
21:20:40  * ericktquit (Read error: Connection reset by peer)
21:20:41  * erickt_joined
21:29:25  <piscisaureus_>ryah: the php-uv thing is still in pre-prototype stage
21:51:47  <ryah>piscisaureus_: i just wanted links :)
22:04:30  * felixgequit (Ping timeout: 255 seconds)
22:08:59  * bnoordhuisjoined
22:09:49  <ryah>piscisaureus_: what if we build the uv_ipc_t into uv_process_t ?
22:10:03  <ryah>piscisaureus_: it's not like it's going to be a ton of stuff?
22:10:43  <piscisaureus_>ryah: probably not - just uv_pipe_t plus some parser state
22:10:47  <piscisaureus_>we could do that, yeah
22:10:53  * felixgejoined
22:10:53  * felixgequit (Changing host)
22:10:53  * felixgejoined
22:11:02  <piscisaureus_>we could also build a copy into uv_loop_t if you want
22:11:10  <ryah>hm
22:11:14  <piscisaureus_>although a process can only access the channel from one loop
22:11:22  <ryah>im just trying to think about how this will bind into node
22:11:53  <piscisaureus_>ryah: it makes tracking down the close event in libuv a bit difficult though
22:12:01  <ryah>can we not reuse uv_pipe_t somehow?
22:12:13  <ryah>instead of making a new stream
22:12:23  <ryah>i'd really love to use src/pipe_wrap.cc
22:12:31  <ryah>it's like there and working...
22:13:06  <piscisaureus_>maybe we can subclass uv_pipe?
22:13:10  <ryah>i mean - on my end - i think it's pretty easy to use uv_pipe_t...
22:14:12  <ryah>you know, reading in new handles from the child - it's pretty much like accepting connections
22:15:02  <ryah>what if we don't allow data to be transfered over the channel
22:15:12  <ryah>but instead only handles
22:15:16  <ryah>would that simplify this?
22:15:23  <piscisaureus_>hmm
22:15:29  <piscisaureus_>I don't actually think so
22:15:43  <piscisaureus_>but I am worried that it also makes the pipe much less useful
22:17:13  <ryah>hm...
22:17:24  <ryah>i just don't like how much API we have to add for this uv_ipc_t
22:17:30  <ryah>also...
22:17:44  <ryah>when you set the options.channel thing
22:17:56  <ryah>should the uv_ipc_t be initialized or not?
22:18:00  <ryah>(in the parent)
22:18:21  <piscisaureus_>I don't care much - but maybe for api consistency it would be good.
22:19:43  * felixgequit (Quit: felixge)
22:25:24  <piscisaureus_>Maybe we can have uv_stream_t anyhow
22:25:32  <piscisaureus_>or StreamWrap
22:25:56  <piscisaureus_>It seems that the current tcp and pipe wraps could also be merged for the better part
22:30:28  <ryah>yes
22:38:42  <piscisaureus_>Is it common to have alt+a -> "\x033a"
22:38:44  <piscisaureus_>?
22:44:13  * dmkbotquit (Remote host closed the connection)
22:44:19  * dmkbotjoined
22:51:57  <ryah>piscisaureus_: not sure.. i can't do alt on mac
22:52:23  <ryah>"\u001b\u0001"
22:52:25  <ryah>^-- maybe
22:53:15  <piscisaureus_>ryah: I was wondering because of https://github.com/joyent/node/blob/master/lib/tty_posix.js#L180-184
22:53:26  <piscisaureus_>cygwin's vt100 parser seems to suggest the same
23:15:05  <ryah>uv_write_handle(uv_write_t*, uv_pipe_t*, uv_tcp_t* handle, uv_buf_t data, uv_write_cb cb);
23:40:11  * ryahquit (Quit: leaving)
23:40:19  * ryahjoined
23:44:13  * brsonquit (Ping timeout: 260 seconds)
23:51:37  * brsonjoined
23:54:44  <ryah>piscisaureus_: https://gist.github.com/1238738
23:55:08  <ryah>piscisaureus_: use stdin + uv_read2_start + uv_write2
23:55:58  <piscisaureus_>ryah: so how again does libuv know that stdin is controlled by a process that layers a special protocol on top?
23:56:56  <piscisaureus_>ryah: also I am interested how we are going to do the message stream in fork()
23:57:27  <piscisaureus_>I like the smaller api surface though