[05:12] ubuntulog test [08:32] rog: morning [08:32] TheMue: hiya! [08:32] TheMue: feeling better, i hope [08:33] rog: yep, yesterday already almost through with it, today feeling fine. thx. [08:33] TheMue: cool [08:33] TheMue: glad to hear it! [08:34] rog: already proposed the next charm changes also containing your _ wishes. ;) [08:34] TheMue: thanks [08:34] TheMue: saw that [08:35] rog: my pleasure [08:35] rog: btw, got another 'infect'. [08:36] TheMue: infect? [08:36] rog: during studies i've learned scheme, but now i' trying lisp. ;) [08:36] ah. CL? [08:36] SBCL is the one to use [08:36] baroque but interesting with it [08:37] rog: yep, choosen sbcl as a start. [08:37] TheMue: the hyperspec is the invaluable reference - i used it all the time [08:38] rog: and i want to play a bit with actors in lisp, found some docs and a lib. [08:38] TheMue: for your amusement, here was a little library i did in CL some time back: http://common-lisp.net/project/cl-xmlspam/ [08:38] rog: ah [08:39] TheMue: i ported russ's [08:39] oops [08:39] i ported russ's C channel communications code to CL too. [08:39] TheMue: never entirely satisfactory - it really needs lightweight threads, like Go. [08:41] rog: i'll see if i can do something like actors running based on thread pools [08:41] TheMue: so no first-class channels - sending messages to processes like in erlang? [08:42] wrtp: yep, more like that [08:42] wrtp: and like scala [08:42] TheMue: right. [08:43] TheMue: (i haven't looked at scala much) [08:43] wrtp: i only for a short article i wrote more than a year ago, not very deep [08:44] TheMue: the book to buy for getting into CL is "Practical Common Lisp", if you haven't already got it. [08:44] wrtp: i dislike all those langs based on the jvm, they tend to be too weak due to the (wished) interaction with the java libs. [08:44] TheMue: it's great. and doesn't try to hide the dubious bits [08:45] TheMue: yeah. same with .net languages [08:45] TheMue: i played with F# for a bit [08:45] wrtp: full ack [08:46] wrtp: i got "Land Of Lisp" for a review. but if the infect gets deeper i'll buy your book. ;) [08:46] wrtp: i only read about f#, but it looked interesting too [08:47] wrtp: and i still like erlang (used it for two years). [08:47] TheMue: it's a classic. and extremely useful for finding out how to get around the bizarre file path handling for example [08:48] wrtp: so, have to leave for a few minutes, banking. biab [08:49] TheMue: c u [09:34] something odd is going on with this machine: http://paste.ubuntu.com/853732/ [09:57] back again [11:01] TheMue: are you seeing codereview.com being slow currently? [11:02] wrtp: no, today they have been fine. but had the too last week. [11:18] * wrtp really doesn't like it when he makes lots of changes in response to a review... and then finds out they were made in the wrong branch. [11:25] yo! [11:26] niemeyer: yoyo! [11:26] niemeyer: responses made to both reviews, BTW. [11:27] i hope you don't mind, i went for "k" rather than "pk" :-) [11:28] wrtp: Thanks! [11:28] wrtp: That's fine too [11:28] cool [11:28] wrtp: Was just trying to make them consistent and distinct among themselves [11:28] niemeyer: yeah, thought so. [11:28] niemeyer: i like permKey BTW [11:29] wrtp: Sweet [11:55] niemeyer: Already took a first look into https://codereview.appspot.com/5671055/? [11:55] niemeyer: hiya btw [11:55] TheMue: Heya! [11:56] TheMue: Not yet, but you're my first priority today.. I'll just finish a meeting with Dave Cheney, and will be in your reviews [11:56] niemeyer: great, thx [12:02] niemeyer: just for info, weekly update leeds to zookeeper compiling troubles [12:02] oh, wife calls for lunchtime [12:02] biab [12:04] TheMue: The fix is already up for review [12:04] TheMue: and you'll have to upgrade to Go tip as well [12:04] TheMue: There's a bug in cgo itself that I fixed yesterday [12:29] niemeyer: ok, thix, will switch to tip [12:37] TheMue: actualy the fix is in weekly [12:37] TheMue: (the newest weekly) [12:38] wrtp: so tip should contin it too, shouldn't it? [12:38] TheMue: sure. but i think we generally use weekly if it works. [12:39] wrtp: hmm, if i recall it right, somebody named rog told me we use tip. [12:39] wrtp: ;) [12:40] TheMue: only occasionally, when things are broken with weekly :-) [12:41] TheMue: ...as was the case on that previous occasion [12:42] wrtp: thankfully an update-golang release|weekly|tip is enough for a full reinstall including the external packages [12:43] TheMue: yeah, the go tool makes things much much easier. bliss. [12:43] TheMue: i usually run all.bash though just in case the compilers have changed [12:46] wrtp: me too, but it's inside the script above, together with the go get's [12:47] TheMue: ah, it's your script. i though you just meant "hg update weekly" [12:47] TheMue: (which does work usually in fact) [12:47] s/though/thought/ [12:47] wrtp: no, the script does the hg update, the all.bash and some clean go get [12:48] wrtp: i'm lazy, ol' admin. ;) [12:49] wrtp: doing something more than two, three times needs automation [12:49] TheMue: what's the go get for? [12:49] TheMue: to update to the required package versions? [12:50] wrtp: yep, I earlier had troubles that once fatched code is only recompiled, not fetched again after release changes [12:51] TheMue: yeah, i can see that. i don't usually have that problem though - i'll do get -u when a package stops working :-) [12:51] wrtp: is a go build of own sources now intelligent enough to do a go get on 3rd party packages? [12:51] TheMue: ... which makes it faster to switch versions. [12:52] TheMue: a "go get -u" you mean? [12:52] wrtp: yep, my script does a go get -u too [12:52] TheMue: i don't think it's possible for it to know if the appropriate version has changed. [12:53] TheMue: (of a given package, with respect to the current Go version, i mean) [12:53] wrtp: would be nice. "hey, i'm building with rel 1 and import 3rd party pkg a. let's check if it has the according rel, otherwise update it on the fly." [12:54] TheMue: i think if you do 'go get -u .' it should work [12:54] lunchtime [12:54] wrtp: yeah, it does, but you have to do it manually. [12:55] wrtp: inside of a go build it would be nice [12:55] wrtp: enjoy [13:47] Okay [13:47] TheMue: So, let me see your branch [13:47] * niemeyer browses the review list [14:57] fwereade_: thx for the review, the other branch with your comment is in https://codereview.appspot.com/5690051/ [14:57] TheMue, thanks; but I'm not clear which order they're meant to be merged in [14:58] TheMue, I'm sure I could figure it out but I'm lazy -- it would be good to set prereqs even if we don't yet get nice diffs out of it [14:58] fwereade_: while point 1 is related to the testing dir question what exact problem do you have with .. in path? [14:58] TheMue, just that I'm suspicious that things will move :p [14:58] fwereade_: yeah, understand, would be nice if the order/dependency could be seen easily [15:01] TheMue: Review sent [15:01] niemeyer: thx for review. you get a compiling error? which kind? [15:01] TheMue: I don't think I said that [15:01] niemeyer: ok, than i misinterpreted a comment [15:02] niemeyer: so the state.Charm should implement the charm.Charm interface? [15:03] TheMue: Yes, and I think it already does [15:03] niemeyer: hehe, maybe by accident [15:04] niemeyer: it's the first time in state we're implementing an external interface, so i wondered [15:04] TheMue: Yeah, that's fine.. charm is kind of special in that we have several implementations of the interface [15:05] We have another one in the store as well [15:05] So 4 implementations right now [15:05] * TheMue likes interfaces [15:05] TheMue: I like _Go_ interfaces.. specifically.. :-) [15:06] I've had not-so-great experiences before with other kinds of interfaces [15:08] Zope interfaces comes to mind, for instance.. [15:09] niemeyer: never played with zope [15:11] I'll head to lunch, biab [15:15] network has been playing up all day [15:30] fwereade_: you gotta review [15:30] rogpeppe, tyvm [15:31] fwereade_: you might not when you see all the comments! [15:31] fwereade_: looking good though, in general [15:32] rogpeppe, heh, lots of comments beat just one saying "utterly hopeless; rejected, and shame on you" or equivalent :p [15:32] fwereade_: lol [15:37] right, i'm gonna reboot. [15:45] well, ubuntu boot is quick, but shutdown... [15:52] rog, just a thought... if pstate were called pinfo, would you be happier about keeping path in there? [15:52] fwereade_: i don't see why you want path in there really. it just saves a parameter in two functions. [15:53] fwereade_: i'd be happier with a watcher type to gather together more params - i think things would look cleaner then. [15:53] rog, I admit that I originally put it in there because I was getting annoyed about the number of params ;) [15:54] rog, I'll experiment a bit [15:55] fwereade_: if you pass watcher by value, you won't even need to incur an allocation - it'll be exactly to equivalent to passing the values as arguments. [16:06] rog, the tyvm holds, nice review [16:06] rog, I'm not so sure about the loop/goroutine question though [16:06] fwereade_: no? [16:07] fwereade_: i don't see why you need to start a new goroutine each time through [16:08] rog, forces are that (1) there are far more cases in which I want to break out of the loop than to continue looping, and (2) it seems to me that if I just recurse I'll eventually use an impolite amount of stack [16:09] rog, (1) hence not-quite-right as a loop, (2) hence goroutine [16:11] rog, sane or crackful? :p [16:12] fwereade_: one mo, i'll paste the kind of thing i'm thinking of [16:12] fwereade_: http://paste.ubuntu.com/854172/ [16:14] rog, that's basically what I had before I decided the loop was ugly (without the break loop, which doesn't feel to me like it really improves clarity) [16:15] fwereade_: yeah, it looks better without the loop label: http://paste.ubuntu.com/854177/ [16:16] fwereade_: but i think the loop is good - you're wanting to loop, so why not use one? [16:16] rog, hm, with for p.alive, that's definitely nicer [16:17] fwereade_: oops, needs a p.alive=false in the DELETED case [16:17] rog, details details :) [16:17] :-) [16:17] rog, what about awaitAlive though? the looping is definitely exceptional in that case [16:17] * rog has a look [16:19] rog, hm, still, for consistency's sake I might change that one anyway [16:19] fwereade_: i think you can use exactly the same structure to good effect: http://paste.ubuntu.com/854183/ [16:20] fwereade_: they're both less lines of code, easier to read (IMHO) and more efficient... what's not to like? :-) [16:22] rog, yeah, exactly, with the loop conditions they are much nicer [16:22] rog, thanks :) [16:22] fwereade_: np. (writing this kind of code with channels is nice, ain't it?) [16:23] rog, yeah, I'm really enjoying it :) [16:23] fwereade_: good. that's what we want to hear :-) [16:24] fwereade_: the main issue that probably needs discussion is whether unoccupying a node should delete it. [16:24] rog, ah yeah, I meant to mention that [16:24] fwereade_: i'm tending towards the point of view that it shouldn't [16:24] rog, the raciness you sadly note has nothing to do with node clearing [16:25] rog, I don;t think it's sensible to assume that a presence node we want to watch will automatically exist [16:25] fwereade_: if you were guaranteed that node existed, then you could just do GetW - no need for the ExistW call [16:25] rog, who says the Pinger even got started? [16:25] fwereade_: i think the node should be created before the Pinger is started. [16:26] fwereade_: so when some structure is created, a node is created for the watch node. and then a pinger and a watcher can rendezvous on it. [16:26] rog, well, it is, first thing on pinger creation, before run (so we can get any errors out quickly and easily, if they're going to happen) [16:26] rog, but... doesn't this just shuffle the raciness around? [16:26] fwereade_: yeah, but there's no error if a watcher is watching a bad path [16:27] rog, who's responsible for creating that node? [16:27] fwereade_: i don't think so. [16:27] fwereade_: the state code. [16:28] fwereade_: so if you're an agent, you can do an ExistsW if you like to determine when some structure comes into place (same way we watch the init node), and then run a pinger or a watcher on a node within the structure [16:28] fwereade_: it's a slightly different approach i know, but i think it might make sense [16:29] fwereade_: one mo, i've got to go and help carmen turn over the contents of a compost bin. back in 5. [16:30] rog, np, thinking [16:30] fwereade_: Can't awaitDead and awaitAlive be a single loop? [16:31] fwereade_: I don't have anything concrete yet, but my gut feeling about all those helper functions is that the problem itself shouldn't be so complex [16:31] niemeyer, hm, maybe, rog's suggested changes might make me able to do that clearly [16:31] fwereade_: I may be on crack.. so don't bother too much.. I'll do a more careful review on the logic once you're happy with it [16:31] niemeyer, still worth a look [16:32] niemeyer, cheers [16:34] niemeyer, I'm not sure that'd work tbh -- the timeout in awaitDead wouldn't really play nicely with everything else [16:34] niemeyer, or maybe I just can't see it :) [16:34] fwereade_: How's that any different from the timeout on awaitAlive? [16:34] niemeyer, what timeout? [16:35] fwereade_: The same that exists on awaitDead.. why is there a timeout on one and not the other? [16:35] niemeyer, the timeout is ony useful for detecting the case when updates have stopped [16:35] fwereade_: Why? [16:35] fwereade_: This isn't rhetorical, btw.. you may be right.. I'm brainstorming. [16:36] niemeyer, there's no timeout on awaitAlive because we don't need to do anything weird to support getting back a create/change at somepoint in the future [16:36] niemeyer, there's a timeout on awaitDead because that's the only way I could see to tell when a watch *hasn't* fired [16:36] fwereade_: How do I wait for an agent to come live? [16:37] niemeyer, ...call AliveW and wait for the channel to fire if it wasn't already alive? [16:38] fwereade_: Ok, sorry, I misunderstood what you meant by timeout then [16:38] niemeyer, ah, sorry :) [16:38] back [16:39] niemeyer: i'm thinking that all the logic becomes simpler if we assume that the node exists before starting. [16:40] niemeyer: so rather than deleting the node at the end, we'd just set it to empty [16:40] rog: How can we assume it exists? [16:40] rog, even if we did, who would delete the node in the end? [16:41] niemeyer, fwereade_: the node doesn't exist in isolation, surely? it's part of a larger zk structure that represents something, no? [16:41] rog: Sorry, I'm out of context and don't know what you're trying to say [16:41] rog: The node is within zookeeper.. it's not part of any structure [16:42] niemeyer: i'm talking about a directory structure within zk [16:42] rog, I can see how it could work for machine nodes, but making it work for unit relation nodes is giving me a headache [16:42] rog: The node is within zookeeper.. it's not part of anything else, as far as the presence package is concerned [16:42] rog, and besides, I'd far prefer to make foo responsible for communicating foo's status without anyone else's help [16:42] fwereade_: It shouldn't make a difference [16:43] niemeyer: that's fine. i'm just thinking that the initial waiting for the node to come into being can be done outside the presence package. [16:43] niemeyer, it's not creation that makes my head hurt so much as it is deletion [16:43] fwereade_: The presence node is context-less.. the package needs to know a path where it's supposed to exist, and it can assume that the parent exists, but nothing else. [16:43] fwereade_: What's the issue with creation? [16:43] niemeyer, there isn't one [16:44] fwereade_: There isn't one what? [16:44] niemeyer, an issue with creation [16:44] niemeyer, it's not creation that makes my head hurt so much as it is deletion [16:44] fwereade_: Ah, I inverted the sentence [16:44] fwereade_: why's deletion an issue? deletion would mean the node becomes dead as now. [16:44] fwereade_: You mean deletion is the problem.. what's the issue with deletion? [16:45] fwereade_: (for instance when the containing directory and its children is deleted) [16:45] rog, niemeyer: who is responsible for it, and how do they arrange it with the unit agent, which may be behind schedule and have a bunch of other hook queued up before it can actually process a departure [16:46] fwereade_: responsible for what? [16:46] rog, deleting the node [16:46] rog, I presume we don't want to keep nodes around forever just because something once used it [16:47] fwereade_: the caller of the presence package. the idea is that responsibility for the node's creation and deletion is up to the caller. [16:47] fwereade_: the presence package would purely manage pings on an existing node. [16:47] fwereade_: i may be smoking more crack than usual, of course. [16:47] fwereade_: You only have to worry about it in the sane cases.. e.g. if Kill() is called [16:47] fwereade_: If there's a hard crash and the agent dies, there will be a bunch of trash around those nodes that has to be collected [16:48] fwereade_: The original code is obviously unable to do with it, since it may have gone forever [16:49] rog: The presence package should delete the node in the case where the call site is requesting the pinger to die in a way that notifies watchers [16:49] niemeyer, ok, unstated assumption: without a good reason, the same thing should handle creation and deletion. sane? [16:49] fwereade_: yes [16:49] niemeyer: i've got no prob dropping readCharm() and let Service use State directly. but in this case to keep it consistent i would like to change all entities from getting the ZK conn from state now to getting the State itself. [16:49] niemeyer: i'd just set the contents to empty to do that [16:50] rog: No reason, I believe.. removal is a pretty good way to flag it [16:50] niemeyer: rather than deleting the node. [16:50] niemeyer: so i would change it in Machine, Unit and the now comming new ones too [16:50] rog, ok, but you're saying that (1) *something* unstated should create the node in the first place, and that other *something* should delete it at the end, and we shouldn't have a Kill (or at least not one that deletes the node) [16:50] rog, what would that something be? [16:50] TheMue: Yes, that's a good idea, but please do it in a follow up tiny branch that does just that [16:50] TheMue: Rather than piling up the unrelated change [16:51] niemeyer: the nice thing about assuming that the node already exists is that you have some sanity check on whether it might ever change in the future, which we don't for a non-existent path. [16:51] niemeyer: ok, this will be only the first step with Charm [16:51] niemeyer: and Service ;) [16:51] rog: I don't understand what's the advantage. I agree with fwereade_. [16:52] rog: You seem to be saying that the nice thing about having someone else creating the node is that someone else has to do exactly the same logic that would otherwise be done inside the presence node, which to me makes no sense. [16:52] rog, yeah, niemeyer put it better than I managed [16:53] i think i'm saying that other things know how to wait for existence (and that can imply other things too), but the pinger is the place that does keepalives. [16:54] but i don't mind too much. it was just an idea. [16:55] rog: Still don't see what you mean.. the pinger is the thing that knows how to deal with a presence node to ping it, and that includes creation. [16:55] fwereade_: Btw, let's call StartPing as StartPinger os StartPinging.. StartPing feels weird [16:55] niemeyer: it *can* include creation, but i don't think it has to. [16:55] niemeyer: NewPinger seems ok to me... [16:55] rog: No, we can have a better interface as well and move things out of it [16:55] rog: and then we have a pinger that doesn't know how to ping. [16:56] fwereade_: Ok.. let's please have creation within the pinger.. there's no real argument that I can see to not do it. [16:56] fair enough [16:56] niemeyer, I'm happy with that :) [16:56] fwereade_: And StartPinger, please.. [16:57] niemeyer, possible convention counterargument: time.NewTimer, time.NewTicker [16:58] fwereade_: given that this is the presence package, i was just wondering if the "p" prefix is useful in pstate? just type state might be fine. and it makes the capitalisation less awkward. [16:58] fwereade_: Let's please use Start.. New lacks the idea that this is going to be alive doing something rather than just creating an object [16:59] niemeyer: NewTicker?? [16:59] rog: I didn't name this one [16:59] niemeyer, fair enough [16:59] niemeyer: it's seems a fine precedent to me, but there y'go. lots of New* functions create active things. [17:00] rog: I'm comfortable enough to improve existing conventions [17:00] hazmat, g+ mtg? [17:00] niemeyer: i really don't think that's a great improvement. it's easier to remember when things stick to existing conventions. [17:02] rog: Sorry, let's move on [17:02] rog, I'm about to poke at pstate with a view to possible removal anyway :) [17:02] do we have to use StartX for anything that invokes a goroutine? [17:02] sorry, i'll stop [17:02] rog: When the next case shows up, we'll talk. [17:03] jimbaker, sounds good [17:03] hazmat, cool, just invite jim.baker@canonical.com [17:03] hmm.. invites out [17:05] niemeyer, fwereade_, rog meeting time? [17:05] hazmat: Already joining [17:06] hazmat, noone here, I'll try again [17:29] total failure [17:30] niemeyer: i'm back online (on my apple, cos my laptop seems to have forgotten it can connect to a wireless network) and the hangout is full [17:30] niemeyer, fwereade_, TheMue: so i guess you can tell me what went on :-) [17:30] wrtp: Oops :( [17:31] niemeyer: i've no idea what's up with the laptop. it keeps on asking me for passwords (it should have them stored in the keyring) and doesn't connect anyway [17:31] niemeyer: it's been funny all day in fact. rebooting didn't help. [17:33] anyone got a handy hint for diagnosing ubuntu wireless connectivity problems? [17:34] you use network manager? [17:54] it seems to be working again, woo [18:02] * robbiew had to bail [18:09] niemeyer, fwiw.. no bugs i can see log of hooks/scheduler.py http://pastebin.ubuntu.com/854310/ [18:10] hazmat: http://paste.ubuntu.com/854315/ [18:10] 111 looks like a fix [18:11] 127 too [18:12] 157 too [18:12] niemeyer, what's that a log of? [18:12] hazmat: juju/hooks/ [18:13] niemeyer, that's quite a bit more than the scheduler we where speaking of [18:13] hazmat: If you touch just scheduler.py, you won't get anywhere close to cleaning things up in the way I was talking about [18:14] hazmat: scheduler.py is a very particular interface that only makes sense with everything else in there [18:14] 202 is a fix too [18:16] 286 also [18:17] 312, 315, and 451.. [18:18] Yeah.. all of that is a side effect of a new code base being polished.. change the code base significantly, and these may not show up again, but others will.. [18:22] right guys, i'm off now [18:22] see ya tomorrow! [18:23] rog: Have a good evening [18:23] niemeyer: and you [18:23] Cheers [18:23] niemeyer, its clear we where talking about two different things, risk from a change, vs rewriting an implementation [18:24] hazmat: risk from (...) rewriting an implementation [18:26] hazmat: This is a gut suggestion.. I wouldn't rewrite one of the trickiest parts of an application that is working two months before a release that is supposed to be rock solid [18:26] hazmat: Your take [18:26] back again [18:34] niemeyer, its not clear you have the context on the problem or the solution that's under consideration.. your just pointing out an entire package of code, saying its had so many fixes and its tricky, be careful and don't touch it, while your saying how a rewrite will simplify things. yes change is a risk for stability, and in some cases not fixing a bug is the right call, but this is a fairly straight small forward change... and the change as i exampled i [18:34] s to a part of the code that has been fine since day one... effectively its fixing a bug in a completely different package by adding a feature to the correct place. [18:35] hazmat: We're talking across each other indeed.. [18:35] hazmat: In the call, I pointed out what I'd like to do in Go, and you said it might be doable in Python too. I said it was a significant change for this point in time. That's what I'm talking about still. [18:36] hazmat: I'm not suggesting you don't fix a bug. [18:37] hazmat: In fact, I don't think I ever said anything close to "not fixing a bug is the right call". [18:37] In this context, of course.. in some cases it is the right call, surely. [18:42] niemeyer, yeah.. i'm not considering rewriting that package, just fixing the bug.. the only rewrite at this point that's worth considering is the relation ephermal node watches via a backport of the pinger [18:42] hazmat: Phew.. we agree, after all :) [19:32] niemeyer_: when can i expect the zookeeper fix? or is it just again a tag problem? [19:35] TheMue: Tip is fixing, and the branch just has to be merged [19:36] TheMue: I can do that right after the current meeting [19:36] niemeyer_: great, thx [20:10] TheMue: Submitting [20:10] niemeyer_: wonderful, appreciate it [20:16] TheMue: Done [20:29] I'm heading out for some exercising.. probably back later