/srv/irclogs.ubuntu.com/2012/04/24/#juju-dev.txt

wrtpfwereade: morning!07:46
fwereadewrtp, heyhey07:47
fwereadewrtp, how are you?07:47
wrtpfwereade: just got back from my bike ride; not raining this morning, yay!07:47
fwereadewrtp, nice07:48
wrtpfwereade: and my 82 year old ex-lorry-driver neighbour just told me that 12.04 is out on Thursday07:48
fwereadewrtp, awesome :D07:48
wrtpfwereade: (which i didn't actually know!)07:48
fwereadewrtp, better yet -- community in action ;p07:49
TheMuemorning08:25
fwereadeheya TheMue08:35
TheMueLunchtime ...10:53
wrtpfwereade: i've been thinking about SuperCommand etc11:10
fwereadewrtp, cool, go on11:10
wrtpfwereade: the fact that when SuperCommand parses itself again it misses the flags added by LoggingCommand seems like an indication of something wrong structurally.11:11
wrtpfwereade: and i *think* i have an idea for a way to fix it11:12
fwereadewrtp, cool, it's seemed likely that everyone else can see an obvious design that I've missed ;P11:12
wrtpfwereade: the underlying problem is, i think, that you're trying to use LoggingCommand to add functionality to SuperCommand, but it doesn't - it just embeds it as you know.11:13
fwereadewrtp, it seemed to me like a good and sane consequence of embedding over inheritance11:13
fwereadewrtp, yep11:13
wrtpfwereade: how about actually providing a hook for SuperCommand to do the flag parsing.11:13
wrtpfwereade: because SuperCommand doesn't have any flags itself, so why not let its user add them?11:13
* fwereade thinks11:14
wrtpfwereade: so it could have a SetInitFlagSet(func(*gnuflag.FlagSet)) method for example11:14
fwereadewrtp, I think it'd also need hooks for the other methods too though11:17
wrtpfwereade: or that function could be an argument to NewSuperCommand11:17
fwereadewrtp, we need to do something with them in Run()11:17
wrtpfwereade: which other methods?11:17
fwereadewrtp, Run and potentially ParsePositional-or-whatever-it-is could each want to do something with the flags on the logging type11:18
wrtpfwereade: ParsePositional sounds wrong, as it would never get any positional arguments11:19
fwereadewrtp, ParsePositional on supercommand always gets the subcommand as a positional arg11:19
fwereadewrtp, and all the subcmd's args as well because it doesn't intersperse11:20
fwereadewrtp, (incidentally I like `func Reduce(args []string) (Command, []string, error)`)11:21
fwereadewrtp, then for consistency's sake you'd want (bare) Parse to return the final command ready to Run11:21
fwereadewrtp, and that would actually always be the one originally passed in, but doesn't *have* to be11:22
wrtpoh the twisted heaps we create just so we can intermix global flags and command-specific flags11:24
wrtpfwereade: the thing is that having Reduce return a Command is *only* useful for the supercommand case AFAICS11:27
fwereadewrtp, sure, but that bothers the other commands not one bit11:28
wrtpfwereade: so rather than make that interface, which is used all over the place, more complex, why don't we make SuperCommand (which is a very small amount of code currently) slightly more complex instead?11:29
fwereadewrtp, and it has a nice fit with the actual problem it's solving -- it is intuitively sensible that the process of parsing a given command be identical whether or not it's actually a subcommand11:29
fwereadewrtp, it's used a certain amount; it amounts to writing ", nil" in a very few places11:30
wrtpfwereade: i'm looking at the code that was deleted from SuperCommand in this CL and thinking: why can't the Logging piece implement just that code11:30
wrtpfwereade: if you have that interface, it implies that a subcommand can itself return a subcommand11:31
fwereadewrtp, IMO this is less of a cognitive load than adding two separate hooks to SuperCommand for InitFlagSet and Run11:31
fwereadewrtp, well, actually, is there any reason it shouldn't?11:31
wrtpfwereade: well, your current code wouldn't work - you'd need a loop11:32
fwereadewrtp, like I suggest in the discussion already?11:32
wrtpfwereade: oh, i didn't see that!11:32
fwereadewrtp, ok it's a rubbish loop as I discovered when checking against reality but the core idea is there11:32
wrtpfwereade: ok, here's another idea: make NewSuperCommand take a Command as an argument11:33
wrtpfwereade: it will call Run but always with zero arguments11:33
fwereadewrtp, hmm, at least it concatenates all the hooks into one package ;p11:34
fwereadewrtp, I'm not sure that's intrinsically *better* than the loop idea... the fact that the loop works however many subcommands you have implies to me that it's well-suited to the problem11:35
wrtpfwereade: then you'd call NewSuperCommand(name, doc, &LoggingSetupCommand{})11:35
wrtpfwereade: to me it seems like overengineering. that's not the problem we're trying to solve.11:35
fwereadewrtp, yeah, but the set of Commands that can usefully go in there is limited11:35
fwereadewrtp, it's not the same thing as a Command, its fundamental nature is a set of hooks rather than a command11:36
wrtpfwereade: true. alternative: SuperCommand could define its own interface type to be used as an argument.11:37
fwereadewrtp, this is still fundamentally the hooks idea11:37
wrtpfwereade: indeed. but i think that's fundamentally what's going on. you want to "hook" the global flags into any arbitrary subcommand11:38
fwereadewrtp, and given that we have just one way in which we need to tweak SuperCommand11:38
fwereadewrtp, we end up reducing the code to precisely the original implementation11:38
fwereadewrtp, because SuperCommand checks some status and then does something in response in each of InitFlagSet and Run11:39
fwereadewrtp, and it's just that it's an implicit do-we-have-a-hook check instead of an explicit self.SetsLog check11:39
fwereadewrtp, with additional tomfoolery to set it all up11:39
fwereadewrtp, I don;t feel that's a win11:40
wrtpfwereade: i'm not sure11:40
fwereadewrtp, it may be more extensible in the future, but so is mine; they're both interestingly extensible in different ways and I don't think we currently have reason to prefer one over the other on that front11:41
wrtpfwereade: i think the hooks possibility makes it easy to add more global flags that aren't related to logging.11:41
fwereadewrtp, sure, that would be an awesome change at precisely the moment we actually have such a need11:41
wrtpfwereade: and i think that the "return a command" thing we will never ever use apart from in supercommand. it seems to me like we're spreading supercommand mess around.11:41
wrtpfwereade: for the record, this is the kind of thing i'm thinking of: http://paste.ubuntu.com/943945/11:43
wrtpfwereade: then all the ParsePositional stuff can remain exactly as it is now.11:44
wrtpfwereade: and the logging set up code is almost identical to now11:45
fwereadewrtp, ok, so that's still an extra type and extra setup work to do everything the original implementation did, in the same way, which I was asked to change11:46
wrtpfwereade: that's true. but at least the concerns are now separated. SuperCommand now has nothing to do with logging. and the logic is quite easy to follow, i think. (but then i would, wouldn't i? :-))11:46
fwereadewrtp, how does SuperCommand as separated out have anything to do with logging in the first place?11:47
wrtpfwereade: it doesn't, but it did, didn't it?11:48
wrtpsorry, i'm not sure what the question is11:48
wrtpfwereade: SuperCommand as you're proposing has nothing to do with logging, no.11:48
wrtpfwereade: but i'm not keen on the way that it makes all commands into recursive Command producers. i think that adds to cognitive load, when we can isolate it into SuperCommand.11:49
fwereadewrtp, I think that the right doc for Reduce could make it all very clear11:50
fwereadewrtp, in practice, returning 2 nils in a few places is not an especially painful cost11:51
wrtpfwereade: but there's always the question: why are *all* these commands returning Command when *none* of them apart from SuperCommand uses that functionality?11:51
wrtpfwereade: or will ever use that functionality...11:51
fwereadewrtp, can we keep the unknowable future off the table?11:52
wrtpfwereade: when i first read the SuperCommand code, i had to spend a little while, as i didn't find it easy to see what was going on. I now understand it (and I think it's nice for the problem being solved), but i really think that the whole recursive command thing belongs *there*, not in every command that's being implemented. the Command interface should map nicely to the command interface we want to implement IMHO.11:54
* fwereade is still thinking11:58
* wrtp is trying to work out if he's being unreasonable.11:59
* wrtp hopes not :-)12:00
=== wrtp is now known as rogpeppe
fwereadewrtp, I understand your concerns -- I think -- but they don't carry the same weight in my mind12:00
fwereaderogpeppe, ^^12:00
rogpeppe:-)12:01
fwereaderogpeppe, consider that (bare) Parse itself is only ever called with a SuperCommand in my proposal12:01
fwereaderogpeppe, there is, as there always was, a certain commingling of functionality12:01
rogpeppefwereade: which Parse are you referring to there?12:02
fwereaderogpeppe, the precise balance at a given point depends on the needs of the current codebase12:02
fwereaderogpeppe, cmd.Parse12:02
fwereaderogpeppe, it will surely become immediately apparent if the future needs of the codebase require that we rearrange the responsibilities of the cmd package12:04
rogpeppe[13:01] <fwereade> rogpeppe, consider that (bare) Parse itself is only ever called with a SuperCommand in my proposal12:04
rogpeppeisn't it called with a LoggingSuperCommand?12:04
fwereaderogpeppe, ha, ok, something that flawlessly impersonates a SuperCommand, if you must12:05
fwereaderogpeppe, but that definition only lends weight to my assertion that Parse, which is called with two distinct things that both expect this behaviour, is correct to accommodate their shared functionality12:06
rogpeppefwereade: not quite flawlessly... (given the recursive calling problem) :-)12:06
* fwereade concedes somewhat grudgingly12:06
fwereaderogpeppe, the trouble is still that, considering proposals [rog] and [original], [rog] does what [original] did, and adds a bunch of other stuff that's only used in one case; [original] failed to find favour, and I don't think that an implementation that does just the same thing, but with more boilerplate, is likely to fly12:08
niemeyerHello!12:08
fwereadeniemeyer, heyhey12:08
rogpeppeniemeyer: yo!12:08
niemeyerfwereade: While you're there, I don't understand why we need recursion at all :-)12:09
rogpeppe+1 !12:09
fwereadeniemeyer, rogpeppe: it is now a loop ;p12:09
niemeyerfwereade: Not even that!12:09
rogpeppefwereade: recursion via Y-combinator :-)12:10
niemeyerfwereade: more, err := scmd.Consume(args)12:10
niemeyerfwereade: ...12:10
fwereadeniemeyer: no, we need some sort of repeated parsing whatever we do12:10
niemeyerfwereade: subcmd := scmd.subcmds[name]12:10
niemeyerfwereade: subcmd.Consume(args)12:10
rogpeppeniemeyer: this is my current preferred proposal: http://paste.ubuntu.com/943945/12:10
niemeyerfwereade: This is a linear call.. supercommand calls subcommand..12:10
TheMueniemeyer: moin12:11
* niemeyer looks12:11
niemeyerTheMue: Heya12:11
fwereadeniemeyer, wait, so supercommand Consume calls subcmd Consume?12:11
niemeyerrogpeppe: That works too12:11
niemeyerfwereade: Yeah, that sounds fine in principle.. am I missing something?12:12
fwereadeniemeyer, well, subcommands can have flags, and cmd.Parse is already set up to deal with flags before passing the positional args on to Reduce/Consume/whatever-it-currently-is12:12
fwereadeniemeyer, duplicating that in SuperCommand would seem to be kinda rubbish12:13
rogpeppei like the current names. InitFlagSet, ParsePositional and Run work well for me.12:13
fwereadeniemeyer, rogpeppe: we have always had recursive Parse calls; they were disguised by being indirect, via ParsePositional, but it was always how it worked12:14
niemeyerfwereade: Sorry, I don't understand.. probably because I don't have the picture so clear in my head as you do12:14
rogpeppeas i said earlier, that's an interface that works well for commands, even if it isn't quite sufficient for SuperCommand.12:14
niemeyerfwereade: I know.. and as I mentioned in the review, I've always disliked that.. it's magical, and unnecessary, iMO12:14
niemeyerfwereade: The problem seems so simple.. I don't get why we need all this back and forth12:14
niemeyerfwereade: SuperCommand wraps a number of subcommands.. it gets called, handles what it must, and delegates the rest12:15
niemeyerfwereade: No recursion, no looping12:15
rogpeppeniemeyer: the fundamental difficulty is the mixing of global and sumcommand flags AFAICS12:15
rogpeppes/sumcom/subcom/12:15
fwereadeniemeyer, how many times do we call Parse on a FlagSet in the course of this?12:15
fwereadeniemeyer, twice! there are two parsing steps needed12:15
rogpeppeand we call InitFlagSet three times, right?12:16
niemeyerfwereade: Yep.. twice, exactly.. not more, not less12:16
fwereaderogpeppe, we may create a fresh FlagSet for usage output12:16
niemeyerfwereade: No need for recursion or looping in that case12:16
rogpeppetwice on the supercommand and once on the subcommand12:16
rogpeppefwereade: ah, makes sense12:16
fwereadeniemeyer, well, once *or* twice really, given that we expect Parse to work on anything that implements Command12:17
niemeyerfwereade: Parse should be completely unaware about any of that12:17
rogpeppefwereade: is there a particular reason we export cmd.Parse BTW? does anything outside of the cmd package actually use it?12:18
niemeyerfwereade: as should the interface of Command12:18
niemeyerfwereade: The only particularity is that a supercommand needs to call the subcommand.. that's all really12:18
niemeyerfwereade: The mechanisms out of the supercommand should not be aware of that12:18
fwereadeniemeyer, and mingle flaget flags12:18
rogpeppei'm all for mingling flagets12:19
niemeyerfwereade: ?12:19
fwereadeniemeyer, the client of Parse doesn't see a difference; AFAICT the point of difficulty is in the interface for Command itself, right?12:20
fwereadeniemeyer, sorry, misunderstood12:21
niemeyerfwereade: Maybe I should just try to code a sketch12:21
rogpeppefwereade: that's true for me, certainly. i think the interface for Command works well, and we're mangling it solely because of SuperCommand issues.12:21
fwereadeniemeyer, I was saying the SC needs both to select subcommands and reregister its own flags12:21
niemeyerfwereade: I'm unhappy about this:12:21
niemeyerfunc (c *SuperCommand) InitFlagSet(f *gnuflag.FlagSet) {12:21
niemeyer        if c.subcmd != nil {12:21
niemeyer                c.subcmd.InitFlagSet(f)12:21
niemeyerfwereade: This is all magical..12:22
niemeyerfwereade: It's called once, somewhere, and then twice, in a full moon12:22
niemeyerfwereade: Maybe it's set, or not.. and behaves in one way or the other..12:22
niemeyerfwereade: and most methods go like that..12:23
niemeyerfwereade:12:23
niemeyerfunc (c *SuperCommand) Info() *Info {12:23
niemeyer        var info *Info12:23
niemeyer        if c.subcmd != nil {12:23
fwereadeniemeyer, as I recall we discussed this in some detail and it seemed to be the right way to deal with the legacy interspersed-or-not flag ickiness12:23
niemeyerfwereade: My reaction to it, IIRC, is that it was a bit on the clever side and practical, even if it was hard to understand12:23
niemeyerfwereade: Things are now being extended into other directions that extend the cleverness through the interface of Command, Parse, documenting recursiveness in the interface itself, etc12:24
niemeyerfwereade: I'm getting lost12:24
niemeyerfwereade: I totally admit it's probably my small brain, but I'd love if we could make this straightforward somehow12:25
niemeyerfwereade: It sounds simple just from the description of what we need12:25
fwereadeniemeyer: the heart of it is in the requirement that we handle both "juju -v bootstrap" and "juju bootstrap -v"12:25
rogpeppe[13:24] <niemeyer> fwereade: Things are now being extended into other directions that extend the cleverness through the interface of Command, Parse, documenting recursiveness in the interface itself, etc12:26
rogpeppe+112:26
niemeyerfwereade: Ok, but that *sounds* (and I may be missing details for sure) simple..12:26
niemeyerfwereade: The supercommand is wrapping the subcommands.. it is in control of what happens12:27
niemeyerfwereade: It knows there are only two possible layers, and it has the second layer entirely at its will12:27
fwereadeniemeyer: to give you a bit of context on my thinking, would you read the comments on https://codereview.appspot.com/6107048/ and https://codereview.appspot.com/6100050/ please?12:28
niemeyerfwereade: I had read the first one before we started to talk.. checking the second12:30
niemeyerfwereade: Done12:33
fwereadeniemeyer, is anything I'm saying sounding any saner?12:33
niemeyerfwereade: Everything you say is sane.. I just believe the problem may be solved in a simpler way12:34
niemeyerfwereade: I'll give it a quick shot12:35
fwereadeniemeyer, before you do12:35
niemeyerfwereade: A hack, arguably, but hopefully it'll be helpful12:35
fwereadeniemeyer, you seemed to like rog's proposal12:35
niemeyerfwereade: I don't think it's necessary either12:36
fwereadeniemeyer, ok then :)12:36
niemeyerfwereade: Maybe it will be, though.. once we want to use supercommand with other globals12:37
niemeyerfwereade: But this is an aside.. the key point I'm making around non-recursiveness and non-looping is independent from it12:37
fwereadeniemeyer, I feel that's a touch speculative12:37
niemeyerfwereade: Sure, I've been speculating since we first talked about this, and I'm now trying to stop speculating to show some code :)12:38
rogpeppefwereade, niemeyer: here's a version of supercommand with no recursive magic: http://paste.ubuntu.com/944043/13:10
TheMueniemeyer: So, I now branched my last branch at the point before I modified the NeedsUpgrade behavior, but also before doing the changes of the according review. Do you expect a propose now to first take a look that this branch is in a proper state or shall I first do the review changes and then propose again?13:11
rogpeppe(branched from a slightly earlier version, so using ParsePositional, as i believe Consume was added only for the recursive thing)13:11
fwereaderogpeppe, how do you switch off logging?13:11
niemeyerTheMue: Feel free to do the review changes13:12
rogpeppefwereade: the logging flags thing is orthogonal to this.13:12
TheMueniemeyer: ok13:12
rogpeppefwereade: i still think my GlobalFlags proposal would work well13:12
niemeyerrogpeppe: Cheers.. I'm looking at this as well, as I mentioned13:12
fwereaderogpeppe, and, yes; you eliminate recursion by having a function that parses flags call a different function that parses flags in exactly the same way13:13
rogpeppeniemeyer: sorry, i'd already been playing with it, so thought i'd push out something to think about.13:13
rogpeppefwereade: not exactly - it adds extra flags13:13
niemeyerrogpeppe: No worries.. I'm just trying to focus on it for a moment to understand the problem better13:14
rogpeppefwereade: that's *the* crucial reason why SuperCommand exists, AFAICS13:14
fwereaderogpeppe, that it gets in the exact same way that Parse does...13:14
fwereaderogpeppe, there is repetition inherent in this problem13:15
fwereaderogpeppe, we can loop or we can recurse or we can duplicate code and kid ourselves that it's simpler because we've managed to avoid a loop13:15
rogpeppefwereade: the entire reason for the recursion was so that we could reuse the 6 (!) lines of Parse?13:15
fwereaderogpeppe, well, there are many reasons all of which interrelate in one way or another, but yes, that is one of them13:17
rogpeppefwereade: when nothing actually calls Parse itself other than Main, AFAICS. we could inline it into Main and noone would notice, i think.13:17
rogpeppefwereade: i think the version of SuperCommand.ParsePositional i posted shows very directly the logic of SuperCommand.13:18
fwereaderogpeppe, yes it does, it looks to me very very much like the original version, except it wantonly duplicates the logic in Parse rather than just calling it; and it doesn't allow global args to come after the command, which was a requirement13:20
rogpeppefwereade: it *does* allow global args to come after the command13:20
rogpeppefwereade: it passes all tests13:20
fwereaderogpeppe, I don't see where you register the global flags for the second flagset Parse13:22
rogpeppefwereade: newFlagSet13:22
rogpeppefwereade: actually i was confused by that at first.13:23
rogpeppefwereade: i'm not sure newFlagSet should take a Command, but that's another issue13:23
fwereaderogpeppe, well, the way you're using it makes it wrong; the way it was used before was fine ;)13:24
rogpeppefwereade: ok, perhaps13:25
fwereaderogpeppe, still, I just do not get how repetition is not part of the problem13:26
rogpeppefwereade: repetition of what?13:26
fwereaderogpeppe, and why I am being criticised for using elementary constructs which express repetition13:26
fwereaderogpeppe, repetition of parsing13:26
fwereaderogpeppe, one Command parses part of the command line and delegates to another for the rest13:26
fwereaderogpeppe, this is two parses; one would also be perfectly legitimate, because Parse should accept a Command13:27
rogpeppefwereade: the repetition is performed once only, but you're making a very general mechanism to replace something that's uses exactly the same lines of code13:28
niemeyerfwereade: You're not being criticised.. I'm trying to simplify the logic we (the team) has in place.. that's impersonal13:28
rogpeppeniemeyer: +113:28
fwereadeniemeyer, rogpeppe: sorry, inappropriate language, I sometimes come to identify with my code a touch too much, ty for reminder13:29
niemeyerfwereade: Your code was largely reviewed and agreed with13:29
rogpeppefwereade: this is all the diff it takes to make your code non-recursive and everything else can carry on using exactly the same interface before: http://paste.ubuntu.com/944063/13:31
rogpeppefwereade: i don't see how that's not a win13:31
fwereaderogpeppe, ok, the internal implementation should not matter; do we agree that the real pain point is in returning things other than errors from ParsePositional13:33
fwereade?13:33
rogpeppefwereade: what do we want to return from ParsePositional?13:33
fwereaderogpeppe, well, an error, right? that's the interface you've been fighting to preserve13:33
rogpeppefwereade: "the real pain point is in returning things other than errors"13:34
rogpeppefwereade: so what else do we want to return?13:34
fwereaderogpeppe: I'm starting to think: a command and list of unconsumed args (which replaces ourself entirely if used and is in practice nil, nil for most Commands, although there are other plausible uses of such a mechanism)13:35
fwereaderogpeppe, plus an error13:35
rogpeppefwereade: but why?13:35
fwereaderogpeppe, because it is a perfect fit for the problem space and reduces duplication13:36
rogpeppefwereade: we're talking 6 lines of duplication here!13:36
rogpeppefwereade: and you're proposing to change the interface in many places just because of that?13:36
fwereaderogpeppe, and you're saying that 6 lines of duplication is a *better* thing than a loop to express the same repetition?13:36
rogpeppefwereade: yes13:37
hazmatg'morning13:38
* hazmat is glad to finally be home13:38
fwereaderogpeppe, in and of itself that makes little sense to me; with the wider context of "because it allows us to have a cleaner signature for ParsePositional" I can understand it13:38
fwereadeheya hazmat13:38
rogpeppefwereade: {fmt.Println("a"); fmt.Println("b")} can be better than for _, s := range []string{"a", b"} {fmt.Println(s)}13:38
rogpeppehazmat: hiya13:38
rogpeppefwereade: and in this case, it's not strict repetition - the body of the loop is slightly different each time through.13:39
niemeyerfwereade: FWIW, I'm still on it..13:39
rogpeppefwereade: if it *was* a simple loop, i wouldn't mind much. my problem is with the fact that to avoid this repetition you're proposing complicating the Command interface that's implemented everywhere.13:43
fwereaderogpeppe, where by "everywhere" you mean "in two places"?13:48
fwereaderogpeppe, hm, sorry, suddenly unsure whether you're looking at the version with FlagCommand13:49
fwereaderogpeppe, ok, 3 places, FlagCommand implements it ;)13:49
rogpeppefwereade: ah, i'm not.13:49
rogpeppefwereade: but still.13:49
rogpeppefwereade: it's implemented (even if only with embedding) by every subcommand13:50
fwereaderogpeppe, I guess this may be one of the sources of disconnect; my position is that the prectical cost is utterly minimal13:50
rogpeppefwereade: the Command interface is something that people will see when maintaining the code. it's a very good thing that it's as simple as possible.13:51
rogpeppefwereade: both myself and niemeyer found the recursive nature of supercommand difficult to understand.13:52
fwereaderogpeppe, I thought one of the benefits of Reduce was that it actually made everything cleaner13:52
rogpeppefwereade: sometimes 6 lines of extra code are worth one less level of abstraction IMHO13:52
rogpeppefwereade: i think everything's cleaner if *all* the supercommand magic is strictly within supercommand13:53
rogpeppefwereade: in fact, the patch above isolates all the magic into SuperCommand.ParsePositional - a few lines of sequential code.13:54
rogpeppefwereade: FWIW i don't think i've seen a CL with FlagCommand in it13:56
fwereaderogpeppe, it's in https://codereview.appspot.com/6107048/13:57
fwereaderogpeppe, niemeyer proposes something better but I haven't reproposed with that in13:58
rogpeppefwereade: even with ZeroArgsConsumer, i still see 5 implementations of Consume14:00
fwereaderogpeppe, you mean including places where ZeroArgsConsumer is embedded?14:02
rogpeppefwereade: no14:02
rogpeppee.g. func (c *agentConf) Consume(args []string) ([]string, error) {14:02
rogpeppefwereade: every time someone sees that method, they have to wonder: does it actually return something other than an empty arg list?14:03
niemeyerStrawman on the way..14:03
rogpeppefwereade: and the only reason for it is SuperCommand14:04
* rogpeppe likes the nutty, chewy taste of straw14:04
fwereaderogpeppe, ah, typo, I was mid-edit :/ ...sorry :)14:05
niemeyerhttps://codereview.appspot.com/611804414:05
niemeyerTests are broken, but it actually builds at least14:06
rogpeppeniemeyer: i like the look of that14:09
rogpeppeniemeyer: particularly the way lines of code melt away :-)14:09
rogpeppeniemeyer: not sure about calling FlagSet.Parse twice on the same flag set, but i guess it might be ok.14:09
niemeyerrogpeppe: We can always make it ok :)14:10
niemeyerrogpeppe: But I suspect it's already fine14:10
rogpeppeniemeyer: yeah, or just initialise a new flagset14:10
niemeyerrogpeppe: I'd rather not, if possible.. I really like how we have a single place where this is happening14:11
rogpeppeniemeyer: that's true. it removes a lot of head-scratching.14:11
fwereadeniemeyer, that's *very* nice indeed14:17
fwereadeniemeyer, almost horrifyingly so14:18
niemeyerfwereade: Cheers14:24
fwereadeniemeyer, I'm still trying to think through how it'll work with the responsibility split but I think it goes in a nice direction there too14:25
niemeyerfwereade: Yeah, I suspect it should be fine14:26
fwereadeniemeyer, ok, I'll take a short break and get onto it14:26
rogpeppeniemeyer, fwereade, TheMue: are we still planning to have a meeting this afternoon?14:26
niemeyerfwereade: ctx takes care of most of the issue there already, I believe14:26
fwereadeoh, yeah, good plan14:26
niemeyerrogpeppe: +114:26
niemeyerI'm happy to have it *now*14:26
rogpeppei've got a 1 to 1 with robbie in 5 minutes, but i'm good after that14:27
niemeyerI have only about half an hour, but should be useful at least14:27
TheMuerogpeppe: In half an hour I've got my 1:1 with Robbie.14:27
niemeyerrogpeppe: Aw, ok14:27
niemeyerrogpeppe: After lunch then14:27
niemeyerin 1h30?14:27
rogpeppeniemeyer: i'm sure i could defer with robbbiew14:27
niemeyerrogpeppe: I'm short..14:27
niemeyerrogpeppe: 1h30 would work best there too14:27
rogpeppeniemeyer: sounds good to me14:27
niemeyer16UTC then14:28
rogpeppeniemeyer: yup.14:28
TheMueniemeyer: OK14:28
niemeyerfwereade, TheMue: Sounds good?14:28
fwereadeniemeyer, 1h30 from now sounds good14:29
niemeyerSuper14:30
robbiewrogpeppe: we 1:1ing? or did you defer me :/14:32
robbiew:P14:32
rogpepperobbiew: we are14:33
rogpepperobbiew: G+?14:33
robbiewrogpeppe: aye14:34
robbiewhttps://talkgadget.google.com/hangouts/_/extras/canonical.com/the-hulk-hideout14:34
robbiewrogpeppe: ^14:34
TheMueniemeyer: Please forget latest propose. Somehow the merge of parent changes brought unwanted stuff in. Seems I took the wrong revision.14:37
niemeyerTheMue: np14:46
TheMueniemeyer: I've got to admit that I'm a bit puzzled while trying to understand which revision I should take. I opened it in Bazaar Explorer to get a better impression. But I didn't thought that the needed merge to propose the stuff would get my not-wanted code back. *sigh*14:49
* niemeyer => lunch15:13
TheMueniemeyer: So, now I've rolled back to an earlier revision, made the needed changes and would now like to propose it. How can this be done without the problem of a "diverged-branch"?15:14
TheMueniemeyer: Oh, lunch, enjoy. ;)15:14
rogpeppeTheMue: you need to have merged with trunk15:21
rogpeppeTheMue: if bzr diff looks right, then the codereview should look right, assuming you've got the prereq correct15:22
rogpeppeTheMue: also, i didn't know this for a while: you can't change the prereq of an existing merge proposal - you have to delete and repropose if you want to do that15:23
TheMuerogpeppe: aha, have to take a look15:23
TheMuerogpeppe: How do I do it?15:25
rogpeppeTheMue: there's a "Delete this proposal" link in the top right of the merge proposal page15:26
TheMuerogpeppe: You mean "Delete patch set"?15:28
TheMuerogpeppe: Otherwise I'm on a different page. *lol*15:28
rogpeppeTheMue: this page: https://code.launchpad.net/~themue/juju/go-state-unit-resolved-watcher/+merge/10249715:29
rogpeppeTheMue: "Delete proposal to merge"15:29
TheMuerogpeppe: Ah, thx, I've been on the review page.15:30
rogpeppeTheMue: the launchpad pages are the important thing.15:31
rogpeppeTheMue: you don't want to delete the codereview page.15:31
TheMuerogpeppe: I just hoped both play together.15:32
rogpeppeTheMue: codereview.com knows nothing about launchpad.net or vice versa. the only link is lbox.15:33
TheMuerogpeppe: So we need a "lbox sync" supercommand. ;)15:34
rogpeppeTheMue: there's no change you can make in codereview that we'd want to sync to launchpad, other than comments, which get transferred anyway.15:35
rogpeppeTheMue: so lbox is already like lbox sync, just in one direction15:35
TheMuerogpeppe: OK, to make it more clear. <JOKE> So we need a … </JOKE>.15:36
rogpeppeTheMue: oh15:36
rogpeppeTheMue: ha ha :-)15:36
TheMuerogpeppe: I've got to admit it has been a bad one. ;)15:36
TheMuerogpeppe: Just hoped to get a link into the supercommand discusion today.15:37
rogpeppeTheMue: what kind of link?15:37
TheMuerogpeppe: Hmm, maybe wrong wording. How would say it if you want to connect a sentence now to a discussion that has been helt some time ago?15:38
TheMuerogpeppe: A connection?15:38
rogpeppeTheMue: you'd probably say something like "just hoped to make a reference to the supercommand discussion today"15:39
rogpeppe"reference" is the word15:39
TheMuerogpeppe: Ah, ok, thx, learned again. Sounds a bit formal from a German perspective.15:40
TheMueTheMue: Here we also have the word "Referenz", but it is used in a different context.15:41
rogpeppeTheMue: alternative phrasing "i was referring to the supercommand discussion" or "i was trying to refer to ..."15:54
TheMuerogpeppe: Sounds like the same stem. How would you say it if you're in the context of making a joke? Would you also "refer to"?15:57
* TheMue likes English lessons here in the channel, as long as I don't have to pay for.15:58
rogpeppeTheMue: probably not in a joke itself. i'd just use some phrasing that alludes to the original thing.15:59
TheMuerogpeppe: I tried it with the "lbox sync" supercommand, but yes, that hasn't been funny.16:00
rogpeppeTheMue: i can't say i laughed out loud :-)16:00
TheMuerogpeppe: I'll try to make a better one next time.16:01
rogpeppeTheMue: i wait with eager anticipation16:01
TheMuerogpeppe: I hope I won't dissappoint you.16:02
* niemeyer is back16:03
rogpeppeniemeyer, fwereade, TheMue: meeting?16:04
TheMuerogpeppe: I still have the "diverged-branches" problem.16:04
rogpeppeTheMue: push --overwrite16:04
niemeyeryep!16:04
niemeyerrogpeppe: Wanna do the honors?16:04
rogpeppeniemeyer: k16:06
rogpeppeniemeyer, TheMue, fwereade: invites out16:07
* hazmat lunches16:11
niemeyerLost my connection.. trying again16:18
niemeyerrogpeppe: WTF.. is everybody else in?16:19
rogpeppeniemeyer: yeah16:19
rogpeppeniemeyer: we're still there16:19
niemeyerrogpeppe: I'm retrying but it shows me as being online in my own list..16:19
rogpeppeniemeyer: you're there, but in cartoon form only16:20
niemeyerrogpeppe: I can hear you typing16:20
rogpeppeniemeyer: lol16:20
niemeyerCome on G+!16:20
niemeyerI can hear everybody16:20
niemeyerI'm disconnecting and retrying16:20
rogpeppecan you use the text chat box?16:21
niemeyerrogpeppe: I could..  just disconnected.. will retry16:21
niemeyerKilling Chrome and restarting16:21
niemeyerShait16:25
rogpeppeniemeyer: dammit16:25
niemeyerThis software wasn't so crackful before16:26
rogpeppeniemeyer: it's working fine for us :-)16:27
niemeyerrogpeppe: That's the kind of trick that always works.. if you restrict what "us" means enough, it everything is wonderful! ;-)16:27
rogpeppeniemeyer: us == ∅ :-)16:28
rogpeppeniemeyer: maybe if you invited us, the server might be located in a better place...16:30
niemeyerOk, let's try that16:30
niemeyerG+ got frozen completely and Chrome had to kill the page16:32
niemeyerIt's that bad..16:32
niemeyer"The connection to talkgadget.google.com was interrupted."16:33
rogpeppeniemeyer: hmm. i wonder if it's a networking issue at all. maybe you could try connecting using a Windows machine :-) :-)16:33
TheMuerogpeppe: Evil16:33
niemeyerrogpeppe: Oh yeah, I'm sure it's the kernel!16:34
niemeyerrobbiew: ping16:35
robbiewpong16:35
fwereadeniemeyer, I'm not seeing a new invite; should I be?16:35
niemeyerrobbiew: Can we borrow your conf call number for a moment?16:36
robbiewone sec16:36
niemeyerI can't find my pin16:36
niemeyerfwereade: No.. it's seriously broken16:37
niemeyerfwereade: I get this on the tab in the G+ page: The connection to talkgadget.google.com was interrupted.16:37
fwereadeniemeyer, ouch, didn't realise that was the main G+ page16:37
niemeyerfwereade: <robbiew> niemeyer: 107 568 491616:38
niemeyerThis is the conf code..16:38
niemeyerPhone number is at /ConferenceCalls on the internal wiki16:38
rogpeppefwereade, TheMue: you might want to add an additional communication channel...16:47
fwereaderogpeppe, sorry, what should I drop out of?16:54
fwereadeniemeyer, rogpeppe, TheMue: I'm afraid I should be away soon in the interest of domestic harmony...17:15
fwereadeniemeyer, rogpeppe, TheMue: and I'm afraid I certainly can't do justice to the details of this conversation17:17
fwereadehappy evenings all17:17
TheMuefwereade: bye17:17
niemeyerfwereade: Sounds good, we certainly don't want to disturb the domestic harmony there ;-)17:19
niemeyerTheMue: I was just looking at GoPort.. I'm not sure about how useful that is ATM.. maybe you have different plans for it, but right now it feels like a snapshot of the +activereviews link in Launchpad17:26
niemeyerTheMue: What I had in mind was closer to a "bird's view" on the different areas17:26
niemeyerTheMue: Something vague enough to be up-to-date for longer17:26
niemeyerTheMue: Also, re. https://code.launchpad.net/~themue/juju/go/+merge/103315, do you want me to review that or was it just a test?17:27
niemeyerTheMue: Wondering mostly due to the branch name17:28
andrewsmedinaniemeyer, rogpeppe please take a look https://codereview.appspot.com/6099051/ :-p17:51
niemeyerandrewsmedina: Woohay17:54
TheMueniemeyer: The GoPort page is currently only a start. It shall also contain all open features. It's like a Kanban board, only in a wki.18:11
TheMueniemeyer: Tools based it would be simpler.18:12
TheMueniemeyer: The last branch is for review. The name has gone so "bad" due to an error while fighting with bzr and lbox.18:13
niemeyerTheMue: Just saying.. I'm not going to be joining you on that style of roadmap18:14
niemeyerTheMue: This is what +activereviews provides18:14
niemeyerTheMue: and changes every day18:15
niemeyerTheMue: It won't help18:15
TheMueniemeyer: Where in activereviews are all outstanding features?18:15
niemeyerTheMue: Where in GoPort are all outstanding features?18:15
niemeyerTheMue: What's there now is a list of branches18:15
niemeyerTheMue: that's what I'm talking about18:15
TheMueniemeyer: I already told you that I'm just started to get a feeling how to put it into the wiki. When the form is right I would talk to you and all others to gather the outstanding the features.18:16
niemeyerTheMue: Sure.. you mentioned that page in the wiki today, I've looked, and am providing feedback on what's there.. no biggie18:17
TheMueniemeyer: I'm not yet habe with the feature naming too. And I've got to try what's the best granularity.18:17
niemeyerTheMue: As I said, I'm also happy to try to produce something you're happy with18:17
TheMueniemeyer: So any good idea by you is welcome.18:17
niemeyerTheMue: I'd have to sit down and do it.. which is fine by me, but it won't look like what's there now18:18
niemeyerTheMue: I'd probably take the big areas from the Python code, and say what's missing at a very high level18:19
TheMueniemeyer: I'm also not absolutely happy. It's not simple to put it into a wik iform. In past we used a mix of tools and physical kanban boards.18:19
TheMueniemeyer: Yes, I already started scanning it. Today it's indeed to fine granular and the orientation at branches isn't right.18:20
niemeyerTheMue: I've used a number of different techniques too.. we have tools that produce something resembling a Kanban from the reviews actually18:20
TheMueniemeyer: Nice18:21
TheMueniemeyer: And you feed it by creating LP issues for open points?18:21
niemeyerTheMue: E.g. http://people.canonical.com/~niemeyer/florence.html18:21
TheMueniemeyer: Great, want. *smile*18:22
niemeyerTheMue: We also had feature boards in the wiki with Landscape18:22
niemeyerTheMue: But I don't miss either of these right now18:22
niemeyerTheMue: I'm happy to look at the problems we're trying to solve and come up with another solution that fits for what we're doing today18:22
niemeyerTheMue: UDS will be a good time for the two of us to sit together and come up with a plan18:23
TheMueniemeyer: Yes, looking forward. Maybe we really don't need this way of control, only a list of milestones ensuring that we don't miss the finishing at 12.10.18:24
niemeyerTheMue: Yeah.. and some big areas that we can keep in mind and know how much progress we have there18:24
niemeyerTheMue: E.g. "provisioning agent", "unit agent", "machine agent"18:25
TheMueniemeyer: Sounds good. I really don't want to create big, ugly docs just for fun.18:25
niemeyerTheMue: "state", "ec2 provider", ...18:25
TheMueniemeyer: As you have seen I've also put some first open questions/topcs at the bottom. At least open for me.18:26
niemeyer"local provider", /me looks at andrewsmedina18:26
TheMueniemeyer: Maybe some of them are only interesting for > 12.10, but some maybe earlier18:26
niemeyer"command line API"18:26
niemeyerTheMue: I'd not mix that up18:26
niemeyerTheMue: Or we'll risk losing focus18:27
TheMueniemeyer: Oh, good that this stuff is logged. I'll add it tomorrow. Sounds even better than todays table.18:27
niemeyerTheMue: We need sharp attention on the port.. everything else is secondary18:27
niemeyerTheMue: I'd put each of these as headers of a section18:28
TheMueniemeyer: Eh, I only wrotem them down to make clear that those parts which are important for 12.10 are handled early enough. Others may be deferred.18:28
TheMueniemeyer: If you signal "This point A is covered there, and that point B is not interesting for the 12.10 Go port." than it's ok.18:29
TheMueniemeyer: Nothing more.18:29
andrewsmedinaniemeyer: what?18:39
TheMueOff for today.18:53
* TheMue waves18:53
niemeyerandrewsmedina: nm19:08
* niemeyer breaks for a bit19:08
andrewsmedinaniemeyer: you saw my review?19:11
niemeyerandrewsmedina: Not yet, but we'll get to it for usre19:35
niemeyersure19:35
hazmatniemeyer, are you going to hit mongosv next week in sf?19:49
hazmatbcsaller, i'm realizing that juju-info should probably also include some additional info relating to charm name and interfaces21:33
hazmattake a monitoring tool, how's it know what its monitoring outside of specific monitoring support in the monitored charm21:33
bcsallerhazmat: I would think anything it includes could be included in any/all charms21:34
bcsallerhazmat: and by charms I mean relations21:34
hazmathmm.. i suppose so, but this case implicit where as the others are already explicit, but given a polymorphic interface i suppose that makes sense as well21:38
bcsallerhazmat: more info and fewer special cases, at minimum there is one win in that list21:39
SpamapShazmat: +1 from me to adding charm and service name to all relations23:23
SpamapSeasy win, lots less special casing23:23
hazmatSpamapS, true, but adding it to the all rels feels like we're missing something its going to duplicated for every remote unit.23:28
hazmatits really a remote endpoint property23:29
hazmatbut we don't have a nice way to expose that except on via relation-get on the the remote unit23:29
SpamapShazmat: hm, not sure I understand. You're concerned that its the same for all units and so it is a different type of information.. but I think thats ok because its always true for each unit even though it is redundant.23:31
hazmatSpamapS, yeah.. just wanted to see if we could store it differently to avoid the copies23:36
SpamapShazmat: why would it be stored?23:42
SpamapShazmat: we should have lazy-fetch for stuff like that23:42
hazmatSpamapS, rel-get doesn't differentiate on keys, the info could be store on the rel, as for why store on the rel, i've been trying to keep contexts fully functional even without topo info to minimize issues arising from lack of stop hooks23:45
hazmatie. self contained for rel hook exec23:45
hazmatbut that's a losing proposition anyways23:45

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!