00:00:05  <dmkbot>joyent/node: rwky: Ubuntu package in ppa don't contain node-waf - https://github.com/joyent/node/issues/1653
00:05:04  <ryah>piscisaureus_: LGTM
00:08:06  <piscisaureus_>ryah: thnx
00:10:37  <CIA-52>node: Bert Belder master * rd01b87d / vcbuild.bat : win: vcbuild.bat should attempt to run vcvarsall.bat - http://git.io/T8uqZg
00:10:37  <CIA-52>node: Bert Belder master * rae2ac4f / node.gyp : gyp: add js files to node project - http://git.io/bKiSZQ
00:10:37  <CIA-52>node: Bert Belder master * re20d0c1 / (3 files in 3 dirs):
00:10:37  <CIA-52>node: net-uv: correctly set socket.remoteAddress and -port
00:10:37  <CIA-52>node: closes #1345 - http://git.io/uKeirw
00:13:14  <CIA-52>libuv: Ryan Dahl master * rb6ede6c / src/unix/fs.c :
00:13:14  <CIA-52>libuv: unix: uv_fs_readdir sync skips . and ..
00:13:14  <CIA-52>libuv: Fixes test fs_async_dir - http://git.io/djIAuQ
00:14:19  <ryah>herbal sunday afternoon drugs = good patches for node
00:17:30  <CIA-52>node: Ryan Dahl master * r01bf209 / (deps/uv/src/unix/fs.c deps/uv/test/test-fs.c):
00:17:30  <CIA-52>node: Upgrade libuv to b6ede6c
00:17:30  <CIA-52>node: Fixes require('fs').readdirSync on unix. - http://git.io/ThGVIQ
00:23:36  * ryahtopic: osx https://gist.github.com/1193768 | windows https://gist.github.com/1190244 | v0.5.6
00:23:39  <ryah> issues https://github.com/joyent/node/issues?state=open&milestone=2
00:27:59  <ryah>you know - almost every time i actually use classes in C++ i end up regretting it
00:28:10  <ryah>somehow all that power drives one mad...
00:28:50  <DrPizza>lol
00:28:54  <DrPizza>you have to be judicious
00:28:59  <DrPizza>but I think it's still worthwhile overall
00:29:19  <DrPizza>kind of bugs me that uv is just C
00:29:38  <DrPizza>there are a few things that could be made a little easier for users and developers alike if we had constructors and classes
00:31:07  <ryah>yeah...
00:31:37  <ryah>on a side note
00:31:46  <ryah>i want to start having uv_tcp_close(), uv_pipe_close()
00:31:53  <ryah>instead of casting and using uv_close()
00:44:04  <piscisaureus_>ghe
00:44:09  <piscisaureus_>yes, but that can wait
00:49:22  <ryah>yeah :)
00:55:59  * isaacsjoined
01:06:04  <dmkbot>joyent/libuv: ry: windows: need uv_fs_t.path implementation - https://github.com/joyent/libuv/issues/177
01:06:20  <CIA-52>libuv: Ryan Dahl master * ra18860a / (include/uv.h src/unix/fs.c test/test-fs.c):
01:06:20  <CIA-52>libuv: Add uv_fs_t.path on unix and tests
01:06:20  <CIA-52>libuv: Windows implementation missing https://github.com/joyent/libuv/issues/177 - http://git.io/P90Pbw
01:06:54  <DrPizza>what is uv_fs_t.path?
01:07:19  <dmkbot>joyent/libuv: ry: windows: need uv_fs_t.path implementation - https://github.com/joyent/libuv/issues/177
01:08:20  <piscisaureus_>hmm. windows/udp calls recv_cb after close_cb
01:08:22  <ryah>it's a pointer to the path of the file being operated on
01:08:23  <piscisaureus_>*wrong*
01:12:30  <piscisaureus_>hmm. not really
01:12:48  <bnoordhuis>piscisaureus_: that's the right behaviour
01:12:56  <piscisaureus_>ryah: it is okay for uv to call callbacks in after uv_close() but before the close_cb is made
01:13:01  <piscisaureus_>right?
01:13:19  <dmkbot>joyent/libuv: ry: windows: need uv_fs_t.path implementation - https://github.com/joyent/libuv/issues/177
01:13:21  <piscisaureus_>bnoordhuis: that's not okay - *after* the close_cb there should be no more callbacks
01:13:35  <ryah>piscisaureus_: yes
01:13:51  <piscisaureus_>in that case, udp_wrap is wrong
01:13:53  <piscisaureus_>I will fix this
01:14:06  <ryah>after uv_close() and before uv_close_cb is okay
01:14:19  <ryah>(we should document this behavior!)
01:19:58  * dmkbotquit (Remote host closed the connection)
01:20:17  * dmkbotjoined
01:20:47  <DrPizza>yeah is there any kind of a diagram that shows the different states and callbacks
01:20:48  <piscisaureus_>bnoordhuis: https://github.com/piscisaureus/node/commit/oOo
01:20:52  <piscisaureus_>^-- please review
01:21:24  <piscisaureus_>hmm
01:21:51  <piscisaureus_>bnoordhuis: sorry - shit
01:22:22  <bnoordhuis>piscisaureus_: set.emit?
01:25:27  <piscisaureus_>bnoordhuis: sorry. please review https://github.com/piscisaureus/node/commit/6b040fa1d0177412d1c3
01:28:15  <bnoordhuis>piscisaureus_: left a comment
01:29:30  <piscisaureus_>ok
01:30:35  <CIA-52>node: Bert Belder master * rb5d58f1 / lib/dgram_uv.js :
01:30:35  <CIA-52>node: dgram-uv: black hole incoming messages after closing
01:30:35  <CIA-52>node: Fixes test/simple/test-dgram-pingpong.js on windows - http://git.io/Nm-oQA
01:32:03  <piscisaureus_>I feel like checking out
01:32:10  <piscisaureus_>unless there's something easy left to fix
01:32:29  <ryah>piscisaureus_: https://github.com/joyent/libuv/blob/a18860aec6416e4e6a9540471c61e9a497f55703/test/test-fs.c#L243-244
01:32:34  <ryah>piscisaureus_: this would be easy
01:32:36  <ryah>and helpful
01:33:02  <ryah>well might be easy
01:33:24  <ryah>might be hard...
01:34:25  <ryah>yeah shouldn't be bad.
01:34:44  <ryah>i'll do it actually :)
01:35:12  <piscisaureus_>ryah: you may wanna land drpizza's open() patch first
01:35:39  <piscisaureus_>ryah: https://github.com/DrPizza/libuv/commit/b4e2d4411d3f11f7fa748c37e2ac3a5f7baa24c7
01:36:49  <ryah>ok
01:37:35  <piscisaureus_>ryah: it looks good to me except for net setting errno when returning -1
01:37:41  <piscisaureus_>and some style issues
01:37:52  <piscisaureus_>s/net/not/
01:38:56  <CIA-52>libuv: Peter Bright master * re1af07e / src/win/fs.c :
01:38:56  <CIA-52>libuv: Open files with sharing enabled. Fixes node's issue #1449.
01:38:56  <CIA-52>libuv: https://github.com/joyent/node/issues/1449 - http://git.io/8jEQ7A
01:38:56  <CIA-52>libuv: Ryan Dahl master * rbe3b378 / src/win/fs.c : win: initialize req.path = NULL. - http://git.io/yBjhbg
01:46:11  <CIA-52>libuv: Ryan Dahl master * r991f6ee / src/unix/fs.c :
01:46:11  <CIA-52>libuv: unix: Set req->result to -1 on async uv_fs_readdir error
01:46:11  <CIA-52>libuv: fixes test/simple/test-fs-error-messages.js in node. - http://git.io/Njyhsg
01:48:42  <CIA-52>node: Ryan Dahl master * r7272dbd / (4 files in 4 dirs): Upgrade libuv to 991f6ee - http://git.io/8dIKkQ
01:48:42  <CIA-52>node: Ryan Dahl master * rf5e486e / (deps/uv/src/unix/fs.c src/node_file.cc): Fix test-fs-error-messages.js - http://git.io/HqQ9rQ
01:50:54  <ryah>[01:32|% 100|+ 240|- 14]: Done <-- OSX
01:51:34  <ryah>https://gist.github.com/1193882
01:58:27  <piscisaureus_>nice
02:22:52  <piscisaureus_>I'm replacing crt read/write by winapi calls
02:22:56  <piscisaureus_>to avoid cr/lf conversion
02:23:03  <piscisaureus_>and improve prwrite efficiency
02:24:49  * bnoordhuisquit (Ping timeout: 240 seconds)
02:26:37  <DrPizza>we could just force files to open in binary mode
02:27:43  <piscisaureus_>yes, that too
02:27:47  <piscisaureus_>this is better
02:27:59  <piscisaureus_>forward faster
02:28:07  <piscisaureus_>you may review my patch soon
02:33:21  <CIA-52>libuv: Bert Belder win32rw * rc188843 / (src/uv-common.h src/win/fs.c): win: use win32 api for file reading and writing - http://git.io/2iTYIg
02:33:31  <piscisaureus_>windows fails: [08:33|% 100|+ 214|- 40]: Done
02:33:44  <piscisaureus_>drpizza: ^-- patch
02:34:02  <piscisaureus_>meh
02:34:08  <piscisaureus_>INT_MAX not on mingw
02:35:06  <piscisaureus_>or limits.h not included heh
02:36:04  <CIA-52>libuv: Bert Belder win32rw * r013d2a1 / (src/uv-common.h src/win/fs.c): win: use win32 api for file reading and writing - http://git.io/oXTn1Q
02:36:07  <piscisaureus_>^-- updated
02:36:21  <DrPizza>what are you setting overlapped ptr for?
02:36:36  <piscisaureus_>DrPizza: reading at a specific position
02:36:40  <piscisaureus_>e.g. pread on windows
02:36:52  <DrPizza>that works?
02:36:55  <piscisaureus_>DrPizza: sure
02:37:05  <piscisaureus_>It's even documented
02:37:14  <DrPizza>well that's handy
02:37:40  <piscisaureus_>DrPizza: see ReadFile on msdn, "Synchronization and File Position" section
02:37:59  <piscisaureus_>or rather "Considerations for working with synchronous file handles:"
02:38:48  <DrPizza>no I believe you
02:38:51  <piscisaureus_>DrPizza: if you think it's correct gimme a signoff
02:39:40  <DrPizza>it looks good but I don't think we can ignore text/binary conversion
02:41:00  <piscisaureus_>sure we can
02:41:10  <piscisaureus_>but if people need it we can give them text conversion
02:42:55  <piscisaureus_>drpizza: look at crt's read to see how painful that conversion is
02:44:18  <CIA-52>node: Ryan Dahl master * r39ea274 / (src/node_file.cc src/req_wrap.h): Return ReqWrap from internal fs functions - http://git.io/cXgEDQ
02:44:50  <piscisaureus_>drpizza: also, I think if anywhere we should integrate the text/binary conversion into node's charset conversion routines
02:45:46  <DrPizza>hmm possibly
02:45:50  <ryah>:/
02:45:55  <DrPizza>piscisaureus_: does that exist?
02:46:01  <DrPizza>or is it something that needs to exist
02:46:08  <ryah>libuv should operate with binary only
02:47:29  <ryah>node's charset conversion stuff is very limited and not something that should be done at the system level
02:49:47  <CIA-52>node: Ryan Dahl master * rfcfec07 / src/node_file.cc : internal fs functions called with this == ReqWrap - http://git.io/rxKC4Q
02:54:29  <DrPizza>piscisaureus_: well it looks ok
02:54:37  <DrPizza>but I still think that we should have the conversion somewhere
02:57:07  <ryah>DrPizza: why?
02:57:41  <DrPizza>ryah: it's all part of being a good citizen on windows.
02:57:44  <DrPizza>anyone writing text-like data
02:57:47  <DrPizza>such as log files
02:57:52  <DrPizza>should be writing it with windows line-endings
02:57:56  <DrPizza>so that you can open it with notepad
02:58:04  <isaacs>DrPizza: yeah, i'm running into this with npm right now
02:58:08  <isaacs>have to do a lot of eol juggling
02:58:26  <ryah>isaacs: what exactly?
02:58:35  <ryah>which files
02:58:42  <isaacs>ryah: choosing \n or \r\n when i open up files in an editor
02:58:44  <isaacs>ryah: npm config edit
02:58:55  <isaacs>ryah: the npm-debug.log file, etc.
02:59:20  <ryah>what does npm config edit do?
02:59:35  <isaacs>ryah: lets you edit your config settings in vim
02:59:39  <isaacs>it's nice :)
02:59:42  <isaacs>i use it a lot
03:00:08  <ryah>what does that have to do with line ending?
03:00:31  <ryah>this is the editors problem not npm's or node's
03:00:35  <isaacs>well, when i open up the file with notepad, if i don't write it out with \r\n instead of \n, you can't actually edit it
03:00:40  <isaacs>ryah: sure, i agree.
03:00:43  <piscisaureus_>notepad just sucks
03:00:53  <isaacs>ryah: but it's a problem that a lot of editors on windows have.
03:00:58  <piscisaureus_>any reasonable editor supports \n
03:01:04  <isaacs>piscisaureus_: true that
03:01:11  <isaacs>piscisaureus_: but windows doesn't come with reasonable editors by default
03:01:24  <piscisaureus_>no because it comes only with notepad
03:01:50  <isaacs>and any editor on windows needs to handle \r\n line endings.
03:01:55  <ryah>i dont care that windows editors suck
03:01:59  <isaacs>k :)
03:02:03  <ryah>node and npm should not deal with this problem
03:02:11  <DrPizza>they should
03:02:19  <isaacs>i'm not really suggesting that node do much differently. i've already got it working how i want it in npm
03:02:19  <DrPizza>any windows editor will create \r\n files by default
03:02:32  <isaacs>node should not blow up in the face of \r\n line endings, though
03:02:37  <isaacs>you should be able to write a server.js in notepad
03:02:42  <ryah>npm should certainly undersatnd a file with \n line endings
03:02:45  <ryah>or \r\n
03:02:52  <isaacs>yeah
03:03:12  <isaacs>does node have problems with \r\n line endings now for js files?
03:03:19  <isaacs>i think v8 handles that fine, right?
03:03:40  <ryah>yes
03:03:53  * isaacsnot sure what the issue is, then...
03:04:08  <DrPizza>isaacs: I/O is node, not V8
03:04:13  <DrPizza>v8 is just parsing javascript
03:04:26  <isaacs>right, but it's not like node converts \n to \r\n on posix raw sockets
03:04:33  <isaacs>(or does it now?)
03:04:45  <ryah>Look. Node will only read and write binary data
03:05:00  <ryah>this conversion of line endings is insanity
03:05:28  <isaacs>ryah: does node s/\n/\r\n/ on posix raw sockets now?
03:05:36  <ryah>no
03:05:43  <isaacs>oh, o
03:05:44  <isaacs>ok
03:05:49  <isaacs>yeah, ryah++ then
03:06:04  <DrPizza>it may be insanity
03:06:12  <DrPizza>but it should still be done
03:06:17  <isaacs>npm does this because it has a lot of fancy logging and crap. wilson or whatever other logging programs people use should do this on their own
03:06:27  <ryah>the two editors i've tried on windows work fine with both line endings
03:06:27  <DrPizza>otherwise anyone who does logging or config files will need to do it by hand
03:06:28  <isaacs>var eol = process.platform === "win32" ? "\r\n" : "\n"
03:06:30  <ryah>i dont see the problem
03:06:45  <DrPizza>ryah: use notepad then, the editor that ships with windows
03:07:00  <ryah>never tried it
03:07:43  <isaacs>DrPizza: i'm ok with doing it by hand.
03:08:00  <ryah>i guess the windows team should spend apprixmately 2 hours and make nodepad understand the line endings that many files end in
03:08:10  <isaacs>hahahah
03:08:16  <DrPizza>notepad is just a wrapper around the edit control, it's designed to be retarded
03:09:07  <isaacs>DrPizza: no excuse. the edit cli program understands \n line endings
03:09:13  <isaacs>notepad is *extra* retarded
03:09:27  <piscisaureus_>isaacs: you still have cli edit?
03:09:29  <DrPizza>C:\Users\DrPizza>edit
03:09:29  <DrPizza>'edit' is not recognized as an internal or external command,
03:09:29  <DrPizza>operable program or batch file.
03:09:34  <DrPizza>run 64-bit
03:09:38  <DrPizza>no edit
03:09:52  <isaacs>oh, i'm just using the default cmd with whatever version fo windows ryah told me to get
03:10:00  <piscisaureus_>DrPizza: the type command then :-)
03:10:05  <piscisaureus_>or `more`
03:10:15  <DrPizza>not so goo dfor editing
03:10:21  <isaacs>i've tried to customize it as little as possible. even using cmd rather than msys bash
03:10:44  <piscisaureus_>isaacs: that's good. I don't want to force-feed msys to users
03:10:44  <isaacs>if we're going to process streams and do magic, it should be to support ansi color codes
03:10:58  <ryah>it will
03:10:59  <piscisaureus_>oh noooooooos
03:11:04  <isaacs>yeeeeesssss!!!
03:11:06  <piscisaureus_>oh shit I agreed to that
03:11:27  <piscisaureus_>general retardation hits sf
03:11:46  <ryah>you mean sanity
03:11:57  <piscisaureus_>we should bomb that city before it spreads
03:12:04  <DrPizza>if we're going to od that processing
03:12:08  <DrPizza>line-ending conversion is nothing in comparison
03:12:20  <isaacs>DrPizza: exactly, it's nothing. not worth doing.
03:12:28  <DrPizza>totally worth doing
03:12:49  <isaacs>DrPizza: ansi codes are super easy ways to add color, and lots of node programs already use them. \r\n eol is easy to do by hand, and usually doesn't matter anyway.
03:13:12  <DrPizza>\r\n is annoying to do by hand
03:13:20  <DrPizza>and honestly, it would be nice to have line-oriented file I/O
03:13:25  <DrPizza>isaacs: the issueisn't writing
03:13:27  <DrPizza>it's reading
03:13:34  <DrPizza>ensuring that if you read a \r at the end of one block
03:13:37  <ryah>DrPizza: line-ending will require adding API to node - which is not allowed
03:13:40  <DrPizza>and then get an \n at the beginning of the nnext
03:13:47  <isaacs>DrPizza: userland
03:13:49  <DrPizza>that you do the right thing
03:14:03  <isaacs>DrPizza: there's already line-buffering stream libs. they just need to strip off \r at the end of the lines
03:14:10  <isaacs>it's easy
03:14:41  <isaacs>things should just be opaque streams of bytes as far as node's concerned. except for sending ansi codes to a tty.
03:14:56  <piscisaureus_>or just string.split(/\r?\n/), how hard is that :-/
03:15:15  <isaacs>piscisaureus_: not hard at all, unless you actually *want* to send a \r at the end of a line on posix
03:15:44  <piscisaureus_>isaacs: shh. I am on your side
03:15:48  <DrPizza>lol
03:15:52  <isaacs>hahaha
03:18:04  <ryah>i hope everyone noticed how i secretly just reintroduced promises :)
03:18:13  <isaacs>ryah: lol
03:18:16  <isaacs>ryah: just don't call them promises
03:18:27  <ryah>https://github.com/joyent/node/commit/fcfec075e3201d5ed0dbfa3b6571d0ca9b5702d0
03:18:29  <ryah>:)
03:18:31  <piscisaureus_>ryah: it's okay
03:18:43  <piscisaureus_>those promises don't do anything anyway :-)
03:18:43  <ryah>i need them for domains
03:19:03  <piscisaureus_>when will you finish domains?
03:19:22  <isaacs>ryah: it'll be nice to be able to tear down requests.
03:19:26  <ryah>i hope to have a demo tonight
03:19:27  <piscisaureus_>ryah: btw, wrt to ev_walk
03:19:33  <piscisaureus_>we should do that in the binding layer
03:19:38  <isaacs>ryah: run into a few situations recently where i've wanted that badly.
03:19:50  <isaacs>with a certain "enterprise grade" piece of software.
03:19:51  <DrPizza>promises like futures?
03:20:04  <ryah>DrPizza: yeah
03:20:14  <DrPizza>why would anybody object to them?
03:20:15  <isaacs>it's not like futures.
03:20:17  <piscisaureus_>isaacs: meh, take your secres stuff offline
03:20:22  <piscisaureus_>*secret
03:20:40  <isaacs>ryah: i mean, you can't .wait() on them, right?
03:20:48  <isaacs>ryah: or yield/defer/etc
03:21:15  <ryah>isaacs: no but you can domain.on("exit", function() {})
03:21:24  <isaacs>oh, well, that's fine
03:21:28  <isaacs>that's still just an event emitter
03:22:04  <ryah>DrPizza: node has a bloody history with promises
03:22:13  <ryah>DrPizza: there were many battles
03:22:15  <DrPizza>lol
03:22:17  <DrPizza>how come
03:22:30  <ryah>mostly because i removed them suddenly one day
03:22:32  <piscisaureus_>promises == ideal bikeshed territory
03:22:42  <isaacs>like an airplane on a treadmill, those promise discussions were going nowhere.
03:23:25  <DrPizza>isaacs: trollin'
03:23:41  <piscisaureus_>isaacs: under that argument, we should remove url.parse
03:23:42  <isaacs>;)
03:23:46  <piscisaureus_>and the module system
03:23:46  <isaacs>hahah
03:23:59  <isaacs>piscisaureus_: nono, this was something that actually was broken, and no one could agree on how to fix it.
03:24:13  <isaacs>not just a situation where a few lone wackjobs took it upon themselves to get irate.
03:24:25  <isaacs>(though there were plenty of wackjobs involved)
03:24:33  <piscisaureus_>I think we should also remove callbacks btw
03:24:40  <piscisaureus_>but anyway
03:24:43  <piscisaureus_>was it really broken?
03:24:49  <piscisaureus_>I don't remember it was
03:26:41  <isaacs>yeah, it was weird and kludgey
03:26:45  <piscisaureus_>http://groups.google.com/group/nodejs/browse_thread/thread/78ad3478317ee19c/44fdc68c6e344505?lnk=gst&q=removing+promises#44fdc68c6e344505
03:26:58  <isaacs>you couldn't do require() inside a callback
03:29:21  <isaacs>i think it's clear that CPS is the appropriate way to do simple concurrency, and event emitters (that is, async message passing) are the appropriate way to do more complicated things. this ReqWrap thing looks like it just adds a "cancel" button, but doesn't really change much otherwise.
03:29:56  <piscisaureus_>minus the fact that there's not really a cancel in there, but okay
03:30:11  <isaacs>piscisaureus_: right
03:30:18  <piscisaureus_>historic discussion reminds me of: http://groups.google.com/group/nodejs/msg/8488c2ced0375394
03:30:23  <piscisaureus_>^-- still pending :-)
03:30:26  <isaacs>but i mean, it could hand you back an integer, or an object, or some other thing
03:30:35  <isaacs>it's just adding the equivalent of clearTimeout()
03:33:42  <piscisaureus_>isaacs: that's not really the issue
03:33:53  <piscisaureus_>isaacs: right now libuv doesn't allow you to cancel anything
03:34:01  <isaacs>oh, ok
03:34:08  <isaacs>i must've missed what ryah was talking about before, then :)
03:34:16  <piscisaureus_>isaacs: but I think we can add that
03:34:17  <isaacs>what's the point of reqwrap, then? what's it give you that cb's dont?
03:34:34  <piscisaureus_>not much I think
03:34:43  <piscisaureus_>we can add cancellation later
03:34:57  <piscisaureus_>but what's really nice if we could give the user a list of stuff that's keeping the loop alive
03:35:00  <isaacs>i mean, i guess, if you create a domain, you can then make the domain "done" event happen when all teh children are done.
03:35:07  <isaacs>but yea, introspection ftw
03:35:48  <piscisaureus_>isaacs: unless you're writing an app that's not supposed to ever exit, you're gonna run into this "omg why won't it quit" situation very quickly
03:36:04  <isaacs>yep, been there :)
03:36:10  <isaacs>my solution for that in npm is Be Very Careful.
03:36:12  <piscisaureus_>me too :-)
03:36:21  <piscisaureus_>my solution was to stop using node.
03:36:25  <isaacs>hhaa
03:36:32  <isaacs>how's that working out for you?
03:36:48  <piscisaureus_>ghe
03:36:59  <piscisaureus_>Now I am reading msdn all day
03:37:00  <piscisaureus_>go figure
03:39:08  <piscisaureus_>isaacs: i had to write a piece of software that completely turned a 80gb mysql database database upside down
03:39:08  <piscisaureus_>it's very undesirable to just interrupt the app when you think it's done, you want to *know* it's done
03:39:25  <piscisaureus_>(we got there eventually, with node)
03:39:33  <isaacs>yeah, sounds pretty rough
03:39:42  <isaacs>you definitely don't want to kill it prematurely
03:39:52  <isaacs>otoh, 2 days later, it's still not closed... still doing nothing...
03:40:11  <piscisaureus_>isaacs: yes sure
03:40:31  <piscisaureus_>but we it could be that a mysql query was left paused
03:40:40  <piscisaureus_>so a table had been processed only partially
03:50:05  <isaacs>oh jeez
03:52:32  <piscisaureus_>using node for that was probably a bad decision in hindsight - we had to run it through cygwin (windows shop) and my coworkers got very upset that I used such a broken platform to write the conversion tool
03:52:32  <piscisaureus_>but for me it worked out well - it got me started with this node porting project
04:04:59  <ryah>but it wouldnt have lead you to this fullfilling job if you hadn't perhaps
04:05:42  <piscisaureus_>probably not
04:06:52  <piscisaureus_>one lesson learned - if you want a job, make some serious contributions to an oss project
04:07:15  <piscisaureus_>the rest is history, and so am i. bye all.
04:07:55  <piscisaureus_>oh ryah, just before I go
04:08:13  <piscisaureus_>ryah: whats the status on npm not working with use-uv?
04:10:22  <ryah>isaacs: can you download yet?
04:13:36  <isaacs>ryah: not yet, no
04:13:41  <isaacs>haven't pulled and rebuilt, though
04:13:47  <isaacs>just ported to mikeal's request
04:14:09  <isaacs>and swapped out all the easy pieces. doing help by opening the browser, defaulting configs sensibly, etc.
04:15:27  <ryah>isaacs: would be good to know what you need to support downloads - so we can start on that
04:15:37  <piscisaureus_>anyway - I am going
04:15:38  <ryah>probably it will require some api additions
04:15:38  <isaacs>kk
04:15:40  <ryah>piscisaureus_: night
04:15:43  <piscisaureus_>put your findings here itn the logs
04:15:43  <isaacs>g'nite
04:15:48  <piscisaureus_>I'll read it back
04:15:49  <piscisaureus_>thanx
04:21:47  * piscisaureus_quit (Ping timeout: 258 seconds)
04:29:32  <isaacs>ryah: looks like fs.realpath might be broken
04:30:06  <isaacs>echo 'console.log("foo")' > foo.js; ln -s foo.js foo2.js; node foo2.js
04:30:10  <isaacs>breaks^
04:30:16  <isaacs>Error: , Unknown error: 0
04:31:23  <isaacs>ryah: but apart from that, seems like most npm functionality is working.
04:33:58  <ryah>how do you make arguments an array?
04:34:28  <isaacs>var args = Array.prototype.slice.call(arguments, 0)
04:35:17  <isaacs>or, the more verbose hot-path millisecond shaving mr aleph way:
04:35:17  <isaacs>for (var i = 0, l = arguments.length, args = new Array(l); i < l; i ++) args[i] = arguments[i]
04:35:38  <isaacs>yeah, fs.realpath is pretty busted right now
04:36:22  <ryah>that's better?
04:36:32  <ryah>the mraleph why?
04:36:46  <isaacs>ryah: it's hideous
04:37:04  <isaacs>ryah: but it's slightly faster, becuase hand wavey black magic v8 voodoo
04:37:10  <isaacs>arguments array is magical
04:37:14  <isaacs>or something
04:37:17  <isaacs>> fs.readlinkSync("/usr/local/bin/npm")
04:37:18  <isaacs>''
04:41:55  <isaacs>hm, seems like this might be a problem: https://github.com/joyent/libuv/blob/master/src/unix/fs.c#L156-158
04:42:05  <isaacs>ryah: shouldn't that be doing something with req->eio->something?
04:43:36  <isaacs>oh, wait, nvm...
04:47:26  <ryah>isaacs: but is probably in node_file.cc
04:47:31  <ryah>s/but/bug
04:47:46  <ryah>s/probably/maybe
05:02:15  <isaacs>ryah: pretty sure it's here: https://github.com/joyent/libuv/blob/master/src/unix/fs.c#L582
05:02:20  <isaacs>shouldn't that be req->result = size?
05:03:41  <isaacs>at least, that's what node_file.cc expects it to be, on line 450, it seems like
05:04:55  <isaacs>oh, wait, it's a \0-terminated string, why is there a length on that?
05:04:56  <isaacs>https://gist.github.com/1194133
05:05:01  <isaacs>that fixes it^
05:08:36  <ryah>isaacs: cool
05:08:45  <ryah>isaacs: land it
05:08:49  <isaacs>async still broken, though
05:08:52  <isaacs>wanna get them both
05:09:02  <isaacs>that's currenlty messing up npm, though it can get past the initial load
05:11:03  <isaacs>ah, there we go. same kinda thing.
05:11:05  <isaacs>https://gist.github.com/1194143
05:13:30  <DrPizza>oh yeah we had a discussion about what to do
05:14:01  <DrPizza>I think we decided to always null terminate and not set it to size
05:14:07  * igorziquit (Quit: Page closed)
05:14:33  * igorzijoined
05:14:43  <igorzi>ryah: readdirsync is broken?
05:14:59  <igorzi>just in node? or in libuv too?
05:16:31  <ryah>igorzi: works now
05:17:03  <igorzi>k
05:17:24  <CIA-52>node: isaacs master * ref523e5 / src/node_file.cc : fix test-fs-realpath - http://git.io/WOcNOQ
05:18:27  <ryah>down to 13 broken on osx
05:18:57  <igorzi>ahh yes, this is the null-terminated path issue
05:20:47  <ryah>i want to write an editor in node
05:20:52  <ryah>tty
05:21:09  <ryah>similar to vim but using js regexp
05:21:18  <ryah>and js plugins
05:21:21  <ryah>:)
05:23:48  <isaacs>that'd be fun
05:24:01  <isaacs>maybe then we could all grow beards on our necks
05:24:24  <isaacs>start eating our feet.
05:24:27  <isaacs>i hear that happens when you write an editor
05:25:35  <DrPizza>lol
05:25:47  <DrPizza>start eating our feet whilst in public
05:25:53  <DrPizza>and being filmed
05:25:57  <isaacs>yes.
05:28:06  <ryah>eating our feet?
05:28:09  <isaacs>seriously, though, vimscript is pretty terrible.
05:28:21  <isaacs>the best thing emacs has going for it is that it's got a real language for plugins
05:28:44  <DrPizza>ryah: http://www.youtube.com/watch?v=I25UeVXrEHQ
05:28:50  <isaacs>most of all, i'd love a modal editor that had the strengths of textmate
05:29:05  <isaacs>if you can #! to it, you can write plugins in it
05:29:56  <ryah>someone should write a ncurses in node
05:29:58  <ryah>but pure js
05:30:03  <ryah>would be nice
05:33:57  <isaacs>ryah: have you seen charm?
05:34:16  <isaacs>ryah: it's not ncurses, but it's in that direction. semantic functions that output ansi codes
05:35:33  <ryah>nocool
05:39:15  <isaacs>if something would be cool to do in node, it's safe to say that substack either has just done it, or is about to.
05:54:58  <isaacs>ryah: so, npm can self-install on node-master now
05:55:06  <isaacs>ship it!
05:59:31  <ryah>isaacs: nice
06:05:45  <igorzi>ryah: for sync uv_fs_* functions, do we really need to set req.path?
06:09:51  * mralephjoined
06:12:29  <dmkbot>joyent/node: kingkaeru: on windows v0.5.3 fs.unlink() fails if called after fs.readFile() - https://github.com/joyent/node/issues/1449
06:12:52  <DrPizza>ryah: can we close that issue?
06:12:59  <DrPizza>the fix has been committed
06:13:22  <DrPizza>well
06:13:34  <DrPizza>it's possible that there's a javascript fix needed too, I'm not sure
06:13:53  <DrPizza>but I don't think so
06:13:58  <DrPizza>since it's doing the same on win32 and unix
06:14:09  <DrPizza>and it works in unix
06:14:14  <DrPizza>(and now it works in win32)
06:31:39  <CIA-52>libuv: Igor Zinkovsky master * rb90459f / (include/uv-private/uv-win.h src/win/fs.c): windows: use _stati64 - http://git.io/LusXCQ
06:35:06  <ryah>igorzi: no
06:35:40  <ryah>DrPizza: closed, thanks
06:35:51  <DrPizza>cool
06:36:50  <ryah>igorzi: are you going to give a talk at nodecamp?
06:37:08  <igorzi>ryah: no, i wasn't planning to
06:37:09  <ryah>igorzi: it's barcamp style - so they will organize talks in the morning
06:37:21  * isaacsquit (Quit: isaacs)
06:37:22  <ryah>igorzi: it would be a good chance to give a presentation if you desired :)
06:38:27  <ryah>im going to talk about domains, if i get this working before then...
06:39:19  <igorzi>ryah: hmm, might be too late now :).. mainly i want to see what kind of apps people are building, what additional stuff people would like to see on windows, and in general get to know the community
06:41:03  <igorzi>ryah: currently unix impl sets req.path for sync calls, and there's a test that verifies that: https://github.com/joyent/libuv/blob/master/test/test-fs.c#L553
06:41:31  <ryah>igorzi: you can remove that
06:41:38  <igorzi>ok
06:54:01  * mralephquit (Quit: Leaving.)
06:58:11  * mralephjoined
07:03:45  <CIA-52>libuv: Igor Zinkovsky master * ra8017fd / (src/win/fs.c test/test-fs.c): windows: update uv_fs_* functions to work with req.path - http://git.io/lgvUsw
07:05:42  <igorzi>ryah: we can now remove the remaining "#ifdef __POSIX__" from node_file.cc (except for StatWatcher)
07:06:47  * mralephquit (Quit: Leaving.)
07:30:51  <ryah>igorzi: ok
07:32:56  <ryah>igorzi: can you give me a patch?
07:33:31  <ryah>igorzi: it seems like there are some others that are broken, i think
07:33:43  <ryah>e.g.
07:33:45  <ryah>static inline bool SetCloseOnExec(int fd) {
07:33:45  <ryah>#ifdef __POSIX__
07:33:45  <ryah> return (fcntl(fd, F_SETFD, FD_CLOEXEC) != -1);
07:33:45  <ryah>#else // __MINGW32__
07:33:48  <ryah> return SetHandleInformation(reinterpret_cast<HANDLE>(_get_osfhandle(fd)),
07:33:50  <ryah> HANDLE_FLAG_INHERIT, 0) != 0;
07:33:53  <ryah>#endif
07:33:55  <ryah>}
07:43:59  <dmkbot>joyent/node: Kos: Misleading console output for arrays with undefined - https://github.com/joyent/node/issues/1651
09:09:24  * piscisaureus_joined
09:09:31  * piscisaureus_changed nick to piscisaureus
09:11:20  <piscisaureus>yo
10:20:28  <dmkbot>joyent/node: Kos: Misleading console output for arrays with undefined - https://github.com/joyent/node/issues/1651
10:27:44  <dmkbot>joyent/node: Skomski: Added new win32 platform function: getNetworkInterfaces() - https://github.com/joyent/node/issues/1652
10:49:29  <dmkbot>joyent/node: Skomski: Added new win32 platform function: getNetworkInterfaces() - https://github.com/joyent/node/issues/1652
10:51:14  <dmkbot>joyent/node: Skomski: Added new win32 platform function: getNetworkInterfaces() - https://github.com/joyent/node/issues/1652
11:23:26  * bnoordhuisjoined
11:33:49  <piscisaureus>bnoordhuis: http://twitter.com/#!/marek_jelen/status/110653305595772928
11:34:16  <piscisaureus>bnoordhuis: we can forget about node.php btw -- setting up a build env for php on windows takes at least a week
11:34:29  <piscisaureus>no wonder php sucks so hard
11:36:21  <piscisaureus>on linux it's easy; apt-get install bison libxml2-dev; autoconf; ./configure; make
11:36:29  <dmkbot>joyent/node: Skomski: Added new win32 platform function: getNetworkInterfaces() - https://github.com/joyent/node/issues/1652
11:37:35  <bnoordhuis>bwahaha
11:37:53  <bnoordhuis>some construction workers were doing some digging
11:38:15  <bnoordhuis>in front of my house i mean
11:38:24  <bnoordhuis>and they broke the water supply
11:38:41  <bnoordhuis>there's now a fountain six meters high in front of my house :)
11:38:42  <piscisaureus>so now you smell like rotten fish?
11:38:47  <piscisaureus>ghe ghe
11:38:48  <piscisaureus>nice
11:40:44  <dmkbot>joyent/node: Skomski: Added new win32 platform function: getNetworkInterfaces() - https://github.com/joyent/node/issues/1652
11:40:48  <bnoordhuis>re ruby bindings: i was thinking about doing some python bindings
11:41:38  <piscisaureus>oh, also cool
11:41:46  <piscisaureus>but I find php bindings way cooler
11:41:56  <piscisaureus>if it was even remotely possible to compile that bitch under windows
11:42:13  <bnoordhuis>yeah, i've been toying with it yesterday
11:42:25  <bnoordhuis>but i forgot what a total bitch the php c api is
11:43:06  <piscisaureus>did you manage to get anything going at all?
11:43:13  <piscisaureus>like, having an extension that prints hello world?
11:44:00  <bnoordhuis>oh yeah, i got that far
11:44:28  <bnoordhuis>but my uv_tcp wrapper crashes inside php core
11:44:41  <bnoordhuis>Program received signal SIGSEGV, Segmentation fault.
11:44:42  <bnoordhuis>0x0000000000826306 in zend_hash_find (ht=0x7ffff65d9ad0, arKey=0x7fffffffb440 "connect", nKeyLength=8, pData=0x7fffffffb4a0)
11:44:42  <bnoordhuis> at /home/bnoordhuis/src/php5-5.3.2/Zend/zend_hash.c:880
11:44:42  <bnoordhuis>880 p = ht->arBuckets[nIndex];
11:45:08  <piscisaureus>can you put it up on github?
11:45:26  <bnoordhuis>sure, one sec
11:45:29  <dmkbot>joyent/node: Skomski: Added new win32 platform function: getNetworkInterfaces() - https://github.com/joyent/node/issues/1652
11:46:59  <dmkbot>joyent/node: Skomski: Added new win32 platform function: getNetworkInterfaces() - https://github.com/joyent/node/issues/1652
11:47:19  <piscisaureus>bnoordhuis: and, since you're now working for me, can you check if the getNetworkInterfaces() guy addresses all your remarks?
11:47:33  <bnoordhuis>hey, they fixed it!
11:47:48  <bnoordhuis>sure, i'll check his patch
11:47:58  <piscisaureus>bnoordhuis: after all, your contract says that you should work on windows support :-)
11:48:10  <bnoordhuis>haha, rub it in, why don't you?
11:48:40  <bnoordhuis>damn... fountain out, monsoon in
11:48:58  <piscisaureus>ghe
11:49:05  <bnoordhuis>http://buienradar.nl/ <- the red part is gouda
11:49:32  <piscisaureus>bnoordhuis: yes, that just left delft
11:49:36  <piscisaureus>now it's sunny here :-)
11:49:41  <piscisaureus>well, becoming sunny
11:51:17  <bnoordhuis>note to self: clean out gutters
11:53:44  <dmkbot>joyent/node: Skomski: Added new win32 platform function: getNetworkInterfaces() - https://github.com/joyent/node/issues/1652
11:54:49  <bnoordhuis>piscisaureus: https://github.com/bnoordhuis/node.php
11:56:06  <piscisaureus>bnoordhuis: I am not really happy with using perror
11:56:21  <piscisaureus>but this is more of a general concern, I am afraid it's done at may places
11:56:41  <bnoordhuis>is it? i don't recall any
11:58:12  <bnoordhuis>maybe it should use new char[] instead of malloc
11:58:46  <bnoordhuis>or... when new[] fails it throws an exception
11:59:11  <piscisaureus>bnoordhuis: https://github.com/Skomski/node/blob/b5f49f9fe3018adc7febe87751d40c62ae39afcf/src/platform_win32.cc
11:59:20  <piscisaureus>^-- many perror/winapi_perror uses
12:00:13  <piscisaureus>I'm afraid it's my fault
12:00:31  <bnoordhuis>platform_win32.cc is the biggest offender within node yes
12:00:45  <piscisaureus>I started doing that when I started porting process.title to cygwin and I didn't know how to throw from the binding layer
12:00:56  <piscisaureus>It's proven infestive
12:04:30  <bnoordhuis>piscisaureus: is sizeof(IP_ADAPTER_ADDRESSES) very large?
12:05:11  <piscisaureus>bnoordhuis: don't know, let me check
12:05:25  <bnoordhuis>http://msdn.microsoft.com/en-us/library/aa366058%28v=vs.85%29.aspx
12:05:44  <bnoordhuis>because that guy is mallocing all over the place
12:05:52  <bnoordhuis>but all small, fixed size allocations
12:06:44  <piscisaureus>yes, bitch about that
12:07:09  <piscisaureus>he's also mallocing INET6_ADDRSTRLEN
12:07:27  <bnoordhuis>i know, right? should be on-stack
12:10:09  <piscisaureus>He doesn't even need to malloc frienly name. The frienly name shouldn't be more than 64 chars as per rfc2863
12:10:54  <piscisaureus>So even if windows allows unicode in there the maximum required size for the utf8 should be 64*4 (or even 64*3?) bytes long
12:10:57  <piscisaureus>bnoordhuis: ^
12:11:20  <piscisaureus>oh man my inglish
12:11:23  <bnoordhuis>engrish
12:11:37  <piscisaureus>s/utf8/utf8 buffer/ s/long//
12:11:39  <bnoordhuis>i was just about to ask
12:14:12  <bnoordhuis>it would've been faster to just write it ourselves
12:14:16  <piscisaureus>yes
12:14:29  <bnoordhuis>but it's a good learning experience for the guy
12:14:32  <piscisaureus>that's always the issue with contributions
12:14:54  <piscisaureus>90% of the contributions I could have written faster myself
12:15:10  <piscisaureus>compares to reviewing it
12:15:46  <piscisaureus>especially the one-off ones
12:17:06  <bnoordhuis>you mean buglets or patches from people who contribute only once?
12:17:23  <piscisaureus>bnoordhuis: yes the people who contribute once
12:17:35  <piscisaureus>bnoordhuis: btw what is libdrizzle?
12:17:53  <bnoordhuis>piscisaureus: async mysql client
12:18:26  <piscisaureus>bnoordhuis: it is possible to hook that up to to an externel networking lib?
12:18:37  <bnoordhuis>don't know yet
12:25:21  <piscisaureus>hmm
12:25:22  <piscisaureus>ext.c: In function ‘tcp_new’:
12:25:22  <piscisaureus>ext.c:40:29: error: ‘zend_class_entry’ has no member named ‘default_properties’
12:25:22  <piscisaureus>ext.c: At top level:
12:25:22  <piscisaureus>ext.c:62:3: warning: missing initializer
12:25:22  <piscisaureus>ext.c:62:3: warning: (near initialization for ‘tcp_methods[1].handler’)
12:25:23  <piscisaureus>ext.c:99:3: warning: missing initializer
12:25:23  <piscisaureus>ext.c:99:3: warning: (near initialization for ‘functions[1].num_args’)
12:26:59  * dmkbotquit (Remote host closed the connection)
12:27:15  <piscisaureus>oh, *sigh*
12:27:16  * dmkbotjoined
12:27:21  <piscisaureus>they changed the api for 5.4
12:28:40  <bnoordhuis>*sigh* php
12:28:48  <bnoordhuis>i'll download the 5.4 tarball
12:29:05  <piscisaureus>bnoordhuis: I'll nick the trick from https://github.com/mongodb/mongo-php-driver/commit/b31517c9f1b2c2ec9c08c1e16e3d118c9863d30c
12:31:46  <bnoordhuis>piscisaureus: are you testing against php's bleeding edge? the most recent stable is 5.3.8
12:32:04  <piscisaureus>bnoordhuis: yes, I just did a checkout from github.com/php/php-src
12:32:35  * dmkbotquit (Remote host closed the connection)
12:32:38  <piscisaureus>well, I got it compiling
12:32:51  * dmkbotjoined
12:32:53  <piscisaureus>bnoordhuis: https://gist.github.com/1194857
12:33:59  <piscisaureus>although I shouldn't have dropped the zend_object_std_init call :-/
12:35:57  <bnoordhuis>just when i pushed...
12:36:27  <piscisaureus>bnoordhuis: also, make isn't building an so right?
12:36:35  <piscisaureus>how do I dl() this extension?
12:36:42  <bnoordhuis>piscisaureus: it builds a .so
12:36:52  <piscisaureus>oh gheh
12:36:55  <piscisaureus>one folder up
12:36:59  <piscisaureus>the makefile is mislocated
12:37:07  <bnoordhuis>yeah, i'm fixing that
12:37:17  <bnoordhuis>i'll make a top-level makefile that does the right thing
12:37:29  <bnoordhuis>btw, put 'extension = /home/bnoordhuis/src/node.php/node.so' in your php.ini
12:37:30  <piscisaureus>also, this is kinda annoying to do
12:37:30  <piscisaureus>INCLUDES="/usr/local/include/php /usr/local/include/php/main /usr/local/include/php/Zend /usr/local/include/php/TSRM" make
12:37:53  <bnoordhuis>put the INCLUDES in src/Makefile.local :)
12:38:10  <bnoordhuis>i'll fix that some day but i don't want to fool around with autotools just now
12:38:25  <piscisaureus>that's just `echo INCLUDES="/usr/local/include/php /usr/local/include/php/main /usr/local/include/php/Zend /usr/local/include/php/TSRM" >Makefile.local` ?
12:38:32  * piscisaureusunix n00b
12:41:36  <piscisaureus>oh man
12:41:41  <piscisaureus>it's even php 5.5.0
12:41:45  <piscisaureus>it has a built-in webserver
12:42:41  <bnoordhuis>where?
12:43:08  <piscisaureus>*shrug* php -? shows the -S options that's supposed to start a built-in webserver
12:43:10  <piscisaureus>oh
12:43:13  <piscisaureus>bnoordhuis: http://blog.nacode.com/2011/03/03/php-built-in-web-server/
12:44:03  <bnoordhuis>hey, that's http_parser
12:44:18  <piscisaureus>like, ryans?
12:44:37  <bnoordhuis>yep
12:44:51  <piscisaureus>yes, really
12:44:52  <piscisaureus>rofl
12:46:47  <piscisaureus>http://twitter.com/#!/piscisaureus/status/110695276578222080
12:52:35  <bnoordhuis>:)
12:54:25  <bnoordhuis>still going to kings of code?
12:55:53  <piscisaureus>bnoordhuis: yes
12:56:08  <piscisaureus>bnoordhuis: I have asked you if I can take you there but no response yet
12:56:17  <piscisaureus>But I guess I'll be okay
12:56:26  <bnoordhuis>i'll or it'll?
12:56:35  <piscisaureus>it'll
12:56:39  <piscisaureus>sorry, typo
12:56:47  <bnoordhuis>okay, cool :)
12:56:56  <piscisaureus>I guess I'll be okay too
12:57:21  <bnoordhuis>that lightens my heart, piscisaureus
13:04:25  <piscisaureus>well, uv_run() works :-)
13:07:13  <piscisaureus>bnoordhuis: the segmentation fault happens in the dtor for me
13:07:35  <bnoordhuis>i probably fucked something up
13:07:41  <bnoordhuis>just not sure what
13:07:50  <piscisaureus>you sure did mike
13:08:39  <piscisaureus>it's also a bit wrong - you should delay freeing the memory until the uv object is close
13:08:41  <piscisaureus>d
13:08:45  <piscisaureus>but that aside
13:11:19  <piscisaureus>I bet you have zend_object_std_dtor and zend_objects_destroy_object reversted too
13:12:23  <bnoordhuis>well, fix it
13:12:31  <bnoordhuis>it's open source you know
13:14:04  <piscisaureus>meh
13:14:05  <piscisaureus>lazy
13:14:14  <piscisaureus>I already hate this project
13:15:44  <bnoordhuis>haha
13:16:02  <bnoordhuis>i didn't lie when i said php's c api is a clusterfuck
13:16:10  <piscisaureus>yes man
13:16:21  <piscisaureus>it probably makes sense when you're stoned
13:18:58  <bnoordhuis>for the sake of science i will try that experiment
13:19:57  <piscisaureus>bnoorhuis: Are you joining the KoC Hackathon Battle Weekend?
13:20:03  <piscisaureus>*bnoordhuis
13:20:07  <piscisaureus>I have to answer that question
13:20:23  <bnoordhuis>i don't even know what that is
13:20:29  <bnoordhuis>oh, kings of code
13:20:31  <piscisaureus>it's a hackaton
13:20:36  <piscisaureus>I am not going
13:20:51  <bnoordhuis>me neither, i don't have *that* much spare time
13:23:34  <piscisaureus>Karnemelksloot hoeveel?
13:23:52  <bnoordhuis>117
13:25:01  <bnoordhuis>hah: https://github.com/bnoordhuis/node.php/watchers
13:26:09  <piscisaureus>bnoordhuis: you should get a conf ticket @ info@bnoordhuis.nl
13:26:16  <bnoordhuis>cool, thanks
13:26:58  <piscisaureus>bnoordhuis: ping me when you get it so I know it all worked
13:28:38  <bnoordhuis>piscisaureus: ping - got a full conference pass
13:31:54  <piscisaureus>ok, nice
13:35:37  <piscisaureus>bnoordhuis: ah. You didn't reverse the dtor and destroy arguments
13:36:48  <piscisaureus>but the dtor should be something like
13:36:49  <piscisaureus>static void tcp_wrap_free(void *object TSRMLS_DC) {
13:36:49  <piscisaureus> tcp_wrap *wrap = (tcp_wrap*) object;
13:36:49  <piscisaureus> zend_object_std_dtor(&id->obj TSRMLS_CC);
13:36:49  <piscisaureus> efree(wrap);
13:36:49  <piscisaureus>}
13:38:37  <bnoordhuis>send a pull request :)
13:38:48  <piscisaureus>yes yes
13:39:00  <bnoordhuis>want me to add you to the project?
13:39:36  <piscisaureus>yes
13:39:39  <piscisaureus>or -
13:39:40  <piscisaureus>hmm
13:39:43  <piscisaureus>yes
13:41:26  <bnoordhuis>added, jij collaborateur
13:55:38  * dmkbotquit (Ping timeout: 258 seconds)
14:06:17  <piscisaureus>bnoordhuis: ideally we would use namespaces or class statics for it
14:06:28  <piscisaureus>so we can have
14:06:28  <piscisaureus>uv::run()
14:06:40  <bnoordhuis>class statics then
14:06:54  <bnoordhuis>do you know what the namespace separator is in php?
14:07:26  <piscisaureus>$server = uv::tcp::createServer(function($socket) {
14:07:26  <piscisaureus> $socket->write("gfy!");
14:07:26  <piscisaureus>});
14:07:26  <piscisaureus>$server->listen(80);
14:07:41  <piscisaureus>bnoordhuis: ::
14:08:09  <bnoordhuis>wrong - it's \
14:08:14  <piscisaureus>oh
14:08:15  <piscisaureus>really
14:08:18  <piscisaureus>I never used it
14:08:25  <piscisaureus>but when I was using php they were debating it
14:08:34  <piscisaureus>and they were heading for :: back then
14:08:37  <piscisaureus>man
14:08:41  <piscisaureus>\ is so retarded!
14:09:36  <bnoordhuis>i think the argument is that php's parser is so fucked that having :: double as the namespace separator was impossible to accomplish
14:17:18  <piscisaureus>bnoordhuis: now how do we add a normal method?
14:17:56  <bnoordhuis>PHP_FE(name)
14:18:21  <bnoordhuis>at least, you declare the function with PHP_FUNCTION() and add it to the function list with PHP_FE()
14:28:54  <piscisaureus>cp_wrap* wrap = zend_object_store_get_object(getThis() TSRMLS_CC);
14:29:20  <piscisaureus>that TSRMLS_CC is so retarded
14:29:25  <bnoordhuis>it is
14:29:28  <piscisaureus>why not just call it FUBAR
14:30:24  <piscisaureus>bnoordhuis: I assume that our extension can't include php code?
14:30:39  <bnoordhuis>piscisaureus: in what sense?
14:30:55  <bnoordhuis>piscisaureus: you mean execute `include('./foo.php')'?
14:30:56  <piscisaureus>bnoordhuis: in node we have .js files that do part of the work
14:31:09  <piscisaureus>can we have php files that do part of the work?
14:31:28  <bnoordhuis>piscisaureus: don't think so, clients would have to explicitly include them
14:31:39  <piscisaureus>we will need to capture a first-class function for the onConnect callback
14:31:46  <piscisaureus>I don't know how to do this
14:34:55  <bnoordhuis>piscisaureus: zend_parse_parameters
14:35:18  <piscisaureus>bnoordhuis: yes, but what is the type I use to store a function closure?
14:35:29  <bnoordhuis>piscisaureus: that indeed is the question
14:35:45  <bnoordhuis>i wasn't able to figure it out yesterday
14:37:38  <bnoordhuis>piscisaureus: you probably need the stuff in Zend/zend_closures.h
14:44:25  <piscisaureus>ah
14:44:36  <piscisaureus>this TSRMLS_CC is similar to EV_P_ etc
14:44:45  <piscisaureus>but for multithreading support
14:47:32  <bnoordhuis>yes
15:02:03  * dmkbotjoined
15:06:34  <bnoordhuis>i pretend not to comprehend how uv_file fits in the grand scheme of things...
15:09:44  * dmkbotquit (Remote host closed the connection)
15:19:48  <piscisaureus>bnoordhuis: ?
15:19:49  * isaacsjoined
15:20:33  <bnoordhuis>piscisaureus: some uv_fs functions operate on a uv_file
15:20:46  <piscisaureus>uv_file is just int
15:20:48  <piscisaureus>atm
15:21:01  <bnoordhuis>right, i noticed that uv_fs_open stores it in req->result
15:21:07  <bnoordhuis>just seems a little... wonky, i suppose
15:21:15  <piscisaureus>I agree
15:21:24  <piscisaureus>uv_file should be struct
15:22:35  <piscisaureus>if you're masochistic, the php api is for you™
15:24:25  <piscisaureus>bnoordhuis: http://lxr.sweon.net/php/http/source/ext/standard/array.c#L4218
15:24:43  <piscisaureus>I wonder if you can store the function_call_info struct and invoke it later
15:25:00  <piscisaureus>I am kind of afraid that php might garbage collect the closure scope
15:27:22  <bnoordhuis>piscisaureus: i think you can avoid that by bumping the refcount
15:27:31  <bnoordhuis>provided that a closure has one (objects do)
15:27:47  <piscisaureus>bnoordhuis: does the function_call_info object have one?
15:28:32  <piscisaureus>sorry, zend_fcall_info
15:29:33  <bnoordhuis>piscisaureus: not directly but the object object_ptr points to should have one
15:29:44  <bnoordhuis>but if that's the proper approach...
15:30:02  <piscisaureus>bnoordhuis: what if I just extract the zval and parse it to function_call_info later
15:30:10  <piscisaureus>can I ref() on the zval?
15:30:56  <bnoordhuis>piscisaureus: yes, zvals have refcounts
15:31:02  <piscisaureus>nice
15:31:17  <piscisaureus>I should figure out how to parse a zval into a zenf_fcall_info
15:31:21  <piscisaureus>but then it's settled
15:31:32  <bnoordhuis>Z_ADDREF_PP(v) // where v is the zval
15:34:12  <bnoordhuis>piscisaureus: btw, i think you have to check with zend_is_callable in the binding
15:34:29  <piscisaureus>bnoordhuis: don't know
15:34:34  <piscisaureus>yes, probably
15:34:46  <bnoordhuis>piscisaureus: and then zend_fcall_info_init to turn it into a zend_fcall_info struct
15:35:12  <piscisaureus>bnoordhuis: but to actually call I also need a zend_fcall_info_cache struct
15:35:34  <piscisaureus>bnoordhuis: zend_parse_parameters gives it to you if you parse the arg straight to a function call
15:35:35  <bnoordhuis>doesn't zend_fcall_info_init generate that for you?
15:35:37  <bnoordhuis>let me check
15:36:08  <piscisaureus>bnoordhuis: yes it does
15:36:09  <piscisaureus>sorry
15:36:14  <piscisaureus>http://lxr.sweon.net/php/http/source/Zend/zend_API.c?v=5.3.2#L2894
15:38:31  <bnoordhuis>;q
15:38:37  <bnoordhuis>heh, wrong window
15:38:55  * isaacsquit (Quit: isaacs)
15:39:23  <piscisaureus>:q! you mean
15:39:41  <bnoordhuis>i have : aliased to ; - saves having to press shift every time
15:48:15  <bnoordhuis>bleh, uv_fs_stat sucks
15:48:29  <bnoordhuis>if we use doubles for timestamps everywhere, then so should uv_fs_stat
15:48:43  <bnoordhuis>the api can still use some tidying
15:48:50  <bnoordhuis>ryah: ^
15:50:53  * dmkbotjoined
16:05:54  <bnoordhuis>The Dutch government has taken over operational management from DigiNotar. <- crushed
16:06:50  <bnoordhuis>down side is that the government is switching to getronics as their CA
16:07:21  <bnoordhuis>getronics! the company that wouldn't recognize a dns server if it hit them in the face
16:16:15  * isaacsjoined
16:26:20  * isaacsquit (Quit: isaacs)
16:30:51  <dmkbot>joyent/node: Kos: Misleading console output for arrays with undefined - https://github.com/joyent/node/issues/1651
16:31:47  <piscisaureus>bnoordhuis: would you tell a dns server from a ftp server if it hit you in de face?
16:32:15  <piscisaureus>Program received signal SIGSEGV, Segmentation fault.
16:32:15  <piscisaureus>bzend_hash_quick_find (ht=0x49d618, arKey=0xb7ebc97c "connect", nKeyLength=8, h=1111492527,
16:32:15  <piscisaureus> pData=0xbfffcd68) at /home/bert/php/Zend/zend_hash.c:950
16:32:15  <piscisaureus>950 p = ht->arBuckets[nIndex];
16:32:20  <piscisaureus>Oh man this is so hard
16:32:25  <bnoordhuis>and annoying
16:33:13  <piscisaureus>bnoordhuis: are there any gotchas to using PHP_ME and PHP_METHOD?
16:34:09  <bnoordhuis>piscisaureus: probably, but i'm not really clear on what those macros do
16:34:25  <bnoordhuis>or e.g. what the difference is between PHP_FALIAS and PHP_ME_MAPPING
16:34:41  <bnoordhuis>fortunately the source is very well documented <- sarcasm
16:35:52  <bnoordhuis>en dan dit: http://www.youtube.com/watch?v=lEzGIXHzAPg
16:37:36  <bnoordhuis>oh en: http://www.youtube.com/watch?v=6O3c9jea6FU
16:50:51  <dmkbot>joyent/node: herby: runInThisContext does not run in context of the caller - https://github.com/joyent/node/issues/898
16:57:38  * dmkbotquit (Remote host closed the connection)
16:58:01  * dmkbotjoined
17:07:58  <dmkbot>joyent/node: herby: runInThisContext does not run in context of the caller (new issue) - https://github.com/joyent/node/issues/898
17:09:49  * dmkbotquit (Remote host closed the connection)
17:10:12  * dmkbotjoined
17:18:23  <DrPizza>bnoordhuis: surely libuv should use a sensible type for timestamps (e.g. int64), only javascript stuff (node) should use doubles for everything
17:20:09  <dmkbot>joyent/node: Kos: Misleading console output for arrays with undefined - https://github.com/joyent/node/issues/1651
17:55:34  <piscisaureus>http://talks.somabo.de/200505_cancun_implementing_php5_oop_extensions.pdf
18:05:00  <ryah>bnoordhuis: yes api could use some work
18:05:22  <ryah>i really wish we didnt have to cleanup the req object for sync methods
18:05:31  <ryah>it'd be better if the return value was req->result
18:05:37  <ryah>and async methods returned EPENDING
18:36:21  * dmkbotquit (Remote host closed the connection)
18:39:51  * dmkbotjoined
18:41:03  <piscisaureus>^-- iocp clone :-/
18:44:17  <ryah>piscisaureus: ?
18:44:40  <piscisaureus>no problem - that's just exactly how iocp file i/o works
18:45:08  <ryah>yeah - so we should do that for fs methods
18:49:35  <piscisaureus>ryah: you ever noticed this? http://svn.php.net/viewvc/php/php-src/trunk/sapi/cli/php_http_parser.c?view=markup
18:50:18  <ryah>piscisaureus: yeah, i know about it
18:52:24  <ryah>piscisaureus: isaacs has npm self installing on node master
18:52:31  <ryah>piscisaureus: so i think that issue can be closed
18:52:34  <piscisaureus>ah, nice
18:52:59  <ryah>piscisaureus: test/simple/test-fs-open.js should be fixed for the release, i think
18:53:04  <ryah>otherwise we're looking good IMO
18:53:24  <ryah>we're down to 13 fails on OSX
18:53:50  <piscisaureus>test-fs-open works on windows
18:53:59  <piscisaureus>on windows I'm seeing ~40 fails
18:54:08  <piscisaureus>mostly unimplemented features and know bugs
18:54:19  <ryah>hm...
18:54:47  <ryah>bnoordhuis: test/simple/test-fs-open.js fails for you on linux?
18:56:22  * piscisaureusbuilds linux
18:57:30  <piscisaureus>ryah: are we having a call today or not?
19:00:47  <ryah>piscisaureus: no
19:00:48  <ryah>sorry
19:00:56  <piscisaureus>ok - never miing.
19:00:59  <piscisaureus>*minde
19:01:01  <ryah>today is a holiday for us
19:02:49  * mralephjoined
19:02:54  <piscisaureus>ryah: test-fs-open passes for me on linux
19:06:07  <ryah>hmm...
19:06:08  <ryah>ok
19:06:25  <ryah>i thought it was a error string problem
19:06:30  <ryah>but maybe it's something different
19:08:01  <ryah>piscisaureus: slip the release until thrusday?
19:08:13  <piscisaureus>hmm
19:08:15  <ryah>or wednesday night?
19:08:19  <piscisaureus>Yes, I guess that is okay
19:08:24  <piscisaureus>wednesday night is not okay for me
19:08:33  <piscisaureus>have to get up early on thursday
19:08:36  <piscisaureus>(for a change)
19:08:36  <ryah>ok
19:09:23  <ryah>test-child-process-ipc is fixable
19:10:10  <ryah>test-fs-realpath is fixable
19:10:24  <ryah>test-fs-symlink
19:10:29  <ryah>test-fs-utimes
19:10:41  <ryah>test-net-connect-handle-econnrefused
19:11:03  <piscisaureus>ryah: test-child-process-ipc also passes on windows
19:12:55  <piscisaureus>ryah: ! btw i was wrong, test-fs-open fails in linux
19:13:21  <piscisaureus>sorry
19:13:29  <piscisaureus>somehow my ./node didn't get updated
19:24:48  <dmkbot>joyent/node: mmalecki: Plus in protocol - https://github.com/joyent/node/issues/1654
19:37:18  <ryah>ok
19:37:26  <ryah>that's good i thought i was going crazy
19:44:48  <dmkbot>joyent/node: ry: test-child-process-ipc broken on unix - https://github.com/joyent/node/issues/1655
19:44:50  <dmkbot>joyent/node: ry: test-fs-utimes broken on master - https://github.com/joyent/node/issues/1656
19:44:51  <dmkbot>joyent/node: ry: test-net-connect-handle-econnrefused and test-fs-open.js broken - https://github.com/joyent/node/issues/1657
19:44:53  <dmkbot>joyent/node: ry: test-net-connect-handle-econnrefused and test-fs-open.js broken - https://github.com/joyent/node/issues/1657
19:47:05  <ryah>bnoordhuis: help bert with these issues the next few days - we're slipping the release until thrusday https://github.com/joyent/node/issues?milestone=2&state=open
19:47:10  <ryah>igor and i will be at node camp
19:47:29  <ryah>bnoordhuis: also i hope we have ./configure-gyp --prefix= soon :)
19:49:48  <dmkbot>joyent/node: fprijate: Wrong fs.stat size on win32 - https://github.com/joyent/node/issues/1647
19:49:50  <dmkbot>joyent/node: ry: test-net-connect-handle-econnrefused and test-fs-open.js broken - https://github.com/joyent/node/issues/1657
20:01:07  <CIA-52>node: Ryan Dahl domains * r74c6de1 / (4 files in 3 dirs): wip (+6 more commits...) - http://git.io/jvuxbg
20:09:31  * felixgejoined
20:09:31  * felixgequit (Changing host)
20:09:31  * felixgejoined
20:09:45  <felixge>how can I run an individual libuv test?
20:09:48  <dmkbot>joyent/node: Kos: Misleading console output for arrays with undefined - https://github.com/joyent/node/issues/1651
20:09:50  <dmkbot>joyent/node: Kos: Misleading console output for arrays with undefined - https://github.com/joyent/node/issues/1651
20:12:04  <ryah>felixge: ./test/run-tests fs_async_dir
20:13:58  <felixge>ryah: thx. Anything else I need to do for it to recognize a new test file I added ?
20:14:15  <ryah>felixge: add it to test/test-list.h
20:14:27  <ryah>felixge: there are two places in that file
20:16:01  <felixge>ryah: got it
20:16:05  <felixge>thanks
20:16:21  <felixge>ryah: should I name this exec_sync ?
20:16:30  <ryah>felixge: yeah
20:16:32  <felixge>k
20:16:41  <ryah>felixge: maybe spawn_sync ?
20:16:50  <felixge>ok
20:16:55  <piscisaureus>spawnSync?
20:16:58  <felixge>why do we call this spawn btw?
20:17:01  <felixge>not exec?
20:17:10  <ryah>felixge: https://github.com/joyent/node/blob/74c6de1bbfdf2bcb5ec5c9fef1caa262b70ea1dc/test/simple/test-domains.js
20:17:13  <DrPizza>tradition
20:17:21  <piscisaureus>felixge: does it execute through the shell or or not?
20:17:23  <ryah>felixge: exec has a certain meaning for unix users
20:17:31  <ryah>which is not what we're doing
20:18:03  <ryah>felixge: that domains thing - it doesn't work - but it's envisioned for your upload problem
20:18:18  <ryah>think of it as light-weight contexts
20:18:20  <ryah>for i/o
20:18:45  <ryah>notice how the error is contained to the domain
20:18:49  <felixge>ohh
20:18:51  <ryah>and terminates the timer
20:18:57  <felixge>this is nice
20:19:08  <felixge>I assume it is envisioned to work even with embedded aysnc calls?
20:19:25  <ryah>yeah- any i/o which is started inside a domain stays in there
20:19:32  <felixge><3 !!
20:19:42  <ryah>including timers, child processes, http requests, accepted connections
20:19:52  <felixge>what's the ms cost of a domain gonna be?
20:19:59  <ryah>free more or less
20:20:05  <ryah>it's very cheap
20:20:12  <felixge>as in < 1ms?
20:20:16  <ryah>https://github.com/joyent/node/blob/74c6de1bbfdf2bcb5ec5c9fef1caa262b70ea1dc/lib/domain.js#L31
20:20:20  <ryah>yes
20:20:29  <piscisaureus>but you should be careful with accessing global state from withing a domain
20:20:36  <piscisaureus>because otherwise it may leak on domain termination
20:20:46  <piscisaureus>right?
20:20:48  <ryah>so it's going to blow up if you touch a handle which is in a different domain
20:20:51  <felixge>how do these domains work? v8 contexts?
20:20:55  <felixge>or isolates?
20:21:13  <ryah>no, it's just a bit of magic
20:21:17  <ryah>it doesn't use either construction
20:21:21  <ryah>it's just a set of handles
20:21:24  <ryah>that's why its so cheap
20:21:29  <felixge>ohh
20:21:44  <ryah>so bert's right - there are dangers here
20:22:01  <ryah>blowing up an a bad state is still bad
20:22:10  <felixge>I don't care about accessing handles from other domains
20:22:18  <felixge>as long as there is message passing
20:22:19  <ryah>but if you restrict your actions to stuff inside of a domain (which we will enforce for handles) should be okay
20:22:36  <piscisaureus>we should just document that
20:22:40  <felixge>that is cheap-enough message passing within the process
20:22:44  <ryah>so probably i'll have an option on net.Server which will allow new connections to start in their own domain
20:23:06  <ryah>message passing should be doable
20:23:08  <piscisaureus>ryah: if people really want to access global state from there they should have proper cleanup code in the domain error handler
20:23:10  <ryah>but i havent' started on that yet
20:23:31  <felixge>ryah: what about keep-alive?
20:23:47  <felixge>for me 1 domain / connection is totally fine
20:23:53  <felixge>some folks may want it for each request so
20:23:56  <felixge>not sure if that's doable
20:24:17  <ryah>i think we can probably hack the http server to have a domain per request
20:24:28  <ryah>we'll have to carefully move the connection handle from one domain to the next
20:24:46  <ryah>anyway - this idea isn't fully baked
20:24:49  <ryah>but it's a start
20:25:08  <felixge>this is awesome
20:25:30  <felixge>It will make it much much much easier to build node apps handling long running connections that must not be killed
20:26:00  <felixge>that is, not killed by problems caused from another connection within the same process
20:26:53  <felixge>ryah: back to exec stuff for a second, did you have any thoughts on my naming ideas for the child_process module? https://github.com/joyent/node/issues/1549
20:29:57  <piscisaureus>ryah: we could have a debugging mode switch that turns domains into their own contexts
20:30:09  <piscisaureus>so people can see if they are doing dangeous stuff
20:43:59  <ryah>felixge: i like your suggestion - but im not in the renaming mood at the moment
20:44:08  <ryah>felixge: there's too much other instability right now
20:44:14  <felixge>sure
20:44:20  <felixge>but would be nice before 0.6
20:44:29  <ryah>piscisaureus: yeah, maybe
20:45:01  <ryah>piscisaureus: to answer your question about why it passes a parameter to the new domain - it's because i probably will force people to only start domains in a new module
20:45:07  <ryah>piscisaureus: so they don't have any closures
20:45:19  <piscisaureus>oh, okay
20:45:22  <piscisaureus>hmm
20:45:23  <ryah>piscisaureus: to avoid the temptation to share variables with the outer scope
20:45:27  <piscisaureus>sounds reasonable
20:45:33  <piscisaureus>but maybe it's inconvenient
20:45:37  <ryah>process.startDomain("./handle-request")
20:45:51  <ryah>something like this
20:46:17  <ryah>we have to do the best we can to fake a separate memory space
20:46:24  <ryah>1) no closures - use modules
20:46:32  <ryah>2) blow up if accessing handles from other domains
20:46:47  <ryah>i think the combination of those two might solve 99% of the problem
20:47:41  <ryah>did you guys see thishttps://plus.google.com/111090511249453178320/posts/hJSKm6ra9wY
20:47:47  <ryah>https://plus.google.com/111090511249453178320/posts/hJSKm6ra9wY
20:51:20  <piscisaureus>oh nice, that makes me happy
20:54:48  <dmkbot>joyent/node: ry: SlowBuffer should be replaced with Int8Array - https://github.com/joyent/node/issues/1658
20:55:00  <felixge>nice post :)
20:55:49  <ryah>felixge: are you in sf?
20:56:04  <felixge>ryah: not yet, I'm coming in Thursday night
20:56:16  <felixge>But I'm in Atlanta, so I don't go to bed when you come online anymore
20:56:32  <ryah>felixge: you're missing node camp
20:56:36  <felixge>I know :(
20:56:52  <felixge>I didn't know I would be in the US until a few weeks ago
20:57:04  <felixge>some random microsoft evangelist set me up to go to their build conference in anaheim
20:57:10  <felixge>that is as a participant
20:57:23  <felixge>but they pay for all travel and hotel
20:57:32  <felixge>which is weird ... but I'm not complaining
20:57:52  <felixge>:)
20:57:54  <piscisaureus>build conf == a great way to score goodies
20:58:11  <felixge>piscisaureus: I also asked him to talk to their dutch evangelist team to get you in
20:58:18  <felixge>but I guess that didn't work out?
20:58:20  <piscisaureus>oh
20:58:23  <piscisaureus>no
20:58:26  <piscisaureus>never heard of them
20:58:28  <felixge>: /
20:58:37  <piscisaureus>doesn't matter much
20:58:39  <piscisaureus>I am having fun
20:58:43  <felixge>: )
20:59:07  <piscisaureus>But I wonder why they want you there so badly
20:59:07  <felixge>ryah: are you hacking on node on the weekend? Since I'll come in thursday night, that'd only leave friday otherwise
20:59:39  <ryah>felixge: yeah usually
20:59:45  <felixge>piscisaureus: well, they don't. I just was one of a bunch of random tech people in Germany he thought would be worthwhile to consider
20:59:56  <felixge>but everybody else seems to have not been interested
21:00:04  <ryah>felixge: what do you have planned?
21:00:05  <piscisaureus>ghe
21:00:09  <ryah>felixge: maybe we should go on a trip
21:00:38  <felixge>ryah: My plan was to hack on node and maybe meet a few people while I'm in SF
21:00:44  * mralephquit (Quit: Leaving.)
21:00:46  <felixge>what kind of trip are you thinking about?
21:00:49  <felixge>I'm pretty flexible
21:01:11  <felixge>Just got to be at the airport on Monday morning to head down to L.A. / Anaheim
21:01:25  <ryah>not sure
21:01:30  <ryah>we could rent a car and go somewhere
21:02:01  <ryah>hm
21:02:05  <felixge>big sur is nice : p
21:02:39  <felixge>I mean wherever we can hack on node is fine with me
21:03:05  <felixge>having fun while doing so is a welcome bonus so :)
21:03:22  <ryah>i got some work to do thrusday but i can take friday off - hmm
21:03:40  <ryah>i'll discuss with lisa while we're at node camp - see if we can come up with something
21:05:15  <felixge>ryah: cool. My plane lands at 6:37pm in SF
21:05:19  <felixge>on Thursday
21:06:25  <ryah>felixge: my number is 415-812-2449
21:06:47  <ryah>lisa's number is 415-205-0766
21:07:16  <ryah>i'll email you that
21:07:32  * mralephjoined
21:07:53  <felixge>thanks! If you have suggestions for getting to your place that would also be nice (as in: take a cap, or use this train or sth)
21:08:06  <ryah>felixge: take the bart to 24th street
21:08:17  <ryah>(train)
21:09:29  <felixge>ok, are there multiple lines? or just one line?
21:09:37  <ryah>just one
21:09:51  <ryah>any train going to SF will go to 24th
21:10:20  <ryah>my house is one block from 24th street bart
21:10:50  <felixge>cool, that should be doable :)
21:10:52  <felixge>thanks
21:12:47  <felixge>ryah: in libuv the user is supposed to allocate all memory needed for something, right?
21:13:13  <ryah>felixge: yeah
21:13:19  <felixge>ok, cool
21:13:43  <mraleph>ryah: (I am always forgeting to tell you) you should do handle_.MarkIndependent when you do handle_.MakeWeak https://github.com/joyent/node/blob/master/src/node_object_wrap.h#L69 this will shave off GC overhead for shortlived buffers.
21:14:46  <mraleph>it was a huge win on webgl based things (e.g. mozilla's Flight of the Navigator demo) when we started doing that for typed arrays in WebKit bindings layer.
21:15:25  <ryah>mraleph: doing it now - thanks
21:16:22  <mraleph>it will not improve anything on long lived stuff unfortunately...
21:16:38  <ryah>short lived buffers are problems for us
21:16:44  <ryah>i believe
21:17:27  <mraleph>yeah their lifetime might be artifiically prolonged by V8 until the next major GC unless you mark them
21:19:55  <ryah>mraleph: so i started on a new idea of "cheap contexts"
21:19:59  <ryah>fake contexts
21:20:09  <mraleph>interesting
21:20:37  <ryah>mraleph: calling them domains - https://github.com/joyent/node/blob/74c6de1bbfdf2bcb5ec5c9fef1caa262b70ea1dc/test/simple/test-domains.js
21:21:06  <ryah>mraleph: any i/o which is started in a domain (timer, child process, outbound connections, etc) stays in that domain
21:21:18  <ryah>and when a domain is terminated all i/o associated with it is cleaned up
21:21:36  <mraleph>nice
21:21:44  <mraleph>api seems pretty clean
21:23:01  <mraleph>btw ryah are going to jsconf.eu or only to GOTO?
21:23:15  <ryah>only goto
21:24:11  <mraleph>k
21:25:59  <ryah>mraleph: i want to brain storm about post-mortem debugging with you and erik at goto, if we have a chance
21:26:23  <ryah>mraleph: we really need coredumps of some sort
21:26:49  <mraleph>I will not be attending GOTO (cause it's freakishly expensive) but Erik will be there.
21:27:16  <ryah>mraleph: perhaps over dinner?
21:27:28  <mraleph>thats sounds good
21:31:11  * dmkbotquit (Remote host closed the connection)
21:31:30  * dmkbotjoined
21:35:50  * dmkbotquit (Remote host closed the connection)
21:36:09  * dmkbotjoined
21:37:21  * dmkbotquit (Remote host closed the connection)
21:37:40  * dmkbotjoined
21:39:26  <piscisaureus>mraleph: hey
21:39:41  <mraleph>piscisaureus: \o/
21:40:13  <piscisaureus>mraleph: I figured out why writing a long cons string is so slow
21:40:31  <mraleph>yep saw that. nice analysis
21:40:41  <piscisaureus>oh you saw it in the logs?
21:40:46  <mraleph>yep
21:40:48  <CIA-52>node: Ryan Dahl master * r061811f / src/node_object_wrap.h : ObjectWraps should be MarkIndependent - http://git.io/HSU_FA
21:40:53  <piscisaureus>mraleph: ok, good
21:40:56  <piscisaureus>is there any way we can fix this?
21:41:33  <piscisaureus>I was thinking about caching the current cons "piece" pointer in ConsString::ConsStringReadBlock
21:41:41  * bnoordhuislocks #1656
21:41:59  <mraleph>oh
21:42:02  <piscisaureus>but you'd have to clear the cache when you change the string or the gc starts moving objects around
21:42:15  <piscisaureus>and I don't know how to do that
21:42:32  <mraleph>piscisaureus: I am not sure we want complicate things there
21:42:56  <mraleph>piscisaureus: let me chat with colleagues tomorrow
21:43:05  <piscisaureus>ok, nice
21:43:10  <piscisaureus>I am going to bug you about it :-)
21:44:09  <piscisaureus>mraleph: btw I liked the java-vs-node bench debunking post
21:44:13  <piscisaureus>way to go :-)
21:44:37  <mraleph>hehe thanks
21:45:19  <piscisaureus>although it didn't tell anything about the quality of the vm
21:45:29  <piscisaureus>what you did is make an io-bound bench even more io-bound
21:45:52  * bnoordhuislocks #1657 as well
21:47:49  <CIA-52>libuv: Ben Noordhuis master * rd917610 / src/unix/fs.c : unix: fix event loop not being unref'd on eio error - http://git.io/b_LNsw
21:47:49  <CIA-52>libuv: Ben Noordhuis master * ra9ba756 / src/unix/fs.c : unix: fix warning: comparison between signed and unsigned integer expressions - http://git.io/g_cQhA
21:47:49  <CIA-52>libuv: Ben Noordhuis master * rbb0c6e6 / (5 files in 2 dirs): unix: move linux feature detection macros to internal.h - http://git.io/471NbQ
21:48:50  <ryah>bnoordhuis++
21:56:03  <piscisaureus>DrPizza: https://github.com/DrPizza/node/commit/172f4b8a5d2134d22da1
21:56:10  <piscisaureus>DrPizza: are you sure about that?
21:56:21  <DrPizza>quite
21:56:31  <DrPizza>vista enables quickedit by default
21:56:36  <DrPizza>7 disabled it again, but I turned it on
21:56:44  <DrPizza>and node always disables it
21:56:46  <piscisaureus>I'd like it on too
21:56:52  <piscisaureus>how do I do that?
21:56:55  <DrPizza>I think this does the right thing
21:57:09  <DrPizza>open an administrator command prompt
21:57:13  <DrPizza>right click the title
21:57:15  <DrPizza>properties
21:57:21  <DrPizza>options tab
21:57:24  <DrPizza>tick quickedit mode
21:57:29  <DrPizza>OK out
21:57:32  <DrPizza>it should update the shortcut
21:57:37  <dmkbot>joyent/node: isaacs: [windows] path.dirname('C:\') should be 'C:\', but is 'C:' instead - https://github.com/joyent/node/issues/650
21:57:40  <DrPizza>(gotta do it as administrator, because the shortcut is shared between all users)
21:58:23  <DrPizza>piscisaureus: the only "gotcha" is that if node starts reading mouse input then we might have to force it off for the duration (though we should still restore it at the end)
21:58:31  <DrPizza>but I think it's unlikely that node will want mouse input.
21:58:41  <piscisaureus>DrPizza: it seems very unlikely indeed
21:58:49  <DrPizza>this is why win7 had to revert the vista change
21:58:50  <piscisaureus>I mean, you want mouse, write yourself a gui app right?
21:58:56  <DrPizza>indeed
21:59:18  <DrPizza>piscisaureus: anyway, if you run node now (maybe only the REPL) it'll turn off quickedit
21:59:25  <DrPizza>with that change it seems to properly preserve the setting
21:59:30  <piscisaureus>DrPizza: yes, I just verified that :-)
21:59:49  <DrPizza>you can maybe think of a better name than "natural" mode
21:59:58  <DrPizza>by "natural" I just meant the mode that the user has configured for his own console"
22:00:13  <piscisaureus>originalMode?
22:00:22  <piscisaureus>DrPizza: *shrug*
22:00:27  <DrPizza>yeah I don't mind the name
22:00:31  <DrPizza>anyway, I do think the change shuld be included
22:00:40  <piscisaureus>this will move to libuv in due time anyway
22:00:48  <DrPizza>yes probably
22:00:50  <piscisaureus>I'm just landing it so we don't forget and we can close the issue now
22:00:52  <DrPizza>ok cool
22:01:23  <piscisaureus>I like vcbuild.bat a lot when doing this work
22:02:58  <piscisaureus>DrPizza: https://github.com/joyent/node/issues/1445
22:03:01  <DrPizza>piscisaureus: did you ever get a chance to use that change where it suspends child processes if a debugger is attached, to give an opportunity to attach?
22:03:16  <DrPizza>piscisaureus: oh gosh yes I was going to look at that
22:03:18  <piscisaureus>DrPizza: no, not so far
22:03:21  <DrPizza>then igorzi broke the build and I got waylaid
22:04:41  <DrPizza>piscisaureus: I don't see any problem
22:04:45  <DrPizza>it's still a C string
22:04:51  <DrPizza>you still need to double up your backslashes
22:05:13  <piscisaureus>DrPizza: so you mean you get "c:a b" instead of "c:\a"
22:05:23  <piscisaureus>DrPizza: is it invalid
22:05:24  <DrPizza>for the first and third lines
22:05:28  <piscisaureus>yes
22:05:29  <DrPizza>I get c:a b
22:05:36  <piscisaureus>seems right
22:05:44  <DrPizza>because javascript swallows teh \a and turns it into just a
22:05:45  <piscisaureus>put a comment there, I'll close it
22:05:48  <DrPizza>ok
22:05:49  <piscisaureus>yes indeed
22:07:37  <dmkbot>joyent/node: DrPizza: Node clobbers Quick Edit mode on Win32 consoles - https://github.com/joyent/node/issues/1429
22:07:39  <dmkbot>joyent/node: Bonuspunkt: cant enter @{[]}~ at REPL on windows - https://github.com/joyent/node/issues/1359
22:08:32  <DrPizza>piscisaureus: ok commented on 1445, I think it's safe to close
22:09:18  <piscisaureus>#1641 is also fixed afaik
22:09:32  <DrPizza>oh gosh mingw
22:09:45  <piscisaureus>DrPizza: I fixed that
22:10:01  <piscisaureus>I was having
22:10:01  <piscisaureus>struct foo {
22:10:01  <piscisaureus> ares_channel ares_channel;
22:10:01  <piscisaureus>};
22:10:10  <piscisaureus>that worked fine in gcc but not g++
22:10:15  <DrPizza>heh
22:10:22  <piscisaureus>so g++ would bust if we included uv-win.h
22:10:25  <DrPizza>aah
22:11:01  <DrPizza>is it not possible to make mingw use standard WDK/PSDK headers so that at least we don't have to worry about missing structures/constants/etc.?
22:12:21  <piscisaureus>DrPizza: ppl would have to download the sdk
22:12:37  <piscisaureus>DrPizza: but Just Dont Worry™
22:12:37  <dmkbot>joyent/node: geki007: bad escaping with exec on windows - https://github.com/joyent/node/issues/1445
22:12:52  <piscisaureus>it's okay to break mingw every now and then
22:12:59  <DrPizza>ok.
22:13:26  <piscisaureus>DrPizza: if you don't feel like adding definitions, I'll do it for you
22:13:45  <DrPizza>actually the one I had to add most recently wasn't in the PSDK either so I guess it's not a mingw-specific problem
22:13:49  <DrPizza>had to take a defintion from the DDK
22:13:55  <piscisaureus>Yes
22:14:14  <piscisaureus>But I don't want to force-feed people the ddk
22:14:23  <DrPizza>no
22:14:24  <piscisaureus>DrPizza: there's even stuff now that is not even in the ddk
22:14:28  <DrPizza>yeah
22:14:39  <piscisaureus>some headers are from reactos
22:14:42  <piscisaureus>some headers are ...
22:16:47  <piscisaureus>DrPizza: would it not be able to just drop the ENABLE_EXTENDED_FLAGS from all SetConsoleMode calls?
22:16:50  <piscisaureus>I think that would work
22:17:28  <CIA-52>libuv: Ben Noordhuis master * refcd273 / (src/unix/error.c src/unix/fs.c src/unix/internal.h): unix: translate fs errno codes to libuv error codes - http://git.io/3hhTmg
22:17:29  <DrPizza>I think if you have no ENABLE_EXTENDED_FLAGS it will clear quickedit, won't it?
22:17:54  <DrPizza>or does it preserve quickedit if you set new flags and don't set enable_extended_flags?
22:17:57  <piscisaureus>DrPizza: if you don't set it it will not change it
22:18:01  <DrPizza>really?
22:18:05  <DrPizza>look at the old code
22:18:11  <DrPizza>that is not setting ENABLED_EXTENDED_FLAGS
22:18:15  <DrPizza>and it is clearing quickedit
22:18:33  <piscisaureus>hmm
22:18:35  <piscisaureus>that's weird
22:18:49  <piscisaureus>maybe ENABLE_PROCESSED_INPUT includes it
22:19:05  <piscisaureus>hmm no
22:19:09  <bnoordhuis>piscisaureus: https://github.com/bnoordhuis/libuv/compare/ENOENT <- acceptable? we need to translate fs error codes to libuv codes
22:19:55  <piscisaureus>bnoordhuis: ENOENT is fine
22:20:03  <piscisaureus>bnoordhuis: we'll need to work on this on the windows side
22:20:13  <piscisaureus>uv_translate_sys_error doesn't work with CRT errors
22:20:28  <piscisaureus>or rather, we should move away from the crt :-)
22:20:47  <bnoordhuis>can i commit it without breaking things too bad on windows?
22:20:56  <piscisaureus>bnoordhuis: just some bad probably
22:20:59  <piscisaureus>do it
22:21:20  <piscisaureus>whatever, it *shows* an bug, doesn't *create* one
22:21:25  <CIA-52>libuv: Ben Noordhuis master * rb7d8807 / (5 files in 4 dirs): fs: add UV_ENOENT error code, add test - http://git.io/FPPivA
22:21:42  <piscisaureus>DrPizza: ENABLE_QUICK_EDIT_MODE 0x0040 This flag enables the user to use the mouse to select and edit text. To enable this mode, use ENABLE_QUICK_EDIT_MODE | ENABLE_EXTENDED_FLAGS. To disable this mode, use ENABLE_EXTENDED_FLAGS without this flag.
22:21:43  <piscisaureus>:-/
22:22:14  <DrPizza>piscisaureus: huh weird
22:22:18  <DrPizza>but it is getting disabled!
22:23:22  <piscisaureus>yes, I can see that
22:23:50  <DrPizza>I think the docs must be in error
22:23:54  <DrPizza>v. unusual
22:24:01  <ryah>taking off. see you guys on thursday.
22:24:17  * ryahquit (Quit: leaving)
22:24:52  <piscisaureus>ryah: later!
22:25:18  <piscisaureus>DrPizza: it's prolly the mouse input that does it anyway
22:27:40  <DrPizza>possible
22:27:50  <piscisaureus>I'm landing the patch
22:27:57  <DrPizza>cool
22:29:34  <bnoordhuis>piscisaureus: should the sync fs functions set req.errorno?
22:29:47  <piscisaureus>I don't know ?
22:29:52  <piscisaureus>ask igor :-)
22:30:00  <piscisaureus>is req.errorno private?
22:30:02  <piscisaureus>(internal)
22:30:04  <piscisaureus>I guess so
22:30:08  <piscisaureus>in that case it shouldn't matter
22:30:10  <bnoordhuis>not private, no
22:30:15  <bnoordhuis>unix doesn't, windows doesn't either
22:30:24  <piscisaureus>then probably it should right?
22:30:38  <piscisaureus>I am not really up to date on the fs stuff
22:30:47  <bnoordhuis>oh okay, i should've asked ryah :)
22:30:55  <bnoordhuis>no worries, i'll figure it out
22:30:55  <piscisaureus>yes
22:30:58  <piscisaureus>too late
22:31:00  <piscisaureus>hahahahaha
22:31:05  <piscisaureus>muhahahaha
22:31:18  <piscisaureus>\o/ ryah is away
22:31:23  <piscisaureus>let's do nothing and drink beer
22:31:31  <bnoordhuis>quick! let's rewrite node in java!
22:31:41  <piscisaureus>yes
22:31:43  <DrPizza>reintroduce promises
22:31:44  <DrPizza>for a nice surprise
22:31:47  <DrPizza>when he get sback
22:31:50  <piscisaureus>heh
22:31:53  <piscisaureus>ryah is already doing that
22:31:59  <DrPizza>heh
22:32:00  <piscisaureus>I was thinking, landing fibers in core
22:32:07  <DrPizza>fibres?
22:32:10  <DrPizza>NT fibres?
22:32:17  <bnoordhuis>hah, i think we'll be getting that eventually anyway
22:32:28  <piscisaureus>no not nt fibers
22:32:30  <bnoordhuis>DrPizza: no, more like threadlets or v8 isolates
22:32:34  <piscisaureus>ugh
22:32:38  * piscisaureuspukes
22:32:46  <DrPizza>sounds like a job for NT fibres
22:32:48  <piscisaureus>bnoordhuis: no I want laverdet's fibers
22:33:12  <piscisaureus>DrPizza: NT fibers suck dick. If anything, use win7 user-mode scheduling
22:33:17  <DrPizza>only 64-bit
22:33:21  <DrPizza>rather narrow application unfortunately
22:33:26  <piscisaureus>yes
22:33:29  <bnoordhuis>his module is coroutine based, i think?
22:33:34  <DrPizza>though UMS is pretty cool
22:33:40  <DrPizza>since you can trap entry into k-mode etc
22:33:54  <bnoordhuis>yes - it uses libcoro
22:34:08  <piscisaureus>bnoordhuis: I think he swaps threads
22:34:15  <piscisaureus>but I don't really know how it works
22:34:25  <piscisaureus>but bnoordhuis, we're *not* getting fibers
22:34:56  <bnoordhuis>okay, but we're probably getting threadlets / greenlets / whatever you call them
22:37:32  <piscisaureus>bnoordhuis: it will only be acceptable to me if it allows you to use multiple cores
22:37:37  <piscisaureus>maybe
22:37:49  <piscisaureus>bnoordhuis: but why do you expect it to happen?
22:37:58  <piscisaureus>I think that even if we wanted it v8 wouldn't let us
22:38:15  <bnoordhuis>piscisaureus: what are isolates for?
22:38:31  <piscisaureus>bnoordhuis: isolates are just like multiplicity in uv
22:38:45  <piscisaureus>you can have multiple VMs in one machine
22:39:01  <bnoordhuis>right, you can't have shared state
22:39:02  <piscisaureus>but they're *completely* separated
22:39:11  <DrPizza>one VM per thread
22:39:11  <bnoordhuis>maybe greenlets or threadlets is a bad name for it
22:39:14  <DrPizza>threads instead of processes
22:39:27  <DrPizza>64-bit for all
22:41:43  <piscisaureus>DrPizza: it worked 5 minutes ago
22:41:52  <piscisaureus>but now node is still clobbering quick edit mode :-(
22:41:55  <DrPizza>wtf
22:42:25  <DrPizza>well
22:42:40  <DrPizza>merge the patch and then I can take a look at it
22:43:00  <piscisaureus>I must have fucked up somewhere :-/
22:43:19  <DrPizza>it's possible something else may have changed since I wrote that code too
22:44:46  <CIA-52>node: Peter Bright master * rde97899 / src/node_stdio_win32.cc :
22:44:46  <CIA-52>node: windows: it's rude to clobber quick edit mode
22:44:46  <CIA-52>node: Closes #1429 - http://git.io/athJbQ
22:45:15  <piscisaureus>DrPizza: ^
22:45:20  <DrPizza>ok cool
22:45:25  <DrPizza>I may not be able to look tonight
22:46:14  <CIA-52>libuv: Bert Belder master * r58ef43e / (src/uv-common.h src/win/fs.c): win: use win32 api for file reading and writing - http://git.io/kTbEsg
22:49:48  * mralephquit (Quit: Leaving.)
22:54:20  * ryahjoined
22:57:37  <dmkbot>joyent/libuv: tshinnic: alternative test callback checking: shorter, more informative - https://github.com/joyent/libuv/issues/178
22:57:39  <dmkbot>joyent/node: adammw: EV_DEFAULT_UC / ev_unref / ev_ref undeclared in node_net.cc - https://github.com/joyent/node/issues/1452
22:58:41  <piscisaureus>DrPizza: did a full clean/rebuild cycle, now your patch works again
22:58:50  <DrPizza>that's worrying
23:02:37  <dmkbot>joyent/node: fprijate: Wrong fs.stat size on win32 - https://github.com/joyent/node/issues/1647
23:04:32  * ryahquit (Quit: Lost terminal)
23:05:29  <piscisaureus>DrPizza: now this is worrying: https://github.com/joyent/node/issues/1438
23:05:33  <piscisaureus>I can confirm that
23:06:29  <DrPizza>hm
23:06:44  <DrPizza>I don't know if I can even spawn regedit because I'm running as an admin, so I get UAC prmpted
23:06:45  <DrPizza>prompted
23:06:59  <piscisaureus>Then try notepad
23:07:20  <DrPizza>regedit: stderr: CreateProcessW: The requested operation requires elevation.
23:07:42  <DrPizza>piscisaureus: that works?
23:07:57  <piscisaureus>DrPizza: the bug still shows
23:08:05  <DrPizza>weird
23:08:16  <piscisaureus>(so you're spawning notepad and calc)
23:08:19  <DrPizza>yeah
23:08:23  <DrPizza>yes I see
23:08:25  <DrPizza>I can repro it
23:08:27  <DrPizza>but I can't understand it
23:08:28  <DrPizza>at all
23:08:34  <piscisaureus>may be an issue with wait thread juggling in libuv
23:12:37  <dmkbot>joyent/node: geki007: windows: spawn process: close order shouldn't important - https://github.com/joyent/node/issues/1438
23:16:05  <piscisaureus>DrPizza: there's memory corruption going on
23:16:21  <piscisaureus>DrPizza: try this in the node debug build: https://gist.github.com/1196144
23:16:36  <piscisaureus>oh ghe there's a bug in it also
23:17:03  <DrPizza>"ghe"?
23:17:11  <piscisaureus>ghe ghe
23:17:13  <piscisaureus>it's giggles
23:17:22  <piscisaureus>DrPizza: never mind about the memory corruption
23:17:38  <DrPizza>oh?
23:17:41  <piscisaureus>that just happens when you pass a function to spawn
23:17:45  <DrPizza>oh
23:17:47  <DrPizza>well
23:17:47  <piscisaureus>it is *also* a bug
23:17:50  <DrPizza>yes
23:17:52  <DrPizza>but not this bug
23:21:45  <DrPizza>so how does it wait for the process exit
23:21:49  <DrPizza>it registers a wait in the thread pool?
23:21:54  <piscisaureus>yes
23:21:59  <piscisaureus>In the wait thread pool
23:22:00  <DrPizza>(I'm doing some work on my laptop at the moment so I don't have my IDE available)
23:22:10  <piscisaureus>RegisterWaitForSingleObject
23:22:13  <DrPizza>right
23:22:21  <piscisaureus>and the callback does nothing but post a req to the iocp
23:22:37  <dmkbot>joyent/node: ry: test-net-connect-handle-econnrefused and test-fs-open.js broken - https://github.com/joyent/node/issues/1657
23:22:39  <dmkbot>joyent/node: ry: test-fs-utimes broken on master - https://github.com/joyent/node/issues/1656
23:23:19  <DrPizza>piscisaureus: and the registrations are occurring properly and calling their callbacks at the riht time?
23:23:35  <piscisaureus>Don't know, trying to figure that out
23:23:39  <DrPizza>hm
23:27:37  <dmkbot>joyent/node: piscisaureus: windows/spawn asserts w/ invalid argument - https://github.com/joyent/node/issues/1659
23:32:37  <dmkbot>joyent/node: piscisaureus: windows/spawn asserts w/ invalid argument - https://github.com/joyent/node/issues/1659
23:34:41  <piscisaureus>DrPizza: RegisterWaitForSingleObject is working fine
23:45:40  <DrPizza>and the threadpool is waking at the right time?
23:45:43  <piscisaureus>yes
23:45:48  <piscisaureus>it seems to be a bug in the bindings
23:45:51  <DrPizza>hmm
23:46:00  <DrPizza>so libuv is dequeuing thenotification properly
23:47:51  <piscisaureus>node waits until the stdio pipes are closed
23:48:02  <piscisaureus>it seems that they are not properly closed
23:48:07  <DrPizza>rather than processexit?
23:48:36  <piscisaureus>DrPizza: it waits for everything
23:48:46  <piscisaureus>the process to exit and the pipes to close
23:48:48  <DrPizza>hmmm
23:48:59  <piscisaureus>that makes sense, it guarantees that you read all data before you get the exit event
23:49:20  <DrPizza>I can think of some weird possibilities
23:49:24  <piscisaureus>but somehow the child end of the pipe is not closed properly, or libuv is not picking up the signal
23:49:49  <DrPizza>a GUI mode processprobably won't closethe pipes explicitly
23:49:53  <DrPizza>probably doesn't even know they're there
23:50:01  <DrPizza>so they'll only close when the process gets torn down
23:50:04  <DrPizza>(guessing)
23:50:16  <piscisaureus>DrPizza: if the pipe is still open when the child exits node closes it
23:50:21  <piscisaureus>that imho is not right btw
23:50:31  <DrPizza>oh node's end needs closing
23:50:34  <DrPizza>I meant the remote end
23:50:36  <piscisaureus>no the child's end
23:50:36  <DrPizza>the process's end
23:50:41  <DrPizza>oh it closes both ends?
23:50:43  <DrPizza>that can't beright
23:50:48  <piscisaureus>node's end needs to see that the child's end has closed it
23:51:07  <piscisaureus>DrPizza: but we should also close the child end right after spawning the child
23:51:12  <DrPizza>yes
23:51:22  <DrPizza>the child should have the duplicated handle that the system makes
23:51:27  <piscisaureus>exactly
23:51:59  <piscisaureus>But I don't see how that affects this but right now
23:52:06  <piscisaureus>probably not it
23:52:14  <DrPizza>no
23:57:10  <piscisaureus>DrPizza: I think those programs are not closing their own stdio pipes
23:57:18  <DrPizza>I don't blame them
23:57:25  <DrPizza>GUI programs don't expect to have to
23:57:26  <piscisaureus>and windows will not close them until we call CloseHandle(process_handle)
23:57:29  <DrPizza>yeah
23:57:51  <piscisaureus>but that's not done because libuv waits for the child pipes to close
23:57:59  <DrPizza>then why isit firing sometimes
23:58:25  <piscisaureus>because node is exiting?
23:58:36  <piscisaureus>hmm no idea
23:58:37  <piscisaureus>let me try
23:58:42  <DrPizza>no I was running it at the repl
23:59:08  <piscisaureus>DrPizza! off course
23:59:14  <piscisaureus>the other 2 processes inherit the handle as well
23:59:19  <DrPizza>the same handle?
23:59:24  <piscisaureus>because their inheritance mode is not properly reset
23:59:25  <DrPizza>so the first exits
23:59:30  <DrPizza>and closes the handles
23:59:32  <DrPizza>or the second exits
23:59:33  <DrPizza>whichever
23:59:36  <DrPizza>that's why it's order dependent
23:59:41  <DrPizza>one tears down the handle for all the others?
23:59:43  <piscisaureus>yes if bInheritHandles is true then the child inherits *all* handles