00:06:25  * bnoordhuisquit (Remote host closed the connection)
00:09:01  * brsonquit (Ping timeout: 244 seconds)
00:10:31  * bnoordhuisjoined
00:19:06  * dapjoined
00:22:12  <tjfontaine>TooTallNate: I was wondering about that, but in my simple test case it worked, but in my more involved example it wasn't
00:22:40  * mmaleckiquit (Ping timeout: 248 seconds)
00:23:28  <TooTallNate>tjfontaine: very doable, first im gonna make sure passing arrays directly works and same with return value
00:23:50  <tjfontaine>nod absolutely
00:25:25  <TooTallNate>i'm almost done though, just writing tests
00:26:58  <TooTallNate>isaacs: what are your thoughts about using domains in the REPL to catch uncaught exceptions?
00:27:08  <TooTallNate>https://github.com/joyent/node/issues/2031#issuecomment-8958616
00:27:17  <isaacs>TooTallNate: probably reasonable
00:27:54  <TooTallNate>i got a quick thing working but there were some new failing tests
00:28:01  <TooTallNate>i didn't look into it completely
00:30:43  <isaacs>TooTallNate: yeah, the repl should have a domain by default, i think
00:31:06  <TooTallNate>i agree
00:31:13  <TooTallNate>we can add an option if people want
00:31:41  <TooTallNate>it's easy to accidentally take down your server in a REPL right now, haha
00:34:09  <isaacs>TooTallNate: yeah, not with sync errors, since those get caught
00:34:39  <TooTallNate>right
00:34:53  <TooTallNate>more like you add a "data" listener and reference an undefined variable or something
00:39:34  * AvianFluquit (Remote host closed the connection)
00:42:36  <isaacs>TooTallNate: yeah
00:43:09  * isaacsaway
00:56:36  * dapquit (Quit: Leaving.)
01:07:03  * lohkeyquit (Quit: lohkey)
01:08:23  * bnoordhuisquit (Ping timeout: 255 seconds)
01:19:34  * abraxasjoined
01:24:18  * indexzeroquit (Quit: indexzero)
01:24:25  * piscisaureus_joined
02:01:22  * piscisaureus_quit (Read error: Connection reset by peer)
02:05:02  * piscisaureus_joined
02:11:04  * AvianFlujoined
02:13:31  * TooTallNatequit (Quit: ["Textual IRC Client: www.textualapp.com"])
02:40:53  * ryahjoined
02:41:16  <ryah>re
02:45:06  * ryahquit (Client Quit)
02:45:23  * ryahjoined
03:09:50  * ericktquit (Quit: erickt)
03:41:25  * brsonjoined
03:55:47  * AvianFlu_joined
03:55:55  * papertigersjoined
03:57:14  * AvianFluquit (Ping timeout: 240 seconds)
04:08:55  * ericktjoined
04:09:34  * lohkeyjoined
04:10:25  * bnoordhuisjoined
04:12:48  * papertigersquit (Ping timeout: 245 seconds)
04:14:00  * stagasjoined
04:15:15  * papertigersjoined
04:22:23  * papertigersquit (Ping timeout: 245 seconds)
04:27:58  * c4milo_joined
04:28:13  * c4miloquit (Read error: Connection reset by peer)
04:34:16  * AvianFlu_changed nick to AvianFlu
04:37:31  * stagas_joined
04:38:50  * stagasquit (Ping timeout: 252 seconds)
04:38:55  * stagas_changed nick to stagas
04:41:09  * kristatejoined
05:05:08  * kristatequit (Remote host closed the connection)
05:53:45  * lohkeyquit (Quit: lohkey)
05:55:04  * TooTallNatejoined
05:55:04  * TooTallNatequit (Client Quit)
06:02:52  * travis-cijoined
06:02:52  <travis-ci>[travis-ci] joyent/libuv#736 (master - cdec54f : Ben Noordhuis): The build was broken.
06:02:52  <travis-ci>[travis-ci] Change view : https://github.com/joyent/libuv/compare/8afd71a12896...cdec54f5e087
06:02:52  <travis-ci>[travis-ci] Build details : http://travis-ci.org/joyent/libuv/builds/2592283
06:02:52  * travis-cipart
06:05:52  <bnoordhuis>ah, the makefile...
06:08:47  * travis-cijoined
06:08:47  <travis-ci>[travis-ci] joyent/libuv#737 (master - 7ac23ee : Ben Noordhuis): The build was fixed.
06:08:47  <travis-ci>[travis-ci] Change view : https://github.com/joyent/libuv/compare/cdec54f5e087...7ac23ee0c6ec
06:08:47  <travis-ci>[travis-ci] Build details : http://travis-ci.org/joyent/libuv/builds/2592310
06:08:47  * travis-cipart
06:16:16  * AvianFlu_joined
06:16:18  * AvianFluquit (Read error: Connection reset by peer)
06:17:14  * AvianFlu_changed nick to AvianFlu
06:20:30  <indutny>isaacs: yt?
06:42:00  * Raltjoined
07:00:07  * ericktquit (Quit: erickt)
07:13:55  * AvianFluquit (Remote host closed the connection)
07:18:58  * stagasquit (Ping timeout: 256 seconds)
07:21:11  * EhevuTovjoined
07:21:32  * EhevuTovquit (Remote host closed the connection)
07:34:47  * brsonquit (Read error: Connection reset by peer)
07:35:22  * brsonjoined
07:41:45  * mikealjoined
07:45:45  * mikealquit (Read error: Connection reset by peer)
07:46:07  * mikealjoined
07:47:32  * hzjoined
07:50:31  * mikealquit (Client Quit)
08:06:51  * bnoordhuisquit (Ping timeout: 245 seconds)
08:12:01  * kristatejoined
08:25:18  * kristatequit (Ping timeout: 245 seconds)
08:44:31  * kristatejoined
08:46:08  * stagasjoined
08:49:53  * mmaleckijoined
08:55:51  * indexzerojoined
09:18:26  * indexzeroquit (Quit: indexzero)
09:21:20  * mmaleckiquit (Ping timeout: 248 seconds)
09:23:43  * brsonquit (Quit: leaving)
09:23:45  * mmaleckijoined
09:34:01  * mmaleckiquit (Quit: Reconnecting)
09:34:23  * mmaleckijoined
09:39:55  * mmaleckiquit (Ping timeout: 244 seconds)
10:10:43  * kristatequit (Ping timeout: 245 seconds)
10:32:17  * mmaleckijoined
10:32:17  * mmaleckiquit (Client Quit)
10:41:54  * mmaleckijoined
10:44:14  * rendarjoined
10:54:54  * abraxasquit (Remote host closed the connection)
10:59:15  * mmaleckiquit (Quit: Reconnecting)
11:04:54  * mmaleckijoined
11:07:53  <indutny>piscisaureus_: hey man
11:12:48  * mmaleckiquit (Ping timeout: 245 seconds)
11:15:32  <indutny>pquerna: hi, yt?
11:16:06  * bnoordhuisjoined
11:18:25  <indutny>bnoordhuis: hey man
11:18:54  <deoxxa>indutny: slow day?
11:19:02  <indutny>deoxxa: hi
11:19:05  <deoxxa>heh
11:19:06  <indutny>deoxxa: yt?
11:19:17  <deoxxa>yt..?
11:19:18  <indutny>:D
11:19:27  <indutny>nvm
11:19:28  <indutny>so
11:22:07  * mmaleckijoined
11:22:14  <indutny>does anyone know whether BIO_s_mem() thread safe or not?
11:22:30  <indutny>the thing is that it's using CRYPTO_malloc internally
11:22:34  <indutny>instead of CRYPTO_malloc_locked
11:22:42  <indutny>and I suppose it overwrites memory sometimes
11:22:58  <indutny>when two BIO_write's are called from different threads (for different BIO buffers, of course)
11:24:04  <indutny>bnoordhuis: pquerna ^
11:25:23  * piscisaureus_quit (Read error: Connection reset by peer)
11:26:40  * mmaleckiquit (Ping timeout: 248 seconds)
11:28:12  <indutny>ok
11:28:16  <indutny>I'll write my own one
11:28:19  <indutny>oooh
11:28:50  * piscisaureus_joined
11:31:05  <indutny>piscisaureus_: hey
11:31:17  <indutny>piscisaureus_: how is it going with your BIO buffer implementation?
11:31:27  * piscisaureus_quit (Read error: Connection reset by peer)
11:32:12  * piscisaureus_joined
11:32:25  <piscisaureus_>indutny: not started yet
11:32:54  <indutny>piscisaureus_: ok
11:33:03  <indutny>piscisaureus_: stupid BIO_s_mem() is not fucking thread safe
11:33:17  <piscisaureus_>indutny: haha
11:33:18  <indutny>i.e. writing to different buffers from different threads may cause some data corruption
11:33:21  <piscisaureus_>indutny: it's also slow
11:33:30  <indutny>that's not such a big deal for me now :)
11:33:42  <indutny>it seems that it's just allocating chunk of memory
11:33:43  <indutny>filling it
11:33:52  <indutny>and growing if there're not enough space
11:36:38  <indutny>ok, I'll think I'll just use my ring implementation :)
11:42:22  <piscisaureus_>indutny: the slowness is reading from that memory
11:42:41  <indutny>haha
11:42:50  <indutny>also, it's doing "cryptographic" malloc
11:42:58  <indutny>filling memory with random bytes
11:43:13  <piscisaureus_>indutny: if the reader consumes 32k bytes, and the BIO buffer is 1mb, it will shift all the other data in the buffer
11:43:16  <piscisaureus_>with memmove
11:43:19  <indutny>oh crap
11:43:24  <indutny>oh my gosh
11:43:31  <indutny>ok, I'll use my ring buffer then
11:43:36  <indutny>it's quite fast
11:56:30  <bnoordhuis>indutny: hey
11:56:33  <indutny>ho
11:57:48  <bnoordhuis>indutny: re BIO_s_mem, thread safe in what respect?
11:57:57  <indutny>it's not
11:57:58  <indutny>in any
11:58:01  <bnoordhuis>you mean writing concurrently to it?
11:58:49  <bnoordhuis>oh, i see you figured it out already :)
12:14:46  <indutny>yes
12:14:52  <indutny>writing concurrently to two different buffers
12:22:44  * hzquit (Ping timeout: 272 seconds)
12:30:04  * piscisaureus_quit (Ping timeout: 256 seconds)
12:33:19  * bnoordhuisquit (Ping timeout: 260 seconds)
12:39:26  * hzjoined
12:42:11  * mmaleckijoined
12:46:07  <indutny>oh stupid gosh
12:47:32  * piscisaureus_joined
12:51:23  * kristatejoined
12:56:22  <mmalecki>indutny: sup?
12:56:37  <txdv_>SOUP
12:56:43  <mmalecki>on a related note, I wasn't timeouted of IRC for like over 15 minutes
12:56:44  <mmalecki>win
12:59:56  * bnoordhuisjoined
13:00:32  <indutny>good
13:12:47  <indutny>piscisaureus_: ok, nice!
13:12:52  <indutny>with my implementation it became slower
13:13:01  <indutny>and still SSL_read/SSL_write errors happens sometimes
13:13:02  <indutny>:)
13:13:20  <piscisaureus_>indutny: then you did it wrong?
13:13:40  <indutny>piscisaureus_: well, at least it's not the only one cause of SSL_read failures
13:13:53  <indutny>hm
13:13:57  <indutny>well, let me check on things
13:14:03  <indutny>s/on things/one thing
13:14:25  <mmalecki>piscisaureus_: where you at?
13:14:40  <indutny>well,
13:14:42  <mmalecki>piscisaureus_: looking at stability of your connection, probably not at the venue :)
13:14:44  <piscisaureus_>mmalecki: was sleeping and working on my talk
13:14:58  <piscisaureus_>mmalecki: I will be at the venue in ~ 30 min
13:14:58  <indutny>SSL_read/SSL_write errors isn't happening if I'm using one thread
13:15:11  <indutny>with both my Ring buffer
13:15:11  <mmalecki>piscisaureus_: sure. wanna grab some food?
13:15:13  <indutny>and BIO_s_mem
13:15:28  <indutny>oh
13:15:30  <indutny>it happened
13:15:32  <indutny>crap
13:15:38  <piscisaureus_>mmalecki: I'll decide there :-)
13:15:43  <piscisaureus_>maybe I want to see some alks
13:16:00  <mmalecki>piscisaureus_: great
13:19:35  <mmalecki>OutgoingMessage.bodyBytesWritten - opinions?
13:20:03  <mmalecki>it'd be connection.bytesWritten - lengthOfHeaders
13:21:23  <indutny>piscisaureus_: hahaha
13:21:25  <indutny>piscisaureus_: stupid me
13:21:35  <indutny>piscisaureus_: I was benchmarking on big response body :D
13:21:43  <indutny>oh, anyway it's slow
13:21:45  <indutny>ok, nvm
13:21:47  <mmalecki>bnoordhuis: ^ what do you think?
13:24:01  <piscisaureus_>mmalecki: meh
13:24:04  <piscisaureus_>mmalecki: why?
13:24:20  <indutny>piscisaureus_: also I suppose one bad thing is happening there
13:24:22  <piscisaureus_>indutny: if it's slower you did something wrong?
13:24:39  <indutny>piscisaureus_: I think it's because my library is dynamic
13:24:43  <indutny>but
13:24:45  <indutny>I'm not sure
13:24:47  <piscisaureus_>no fPIC ?
13:24:51  <mmalecki>piscisaureus_: progress when piping
13:24:52  <indutny>probably it's just slow
13:24:58  <indutny>piscisaureus_: who knows?!
13:25:02  <piscisaureus_>oh
13:54:58  * zhanglljoined
14:00:02  * einarosjoined
14:06:09  * ericktjoined
14:08:59  * AvianFlujoined
14:09:44  * piscisaureus_quit (Ping timeout: 252 seconds)
14:17:40  * zhangllquit
14:17:50  * zhanglljoined
14:25:29  <indutny>oh, stupid me
14:28:50  <indutny>I was using node 0.8.9
14:28:54  <indutny>w/o openssl patches :(
14:31:12  * chobi_e_joined
14:31:13  * chobi_e_changed nick to chobi_e
14:31:50  * zhangllpart
14:37:54  * mmaleckiquit (Ping timeout: 260 seconds)
14:38:40  * ericktquit (Ping timeout: 256 seconds)
15:02:33  * ericktjoined
15:03:56  * Raltquit (Ping timeout: 245 seconds)
15:04:29  * mmaleckijoined
15:07:39  * stagasquit (Ping timeout: 260 seconds)
15:08:43  <tjfontaine>ircretary: tell TooTallNate yay with the ffi struct changes, libclang now roundtrips itself :)
15:08:43  <ircretary>tjfontaine: I'll be sure to tell tootallnate
15:22:50  <bnoordhuis>mmalecki: i hate bytesWritten with a passion
15:23:45  <indutny>bnoordhuis: so I created my own memory bio
15:23:57  <indutny>but I still see SSL_read errors
15:24:02  <indutny>and the most interesting thing
15:24:12  <indutny>is that I don't see them if I'll use only one thread
15:24:42  <mmalecki>bnoordhuis: why's that?
15:25:31  <indutny>looks like one cannot call SSL_read/SSL_write simultaneously from different threads
15:26:33  <bnoordhuis>mmalecki: in the past it got in the way of a lot of optimizations
15:26:56  <bnoordhuis>stupid property, it was only added because 'it seemed like a good idea' at the time
15:28:03  <mmalecki>bnoordhuis: meh, drop it then
15:29:25  <indutny>mmalecki: hey man
15:29:34  <bnoordhuis>mmalecki: i'd like to, but there are people using it
15:29:54  <bnoordhuis>legacy is a dog of the female persuasion
15:30:57  <mmalecki>indutny: ho man
15:31:15  <mmalecki>bnoordhuis: well, do it in master?
15:31:51  <mmalecki>I mean, I only want such a thing to measure file upload progress
15:31:58  <mmalecki>but I guess that can be done manually
15:34:16  <bnoordhuis>if only it were that easy
15:35:15  <mmalecki>yeah, now that I think about it we need a server-side solution
15:44:57  <indutny>ok, I think I've found the source of issue
15:45:15  * Raltjoined
15:55:17  <indutny>bnoordhuis: heya
15:55:33  <indutny>bnoordhuis: how are you?
16:05:31  * lohkeyjoined
16:05:54  * lohkeyquit (Client Quit)
16:06:44  * lohkeyjoined
16:14:45  * loladirojoined
16:15:54  * mmaleckiquit (Ping timeout: 260 seconds)
16:24:14  * chobi_echanged nick to chobi_e_
16:27:23  * mmaleckijoined
16:35:32  * loladiroquit (Quit: loladiro)
16:42:37  * ericktquit (Quit: erickt)
16:44:38  * Raltquit (Remote host closed the connection)
16:45:12  * Raltjoined
16:48:49  * Ralt_joined
16:49:30  * Ralt_quit (Remote host closed the connection)
16:49:37  * Raltquit (Ping timeout: 246 seconds)
16:50:06  * Raltjoined
16:51:51  * loladirojoined
16:52:32  * Ralt_joined
16:53:06  * Raltquit (Read error: Connection reset by peer)
16:54:10  <isaacs>Merged v0.8 into master, but left the openssl stuff behind for bertje to look at
16:55:16  * Ralt_quit (Remote host closed the connection)
16:55:25  <pquerna>indutny: you mean an SSL_{read,wirte} on the same context from two threads?
16:55:49  * Raltjoined
16:56:37  <pquerna>(yes, that won't work)
16:59:39  * loladiroquit (Quit: loladiro)
17:00:49  * Raltquit (Ping timeout: 260 seconds)
17:01:10  * mmaleckiquit (Ping timeout: 260 seconds)
17:03:32  * TooTallNatejoined
17:04:55  * ericktjoined
17:13:51  * c4milo_quit (Remote host closed the connection)
17:21:12  <isaacs>~.
17:21:23  <isaacs>love it when the ssh session comes back just in time.
17:21:35  <isaacs>and you end up wiht the little winky tilde thingie
17:21:43  <tjfontaine>heh, one of the nice parts of tcp
17:23:12  <TooTallNate>JIT
17:23:23  <tjfontaine>oh you're here now
17:23:35  <TooTallNate>tjfontaine: yes, just looking at your patch
17:23:54  <TooTallNate>tjfontaine: so you really want to be like calling .cast() all over the place?
17:23:58  <tjfontaine>it probably should return the same instance if you typedef something twice
17:24:10  <tjfontaine>TooTallNate: no, I want people to alloc the proper thing
17:24:19  <tjfontaine>TooTallNate: and have the proper return types
17:24:40  <TooTallNate>yup yup, this is important
17:24:43  <indutny>pquerna: nope
17:25:05  <indutny>pquerna: I mean different contexts, different SSL* and different threads
17:25:14  <indutny>pquerna: BIO_s_mem() is using CRYPTO_malloc()
17:25:23  <indutny>is it thread-safe?
17:25:26  <pquerna>indutny: if you set the locking callbacks, it is
17:25:31  <indutny>oh
17:25:32  <indutny>ok
17:25:38  <tjfontaine>TooTallNate: so an opaque pointer from one return isn't mistakenly passed as an argument to the wrong type
17:25:40  <indutny>well, I found another issue in code
17:25:44  <indutny>so I'll probably fix it first
17:25:48  <indutny>and look at drd output once again
17:28:29  <TooTallNate>tjfontaine: it seems like this more belongs at the "ref" level, more part of the core type system
17:28:53  <tjfontaine>TooTallNate: possibly, I wasn't sure where the type checking should happen
17:28:53  <TooTallNate>tjfontaine: cause you want those same restrictions in a regular struct as well (no using ffi)
17:28:59  <tjfontaine>true
17:29:05  <TooTallNate>and other places that use types
17:29:21  * Raltjoined
17:30:59  <bnoordhuis>indutny: pong
17:31:16  <indutny>pang
17:31:46  <tjfontaine>TooTallNate: the plumbing for that would be in ref.set?
17:32:29  <bnoordhuis>indutny: you were looking for me?
17:33:24  * stephankquit (Quit: *Poof!*)
17:35:32  * stephankjoined
17:38:14  <tjfontaine>TooTallNate: one of the reasons I wanted some plumbing in ffi was to be able to give feedback on the argument that had the mismatch
17:38:49  <TooTallNate>tjfontaine: yes, this is important. we might be able to solve that with try/catch though
17:38:58  * Raltquit (Remote host closed the connection)
17:39:02  <TooTallNate>which i heard from a little birdie got faster in V8 recently
17:39:32  * Raltjoined
17:40:37  <isaacs>indutny: you yt'd me?
17:41:00  * TheJHjoined
17:41:11  <isaacs>hm... all our message tests started failing recently.
17:41:18  <isaacs>looks like v8 doesn't report the bottom js frame any more or something...
17:41:25  * Raltquit (Read error: Connection reset by peer)
17:41:25  <isaacs>or we changed how we call eval maybe?
17:42:00  * Raltjoined
17:42:26  <indutny>bnoordhuis: yeah
17:42:31  <indutny>bnoordhuis: I've refined uv_wait() patch
17:42:38  <indutny>isaacs: huh, really?
17:42:46  <indutny>isaacs: ah, yes
17:42:54  <isaacs>ohhh... no, they just chagned from the long silly name to the shorter sane name.
17:43:01  <indutny>isaacs: there's debugger fixes that I want to get backported to v0.8
17:43:03  <isaacs>no more process.startup.processMakeCallback.process._makeCallback
17:43:08  <indutny>isaacs: I've cc'ed you on issue
17:43:09  <isaacs>indutny: k
17:43:12  <isaacs>i'll take a look
17:43:14  <isaacs>got a link handy?
17:43:40  <indutny>one sec
17:43:53  <indutny>oh
17:43:57  <indutny>I think I've used your irc nickname
17:43:58  <indutny>:)
17:44:03  <isaacs>it's the same as github
17:44:07  <indutny>ah, right
17:44:10  <indutny>izs on twitter
17:44:11  <indutny>that's it
17:44:12  <tjfontaine>TooTallNate: on the rest of the premise are you ok with TypeDef as a name, and should it be ref.TypeDef?
17:44:13  <isaacs>twitter is the only one that's different
17:44:33  <indutny>so that's it
17:44:33  <indutny>https://github.com/joyent/node/pull/3921
17:44:33  <indutny>isaacs: ^
17:45:52  <TooTallNate>tjfontaine: ya I'm trying to think through if there's another way than wrapper class, but it might be the only way
17:46:10  <TooTallNate>tjfontaine: also, responded to your pull with some thoughts
17:46:30  <tjfontaine>TooTallNate: yup, do you want me to close this req and redo on ref?
17:46:37  <isaacs>indutny: i'd prefer to not add a magic env in a stable release.
17:47:20  <isaacs>the (undefined\n) vs (\n) fix is a bugfix, yes, please land in 0.8
17:47:32  <isaacs>but it looks like the special env is only there to test that bugfix?
17:47:40  <isaacs>(and it's a feature, of course)
17:48:34  <TooTallNate>tjfontaine: ya, the node-ffi patch should basically just be one try/catch around the argument ref'ing and reporting the argument index if one of them fails
17:48:46  <TooTallNate>and we'll do some benchmarking
17:48:49  <tjfontaine>nod
17:49:09  <isaacs>so, ReadableStream interface is coming along pretty nicely.
17:49:20  <isaacs>i expect to land something in node-core in a branch soon.
17:49:32  <isaacs>the backwards compatibility hacking is a royal pain, though. it's so gory and terrible.
17:49:50  <isaacs>we'll have to make it our mission over the next year to get everyone over to the new interface.
17:49:56  <isaacs>like, give talks, write blog posts, etc.
17:50:01  <isaacs>win the hearts and minds of the people.
17:51:00  <indutny>isaacs: yeah
17:51:09  <indutny>isaacs: agreed
17:51:14  <isaacs>then maybe some day we can remove the shims.
17:51:15  * Raltquit (Remote host closed the connection)
17:51:18  <isaacs>i'm trying to make them very easy to remove.
17:51:38  <isaacs>this is going to be huge.
17:51:48  * Raltjoined
17:52:18  <CoverSlide>what are the changes?
17:56:14  * Raltquit (Read error: Operation timed out)
17:57:20  * loladirojoined
17:57:46  * loladiroquit (Client Quit)
17:58:13  * Raltjoined
17:58:22  <isaacs>CoverSlide: instead of on('data')/pause()/resume(), there'll be on('readable')/chunk=read()
17:58:50  <isaacs>CoverSlide: https://npmjs.org/package/readable-stream
17:58:58  <isaacs>https://github.com/isaacs/readable-stream is probably a better link
17:59:02  <isaacs>since it's very much in motion still
17:59:11  <isaacs>i need to write like a zillion tests today
17:59:20  * c4milojoined
18:05:32  * loladirojoined
18:08:24  <CoverSlide>oh thanks
18:11:08  <TooTallNate>isaacs: are we gonna refactor core streams like fs and zlib to use this new interface?
18:11:18  <isaacs>yes
18:11:20  <isaacs>that's the plan
18:11:36  <TooTallNate>isaacs: that should cut down on a lot of JS code you think, right?
18:12:44  <isaacs>tthat's the plan
18:12:53  <isaacs>TooTallNate: it'll make fs readable streams a lot simpler
18:13:07  <isaacs>since you just have to hook up the _read(n,cb) method
18:13:12  <isaacs>and set the water marks appropriately
18:15:34  <TooTallNate>isaacs: i feel like implementing streams will fix that model a lot better
18:15:43  <isaacs>yeah
18:15:50  <TooTallNate>since most of the time, there's like a single "process()" function in the C lib you're trying to bind to
18:16:01  <TooTallNate>so it's a 1-1 to the _read() function
18:16:13  <isaacs>the other big part of this is implementing transform streams, since that's going to cover the zlib and crypto cases.
18:17:23  * kristatequit (Ping timeout: 245 seconds)
18:19:13  * lohkeyquit (Quit: lohkey)
18:20:44  * bnoordhuisquit (Ping timeout: 260 seconds)
18:21:45  * lohkeyjoined
18:28:34  * isaacsaway for real
18:33:14  * Raltquit (Remote host closed the connection)
18:33:48  * Raltjoined
18:38:07  * Raltquit (Ping timeout: 246 seconds)
18:41:58  <TooTallNate>ircretary: tell felixge you better do another NodeCopter in the US someday!
18:41:58  <ircretary>TooTallNate: I'll be sure to tell felixge
18:52:36  * brsonjoined
18:56:15  * loladiroquit (Quit: loladiro)
18:56:51  * Raltjoined
19:02:21  <indutny>pquerna: you still there?
19:03:32  * loladirojoined
19:04:50  <pquerna>indutny: yea
19:05:04  <indutny>pquerna: some help is needed :)
19:05:17  <indutny>pquerna: suppose SSL_read returns WANT_READ
19:05:27  <pquerna>i'll trade: fix child_process.spawn in luvit on win32....
19:05:31  <indutny>pquerna: that basically means that I should BIO_write data into buffer
19:05:32  <pquerna>yes
19:05:37  <pquerna>yup
19:05:45  <indutny>what if SSL_write returns WANT_READ
19:05:46  <indutny>the same?
19:05:53  <pquerna>yup
19:05:55  <indutny>ok
19:05:59  <indutny>next thing
19:06:04  <indutny>if I'll call SSL_shutdown
19:06:11  <indutny>and after that SSL_write or SSL_read
19:06:19  <indutny>will I get SSL_ERROR_PROTOCOL ?
19:06:26  <indutny>orr
19:06:30  <indutny>PROTOCOL_ERROR
19:06:39  <pquerna>it sends a close notify...
19:06:40  <indutny>idk, how it's correctly named
19:06:44  * loladiroquit (Client Quit)
19:06:46  <indutny>well yes it is
19:06:55  <indutny>that's why I'm using it
19:07:37  <pquerna>http://www.openssl.org/docs/ssl/SSL_shutdown.html
19:07:52  <pquerna>looks like look at the return values of SSL_Shutdown
19:07:55  <pquerna>until it returns 0
19:08:15  <pquerna>If the underlying BIO is non-blocking...
19:08:43  <pquerna>s/until it returns 0/until it returns 1/
19:08:48  <indutny>oh
19:08:54  <indutny>it still can return zero
19:08:55  <indutny>crap
19:08:58  <pquerna>yeah
19:09:05  <pquerna>great api (tm)
19:09:10  <indutny>haha
19:09:58  <pquerna>as for what read/write would do; read can keep working until it returns 1
19:10:10  <pquerna>because the other side can keep sending data
19:10:20  <pquerna>once shutdown returns 1, or -1, should stop everything
19:10:52  <indutny>yeah
19:11:12  <indutny>this is hard to deal with, though
19:20:49  * lohkeyquit (Quit: lohkey)
19:22:45  <indutny>pquerna: I'm experiencing odd length errors when doing ab
19:23:02  <indutny>pquerna: I suppose it's because I'm closing connection to early
19:23:08  <indutny>pquerna: before all data was processed
19:23:10  * Raltquit (Remote host closed the connection)
19:23:42  * Raltjoined
19:27:34  * hzquit
19:28:24  * Raltquit (Ping timeout: 244 seconds)
19:33:38  <indutny>pquerna: basically it should place SSL packet into BIO buffer
19:33:50  <indutny>that'll notify client that other end has terminated
19:44:38  * lohkeyjoined
19:45:28  <indutny>yay
19:45:30  <indutny>I've fixed it?
19:47:41  <indutny>pquerna: thanks
19:47:49  <indutny>pquerna: everything is fine now
19:47:58  <indutny>and I've 1041 rps with tls on 3 cores :)
19:48:21  * Raltjoined
19:51:19  <pquerna>indutny: sweet :)
19:51:24  <indutny>yeah
19:51:28  <indutny>sometimes near 1100 rps
19:51:33  <indutny>pquerna: how much can you get with stud?
19:52:24  <pquerna>indutny: i mean, i only running it on like 16 core machines, dunno how to compare it...
19:52:34  <indutny>pquerna: well, can you benchmark tlsnappy?
19:54:25  * hzjoined
19:56:30  <indutny>pquerna: npm install tlsnappy
19:56:31  <indutny>just published
19:57:07  <pquerna>heh
19:57:26  <pquerna>heading to party; time for a white russian..... i'd vote you try stud too :P
19:57:30  <pquerna>i'll check it out though
19:57:45  <indutny>haha
19:57:48  <indutny>ok
19:57:50  <indutny>I'll try it
20:01:52  * brsonquit (Remote host closed the connection)
20:05:56  <indutny>pquerna: expecting: TRUSTED CERTIFICATE
20:06:00  <indutny>pquerna: how to deal with it?
20:07:07  * c4miloquit (Remote host closed the connection)
20:07:07  <indutny>--client fixed it
20:08:08  <indutny>oh, no it hasn't
20:09:13  * EhevuTovjoined
20:13:16  <indutny>mk
20:13:18  <indutny>oops
20:15:20  * Raltquit (Remote host closed the connection)
20:15:54  * Raltjoined
20:17:58  <ryah>indutny: tlsnappy does the crypto in seperate threads?
20:18:30  <indutny>ryah: yes
20:18:41  <indutny>ryah: and not only request rate is high
20:18:48  <indutny>but connection time is fast too
20:18:50  <indutny>90ms
20:19:02  <ryah>would love to see a blog post comparing it to nginx and node
20:19:06  <indutny>haha
20:19:11  <indutny>who knows, may be I'll do it
20:19:18  <ryah>i think it's necessaray - you're claiming it's fast
20:19:31  <ryah>*necessary
20:19:33  <indutny>well, the thing is that it's non-blocking
20:19:41  <indutny>it's the only one thing that's definitely good about it
20:19:52  <indutny>tls is encrypting/decrypting packets in event-loop's thread
20:20:13  <ryah>so what - maybe node gets better cpu cache hits as a result
20:20:17  <ryah>you can't tell until you have some benchmarks
20:20:28  <indutny>ok, tomorrow
20:20:32  * Raltquit (Ping timeout: 248 seconds)
20:20:44  <indutny>it's a late friday in moscow now
20:20:48  <ryah>k :)
20:20:51  <indutny>actually, saturday
20:20:55  <indutny>12:09am
20:20:56  <indutny>19
20:21:01  <indutny>12:19
20:27:24  <ryah>hey. we should use this in libuv gyp/source_filter.gypi
20:27:28  * lohkeyquit (Quit: lohkey)
20:28:37  <ryah>hm
20:28:58  <ryah>http://code.google.com/p/dart/source/browse/branches/bleeding_edge/dart/tools/gyp/source_filter.gypi?spec=svn10526&r=10526 <--
20:29:06  <ryah>pretty useful
20:30:36  * TooTallNatequit (Ping timeout: 245 seconds)
20:31:16  <indutny>hm...
20:31:18  <tjfontaine>I think it's more geared towards repos that would have platform files beside each other
20:31:30  <tjfontaine>but uv already separates by platform directory generally
20:31:33  <indutny>I don't like this
20:31:55  * loladirojoined
20:32:21  * brsonjoined
20:34:13  * TooTallNatejoined
20:40:08  * Raltjoined
20:41:45  * lohkeyjoined
20:47:15  <tjfontaine>TooTallNate: interestingly, plumbing it in ref.set works for most cases except for when passing as an argument that has a valid `ref()` which just verifies against itself
20:50:17  <TooTallNate>tjfontaine: I think I like StrictType as a name
20:50:31  <tjfontaine>ok no problem
20:50:33  <TooTallNate>and i like the original type wrapping approach a lot i think
20:50:50  <TooTallNate>in which case, i don't think any changes are even necessary in ref
20:51:21  <tjfontaine>just modify the wrapped type's set?
20:51:25  <TooTallNate>StrictType should just wrap another type, and wrap the the 'get' and 'set' functions with additional type checking
20:51:30  <TooTallNate>tjfontaine: right
20:51:42  <tjfontaine>ok I shall rinse and try that :)
20:51:57  <TooTallNate>after that, it's up to whatever is using the type to display a meaningful error message with that validation error
20:52:26  <TooTallNate>like for node-ffi, a bad callback return value might look like:
20:52:27  <TooTallNate>"TypeError: expected "int" as return value, got "string": cannot write a non-number as a number"
20:53:06  <tjfontaine>nod
20:56:06  <TooTallNate>tjfontaine: another thing we want to think about is if this StrictType creator even belongs in core ref. it could just as easily be it's own repo like ref-struct
20:56:13  <TooTallNate>but i could easily be swayed
20:56:22  <TooTallNate>this one seems pretty "core"
20:57:23  <TooTallNate>like i'm might make a repo out of the "wchar string" type I made utilizing node-iconv
21:00:55  * bergelmirjoined
21:05:40  <bergelmir>anyone can help? http://pastebin.com/SVqt6qwh
21:07:42  <TooTallNate>bergelmir: what OS?
21:08:16  <bergelmir>TooTallNate: ubunut 12.04
21:08:42  <bergelmir>ubuntu*
21:15:36  * lohkeyquit (Quit: lohkey)
21:18:53  * lohkeyjoined
21:19:32  * lohkeyquit (Client Quit)
21:29:14  * TheJHquit (Ping timeout: 255 seconds)
21:32:09  <tjfontaine>TooTallNate: ya I was thinking it could be external as well, I'll approach it for the moment as external and if you like it you can pull it in
21:38:00  <TooTallNate>tjfontaine: sounds good
21:38:45  <tjfontaine>TooTallNate: though I'm still curious if only wrapping the type will satisfy arguments, I know it will work for struct/array
21:39:24  <TooTallNate>tjfontaine: well the idea is that the "ref.set()" function throws
21:39:47  <TooTallNate>as long as that's true, then passing bad arguments should be fine
21:39:52  <tjfontaine>TooTallNate: except that val.ref() breaks the model in that case
21:40:05  * loladiroquit (Quit: loladiro)
21:40:10  <tjfontaine>TooTallNate: because if you pass in a non-strict type it will simply pass
21:40:15  <TooTallNate>tjfontaine: ya, i've always hated that if branch
21:40:31  <TooTallNate>tjfontaine: really, that ref() thing should only happen for structs
21:40:43  <TooTallNate>and the fact that it "works" for other types is just a coincidence
21:41:01  <tjfontaine>well it will work for anything ref.alloc'd right?
21:41:17  <TooTallNate>tjfontaine: right
21:41:20  <tjfontaine>k
21:41:36  <TooTallNate>tjfontaine: it sounds like i need to make the "ref()" thing not happen though
21:41:39  <TooTallNate>except for structs
21:42:07  <TooTallNate>hmmmm
21:44:15  <tjfontaine>TooTallNate: you might be able to flip it slightly, and always ref.alloc to satisfy strict checking, and then if original had ref call it
21:44:31  <tjfontaine>not sure but it feels like something like a common path is possible
21:44:39  <tjfontaine>ref does an alloc inside anyway
21:49:28  <TooTallNate>tjfontaine: iirc, the calling ref() thing is just an optimization, i wonder what it would take to remove that completely
21:56:36  * bergelmirquit (Quit: leaving)
22:02:55  <txdv_>does anyone know what uv_tcp_open does exactly?
22:03:35  <txdv_>it isn't supposed to be used on already connected tcp sockets
22:07:53  <TooTallNate>tjfontaine: ya this ref() call is gonna go, structs can just do a copy, it's not that big of a deal
22:12:43  <tjfontaine>TooTallNate: nod
22:17:04  * isaacswaves
22:17:12  <tjfontaine>heya
22:18:46  * stagasjoined
22:25:51  <TooTallNate>isaacs: yo
22:26:56  * loladirojoined
22:38:17  * loladiroquit (Quit: loladiro)
22:57:59  * stagasquit (Quit: ChatZilla 0.9.89-rdmsoft [XULRunner 1.9.0.17/2009122204])
22:59:31  * rendarquit
23:03:18  * loladirojoined
23:04:13  * Raynosquit (Remote host closed the connection)
23:04:44  * indutnyquit (Remote host closed the connection)
23:04:46  * dscapequit (Read error: Connection reset by peer)
23:07:32  * indutnyjoined
23:13:07  * indutnyquit (Remote host closed the connection)
23:21:51  * indutnyjoined
23:23:29  * indutnyquit (Remote host closed the connection)
23:24:07  * lohkeyjoined
23:31:02  * hzquit
23:36:39  * indutnyjoined
23:37:14  * loladiroquit (Quit: loladiro)
23:39:04  * loladirojoined
23:40:00  * dscapejoined
23:48:47  * bnoordhuisjoined
23:49:09  * Raynosjoined
23:53:11  * EhevuTovquit (Quit: This computer has gone to sleep)
23:58:11  <ryah>is SHARED_INTERMEDIATE_DIR a gyp thing?
23:58:27  <TooTallNate>ryah: i believe so
23:58:39  * EhevuTovjoined