00:00:25  <ryah>piscisaureus_: via env
00:00:59  <ryah>we can just do the message stream over stdin
00:07:24  <piscisaureus_>well, okay
00:08:46  <piscisaureus_>we should go all the way eventually and get rid of the distinction between uv_tcp_t/uv_pipe_t/uv_tty_t
00:08:56  <piscisaureus_>at least as part of the external api
00:09:30  <piscisaureus_>if any handle type needs a lot of memory (like a tcp *server* does on windows), we could just malloc that memory
00:10:16  <piscisaureus_>that's fine except for handles that you want to create often (e.g. connection-sockets, connection-pipes, and file streams)
00:27:53  <erickt_>libuv status report hit news.ycombinator.com: http://news.ycombinator.com/item?id=3031370
00:27:59  <erickt_>in case anyone is interested
00:30:49  * bnoordhuisis interested
00:32:56  <piscisaureus_>bnoordhuis: now we're obliged to update phode :/
00:33:14  <bnoordhuis>oh well
00:33:24  <bnoordhuis>hey, someone else started on lua bindings too
00:33:34  <piscisaureus_>yes
00:34:02  <bnoordhuis>and he's got a working echo server too...
00:34:30  <piscisaureus_>bnoordhuis: are your bindings already published? And is creationix' implementation any good?
00:34:44  <bnoordhuis>piscisaureus_: https://github.com/bnoordhuis/lua-uv
00:34:58  <bnoordhuis>don't know anything about creationix's project
00:39:50  <bnoordhuis>run this in the repl twice: Buffer(3.3)
00:40:01  <bnoordhuis>first time it works, second time it throws an exception and terminates
00:40:38  <piscisaureus_>doesn't terminate for me
00:40:42  <piscisaureus_>but throws, yes
00:40:48  <bnoordhuis>hmm, weird
00:40:54  <piscisaureus_>TypeError: Cannot call method 'toString' of undefined
00:40:57  <piscisaureus_>is what I get
00:41:14  <bnoordhuis>yeah, that's it - but only the second time
00:41:19  <bnoordhuis>and it quits node here
00:41:25  <piscisaureus_>oh
00:41:26  <piscisaureus_>weird
00:41:29  <piscisaureus_>it shouldn't
00:41:46  <piscisaureus_>but I wonder why this happens
00:41:54  <bnoordhuis>odd, init?
00:42:31  <piscisaureus_>Buffer(3.3); Buffer(3) also throws
00:42:38  <piscisaureus_>seems that Buffer(3.3) fucks up later invocations
00:42:50  <bnoordhuis>yep
00:42:55  * erickt_quit (Quit: erickt_)
00:43:42  <piscisaureus_>pretty weird that `new Something()` can return Undefined
00:44:34  <bnoordhuis>err, how? it throws, doesn't it?
00:44:49  <piscisaureus_>bnoordhuis: it doesn't throw
00:44:59  <bnoordhuis>in the repl? does for me
00:45:14  <bnoordhuis>ReferenceError: Something is not defined
00:45:14  <bnoordhuis> at repl:1:6
00:45:19  <piscisaureus_>bnoordhuis: It's not the constructor that throws - it's the repl
00:45:32  <piscisaureus_>because it tries to call toHex on undefined
00:45:54  <piscisaureus_>bnoordhuis: try new Buffer(3.3);new Buffer(3.3);1
00:46:32  <piscisaureus_>bnoordhuis: new Buffer(3.3);a=new Buffer(3.3);typeof a;
00:46:34  <bnoordhuis>ah, i see what you mean
00:46:58  <bnoordhuis>typeof a == 'object' here
00:47:03  <piscisaureus_>yes, here too
00:47:14  <piscisaureus_>but a.toHex doesn't exist
00:47:48  <piscisaureus_>bnoordhuis: oh hmm.
00:47:57  <bnoordhuis>oh right, Buffer.isBuffer(a) == true but a.toHex is undefined
00:48:09  <piscisaureus_>bnoordhuis: actually, not, sorry :-(
00:48:16  <piscisaureus_>the error is thrown inside toHex
00:48:25  <piscisaureus_>buffer.js:30:12
00:48:37  <piscisaureus_>bnoordhuis: ^
00:48:49  <piscisaureus_>aaaah
00:48:51  <bnoordhuis>yeah, i saw that
00:49:07  <piscisaureus_>bnoordhuis: I know what happens
00:49:17  <piscisaureus_>bnoordhuis: the buffer is sliced off a fastbuffer
00:49:21  <bnoordhuis>there's an out-of-bound index?
00:49:25  <piscisaureus_>er, of a slowbuffer
00:49:26  <piscisaureus_>yes
00:49:32  <bnoordhuis>i suspected as much
00:49:37  <piscisaureus_>so the buffer thinks it spans 3.3 .. 6.6
00:49:55  <piscisaureus_>so it tries to access the parent buffer at offset 7
00:50:10  * mralephquit (Quit: Leaving.)
00:50:15  <piscisaureus_>buffers shouldn't take doubles :-/
00:50:28  <bnoordhuis>https://github.com/joyent/node/issues/1758 <- that's where i got it from
00:50:52  <bnoordhuis>i suppose we could do ~~size to round it down
00:51:02  <piscisaureus_>we should round up
00:51:23  <piscisaureus_>use Math.ceil (or was it Math.ceiling?)
00:51:31  <bnoordhuis>the former
00:51:35  <bnoordhuis>round up, hmm
00:52:54  <piscisaureus_>bnoordhuis: also
00:52:55  <piscisaureus_>new Buffer(-10)
00:52:55  <piscisaureus_>new Buffer(2) <-- boom!
00:53:19  <bnoordhuis>hah
00:53:37  <bnoordhuis>who's going to fix it, you or me?
00:54:08  <piscisaureus_>the guy with the highes pay grade
00:56:26  <bnoordhuis>you don't want to keep ahead in # of commits? i'm reaching out to you here
00:56:38  <piscisaureus_>I don't give a %^*
00:57:27  <bnoordhuis>okay, imma fix it then
00:57:54  <piscisaureus_>bnoordhuis: also fix this case:
00:57:55  <piscisaureus_>new Buffer({length: "die mf!"});
00:58:25  <bnoordhuis>hah
00:58:36  <bnoordhuis>but you know, the buffer constructor is performance critical code
00:59:03  <bnoordhuis>it shouldn't be top heavy with checks for obscure corner cases
01:00:40  <piscisaureus_>bnoordhuis: just add a check
01:00:40  <piscisaureus_>if (!(length >= 0 && (!(length < Number.POSITIVE_INFINITY)) {
01:00:40  <piscisaureus_> // Die!
01:00:40  <piscisaureus_>}
01:00:40  <piscisaureus_>length = Math.ceil(length);
01:01:32  <piscisaureus_>bnoordhuis: and
01:01:32  <piscisaureus_>- this.length = subject.length;
01:01:32  <piscisaureus_>+ this.length = +subject.length;
01:02:44  <piscisaureus_>eh
01:02:44  <piscisaureus_>if (!(length >= 0 && length < Number.POSITIVE_INFINITY)) { die }
01:02:58  <bnoordhuis>hmm, why the check instead of ~~ to coerce it into an integer?
01:03:10  <bnoordhuis>garbage in, garbage out
01:03:57  <piscisaureus_>bnoordhuis: ok - but also strip the sign bit please :-)
01:04:13  <bnoordhuis>roger
01:05:02  <bnoordhuis>https://github.com/bnoordhuis/phode <- hah wtf, 11 watchers in two hours or so
01:05:24  <bnoordhuis>now we really have to :(
01:05:41  <piscisaureus_>I love how
01:05:41  <piscisaureus_>0-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~- is valid javascript
01:05:58  <piscisaureus_>fucking trillian truncated my message again
01:06:11  <bnoordhuis>hah
01:06:15  <piscisaureus_>(cont'd) 0 is valid javascript
01:07:09  <piscisaureus_>We could have a ascii art generator that generates valid javascript
01:07:23  <bnoordhuis>and have it double as perl code!
01:07:38  <piscisaureus_>So we can put our logo at the top without comments around it
01:07:43  <piscisaureus_>that's gonna make people frown
01:09:02  <bnoordhuis>that'd actually be a pretty sweet in-joke
01:10:04  <piscisaureus_>Although the expression should yield 42 obviously
01:11:28  <bnoordhuis>this is now our prio #1 task
01:31:57  <piscisaureus_>bnoordhuis: is Björn ook degene die de node talk gaat doen? of gewoon een organisator?
01:32:07  <bnoordhuis>piscisaureus_: organisator
01:34:28  <piscisaureus_>bnoordhuis: hnl is weer up btw
01:34:44  <bnoordhuis>ja?
01:34:51  <bnoordhuis>nou, hier niet
01:34:57  <piscisaureus_>hmm. ik klik door en 't is weer gone
02:06:15  <piscisaureus_>bnoordhuis: hey, een C vraagje
02:06:28  <bnoordhuis>piscisaureus_: ho, een c antwoordje
02:06:38  <piscisaureus_>bnoordhuis: is `int a[] = { 1, 2 }` okay c-wise?
02:06:48  <bnoordhuis>yep
02:06:59  <piscisaureus_>and does do it what I expect it does? :-)
02:07:14  <bnoordhuis>i don't know what you expect it does
02:07:35  <bnoordhuis>if you expect it to create a two-int array with values 1 and 2, then the answer is yes
02:09:36  <piscisaureus_>I expect it to give me the quantum transfunctioner and give me pleasure
02:10:40  <piscisaureus_>oh it was the continuum transfunctioner
02:13:25  <bnoordhuis>piscisaureus_: math.round or math.ceil?
02:13:32  <piscisaureus_>ceil!
02:13:41  <bnoordhuis>yeah, i agree
02:13:41  <piscisaureus_>the buffer will be big enough then :-)
02:19:17  * brsonquit (Ping timeout: 256 seconds)
03:20:44  <CIA-53>libuv: Ben Noordhuis master * r8f617b9 / src/unix/fs.c : unix: darwin < 10.6 does not have fdatasync, use fsync - http://git.io/qKjdIQ
03:24:05  <CIA-53>node: Ben Noordhuis master * rfcba145 / (deps/uv/README.md deps/uv/src/unix/fs.c): uv: upgrade to 8f617b9 - http://git.io/oeYp9A
03:24:39  <indutny>bnoordhuis: yt?
03:24:41  <indutny>bnoordhuis: hi
03:24:52  <bnoordhuis>indutny: hey
03:25:03  <indutny>bnoordhuis: ok, freebsd really doesn't have on_exit :D
03:25:14  <indutny>bnoordhuis: does it have anything similar to it?
03:25:20  <indutny>bnoordhuis: or only atexit() ?
03:25:28  <bnoordhuis>indutny: only atexit(), same for sunos
03:25:35  <indutny>bnoordhuis: that's not good
03:25:50  <bnoordhuis>unix is a harsh mistress
03:26:10  <indutny>bnoordhuis: looks like I need to track exit code somehow....
03:26:25  <indutny>bnoordhuis: do you have any ideas? what do you think about this pull request?
03:27:09  <bnoordhuis>indutny: it's usually not a great idea to do lots of work in exit handlers
03:28:23  <indutny>bnoordhuis: heh, ok...
03:29:37  <indutny>so you're against it :D
03:30:00  <bnoordhuis>against the current approach, yes
03:30:04  <indutny>but absence of on_exit function seems like a good argument
03:30:23  <indutny>k, I'll think more about it
03:30:27  <indutny>thanks for reviewing
03:30:43  <bnoordhuis>my pleasure, indutny
03:31:26  <indutny>brb
03:33:46  <bnoordhuis>indutny: come to think of it, this isn't a problem that needs fixing
03:33:58  <bnoordhuis>people can listen for SIGINT, SIGTERM, etc. so that's not an issue
03:34:13  <bnoordhuis>and if we call exit() in c++ land, it's probably with good reason
03:43:22  <ryah>you guys stay up so late.
03:47:36  <piscisaureus_>yes
03:47:42  <piscisaureus_>it's unhealthy isn't it
03:47:52  <ryah>yes
03:48:19  <ryah>no need to overlap so heavily with PST :)
03:48:40  <ryah>i can wake up earlier if you'd like :)
03:48:47  <piscisaureus_>we're just preparing for the Trip :-p
03:48:57  <ryah>when is it?
03:49:05  <piscisaureus_>you tell us
03:49:19  <ryah>the sf trip or the aarhus trip?
03:49:23  <piscisaureus_>oh
03:49:33  <piscisaureus_>aarhus trip preparation was "this morning"
03:49:56  <piscisaureus_>it's October 10th btw
03:50:05  <ryah>what will you talk about?
03:50:41  <piscisaureus_>about node - and give some technical insight on the implementation
03:50:58  <piscisaureus_>but we're not sure - need to check with the organization about the audience
03:51:36  <piscisaureus_>Our page lists "target audience: backend developers working with traditional web frameworks." <-- booring
03:52:15  <piscisaureus_>But since right after us there will be a talk about crankshaft I guess we can go more in-depth
03:52:18  <ryah>i think you will have V8 people there
03:52:22  <piscisaureus_>yes
03:52:24  <ryah>so you should target them
03:52:31  <ryah>i think the world will find it more interesting
03:52:32  <indutny>ryah: just woke up :)
03:52:52  <ryah>indutny: yeah, you don't overlap so much with me :)
03:52:57  <indutny>haha
03:52:57  <indutny>right
03:53:13  <ryah>indutny: i think you're probably at the least optimal timezone for USA communication
03:53:18  <piscisaureus_>ryah: I guess there will also be other people there :-p
03:53:21  <indutny>:P
03:53:28  <indutny>anyway I'm working in USA
03:54:02  <piscisaureus_>indutny: rly?
03:54:04  <ryah>indutny: i know - we talked about you at node camp
03:54:08  <indutny>piscisaureus_: contractee
03:54:15  <indutny>ryah: hehe, nice :)
03:54:29  <ryah>i should move back to europe
03:54:45  <indutny>ryah: really? where're you from? germany?
03:54:47  <ryah>then node can continue it's euro ownership
03:55:03  <ryah>indutny: no, im american but i lived in germany for a few years
03:55:13  <indutny>ryah: ah, interesting
03:55:39  <ryah>*its
03:58:27  <indutny>going to study in MIT someday :)
03:58:31  <indutny>probably next year or later
03:58:47  <indutny>that's one of my dreams
03:59:18  <indutny>we've very good math faculties here in Russia, but very few really good programming courses
03:59:43  <piscisaureus_>well, studying is good for you
03:59:53  <piscisaureus_>but you shouldn't expect to learn programming there
04:00:10  <ryah>indutny: where do you live?
04:00:19  <indutny>ryah: Russia, Omsk
04:00:26  <indutny>Siberia, actually
04:00:37  * ryahhasn't heard of this
04:00:43  <ryah>is it snowing there
04:01:15  <indutny>not now
04:01:18  <piscisaureus_>probably not in summer :-)
04:01:22  <indutny>hope it'll this December
04:01:28  <indutny>summer was really hot
04:01:38  <indutny>about 30-34
04:01:44  <indutny>+30 - +34 C
04:01:58  <indutny>piscisaureus_: +1
04:02:10  <indutny>you guys should definitely visit Russia someday :)
04:02:46  <piscisaureus_>true - but I'd do moskoa first
04:02:50  <indutny>I'm going to do some work for Yandex in next months, probably I'll talk with them about organizing nodeconf.ru and inviting you in Moscow
04:02:52  <piscisaureus_>*moskau
04:02:59  <indutny>piscisaureus_: better St. Petersburg
04:03:14  <piscisaureus_>there is a famous dutch song about omsk - it didn't end well
04:03:23  <indutny>piscisaureus_: hahaha :) really?
04:03:28  <bnoordhuis>with wolves and a sleigh, i think?
04:03:38  <piscisaureus_>yes
04:03:42  <indutny>omg
04:03:57  <indutny>Omsk is quite big city, about 1.5-2 millions of citizens
04:04:03  <indutny>and no wolves around
04:04:08  <indutny>only bears :P
04:04:43  <bnoordhuis>i think i'm actually more scared of bears than of wolves
04:05:18  <indutny>bnoordhuis: lol
04:06:18  <indutny>as someone said: "If you're trapped in car and bear is trying to break in... Scream and shout - someone will come to help you, and while bear will eat them you'll probably have a time to escape"
04:06:53  <indutny>no bears here too, of course :P
04:08:07  <piscisaureus_>https://gist.github.com/1238953 <-- reading vt100 keystrokes on windows
04:08:11  <piscisaureus_>so awful :-(
04:08:14  <ryah>indutny: do many people speak english there?
04:08:20  <indutny>ryah: no
04:08:38  <ryah>piscisaureus_: you should land your thing - no need to do the whole vt100 bit
04:09:05  <ryah>i'd rather see it land half-broken - then it will encourage people to fix :)
04:09:11  <indutny>:)
04:09:15  <indutny>like me :D
04:09:19  <ryah>(in open source it's good to give some low hanging fruit)
04:09:48  <ryah>(maybe the vt100 stuff isn't very low hanging though!)
04:09:48  <piscisaureus_>hmm - yes probably
04:11:22  <indutny>going to reboot, brb
04:11:43  <indutny>can't wait for 0.6.0
04:11:50  <indutny>so many changes since 0.4.0
04:16:03  <bnoordhuis>okay, off to bed
04:16:06  <bnoordhuis>sleep tight, people
04:16:51  <indutny>good night
04:16:57  <piscisaureus_>bnoordhuis: sleep tight
04:20:58  <ryah>i think dutch say "sleep tight" more than americans
04:21:06  * bnoordhuisquit (Ping timeout: 256 seconds)
04:21:38  <indutny>ryah: russians have something like that "spokoinoi nochi"
04:37:11  <indutny>ryah: sometimes debugger gets incorrectly initialized
04:37:15  <indutny>ryah: i.e. won't work
04:37:25  <indutny>I've XXX for that in _debugger.js
04:37:41  <indutny>this is quite a important issue
04:37:54  <indutny>I'll try to figure out today what happens on both sides
04:38:00  <ryah>indutny: how so?
04:38:16  <indutny>ryah: looks like a v8 problem, but I'm not sure
04:38:39  <ryah>indutny: have you given some thought to remote debugging?
04:38:44  <indutny>ryah: like protocol gets broken between server and client
04:38:50  <ryah>indutny: we could just reenable the SIGHUP
04:39:30  <indutny>ryah: I think SIGs for unix and Console control events for win are only one way to have a control over that
04:39:42  <indutny>ryah: so I'll try to experiment with that today
04:39:52  <indutny>ryah: thanks for reminding
04:41:25  <ryah>indutny: you can look thought the git log for how it was done before
04:41:37  <ryah>indutny: but warning: it was messing up startup time
04:41:41  <indutny>ryah: ok, I see some rudiments in node.cc
04:41:47  <indutny>heh :)
04:41:56  <indutny>do we have startup time benchmarks?
04:42:02  <ryah>indutny: so if you can reenable SIGUSR1 (not SIGHUP!) to start the debugger
04:42:15  <ryah>benchmark/startup.js
04:42:24  <indutny>k
04:42:34  <ryah>http://arlolra.no.de/bench/startup_time
04:42:49  <ryah>you can see where we removed it
04:42:55  <indutny>4 seconds??
04:43:09  <ryah>indutny: for 1000 starts
04:43:14  <indutny>ah
04:43:21  <ryah>er 100
04:43:21  <indutny>100 starts
04:43:29  <ryah>1000 - i wish
04:43:43  <indutny>haha
04:43:44  <indutny>:)
04:43:50  <ryah>you know - V8 can start in 4ms
04:43:56  <ryah>we're doing it in 40ms
04:44:11  <indutny>yep, we can show better results
04:44:12  <ryah>should figure out what is so slow...
04:44:22  <indutny>can't dtrace or something can help with that?
04:45:09  <ryah>yes
04:46:09  <indutny>haven't tried it yet, haven't got a chance to work on sunos or real mac
04:46:14  <indutny>only Leopard in VM
04:46:36  <indutny>k, I'll track startup time
04:49:37  <indutny>ah... I see now, it's interesting...
04:53:18  <indutny>hm...
04:53:24  <indutny>shouldn't be a problem as I can see
04:53:37  <ryah>piscisaureus_: you still there
04:53:47  <ryah>piscisaureus_: i think we should move away from our class model in libuv
04:53:55  <piscisaureus_>ryah: oh?
04:54:03  <ryah>piscisaureus_: we should just define an interface with function pointers for each stream type
04:54:19  <ryah>struct stream_interface { uv_read_cb read_cb; ... };
04:54:35  <ryah>er
04:55:15  <ryah>struct stream_interface { uv_write_p write; uv_read_start_p read_start; uv_read_stop_p read_stop; ... };
04:55:48  <piscisaureus_>hmm... why?
04:56:10  <ryah>where uv_write_p is a typedef int (*uv_write_p)(uv_write_t* req, uv_stream_t* handle, uv_buf_t bufs[], int bufcnt, uv_write_cb cb);
04:56:42  <ryah>well at least this should be used internally
04:56:58  <ryah>in uv-common.h
04:57:25  <piscisaureus_>It makes it more extensible which is good
04:57:26  <ryah>then in uv-common.c we can define uv_write() to look at the type and the corresponding interface to call the function
04:57:28  <indutny>ryah: I think v8-debug.h should be extended
04:57:38  <indutny>with DisableAgent
04:57:42  <piscisaureus_>ryah: users could have their own stream types
04:57:45  <indutny>it's already available in src/api.cc
04:57:54  <indutny>but not lifted anywhere from inside
04:58:26  <ryah>piscisaureus_: exactly
04:58:40  <ryah>piscisaureus_: that would be awesome
04:58:47  <piscisaureus_>but it does add 2 pointer derefs per call :-)
04:58:57  <ryah>i knew you would say that
04:59:08  <ryah>come on - this is not going to effect perf
04:59:36  <ryah>that is not in the same magnatude of latency as our bottlenecks
04:59:47  <ryah>i think
04:59:50  <piscisaureus_>hehe
04:59:55  <piscisaureus_>I think you're right
05:00:46  <piscisaureus_>I like the idea of adding custom stream types
05:01:01  <ryah>piscisaureus_: http://msdn.microsoft.com/en-us/library/ms973852.aspx
05:01:51  <ryah>6.2 ns
05:02:31  <piscisaureus_>?
05:02:44  <piscisaureus_>you mean "this instance call"?
05:03:41  <ryah>yeah, i think that's roughly the same operation
05:03:43  <ryah>hm
05:03:47  <ryah>maybe twice..
05:03:54  <ryah>~12
05:04:12  <ryah>although there could be some cache issues that im missing
05:04:17  <piscisaureus_>It's probably more like virtual call
05:04:21  <ryah>yeah i guess you really need to measure this things directly
05:04:26  <ryah>yeah virtual call - sure
05:04:31  <piscisaureus_>5.4
05:04:43  <ryah>anyway - fast
05:04:56  <ryah>we can do a lot of 5.4ns ops before we make something slower
05:05:24  <piscisaureus_>yeah - probably
05:05:45  <indutny>ryah: lets rewrite libuv on nasm
05:06:25  <piscisaureus_>ryah: the only downside - I also like to merge tcp,tty,pipe into one struct
05:06:42  <ryah>piscisaureus_: oh yeah - so we can do that too
05:06:45  <piscisaureus_>because the user can then just alloc one stream_t and know that it can hold everything
05:06:49  <ryah>piscisaureus_: actually that's super easy for us
05:07:21  <ryah>piscisaureus_: want to just do it right now?
05:07:26  <piscisaureus_>ryah: no
05:07:38  <piscisaureus_>ryah: I have to finish this first and then go to bed
05:07:42  <piscisaureus_>(order undefined)
05:07:42  <indutny>very interesting
05:07:51  <indutny>streams structs are messy
05:08:00  <indutny>and a lot of different structs are used for similar things
05:08:09  <piscisaureus_>ryah: the problem of this is - if people define their own stream type they may want to store additional state
05:08:14  <piscisaureus_>that doesn't fit
05:08:15  <ryah>indutny: yeah - but who cares
05:08:53  <ryah>it actually might be nice to have a stream interface - perhaps we can have some lowlevel version of Stream.pipe
05:08:56  <ryah>from node
05:09:08  <ryah>if isaacs for example implemented the zlib binding as a stream
05:09:25  <ryah>that'd be pretty hot if we could pipe in libuv without going into js
05:09:26  <piscisaureus_>hmm
05:09:37  <piscisaureus_>have openssl bindings as a stream :-)
05:09:41  <ryah>yeah
05:09:52  <indutny>hahah
05:09:55  <indutny>fck openssl
05:09:57  <ryah>that would actually speed up the TLS server a bit
05:10:02  <indutny>lets use selene
05:14:03  <ryah>im doing the stream interface
05:14:06  <ryah>this idea is too good
05:22:22  <indutny>ryah: what do you think about `node debug localhost:5858`
05:22:24  <indutny>?
05:22:40  <indutny>that should fit nicely our current implementation
05:22:42  <ryah>indutny: that's good
05:22:46  <indutny>k
05:27:41  <indutny>ryah: ok, it works :)
05:27:43  <indutny>hahaa
05:27:59  <ryah>indutny: :)
05:29:20  <ryah>indutny: i really want `node debug -p pid`
05:29:51  <indutny>ryah: hm... and connect only to localhost:5858?
05:30:26  <ryah>indutny: yeah - it sucks
05:30:37  <ryah>indutny: they should have this work over named pipes
05:30:37  <indutny>k, I'll do that :)
05:30:38  <indutny>:p
05:45:50  <indutny>ryah: sorry, looks like I'm missing something....
05:45:59  <indutny>SIGUSR1 thing is working in node's master
05:46:17  <indutny>is there any performance issues with it?
05:47:01  <indutny>ah got it
05:47:05  <indutny>https://github.com/joyent/node/commit/bca6e35b2b533ce220376d5db43893e14bb8dbf3
05:53:42  <indutny>anyway it seems to be working on linux
05:54:11  <indutny>ryah: http://github.com/indutny/node/tree/feature-debugger-sighandler
06:02:41  <ryah>indutny: just that one commit?
06:02:46  <indutny>haha
06:02:53  <indutny>w/o windows support yet
06:02:56  <indutny>but it works
06:03:11  <ryah>indutny: ../src/node.cc:2360: error: ‘debugger_running’ was not declared in this scope
06:03:20  <indutny>em..
06:03:42  <indutny>ryah: 'â' ?
06:03:52  <indutny>oh
06:04:06  <ryah>sorry - did the encoding get messed up?
06:04:07  <indutny>one second
06:04:10  <indutny>stupid mistake
06:04:11  <indutny>nope
06:04:54  <indutny>pushed update
06:06:50  <ryah>indutny: it didn't work...
06:07:00  <indutny>ryah: what are you doing? :)
06:07:15  <ryah>started node benchmark/http_simple.js
06:07:28  <ryah>in another terminal did node debug -p $PID
06:08:16  <indutny>strange....
06:08:30  <indutny>running ./node -e 'setInterval(function(){}, 1000)'
06:08:32  <indutny>seems to be working
06:08:55  <ryah>it's not listening for SIGUSR1
06:08:55  <ryah>% ./node --debug benchmark/http_simple.js
06:08:55  <ryah>debugger listening on port 5858pid 45329
06:08:55  <ryah>Listening at
06:08:56  <ryah>zsh: user-defined signal 1 ./node --debug benchmark/http_simple.js
06:09:05  <piscisaureus_>man
06:09:21  <piscisaureus_>how can tim pull 20K r/s with lua?
06:09:23  <indutny>yep
06:09:39  <indutny>omg
06:09:48  <indutny>it's a black magic
06:09:56  <indutny>piscisaureus_: luajit?
06:10:01  <indutny>piscisaureus_: or just lua?
06:10:05  <ryah>piscisaureus_: i think its our boundary crossing....
06:10:17  <ryah>well also the string copying...
06:10:24  <ryah>he can send strings directly to the kernel
06:10:42  <piscisaureus_>meh
06:10:51  <piscisaureus_>I am in the wrong project :-p
06:11:02  <piscisaureus_>although it is kinda nice that uv works that well :-)
06:11:20  <piscisaureus_>But I am still surprised, his machine must be like super fast
06:11:36  <piscisaureus_>I mean, how many r/s do you get when you run 1 uv http server
06:11:48  <piscisaureus_>I don't get 20K r/s...
06:11:50  <indutny>ryah: it's receiving signal
06:12:15  <ryah>-1- ryan@mac1234:~/projects/node% ./node debug localhost:5858
06:12:15  <ryah>connecting... ok
06:12:15  <ryah>debug> bt
06:12:15  <ryah>There was an internal error in Node's debugger. Please report this bug.
06:12:15  <ryah>Cannot read property 'length' of undefined
06:12:18  <ryah>TypeError: Cannot read property 'length' of undefined at _debugger.js:591:37 at _debugger.js:392:13 at Client._onResponse (_debugger.js:241:5) at Protocol.onResponse (native) at Protocol.execute (_debugger.js:124:14) at Client.<anonymous> (_debugger.js:163:14) at Client.emit (events.js:67:17) at TCP.onread (net_uv.js:297:31)
06:12:28  <indutny>hehe
06:12:30  <indutny>nice
06:12:38  <indutny>a lot of work coming here
06:13:11  <indutny>oh, it's not handling errors
06:15:51  * piscisaureus_quit (Read error: Connection reset by peer)
06:17:22  <indutny>ryah: strange, http_simple is not invoking DebugEventListener
07:29:41  <indutny>ryah: yt?
07:30:01  <indutny>I fixed that issue with benchmark
09:45:04  * mralephjoined
14:51:51  * indexzerojoined
15:20:06  * bnoordhuisjoined
15:20:32  * ericktjoined
15:38:04  * mralephquit (Read error: Connection reset by peer)
15:38:10  * mralephjoined
15:55:54  * piscisaureusjoined
16:02:58  <piscisaureus>bnoordhuis: did bjorn reply?
16:03:06  <bnoordhuis>piscisaureus: no
16:03:24  <piscisaureus>I'll just add a reservation through the site. I'll add you too :-)
16:03:32  <bnoordhuis>good idea :)
16:03:58  <piscisaureus>ok, done
16:19:28  <indutny>ryah: yt?
16:23:45  <bnoordhuis>piscisaureus: https://github.com/joyent/node/commit/aebf2d8
16:25:07  <piscisaureus>bnoordhuis: ~~ already coerces NaN to 0 or?
16:25:19  <piscisaureus>I mean, try ~~Number.NaN or ~~+"foo"
16:26:06  <bnoordhuis>yes
16:26:09  <piscisaureus>but yes, lgtm
16:26:27  <bnoordhuis>you mean: why ~~Math.ceil(+length)?
16:26:31  <piscisaureus>bnoordhuis: oh hmm
16:26:33  <piscisaureus>sorry
16:26:38  <piscisaureus>that's exactly what you do :-)
16:26:46  <bnoordhuis>heh
16:26:49  <bnoordhuis>okay, merging
16:27:18  <bnoordhuis>let's see how much this breaks
16:27:28  <CIA-53>node: Ben Noordhuis master * rd157131 / (lib/buffer.js test/simple/test-buffer.js):
16:27:28  <CIA-53>node: buffers: handle bad length argument in constructor
16:27:28  <CIA-53>node: Coerce fractional, negative and non-numeric length arguments to numbers.
16:27:28  <CIA-53>node: Fractional numbers are rounded up, negative numbers and non-numeric values
16:27:28  <CIA-53>node: are set to zero. - http://git.io/IH5Ycw
16:27:46  <piscisaureus>bnoordhuis: if this breaks your code You Are Doing It Wrong
16:28:04  <bnoordhuis>yes, but that's never stopped anyone from complaining before
16:29:01  <piscisaureus>Joyent should open a node complaints line with the int'l version of a 0900 number
16:29:08  <piscisaureus>that's gonna make them serious money :-)
16:29:21  <bnoordhuis>i'm going to forward that to eric
16:29:39  <piscisaureus>bnoordhuis: there's no thest for length = Number.POSITIVE_INFINITY
16:29:52  <piscisaureus>But I guess ~~ will iron that out nicely as well
16:30:20  <bnoordhuis>yes, ~~Number.POSITIVE_INFINITY == 0
16:30:39  <bnoordhuis>but it won't hurt to add it
16:30:57  <piscisaureus>bnoordhuis: no, this is fine :-)
16:31:04  <piscisaureus>don't touch it
16:31:18  * bnoordhuisstops touching... it
16:31:19  <piscisaureus>It's really a weird edge case
16:32:45  <CIA-53>node: Ben Noordhuis v0.4 * rf6bce20 / (lib/buffer.js test/simple/test-buffer.js):
16:32:45  <CIA-53>node: buffers: handle bad length argument in constructor
16:32:45  <CIA-53>node: Coerce fractional, negative and non-numeric length arguments to numbers.
16:32:45  <CIA-53>node: Fractional numbers are rounded up, negative numbers and non-numeric values
16:32:45  <CIA-53>node: are set to zero. - http://git.io/h5UaMQ
16:33:10  <piscisaureus>Actually I like the ~~+v trick to coerce to an integer
16:33:26  <piscisaureus>It's very safe
16:33:39  <piscisaureus>But it looks so weird...
16:33:45  <bnoordhuis>that it does
16:33:49  * ericktquit (Quit: erickt)
17:30:56  * phodejoined
17:30:56  <phode>[phode] bnoordhuis pushed 2 new commits to master: http://git.io/xCv5dw
17:30:56  <phode>[phode/master] uv: upgrade to 8f617b9 - Ben Noordhuis
17:30:56  <phode>[phode/master] add README - Ben Noordhuis
17:30:56  * phodepart
18:00:06  <piscisaureus>bnoordhuis: wow! you made it segfault.
18:20:50  * indexzeroquit (Quit: indexzero)
19:03:52  <piscisaureus>ok. question - under linux what happens if you write() a string that ends with a partial utf8 character to a tty, and then write the final bytes belonging to that character in the next write call?
19:36:52  * brsonjoined
19:42:52  * isaacsjoined
19:42:59  * isaacsquit (Client Quit)
20:41:33  <bnoordhuis>piscisaureus: i think that in, in theory, depends on a number of things
20:42:20  <bnoordhuis>but in practice you'll get that 'invalid character' symbol
20:52:44  <piscisaureus>bnoordhuis: another question - does a linux terminal track color mode on a per-fd basis or a per-terminal basis?
20:53:12  <bnoordhuis>piscisaureus: err... what do you mean by 'per-fd'?
20:53:25  <bnoordhuis>i think the answer is 'per terminal'
20:53:33  <piscisaureus>ok
20:54:29  <piscisaureus>bnoordhuis: I mean
20:54:29  <piscisaureus>write(1, "\u033[32mHi!\n", ...);
20:54:29  <piscisaureus>write(2, "fubar\n", 6);
20:54:29  <piscisaureus>^-- fubar printed in green?
20:54:45  <bnoordhuis>oh like that
20:54:45  <bnoordhuis>yes
20:57:38  * brsonquit (Ping timeout: 260 seconds)
21:30:40  <bnoordhuis>http://www.huffingtonpost.com/2011/07/07/the-craziest-couture-show_n_892501.html <- my ex made it to the huffington post...
21:58:33  <piscisaureus>ew... creepy
22:09:34  * indexzerojoined
22:19:11  <CIA-53>libuv: Ben Noordhuis c-ares * r94dbbee / (45 files in 10 dirs): c-ares: upgrade to 1.7.5 - http://git.io/k8DXfg
22:19:12  <CIA-53>libuv: Ben Noordhuis c-ares * r6eb32aa / src/uv-common.c :
22:19:12  <CIA-53>libuv: common: fix includes
22:19:12  <CIA-53>libuv: Don't rely on c-ares to pull in the headers for inet_addr, net_pton and
22:19:12  <CIA-53>libuv: inet_ntop. c-ares 1.7.4 did but 1.7.5 does not. - http://git.io/Xwiaug
22:19:28  * brsonjoined
22:24:44  <CIA-53>node: Eric Lovett v0.4 * rf9fec3a / lib/net.js : net: callback to socket.write should always be called asynchronously - http://git.io/fsGnqA
23:08:06  * indexzeroquit (Quit: indexzero)