00:03:23  * piscisaureus_quit (Read error: Connection reset by peer)
00:04:11  * piscisaureus_joined
00:08:01  <sh1mmer>hey isaacs
00:10:01  <dap>hey mraleph
00:15:17  <mraleph>hey dap
00:17:14  <dap>mraleph: hi. I had some questions about the V8 heap in-memory layout for postmortem debugging. is v8-users the best place to ask?
00:18:18  <mraleph>dap: v8-users is a pretty good place, yes. You can also ask me directly.
00:18:49  <mraleph>dap: I've just skimmed through your recent post… looks very promising :-)
00:18:58  <dap>thanks!
00:19:38  <mraleph>the question of keeping things in sync between V8 source and some tool sources also bothers me :-)
00:19:48  <dap>yeah, that's the biggest issue thus far.
00:19:53  <mraleph>I have not found a viable solution though…
00:20:04  <dap>I've got some ideas, but it would involve modifying the build process at least slightly.
00:20:57  <mraleph>I have considered using clang to compute the set of getters attached to the V8 object hierarchy (at least those that are "pure") but I never got to it.
00:21:06  <dap>it's been an interesting experience digging through the V8 code. but after a few hurdles I've found the heap stuff pretty straightforward (at least, the layout part :)
00:21:33  <mraleph>yeah, it's pretty straightforward. in a sense objects.h is self documenting.
00:22:25  <dap>what I'm doing now is using the ACCESSORS() macro in heap-inl.h to define an integer whose name describes the offset (like class name, field name, type) and whose value is the actual offset, then I have a separate tool that turns that output into something my tool can use to walk the structures.
00:22:36  <dap>…I know, it's pretty kludgy.
00:22:52  <dap>but it's also surprisingly successful.
00:23:36  <mraleph>interesting.
00:24:25  <dap>the next trick would be for the debugger to actually read those out of the binary its debugging, so it doesn't have to be built for a particular version. that actually shouldn't be much harder.
00:24:40  <dap>s/its/it's/
00:24:42  <CIA-53>node: isaacs master * r0619092 / doc/api/fs.markdown : doc: Correct blatantly wrong futimes documentation - http://git.io/jbfgQw
00:26:01  <dap>so my main question was: am I missing something — is there some other way to get this information from the binary (or even source), but it sounds like not.
00:26:57  <dap>out of curiosity, why were the classes implemented that way, rather than using conventional members? is it because the low bits of the pointer are non-zero, so you couldn't dereference the class anyway?
00:26:58  <mraleph>I don't think you can get it from the binary.
00:27:40  <dap>it actually made this project easier, but it took me a little while to figure out what was going on :)
00:28:10  <mraleph>yeah, you can't dereference this so members are useless...
00:28:58  <ryah>dap: nice post!
00:29:02  <dap>ryah: thanks!
00:29:08  <sh1mmer>+1
00:29:32  <sh1mmer>todays other node post, if you forget JS has function based scope your server doesn't work
00:30:14  <rmustacc>sh1mmer: Or if you never run a linter, you won't magically catch the problems it does.
00:30:27  <sh1mmer>crazy talk
00:30:28  <dap>right. it was reassuring to see the comments explain that.
00:31:18  <sh1mmer>although it does make me think it wouldn't hurt if we had some kind of official linter
00:31:26  <sh1mmer>for horrible things people shouldn't do with node
00:32:11  <dap>mraleph: thanks for the help! you've answered my main question already. I've got to run, but I may follow up with more soon (or just post it to v8-users)
00:32:16  <piscisaureus_>sh1mmer: like what?
00:32:16  <piscisaureus_>"Error: discrete cosine transform not allowed"
00:32:38  <sh1mmer>piscisaureus_: like not defining variables in callbacks
00:32:45  <sh1mmer>I mean it might not be an error
00:32:56  <sh1mmer>but it's good to make sure you really did it on purpose
00:33:15  <rmustacc>There are a lot of linters out there, it'd probably be valuable to just mention somewhere that you should probably use one.
00:33:36  <mraleph>dap: no problem, you are welcome. if you don't catch me here, just send questions to v8-users, I'll see it.
00:33:43  <sh1mmer>because of the shared memory thing Node has some picadillos that are more important than in front end JS
00:33:44  <dap>cool.
00:40:39  * dapquit (Quit: Leaving.)
00:41:36  <ryah>bnoordhuis: are you taunting marc lehmann?
00:41:52  <bnoordhuis>ryah: not so much taunting as calling him an ass
00:41:57  <ryah>:)
00:43:34  <rmustacc>Haha, where are you doing that?
00:44:53  <bnoordhuis>rmustacc: on the libev mailing list
00:48:27  <sh1mmer>http://lists.schmorp.de/pipermail/libev/2011q4/001563.html ?
00:49:02  <bnoordhuis>yeah, that's the thread
00:50:47  <bnoordhuis>http://news.ycombinator.com/item?id=3179505 <- is it me or did that guy simply fail to load-test his app?
00:52:05  <rmustacc>bnoordhuis: Probably.
00:53:10  <rmustacc>Oof, he's breaking out posix standards. Sounds like a trap.
00:55:02  <rmustacc>While, the file descriptor 0 is always define to be the stdout fd, POSIX also defines that you have to return the lowest valid fd.
00:56:09  <bnoordhuis>yeah, which i pointed out - against my better knowledge
00:56:15  <bnoordhuis>it's always the same with this guy
00:56:27  <bnoordhuis>i submit a patch, he thinks up a gazillion reasons not to merge it
00:57:39  <bnoordhuis>knowledge should read judgment -- it's 2 am here
01:06:33  <piscisaureus_>taunting Marc Lehmann +1
01:07:45  <piscisaureus_>and we don't need libev no more when bnoordhuis finishes epollet :-)
01:08:50  * sh1mmerquit (Quit: sh1mmer)
01:11:35  * piscisaureus_part
01:11:39  * piscisaureus_joined
01:13:53  <piscisaureus_>ok. time to go to bed
01:14:08  <piscisaureus_>polling stat watcher for windows is almost finished
01:14:24  <piscisaureus_>but I still need to integrate the api with uv_fs_event
01:14:39  <piscisaureus_>but then we'll be able to overload fs.watchFile
01:14:49  <piscisaureus_>bnoordhuis: go to bed too :-)
01:14:57  <bnoordhuis>piscisaureus_: i should, shouldn't i?
01:15:02  <piscisaureus_>yes
01:15:24  <bnoordhuis>in a minute
01:15:42  <piscisaureus_>bnoordhuis: for what?
01:15:51  <bnoordhuis>to finish my beer
01:16:12  <piscisaureus_>1 minute, well okay
01:16:32  <piscisaureus_>bnoordhuis: can I ask you one question then
01:16:40  <bnoordhuis>you already did
01:16:45  <piscisaureus_>is there a syscall on unices that combines readdir with stat()?
01:16:54  <bnoordhuis>no
01:17:23  <bnoordhuis>well... technically, the dirent structure can contain the stat date
01:17:25  <bnoordhuis>*data
01:17:37  <bnoordhuis>but in practice you can only rely on the filename being there
01:19:32  <piscisaureus_>bnoordhuis: minute passed.
01:19:53  <bnoordhuis>sorry, i'm only halfway through this sixpack
01:20:09  <piscisaureus_>anyway. bye
01:20:16  <bnoordhuis>sleep tight, piscisaureus_ :)
01:22:08  * piscisaureus___joined
01:24:49  * piscisaureus_quit (Ping timeout: 258 seconds)
01:28:00  * piscisaureus___quit (Ping timeout: 240 seconds)
01:31:03  * brsonquit (Quit: leaving)
01:41:58  * mralephquit (Quit: Leaving.)
01:46:12  * isaacsquit (Quit: isaacs)
01:51:55  * piscisaureus___joined
01:52:15  <bnoordhuis>piscisaureus___: still up?
01:53:47  * piscisaureus___quit (Read error: Connection reset by peer)
01:55:29  * piscisaureus_joined
01:55:39  <piscisaureus_>bnoordhuis: aaah you're spying on me
01:55:42  <piscisaureus_>bnoordhuis: still up?
01:55:51  <bnoordhuis>bnoordhuis: yep
01:55:58  <bnoordhuis>decided to patch my kernel
01:56:16  <piscisaureus_>oh noes
01:56:16  <bnoordhuis>i want something like kevent() for epoll
01:56:52  <bnoordhuis>in a bout of inspiration i've decided to call it epoll_ctl2()
02:09:30  <piscisaureus_>bnoordhuis: don't do it
02:09:35  <piscisaureus_>it's a trap
02:09:45  <piscisaureus_>Rasmus Lerdorf put it there
02:40:13  * bnoordhuisquit (Ping timeout: 240 seconds)
02:45:37  * AvianFluquit (Quit: Leaving)
02:50:18  * piscisaureus_quit (Ping timeout: 258 seconds)
04:02:45  * ericktquit (Quit: erickt)
04:32:58  <indutny>ryah: are you back?
04:33:01  <indutny>hi
05:40:42  * AvianFlujoined
05:55:15  * AvianFluquit (Ping timeout: 252 seconds)
06:07:46  * AvianFlujoined
06:35:45  * AvianFluquit (Quit: Leaving)
06:42:04  <CIA-53>libuv: Igor Zinkovsky master * r78f4b12 / (5 files in 4 dirs): windows: knob for tuning number of concurrent accept requests - http://git.io/gXqKkg
07:06:25  * indexzerojoined
07:31:15  * AvianFlujoined
08:13:33  <CIA-53>libuv: Igor Zinkovsky master * r9c6103a / (4 files in 3 dirs): windows: add tests for uv_tcp_simultaneous_accepts - http://git.io/0W5gzA
08:21:06  * mralephjoined
08:58:11  * mralephquit (Quit: Leaving.)
09:02:18  * eddybjoined
09:20:08  <eddyb>hi
09:20:13  <eddyb>anybody around?
09:20:18  <eddyb>got some weird problems
09:33:48  <indutny>eddyb: hi
09:34:05  <eddyb>indutny: hi
09:34:22  <eddyb>so, I've been using code similar to the one in node.js
09:34:34  <eddyb>uv_fs_write (the sync version) fails with EBADF
09:38:23  <eddyb>and I can't figure out why
09:39:57  <indutny>hm...
09:40:02  <indutny>can you gist it?
09:42:22  <eddyb>not exactly
09:42:29  <eddyb>https://github.com/eddyb/gearbox-node
09:42:32  <eddyb>here's the project
09:42:56  <eddyb>I've replaced any std::cerr/std::cout usage with printf and fprintf,hoping that would fix it
09:43:04  <eddyb>the js code is the same as in node.js
09:43:24  <eddyb>here's the bindings: https://github.com/eddyb/gearbox-node/blob/master/src/modules/fs.gear
09:44:07  <eddyb>write gets 5 as fd, which is valid, considering it's the 3rd file open
09:44:36  <eddyb>it's the first call to write, too
09:49:44  <indutny>hm...
09:50:51  <indutny>sorry, not sure if I can help you
09:51:04  <eddyb>I had problems before when I was using stdio and iostreams in the same program (not mixing them, just using them along each other)
09:51:12  <eddyb>that time was also EBADF
09:51:21  <eddyb>still not sure why that would be the case
10:19:33  * indexzeroquit (Quit: indexzero)
10:41:54  <CIA-53>node: koichik master * rf5a01d1 / test/message/undefined_reference_in_new_context.out :
10:41:54  <CIA-53>node: test: fix test/message/undefined_reference_in_new_context.js
10:41:54  <CIA-53>node: after 4d4900f, stack trace was changed. - http://git.io/6xC_fw
11:03:06  * piscisaureus__joined
11:36:27  <piscisaureus__>eddyb: can you at least point to where the uv_fs_write code is?
11:36:33  * piscisaureus__changed nick to piscisaureus_
11:36:58  <piscisaureus_>I don't really feel like browsing through your project to find it
11:40:35  <indutny> piscisaureus_ he's using DEFINE
11:40:50  <indutny>piscisaureus_: https://github.com/eddyb/gearbox-node/blob/master/src/modules/fs.gear#L106
11:41:41  <piscisaureus_>It seems that EBADF is easy to debug, since EBADF can only have one cause
11:42:09  <piscisaureus_>I would suggest `printf("%d\n", fd)` as a start
13:10:19  * bnoordhuisjoined
13:10:45  * raggiquit (Ping timeout: 255 seconds)
14:12:09  <piscisaureus_>bnoordhuis: are you coming here today?
14:37:12  * isaacsjoined
14:52:24  * pfox___joined
14:57:42  <piscisaureus_>igorzi: hey, yt?
15:03:53  * ericktjoined
15:12:37  <bnoordhuis>piscisaureus_: don't think i can
15:12:42  <bnoordhuis>maybe later this week?
15:12:47  <piscisaureus_>bnoordhuis: oh?
15:13:05  <bnoordhuis>mees got her flu shot so she's kind of ill
15:18:56  * ericktquit (Quit: erickt)
15:22:59  <piscisaureus_>bnoordhuis: ok
15:23:13  <bnoordhuis>piscisaureus_: or were you all set?
15:23:25  <piscisaureus_>bnoordhuis: you have to work on your family's resistance
15:23:34  <piscisaureus_>bnoordhuis: no, doesn't matter
15:23:48  <piscisaureus_>bnoordhuis: but later this week may be somewhat difficult for me
15:23:50  <bnoordhuis>i do, i stopped doing the dishes and the laundry
15:24:07  <bnoordhuis>yeah?
15:25:30  <piscisaureus_>I have appointments tomorrow and thursday
15:25:38  <piscisaureus_>friday I don't know yet
15:35:54  <CIA-53>node: Ben Noordhuis master * r362b5a6 / (src/node.js test/simple/test-process-next-tick.js):
15:35:54  <CIA-53>node: process: fix process.nextTick() error case regression
15:35:54  <CIA-53>node: Patch and test by Koichi Kobayashi. - http://git.io/HOkp1Q
15:37:09  <piscisaureus_>bnoordhuis: I saw that starting the windows fs_event implementation uses main-thread stat. Does the kqueue / infotify implementation do that too?
15:37:26  <bnoordhuis>piscisaureus_: what does main-thread stat mean?
15:37:33  <piscisaureus_>bnoordhuis: stat() on the main thread
15:37:47  <piscisaureus_>bnoordhuis: it uses that to figure out if a file is a directory or a file
15:37:59  <bnoordhuis>piscisaureus_: kqueue and inotify don't stat()
15:38:13  <piscisaureus_>ah ok
15:38:57  <piscisaureus_>So do we bring out the blocking call deflector?
15:39:10  <piscisaureus_>cannon
15:40:08  <bnoordhuis>i suppose we should
15:40:15  <bnoordhuis>hard-line all the way
15:57:08  * brsonjoined
15:59:14  * dapjoined
16:03:24  * igorziquit (Ping timeout: 265 seconds)
16:05:47  <bnoordhuis>piscisaureus_: https://github.com/joyent/libuv/pull/229#issuecomment-2589375
16:07:05  <piscisaureus_>the patch looks not right to me
16:08:13  <bnoordhuis>go on
16:08:59  <piscisaureus_>the problem is that uv_fs__open does not specify the right flags for CreateFile when O_APPEND is used
16:09:27  <piscisaureus_>if the write flags were specified all writes would always be to the end of the file
16:09:32  <piscisaureus_>no races, no seeking
16:10:16  <piscisaureus_>You can get atomic append on local files by opening a file with FILE_APPEND_DATA access and _without_ FILE_WRITE_DATA access. If you do this then all writes will ignore the the current file pointer and be done at the end-of file.
16:10:16  <piscisaureus_> HANDLE hFile = CreateFile(TEXT("c:\\file.txt"), FILE_APPEND_DATA , FILE_SHARE_WRITE, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
16:10:56  <piscisaureus_>bnoordhuis: I assume that this is the same behavior as you get on unix
16:11:09  <piscisaureus_>when opening in append mode, the *only* thing you can do is append
16:13:36  <bnoordhuis>piscisaureus_: there's a difference with unix
16:13:52  <bnoordhuis>on unix, O_APPEND sets the file pointer atomically to EOF
16:13:58  <bnoordhuis>but you can still lseek() the file
16:14:09  <piscisaureus_>hmm. I kind of not believe that :-)
16:14:31  <bnoordhuis>piscisaureus_: want to bet a sixpack?
16:15:01  <piscisaureus_>you still owe me a sixpack for the fact that libev doesn't use epollet :-)
16:15:11  <bnoordhuis>stupid libev >:(
16:15:40  <bnoordhuis>maybe i should amend my statement on O_APPEND
16:15:50  <bnoordhuis>it sets the file pointer to EOF atomically on each *write*
16:16:02  <bnoordhuis>but you can still lseek() and read() / pread()
16:16:05  <piscisaureus_>bnoordhuis: aha
16:16:10  <piscisaureus_>bnoordhuis: then that's the same
16:16:23  <piscisaureus_>bnoordhuis: I meant, you can't write anywhere else but at the end
16:16:27  <piscisaureus_>reading is a different story
16:16:41  <bnoordhuis>we're in violent agreement then :)
16:46:04  <CIA-53>node: Maciej Małecki master * rb4afe60 / src/node.cc :
16:46:04  <CIA-53>node: node: remove `process.compile`
16:46:04  <CIA-53>node: It was deprecated before v0.4. - http://git.io/AgB1yg
17:08:57  * igorzijoined
17:10:23  <igorzi>piscisaureus: what
17:10:26  <igorzi>*what
17:10:39  <CIA-53>node: Ben Noordhuis master * r37bb37d / (doc/api/os.markdown lib/os.js test/simple/test-os.js): os: rename getNetworkInterfaces() to networkInterfaces() - http://git.io/kl7t7A
17:10:42  <igorzi>*what's up? (stupid keyboard)
17:11:43  <piscisaureus_>igorzi: (1) what do you think about https://github.com/joyent/libuv/pull/229#issuecomment-2592430
17:13:10  <piscisaureus_>igorzi: (2) https://github.com/joyent/libuv/blob/master/src/win/fs-event.c#L158 + https://github.com/joyent/libuv/blob/master/src/win/fs-event.c#L176 + https://github.com/joyent/libuv/blob/master/src/win/fs-event.c#L194
17:13:10  <piscisaureus_>Shouldn't we be doing that on the thread pool?
17:15:38  <igorzi>piscisaureus_: hmm yeah.. it's kind of the same as what we do with CreateProcess (which we don't do on the thread pool). but, you're probably right, here we're doing file i/o so we should do that on the thread pool.
17:15:39  * AvianFluquit (Quit: Leaving)
17:17:19  <igorzi>piscisaureus_: also after reading your comment in https://github.com/joyent/libuv/pull/229#issuecomment-2592430, I agree with you
17:20:37  <igorzi>piscisaureus_: is there an issue opened for uv_fs_event?
17:20:54  <piscisaureus_>igorzi: not yet
17:21:17  <piscisaureus_>I will add one
17:23:22  <piscisaureus_>igorzi: https://github.com/joyent/libuv/issues/231
17:26:12  <igorzi>piscisaureus_: i tried increasing the number of OVERLAPPED_ENTRY structs passed to GetQueuedCompletionStatusEx (from 64 to 128), and see 6-10% improvement on http_simple
17:27:24  * ericktjoined
17:27:59  <igorzi>piscisaureus_: you ok with that change?
17:35:37  * mikealjoined
17:37:01  <bnoordhuis>i'll have to skip the call tonight unless we move it to 1200 PST
17:44:01  * mikealquit (Quit: Leaving.)
17:48:22  <piscisaureus_>igorzi: yep I am okay with that
17:50:52  <CIA-53>libuv: Igor Zinkovsky master * r90b0b7d / src/win/core.c : windows: increase the number of OVERLAPPED_ENTRYs passed to GetQueuedCompletionStatusEx - http://git.io/UfRq-A
18:11:51  * mikealjoined
18:17:04  * mikealquit (Quit: Leaving.)
18:20:16  <eddyb>piscisaureus_: oh, hi
18:20:19  <eddyb>still around?
18:20:28  <eddyb>I've printed fd, it's 5
18:20:35  <eddyb>I think I said that before
18:21:11  <eddyb>[11:44] <eddyb> write gets 5 as fd, which is valid, considering it's the 3rd file open
18:22:28  <piscisaureus_>eddyb: I don't know what's wrong actually
18:22:45  <piscisaureus_>eddyb: you should make sure fd 5 is actually opened and not closed
18:22:49  <piscisaureus_>maybe you can strace it
18:23:05  <eddyb>strace==stack trace?
18:23:23  <eddyb>hmm, let me put a printf in the only function closing a fd
18:23:33  <piscisaureus_>eddyb: strace is a linux tool
18:25:01  <eddyb>oh
18:26:51  * AvianFlujoined
18:28:32  <eddyb>this is weird
18:28:40  <eddyb>can I paste 4 lines?
18:28:44  <eddyb>open fs.js 5
18:28:45  <eddyb>read 5
18:28:47  <eddyb>read 5
18:28:48  <eddyb>close 5 0
18:29:11  <eddyb>that's what happens the first time (when the file to execute gets loaded)
18:29:23  <eddyb>open a 5
18:29:25  <eddyb>write 5
18:29:26  <eddyb>Error: Bad file descriptor, EBADF ''
18:29:29  <eddyb>this looks suspicious
18:29:35  <eddyb>why the same fd?
18:29:47  <eddyb>and why not 3?
18:29:55  <eddyb>I don't open anything else, AFAIK
18:31:16  <rmustacc>What system are you running on?
18:31:54  <rmustacc>You probably are getting 5 though because there are file descriptors corresponding to the polling backends.
18:32:12  <rmustacc>Getting the same file descriptor is also fine, given that you closed it first.
18:32:16  <piscisaureus_>yeah, maybe its the epoll fd
18:33:01  <rmustacc>It's almost certainly that.
18:34:59  <eddyb>but why I'm getting that error?
18:35:36  <piscisaureus_>maybe because you can't write to an epoll fd?
18:36:04  <piscisaureus_>eddyb: srsly, we can't tell why you get that error
18:36:39  <piscisaureus_>eddyb: it's probably a bug in libuv (not unlikely) or in your program (even more likely)
18:36:47  <eddyb>yeah, well
18:37:03  <piscisaureus_>it is definitely not a know issue with libuv
18:37:09  <piscisaureus_>*known
18:37:24  <eddyb>the only other time I was getting BAD FD before is when I was using iostreams in one place and stdio in others
18:37:52  <rmustacc>eddyb: What platform are you?
18:37:58  <eddyb>iostreams would fail magically (I wasn't doing anything tricky with their internals)
18:38:02  <eddyb>well, linux x64
18:38:25  <rmustacc>Well, what does /proc/<pid>/fd correspond to.
18:38:36  <rmustacc>What does it think fd 5 is at that point in time?
18:38:53  <rmustacc>The fact that you're using fd 5 isn't shocking at all.
18:39:24  <piscisaureus_>also, look at man 2 write if you want to know why the OS gives you that error
18:39:30  <piscisaureus_>EBADF
18:39:30  <piscisaureus_> fd is not a valid file descriptor or is not open for writing.
18:39:38  <rmustacc>Have you gotten this down to as simple as possible, dead-reproducible, case?
18:39:50  <eddyb>rmustacc: nope
18:40:06  <eddyb>it might not even happen on a computer next door
18:40:12  <eddyb>piscisaureus_: yeah, well
18:40:18  <eddyb>invalid means negative, right?
18:40:31  <piscisaureus_>no
18:40:35  <isaacs>eddyb: invalid could just mean a fd that isn't open
18:40:53  <isaacs>eddyb: like, if you just did fs.write(25, ...) but never got that as an fd from an open call
18:41:12  <eddyb>open("a", O_RDONLY) = 5
18:41:19  <eddyb>NO FUCKING WAY
18:41:19  <rmustacc>Well, there's your problem.
18:41:24  <eddyb>thanks for the strace tip
18:41:45  <isaacs>lol
18:41:51  <piscisaureus_> fd is not a valid file descriptor or is not open for writing.
18:41:58  <eddyb>time to see what header redefines that
18:42:12  <isaacs>attack of the o_rdonly
18:42:26  <eddyb>because the code is exactly the same as node master
18:42:31  <eddyb>the js code for fs, I mean
18:43:24  <eddyb>wait
18:43:29  <eddyb>that's why it wasn't creating the file
18:44:06  <eddyb>so constants.O_CREAT | constants.O_TRUNC | constants.O_WRONLY == constants.O_RDONLY
18:44:31  <isaacs>o_rdonly = read-only
18:45:56  <eddyb>I know
18:46:06  <eddyb>but the above is true in my case
18:46:08  <isaacs>my brain always interprets the O_R in O_RDONLY as a face with a monacle
18:46:16  <eddyb>don't ask me why
18:46:49  <piscisaureus_>that looks like a bug to me
18:47:35  <isaacs>eddyb: .... o_rdonly is 0 usually
18:47:40  <eddyb>https://github.com/eddyb/gearbox-node/blob/master/src/modules/constants.cc
18:47:42  <eddyb>:O
18:47:43  <eddyb>no
18:47:45  <eddyb>way
18:47:46  <eddyb>no
18:47:48  <eddyb>fucking
18:47:49  <eddyb>way
18:47:51  <eddyb>no
18:47:52  <eddyb>no
18:47:54  <eddyb>no
18:47:55  <eddyb>NOPE
18:47:57  <eddyb>I don't want to believe that
18:48:31  <eddyb>somehow this: https://github.com/eddyb/gearbox-node/blob/master/src/modules/constants.gear
18:48:33  <eddyb>failed to convert
18:48:37  <eddyb>omg what a facepalm
18:48:40  <eddyb>pffft
18:48:45  <eddyb>I feel like an idiot
18:49:24  <isaacs>oh, ok
18:50:25  <isaacs>what's gearbox, anyway?
18:51:19  <eddyb>a fucked up thing
18:53:30  <eddyb>it's easier to fix a problem when you know what it is
18:53:49  <rmustacc>Yup
18:55:41  <eddyb>isaacs: it's supposed to make writing bindings & native modules much easier
18:56:05  <eddyb>right now I'm trying to copy & clean the node.js code
18:56:19  <eddyb>buffer is done, minus some parts of the C++ interface
18:56:26  <eddyb>(ctors to be exact)
18:56:32  <isaacs>i see
18:57:10  <eddyb>I lost a day because my member-reference class was missing a move operator
18:57:38  <eddyb>now another day because of this stupid thing
18:57:51  <eddyb>didn't even look when committing an empty file
18:58:16  <piscisaureus_>eddyb: so what is gearbox exactly?
18:58:21  <piscisaureus_>it's node with some extras?
18:58:27  <piscisaureus_>it's a new programming language?
18:58:49  <piscisaureus_>is it a new server side js platform?
18:58:50  <eddyb>there was a project called v8-gearbox
18:59:10  <eddyb>which attempted what node succeeded
18:59:19  <eddyb>but I made writing bindings a piece of cake
18:59:53  <eddyb>piscisaureus_: there are two things: the API on top of v8, which lets me do something like _global["Buffer"] = NativeModule::require("buffer")["Buffer"];
19:00:09  <eddyb>NativeModule::require could even be a JS function reference
19:00:24  <eddyb>and the .gear format
19:01:06  <eddyb>which lets me create a structured module, and a converter does the dirty work of generating code that extracts arguments, sets objects and prototype etc.
19:01:29  <eddyb>right now I'm improving the old thing, while trying to copy the node JS API
19:01:41  <eddyb>for the JS-only modules, I can just copy them in
19:02:12  * AvianFluquit (Ping timeout: 255 seconds)
19:02:29  * AvianFlu_joined
19:02:37  * AvianFlu_changed nick to AvianFlu
19:02:56  <eddyb>but I'm just a problematic kid
19:03:51  <piscisaureus_>ah, ok
19:03:56  <piscisaureus_>thnx for explaining
19:04:09  <piscisaureus_>igorzi: ryah: bnoordhuis: going for a call today or?
19:04:31  <piscisaureus_>isaacs if he's interested
19:05:00  * isaacsis feverish and about to pass out
19:05:23  <piscisaureus_>oh noes
19:08:07  <eddyb>I wish I had a fever
19:08:17  <eddyb>I wouldn't have to go to school for at least a couple of days
19:11:26  * AvianFlu_joined
19:11:37  * AvianFluquit (Disconnected by services)
19:11:43  * AvianFlu_changed nick to AvianFlu
19:14:32  <eddyb>ofc now I'm too messed up to continue my work
19:14:39  <eddyb>[21:14] <CIA-102> gearbox-node: Eduard Burtescu master * r96820f7 / (14 files in 4 dirs): Fixed constants and fs, and finally got rid of Io. - http://git.io/KAbQ7w
19:14:46  <eddyb>brb, food
19:21:42  * raggijoined
20:09:30  * mikealjoined
20:15:07  * AvianFluquit (Ping timeout: 260 seconds)
20:31:57  * AvianFlujoined
21:09:52  <igorzi>piscisaureus_ bnoordhuis: do you use a script to update libuv in node?
21:10:02  <igorzi>or maybe one of you could update it please?
21:10:05  <bnoordhuis>igorzi: no, just a one-liner
21:10:31  <bnoordhuis>igorzi: rm -rf deps/uv && (cd ../libuv && git archive --format=tar --prefix=deps/uv/ HEAD) | tar x
21:10:40  <bnoordhuis>but i'll update it if you want
21:11:15  <igorzi>bnoordhuis: yes, please
21:12:05  * piscisaureus_quit (Ping timeout: 260 seconds)
21:13:02  <CIA-53>node: Ben Noordhuis master * r21b64dc / (9 files in 6 dirs): uv: upgrade to 90b0b7d - http://git.io/JTv2tQ
21:13:05  <bnoordhuis>igorzi: ^
21:13:14  <igorzi>bnoordhuis: tx
21:13:20  <igorzi>*thx
21:18:30  * AvianFluquit (Ping timeout: 260 seconds)
21:20:14  <CIA-53>node: Igor Zinkovsky master * r3060266 / (lib/child_process.js src/tcp_wrap.cc src/tcp_wrap.h): windows: enable pending accepts knob - http://git.io/3L7uwg
21:21:49  <igorzi>bnoordhuis: re: https://github.com/joyent/node/issues/1988#issuecomment-2595832.. are you adding uv_pipe_name() or something like that?
21:22:56  <bnoordhuis>igorzi: probably uv_pipe_getsockname() - the pipe counterpart of uv_tcp_getsockname()
21:27:27  <CIA-53>node: Maciej Małecki master * rfc61134 / (11 files in 7 dirs): (log message trimmed)
21:27:27  <CIA-53>node: doc: fix links
21:27:27  <CIA-53>node: Changes:
21:27:27  <CIA-53>node: * 'http://github.com' => 'https://github.com'
21:27:27  <CIA-53>node: * 'https://github.com/ry/node' => 'https://github.com/joyent/node'
21:27:28  <CIA-53>node: * 'https://github.com/ry/http-parser' =>
21:27:29  <CIA-53>node: 'https://github.com/joyent/http-parser'
21:28:55  * AvianFlujoined
21:35:03  * _eddyb_joined
21:35:03  * _eddyb_quit (Changing host)
21:35:03  * _eddyb_joined
21:35:47  * eddybquit (Read error: Operation timed out)
21:55:31  * AvianFlu_joined
21:58:09  * AvianFluquit (Ping timeout: 255 seconds)
22:06:29  * AvianFlu_quit (Read error: Connection reset by peer)
22:07:38  * AvianFlu_joined
22:12:19  * mikealquit (Quit: Leaving.)
22:13:35  <igorzi>piscisaureus: hey yt?
22:15:13  * piscisaureus_joined
22:15:42  * _eddyb_quit (Quit: Konversation terminated!)
22:27:03  <igorzi>piscisaureus_: https://gist.github.com/1332141 <-- quick review?
22:29:56  <piscisaureus_>igorzi: I've been waiting for it :-)
22:29:58  <piscisaureus_>lgtm
22:31:08  <piscisaureus_>igorzi: wy don't we set the other flags as well btw?
22:31:26  <piscisaureus_>NOPFAULTERROR | NOOPENFILERROR
22:34:04  <igorzi>piscisaureus_: yep, let's set the other flags as well
22:36:14  <piscisaureus_>igorzi: something else... should we land tomasz' msi builder before .6?
22:36:46  <igorzi>piscisaureus_: ryah already landed it afaik
22:37:24  <piscisaureus_>oh, ok
22:37:36  <piscisaureus_>I guess I should try to use it then :-)
22:38:40  <CIA-53>libuv: Igor Zinkovsky master * r7a53924 / src/win/core.c : windows: call SetErrorMode on startup to ask the system not to handle critical errors - http://git.io/c8-AWw
22:40:09  <piscisaureus_>igorzi: btw it would be interesting to be smarter about error reporting in the future
22:40:25  <piscisaureus_>in server environments you really don't want these dialogs, you just want to restart node
22:40:38  <piscisaureus_>but in production, it might be good to have the user report crashes
22:40:56  <piscisaureus_>I believe if you sign your binary you can get the crash stats from msft right?
22:44:43  <igorzi>piscisaureus_: for most of these we know how to handle the error (e.g. if LoadLibrary fails - we just don't load the addon)
22:45:28  <piscisaureus_>igorzi: yes, sure - I was talking about real crashes
22:45:47  <piscisaureus_>I am pretty sure that there will be a many of them
22:50:46  * AvianFlu_changed nick to AvianFlu
22:50:57  <igorzi>piscisaureus_: ahh ok. i think that should depend on what system admin wants to do.. you can configure watson to collect the crash dump and exit (http://support.microsoft.com/kb/q121434/)
22:54:09  <piscisaureus_>http://msdn.microsoft.com/en-us/windows/hardware/gg487440
22:54:58  <piscisaureus_>igorzi: ^-- can we leverage that?
22:57:37  <igorzi>piscisaureus_: i think so.. i'll find out. this would be very useful.
22:58:08  <igorzi>bnoordhuis: does pummel/test-net-throttle pass on unix?
22:58:34  <bnoordhuis>igorzi: yep
23:01:32  <igorzi>bnoordhuis: why does this https://github.com/joyent/node/blob/master/test/pummel/test-net-throttle.js#L43 evaluate to false? i think i'm missing something very obvious.
23:02:32  <piscisaureus_>it's an implementation detail
23:03:13  <piscisaureus_>not a bug
23:05:15  <igorzi>so, it's not because of this https://github.com/joyent/node/blob/master/lib/net.js#L393, right?
23:05:19  <piscisaureus_>I think if you split that up into three writes, the third will always return false
23:06:13  <piscisaureus_>igorzi: no, I don't think so
23:06:35  <piscisaureus_>igorzi: the write is done from the connect callback, so a connection should have been already established
23:08:00  <piscisaureus_>igorzi: it's this: https://github.com/joyent/node/blob/master/lib/net.js#L420
23:08:31  <piscisaureus_>I think it wouldn't hurt to check the write queue size is correctly tracked on windows btw
23:08:59  <igorzi>piscisaureus_: ok, i'll do that
23:09:48  <piscisaureus_>Igorzi: basically when WSASend returns ERROR_REQUEST_PENDING then we increase write_queue_size, and we decrease it again when the request returned
23:10:13  <piscisaureus_>igorzi: but if WSASend completes synchronously the queue size is not touched
23:10:34  * mikealjoined
23:10:37  <piscisaureus_>that's what *may* be happening
23:11:13  <piscisaureus_>the return value from send is supposed to be a hint to the user, e.g. when it returns true you can write more, if it returns false it would be better to wait for the resume event
23:12:46  <igorzi>piscisaureus_: yeah, it does complete without IOCP
23:13:24  <igorzi>piscisaureus_: maybe we should do several writes in that test?
23:16:32  <piscisaureus_>yes
23:16:49  <igorzi>piscisaureus_: or maybe we should still count writes that complete synchronously towards write_queue_size?
23:16:51  <piscisaureus_>if you do 3 writes I think it returns pending
23:17:06  <piscisaureus_>igorzi: nah
23:17:20  <piscisaureus_>igorzi: that means that every write, however small, always returns false
23:17:31  <igorzi>piscisaureus_: true
23:17:31  <piscisaureus_>doesn't strike me as very efficient
23:18:03  <piscisaureus_>igorzi: just split up that write, and check the return value of the third write
23:18:16  <piscisaureus_>WSASend behavior is documenten somewhere, let me look it up
23:22:57  <piscisaureus_>igorzi: http://support.microsoft.com/kb/214397, third bulleted list
23:25:39  <piscisaureus_>so, long story short, make 3 writes
23:31:46  <igorzi>piscisaureus_ bnoordhuis: https://gist.github.com/1332271
23:32:47  <piscisaureus_>igorzi: works by virtue of the fact that body.length % 3 == 0
23:32:50  <piscisaureus_>but lgtm
23:33:06  <piscisaureus_>if it still passes on unix (bnoordhuis?)
23:33:31  * bnoordhuischecks
23:33:39  <piscisaureus_>oh btw
23:33:46  * bnoordhuishas a crying baby to attend to first
23:33:59  <piscisaureus_>igorzi: the second argument to slice is length I think (not end)
23:34:52  <piscisaureus_>igozi: oh not true, sorry
23:35:11  <igorzi>piscisaureus_: k
23:38:32  <bnoordhuis>igorzi: test passes with patch
23:44:53  <CIA-53>node: Igor Zinkovsky master * rcc92234 / test/pummel/test-net-throttle.js : fix pummel/test-net-throttle on windows - http://git.io/uq9HRg
23:46:04  <igorzi>bnoordhuis: do simple/test-debugger-* tests fail on unix?
23:46:56  <bnoordhuis>igorzi: test-debugger-repl does, test-debugger-client does not
23:47:28  <bnoordhuis>there's something funky about test-debugger-repl btw, i looked at it last week
23:49:59  <igorzi>ahh ok. test-debugger-client fails because it uses process.kill
23:50:47  <igorzi>piscisaureus_: btw, do you think it's worth doing anything with process.kill before doing signals?
23:51:00  <piscisaureus_>igorzi: hmm
23:51:19  <piscisaureus_>igorzi: I don't think it'll fix much
23:51:40  <piscisaureus_>igorzi: I was planning to do signals today but I am still stuck on other stuff
23:52:58  <piscisaureus_>if you want to you can work on kill though
23:54:29  <igorzi>piscisaureus_: i don't know if we'll be able to get signals done for 0.6 though. right now we do this for process.kill: https://github.com/joyent/node/blob/master/src/node.js#L330. do you think it's sufficient enough for a release?
23:55:05  <igorzi>piscisaureus_: plus it's still not clear how many apps/modules use signals, right?
23:55:39  <piscisaureus_>igorzi: I think it'll not hurt many people if we don't support that
23:55:58  <piscisaureus_>igorzi: but the debugger tests fail because they try to send SIGUSR1 to some process
23:56:49  <piscisaureus_>igorzi: maybe we should have some sort of stub kill implementation
23:56:49  <piscisaureus_>uv_kill(pid, UV_SIGKILL) -> TerminateProcess
23:57:09  <piscisaureus_>uv_kill(pid, SIGHUP) -> CTRL_BREAK_EVENT
23:57:23  <piscisaureus_>er, UV_SIGHUP
23:57:40  <piscisaureus_>uv_kill(pid, 0) -> noop, but only succeed if pid exists
23:58:40  <igorzi>piscisaureus_: that seem doable.. is ryah back from japan?
23:58:55  <piscisaureus_>hmm... I don't know
23:58:57  <piscisaureus_>I'd think so