00:00:39  <ryah>[24:14|% 100|+ 633|- 5]: Done
00:00:44  <ryah>^-- linux. ben, good job.
00:03:18  * sh1mmer_joined
00:03:29  <ryah>indutny: you there?
00:04:52  * sh1mmerquit (Ping timeout: 255 seconds)
00:04:52  * sh1mmer_changed nick to sh1mmer
00:07:21  <isaacs>igorzi_: you fixed that readdir issue?
00:07:33  <isaacs>oh, i see, you commented, nvm
00:07:39  <isaacs>just saw https://github.com/joyent/node/issues/2075
00:10:47  <igorzi_>isaacs: yep.. lmk if you still see issues with readdir
00:10:55  <isaacs>igorzi_: thanks!
00:31:21  <dap>hey ryah, have you heard from any of the V8 guys about the postmortem stuff?
00:36:39  <ryah>dap, nope im going to write them now
00:44:30  <dap>cool
00:52:27  * AvianFluquit (Quit: Leaving)
01:02:19  * mralephjoined
01:35:55  <ryah>mraleph: the problem with coroutines, if you dont mind me saying
01:36:20  <ryah>mraleph: is that state changes arbitrarally across any function call
01:37:46  * creationixquit (Ping timeout: 258 seconds)
01:38:28  <mraleph>well
01:38:38  <mraleph>if you have a callback
01:38:59  <mraleph>and you call something from your callback state can also change in strange ways.
01:40:39  <mraleph>with callbacks it's even more interesting… if you write foo(function () { … }) you don't even know when the function will be invoked… is it going to happen now? it is going to happen later? will try catch catch something, will it not? etc-etc-etc.
01:41:17  <mraleph>so I don't really believe that callbacks make anything much easier to reason about. they are not restricted or isolated in any way (and so are coroutines)
01:42:52  <rmustacc>How many threads of operation are in each model that you're describing?
01:47:46  <mraleph>1
01:48:06  <mraleph>well that depends what do you mean by thread.
01:48:39  <rmustacc>Let's just say this is Javascript. How many threads would be concurrently executing Javascript?
01:48:39  <mraleph>I would say: there is a single thing running simultaneously in both models.
01:48:52  <rmustacc>Okay.
01:50:02  <ryah>mraleph: callbacks make it clear to the user that state can change arbitrarally
01:50:14  <ryah>mraleph: the problem is that coroutines do not make it clear
01:50:21  <ryah>the user cannot make mental assumptions
01:51:15  <ryah>rmustacc: one os thread, many call stacks
01:51:45  <mraleph>I don't get it. what's the difference between code: function foo() { bar(); baz(); } in two models of computation? users has to go and look at what bar() and baz() do to reason about the code in both cases.
01:52:51  <ryah>if you allow coroutines any function call can yield - allowing state to change by the time it returns
01:52:55  <ryah>that cannot happen in node
01:53:43  <ryah>well obviously a fucntion can change the state of a program itself - but with coroutines undetermined state changes happen
01:54:17  <ryah>in node if i call somemodule.somefunction()
01:54:25  <ryah>i know that only somemodule.somefunction is going to run
01:54:33  <ryah>by the time it returns
01:54:35  <mraleph>exactly, that's my point: function can chage the state -> so to determine what function changes you have to go and look
01:54:50  <mraleph>at that function and everything that it calls.
01:54:52  <ryah>yes
01:55:00  <ryah>not true in coroutines
01:55:08  <ryah>anything can run
01:55:22  <mraleph>now when you see yield you just assume that it changes anything.
01:55:30  <mraleph>and you are done.
01:55:50  <ryah>if you're forced to push the yield all the way out
01:55:54  * brsonquit (Quit: leaving)
01:56:18  <ryah>how is it done in lua?
01:56:48  <ryah>can i wrap a function which calls yield and call it without using yield?
01:57:29  <mraleph>function cbstyle() { bar(); nextTick(function() { baz(); }); } vs function corostyle() { bar(); yield(); baz(); } <- in both cases you have to assume that baz() executes in completely unknown environment… and you can only rely on locals….
01:57:34  <mraleph>ryah what do you mean?
01:58:04  <ryah>cbstyle(); /* here i know my state */
01:58:18  <ryah>corostyle(); /* here i have no idea */
01:58:54  <mraleph>yes that is true.
01:59:10  <ryah>knowing the state is important...
01:59:12  <mraleph>but you know your state only if you go and look inside cbstyle
01:59:19  <mraleph>deeeeep inside
01:59:22  <ryah>sure
01:59:38  <ryah>im calling a function i trust that it does what it says
01:59:40  <ryah>that's fine
02:02:46  <ryah>We have to fight chaos, and the most effective way of doing that is to prevent its emergence.
02:03:02  <ryah>(Edsger Dijkstra)
02:03:08  <mraleph>the thing is that in coroutine style programming the place after call to corostyle() would be the same place that in callback style programming sits in callback that is passed into cbstyle()… so there would be no difference in knowledge about state.
02:03:42  <mraleph>[well there is no callback passes to cbstyle in my example, but usually there will be one or something].
02:03:45  <ryah>mraleph: in the nextTick you do not know your state, that's true
02:04:01  <ryah>but hopefully the syntatic difference from a function call makes it clear to the user
02:04:16  <mraleph>function cbstyle(next) { bar(); nextTick(function() { baz(next); }); }
02:04:49  <ryah>my point is in any arbitrary function call, once you allow coroutines, the user is potentially in the next tick
02:05:08  <ryah>it's nice to know when you've shifted time
02:05:29  <ryah>this is not something to abstract away
02:08:33  <ryah>mraleph: do you think you guys can have a call next week?
02:09:56  <mraleph>I see what you mean but I consider assumption that any call is a potential yield to be a worthy tradeoff for a linear representation of the program.
02:10:00  <mraleph>call?
02:10:34  <dap>ryah: code explicitness++ :)
02:10:40  <dap>mraleph: did you see my mail to v8-users?
02:10:53  <mraleph>dap: yes :-)
02:11:00  <dap>any thoughts?
02:11:05  <mraleph>dap:but I don't know what to say :-)
02:11:28  <ryah>mraleph: call regarding how to export the various offsets and stuff that dap needs for his dtrace/mdb work
02:11:38  <ryah>mraleph: i just sent you and erik an email
02:12:05  <mraleph>dap: I understand why it's needed for postmortem stuff but it looks a bit ugly I must admit.
02:12:53  <dap>Believe me, I don't disagree. I'm open to other solutions. That was the least invasive thing I could come up with. I was hoping to minimize the maintenance burden.
02:14:16  <mraleph>I will try to think about it.
02:16:15  <dap>mraleph: that would be great. FWIW, today I was able to print out fast object properties:
02:16:21  <dap>https://skitch.com/dapsays/gebm2/jsobj-2
02:16:38  <mraleph>\o/
02:16:52  <dap>that allowed us to reproduce from this core file a nasty bug we've only seen twice, both times in production, but which has brought down one of our services in production both times.
02:17:41  <mraleph>nice
02:18:42  <dap>needless to say, we're pretty excited about this :)
02:18:56  <indutny>ryah: yep
02:19:02  <indutny>just woke up
02:19:15  <dap>of course, the mechanism doesn't matter as long as we can solve this problem.
02:19:16  <mraleph>indutny: did you try revert?
02:19:30  <indutny>mraleph: sorry, not yet
02:19:55  <isaacs>mraleph: hey!
02:20:00  <isaacs>you'er that guy from twitter!
02:20:02  <isaacs>:)
02:20:54  <indutny>lol :D
02:20:59  <indutny>isaacs: same about you
02:21:27  <dap>ryah, mraleph: got to run. looking forward to discussing this next week! :)
02:21:31  * dapquit (Quit: Leaving.)
02:21:36  <mraleph>isaacs: :-) but you are not… that guy is 2 letters shorter.
02:21:46  <mraleph>3 letters
02:21:47  <isaacs>mraleph: @isaacs is a musician in LA
02:21:58  <isaacs>mraleph: i've offered him cash for his twitter name and he ignores me.
02:22:05  <isaacs>he tweets once every 6 months to keep his account active.
02:22:07  <isaacs>total dick.
02:22:33  <ryah>indutny: i was wondering if you were interested in reviewing this code: https://github.com/joyent/node/pull/2063
02:23:11  <indutny>ryah: wow, interesting
02:23:25  <indutny>brb
02:25:02  <ryah>it's pretty cool actually
02:31:33  <indutny>ryah: yes, but I need some time to review it
02:31:38  <indutny>sorry, gtg
02:31:41  <indutny>ttyl
02:33:04  * ericktquit (Quit: erickt)
02:53:43  * isaacsquit (Quit: isaacs)
03:10:47  * mralephquit (Quit: Leaving.)
04:07:25  * creationixjoined
04:14:06  * creationixquit (Ping timeout: 240 seconds)
04:21:08  * AvianFlujoined
04:53:25  * ericktjoined
06:07:53  * rmustaccpart
07:00:11  * ericktquit (Quit: erickt)
10:02:46  * sh1mmerquit (Quit: sh1mmer)
10:41:36  * bnoordhuisjoined
10:42:02  * mralephjoined
10:57:00  * mralephquit (Quit: Leaving.)
11:07:40  * mralephjoined
12:24:24  * mralephquit (Quit: Leaving.)
12:25:06  * mralephjoined
12:33:20  <CIA-95>node: Ben Noordhuis master * r098fef6 / (lib/timers.js test/simple/test-timers-zero-timeout.js):
12:33:20  <CIA-95>node: timers: remember extra setTimeout() arguments when timeout==0
12:33:20  <CIA-95>node: Fixes #2079. - http://git.io/q8tcPw
13:39:06  * creationixjoined
15:12:47  * ericktjoined
16:07:33  * creationixquit (Ping timeout: 258 seconds)
16:34:57  * isaacsjoined
16:50:21  * creationixjoined
17:09:42  * isaacsquit (Quit: isaacs)
17:35:02  * ericktquit (Quit: erickt)
18:26:01  <indutny>ryah: sorry, just got back
18:27:38  * mralephquit (Quit: Leaving.)
18:28:05  * mralephjoined
18:53:39  <bnoordhuis>indutny: don't worry, it's been a quiet day
18:55:19  <indutny>:)
18:55:22  <indutny>I see it by log
18:55:52  <indutny>anyway
18:55:54  <indutny>going to sleep
18:55:57  <indutny>ttyl
19:09:48  * isaacsjoined
19:25:08  * sh1mmerjoined
19:30:09  * sh1mmerquit (Quit: sh1mmer)
19:36:11  <CIA-95>node: seebees master * rb00f5e2 / test/simple/test-repl-tab-complete.js :
19:36:11  <CIA-95>node: Tab Compete test for node REPL
19:36:11  <CIA-95>node: Currently the REPL only tab completes for globally scoped variables - http://git.io/t2p8sg
19:36:12  <CIA-95>node: seebees master * r3421f43 / (3 files in 2 dirs): (log message trimmed)
19:36:12  <CIA-95>node: .load, .save and local scope tab completion
19:36:12  <CIA-95>node: Fixes #2063.
19:36:13  <CIA-95>node: REPLServer.prototype.resetContext:
19:36:13  <CIA-95>node: Reset the line cache
19:36:14  <CIA-95>node: REPLServer.prototype.memory (don't know if I like that name, called from finish)
19:36:14  <CIA-95>node: pushes what cmd's have been executed against it into this.lines
19:36:20  <ryah>indutny: thanks for the review
19:58:42  * creationixquit (Ping timeout: 256 seconds)
20:10:54  * bnoordhuisquit (Ping timeout: 240 seconds)
20:13:00  * bnoordhuisjoined
20:17:20  * isaacsquit (Quit: isaacs)
20:26:16  <ryah>bnoordhuis: next week we'll start on isolates
20:26:30  <ryah>i guess the openssl mutex stuff was already directed towards that
20:56:07  * isaacsjoined
21:24:47  * isaacsquit (Quit: isaacs)
21:30:51  <bnoordhuis>ryah: actually that mutex stuff fixed an existing bug :)
21:31:44  <bnoordhuis>do you have something of a plan / approach / idea on how to implement isolates?
21:33:30  * AvianFluquit (Ping timeout: 260 seconds)
21:37:04  <ryah>bnoordhuis: we should use clone(2) for uv_spawn if we're spawning ourselves
21:37:37  <ryah>bnoordhuis: not really.
21:37:52  <ryah>bnoordhuis: we need to make an object which represents a node instance
21:39:00  <ryah>then we need to have a NodeIsolate* node::Create();
21:39:58  <bnoordhuis>ryah: fork() and pthread_create() use clone() on linux
21:40:38  <bnoordhuis>you probably meant to say that we should pass more appropriate flags to clone
21:41:16  <bnoordhuis>are we going to stuff everything that's global now in the NodeIsolate?
21:42:43  <ryah>yeah
21:46:16  * sh1mmerjoined
21:47:02  * AvianFlujoined
21:58:05  * ericktjoined
22:00:19  * creationixjoined
22:21:18  * bnoordhuisquit (Ping timeout: 240 seconds)
22:50:25  <mraleph>isolates, interesting :-)
22:55:43  * creationixquit (Remote host closed the connection)
22:56:36  <piscisaureus>ryah> did you see the isolates patch that someone did for an android port_
23:00:14  <piscisaureus>https://github.com/paddybyers/node/issues/16
23:06:06  * paddybyersjoined
23:11:45  * ericktquit (Quit: erickt)
23:11:52  <ryah>yes
23:12:18  <ryah>i've been waiting until v0.6.1 to start doing this stuff