00:13:03  * ArmyOfBrucequit (Excess Flood)
00:13:35  * ArmyOfBrucejoined
00:16:50  * mikealquit (Quit: Leaving.)
00:20:02  * mikealjoined
00:34:51  * indexzeroquit (Quit: indexzero)
00:35:50  * bradleymeckjoined
00:40:53  * piscisaureus_quit (Ping timeout: 248 seconds)
00:48:52  <isaacs>hmm.. this new streams stuff is weird with stdin
00:51:21  <TooTallNate>how so?
00:54:11  * dr34dl0ckjoined
00:58:13  * brson_quit (Ping timeout: 255 seconds)
00:58:40  * brsonjoined
00:58:51  * loladiroquit (Quit: loladiro)
01:02:02  * piscisaureus_joined
01:03:24  * brsonquit (Client Quit)
01:03:39  * brsonjoined
01:13:24  * tomshredsjoined
01:16:30  * bnoordhuisjoined
01:17:11  <bnoordhuis>morning
01:17:30  <mmalecki>hello
01:17:51  <bnoordhuis>morning maciej, how's poland tonight?
01:17:59  <bnoordhuis>piscisaureus_: are you at the office friday?
01:18:15  <mmalecki>bnoordhuis: I'm in Berlin now. how's Netherlands these days?
01:18:29  <bnoordhuis>mmalecki: cold and dark and slightly snowy
01:18:48  <mmalecki>same here, actually
01:19:24  <piscisaureus_>it's fucked up
01:19:27  <piscisaureus_>bnoordhuis: yes I am
01:19:38  <bnoordhuis>piscisaureus_: okay, i'll probably drop by
01:19:55  <piscisaureus_>bnoordhuis: I may not be able to make it very late on friday tho, but it depends.
01:20:21  <bnoordhuis>is your 'just a friend' friend coming over again?
01:20:41  <piscisaureus_>which one?
01:21:09  <piscisaureus_>bnoordhuis: I have the feeling you secretly moved to japan btw
01:21:18  <piscisaureus_>bnoordhuis: did you just get up at 2am?
01:21:21  <bnoordhuis>yep
01:21:54  <bnoordhuis>lately, i haven't been able to sleep for more than 4, maybe 4.5 hours consecutively :(
01:22:19  <piscisaureus_>I hear dementia does that
01:22:31  <mmalecki>bnoordhuis: less booze helps
01:22:44  <bnoordhuis>piscisaureus_: also korsakov
01:23:21  <piscisaureus_>most brain deterioration diseases do that actually
01:23:41  <bnoordhuis>hah, packt is asking me to write a book for them on mod_pagespeed
01:23:57  <piscisaureus_>I bet people with creuzfeldt jakob have it too
01:24:15  <piscisaureus_>bnoordhuis: and, are you?
01:24:18  <bnoordhuis>no
01:24:36  <piscisaureus_>writing a book seems incredibly boring
01:24:50  <piscisaureus_>bnoordhuis: btw - did see ruben's meeting invite?
01:24:56  <bnoordhuis>yep, tomorrow right?
01:25:00  <bnoordhuis>the pay is lousy too btw
01:25:04  <piscisaureus_>yeah
01:25:40  <TooTallNate>i would recommend against writing a book
01:25:54  <bnoordhuis>TooTallNate: you wrote one for packt, didn't you?
01:26:10  <bnoordhuis>i remember they asked me to be a technical editor
01:26:19  <TooTallNate>bnoordhuis: Manning actually, but they're taking their sweet time editing
01:26:27  <TooTallNate>it'll be outdated by the time it gets released :\
01:26:30  <bnoordhuis>hah
01:27:08  <bnoordhuis>i mean: sad
01:31:29  <TooTallNate>piscisaureus_: the guy on twitter got it working btw
01:31:29  <piscisaureus_>bnoordhuis: btw there was one thing I wanted to discuss
01:31:44  <piscisaureus_>TooTallNate: link?
01:31:47  <bnoordhuis>piscisaureus_: what is it?
01:31:49  <piscisaureus_>I dont see that tweet
01:32:00  <piscisaureus_>bnoordhuis: so I like that you fixed the chdir() threadsafety issue
01:32:01  <TooTallNate>piscisaureus_: https://twitter.com/mattpodwysocki/status/276483313781321729
01:32:37  <piscisaureus_>TooTallNate: ah, that's Matt, not entirely a random guy :-)
01:32:47  <TooTallNate>true
01:32:48  <piscisaureus_>bnoordhuis: I like that you fixed chdir() thread safety
01:32:49  <TooTallNate>I've met him i think
01:32:53  <TooTallNate>nice guy :)
01:33:03  <piscisaureus_>bnoordhuis: but what happens if the user moves the current working directory?
01:33:09  * ericktjoined
01:33:09  <piscisaureus_>bnoordhuis: it doesnt seem threadsafe to me
01:33:25  <piscisaureus_>bnoordhuis: on windows this is not so much of an issue because cwd's are not movable
01:33:38  <piscisaureus_>although, come to think of it .... /me tries something
01:34:18  <bnoordhuis>piscisaureus_: i don't think there's a thread safety issue
01:34:31  <bnoordhuis>path.resolve() uses process.cwd() and getcwd() is an atomic action
01:34:35  <piscisaureus_>ah no on windows the entire chain is root
01:34:39  <piscisaureus_>ah no on windows the entire chain is locked
01:34:52  <bnoordhuis>it probably won't work as the user expects it to but that can't be helped
01:35:10  <piscisaureus_>bnoordhuis: well what happens if the user moves or renames the current working directory in between getwd() and the file operation?
01:35:32  <piscisaureus_>bnoordhuis: it would be nicer to use openat() and keep the cwd open
01:35:38  <piscisaureus_>although I think os x does not support that
01:35:40  <bnoordhuis>piscisaureus_: that'll fail, alas
01:35:42  <bnoordhuis>no indeed
01:36:09  <piscisaureus_>although I think os x has support for per-thread cwds and fchdir() so in theory the same could be accomplished
01:36:26  <bnoordhuis>oh? how does that work?
01:36:36  <piscisaureus_>I read it somewhere. I didn't look it up :-)
01:36:39  <piscisaureus_>I should I suppose
01:37:23  <piscisaureus_>http://permalink.gmane.org/gmane.comp.standards.posix.austin.general/6227 <-- a hint that it exists
01:38:33  <bnoordhuis>interesting
01:38:40  * abraxasjoined
01:38:47  <piscisaureus_>I think recent BSDs support openat
01:38:53  <piscisaureus_>solaris does too
01:40:17  <bnoordhuis>yes, freebsd 8 and up support it
01:40:26  <bnoordhuis>fairly newish iow
01:41:38  <piscisaureus_>it is even possible on windows although it's not possible to traverse up (e.g. ../foo)
01:41:48  * jmar777joined
01:48:11  <piscisaureus_>ha! http://www.opensource.apple.com/source/python/python-3/python/Mac/Compat/chdir.c <--look at that
01:48:13  <piscisaureus_>or don't
01:50:02  * tomshredsquit (Quit: Linkinus - http://linkinus.com)
01:51:00  * dr34dl0ckquit (Quit: Colloquy for iPad - http://colloquy.mobi)
01:54:34  * tomshredsjoined
01:55:07  * bradleymeckquit (Quit: bradleymeck)
01:59:44  <bnoordhuis>piscisaureus_: ah... also found this: http://svn.python.org/projects/!svn/bc/5000/python/trunk/Mac/Compat/getwd.c
02:00:19  <piscisaureus_>hah, that's the same
02:00:59  <bnoordhuis>looks like os 9 code
02:01:58  <bnoordhuis>have you tried running it?
02:02:18  <ArmyOfBruce>wow, Think C.
02:02:37  <piscisaureus_>bnoordhuis: yes, it was just a joke :-)
02:03:15  <piscisaureus_>bnoordhuis: given that is is from 1987, it's mostly likely mac os 1 code :_)
02:03:21  <bnoordhuis>hah :)
02:04:30  <piscisaureus_>bnoordhuis: iirc the function has a weird name
02:04:42  <piscisaureus_>like procthreadinfo_withpathname or something
02:06:20  <piscisaureus_>http://www.opensource.apple.com/source/xnu/xnu-2050.9.2/bsd/sys/user.h <-- look for uu_cdir
02:07:33  <piscisaureus_>bnoordhuis: http://www.opensource.apple.com/source/xnu/xnu-1456.1.26/bsd/vfs/vfs_syscalls.c -> look for common_fchdir
02:08:04  <piscisaureus_>aaah
02:08:06  <piscisaureus_>__pthread_fchdir
02:08:18  <bnoordhuis>yep
02:08:44  * stagasquit (Ping timeout: 256 seconds)
02:09:22  * loladirojoined
02:09:23  <bnoordhuis>and __pthread_chdir too, it seems
02:09:27  <piscisaureus_>yeah
02:09:33  <piscisaureus_>fucking trillian
02:09:38  <piscisaureus_>better
02:09:48  <piscisaureus_>so, there doesn't seem to be a whole lot documentation about this
02:10:03  <piscisaureus_>I wonder if there is actually a way to call it
02:10:45  <isaacs>TooTallNate: re: stdin
02:11:08  <isaacs>so, if you do handle.readStart() then it looks like it'll keep the thing open
02:11:25  <isaacs>and before, that was fine, because we'd do that on .resume() and call readStop on .pause()
02:11:41  <bnoordhuis>piscisaureus_: #define SYS___pthread_chdir 348
02:11:42  <isaacs>but wth streams2, things are a little different for stdin
02:11:47  <isaacs>we pre-emptively fill up a buffer.
02:12:03  <piscisaureus_>bnoordhuis: sounds pretty ummm, advanturous to use that :-)
02:12:09  <piscisaureus_>bnoordhuis: and fun as well
02:12:29  <bnoordhuis>piscisaureus_: it's what we do on linux. though on linux, syscalls are stable
02:12:42  <piscisaureus_>I think they are sort of stable on mach too
02:12:56  <piscisaureus_>does os x actually implement openat in the very latest version
02:12:57  <piscisaureus_>?
02:13:38  <ArmyOfBruce>grep -r openat /usr/include -> nothing.
02:13:41  <bnoordhuis>i don't think so
02:13:47  <bnoordhuis>exactly
02:13:54  <ArmyOfBruce>(on Mountain Lion with roughly current XCode)
02:14:08  <piscisaureus_>lame
02:15:21  <bnoordhuis>you know, i'm not sure if those syscalls still exist in 10.8
02:15:34  <bnoordhuis>or at least, in that shape - there's no struct __pthread_chdir_args anywhere
02:15:49  <bnoordhuis>neither in the user or the kernel code
02:16:50  <piscisaureus_>bnoordhuis: which file are you looking at
02:16:51  <piscisaureus_>>
02:17:17  <bnoordhuis>piscisaureus_: bsd/sys/sysproto.h
02:18:08  <bnoordhuis>ah, apparently the syscalls just take a path or a fd
02:18:18  <bnoordhuis>convenient :)
02:18:38  <bnoordhuis>let's try a quick programm
02:25:26  <bnoordhuis>piscisaureus_: https://gist.github.com/4221344 <- works
02:26:34  <piscisaureus_>hah
02:26:34  <piscisaureus_>cool
02:26:49  * tomshredsquit (Quit: Linkinus - http://linkinus.com)
02:28:02  <piscisaureus_>bnoordhuis: so that could be another solution :-)
02:28:23  <bnoordhuis>yes... you still need to get the current cwd though if you want to emulate openat()
02:28:47  <bnoordhuis>oh wait, no of course not
02:28:53  <piscisaureus_>bnoordhuis: well, open('.') would work right :-)
02:28:54  <bnoordhuis>open(".", 0)
02:28:58  <piscisaureus_>yes
02:29:27  <piscisaureus_>bnoordhuis: another trick would be make process.chdir() async
02:29:36  <piscisaureus_>and synchronize it with the thread pool
02:29:57  <bnoordhuis>i guess but that would change the js api
02:30:01  <piscisaureus_>well
02:30:03  <piscisaureus_>yes
02:30:07  <piscisaureus_>although what we could do is
02:30:15  <piscisaureus_>synchronously open() the new cwd
02:30:24  <piscisaureus_>and then do fchdir() async
02:30:33  <piscisaureus_>but it requires a much smarter thread pool first
02:30:40  <bnoordhuis>heh, indeed
02:31:24  <piscisaureus_>this problem is not all that exciting
02:31:30  <piscisaureus_>in the end, nobody uses chdir()
02:31:42  <piscisaureus_>but it seems nice to have libuv support openat() etc
02:31:43  <bnoordhuis>you still cared enough to open an issue about it
02:31:54  <piscisaureus_>when I was still a bigot
02:32:28  * bnoordhuisinserts a tactful silence
02:33:00  <piscisaureus_>my intention was really to show that the thread pool was not that good of an abstraction
02:33:13  <piscisaureus_>I think everyone is aware of that nowadays
02:33:31  <piscisaureus_>back in the day it was sort of swept under the carpet - or atleast that;s what it felt like
02:33:32  * warzquit
02:40:57  * dapquit (Quit: Leaving.)
02:54:31  * TooTallNatequit (Read error: Operation timed out)
03:06:37  * dr34dl0ckjoined
03:07:46  * dr34dlockjoined
03:08:06  <piscisaureus_>Ok, bnoordhuis avoidance time
03:08:10  <piscisaureus_>bye peepz
03:08:14  <bnoordhuis>sleep tight, bertje
03:08:22  <piscisaureus_>bnoordhuis: get your ass out somewhat earlier tomorrow :-)
03:09:46  * joshthecoderquit (Quit: Leaving...)
03:12:38  * piscisaureus_quit (Ping timeout: 244 seconds)
03:15:53  * mmaleckichanged nick to mmalecki[zzz]
03:30:05  * dr34dl0ckquit (Quit: Colloquy for iPad - http://colloquy.mobi)
03:41:09  * dr34dlockquit (Quit: Colloquy for iPhone - http://colloquy.mobi)
03:45:45  <MI6>joyent/node: Ben Noordhuis master * c08e947 : buffer: remove unused #includes - http://git.io/piBJLw
03:46:14  * ericktquit (Quit: erickt)
03:46:38  * ericktjoined
04:05:01  * TooTallNatejoined
04:14:13  * brsonquit (Quit: leaving)
04:37:12  * joshthecoderjoined
04:42:33  * jmar777quit (Remote host closed the connection)
05:34:02  * mikealquit (Quit: Leaving.)
05:34:41  * mikealjoined
05:39:05  * tomshredsjoined
05:44:10  * tomshredsquit (Quit: Linkinus - http://linkinus.com)
06:24:40  * kazuponjoined
06:26:22  * kristatejoined
06:42:58  * ericktquit (Quit: erickt)
06:50:53  * joshthecoderquit (Ping timeout: 252 seconds)
07:11:06  * TooTallNatequit (Quit: ["Textual IRC Client: www.textualapp.com"])
07:23:12  * EhevuTovjoined
07:39:00  * loladiroquit (Quit: loladiro)
07:44:40  * loladirojoined
07:56:25  * benoitcquit (Excess Flood)
08:04:32  * benoitcjoined
08:10:42  * rendarjoined
08:20:42  * kristatequit (Ping timeout: 265 seconds)
08:24:47  * bnoordhuisquit (Read error: Operation timed out)
08:27:09  * stagasjoined
08:37:01  * `3rdEdenjoined
08:40:55  * kazuponquit (Remote host closed the connection)
08:55:42  * loladiroquit (Quit: loladiro)
08:58:53  * kristatejoined
09:00:38  * kristate_joined
09:03:33  * kristatequit (Ping timeout: 256 seconds)
09:17:47  * felixgejoined
09:17:47  * felixgequit (Changing host)
09:17:47  * felixgejoined
09:23:43  * hzjoined
09:29:47  * hzquit
09:40:53  * indutnyquit (Remote host closed the connection)
10:21:26  * indutnyjoined
10:34:25  * EhevuTovquit (Quit: This computer has gone to sleep)
10:40:20  * abraxasquit (Remote host closed the connection)
10:44:26  * EhevuTovjoined
11:04:37  * mmalecki[zzz]changed nick to mmalecki
11:16:23  * `3rdEdenquit (Remote host closed the connection)
11:21:51  * felixgequit (Quit: felixge)
11:22:02  * Chip_Zeroquit (Quit: Terminated with extreme prejudice - dircproxy 1.2.0)
11:23:55  * hzjoined
11:41:04  * Chip_Zerojoined
11:50:55  * `3rdEdenjoined
12:10:18  * felixgejoined
12:10:18  * felixgequit (Changing host)
12:10:18  * felixgejoined
12:13:55  * felixge_joined
12:16:47  * felixgequit (Ping timeout: 256 seconds)
12:16:47  * felixge_changed nick to felixge
12:25:55  * ArmyOfBrucequit (Excess Flood)
12:26:15  * EhevuTovquit (Quit: This computer has gone to sleep)
12:26:24  * ArmyOfBrucejoined
12:36:40  * felixgequit (Read error: Connection reset by peer)
12:36:47  * felixge_joined
12:50:05  <indutny>рщнф
12:50:06  <indutny>hoya
13:01:50  * stagasquit (Ping timeout: 260 seconds)
13:03:48  * hzquit (Ping timeout: 264 seconds)
13:06:34  * sgallaghjoined
13:19:20  * `3rdEdenquit (Quit: brb, iMac has gone snafu)
13:20:38  * jmar777joined
13:27:06  * `3rdEdenjoined
13:58:30  * bradleymeckjoined
14:00:58  * mmaleckichanged nick to mmalecki[out]
14:01:47  * bradleymeckquit (Client Quit)
14:05:20  * Raynosquit (Read error: Operation timed out)
14:05:35  * wavdedquit (Ping timeout: 240 seconds)
14:12:58  * sgallaghquit (Ping timeout: 250 seconds)
14:13:58  * indexzerojoined
14:28:02  * `3rdEdenquit (Remote host closed the connection)
14:29:21  * `3rdEdenjoined
14:40:27  * jmar777quit (Read error: Connection reset by peer)
14:40:54  * jmar777joined
14:43:06  * ericktjoined
14:44:47  * tomshredsjoined
14:45:46  * ArmyOfBrucequit (Excess Flood)
14:46:13  * ArmyOfBrucejoined
15:10:07  * bradleymeckjoined
15:17:43  * mmalecki[out]changed nick to mmalecki
15:28:06  * tomshredsquit (Quit: Linkinus - http://linkinus.com)
15:31:58  * indexzeroquit (Quit: indexzero)
15:32:28  * ericktquit (Quit: erickt)
15:35:31  * bnoordhuisjoined
15:38:11  * felixge_quit (Remote host closed the connection)
15:38:23  * felixgejoined
15:38:23  * felixgequit (Changing host)
15:38:23  * felixgejoined
15:38:52  <isaacs>hola
15:39:00  <MI6>joyent/node: isaacs streams2-net * 76a5099 : test: Sync writables may emit finish before callbacks (+2 more commits) - http://git.io/lbusPw
15:39:14  <isaacs>call in 20?
15:40:36  <indutny>hoya
15:40:43  <indutny>call in 1200
15:40:53  <indutny>or
15:40:57  <indutny>lets shift it 5 seconds later
15:41:08  <indutny>I've some small business to do right before the call
15:44:26  * bradleymeckquit (Quit: bradleymeck)
15:57:02  <isaacs>[08:24|% 95|+ 461|- 6]
15:57:14  <isaacs>[08:27|% 98|+ 479|- 6]
15:57:47  <isaacs>stdin is the last thing to figure out here. http seems to be working on streams2 now
15:58:11  <isaacs>bnoordhuis, piscisaureus, tootallnate, sblom: ping
15:58:15  <bnoordhuis>yep
16:02:23  <bnoordhuis>indutny: gittup
16:03:43  * ArmyOfBrucequit (Excess Flood)
16:04:10  * piscisaureus_joined
16:04:12  * ArmyOfBrucejoined
16:05:51  <indutny>bnoordhuis: hoya
16:05:55  <indutny>bnoordhuis: seen
16:06:00  <indutny>bnoordhuis: will fix soon
16:06:02  <bnoordhuis>indutny: wash your hands and join the call
16:06:10  <indutny>I'm already there
16:06:12  * wavdedjoined
16:06:18  <bnoordhuis>oh, so you are
16:06:23  <bnoordhuis>did you wash your hands?
16:06:42  <indutny>no
16:06:45  <indutny>I never do it
16:07:03  * `3rdEdenquit (Remote host closed the connection)
16:07:11  * hzjoined
16:13:14  * ericktjoined
16:15:58  <MI6>joyent/node: Ben Noordhuis master * 3ece130 : process: add getgroups(), setgroups(), initgroups() DRY the getuid(), ge - http://git.io/9zssNA
16:16:59  <mmalecki>bnoordhuis: ugh, shouldn't it be getGroups, setGroups, initGroups()?
16:17:28  <bnoordhuis>mmalecki: that'd be at odds with getpid(), getgid(), etc.
16:17:51  <mmalecki>this is ugly.
16:18:14  <bnoordhuis>i'm not forcing you to use it
16:18:55  * ArmyOfBrucequit (Excess Flood)
16:19:26  * ArmyOfBrucejoined
16:20:30  * hzquit (Read error: Connection reset by peer)
16:22:48  * hzjoined
16:34:41  <bnoordhuis>https://github.com/bnoordhuis/node/commit/3b7407f6d2f5d386fb762f707e0712fe23f1e4ec#diff-2
16:34:43  <indutny>bam
16:34:49  * TooTallNatejoined
16:35:51  <isaacs>mmalecki: when the syscall is all lowercase, we use that
16:35:56  <isaacs>mmalecki: like readdir
16:36:00  <isaacs>mmalecki: vs readFile
16:36:10  <mmalecki>ah, I see
16:37:05  <piscisaureus_>bnoordhuis: so
16:37:20  <piscisaureus_>bnoordhuis: suppose you have this string: "a\u1234\b"
16:38:08  <piscisaureus_>bnoordhuis: the buffer representation would be <Buffer 61 e1 88 b4 08>
16:39:20  <piscisaureus_>bnoordhuis: so if you treat all bytes as a character and strip high bits, you'll end up with 'aa\b4\b'
16:39:56  <indutny>I think transliteration is hard
16:39:59  <indutny>lets go shopping
16:40:06  <bnoordhuis>i like shopping
16:40:09  <piscisaureus_>bnoordhuis: but with your approach you'd end up with 'a4n'
16:40:11  <piscisaureus_>er
16:40:11  <MI6>joyent/node: Ben Noordhuis master * 5b65638 : tls, https: add tls handshake timeout Don't allow connections to stall i - http://git.io/iacjKA
16:40:13  <piscisaureus_>'a4b'
16:40:49  <piscisaureus_>bnoordhuis: where is the code that interprets a string as ascii?
16:41:13  <bnoordhuis>piscisaureus_: what code do you mean?
16:41:22  <piscisaureus_>bnoordhuis: where is the v8 string created?
16:43:10  <bnoordhuis>piscisaureus_: https://github.com/bnoordhuis/node/commit/3b7407f <- there
16:43:34  <bnoordhuis>in particular: https://github.com/bnoordhuis/node/commit/3b7407f#L1R280
16:44:33  <piscisaureus_>'ascii' - for 7 bit ASCII data only. This encoding method is very fast, and will strip the high bit if set. Note that this encoding converts a null character ('\0' or '\u0000') into 0x20 (character code of a space). If you want to convert a null character into 0x00, you should use 'utf8'.
16:44:43  <piscisaureus_>^-- the very fast part is definitely not true...
16:45:06  <piscisaureus_>I wonder if it actually was true in earlier versions of node
16:45:47  <piscisaureus_>bnoordhuis: I suppose we could also add a v8 api that is actually very fast :-)
16:45:49  <bnoordhuis>that section was probably written with string->buffer conversion in mind, not the other way aroun
16:45:52  <bnoordhuis>*around
16:46:02  <bnoordhuis>but as node supports buffer->string as well...
16:46:25  <piscisaureus_>bnoordhuis: I also wonder why the 0x0 ->0x20 replacement idea came from
16:46:34  <piscisaureus_>bnoordhuis: we could remove that last part from the specification
16:46:35  <bnoordhuis>that's what v8 does
16:46:43  <piscisaureus_>huh
16:46:54  <piscisaureus_>bnoordhuis: also for utf8?
16:46:59  <bnoordhuis>no, only ascii
16:47:26  <bnoordhuis>i speculate they intended to avoid null byte injection attacks in chrome
16:47:32  <TooTallNate>piscisaureus_: https://github.com/joyent/node/issues/297
16:47:44  <piscisaureus_>bnoordhuis: no it doesnt....
16:48:17  <bnoordhuis>piscisaureus_: it doesn't what?
16:48:17  <piscisaureus_>bnoordhuis
16:48:18  <piscisaureus_>> new Buffer([50, 0, 50]).toString('ascii').charCodeAt(1)
16:48:18  <piscisaureus_>0
16:48:46  <bnoordhuis>piscisaureus_: other way around, string->buffer
16:49:11  <bnoordhuis>it's the String::Write() API that converts 0 to 32
16:49:11  <piscisaureus_>ah, the other way around that's how it works indeed
16:50:11  <bnoordhuis>biab, putting my daughter to bed
16:50:14  <piscisaureus_>kk
16:52:54  * jmar777quit (Ping timeout: 264 seconds)
16:52:59  * ericktquit (Quit: erickt)
16:53:26  * lohkeyjoined
16:53:26  * lohkeyquit (Client Quit)
16:54:09  * jmar777joined
16:55:07  * dapjoined
16:56:55  * indexzerojoined
16:57:53  <bnoordhuis>piscisaureus_: back
17:02:09  <bnoordhuis>and gone again
17:11:05  * ttilleyquit (Quit: ttilley)
17:25:48  * indexzeroquit (Quit: indexzero)
17:27:23  * philips_quit (Excess Flood)
17:27:43  * philips_joined
17:28:09  * stagasjoined
17:42:01  * hzquit
18:03:45  * hzjoined
18:07:16  <rje>piscisaureus_: i'm debugging luvit and libuv on windows regarding process spawning. for our case we are not reading data or no data is available on stdout from the child.
18:07:26  * piscisaureus_quit (Quit: ~ Trillian Astra - www.trillian.im ~)
18:17:29  <indutny>bnoordhuis: hoya
18:17:35  <indutny>bnoordhuis: so speaking of error reporting
18:17:47  <indutny>bnoordhuis: what error should I return in case if uv_async_init or anything else will fail?
18:18:00  <indutny>EAGAIN?
18:23:41  * felixgequit (Read error: Connection reset by peer)
18:23:51  * felixgejoined
18:27:28  * bradleymeckjoined
18:37:27  * lohkeyjoined
18:41:01  * loladirojoined
18:44:01  * joshthecoderjoined
18:54:32  * felixgequit (Quit: felixge)
18:56:43  * benoitcquit (Ping timeout: 260 seconds)
18:59:41  * Ralt_joined
19:05:37  * loladiroquit (Quit: loladiro)
19:15:47  * brsonjoined
19:16:50  * Ralt_quit (Ping timeout: 255 seconds)
19:21:52  * piscisaureus_joined
19:22:06  * piscisaureus_quit (Client Quit)
19:26:10  * piscisaureus_joined
19:34:25  <piscisaureus_>rje: I re luvit stdout
19:34:52  <piscisaureus_>rje: I am not a luvit maintainer; I am also not aware of any libuv issues in this area.
19:35:04  <piscisaureus_>rje: can you be a little more specific about what you are doing?
19:37:28  <rje>piscisaureus_: sure. we have a test case we use to test output redirection. we spawn a child process "cmd.exe /C set" and read the output.
19:38:09  <piscisaureus_>rje: are you a luvit maintainer or a luvit usert?
19:39:16  <rje>piscisaureus_: maintainer (sort of), bug fixing for rackspace, fixed a few things, this is the last one in front of me.
19:40:16  <rje>you were kind enough last week to refer me the path code node uses and i implemented a variety of that in luvit :)
19:40:17  <piscisaureus_>rje: I can take a quick look; can you tell me exactly what repo(s) to clone (and if relevant, which SHAs to check out), and what test case to run?
19:41:00  <rje>piscisaureus_: sure, that would be most helpful. you can just cone my fork. github.com/rjemanuele/luvit
19:42:22  <rje>after building it, "cd tests" and from there run "../Debug/luvit.exe test-process.lua"
19:42:56  <rje>i'm banging my head so any help is welcome
19:43:13  * loladirojoined
19:43:28  <rje>piscisaureus_: if you haven't built it before i can walk you through it
19:45:50  * roxlu_part
19:45:59  * roxlu_joined
19:46:01  <roxlu_>hey
19:47:35  <roxlu_>just wanted to share this: www.cowsrequest.nl where we used libuv to interface movement sensors that the cows are wearing to track activity of cows to find out what songs cows like
19:47:58  <mmalecki>I might be high
19:48:23  <mmalecki>but I think I just read about using libuv to find out what songs cows like.
19:48:37  <roxlu_>lol
19:49:02  <roxlu_>I'm using libuv / udp sockets : )
19:53:15  <piscisaureus_>haha, moar libuv weirdness ftw
19:53:19  * kristate_quit (Ping timeout: 265 seconds)
19:54:59  <piscisaureus_>rje: so
19:55:06  <piscisaureus_>rje: this is what I get:
19:55:07  <piscisaureus_>D:\luvit\lib\luvit\luvit.lua:221: D:\luvit\lib\luvit\luvit.lua:321: nil
19:55:07  <piscisaureus_>stack traceback:
19:55:07  <piscisaureus_> [C]: in function 'assert'
19:55:07  <piscisaureus_> D:\luvit\lib\luvit\luvit.lua:321: in function <D:\luvit\lib\luvit\luvit.
19:55:07  <piscisaureus_>lua:221>
19:55:07  <piscisaureus_> [C]: in function 'xpcall'
19:55:08  <piscisaureus_> D:\luvit\lib\luvit\luvit.lua:221: in main chunk
19:55:08  <piscisaureus_> [C]: in function 'require'
19:55:09  <piscisaureus_> [string " local path = require('uv_native').execpat..."]:1: in main c
19:55:09  <piscisaureus_>hunk
19:55:10  <piscisaureus_>WARNING: forgot to close luv_tty lhandle=0026AF70 handle=0232FE58
19:55:10  <piscisaureus_>Press any key to continue . . .
19:55:12  <piscisaureus_>rje: that the same you are seeing?
19:56:15  <piscisaureus_>oh nvm
19:56:16  <piscisaureus_>sorry
19:57:15  * EhevuTovjoined
19:57:24  <piscisaureus_>luvit guys, you should really set up your gyp file better.... I recompiles libluajit every time :-(
19:58:18  <rje>piscisaureus_: i'll take suggestions how to do that. this is the first project i've used gyp.
19:59:44  * Raynosjoined
20:01:44  * kristatejoined
20:02:54  * indexzerojoined
20:03:16  * ArmyOfBrucequit (Excess Flood)
20:03:46  * ArmyOfBrucejoined
20:04:48  <bnoordhuis>indutny: re error reporting, report the actual system error
20:05:10  <indutny>bnoordhuis: erm
20:05:24  <indutny>bnoordhuis: what error happens when uv_async_init fails?
20:05:25  <indutny>:)
20:06:31  <piscisaureus_>how do I do setTimeout in luvit? <-- creationix rje ?
20:07:52  <CoverSlide>require('timer').setTimeout ?
20:10:01  <rje>piscisaureus_: what CoverSlide said :) require('timer').setTimeout
20:10:08  <piscisaureus_>right, ok thanks
20:10:43  <rje>luvit/lib/luvit/timer.lua is what gests exposed
20:18:10  <isaacs>API question: if you pass a {fd:number} into a fs.ReadStream, should it still call fs.close(fd) when it's done?
20:18:22  <isaacs>or should it assume that you've got this?
20:18:22  * mikealquit (Quit: Leaving.)
20:18:41  <indutny>this is eternal question
20:18:51  <indutny>I think it shouldn't
20:18:58  <indutny>but
20:19:02  <indutny>if it shouldn't
20:19:08  <indutny>who will know that file has ended
20:19:20  <indutny>so looks like it should
20:20:45  <isaacs>indutny: well, it's a read stream. so you do stream.on('end', closeTheThing)
20:20:55  <indutny>indeed
20:20:58  <isaacs>indutny: the only way to do this now is to clobber stream.destroy
20:21:06  <isaacs>and that's pretty stupid.
20:21:08  <indutny>aha
20:21:29  <isaacs>and makes fd caching much harder than it ought to be
20:21:41  <TooTallNate>isaacs: i'm +1 for letting the user handle it
20:22:04  <TooTallNate>isaacs: for node-wav, i have to write to the file, and then re-open it to write the proper header info at the beginning
20:22:14  <TooTallNate>it'd be ideal if i could just use 1 fd the whole time
20:22:20  <isaacs>TooTallNate: right
20:22:56  <TooTallNate>isaacs: but is {fd:Number} api even documented?
20:23:13  <isaacs>so you could do something like this: h = fs.ReadStream(path, {close:false}); h.write(header); h.on('end', function() { b = fs.ReadStream(path, {fd: h.fd}); b.end(body) })
20:23:31  <isaacs>TooTallNate: hm. maybe it isn't.
20:23:32  <isaacs>that'd be easy
20:23:48  <isaacs>then we could just say, "New rule! if you pass in an fd using this brand new api that didn't exist before i swear, then it works this way!"
20:23:57  <TooTallNate>hahahaha
20:24:37  <isaacs>hm... it's mentioned in the docs, but just barely
20:24:39  <isaacs>`options` is an object with the following defaults:
20:24:39  <isaacs> { flags: 'r',
20:24:39  <isaacs> encoding: null,
20:24:39  <isaacs> fd: null,
20:24:41  <isaacs> mode: 0666,
20:24:44  <isaacs> bufferSize: 64 * 1024
20:24:46  <isaacs> }
20:24:49  <isaacs>doesn't actually say what fd is, but it's not hard to guess.
20:25:05  <TooTallNate>well it also doesn't specify the closing behavior ;)
20:25:10  <piscisaureus_>rje: hmm, I get ERROR_ACCESS_DENIED from reading the pipe to cmd.exe
20:25:17  <isaacs>TooTallNate: still, it'd be nice to have a "please don't close this on end" flag.
20:25:34  <isaacs>TooTallNate: and that should just default to no-closing if you pass in an fd.
20:25:53  <TooTallNate>isaacs: ya sure, +1
20:26:40  <rje>piscisaureus_: where did you encounter that?
20:26:40  <piscisaureus_>rje: got it.
20:26:45  <TooTallNate>isaacs: we'll have to remember to set close:false on the stdin ReadStream when it's a file
20:26:51  <rje>piscisaureus_: yay
20:26:57  <TooTallNate>since i think that's the only place where we use {fd:Number} in core
20:27:06  <TooTallNate>on fs.ReadStreams at least…
20:27:12  <isaacs>TooTallNate: speaking of stdin, if you get a chance, today or tomorrow, do you think that you'd be able to write up a gist on how stdin should work, just from an api pov?
20:27:29  <TooTallNate>sure thing
20:27:36  <TooTallNate>i'll have to think about it a bit i guess
20:27:47  <isaacs>like, given streams2 semantics, when should the program sit open, and when should it not, etc.
20:28:03  <rje>piscisaureus_: details?
20:28:21  <TooTallNate>isaacs: so it's *kinda* like the http.get() thing, no?
20:28:24  <isaacs>TooTallNate: readStart === streams1 "resume"; readStop === streams1 "pause"
20:28:32  <TooTallNate>like, .pipe() is easy
20:28:36  <isaacs>yeah
20:28:38  * lohkeyquit (Quit: lohkey)
20:28:41  <isaacs>pipe() is trivial, and already Just Works
20:29:01  <isaacs>the tricky thing is .pause() and .resume() and .read()
20:29:16  <isaacs>also, just referencing process.stdin must not keep the program open
20:29:27  <TooTallNate>hmm, :\ this would be easy if .read() took a callback fn
20:32:15  <TooTallNate>isaacs: well for the initial _read() to be called, at least 1 .read() call needs to happen right?
20:32:28  <isaacs>TooTallNate: right
20:32:37  <isaacs>and it keeps calling _read() until it hits the highWaterNarm
20:32:40  <isaacs>*highWaterMark
20:33:51  <TooTallNate>like i've been having to do this https://github.com/TooTallNate/node-vorbis/blob/master/test/decoder.js#L25
20:33:53  * benoitcjoined
20:34:09  <TooTallNate>so as long as you *signify interest in stdin* by doing that, we should be alright I think?
20:34:15  <TooTallNate>unless i'm missing the problem
20:34:37  <piscisaureus_>rje: https://github.com/luvit/luvit/pull/375 (cc rphillips)
20:35:23  <TooTallNate>piscisaureus_: nice
20:35:55  <piscisaureus_>bnoordhuis: loop je een beejte moeilijk te doen ofzo
20:36:31  <isaacs>TooTallNate: right, so, how do you signify that you're *not* interested in stdin any more.
20:36:35  <indutny>bnoordhuis: yt?
20:37:03  <bnoordhuis>piscisaureus_: just working out the org chart... underling
20:37:04  <isaacs>TooTallNate: qv test/simple/test-stdin-pause-resume.js
20:38:33  <bnoordhuis>indutny: ih
20:39:11  <bnoordhuis>indutny: "what error happens when uv_async_init fails?" <- what do you mean?
20:43:51  <piscisaureus_>uv_async_init should not reasonably fail
20:43:54  <piscisaureus_>maybe EMFILE
20:46:21  * mikealjoined
20:48:17  * benoitcquit (Changing host)
20:48:17  * benoitcjoined
20:52:59  <rje>piscisaureus_: awesome, thanks.
20:53:04  <bnoordhuis>isaacs: https://github.com/bnoordhuis/node/commit/9cdd86c <- lgty?
20:53:21  <bnoordhuis>kind of crappy to use an underscored method but the current example is broken
20:54:00  <isaacs>bnoordhuis: can we just remove require.extensions from teh docs?
20:54:10  <bnoordhuis>oh, it's going away?
20:54:16  <isaacs>no :(
20:54:24  <isaacs>but we can refer people to coffeescript or streamline if they want to do this.
20:54:36  * bradleymeckquit (Quit: bradleymeck)
20:54:50  <isaacs>i consider require.extensions to be one of node's bigger mistakes.
20:55:26  <bnoordhuis>i think it's awesome. i have a require.extensions['.cc'] hook that compiles native add-ons on the fly
20:55:26  <isaacs>maybe leave the documentation, but just remove the example.
20:55:34  <isaacs>ew, really?
20:55:42  <bnoordhuis>no, but it sounds like fun :)
20:56:20  <isaacs>if i had to do it all over, i'd say that .node files should be compiled ahead of time into a special folder, like how php handles .so's.
20:56:26  <isaacs>and then all "module" code is js
20:56:38  <isaacs>every time someone uses require.extensions, something terrible happens.
20:56:45  <bnoordhuis>something for node 2.0
20:56:50  <isaacs>maybe
20:56:58  <bnoordhuis>2.0 will fix all the things
20:57:02  <isaacs>or maybe for the streamlined simplified version of node
20:57:05  <isaacs>which i'm going to call "no"
20:57:10  <isaacs>because ti'll be half the size
20:57:20  <isaacs>and every time someone asks for a new feature, that's what i'm going to say
20:57:23  <bnoordhuis>:)
20:57:32  <bnoordhuis>okay, i'll remove the examples from the docs
20:57:43  <isaacs>and using un-google-able names is all the rage now. dart, rust, go, etc.
20:57:51  <isaacs>"no" is the least googleable name ever.
20:58:32  <isaacs>i'll tell people it's an acronym for "node, optimized"
20:58:53  <piscisaureus_>yay. I have my first luvit patch in. I am such a happy man now.
20:59:40  <bnoordhuis>meh. i was writing luvit patches when they were still underground
20:59:46  <bnoordhuis>you know, before they went commercial
21:00:10  <MI6>joyent/node: Ben Noordhuis v0.8 * c79fd0e : doc: remove broken require.extensions example Fixes #4384. - http://git.io/qoC1LQ
21:01:36  <indutny>bnoordhuis: well
21:01:47  <indutny>bnoordhuis: have you seen my patch with error reporting?
21:01:53  <bnoordhuis>not yet
21:01:56  <indutny>ok
21:01:59  <indutny>take a look at it
21:02:03  <indutny>if uv_async_init fails
21:02:08  <indutny>it'll return EAGAIN
21:02:18  <indutny>suppose it's the best thing to return in such cases
21:02:58  <bnoordhuis>why hide the actual error?
21:08:43  * benoitcquit (Excess Flood)
21:09:50  <rje>piscisaureus_: the luvit and virgo folks say thank you :) thank you for taking a look for me!
21:10:03  <piscisaureus_>rje: haha. No problem :-)
21:15:20  * hzquit
21:16:20  * hzjoined
21:19:23  * benoitcjoined
21:19:42  * bnoordhuisquit (Ping timeout: 244 seconds)
21:36:41  * jmar777quit (Remote host closed the connection)
21:38:59  * benoitcquit (Excess Flood)
21:41:01  * mikealquit (Quit: Leaving.)
21:43:53  * benoitcjoined
21:49:12  * loladiroquit (Quit: loladiro)
21:50:07  <piscisaureus_>what's wrong with chromium code reviews these days
21:50:59  * loladirojoined
21:51:22  <TooTallNate>isaacs: ping
21:51:52  <TooTallNate>isaacs: so it seems pretty straightforward to me so i still must be missing something https://gist.github.com/660eac6c5063ca3eb374
21:58:22  <isaacs>TooTallNate: so, the problem comes in when you want to read 10 bytes, then stop reading any bytes, then later read 10 bytes.
21:58:39  <isaacs>TooTallNate: you do read(10 (or however much) until you get your 10 bytes
21:58:41  <piscisaureus_>bnoordhuis: what about https://codereview.chromium.org/11469014 ?
21:58:46  <isaacs>TooTallNate: but! the highWaterMark has not been hit yet.
21:58:55  <isaacs>TooTallNate: so, it'll keep doing a _read() to get more data
21:59:07  <isaacs>TooTallNate: which means that the program will hang open for at least one more read
21:59:38  <TooTallNate>ok i think i understand
22:02:53  <isaacs>i think there might be a way around, but i'm not sure.
22:02:58  <isaacs>read(n, cb) would be one way
22:03:33  <isaacs>but another would be to remove the check that always calls _read() if we have zero in the buffer, even if the hwm=0
22:04:21  <MI6>joyent/node: isaacs streams2 * 54cd4a8 : lint (+53 more commits) - http://git.io/Zu374w
22:05:02  <TooTallNate>isaacs: i've thought read(n, cb) would be cool for a while… it eliminates the "readable" event
22:05:14  * warzjoined
22:07:51  * jmar777joined
22:08:26  <TooTallNate>isaacs: re: your other idea, so then when would _read() be called next?
22:09:15  <isaacs>TooTallNate: well, when you call read() if there's zero in the buffer then, it'll _read() no matter what.
22:09:26  <isaacs>TooTallNate: but subsequently, it won't try to maintain a buffer if hwm=0-
22:10:50  <MI6>joyent/node: isaacs streams2-net * 87a39b9 : test fixup (+16 more commits) - http://git.io/ehF3Xg
22:11:24  * mikealjoined
22:13:48  <isaacs>TooTallNate: and i think i can detect that relatively easily
22:13:59  <isaacs>but first! it is time for food.
22:14:22  <piscisaureus_>isaacs: where is ircretary?
22:14:41  * ircretaryjoined
22:14:52  <isaacs>ircretary: welcome back
22:14:52  <ircretary>isaacs: I'm not sure what to do with that command. Ask for help in PM.
22:15:04  <isaacs>ircretary: say hi to piscisaureus_, he was worried about you.
22:15:27  <ircretary>Hi, Bert. I've been thinking about you, as well.
22:15:42  * mikealquit (Ping timeout: 250 seconds)
22:15:44  * isaacspuppets are fun.
22:20:30  <isaacs>i should write a cron to restart ircretary evry 24 hours or so
22:20:54  <isaacs>easier than figuring out how to detect irc disconnects
22:21:07  * rendarquit
22:21:10  * indexzeroquit (Quit: indexzero)
22:22:08  * mikealjoined
22:24:46  <piscisaureus_>yeah haha
22:31:37  * mikealquit (Quit: Leaving.)
22:33:55  * kristatequit (Ping timeout: 240 seconds)
22:42:28  * warzquit
22:44:42  * hzquit
23:04:36  * jmar777quit (Remote host closed the connection)
23:07:35  * benoitcquit (Excess Flood)
23:11:55  * benoitcjoined
23:15:38  <piscisaureus_>ircretary: telll bnoordhuis what about https://codereview.chromium.org/11469014 ?
23:15:38  <ircretary>piscisaureus_: what was last seen at 2011-09-12T11:30:09.531Z, joining #Node.js
23:15:56  <piscisaureus_>ircretary: tell bnoordhuis what about https://codereview.chromium.org/11469014 ?
23:15:56  <ircretary>piscisaureus_: I'll be sure to tell bnoordhuis
23:24:19  * benoitcquit (Excess Flood)
23:27:56  * benoitcjoined
23:33:52  * mikealjoined
23:34:23  <rje>piscisaureus_: you mentioned this morning an issue with our use of gyp (which fell out of my scrollback), could you explain that?
23:42:35  <isaacs>piscisaureus_: i think maybe the color might have made that weird
23:51:48  <piscisaureus_>rje: well visual studio rebuilds part of the app even if nothing changed
23:52:06  <piscisaureus_>rje: that suggests that some inputs/outputs for custom (None-type) actions are not properly configured
23:52:57  <piscisaureus_>rje: seems related to generate_host_buildvm_arch
23:53:23  <rje>piscisaureus_: like maybe we always rebuild the jit components b/c no lua dependency checking is done?
23:54:16  * warzjoined
23:54:19  <piscisaureus_>rje: something like that, I suppose
23:54:52  <rje>well, i'll look into that and generate_host_buildvm_arch
23:55:39  <piscisaureus_>it could also be related to the fact that it can't check that minilua hasn't changed
23:55:41  <piscisaureus_>somehow...
23:56:19  <piscisaureus_>rje: dunno; it doesn't hurt, its just slightly annoying :-)
23:57:50  <rje>piscisaureus_: just slows you down a bit. something else to examine.