--- Log opened Fri Jun 21 00:00:02 2013 00:04 -!- mode/#libuv [+o piscisaureus__] by ChanServ 00:40 <@piscisaureus__> TooTallNate: it's scary that cloudup asks to tweet on behalf of me ... 00:41 < bnoordhuis> http://kripken.github.io/mloc_emscripten_talk/#/20 <- spot the bug 00:41 <@TooTallNate> piscisaureus__: are you signing up through twitter? 00:41 <@piscisaureus__> TooTallNate: yes 00:41 <@piscisaureus__> it worked also 00:41 <@TooTallNate> piscisaureus__: ya... we should probably remove that "permission"... i don't think we're using it 00:42 <@TooTallNate> piscisaureus__: glad that it worked though :) 00:42 <@piscisaureus__> TooTallNate: so you guys want to take on dropbox? 00:43 <@TooTallNate> piscisaureus__: in a sense... we're focusing mostly on the presentation of the files 00:43 <@TooTallNate> basically trying to handle virtually every file format inside the web browser 00:44 <@TooTallNate> i.e. you don't *need* Photohshop just to view a .psd file that your friend/coworker is sending to you 00:44 <@piscisaureus__> https://cloudup.com/cQQ5qJt6ZWr 00:44 <@TooTallNate> piscisaureus__: nice :) 00:44 <@piscisaureus__> I was just confirming it works 00:46 <@TooTallNate> piscisaureus__: try a PDF! 00:46 <@TooTallNate> (just one of the file formats that we've nailed so far) 00:46 <@piscisaureus__> TooTallNate: can you share a pdf with me? 00:47 <@TooTallNate> ya one sec 00:47 <@TooTallNate> piscisaureus__: https://cloudup.com/cUjNhRXuJxc 00:48 <@TooTallNate> pdf.js rocks :) 03:41 -!- mode/#libuv [+o TooTallNate] by ChanServ 07:12 -!- mode/#libuv [+o TooTallNate] by ChanServ 11:40 -!- mode/#libuv [+o piscisaureus_] by ChanServ 11:42 < bnoordhuis> piscisaureus_: so i want to finish up the windows side of the errno changes 11:42 <@piscisaureus_> bnoordhuis: lol. I don't believe they actually use that for strlen() 11:42 <@piscisaureus_> bnoordhuis: so ... ? 11:42 < bnoordhuis> but first i have to wait while windows installs 24 updates... 11:42 <@piscisaureus_> ah 11:42 <@piscisaureus_> lol 11:42 <@piscisaureus_> you need to boot it more often 11:42 < bnoordhuis> yeah 11:42 <@piscisaureus_> or just disable automatic updates 11:43 <@piscisaureus_> set it to "notify" instead of "auto install" 11:43 < bnoordhuis> right. next time :) 11:43 < bnoordhuis> what's with strlen? 11:43 <@piscisaureus_> bnoordhuis: the bug you pointed out http://kripken.github.io/mloc_emscripten_talk/#/20 11:43 < bnoordhuis> oh, that 11:44 <@piscisaureus_> I wonder why they |0 all the time 11:44 < bnoordhuis> to force it to (and hint that it's) a uint32 11:45 <@piscisaureus_> bnoordhuis: so your faster division patch also affects that path only right? 11:45 <@piscisaureus_> bnoordhuis: how often do you see people do (x/y)|0 11:45 < bnoordhuis> oh, no - v8 usually infers when it's integer divison 11:45 < bnoordhuis> *division 11:46 < bnoordhuis> the use case is e.g. Math.floor(10 / 3) 11:46 < bnoordhuis> bad example 11:46 < bnoordhuis> v8 would replace the 10 / 3 with a constant 11:46 <@piscisaureus_> Yeah I get it 11:47 <@piscisaureus_> bnoordhuis: so I found that this algorithm in the general case is very complex 11:47 < bnoordhuis> yeah, it is 11:47 <@piscisaureus_> and computing the magic number is not even constant-time 11:48 < bnoordhuis> you probably want to hard-code magic values for common divisors and let everything else just fall through 11:48 < bnoordhuis> fall through to the idiv code path, that is 12:54 -!- mode/#libuv [+o piscisaureus_] by ChanServ 13:57 < tellnes> https://gist.github.com/tellnes/5831209 13:57 < tellnes> Am I doing something fundamentally wrong or is this a bug in the http streams 2? 15:48 <@isaacs> tellnes: testing 15:49 < tellnes> isaacs: it looks like the req.write callback is never called 15:54 <@isaacs> tellnes: yes, OutgoingMessage is still not quite 100% a Streams2 stream 15:54 <@isaacs> tellnes: specifically, OutgoingMessage.write does not take a callback.k 15:54 <@isaacs> tellnes: this is a bug 15:56 < tellnes> isaacs: ok, thanks. Should I open an issue with the test-case? 15:57 < tellnes> isaacs: and can I expect to get it backported til v0.10? 15:57 <@isaacs> tellnes: yes, and yes 15:57 <@isaacs> tellnes: i'ts not quite trivial to fix. 15:58 <@isaacs> tellnes: because we do this magic thing where when we buffer the output, we concatenate same-encoding chunks 15:58 <@isaacs> tellnes: so if you do req.write('foo', 'ascii'); req.write('bar', 'ascii') 15:58 <@isaacs> tellnes: then the actual buffered output is: ['foobar'], ['ascii'] 15:58 <@isaacs> tellnes: however, functions don't concatenate so well like that :) 15:59 <@isaacs> tellnes: but now that ES6 will maybe someday have operator overloading, we could someday make it so that: function foo + function bar == function(args) { return [foo(args), bar(args)] } 15:59 <@isaacs> or something :) 16:00 * isaacs threw up in his mouth a little bit... 16:00 <@isaacs> ;) 16:01 < tellnes> maybe an internal `buffer written` event and attach the functions to that event is the solution? 16:01 <@isaacs> tellnes: probably, we could just make the callback a new function 16:02 <@isaacs> tellnes: if (old && !cb) cb = old; else if (cb && !old) cb = cb; else { cb_ = cb; cb = function(er) { old(er); cb_(er) } } 16:02 <@tjfontaine> isaacs: I threw up on my keyboard. 16:02 <@isaacs> where cb is the new one, and old is the old one 16:02 <@isaacs> tjfontaine: eewwww 16:02 <@isaacs> tjfontaine: you're not in the office are you? i was planning on heading in, butmight skip it, knowing that there's puke there. 16:02 <@isaacs> ;P 16:02 <@tjfontaine> hah 16:15 < tellnes> isaacs: https://github.com/joyent/node/issues/5729 :) 16:18 <@isaacs> tellnes: thanks 16:18 <@isaacs> tellnes: edited to put the irc log inline, and remove the vomit talk 16:18 <@isaacs> :) 16:18 <@tjfontaine> your scrum all set? 16:18 <@tjfontaine> awww 16:18 <@isaacs> yea 16:18 <@tjfontaine> k 16:18 <@isaacs> gotta run one quick errand, then heading int 16:18 <@tjfontaine> k 16:18 <@isaacs> see ya in a bit 16:19 <@tjfontaine> I'll be here 16:19 < tellnes> isaacs: ok, I'll remember that to next time 16:35 -!- mode/#libuv [+o piscisaureus_] by ChanServ 16:52 <@tjfontaine> why do we noramlize the drive letter on windows to lower case? 16:57 <@piscisaureus_> tjfontaine: I don't remember. sblom did that. 16:57 <@tjfontaine> I know I found the commit 16:57 <@tjfontaine> seems like it was to make other tests pass 17:02 <@piscisaureus_> I remember I wasn't thrilled about it but it seemed harmless 17:05 <@tjfontaine> well, of course executable path test fails, because the drive letter is always captialized, and interestingly path.normalize(__dirname) doesn't lowercase the drive letter, but a path.join() will 17:06 <@tjfontaine> this is all weird 17:22 <@tjfontaine> it's one thing to make a typo in lib/*.js and have to rebuild on unix, but it's down right time sucking to do that on windows :/ 17:35 <@tjfontaine> lower casing the drive letter simply can't be the right answer, if anything we should be normalizing up 17:45 < tellnes> isaacs: patch on the way 18:08 < trevnorris> morning 18:20 -!- mode/#libuv [+o piscisaureus_] by ChanServ 18:31 < trevnorris> tjfontaine: know if there's a way to tell the python script to run a set of tests like simple/test-net* ? 18:31 <@tjfontaine> you can just do that 18:31 <@tjfontaine> python tools/test.py simple/*net* 18:31 < trevnorris> oh, heh, thanks. 18:55 <@tjfontaine> indutny: so, tls is stalling on windows ... 18:55 <@tjfontaine> client readable 1024 2077696 2097152 18:55 <@tjfontaine> client readable 1024 2078720 2097152 18:55 <@tjfontaine> client readable 1024 2079744 2097152 18:55 <@tjfontaine> in test/simple/test-tls-client-destroy-soon.js 18:57 <@indutny> heya 18:57 <@indutny> wtf 18:57 <@indutny> in master? 18:57 <@tjfontaine> yes 19:11 < trevnorris> tjfontaine: is jenkins down? 19:14 <@tjfontaine> it's in its unhappy place 19:15 <@tjfontaine> basically at some point javur starts spinlooping on something and won't respond to anyone 19:19 <@indutny> isaacs: I've almost finished that couchdb thingy 19:20 <@indutny> with the help of rnewson 20:27 < trevnorris> isaacs: ping 20:31 <@tjfontaine> you're psychic 20:31 < trevnorris> :) 20:42 < trevnorris> putting together some performance numbers for https://github.com/joyent/node/pull/5720 20:42 < trevnorris> here, https://gist.github.com/trevnorris/5827001 20:43 < trevnorris> there i'm showing off the perf gains, but there are a few losses, specifically in http, that i'm still working through. 20:45 < trevnorris> what i'm wondering is if merging sooner rather than later would be possible, and could work though the later more easily. 20:46 < trevnorris> (want to stay away from another "buffer" patch scenario at all costs) 20:46 < trevnorris> isaacs: ^ 21:09 < bnoordhuis> windows... install updates? reboot. install programs? reboot. resize a hard drive? reboot. 21:10 <@tjfontaine> don't bother, reboot. 21:14 < trevnorris> don't reboot, constantly annoy the user until they do. 21:20 < trevnorris> oh, and my favorite. install updates, reboot into update installer, reboot when complete and startup. realize you forgot all the updates... 21:20 < trevnorris> s/all/some of 21:25 <@isaacs> trevnorris: sorry, in the middle of tracking down some highly mysterious HTTP breakage 21:26 < trevnorris> isaacs: ah, a fun one. ticket open for it? 21:32 < bnoordhuis> #define FILETIME_TO_UINT(filetime) \ (*((uint64_t*) &(filetime)) - 116444736000000000ULL) 21:32 < bnoordhuis> ^ i guess that's one way to convert a struct timespec to an uint64_t 21:33 <@tjfontaine> don't get me started 21:33 <@tjfontaine> I think we had this conversation once :) 21:36 < trevnorris> bnoordhuis: thanks for the reminder about removing the unnecessary offset, length args. allowed me to drop the .slice() in the onread, which is leading to some fun improvements. :) 21:43 <@tjfontaine> trevnorris: btw I think jenkins really cranky when it can't talk to github wrt authorization, at least it just happened to me and the error spew was that github took too long to respond 21:43 < trevnorris> hm. interesting. 22:00 < trevnorris> bnoordhuis: what's your opinion on a patch that introduces both performance regression and improvements, but the regressions could be dealt w/ later? 22:03 < bnoordhuis> trevnorris: not favorable 22:04 < trevnorris> :P 22:04 < bnoordhuis> were you around when streams2 was landed? 22:04 < bnoordhuis> those were not happy times 22:05 < trevnorris> this isn't that severe for sure 22:06 < trevnorris> any regression is below 10%, and only for specific cases. 22:06 < bnoordhuis> still 22:06 < bnoordhuis> i would only consider that when the cause is well understood 22:06 < trevnorris> ok. 22:06 < bnoordhuis> and there's a clear path to addressing it 22:06 < bnoordhuis> in which case i'd probably ask you why you're not fixing it in the first place :) 22:07 < trevnorris> the main reason is so it doesn't turn into a massive patch like my buffers. 22:07 < trevnorris> i have enough performance enhancements on track to take up a year 22:07 < trevnorris> also i'd like to get community response on some stuff, for example here are some numbers: https://gist.github.com/trevnorris/5827001 22:08 < trevnorris> the dispose column is using the new buffer.dispose() method (directly on a Buffer instance) 22:09 < bnoordhuis> so are cause and remedy known? 22:09 < trevnorris> yeah, for every case. 22:09 < trevnorris> it'll just take time to implement. 22:09 < bnoordhuis> how much time? 22:10 < trevnorris> definitely before v0.12. but probably within the 1-2 month range 22:11 < bnoordhuis> my old manager taught me to multiply by 2 and add 8 22:11 < bnoordhuis> so 2-4 months, give or take a week 22:11 < trevnorris> lol. so did mine. :) 22:12 < bnoordhuis> the thing is, v0.12 will have a ~4-6 week code freeze period 22:12 < bnoordhuis> where we'll be fixing just bugs and performance regressions 22:13 < bnoordhuis> that's not a good time to land big patches 22:13 < bnoordhuis> iow, what are the fixes going to look like? 22:14 < trevnorris> first, and main, is ~10% regression on very small http requests (e.g. < 1KB) 22:14 < trevnorris> partially the hit comes from the path, data comes in, turns into a buffer, sent to http_parser, turned into an object. 22:16 < trevnorris> honestly, the cost of malloc per request is tiny compared to what's going on in v8. 22:16 < trevnorris> bit, at least for me, it's easier to make those improvements when I don't have to keep track of the slab. 22:17 < trevnorris> ooh, thanks. you just gave me another idea :) 22:22 < trevnorris> bnoordhuis: there are other things I'd like to see as well. like being able to propagate the desired encoding all the way down to StreamWrap, so Buffer's don't have to be created unnecessarily. 22:37 < bnoordhuis> trevnorris: not a bad idea 22:37 < trevnorris> thanks :) 22:53 < trevnorris> bnoordhuis: my observation is overall throughput isn't inhibited by the extra malloc's. taking the tcp raw c2s size down to 16 bytes has the same results for master and patch. 22:53 < trevnorris> bnoordhuis: in http's case it has to do w/ how it handles the data once it comes in. 22:55 < trevnorris> bnoordhuis: oh v8 DataView impl: https://github.com/v8/v8/commit/67de009 22:57 < trevnorris> hm. nm. nothing special. nothing exposed in include/v8.h 23:14 < trevnorris> bnoordhuis: ok, fwiw the disparity between benchmark results are much larger running make bench-http than when I run benchmark/http_simple.js and wrk directly. 23:14 < trevnorris> it's almost outside the margin of error. 23:22 < trevnorris> all alone :( 23:22 < trevnorris> WILL YOU COMFORT ME LOUDBOT? 23:22 < LOUDBOT> LET ME FIRE UP NETBEANS HERE 23:22 < trevnorris> ooh. definitely not comforting. 23:25 <@tjfontaine> poor trevnorris, fighting with github 23:26 < trevnorris> lol. that was fast. 23:26 < trevnorris> just a brain fart. on code review they have a "close form" button in the same place they have that "close pull request" button 23:27 <@tjfontaine> don't worry soon they'll just remove text and leave only icons 23:27 <@tjfontaine> you know what that button does, right? 23:27 < trevnorris> haha 23:27 < trevnorris> what? 23:27 <@tjfontaine> trevnorris: you haven't noticed how much github loves buttons, or text as buttons? 23:28 < trevnorris> yeah. the text as buttons thing is a complete freakin UI fail. 23:28 < trevnorris> I can say that having developed web ui for years. 23:45 < trevnorris> tjfontaine: thoughts on this addition? http://git.io/ENFkrQ 23:46 < trevnorris> tjfontaine: though I don't like the name "dispose" since in v8 .Dispose() doesn't actually free the associated memory 23:46 < trevnorris> but buffer.free() looks kinda strange, imho 23:46 <@tjfontaine> trevnorris: well, lemme ask this 23:47 <@tjfontaine> if someone else in c++ makes a buffer and specifies a free_cb, and I call .dispose() in js what happens? 23:47 < trevnorris> it free's the memory and returns NULL to the cb. definitely not what I'd like for sure. 23:48 < trevnorris> but since I can't recover the associated Persistent I can't call the callback and pass the data 23:48 <@tjfontaine> ok so on that point, we *have* to call the creators cb, otherwise this is just a disaster waiting to happen 23:48 <@tjfontaine> or you have to make .dispose a noop in that case 23:49 < trevnorris> oy. right now there's no way to communicate that. I could attach the Persistent to the Buffer instance but then there goes the performance advantages. 23:49 <@tjfontaine> set a flag or do *something* 23:50 <@tjfontaine> the other question I would have on semantics 23:50 <@tjfontaine> if this is disposed, you set the length to 0, so I get outofbounds exceptions? 23:50 < trevnorris> ok. have an idea. it'll make those objects slow as the old ones, but at least their usage is an edge case. 23:51 < trevnorris> can't. in cc I disassociate the external memory from the object and zero it out there as well. 23:51 <@tjfontaine> so will every subsequent op throw at least? 23:51 <@tjfontaine> .write() and .read()? 23:52 < trevnorris> you mean on the Buffer instance? 23:52 <@tjfontaine> yes 23:52 < trevnorris> no. it just transforms it into a zero-length buffer. 23:53 <@tjfontaine> right, so outofbounds errors 23:53 < trevnorris> ah, I see what you're saying. yeah. 23:54 < trevnorris> i thought you meant if they used array accessors 23:54 <@tjfontaine> what happens on an array accessor, just undefined on get? 23:55 < trevnorris> yeah 23:56 < trevnorris> tjfontaine: the main use case for this is when you bring data in, then do something quickly w/ it (e.g. write to disk, send over network) 23:57 < trevnorris> then once the operation is complete you free the memory. 23:57 < trevnorris> mainly so GC doesn't have to deal w/ cleanup. 23:57 <@tjfontaine> ya I get it 23:57 <@tjfontaine> I am just really *really* afraid of the user after free bugs that will come after we let people do this 23:59 <@tjfontaine> did you watch that google io presentation? btw 23:59 < trevnorris> tjfontaine: point taken. and no --- Log closed Sat Jun 22 00:00:08 2013