[Haskell-cafe] Darcs as undo/redo system?

Gwern Branwen gwern0 at gmail.com
Fri May 8 13:59:16 EDT 2009


On Fri, May 8, 2009 at 12:43 PM, Jason Dagit <dagit at codersbase.com> wrote:
> Hi Peter,
>
> On Fri, May 8, 2009 at 8:33 AM, Peter Verswyvelen <bugfact at gmail.com> wrote:
>> If you work with a text editor like Microsoft Visual Studio (maybe also
>> Eclipse, don't know), each text editor has its own undo/redo history.
>> However, when you perform refactoring - like renaming a function - this
>> becomes an undo/redo on multiple files together, so in a sense these changes
>> are part of a global history.
>> You can combine these two different kinds of mutations, and undo/redo still
>> works as expected.
>> I don't know how hard this is to implement, but it looks like this problem
>> is somehow is related to Darcs theory of patches (which I don't know yet :-)
>
> I have thought about applications of patch theory like this as well.
> I could imagine applying it to the undo stack in GIMP.  Allowing you
> to undo things on different layers.  I think one of the things you
> need for this to work, is a graphical representation of the undo
> history.  You could commute the change you want to undo to the top of
> the stack, undo it, and then you have a branch in the history.
> Because this could get complicated, you need to display this branched
> history to the user so they are able to continue working with it.
>
> If you wanted to work on this, I would encourage you to read more
> about patch theory[1,2,3,4] and also try out libdarcs[5].
>
> Thanks,
> Jason

Also good and highly relevant:
http://byorgey.wordpress.com/2008/02/04/gobby-haskell-and-patch-theory/

-- 
gwern


More information about the Haskell-Cafe mailing list