00:00:00  * ircretaryquit (Remote host closed the connection)
00:00:07  * ircretaryjoined
00:01:37  <trevnorris>isaacs: also, why the "char* storage = new char[]; char* data = storage;"?
00:01:56  <isaacs>trevnorris: copy pasta :)
00:02:02  <trevnorris>heh, ok.
00:02:57  * kazupon_quit (Remote host closed the connection)
00:03:54  <trevnorris>isaacs: i'm not familiar with HashUpdate, but does it retain the memory? I don't see where "data" is being free'd.
00:06:51  * hzjoined
00:07:27  <isaacs>trevnorris: doesn't matter. storage is on the stack
00:08:05  <isaacs>oh, right, i'm not freeing storage, though :)9
00:08:09  <isaacs>and that's new'ed
00:09:56  <isaacs>trevnorris: fixed the leak
00:10:02  <trevnorris>coolio
00:11:36  * hzquit (Ping timeout: 264 seconds)
00:12:03  <trevnorris>isaacs: the concept looks clean. I like it.
00:12:36  <trevnorris>just for testing I'll throw in the string buffering in js and run the benchmarks. but not tonight.
00:13:02  <isaacs>kk
00:13:44  <trevnorris>also, based on the values in #5015 I'd have expected a larger discrepency between v0.8 and v0.10
00:14:35  <isaacs>trevnorris: well, also, this is testing throughput, not creation time
00:14:36  <trevnorris>(just an observation)
00:14:39  <trevnorris>ah, ok.
00:14:40  <trevnorris>duh
00:14:44  <isaacs>in each bench, i'm only creating a single hash object.
00:14:51  <isaacs>it coudl be that digest() got slower, or something
00:15:01  <isaacs>now i guess i should do the non-throughput bench
00:17:36  * hzjoined
00:17:55  <isaacs>trevnorris: yeah, this is weird... i'm seeing it going faster (on my mac, anyway) with v0.10 than v0.8
00:18:51  <trevnorris>that is strange. i'm out, but next time I'll grab that patch and test it here.
00:18:55  * trevnorris&
00:18:55  <LOUDBOT>FUCKING DECIDE WHETHER FUCKING NEEDLE OR FUCKING HAYSTACK IS THE FIRST FUCKING PARAMETER
00:19:12  <trevnorris>lol. LOUDBOT you're the best way to end the day
00:19:59  * abraxasjoined
00:20:48  * bnoordhuisjoined
00:25:26  * bnoordhuisquit (Ping timeout: 245 seconds)
00:26:06  <kellabyte>lol
00:29:21  * octetcloudquit (Ping timeout: 256 seconds)
00:33:33  * qardquit (Quit: Leaving.)
00:35:31  * mmaleckichanged nick to mmalecki[zz]
00:36:03  * dominictarrquit (Quit: dominictarr)
00:36:41  * isaacs&
00:36:41  <LOUDBOT>HELLO IS MICHAEL JACKSONS HAIR ON FIRE WORTHY OF AN FPP
01:06:48  * mikealquit (Quit: Leaving.)
01:11:33  * inolen1quit (Quit: Leaving.)
01:12:15  * inolenjoined
01:13:14  * inolenquit (Client Quit)
01:13:32  * kazuponjoined
01:13:38  * piscisaureus_quit (Quit: ~ Trillian Astra - www.trillian.im ~)
01:14:38  * amartensquit (Quit: Leaving.)
01:17:04  * dapquit (Quit: Leaving.)
01:18:46  * kazuponquit (Ping timeout: 272 seconds)
01:28:45  * hzquit
01:33:02  * txdvquit (Read error: Connection reset by peer)
01:34:49  * txdvjoined
01:35:10  * kazuponjoined
01:53:02  * mikealjoined
01:54:12  * loladiroquit (Quit: loladiro)
01:56:51  * TooTallNatequit (Quit: Computer has gone to sleep.)
02:03:22  * brsonquit (Quit: leaving)
02:04:36  * loladirojoined
02:16:34  * jmar777quit (Remote host closed the connection)
02:22:53  * kazuponquit (Remote host closed the connection)
02:27:13  * loladiroquit (Quit: loladiro)
02:28:31  * loladirojoined
02:31:24  * mikealquit (Ping timeout: 268 seconds)
02:33:22  * inolenjoined
02:33:55  * brsonjoined
02:37:13  * mikealjoined
02:45:20  * Benviequit (Ping timeout: 260 seconds)
02:45:58  * Benviejoined
02:53:16  * mikealquit (Quit: Leaving.)
03:06:38  * st_lukejoined
03:08:07  * brsonquit (Quit: leaving)
03:09:41  * kazuponjoined
03:10:44  * defunctzombiechanged nick to defunctzombie_zz
03:19:28  * kazuponquit (Remote host closed the connection)
03:19:52  * kazuponjoined
03:23:30  * mikealjoined
03:30:10  * indexzerojoined
03:43:08  * brsonjoined
03:43:14  * loladiroquit (Quit: loladiro)
03:45:45  * octetcloudjoined
03:53:28  * mikealquit (Ping timeout: 260 seconds)
03:56:55  * c4miloquit (Remote host closed the connection)
03:57:21  * c4milojoined
03:58:27  * loladirojoined
04:02:10  * c4miloquit (Ping timeout: 272 seconds)
04:06:25  * TooTallNatejoined
04:09:08  * mikealjoined
04:09:11  * mikealquit (Client Quit)
04:31:00  * octetcloudquit (Ping timeout: 276 seconds)
04:38:08  * timoxleyjoined
04:43:42  * octetcloudjoined
04:47:34  * benoitcquit (Excess Flood)
04:48:57  * AvianFluquit (Remote host closed the connection)
04:54:40  * benoitcjoined
05:04:28  * timoxleyquit (Quit: Computer has gone to sleep.)
05:06:37  * brsonquit (Quit: leaving)
05:11:12  * mikealjoined
05:16:48  * TooTallNatequit (Quit: Computer has gone to sleep.)
05:21:59  * indexzeroquit (Quit: indexzero)
05:26:20  * octetcloudquit (Ping timeout: 260 seconds)
05:36:54  * loladiroquit (Quit: loladiro)
05:40:00  * mikealquit (Quit: Leaving.)
05:43:20  * kazuponquit (Remote host closed the connection)
05:57:25  * benoitcquit (Excess Flood)
06:00:40  * benoitcjoined
06:09:27  * kazuponjoined
06:23:50  * rendarjoined
06:24:45  * bajtosjoined
07:01:34  * stolsmajoined
07:14:52  * wolfeidauquit (Remote host closed the connection)
07:19:52  * stagasjoined
07:24:05  * csaohjoined
07:24:17  * bajtosquit (Ping timeout: 252 seconds)
07:30:48  * csaohquit (Quit: csaoh)
07:31:25  <indutny>morning
07:31:48  * bajtosjoined
07:34:19  * csaohjoined
07:38:15  * wolfeidaujoined
08:25:58  * dominictarrjoined
08:30:04  * dominictarrquit (Client Quit)
08:35:36  * bnoordhuisjoined
08:52:32  <indutny>bnoordhuis: good morning
08:52:34  <indutny>how are you?
09:07:50  * kazuponquit (Remote host closed the connection)
09:34:31  <bnoordhuis>indutny: sup fedor
09:34:35  <indutny>ho man
09:34:38  <indutny>I'm good
09:34:45  <indutny>https://github.com/joyent/libuv/pull/794
09:35:51  <bnoordhuis>i may or may not look at that today
09:35:58  <bnoordhuis>it's a holiday today here :)
09:36:27  <indutny>wow
09:36:29  <indutny>really?
09:36:40  <bnoordhuis>yep. also the coronation of the new king
09:36:45  * luigyquit (Ping timeout: 256 seconds)
09:36:46  <indutny>ah
09:36:47  <indutny>queen's day
09:36:49  <indutny>kewl
09:36:49  <bnoordhuis>yep
09:36:54  <indutny>very nice
09:37:01  <indutny>actually, this patch is pretty simple
09:37:07  <indutny>I've just removed mutex and added semaphore instead
09:37:09  <bnoordhuis>next year it'll be called king's day
09:37:13  <indutny>hahaha
09:37:13  <bnoordhuis>feels... strange
09:37:19  <indutny>is it like for the first time in dutch history?
09:37:36  <bnoordhuis>not the first time. but the first time in 80 years or thereabouts
09:37:59  <indutny>still surprising
09:38:12  <bnoordhuis>hm, more like 120 years
09:38:33  <bnoordhuis>the first queen was coronated in 1890
09:38:42  <bnoordhuis>and it's been queens ever since
09:38:55  <indutny>well, its good
09:41:56  <bnoordhuis>indutny: so how do you ensure that s->events is accessed atomically
09:42:01  * luigyjoined
09:42:13  <indutny>bnoordhuis: well, it can't be the other way
09:42:21  <indutny>semaphores
09:42:37  <indutny>its pretty hard synchronization
09:42:51  <bnoordhuis>well...
09:43:04  <bnoordhuis>you call uv_async_send() before uv_sem_wait()
09:43:12  <indutny>yes
09:43:15  <bnoordhuis>the other way around won't work, of course
09:43:32  <indutny>so what can possibly happen
09:43:36  <bnoordhuis>but it means the other thread may have processed things before the call to uv_sem_wait()
09:43:41  <indutny>yes
09:43:44  <indutny>but that's ok
09:43:49  <indutny>and we can safely loop
09:43:56  <indutny>because events = 0 now
09:44:02  <indutny>I can even add assertion if you want
09:44:27  <indutny>and surely there's no need to |= events now
09:46:14  <indutny>oook
09:46:17  <indutny>assertion happens
09:46:19  <indutny>gosh
09:47:00  <indutny>ah
09:47:02  <indutny>it happens when closing
09:48:08  <indutny>yes
09:48:13  <indutny>seems to be working good now
09:48:35  <bnoordhuis>oh? what did you change?
09:49:02  <indutny>well, I just simplified it
09:49:07  <indutny>s->events = events
09:49:11  <indutny>and added
09:49:15  <indutny> assert((s->events == 0) || (stream->flags & UV_CLOSING));
09:49:17  <indutny>after sem_wait()
09:49:32  <indutny>so, this way, I'm always sure that events was processed
09:49:39  <indutny>(force pushed, btw)
09:51:54  * st_lukequit (Remote host closed the connection)
10:03:57  * bajtosquit (Ping timeout: 256 seconds)
10:04:03  <bnoordhuis>indutny: see my comments. otherwise LGTM, i guess
10:04:10  <indutny>kewl
10:04:13  <indutny>thank you
10:04:31  <bnoordhuis>i think i'll move that code into darwin.c sometime in the near future
10:04:35  <bnoordhuis>as a fyi
10:07:11  <indutny>heh
10:07:15  <indutny>good decision
10:07:40  * dominictarrjoined
10:08:00  <MI6>joyent/libuv: Fedor Indutny v0.10 * 67f9b91 : stream: use harder sync restrictions for osx-hack - http://git.io/F3rbtg
10:08:06  <indutny>thank you
10:10:10  <MI6>libuv-v0.10: #47 UNSTABLE windows (6/187) osx (1/187) smartos (3/186) linux (1/186) http://jenkins.nodejs.org/job/libuv-v0.10/47/
10:11:44  * dominictarrquit (Client Quit)
10:15:05  <MI6>libuv-v0.10-gyp: #10 UNSTABLE windows-x64 (5/187) smartos-ia32 (3/186) osx-x64 (1/187) smartos-x64 (4/186) windows-ia32 (6/187) osx-ia32 (1/187) http://jenkins.nodejs.org/job/libuv-v0.10-gyp/10/
10:18:07  * kazuponjoined
10:18:11  * abraxasquit (Remote host closed the connection)
10:21:57  * rjequit (Excess Flood)
10:23:18  * kazuponquit (Ping timeout: 276 seconds)
10:23:49  <MI6>libuv-node-integration: #37 FAILURE linux-ia32 (1/581) http://jenkins.nodejs.org/job/libuv-node-integration/37/
10:27:27  * dominictarrjoined
10:31:03  * mmalecki[zz]changed nick to mmalecki
10:31:28  * st_lukejoined
10:34:07  * rjejoined
10:34:54  * csaohquit (Quit: csaoh)
10:37:14  * st_lukequit (Remote host closed the connection)
10:39:54  * csaohjoined
10:44:28  * st_lukejoined
10:52:10  * csaohquit (Quit: csaoh)
10:58:08  * csaohjoined
10:59:49  * piscisaureus_joined
11:07:31  <bnoordhuis>piscisaureus_: how was the coronation?
11:09:37  * st_lukequit (Remote host closed the connection)
11:22:03  * sgallaghjoined
11:22:32  * bnoordhuisquit (Ping timeout: 255 seconds)
11:23:14  * sgallaghquit (Remote host closed the connection)
11:29:30  <piscisaureus_>bnoordhuis: I don't know. I'm just moving between parties.
11:29:44  <piscisaureus_>Not interested in the actual coronation
11:33:03  * hzjoined
11:35:59  * dominictarrquit (Quit: dominictarr)
11:36:03  * st_lukejoined
11:40:04  * dominictarrjoined
11:42:57  * bajtosjoined
12:18:27  * abraxasjoined
12:22:02  * st_lukequit (Remote host closed the connection)
12:22:50  * abraxasquit (Ping timeout: 255 seconds)
12:28:25  * bnoordhuisjoined
12:29:13  * timoxleyjoined
12:31:17  * benoitcquit (Ping timeout: 245 seconds)
12:33:31  * bnoordhuisquit (Ping timeout: 264 seconds)
12:37:18  * stolsmaquit (Ping timeout: 264 seconds)
12:40:29  * jmar777joined
12:45:51  * loladirojoined
12:52:59  * benoitcjoined
13:03:34  * AvianFlujoined
13:24:47  * dominictarrquit (Quit: dominictarr)
13:45:54  * loladiroquit (Quit: loladiro)
13:50:08  <kellabyte>whats the difference between libevent and libuv?
13:54:53  * c4milojoined
13:55:58  * timoxleyquit (Quit: Computer has gone to sleep.)
13:56:16  * octetcloudjoined
13:59:17  <indutny>kellabyte: freshness, better support
13:59:25  <indutny>and many other stuff
13:59:37  <indutny>also it doesn't support windows
13:59:54  <indutny>well
13:59:56  <indutny>it supports it
13:59:59  <indutny>but not completion ports
14:00:02  <indutny>so its probably slow
14:01:12  <kellabyte>indutny: everything I'm reading says libevent supports IOCP since 2010?
14:01:31  <kellabyte>in libevent 2.0
14:04:50  <kellabyte>indutny: I got a question "why haywire and not libevent's evhttp" I'm like, I dunno why libuv vs libevent :P
14:15:23  * defunctzombie_zzchanged nick to defunctzombie
14:20:01  * octetcloudquit (Ping timeout: 245 seconds)
14:21:01  * piscisaureus_quit (Quit: ~ Trillian Astra - www.trillian.im ~)
14:22:37  * bnoordhuisjoined
14:28:46  * rjequit (Ping timeout: 245 seconds)
14:32:13  * rjejoined
14:40:51  <MI6>joyent/node: isaacs v0.10 * dda7b40 : doc: Fix require.extensions documentation - http://git.io/7p_6Kw
14:45:46  * piscisaureus_joined
14:47:00  * dominictarrjoined
14:57:53  <MI6>nodejs-v0.10: #167 FAILURE http://jenkins.nodejs.org/job/nodejs-v0.10/167/
15:00:14  * octetcloudjoined
15:15:03  <piscisaureus_>bnoordhuis: hey, I'm not happy with the openssl downgrade.
15:15:11  <piscisaureus_>bnoordhuis: because it broke the build
15:15:35  <piscisaureus_>bnoordhuis: also it's one big commit so now it's impossible to track the patches we float again
15:20:06  <isaacs>omw into the office. call in 0:40
15:20:30  <isaacs>piscisaureus_, bnoordhuis: Please continue the fight over openssl, we can reach some kind of decision on the call.
15:20:35  * isaacs&
15:20:36  <LOUDBOT>DO YOU REALLY LIKE THAT BUU OR ARE YOU JUST SAYING
15:20:45  <piscisaureus_>isaacs: I won't be at the call
15:48:14  <bnoordhuis>piscisaureus_: it's just `git checkout origin/v0.8 -- deps/openssl` - what's in v0.8 is in v0.10 now
15:48:29  <bnoordhuis>i'd be okay with reverting the downgrade if there is a reliable way to fix the regressions
15:48:39  <bnoordhuis>but so far i'm not having much luck
15:49:29  <bnoordhuis>connecting with e.g. s_client -tls1 works but doing the same thing with node fails
15:49:44  <bnoordhuis>sometimes hardm as in asserts at runtime
15:50:35  <bnoordhuis>if you want to look at it, be my guest. i'm slogging my way through 500 pages of legalese right now
15:50:54  <bnoordhuis>(which you should do too, really)
16:01:52  * isaacsfg
16:02:21  * sblomjoined
16:03:47  <isaacs>bnoordhuis: skype?
16:04:07  <isaacs>trevnorris: skype?
16:05:00  * TooTallNatejoined
16:05:12  * piscisaureus_quit (Ping timeout: 260 seconds)
16:05:41  * octetcloudquit (Ping timeout: 252 seconds)
16:06:29  * brsonjoined
16:16:19  * octetcloudjoined
16:26:18  * dapjoined
16:44:50  <bnoordhuis>tjfontaine: re user-service.condenastdigital.com, i can only get it to work when i disable tls altogether
16:45:16  <bnoordhuis>that is, tell openssl to only use sslv2 and 3
16:45:41  <bnoordhuis>it even barfs on tls 1.0 - but not with v0.8 :-/
16:46:58  <tjfontaine>bnoordhuis: I presume we're talking in node, right?
16:47:12  <bnoordhuis>yes
16:47:36  <tjfontaine>ok, and how do you disable tls altogether, by compiling it out you mean?
16:47:55  <bnoordhuis>no, passing SSL_OP_NO_TLSv1 in secureOptions
16:48:07  <tjfontaine>oh ok
16:48:20  <bnoordhuis>SSL_OP_NO_TLSv1 | SSL_OP_NO_TLSv2 does not work, however
16:48:39  <tjfontaine>1_2
16:48:58  <bnoordhuis>err, right
16:49:14  <bnoordhuis>v0.8 however is perfectly happy talking tls 1.0 to that server
16:49:53  <tjfontaine>maybe we're just missing an initialization of something
16:49:55  <bnoordhuis>it doesn't look like openssl 1.0.1 is advertising any new ssl/tls extensions
16:52:43  <bnoordhuis>let's see what compiling with OPENSSL_NO_TLS1_2_CLIENT does
16:52:52  * inolenquit (Quit: Leaving.)
16:54:48  <indutny>bnoordhuis: believe me - its most like a cipher
16:55:37  <bnoordhuis>yeah. i never was into puzzles
16:56:04  <indutny>s/like/likely/
16:56:17  <indutny>there're not that much stuff
16:56:24  <indutny>also it might be a signature_algorithms
16:56:29  <indutny>extensions
16:56:42  <indutny>anyway, something related to cryptography
16:58:01  <bnoordhuis>okay, it's not OPENSSL_NO_TLS1_2_CLIENT
16:59:08  <indutny>hahaha
17:00:34  <bnoordhuis>curiously enough, even OPENSSL_NO_TLS1 doesn't fix it
17:00:56  <bnoordhuis>i guess that means it's something in node
17:01:48  * amartensjoined
17:02:39  * bnoordhuisis off to dinner
17:07:18  * bnoordhuisquit (Ping timeout: 264 seconds)
17:08:30  * csaohquit (Quit: csaoh)
17:09:40  * benoitcquit (Excess Flood)
17:13:44  * benoitcjoined
17:28:02  * bajtosquit (Ping timeout: 268 seconds)
17:33:43  * inolenjoined
17:34:06  * hzquit (Read error: Connection reset by peer)
17:39:30  * hzjoined
17:42:22  * loladirojoined
17:46:15  * loladiroquit (Client Quit)
17:48:43  * loladirojoined
17:49:04  <trevnorris>indutny: posted a v8 issue about adding a flag so the object would free linked mem on gc. responded saying "v8 gc generally does not necessarily visit dead objects"
17:49:26  <trevnorris>and basically it'd be necessary to do the same thing (persist/makeweak) internally to accomplish this.
17:49:55  <trevnorris>so, from how that sounds, seems like that approach isn't worth investigating. thoughts?
17:50:20  <indutny>what? :)
17:50:29  <indutny>aaah
17:50:31  <indutny>got it
17:50:41  <indutny>here is the deal
17:50:47  <indutny>that won't help you that much
17:50:53  <indutny>you need a separate space for such objects
17:51:02  <indutny>which could be really cheaply scavenged
17:52:34  <trevnorris>interesting. and v8 isn't doing something similar now I assume.
17:55:12  * loladiroquit (Ping timeout: 252 seconds)
17:55:20  <trevnorris>ircretary: tell bnoordhuis 3.18.5 has the fromCharCode fix. upgrade?
17:55:20  <ircretary>trevnorris: I'll be sure to tell bnoordhuis
18:05:36  * hzquit (Ping timeout: 264 seconds)
18:16:26  * octetclo1djoined
18:17:45  * pfox___joined
18:19:56  * st_lukejoined
18:20:58  * pfox__quit (Ping timeout: 268 seconds)
18:20:59  * othiym23quit (Ping timeout: 268 seconds)
18:20:59  * octetcloudquit (Ping timeout: 268 seconds)
18:22:30  * othiym23joined
18:23:44  * qardjoined
18:28:00  * hzjoined
18:36:10  * brsonquit (Ping timeout: 272 seconds)
18:36:30  * brsonjoined
18:43:23  * sblomquit (Ping timeout: 259 seconds)
18:48:57  * defunctzombiechanged nick to defunctzombie_zz
18:50:47  <trevnorris>oooh. --expose_natives_as has some fun stuff.
18:55:34  * piscisaureus_joined
18:56:09  * sblomjoined
18:56:58  <trevnorris>indutny: crazy ass and horribly uninformed idea. possible to enable allow_natives_syntax by default, for use in crypto w/ openssl?
19:00:03  * sblomquit (Client Quit)
19:00:54  <TooTallNate>huh?
19:01:04  * indexzerojoined
19:05:53  * octetclo1dquit (Ping timeout: 240 seconds)
19:21:17  * indexzeroquit (Quit: indexzero)
19:23:16  * stolsmajoined
19:25:24  <trevnorris>TooTallNate: not sure of the deep technical details, but allows for much quicker interface between js and cc.
19:27:23  * mikealjoined
19:29:50  <trevnorris>TooTallNate: for example. say I set "--expose_natives_as=nav", running nav.ToUint32(n) is ~4x's faster than when I do the same from a module.
19:30:08  <TooTallNate>woah
19:31:10  <trevnorris>basically, it injects the assembly of your code into the js assembly generated.
19:38:13  <trevnorris>TooTallNate: it would probably be a ridiculous undertaking, but I like the idea of having a build config that tells node to use this, then we could start building out optimizations that will replace the usual if it's set.
19:41:05  <TooTallNate>trevnorris: ya that could be interesting
19:41:46  <trevnorris>TooTallNate: where I think it would come in handy is, say, short string hashes.
19:42:26  <trevnorris>right now it has a large instantiation cost, but if it could call the openssl code directly, think there could be significant improvements.
19:43:00  * indexzerojoined
19:49:20  * defunctzombie_zzchanged nick to defunctzombie
19:55:44  * rendar_joined
19:58:27  * rendarquit (Ping timeout: 256 seconds)
19:58:56  <trevnorris>have there been discussions about wanting to move away from openssl?
20:01:43  <trevnorris>isaacs: had idea for hashing. how about not instantiating a full class until the second "update()". I'd assume people are using the algorithm for passwords and such.
20:02:04  <trevnorris>so we could streamline that case.
20:09:24  * piscisaureus_quit (Ping timeout: 252 seconds)
20:15:48  * hzquit (Ping timeout: 264 seconds)
20:20:13  * hzjoined
20:20:34  <isaacs>trevnorris: so, that's not even 10% of the regression.
20:21:00  <isaacs>trevnorris: basically, it's close to 100% due to the fact that we provide the result as a buffer instead of a string.
20:21:57  <isaacs>trevnorris: if i have it return as a string, then we get all the performance back.
20:22:13  <isaacs>trevnorris: converting the writes to buffers is about 10% or so of the regression (a 5% improvement overall)
20:22:46  <isaacs>trevnorris: but just turning a char* into a buffer is fully HALF of the time spent doing createHash('sha256').digest()
20:23:32  <trevnorris>isaacs: check out these perf using the new buffers: http://git.io/koMS7A
20:24:15  <trevnorris>isaacs: line item "#4964" in the first batch are using the new buffers.
20:24:27  <trevnorris>test 2 is generating a MD5 hash from a single string.
20:24:56  <trevnorris>the new buffers can generate a new instance from an existing char* in ~250ns.
20:25:26  <trevnorris>that only accounts for 10% of the time it takes to run.
20:26:42  <isaacs>nice
20:26:53  <isaacs>it kinda sucks to wait for 0.12 before we can make crypto fast again
20:27:41  <trevnorris>yeah
20:28:13  <trevnorris>not sure what could be done about that. the changes necessary are too extensive for a stable branch, imho.
20:28:57  <trevnorris>TooTallNate: anything special I need to feed node-gyp to link in <openssl/md5.h>?
20:29:11  <trevnorris>it compiles, but keeps giving me a linkage error when I run
20:30:27  <isaacs>trevnorris: interestingly, the *throughput* is somewhat *faster*
20:30:39  <isaacs>trevnorris: but calling hash.digest() is crazy slow
20:31:40  <trevnorris>that's really strange.
20:34:15  * jmar777quit (Remote host closed the connection)
20:34:34  <isaacs>in the throughput test, i'm throwing TONS of buffers at it
20:34:44  <isaacs>so, it could just be that V8 got faster.
20:34:48  <isaacs>btw,
20:34:49  * jmar777joined
20:35:07  <isaacs>bnoordhuis piscisaureus indutny trevnorris tjfontaine sblom TooTallNate http://simp.ly/publish/7mYRTH
20:35:33  <tjfontaine>hopefully not too many typos in it
20:35:34  <tjfontaine>:)
20:38:01  * octetcloudjoined
20:39:27  <trevnorris>nice. like it.
20:39:40  <trevnorris>attention span is crap, so write ups are great.
20:39:42  * jmar777quit (Ping timeout: 264 seconds)
20:44:39  <isaacs>i'll just keep prepending to that file in NValt, so feel free to bookmark or whatever.
20:46:48  * bnoordhuisjoined
20:52:19  <trevnorris>isaacs: you already in palo alto, or heading down later?
20:54:18  <tjfontaine>he's in SF atm
20:55:02  * dominictarrquit (Quit: dominictarr)
20:55:57  <indutny>what's that?
20:56:14  <indutny>oh, call notes
20:56:16  <indutny>nice
20:56:42  * rendar_quit
20:56:48  <indutny>I think we can template it
20:57:08  <indutny>"trevor: buffers sucks, persistent and makeweak sucks, working on that"
20:57:18  <indutny>"ben: bug fixes and openssl crap"
20:57:32  <indutny>"bert: windows sucks, I was on queen's party"
20:57:39  <indutny>"isaacs: oh, streams2"
20:57:51  <indutny>"TooTallNate: oh my pi!"
20:58:11  <indutny>"fedor: did nothing on node"
20:58:52  <indutny>super-productive two weeks :)
20:59:02  <tjfontaine>heh
20:59:54  <indutny>oh
21:00:01  <indutny>tj: "jenkins sucks"
21:00:01  <indutny>:D
21:00:08  <indutny>sorry if anything
21:00:12  <indutny>didn't mean to be rude
21:00:12  <trevnorris>lol
21:00:16  <indutny>just stupid jokes
21:00:32  <tjfontaine>you captured me appropriately
21:04:05  <trevnorris>heh. egrep "fuck.*(windows|jenkins)"
21:05:03  <tjfontaine>yes.
21:11:19  <bnoordhuis>indutny: you forgot "reviewed patches"!
21:11:24  <indutny>ah yes
21:11:31  <indutny>definitely
21:11:54  <bnoordhuis>trevnorris: does spidermonkey have anything similar to v8's SetExternalArrayData?
21:12:12  <bnoordhuis>looking at the way typed arrays are implemented, i'm guessing the answer is 'no'
21:13:04  <bnoordhuis>SetIndexedPropertiesToExternalArrayData, rather
21:16:22  <tjfontaine>bnoordhuis: fwiw I built node against the shared version of 1.0.1 and it exhibits the same error, I'm now going to trace the ssl calls between s_client and node to see if there's anything obvious
21:16:56  <trevnorris>bnoordhuis: don't know. let me go ask one of the devs.
21:20:38  * dominictarrjoined
21:21:26  * kevinswiberjoined
21:23:31  * kevinswiberquit (Remote host closed the connection)
21:23:49  * c4miloquit (Remote host closed the connection)
21:24:15  * c4milojoined
21:25:37  * kevinswiberjoined
21:27:28  * kevinswiberquit (Remote host closed the connection)
21:28:25  * kevinswiberjoined
21:28:28  * c4miloquit (Ping timeout: 245 seconds)
21:32:59  <tjfontaine>so one of the interesting differences between node and s_client, node is triggering more ssl_add_clienthello_tlsext interactions
21:34:24  <tjfontaine>https://gist.github.com/tjfontaine/5492127
21:36:23  <bnoordhuis>ah. no doubt that's it
21:36:52  * indexzeroquit (Quit: indexzero)
21:37:34  <bnoordhuis>hm. i wonder what extensions those are
21:38:02  <MI6>joyent/node: Ben Noordhuis master * ab518e8 : https: implement https.Server#setTimeout() - http://git.io/oIU_jw
21:38:12  <tjfontaine>the only other difference is we set the next proto cb
21:38:24  <tjfontaine>well at least what seems to mean the only other difference
21:38:59  <bnoordhuis>i tried disabling that but it didn't make a difference
21:39:14  <bnoordhuis>hm, i wonder if i wasn't rigorous enough
21:40:23  <bnoordhuis>let's see what happens when we disable everything except bare tls 1.0
21:40:28  <trevnorris>TooTallNate: how the fuck do I link against openssl? swear I've basically copied out everything from node.bcrypt and I still get a linkage error.
21:40:44  <TooTallNate>trevnorris: in an addon?
21:40:48  <tjfontaine>bnoordhuis: fwiw I haven't done the -no_tls1_2 comparison yet
21:40:49  <trevnorris>TooTallNate: yeah.
21:41:02  <TooTallNate>trevnorris: did you do everything in: https://github.com/TooTallNate/node-gyp/wiki/Linking-to-OpenSSL?
21:41:36  <bnoordhuis>of course now the ssh connection to my linux machine craps out...
21:43:04  <trevnorris>TooTallNate: yeah. simplified since I don't care about win support or pre v0.6. but yeah.
21:44:06  <TooTallNate>trevnorris: well what's the error you get?
21:44:20  * kevinswiberquit (Remote host closed the connection)
21:44:28  <TooTallNate>trevnorris: and also, is how is openssl linked to your copy of node?
21:44:45  <trevnorris>TooTallNate: symbol lookup error: [...] undefined symbol: MD5
21:44:48  <TooTallNate>maybe that gyp code doesn't work when openssl is dynamically linked or something
21:45:00  <isaacs>anyone interested in crypto hash perf stuff: https://github.com/joyent/node/issues/5015#issuecomment-17254341
21:45:22  <isaacs>bnoordhuis: i'm espcially interested in your opinions on the proposed (internal) API addition there
21:45:49  <trevnorris>TooTallNate: well, wouldn't it be the same case for node.bcrypt.js? that builds/runs fine.
21:46:10  <TooTallNate>trevnorris: well ya it should be the same thing really
21:46:23  <TooTallNate>check the output of `ldd path/to/binding.node`
21:46:30  <TooTallNate>trevnorris: but also, how is openssl linked to your node?
21:46:33  <TooTallNate>static or shared?
21:48:00  <trevnorris>TooTallNate: https://github.com/trevnorris/v8-basics
21:51:43  <TooTallNate>[14:46:29] <@TooTallNate> trevnorris: but also, how is openssl linked to your node?
21:51:43  <TooTallNate>[14:46:32] <@TooTallNate> static or shared?
21:52:32  <trevnorris>TooTallNate: think static. if that means I'm using the openssl that is packages w/ node.
21:52:46  <TooTallNate>trevnorris: ya static is just the default
21:53:07  <tjfontaine>bnoordhuis: and with the -no_tls1_2 comparison (and the proto commented out) https://gist.github.com/tjfontaine/5492127#file-ssl_nottls-diff
21:53:08  <TooTallNate>trevnorris: so you're probably trying to access a symbol that node doesn't access, and therefore node doesn't re-export the symbol from openssl
21:53:26  <trevnorris>TooTallNate: ah, that's probably it. MD5 isn't used by node.
21:53:44  <TooTallNate>trevnorris: see https://github.com/joyent/node/issues/4051#issuecomment-8800621
21:53:58  <TooTallNate>trevnorris: it's a bug that would be nice if it was fixed
21:54:06  <TooTallNate>trevnorris: ideally what you're trying to do would work
21:54:33  <TooTallNate>trevnorris: i don't really know what the status of that thread is though
21:58:16  <bnoordhuis>fuck, lost my ssh connection again
21:58:31  <bnoordhuis>i think it's a sign i should go to bed
21:58:46  <trevnorris>TooTallNate: so is there a quick hack to include openssl/md5.h so node exports it? tried by "#include <openssl/md5.h>" in crypto, but didn't work.
21:59:04  <tjfontaine>bnoordhuis: I wonder if our implicit read()==0 reset logic is getting in the way here
21:59:23  <TooTallNate>trevnorris: that's a question for the C guys /cc bnoordhuis
21:59:37  <TooTallNate>trevnorris: but i think an empty function that references the function pointers would work
21:59:48  <trevnorris>ok
22:00:02  <tjfontaine>you need to reference the symbol you want to re-export
22:00:36  <tjfontaine>or tell your linker to stop doing the optimization on the library where it strips unused symbols
22:02:25  <trevnorris>tjfontaine: so, I tried by including md5.h in crypto. then adding "extern [...] MD5([...])" at the top.
22:02:36  <trevnorris>something like that?
22:03:17  <tjfontaine>the extern may work, but it may be that you need to static void foo() { MD5(...); }
22:03:35  <trevnorris>ah, ok.
22:03:48  <tjfontaine>there are also something like def files you can pass to the linker like we do on windows
22:03:58  <bnoordhuis>damn, it works
22:04:03  * wavdedjoined
22:04:09  <tjfontaine>bnoordhuis: with which change?
22:04:35  <bnoordhuis>i blunt force disabled npn, servername, etc.
22:04:56  <bnoordhuis>and now i can connect when i specify SSL_OP_NO_TLSv1_[12]
22:05:32  <tjfontaine>so when we use npn/sni stuff we are implicitly declaring our interest in 1_2?
22:05:58  * stolsmaquit (Ping timeout: 245 seconds)
22:06:04  <bnoordhuis>i don't think so but i'm not sure
22:06:16  <bnoordhuis>npn, servername and so on are all extensions
22:06:27  * mikealquit (Quit: Leaving.)
22:06:27  * Benviequit
22:07:26  <bnoordhuis>conde nast's service is choking on the servername extension...
22:08:44  <bnoordhuis>it also doesn't like tls 1.2 but 1.1 is fine
22:09:18  <tjfontaine>I had a friend forward the information to some condenast folk, hopefully I'll hear from them today or tomorrow, and I'll be able to update them with the info
22:09:33  * mraleph1joined
22:09:37  * mralephquit (Read error: Connection reset by peer)
22:09:40  <MI6>nodejs-master: #189 UNSTABLE smartos-x64 (1/587) linux-x64 (1/587) windows-ia32 (147/587) windows-x64 (146/587) http://jenkins.nodejs.org/job/nodejs-master/189/
22:09:45  <bnoordhuis>okay, cool
22:09:57  <bnoordhuis>i guess that means we can revert the downgrade
22:10:31  <tjfontaine>so why is that we couldn't set the NO_TLSv1_2 stuff?
22:11:05  <bnoordhuis>it's probably a bit of both
22:11:09  * c4milojoined
22:11:17  <bnoordhuis>that server doesn't like a) sni, and b) tls 1.2
22:11:58  <bnoordhuis>the odd thing is, of course, that openssl 1.0.0 advertised sni without trouble
22:12:11  <trevnorris>tjfontaine: screw it. just hacked the code I wanted to test into node. that's working
22:12:39  <bnoordhuis>ffs, lost ssh again
22:13:41  <bnoordhuis>okay, switching machines. fucking macs
22:14:09  <isaacs>bnoordhuis: well, there's your problem. you're just supposed to type on them, not fuck them.
22:15:55  * benoitcquit (Excess Flood)
22:18:02  * bnoordhuisquit (Ping timeout: 252 seconds)
22:18:43  <trevnorris>fuck yeah. only took me 3 hours, but finally made a single string in, md5 out addition to crypto.
22:18:47  <trevnorris>now time to benchmark.
22:19:15  * benoitcjoined
22:19:22  * bnoordhuisjoined
22:19:35  <bnoordhuis>back
22:19:42  <tjfontaine>welcome home
22:19:45  <bnoordhuis>merci
22:20:12  <bnoordhuis>so i guess it doesn't really make sense that SSL_OP_NO_TLSv1_2 doesn't do anything unless you disable sni
22:20:21  * wolfeidauquit (Remote host closed the connection)
22:20:35  <bnoordhuis>iow, further investigation required
22:20:52  <tjfontaine>what were you doing to disable sni?
22:21:08  <TooTallNate>trevnorris: so it worked?
22:21:19  <bnoordhuis>tjfontaine: #ifdef'ing it out
22:21:24  <tjfontaine>bnoordhuis: ok
22:21:24  <trevnorris>TooTallNate: nope. just hacked the code I want to test directly into node.
22:21:33  <TooTallNate>hahaha
22:21:42  * dominictarrquit (Ping timeout: 245 seconds)
22:22:23  <bnoordhuis>trevnorris: how does mozilla's patch review process work? just upload to bugzilla or ?
22:22:57  <trevnorris>isaacs: ok, so. "crypto.createHash('md5').update('hi').digest()" takes ~3000ns. my test of single string in, md5 out - "testmd5('hi').toString('hex')" runs in ~1000ns.
22:22:59  <trevnorris>3x's faster.
22:23:24  <trevnorris>isaacs: and it returns a buffer, then I run toString('hex') on it.
22:24:19  <trevnorris>bnoordhuis: yeah. that's pretty much it.
22:25:14  <trevnorris>bnoordhuis: I hate hq, so can't help you there. but here's a how-to whatnot: https://developer.mozilla.org/en-US/docs/Developer_Guide/How_to_Submit_a_Patch
22:26:05  <bnoordhuis>trevnorris: okay clear, thanks
22:26:07  <trevnorris> /hq/mq
22:26:13  <trevnorris>mother effing.
22:26:19  <trevnorris> /mq/hg
22:26:50  <trevnorris>bnoordhuis: send me the link and I'll forward it to the dev team.
22:27:22  <bnoordhuis>trevnorris: will do (though i haven't written any code yet)
22:27:32  <trevnorris>heh, ok.
22:28:09  <bnoordhuis>btw, re: --expose-natives-as, i've considered that in the past
22:28:20  <bnoordhuis>but the natives stuff is not stable in any way
22:28:37  <bnoordhuis>so it could be something of a risky proposition to introduce that in core
22:30:20  <trevnorris>bnoordhuis: real quick. chatting w/ the spidermonkey engineers.
22:30:27  * dominictarrjoined
22:30:30  <trevnorris>they're interested in seeing what you're doing. and are happy to help.
22:30:35  <trevnorris>if you have anything public, let me know.
22:31:10  <bnoordhuis>trevnorris: right. so what i want to do is add something similar to v8's SetIndexedPropertiesToExternalArrayData
22:31:17  <bnoordhuis>only with a less cumbersome name :/
22:31:18  <trevnorris>bnoordhuis: the reponse: "you can play games to get something like that for a typed array, but currently the engine still has to manage allocation (because there's a header in front of the data)"
22:31:35  <bnoordhuis>you mean the shape of the object?
22:31:49  <bnoordhuis>if yes, then yeah, i already got that far :)
22:32:43  <trevnorris>bnoordhuis: if you want, hop onto irc.mozilla.org #jsapi
22:32:49  <trevnorris>they'll help you out.
22:32:56  <bnoordhuis>okay, cool. but tomorrow, not today :0
22:33:11  <bnoordhuis>first this openssl thing, then i'm off to bed
22:33:16  <bnoordhuis>but thanks so far :)
22:33:21  <trevnorris>oh yeah. late there. np
22:35:07  <trevnorris>bnoordhuis: one last question from the team: "do you happen to know whether he's dealing with the new stack rooting stuff?"
22:35:33  <bnoordhuis>trevnorris: i don't know what that means so i guess the answer is no
22:35:41  <TooTallNate>lol
22:35:44  <trevnorris>lol. neither do i. :)
22:36:31  <trevnorris>bnoordhuis: last thing. was thinking the natives extension could originally be built under the node_unsafe_optimizations flag, or some such.
22:36:34  <trevnorris>just food for thought.
22:37:06  * wavdedquit (Quit: Hasta la pasta)
22:37:15  <bnoordhuis>well, perhaps. that flag is more for unsafe / known-bad compiler flags
22:37:17  <tjfontaine>ooh now I get to play +o games lik ry
22:37:30  <tjfontaine>*like
22:37:41  <bnoordhuis>but changes its semantics is no biggy, no one knows it exists in the first place
22:37:46  <bnoordhuis>*changing
22:37:48  <trevnorris>lol yeah.
22:38:06  <trevnorris>and maybe just add another node_use_natives or some such.
22:38:25  * wolfeidaujoined
22:38:33  <bnoordhuis>hrm, yeah. let me think about it
22:38:52  <bnoordhuis>it's something bert and i have discussed in the past and it seemed like a good idea at the time
22:39:03  <bnoordhuis>but the thing is, of course, that any method on the natives object can go away at any time
22:39:13  <trevnorris>sfink from mozilla says "tell him they're fun, he'll love it!"
22:39:17  <bnoordhuis>hah
22:40:10  <trevnorris>well, that would be for the --expose-natives-as, right? i was thinking more of writing our own for ssl optimizations and such. isn't that possible?
22:40:27  <bnoordhuis>writing our own what? builtins?
22:41:03  <trevnorris>yeah...
22:41:06  * trevnorristimidly says
22:41:39  <bnoordhuis>how would that work? you mean patching runtime.js or?
22:43:27  <trevnorris>hm. thought the flag --allow-natives-syntax would allow for a user to write their own.
22:43:30  <trevnorris>guess not.
22:43:54  <bnoordhuis>ah, we're discussing --allow-natives-syntax now?
22:44:03  <trevnorris>oh, sorry yeah.
22:44:14  <bnoordhuis>well, yes, you could - but you'd have to add them to runtime.js :)
22:44:34  <trevnorris>really? well, that's a pain.
22:46:27  <trevnorris>maybe we can work something like that in by node v3.0 =)
22:48:48  <bnoordhuis>so what in particular would you implement?
22:52:41  <trevnorris>was thinking mainly for crypto.
22:53:41  <bnoordhuis>but what in particular?
22:54:09  <bnoordhuis>tjfontaine: i give up for tonight. it's definitely the servername extension but v0.8 sends it too and it works there
22:54:21  <bnoordhuis>s/tonight/the night/
22:55:11  <trevnorris>randomBytes
22:55:37  <trevnorris>also possibly for a few of the buffer methods like writeFloat*
22:56:28  <bnoordhuis>okay, i can see that
22:56:35  <bnoordhuis>but what about randomBytes?
22:57:15  <tjfontaine>bnoordhuis: ok, I'll continue on it tonight, we can catch up tomorrow
22:59:20  <trevnorris>bnoordhuis: well, it takes ~3300ns for both randomBytes and pseudoRandomBytes. (2000 w/ the new buffer changes)
23:00:17  <trevnorris>oh, for a 16 byte random string.
23:00:21  <trevnorris>erm. buffer
23:00:48  <trevnorris>so I know that the new buffers only take 230ns to instantiate, and calling to/from cc ~40ns.
23:01:04  <trevnorris>so just wondering what's taking so long, and thought maybe a builtin could help there.
23:01:20  <isaacs>trevnorris: see you in a bit, i'm heading down that way now-ish
23:01:28  * isaacs&
23:01:28  <LOUDBOT>KICKIN' IT OLDSKOOL AND THINGS LIKE THAT
23:01:45  <trevnorris>coolio.
23:02:57  <trevnorris>bnoordhuis: where Math.random() only takes around 5ns. realize that's not an apples to apples comparison, but that's still a huge margin.
23:03:33  <bnoordhuis>trevnorris: it's because randomBytes and pseudoRandomBytes go into the threadpool
23:03:51  <bnoordhuis>unless you were benchmarking the sync versions, of course
23:04:12  <trevnorris>yeah. that was the sync version.
23:05:29  <bnoordhuis>could also be because it mallocs a reasonable amount of memory
23:05:53  <bnoordhuis>and it always creates a new buffer, of course
23:06:07  <bnoordhuis>okay, signing off. have a good night, guys
23:06:12  <trevnorris>night, and thanks.
23:06:18  * bnoordhuisquit (Quit: leaving)
23:14:40  * dominictarrquit (Quit: dominictarr)
23:15:21  * stagasquit (Quit: ChatZilla 0.9.90-rdmsoft [XULRunner 1.9.0.17/2009122204])
23:15:24  * st_lukequit (Remote host closed the connection)
23:16:16  <trevnorris>isaacs: here's the md5 implementation: https://gist.github.com/trevnorris/5492650 (oh, and it depends on new buffers)
23:16:34  <tjfontaine>better you tell him in person :)
23:16:40  <trevnorris>lol, good idea.
23:22:24  * octetcloudquit (Ping timeout: 252 seconds)
23:24:04  * bnoordhuisjoined
23:28:37  * bnoordhuisquit (Ping timeout: 246 seconds)
23:28:51  * EhevuTovjoined
23:32:09  <trevnorris>just realized I haven't had a meal today. off to grab some food.
23:32:41  * trevnorris&
23:32:42  <LOUDBOT>I HAVE VASELINE ON MY TOES SO THAT I CAN TOE RAPE YOU FASTER.
23:33:09  <tjfontaine>priceless
23:49:36  * hzquit
23:51:02  * mikealjoined
23:55:36  * jmar777joined
23:58:58  * amartensquit (Quit: Leaving.)