Hobby-hacking Eric

2006-03-08

posting from work

Crap! What happened to my discpline of keeping work and play neatly separated? Not that I completely believe it in, though. I have learned a great of Haskell by working on darcs, much more than if I had just continued plodding on with GenI (work).

Anyway, I just felt the need to rejoice. After last night's (this morning's) wikibooks debacle, I now understand ordinary conflictors! Not the complicated ones, mind you, no middle anything, just the simple stuff.

14:24 [kowey] could i check something with you on conflictors?
14:24 [arjanb] sure
14:24 [kowey] i've worked this out backwards, and want to make sure i'm not wrong, here
14:25 [kowey] say A and B conflict (this is the beer and pasta example in the wikibook)
14:25 [kowey] we want to pull A into B's side...
14:25 [kowey] so we want to calculate some A1 that we can apply like BA1
14:25 [kowey] so far so good?
14:25 [arjanb] yes
14:26 [kowey] in order to do this, we have to calculate A^-1
14:26 [kowey] and commute that with B to get (B1 A1^-1)
14:26 [kowey] so, in the beer and pasta example
14:26 [kowey] A is "add beer to the shopping list"
14:27 [kowey] A^-1 is "remove beer from the shopping list"
14:27 [kowey] since A^-1 and B conflict; we have to use forced commutation
14:28 [kowey] and when you do a forced commutation, the effect of A1^-1 is exactly the same as the effect of B
14:28 [kowey] so A1^-1 says "add pasta to the shopping list"
14:28 [kowey] and when you take the inverse of that, you get "remove pasta from the shopping list"
14:28 [kowey] which you can then apply to B to cancel the pasta out
14:29 [kowey] is that right?
14:29 [arjanb] yes though i prefer to do it the other way around
14:29 [kowey] you mean, pull B into A or something else?
14:31 [arjanb] make first a sequence B B^-1 A then commute to B A1 (B1^-1)
14:31 [kowey] that sounds clearer

Arjan made a very good point that permutivity is a property of all patches, not just conflictors. After some discussion, we came to the conclusion that it would be useful to have an intermediary chapter for formalising patch theory. We're going to put stuff in it like: symmetry of merging, what happens when you have N non-conflicting patches, and the stuff that Ganesh is working on.


2 comments:

dennis said...

i have no idea what you were talking about, but the conversation looked very mathy. i was super intrigued.

kowey said...

Dennis! if you want to find out more, check out Understanding darcs. I'm building a guide to help users and developers understand how darcs works. Darcs is a very mathy approach to revision control. Users don't have to learn all this math to run it, of course, but there comes a point where you have to learn a little bit of it if you want to hack its guts.