00:20:27  * bnoordhuisquit (Ping timeout: 272 seconds)
00:33:03  * dylukesjoined
00:39:42  * theColejoined
00:40:40  * isaacsquit (Remote host closed the connection)
00:41:28  * orlandovftwquit (Ping timeout: 244 seconds)
00:49:03  * dapquit (Quit: Leaving.)
01:20:42  * orlandovftwjoined
01:34:36  * pijewskiquit (Quit: Leaving.)
01:34:56  * theColequit (Quit: theCole)
01:35:30  * coderarityquit (Quit: coderarity)
01:36:13  * brsonquit (Quit: leaving)
01:37:16  * coderarityjoined
01:49:28  * orlandovftwquit (Ping timeout: 246 seconds)
01:55:52  * abraxasjoined
02:09:11  * orlandovftwjoined
02:18:15  * stephankquit (Ping timeout: 272 seconds)
02:19:49  * stephankjoined
02:27:37  * orlandovftwquit (Ping timeout: 246 seconds)
03:17:38  * isaacsjoined
03:27:09  * coderarityquit (Quit: coderarity)
03:51:29  * mikealjoined
03:54:34  * dylukesquit (Quit: Computer has gone to sleep.)
03:59:35  * dylukesjoined
03:59:38  * dylukesquit (Remote host closed the connection)
04:10:02  * mikealquit (Quit: Leaving.)
04:13:39  * bulatshakirzyanojoined
04:25:08  * mikealjoined
04:41:48  * mikealquit (Quit: Leaving.)
04:46:55  * dshaw_quit (Quit: Leaving.)
04:49:44  * isaacsquit (Remote host closed the connection)
04:54:03  * orlandovftwjoined
04:58:58  * isaacsjoined
05:13:42  * isaacsquit (Remote host closed the connection)
05:17:18  * mikealjoined
05:32:10  * TooTallNatequit (Quit: Leaving...)
06:02:29  * paddybyersjoined
06:13:37  * mikealquit (Quit: Leaving.)
06:45:05  * stephankquit (Quit: *Poof!*)
07:43:04  * orlandovftwquit (Ping timeout: 244 seconds)
07:49:53  * rendarjoined
09:48:44  * bulatshakirzyanoquit (Quit: Computer has gone to sleep.)
10:24:20  * piscisaureus_joined
10:24:25  <piscisaureus_>hello
10:49:24  * paddybyersquit (Quit: paddybyers)
10:54:14  * coderarityjoined
10:59:18  * mjr_quit (Read error: Connection reset by peer)
10:59:38  * mjr_joined
11:30:40  * abraxasquit (Remote host closed the connection)
11:31:12  * abraxasjoined
11:35:51  * abraxasquit (Ping timeout: 248 seconds)
12:05:32  * bnoordhuisjoined
12:19:52  <CIA-155>node: domenic master * r5bc07cc / doc/api/stream.markdown : doc: note that `stream.pause` is advisory - http://git.io/cgELdg
12:19:53  <CIA-155>node: Kyle Robinson Young master * r7cd1690 / doc/api/fs.markdown : doc: add cache argument to fs.realpath() - http://git.io/vmqwHQ
12:30:33  <bnoordhuis>piscisaureus_: what are you working on, bertje?
12:30:47  <piscisaureus_>bnoordhuis: uv__slow_poll_process_poll_req
12:30:55  <bnoordhuis>sounds intriguing
12:31:33  <piscisaureus_>bnoordhuis: for more details, join the standup :-p
12:31:37  <bnoordhuis>tjfontaine: i'll probably land your dns patch in 0.9
12:31:47  <bnoordhuis>piscisaureus_: maybe i will
12:31:55  <piscisaureus_>bnoordhuis: after this I will work on the spawn fds stings
12:31:58  <piscisaureus_>*thing
12:32:04  <piscisaureus_>bnoordhuis: why do we still have IOWatcher in node?
12:32:57  <bnoordhuis>piscisaureus_: i'm not sure actually, i find it surprising too
12:33:37  <piscisaureus_>bnoordhuis: I think node_mdns uses it. But, sigh
12:38:01  * wankdankerquit (Ping timeout: 276 seconds)
12:40:43  <pfox___>hey.. is the behavior defined for calling uv_async_send on a uv_async_t*, post-uv_close, and before/after the uv_close_cb is invoked .. as long as its not deallocated?
12:43:42  <bnoordhuis>pfox___: i don't think so
12:44:00  <bnoordhuis>it will probably work on unices but i'm not sure about windows
12:44:48  <piscisaureus_>pfox___: doing so would probably club some seals.
12:44:51  <piscisaureus_>pfox___: on windows
12:44:53  <pfox___>well i guess ill find out soon enough. thanks :)
12:44:57  <piscisaureus_>pfox___: I would not recommend doing it
12:45:20  <pfox___>like segfault-level seal clubbing?
12:45:24  <pfox___>i don't care if the loop wakes up
12:45:25  <piscisaureus_>yes
12:45:30  <piscisaureus_>oh h,,
12:45:33  <piscisaureus_>hmm
12:45:39  <piscisaureus_>let's look at the code
12:46:46  <piscisaureus_>pfox___: yes, bad
12:47:36  <pfox___>ok. thanks.
12:52:01  * pfox___quit (Ping timeout: 246 seconds)
13:04:38  * paddybyersjoined
13:20:06  <bnoordhuis>test-async doesn't strike me as a great test, lots of things that only work accidentally
13:20:52  <piscisaureus_>bnoordhuis: it has race conditions
13:21:04  <piscisaureus_>bnoordhuis: that's why it fails intermittently on windows
13:22:02  <piscisaureus_>bnoordhuis: maybe you can improve the test :-)
13:23:39  <bnoordhuis>working on it
14:00:10  <bnoordhuis>piscisaureus_: https://github.com/bnoordhuis/libuv/commit/5345ee3
14:16:39  * wankdankerjoined
14:25:11  * mmalecki[zzz]changed nick to mmalecki
14:32:12  * pfox___joined
14:33:21  <tjfontaine>bnoordhuis: oh excellent
14:40:11  * isaacsjoined
14:45:13  <CIA-155>libuv: Ben Noordhuis master * r5345ee3 / (4 files): test: fix race conditions in test-async - http://git.io/m-cKlg
14:46:12  * CoverSlidejoined
14:47:13  * travis-cijoined
14:47:13  <travis-ci>[travis-ci] joyent/libuv#201 (master - 5345ee3 : Ben Noordhuis): The build is still failing.
14:47:13  <travis-ci>[travis-ci] Change view : https://github.com/joyent/libuv/compare/d5e7786...5345ee3
14:47:13  <travis-ci>[travis-ci] Build details : http://travis-ci.org/joyent/libuv/builds/1112416
14:47:13  * travis-cipart
15:11:55  <CIA-155>node: Kyle Robinson Young master * r718aa50 / doc/api/globals.markdown :
15:11:55  <CIA-155>node: doc: add require.extensions to globals
15:11:55  <CIA-155>node: Closes #3028 - http://git.io/RZe3ow
15:34:10  <isaacs>good morning
15:34:13  <isaacs>going to do a 0.7.8 release today
15:41:49  <creationix>isaacs, cool
15:41:53  <creationix>that has domains in it right?
15:42:17  * creationixdoesn't follow the 0.7.x releases as close
15:42:35  <isaacs>creationix: haven't gotten a lgtm from any core committers on that yet.
15:42:39  <isaacs>but it could!
15:42:57  <creationix>I wonder if I could do something like domains for luvit
15:43:15  <creationix>I have multiple lua states that are kinda like isolates, and I have all of libuv
15:43:21  <creationix>is there anything else I need?
15:43:22  <isaacs>bnoordhuis, igorzi, TooTallNate, piscisaureus_: Can I get a LGTM on domains? (I'd smoosh some of the commits a little bit, or maybe do a --no-ff so it's easier to revert if we have issues later)
15:43:37  <isaacs>bnoordhuis: the issues you brought up should be fixed now.
15:44:10  <bnoordhuis>isaacs: okay, give me a sec to review it
15:44:32  <bnoordhuis>btw, did you guys know that plan9 has a graphical installer? it was so ahead of its time!
15:44:51  <isaacs>rad!
15:45:48  <isaacs>bnoordhuis: thanks for fixing the openssl link issue.
15:45:57  <bnoordhuis>oh, np
15:47:04  <isaacs>bnoordhuis: the three commits at the bottom are new since your last review https://github.com/joyent/node/pull/3109#commits-pushed-0585224
15:47:38  * stephankjoined
15:47:38  <isaacs>oh, whoops, and d74e6508c5fbc3f2dba877c6b8977b8539fe9212 is wrong. should return after FatalException
15:48:44  <isaacs>ok, fixed on 09f5816224158e6f7b2afab3766b61ad9e400cb2
15:51:53  <bnoordhuis>isaacs: silly question: how do you know that all actions in the domain have completed?
15:52:04  <isaacs>bnoordhuis: you don't
15:52:33  <bnoordhuis>isaacs: okay. when would one call domain.dispose()?
15:52:41  <isaacs>bnoordhuis: there's really no way to get that, without them somehow registering themselves on teh domain object (instead ofjust saving a reference to the domain object), and that's way too expensive.
15:53:33  <isaacs>you'd call domain.dispose() when you want to clear/close/destroy all the *explicitly* added EEs and timers, and prevent any more activity from happening on that domain
15:53:55  <isaacs>so, any other stuff that comes back, when it sees that the domain is disposed, will just stop.
15:54:15  <isaacs>i suspect that we can go a bit further with uv_walk, but i'm not sure.
15:55:01  <bnoordhuis>okay. you've probably thought more about this than i did so i assume it's sound
15:55:05  <isaacs>hahah
15:55:08  <isaacs>that's so dangerous!
15:55:36  <isaacs>honestly, i figure we'll find out all sorts of problems with it and have to change it significantly in v0.9
15:55:37  <isaacs>i'm ok with that.
15:55:41  <isaacs>we just have to deliver *something*
15:57:00  <bnoordhuis>isaacs: another question: is there a reason that domains.stack is public?
15:57:28  * isaacsshrug
15:57:30  <isaacs>inspection?
15:57:38  <bnoordhuis>just wondering
15:57:44  <isaacs>i guess it could be hidden, or at least _pseudoprivate
15:58:18  <isaacs>there was some reason why it needed to be exposed originally, but that idea ended up being scrapped
15:58:43  <bnoordhuis>it doesn't bother me, just wondered if there's a reason
16:00:24  <isaacs>nope. no reason.
16:00:36  <isaacs>in fact, dinking around with it is very hazardous
16:00:42  <isaacs>it should be hidden, i think
16:02:06  <isaacs>bnoordhuis: hid it on c2743b165ee39d949d59e3f68b590f8ad8e42025
16:04:42  * mikealjoined
16:05:34  <bnoordhuis>isaacs: abort() instead of exit(1), that makes it easier to debug, get core dumps, etc.
16:05:45  <isaacs>oh, ok
16:05:47  <isaacs>sure
16:07:23  <isaacs>bnoordhuis: done
16:07:26  <isaacs>604a39d3c5a8aee4ec4f80b2022ea3e229d8a3fc
16:10:44  <bnoordhuis>isaacs: running tests now but essentially lgtm
16:10:55  <isaacs>kewl.
16:11:00  <isaacs>lemme know if any tests fail. i'll brb.
16:12:45  <bnoordhuis>simple/test-regress-GH-1697 but it passed on the second run
16:13:10  <bnoordhuis>spotty test
16:17:18  * orlandovftwjoined
16:25:48  <piscisaureus_>yay, uv_poll_t done
16:25:50  <piscisaureus_>writing a test now
16:28:25  <saghul>piscisaureus_ oh! :-)
16:28:32  <saghul>sweet
16:28:38  * brsonjoined
16:29:46  <piscisaureus_>isaacs: hey
16:30:10  <piscisaureus_>isaacs: process.env.* is expensive, you should not call that in hot code. Cache the result instead.
16:38:19  <isaacs>piscisaureus_: woot
16:39:54  <isaacs>piscisaureus_: good call. pushed update
16:40:21  <benvie>process.env also has some missing implementation in it or something
16:40:38  <benvie>I think it's like it doesn't return anything for Object.getOwnPropertyDescriptor
16:41:09  <benvie>I have to special case it in all the introspection stuff I write =X
16:41:38  <benvie>and then I forgot to file a bug
16:41:48  <mmalecki>hm, jslint throws some errors in test directory, should that be a case?
16:43:45  <isaacs>mmalecki: we are kinda lax about linting the test dir
16:43:53  <isaacs>mmalecki: lib and src get linted religiously
16:43:59  <mmalecki>isaacs: all right
16:44:58  <mmalecki>node kinda uses process.env without caring about caching
16:45:07  <mmalecki>at least that's the impression I got
16:45:21  * isaacscommutes
16:45:23  * isaacsquit (Remote host closed the connection)
16:48:02  <bnoordhuis>piscisaureus_: refresh my memory
16:48:15  <bnoordhuis>prepare handlers run before the event loop is entered
16:48:17  <benvie>maybe it could cache internally
16:48:18  <bnoordhuis>check handlers run after
16:48:28  <bnoordhuis>idle handlers only if there are no pending requests or handles?
16:48:54  <bnoordhuis>there was a zero timeout poll involved somewhere but i forgot where :)
16:49:00  * isaacsjoined
16:49:17  <bnoordhuis>also, we can probably merge most of the unix and win loop handling code soon
16:49:59  * isaacsquit (Remote host closed the connection)
16:51:33  <tjfontaine>oh that's cute, c-ares allows you to specify name servers with specific ports but doesn't actually use the specific port
16:51:42  * bnoordhuisis off to dinner
16:56:06  <piscisaureus_>bnoordhuis: prepare runs just before the epoll/select/... call, check runs right after
16:56:31  <piscisaureus_>bnoordhuis: the presence of active idle handles forces the timeout for select/epoll to be 0
16:56:58  <piscisaureus_>bnoordhuis: idle runs right after the check handles, but only if there are no other callbacks pending
16:59:05  <tjfontaine>bnoordhuis: if my dns stuff gets merged, it's likely that ares would still be built in libuv right? for people doing C lookups and what not?
17:02:20  <mmalecki>https://gist.github.com/49097cb2d400e22e91d3 <- does this patch look safe enough? got some minor startup speed up with it
17:08:34  * brsonquit (Ping timeout: 250 seconds)
17:10:40  <saghul>tjfontaine what is that dns patch? i'm curious :-)
17:11:53  * bulatshakirzyanojoined
17:13:38  * orlandovftwquit (Ping timeout: 252 seconds)
17:14:21  <saghul>ah, I see the dns patch on node
17:18:38  * brsonjoined
17:22:50  * TooTallNatejoined
17:25:15  <piscisaureus_>mmalecki: how big was the difference?
17:25:42  <mmalecki>piscisaureus_: 1 ms - ~0.5 ms depending on disk cache and music in the background :)
17:25:46  <TooTallNate>review? https://github.com/TooTallNate/node/commit/disable-raw-on-pause
17:27:17  <piscisaureus_>TooTallNate: what is Interface.pause supposed to do?
17:27:30  <piscisaureus_>TooTallNate: (and why should it set raw mode?)
17:30:27  <TooTallNate>piscisaureus_: for the "terminal" mode, readline sets raw mode at the beginning, and pauses it at the end
17:30:42  <TooTallNate>piscisaureus_: also it gets paused and resumed during tab-completion
17:30:58  <piscisaureus_>TooTallNate: hmmm.
17:31:18  <piscisaureus_>TooTallNate: switching between raw and non-raw is not really preferable
17:31:23  <TooTallNate>piscisaureus_: it was really just a copy-paste fail on my part
17:31:32  <TooTallNate>piscisaureus_: but that's how it was before
17:31:40  * coderarityquit (Quit: coderarity)
17:31:41  <piscisaureus_>TooTallNate: ok - I don't blame you :-)
17:32:18  <piscisaureus_>TooTallNate: if it clears the raw flag when the interface stops, that's fine
17:32:33  <piscisaureus_>TooTallNate: but IMHO it makes no sense to do this all the time. If anything, it should just pause stdin
17:33:15  <piscisaureus_>TooTallNate: I don't really know how this works on linux, but the transition from buffered to raw is kind of expensive and blunt
17:33:21  <TooTallNate>piscisaureus_: so do you think readline should only call setRawMode() at the beginning and when it's "done" then?
17:33:23  <piscisaureus_>It involves killing a thread etc
17:33:43  <piscisaureus_>TooTallNate: yeah, I don't really see why this is needed at all
17:33:59  <TooTallNate>piscisaureus_: because "terminal" mode echos the characters
17:34:39  <piscisaureus_>TooTallNate: so, why would we want that to happen during tab completion?
17:35:25  <TooTallNate>piscisaureus_: i think it was something about buffering the input chars until the async tab completion functions completed. but i agree, that's probably wrong (i didn't add that part ;) )
17:35:52  <piscisaureus_>TooTallNate: well, at least on windows the effect is exactly the opposite
17:36:05  <TooTallNate>lol
17:36:13  <piscisaureus_>TooTallNate: a transition actually flushes the buffer
17:36:57  <piscisaureus_>TooTallNate: I think it would be best to just pause the underlying stream
17:37:31  <TooTallNate>piscisaureus_: i agree, so then i think we only call setRawMode() during createInterface() and Interface#close()
17:37:40  <piscisaureus_>TooTallNate: yeah
17:37:47  <piscisaureus_>TooTallNate: agreed
17:37:48  <TooTallNate>piscisaureus_: then tab completion won't call setRawMode()
17:37:54  <piscisaureus_>TooTallNate: yep
17:38:06  <TooTallNate>piscisaureus_: ok, i'll adjust the patch
17:38:08  <piscisaureus_>TooTallNate: I don't know if tab completion involves any async calls
17:38:18  <piscisaureus_>TooTallNate: if it does you may want to pause the stream while doing that
17:38:29  <TooTallNate>piscisaureus_: not for the repl, but it *can* according to the docs
17:38:29  <piscisaureus_>TooTallNate: otherwise even pausing is not necessary
17:38:46  <TooTallNate>piscisaureus_: i.e. if you're using readline for your own custom stuff
17:38:58  <piscisaureus_>ah, right
17:39:10  * isaacsjoined
17:39:38  <TooTallNate>piscisaureus_: but should be able to adjust the tab-completion code to be smart about calling pause()
17:39:42  <piscisaureus_>TooTallNate: maybe you want to call SetRawMode(true) after eval()ing a user command
17:39:44  <TooTallNate>but checking if the function is async
17:40:02  <piscisaureus_>TooTallNate: yeah well.
17:40:12  <piscisaureus_>TooTallNate: I think pause() is cheap on any platform
17:40:36  <piscisaureus_>TooTallNate: maybe it is good to leave the SetRawMode(true) there
17:40:54  <piscisaureus_>TooTallNate: so if the user does stdin.setRawMode(false) then it won't break the reapl
17:40:56  <piscisaureus_>*repl
17:41:17  <TooTallNate>piscisaureus_: haha, you can do that in the repl now :p
17:41:24  <TooTallNate>it's *sorta* breaks
17:41:39  <TooTallNate>but fixes itself when you tab-complete something :D
17:41:40  <piscisaureus_>TooTallNate: oh well, if it doesn't break too badly then I also don't care
17:41:50  <piscisaureus_>heh
17:42:00  <TooTallNate>(since tab-complete calls pause()/resume())
17:42:02  <piscisaureus_>TooTallNate: well if I do that then <tab> no longer works so
17:42:08  <TooTallNate>oh right
17:42:08  <TooTallNate>heh
17:42:32  <piscisaureus_>TooTallNate: you know what, screw it. If the user wants to fuck up stdin, he should do it
17:42:49  <mmalecki>piscisaureus_: ++
17:42:49  <kohai>piscisaureus_ has 8 beers
17:42:50  <piscisaureus_>it still somewhat works, so he can always rever
17:42:57  <piscisaureus_>t
17:43:11  <TooTallNate>lol
17:43:17  <TooTallNate>we have readline#close() in the docs
17:43:21  <TooTallNate>but it doens't exist :\
17:43:35  <piscisaureus_>TooTallNate: well, time for a real patch, then :-)
17:43:56  <TooTallNate>:)
17:44:25  <piscisaureus_>TooTallNate++
17:44:26  <kohai>TooTallNate has 12 beers
17:44:32  * orlandovftwjoined
17:44:53  <piscisaureus_>One point for the "The Exterminator Award for best bug crusher. "
17:45:03  <TooTallNate>niceeeeee
17:45:23  * mikealquit (Quit: Leaving.)
17:45:25  <TooTallNate>bnoordhuis deserves some "most patches from others Award"
17:49:42  <piscisaureus_>bnoordhuis deserver the "most awkwardly bad jokes" award
17:53:49  <isaacs>piscisaureus_: i'm not sure that's something we want to reward
17:54:50  <piscisaureus_>isaacs: well giving someone a reward for *that* is a good way of signaling that, right?
17:56:02  <mmalecki>bnoordhuis's jokes are awkward? oh come on.
17:56:32  <tjfontaine>saghul: yes, js dns implementation
17:57:51  <isaacs>piscisaureus_: "most bugs closed for any or no reason" ;)
17:58:10  <isaacs>now THAT's a service to the node project, for reals.
17:58:17  <isaacs>"most patches merged"
17:58:36  <piscisaureus_>isaacs: LOL
17:58:52  <piscisaureus_>isaacs: most UNIX users upset <-- that one's for me
17:59:08  <mmalecki>top libuv committer?
17:59:10  <TooTallNate>piscisaureus_: so http://nodejs.org/dist/v0.7.7/docs/api/readline.html
17:59:12  <mmalecki>http://github-high-scores.heroku.com/joyent/libuv/high_scores
17:59:18  <TooTallNate>piscisaureus_: pause() is how you say you're "done"
17:59:27  <TooTallNate>piscisaureus_: but maybe we should just put .close() back
18:00:29  <piscisaureus_>> rl.write()#
18:00:29  <piscisaureus_>> Writes to output stream.
18:00:29  <piscisaureus_>> This will also resume the input stream if it has been paused.
18:00:31  <piscisaureus_>EH?
18:01:00  * `3rdEdenjoined
18:01:24  <piscisaureus_>TooTallNate: *shrug* Whatever you think is best.
18:01:43  <piscisaureus_>TooTallNate: But +1 for documentation consistent with implementation :-)
18:01:59  <piscisaureus_>TooTallNate: and another +1 for not calling setRawMode often
18:02:11  <TooTallNate>piscisaureus_: it turns out the missing .close() function was cause I was looking at the 0.6.15 docs
18:11:51  * brsonquit (Ping timeout: 245 seconds)
18:12:10  * dapjoined
18:15:46  * coderarityjoined
18:20:25  * mikealjoined
18:29:08  * isaacsquit (Remote host closed the connection)
18:30:32  * isaacsjoined
18:46:07  <TooTallNate>piscisaureus_: review round 2? https://github.com/TooTallNate/node/compare/disable-raw-on-pause
18:47:59  <TooTallNate>bnoordhuis: fyi test-fs-watch is still failing on OS X (do we need to update libuv in node?)
18:49:06  <isaacs>TooTallNate: please lcase the test filename
18:49:27  <TooTallNate>isaacs: you mean setRawMode?
18:49:29  <isaacs>yeah
18:49:31  <TooTallNate>isaacs: set-raw-mode?
18:49:33  <isaacs>sure
18:49:35  <TooTallNate>ok
18:49:49  <isaacs>uppercase filenames are landminew
18:49:51  <isaacs>*landmines
18:50:06  <isaacs>with notable exceptions: README, Makefile, etc.
18:52:15  <isaacs>ok, i'm gonna clean up the domains3 branch a little bit, and land it
18:52:18  <isaacs>with --no-ff
18:52:18  <kohai>with has -1 beer
18:52:24  <isaacs>with -- indeed
18:52:24  <kohai>with has -2 beers
18:52:31  <isaacs>so slow and hard to optimize
18:52:33  <mmalecki>hahaha
18:52:46  <TooTallNate>lol
18:52:54  <TooTallNate>isaacs++
18:52:54  <kohai>isaacs has 14 beers
18:53:02  <mmalecki>kohai is more clever than you think!
18:53:11  <piscisaureus_>TooTallNate: lgtm if it works and passes the tests
18:53:34  <TooTallNate>piscisaureus_: thanks
18:53:39  <piscisaureus_>TooTallNate: I agree about the case change btw
18:53:51  <piscisaureus_>should be lowered
18:53:53  <TooTallNate>piscisaureus_: yup, done already :)
18:54:34  <CIA-155>node: Nathan Rajlich master * re621250 / (2 files): test: lowercase setRawMode() test case filename (+5 more commits...) - http://git.io/jQCATw
18:57:13  * mikealquit (Quit: Leaving.)
19:03:15  * brsonjoined
19:12:22  * `3rdEdenquit (Quit: Leaving...)
19:17:52  * `3rdEdenjoined
19:44:24  * piscisaureus_quit (Quit: ~ Trillian Astra - www.trillian.im ~)
19:44:32  * bulatshakirzyanoquit (Quit: Computer has gone to sleep.)
19:45:40  * coderarityquit (Quit: coderarity)
19:46:46  * dylukesjoined
19:59:18  * piscisaureus_joined
20:00:10  <piscisaureus_>igorzi: hey
20:00:30  <piscisaureus_>igorzi: yt?
20:08:41  * `3rdEdenquit (Quit: Leaving...)
20:31:53  * coderarityjoined
20:37:23  <CIA-155>node: isaacs master * r8673a4a / (31 files in 6 dirs): Merge branch 'domains3' (+13 more commits...) - http://git.io/-g49gw
20:37:26  <isaacs>bam.
20:39:13  <TooTallNate>nice :)
20:40:23  <TooTallNate>isaacs: close? https://github.com/joyent/node/issues/2134
20:45:26  <mmalecki>isaacs: ++ !!!
20:45:27  <kohai>isaacs has 15 beers
20:49:41  <piscisaureus_>isaacs++
20:49:41  <kohai>isaacs has 16 beers
20:52:49  * travis-cijoined
20:52:49  <travis-ci>[travis-ci] Skomski/node#10 (master - e9ad453 : Karl Skomski): The build is still failing.
20:52:49  <travis-ci>[travis-ci] Change view : https://github.com/Skomski/node/compare/a30013a...e9ad453
20:52:49  <travis-ci>[travis-ci] Build details : http://travis-ci.org/Skomski/node/builds/1115214
20:52:49  * travis-cipart
20:53:28  <igorzi>piscisaureus_: hey.. what's up?
20:53:35  <piscisaureus_>igorzi: hey
20:53:54  <piscisaureus_>igorzi: do you know if it is possible to figure out somehow which iocp is associated with a file handle?
20:54:39  <igorzi>piscisaureus_: nope..
20:54:54  <piscisaureus_>igorzi: you don't know, or it is not possible?
20:55:17  <igorzi>piscisaureus_: sorry, don't know
20:55:26  <piscisaureus_>igorzi: ah, right
20:55:50  <igorzi>piscisaureus_: i can find out
20:56:14  <piscisaureus_>igorzi: if it is not too much effort :-)
20:56:24  <piscisaureus_>igorzi: I can try to figure it out myself
20:57:52  <piscisaureus_>I wonder if I am being reasonable for wanting to know these things...
21:00:12  <igorzi>piscisaureus_: how will you use that info?
21:00:38  <piscisaureus_>igorzi: so here's the thing
21:00:52  <piscisaureus_>igorzi: for uv_poll_t I try to associate the socket with an iocp
21:01:03  <piscisaureus_>so I can use the overlapped select mechanism
21:01:40  <piscisaureus_>igorzi: but that might fail if the socket is already associated with an iocp
21:01:54  <piscisaureus_>igorzi: so then I'd switch to fallback mode
21:02:20  <piscisaureus_>igorzi: but - under some circumstances the user might create the poll watcher, then destroy it again, then create a new one for the same socket
21:02:56  <piscisaureus_>igorzi: e.g. a naive user that wants to use uv_poll_t to integrate cares would do that
21:03:27  <igorzi>piscisaureus_: so you'll want to know that it was already associated to your iocp?
21:03:27  <piscisaureus_>igorzi: so the second time the poll watcher is created, CreateIoCompletionPort fails because it is already associated with a completion port
21:03:34  <piscisaureus_>igorzi: yes
21:04:38  <igorzi>piscisaureus_: i presume that CreateIoCompletionPort fails if you try to associate it to iocp that it is already associated with?
21:04:45  <rendar>the associated IOC port is somewhere in the FileObject, don't know if you can access it, in usermode
21:04:47  <piscisaureus_>igorzi: yes, I tried
21:07:37  <rendar>piscisaureus_: uhm, why you want to associate a handle both to overlapped select and iocp?
21:07:54  <rendar>i mean, you want to associate it on one of them, but why not stick using only iocps?
21:08:09  <piscisaureus_>rendar: huh
21:08:50  <piscisaureus_>igorzi: actually I suddenly have an enlightment moment
21:08:59  <piscisaureus_>igorzi: so no hurry
21:09:02  <rendar>sorry, i've expressed myself very badly :) i meant: why not just using only io completion ports, instead of using also overlapped select?
21:09:52  <piscisaureus_>rendar: this is just for external libraries that use "readyness notifications" to integrate with the main event loop. Like c-ares does.
21:10:03  <rendar>i see
21:10:20  <rendar>yes, iocp don't have readyness, and this would be a problem i guess
21:10:54  <piscisaureus_>igorzi: I think that this overlapped select thing always posts to the iocp of the first socket in the select set.
21:11:50  <piscisaureus_>igorzi: so if I can create another socket and associate that, we'd be set :-)
21:12:02  <igorzi>piscisaureus_: oh.. that works :)
21:12:47  <piscisaureus_>igorzi: the only problem is now that the socket needs to be of the same type (e.g. managed by the same LSP) as the polled socket. So I don't know exactly how to go about that.
21:35:04  <CIA-155>node: Dave Pacheco master * r8559a4a / node.gyp : Fix 64-bit SmartOS build - http://git.io/J5a3qg
21:38:34  * pfox___quit (Read error: Operation timed out)
21:41:25  * orlandovftwquit (Ping timeout: 276 seconds)
21:43:39  <mjr_>What's the current thinking on the idle notifications and whether they are ruining performance?
21:43:44  <mjr_>Because I kind of think they are.
21:44:12  <mjr_>http://ranney.com/hs1.svg
21:46:52  <bnoordhuis>mjr_: they're used to kick off the gc when the system is supposedly idle
21:47:04  <piscisaureus_>mjr_: nobody knows really
21:47:07  <bnoordhuis>though the algorithm can probably be improved
21:47:23  <mjr_>So there was that blog post about disabling idle notifications using some flag that I don't see in 0.6.
21:47:31  <piscisaureus_>mjr_: but typically those callbacks should only be made after the system has been idle for 2 seconds
21:47:33  <mjr_>And I think ryah had a patch a while back against 0.6 for that.
21:48:26  <piscisaureus_>mjr_: it's kind of sad that the flame graph does not show the time spent in epoll
21:48:33  <piscisaureus_>or what have you on solaris
21:48:35  <piscisaureus_>port_getn
21:48:45  <mjr_>It looks to me like things can go over a cliff with GC, and I'm wondering if that's because the idle notification gets out of control.
21:48:47  <piscisaureus_>mjr_: because now we cannot see how busy that process really is
21:48:55  <mjr_>And perhaps time spent in GC counts against idle time, so it fires immediately?
21:49:02  <dap>piscisaureus_: what do you mean?
21:49:15  <mjr_>Anyway, none of my processes will ever be idle for 2 seconds, ever.
21:49:21  <dap>mjr_: how long a sample was that flame graph?
21:49:25  <mjr_>dap: 30
21:49:25  <dap>love it, btw :)
21:49:32  <dap>mjr_: what's the profiling rate?
21:49:43  <mjr_>root@prod-2134:~# dtrace -n 'profile-97 /pid == 4453 || pid == 5246 || pid == 3638 || pid == 4057/ { @[jstack(100, 8000)] = count(); } tick-30s { exit(0); }' -o out.stacks-hs1
21:49:48  <piscisaureus_>mjr_: then maybe the algorithm in node is broken?
21:50:02  <mjr_>So that was 4 processes that were all stuck at 100% CPU, but still slowly doing actual work.
21:50:03  <piscisaureus_>mjr_: we've been there before :-)
21:50:11  <mjr_>Heap size was 400MB, not THAT large.
21:51:12  <piscisaureus_>mjr_: the timeout is 5 seconds even, not 2
21:51:19  <mjr_>Is it safe to disable idle notification?
21:51:25  <piscisaureus_>mjr_: yes
21:51:28  <piscisaureus_>mjr_: completely safe
21:51:44  <mjr_>Wonderful. I think I'm going to comment it out of our node build and see if that helps.
21:52:35  <bnoordhuis>TooTallNate: yes, libuv needs an update
21:52:42  <bnoordhuis>but don't do that right now
21:52:56  <piscisaureus_>mjr_: careful though. The code is messy and intricate.
21:53:11  <piscisaureus_>mjr_: probably best to make node::Idle a no-op and see what that does.
21:53:25  <mjr_>BTW, we are still suffering with around 3 process lockups / day with this TLS thing. It's more painful than this GC thing, if you can believe it.
21:53:36  * coderarityquit (Quit: coderarity)
21:54:00  <piscisaureus_>that is bnoordhuis' territory
21:54:24  <piscisaureus_>mjr_: let me know if disabling the idle stuff makes it better for you
21:54:35  <piscisaureus_>mjr_: I would not mind ripping it out of node entirely.
21:54:59  <mjr_>I can see why it's there, if you have a really idle process, you might be surprised why your heap doesn't compact as often as you might expect.
21:55:25  <mjr_>But it will once you do more work with it, so it seems kind of pointless to have in there at all.
21:55:31  <bnoordhuis>mjr_: tls is on my to do list
21:55:40  <bnoordhuis>but so are a lot of other things, i'm afraid
21:55:53  <bnoordhuis>i'm catching up on my backlog though!
21:55:54  <piscisaureus_>mjr_: I think at the very least we should not trigger it unless the process is really idle for 5 seconds or so
21:56:40  <mjr_>piscisaureus_: It would be a lot less code and mystery though if you just removed it completely.
21:58:15  <piscisaureus_>mjr_: so one of the problems I can spot in there is that V8::IdleNotification keeps getting called until it returns true
21:58:29  <piscisaureus_>mjr_: that is - there is no interval between calls any more
21:58:34  <mjr_>I was just looking at that, thinking of adding some logging there.
22:00:06  <piscisaureus_>mjr_: I think at the very least it should call uv_idle_stop regardless of the result of v8::IdleNotification()
22:00:30  <mjr_>I'm just going to put "return;" as the first line of node::Idle()
22:00:38  <piscisaureus_>kk
22:00:45  <piscisaureus_>again, let me know what it does
22:00:53  <piscisaureus_>I will be offline now.
22:01:08  <mjr_>woah
22:01:12  <mjr_>OK, well that's it
22:01:28  <mjr_>I put a log line in there, and it's firing about 200 times / sec
22:01:35  <piscisaureus_>aha
22:01:41  <piscisaureus_>not good
22:01:49  <piscisaureus_>weird though - we've had that before but it was fixed
22:02:05  <mjr_>I'm on 0.6. Maybe it's fixed in master
22:02:14  <piscisaureus_>mjr_: no it was in 0.5.4 or something :_)
22:02:15  <bnoordhuis>no, master does the same thing
22:02:21  <piscisaureus_>ah
22:02:26  <piscisaureus_>this warrants a 0.6.16
22:02:28  <piscisaureus_>:-)
22:03:15  <mjr_>yeah, pretty broken. I wonder how nobody noticed this?
22:03:23  <mjr_>I guess with small heaps it ends up being OK.
22:03:27  <tjfontaine>bnoordhuis: what are your thoughts on exposing ares_get_servers through cares_wrap?
22:04:05  <bnoordhuis>tjfontaine: to what purpose?
22:04:35  <bnoordhuis>maybe if ares_set_servers was exposed too
22:04:38  <tjfontaine>bnoordhuis: it's about the only sane way I'm ever going to get the win32 platform nameservers :)
22:05:12  <bnoordhuis>tjfontaine: when would you care about what nameservers you're talking to?
22:06:44  <tjfontaine>bnoordhuis: my native-dns needs to determine where requests should go, and ares_library_init already does the needful fallback through different NT methods, and registry hacks
22:07:17  <bnoordhuis>tjfontaine: okay. i accept patches :)
22:07:18  <tjfontaine>bnoordhuis: not for lib/dns.js but for src/cares_wrap.cc so "private"
22:07:26  <tjfontaine>ok
22:09:52  <piscisaureus_>bnoordhuis: that could also explain why we spend so much time in gc in benchmarks...
22:10:56  <bnoordhuis>piscisaureus_: possibly. the benchmarks should never give the idle watcher a chance to run though
22:12:00  <bnoordhuis>that's easy to verify of course
22:13:06  <bnoordhuis>yeah, i don't think that actually happens
22:13:21  <piscisaureus_>ah wait
22:13:36  <piscisaureus_>there is logic in there that starts the gc always if heap usage exceeds 128M\
22:13:44  <piscisaureus_>See CheckStatus
22:13:47  <piscisaureus_>^-- mjr_
22:14:05  <mjr_>Yeah, in there now.
22:14:43  <bnoordhuis>hrm, indeed - disabling the 128M check makes the idle watcher run
22:15:19  <piscisaureus_>bnoordhuis: huh
22:15:37  <piscisaureus_>bnoordhuis: oh, you removed the if(
22:15:49  <bnoordhuis>piscisaureus_: yeah, like this: https://gist.github.com/05a5ab4ae10dcdeea8ed
22:16:06  <piscisaureus_>right
22:16:08  <piscisaureus_>omg
22:16:23  <piscisaureus_>I think this is going to be important for c9 as well
22:16:26  <bnoordhuis>yep
22:16:49  <piscisaureus_>we should come up with another algorithm
22:16:52  <piscisaureus_>I am thinking
22:17:24  <piscisaureus_>why not just start a 1s timer and reset it every time in uv_prepare_t
22:17:45  <piscisaureus_>and run the idleNotification only if the timer expires?
22:17:48  <piscisaureus_>bnoordhuis: ^ ?
22:17:59  <mjr_>I still don't see why you want to deal with this at all. Won't V8 compact itself through normal use?
22:18:00  <bnoordhuis>i suppose that could work
22:18:18  <bnoordhuis>mjr_: yeah, but you may get random big delays
22:18:21  <piscisaureus_>mjr_: yeah but only if it has to
22:18:52  <piscisaureus_>mjr_: but if node is blocked in epoll/port_getn it won't
22:21:03  <piscisaureus_>mjr_: but we can simplify and make it happen only if node is really idle for 1 second or so
22:21:11  <piscisaureus_>mjr_: so for you it would never really kick in
22:21:44  * pfox___joined
22:21:52  <bnoordhuis>also, it shouldn't do while (!V8::IdleNotification())
22:22:16  <mjr_>heh
22:22:19  <mjr_>Indeed
22:31:07  <CIA-155>node: isaacs master * r079b813 / test/message/undefined_reference_in_new_context.out : test: Minor change to message/undefined_reference_in_new_context - http://git.io/gWxV0Q
22:31:16  <isaacs>anything else that need to get in 0.7.8?
22:32:02  <isaacs>we really need to get this ENOSYS working. I'm going to temporarily just revert the 10.5 thing on the v0.7.8-release branch, unless that libuv merge can come sooner.
22:32:13  <TooTallNate>i got mine from this morning in
22:32:18  <isaacs>TooTallNate: rad
22:32:18  <TooTallNate>isaacs: that's fine with me
22:32:50  <isaacs>bnoordhuis: opinions? are we minutes away from merging in libuv master? or keep waiting for refcount?
22:34:54  <bnoordhuis>isaacs: you can cherry-pick joyent/libuv@3c41597
22:35:03  <isaacs>bnoordhuis: sure.
22:35:04  <bnoordhuis>that's the fix, it should apply cleanly
22:35:08  <isaacs>kewl
22:36:56  * rendarquit
22:41:13  * piscisaureus_quit (Ping timeout: 276 seconds)
22:42:25  * piscisaureus_joined
22:44:07  <piscisaureus_>mjr_: maybe you should stop trying to be cool and switch to java or erlang
22:44:12  <isaacs>bnoordhuis: it does not. https://gist.github.com/2409585#L128
22:44:37  <mjr_>piscisaureus_: Hmm, OK. I'll think about it. We did just hire an erlang programmer.
22:45:48  <piscisaureus_>mjr_: c# is actually a nice language too
22:46:41  <bnoordhuis>i hear good things about clojure
22:46:59  <bnoordhuis>isaacs: want me to fix that?
22:47:15  <isaacs>bnoordhuis: wanna review? https://github.com/isaacs/node/commit/37fd953378ecdfcbe8e3656e1827b17fdc4fd969
22:47:34  <bnoordhuis>isaacs: yep, looks good
22:47:41  <isaacs>the fix was obvious, i hope. there's no #if for the #else to hook onto, so i presume it's fixed right to remove it
22:47:57  <isaacs>kk testing
22:47:57  <isaacs>thanks
22:48:35  <bnoordhuis>piscisaureus_: does unref_in_prepare_cb pass on windows?
22:51:09  <piscisaureus_>bnoordhuis: trying
22:51:18  <piscisaureus_>bnoordhuis: is die test niew?
22:51:22  <piscisaureus_>*nieuw?
22:52:00  <piscisaureus_>bnoordhuis: async faalt. ergens wordt uv_async_send op een closed handle aangeroepen
22:52:10  <piscisaureus_>bnoordhuis: maar voor de rest geen failures (latest master)
22:52:39  <bnoordhuis>piscisaureus_: okay. if it passes, it's accidental. look closely at test-ref.c:prepare_cb :)
22:53:41  * pfox___quit (Ping timeout: 240 seconds)
22:54:02  <piscisaureus_>bnoordhuis: ja, wat is daar mee?
22:54:12  <piscisaureus_>bnoordhuis: looks good to me
22:54:40  <bnoordhuis>piscisaureus_: uv_unref((uv_handle_t*)&h); <- it's taking the address of a pointer
22:54:55  <piscisaureus_>bnoordhuis: huh, not here
22:55:20  <piscisaureus_>bnoordhuis: unlikely also, since uv_unref is supposed to take an uv_loop_t
22:55:28  <bnoordhuis>oh, duh - it's only in my branch
22:55:33  <piscisaureus_>bnoordhuis: so I think we're looking at one of your infamous fuckups here :-p
22:55:58  <bnoordhuis>the effect was... interesting
22:56:15  <piscisaureus_>yeah, you end up clobbering the stack
22:56:39  <CIA-155>libuv: Ben Noordhuis v0.7.8-release * r56bb4c2 / (4 files in 3 dirs): (log message trimmed)
22:56:39  <CIA-155>libuv: unix: don't conditionally compile kqueue fs watcher
22:56:39  <CIA-155>libuv: Always compile in the kqueue-based fs event watcher and handle it at run-time
22:56:39  <CIA-155>libuv: if the kernel doesn't actually support it.
22:56:39  <CIA-155>libuv: Works around build issues when -mmacosx-version-min is not set properly.
22:56:40  <CIA-155>libuv: Fixes joyent/node#3075.
22:56:41  <CIA-155>libuv: Conflicts:
22:57:19  <isaacs>os x: [02:00|% 100|+ 393|- 0]: Done
22:58:06  <piscisaureus_>cool
22:58:32  * travis-cijoined
22:58:32  <travis-ci>[travis-ci] joyent/libuv#202 (v0.7.8-release - 56bb4c2 : Ben Noordhuis): The build failed.
22:58:32  <travis-ci>[travis-ci] Change view : https://github.com/joyent/libuv/commit/56bb4c2
22:58:32  <travis-ci>[travis-ci] Build details : http://travis-ci.org/joyent/libuv/builds/1116269
22:58:32  * travis-cipart
22:58:32  <mmalecki>isaacs: how do you like https://gist.github.com/49097cb2d400e22e91d3 ?
22:59:48  <mmalecki>I guess I should just submit it as a pull request :)
22:59:50  <TooTallNate>mmalecki: +1, but why don't you set the variables at the top?
23:00:18  <mmalecki>TooTallNate: I like this syntax better, but yeah, I guess I could :)
23:00:20  <TooTallNate>^ would be more readable IMO
23:01:01  <TooTallNate>mmalecki: frankly i don't like it. it almost looks like an accident (like you're *wanting* to compare the values but typo'd)
23:01:25  <mmalecki>TooTallNate: you know what jshint calls it?
23:01:34  <TooTallNate>no, what?
23:01:40  <mmalecki>TooTallNate: boss :D
23:02:37  <piscisaureus_>but it's off by default
23:02:57  <piscisaureus_>I agree with TooTallNate
23:02:58  <TooTallNate>the mode "only for people who know what they're doing" :p
23:03:11  <TooTallNate>a.k.a less readable?
23:03:21  <piscisaureus_>mmalecki: I think you should wait for a green flag from isaac and fix it then
23:04:25  <bnoordhuis>mmalecki: parens around assignment, signals intent
23:04:56  <bnoordhuis>but not doing assignment in an if statement is even better
23:05:02  <isaacs>what's this?
23:05:29  <isaacs>mmalecki: oh, that
23:05:36  <isaacs>mmalecki: nah. no need. those functions are called exactly once.
23:05:52  <mmalecki>isaacs: k, fair enough
23:06:18  <isaacs>mmalecki, piscisaureus_: also, i couldn't even detect any diff from removing the process.env in http_simple
23:06:23  <isaacs>it's not THAT expensive.
23:06:26  <isaacs>at least, not on unix ;)
23:06:29  <isaacs>maybe on windows :)
23:07:24  <piscisaureus_>isaacs: yeah, I think it is slightly more expensive on windows because of the structure of the env block
23:07:50  <mmalecki>btw, I think the code for getting an env variable could be moved to libuv
23:08:09  <mmalecki>there's this big ifdef block in node
23:10:11  <mmalecki>bnoordhuis: piscisaureus_ what do you think?
23:10:31  <piscisaureus_>mmalecki: it's harder than you think
23:10:41  <piscisaureus_>mmalecki: but if you can come up with something nice, go ahead
23:10:43  <mmalecki>piscisaureus_: that's what she said!
23:10:47  <piscisaureus_>mmalecki: I've wanted this for a long time
23:11:04  <mmalecki>piscisaureus_: why is it that hard?
23:11:18  <piscisaureus_>mmalecki: but it's hard to deal with stuff like, who allocates the buffer, and how big should it be?
23:11:51  <mmalecki>oh, yeah, that's always hard
23:12:04  <piscisaureus_>mmalecki: and - do we care about updating the libcrt shadow copy of the env, or just ignore the problem and update only the win32 copy
23:12:46  <mmalecki>piscisaureus_: I sense some great fun to be made of windows.
23:13:04  <mmalecki>piscisaureus_: there are 2 environment copies in windows?
23:13:12  <piscisaureus_>mmalecki: well
23:13:18  <piscisaureus_>mmalecki: there can be as much as 4
23:13:59  * mmaleckichuckles
23:14:36  <mmalecki>I guess I can look into it :)
23:15:22  <mmalecki>but now, I'm going to sleep
23:15:53  <CIA-155>libuv: Bert Belder reviewme * rfa12bb9 / test/test-async.c : Test: fix a race condition in 'async' test - http://git.io/l0vgOQ
23:15:53  <CIA-155>libuv: Bert Belder reviewme * r7ae14e0 / src/win/async.c : Windows: a closing async watcher should not call it's callback - http://git.io/OK275Q
23:15:56  <piscisaureus_>^-- bnoordhuis: review?
23:15:58  <piscisaureus_>x2
23:17:45  * travis-cijoined
23:17:45  <travis-ci>[travis-ci] joyent/libuv#203 (reviewme - 7ae14e0 : Bert Belder): The build is still failing.
23:17:45  <travis-ci>[travis-ci] Change view : https://github.com/joyent/libuv/compare/fa12bb9^...7ae14e0
23:17:45  <travis-ci>[travis-ci] Build details : http://travis-ci.org/joyent/libuv/builds/1116391
23:17:45  * travis-cipart
23:18:29  <piscisaureus_>I wish that the windows crt was not such an incredible piece of shit
23:18:54  <piscisaureus_>There's a lot to complain about, but the state of the crt beats everything
23:23:36  <bnoordhuis>piscisaureus_: lgtm but lowercase Test and Windows
23:28:07  <piscisaureus_>bnoordhuis taking nitpicking to the next level :-/
23:29:29  <CIA-155>libuv: Bert Belder master * r20879c1 / test/test-async.c : test: fix a race condition in 'async' test - http://git.io/gXEL1w
23:29:29  <CIA-155>libuv: Bert Belder master * r13b8ebd / src/win/async.c : windows: a closing async watcher should not call it's callback - http://git.io/KLuyAA
23:29:47  <bnoordhuis>piscisaureus_: OCD is not an acronym, it's a lifestyle
23:30:05  <bnoordhuis>piscisaureus_: semantics arguing time, this time about write_unref_cb
23:30:20  <piscisaureus_>bring it on
23:30:50  <bnoordhuis>tcp_ref4 calls uv_write in a callback, then unrefs the write req
23:31:06  <piscisaureus_>eh
23:31:16  <piscisaureus_>it unrefs, you mean?
23:31:17  * travis-cijoined
23:31:17  <travis-ci>[travis-ci] joyent/libuv#204 (master - 13b8ebd : Bert Belder): The build is still failing.
23:31:17  <travis-ci>[travis-ci] Change view : https://github.com/joyent/libuv/compare/5345ee3...13b8ebd
23:31:17  <travis-ci>[travis-ci] Build details : http://travis-ci.org/joyent/libuv/builds/1116492
23:31:17  * travis-cipart
23:31:35  <bnoordhuis>piscisaureus_: yeah. in master it unrefs the loop
23:31:47  <bnoordhuis>the intent is that the write req cb should not fire
23:32:09  <bnoordhuis>but it does because the write() succeeded immediately
23:32:31  <bnoordhuis>maybe unref'ing requests is just a silly thing to do
23:32:48  <piscisaureus_>bnoordhuis: yes, I don't think we ever planned to allow that
23:32:58  <piscisaureus_>bnoordhuis: I though it was just something you used for testing
23:33:26  <bnoordhuis>yeah, but not it's working against me :)
23:33:40  <piscisaureus_>:-)
23:33:51  <bnoordhuis>i'll change it to unref the handle instead, that makes more sense
23:34:10  <piscisaureus_>bnoordhuis: I would not consider calling a callback a bug when the handle is unrefed
23:34:23  * paddybyersquit (Quit: paddybyers)
23:34:50  <bnoordhuis>no, i suppose not. the loop is active at that time
23:35:14  <piscisaureus_>bnoordhuis: unref is not there to avoid callbacks being made - it should just make sure that the loop doesn't block waiting for events
23:35:45  <piscisaureus_>bnoordhuis: if you can test that uv_unref works properly any other way, just change the test and I am fine with it
23:35:51  <bnoordhuis>okay, bad test. i'll scrap it
23:36:18  <piscisaureus_>bnoordhuis: otherwise we'd have to test for refcount==0 after every callback. I don't want to do that.
23:36:20  <piscisaureus_>it makes no sense
23:36:42  <bnoordhuis>no. there are a couple of similar tests, i suppose i should scrap those as well
23:37:31  <piscisaureus_>bnoordhuis: yeah, but try to keep coverage okay
23:37:49  <piscisaureus_>bnoordhuis: this is hairy territory so having tests for that is important
23:38:39  <piscisaureus_>bnoordhuis: typically these tests were there to ensure that an uv_tcp_t would ref but an uv_write_t would not ref it again
23:39:01  <piscisaureus_>bnoordhuis: so as long as we have tests that test the semantics that we decided on I am fine
23:39:05  <bnoordhuis>piscisaureus_: i'll see if i can rework them into something more sensible
23:39:50  <piscisaureus_>bnoordhuis: good
23:41:14  * mmaleckichanged nick to mmalecki[zzz]
23:41:53  <bnoordhuis>piscisaureus_: to recap, if i uv_unref(handle), then uv_write(req, handle), then call uv_run(), is the loop supposed to block or not?
23:42:37  <piscisaureus_>bnoordhuis: good question. I think not.
23:42:43  <piscisaureus_>bnoordhuis: but whatever is easier I guess
23:43:17  <piscisaureus_>bnoordhuis: both have their merits
23:43:28  <bnoordhuis>piscisaureus_: yeah, that's what i was thinking - you can argue both ways
23:43:41  <piscisaureus_>bnoordhuis: I like to let all reqs run to completion before the loop unblocks (so the req places a ref on the loop)
23:44:05  <piscisaureus_>bnoordhuis: but otoh we could argue that an uv_write should make the handle active, but if the handle is unrefed it should not block the loop
23:44:39  <piscisaureus_>bnoordhuis: I think I'd prefer option 1
23:45:03  <bnoordhuis>piscisaureus_: yeah, i think i agree
23:45:17  <bnoordhuis>easier to reason about
23:45:29  <piscisaureus_>bnoordhuis: the only risk is for example the situation where you write to a pipe that has a full buffer
23:45:36  <piscisaureus_>since that could block indefinately
23:45:47  <piscisaureus_>but I don't really think that would cause any problems in practice
23:45:54  <piscisaureus_>*indefinitely
23:45:56  <bnoordhuis>no. you'd set a timer and close the pipe
23:45:59  <piscisaureus_>yeah
23:46:03  <piscisaureus_>that's much better :-)
23:46:10  <piscisaureus_>bnoordhuis: ok, so option 1 it is
23:46:13  <bnoordhuis>cool
23:51:01  <piscisaureus_>ok I am really checking out now.
23:51:09  <piscisaureus_>bnoordhuis and everyone: ttyl
23:52:35  <piscisaureus_>oh, btw
23:52:36  <piscisaureus_>https://github.com/piscisaureus/libuv/blob/poll/src/win/poll.c
23:52:40  * piscisaureus_quit (Quit: ~ Trillian Astra - www.trillian.im ~)