Discussion:
[Haskell-cafe] Darcs as undo/redo system?
Peter Verswyvelen
2009-05-08 15:33:25 UTC
Permalink
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 :-)
Jason Dagit
2009-05-08 16:43:54 UTC
Permalink
Hi Peter,
Post by Peter Verswyvelen
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

[1] http://darcs.net/manual/node9.html
[2] http://en.wikibooks.org/wiki/Understanding_darcs/Patch_theory
[3] http://files.codersbase.com/thesis.pdf (see chapter 3)
[4] http://wiki.darcs.net/DarcsWiki/Talks
[5] http://bugs.darcs.net/issue1149
Gwern Branwen
2009-05-08 17:59:16 UTC
Permalink
Post by Jason Dagit
Hi Peter,
Post by Peter Verswyvelen
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
Stefan Monnier
2009-05-09 01:58:14 UTC
Permalink
Post by Jason Dagit
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
Don't know about the GIMP, but in Emacs, you can select a region of text
and undo just the changes in that region.


Stefan
Wolfgang Jeltsch
2009-05-12 11:12:48 UTC
Permalink
Post by Jason Dagit
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].
Is libdarcs the same as the darcs library package on Hackage (which exports
the darcs API)?

Best wishes,
Wolfgang
Sittampalam, Ganesh
2009-05-12 16:12:16 UTC
Permalink
Post by Wolfgang Jeltsch
Post by Jason Dagit
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].
Is libdarcs the same as the darcs library package on Hackage (which
exports the darcs API)?
Yes.

Ganesh

===============================================================================
Please access the attached hyperlink for an important electronic communications disclaimer:
http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
===============================================================================
Trent W. Buck
2009-05-13 00:55:01 UTC
Permalink
Post by Wolfgang Jeltsch
Post by Jason Dagit
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].
Is libdarcs the same as the darcs library package on Hackage (which exports
the darcs API)?
The Darcs package (both on Hackage and elsewhere) builds two things: the
darcs(1) binary, and libHSdarcs. The latter is what Jason was referring
to. Note that currently it just exposes all our internal functions,
rather than providing a coherent (or stable!) API.
Wolfgang Jeltsch
2009-05-14 07:43:57 UTC
Permalink
Post by Trent W. Buck
Post by Wolfgang Jeltsch
Post by Jason Dagit
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].
Is libdarcs the same as the darcs library package on Hackage (which
exports the darcs API)?
The Darcs package (both on Hackage and elsewhere) builds two things: the
darcs(1) binary, and libHSdarcs. The latter is what Jason was referring
to. Note that currently it just exposes all our internal functions,
rather than providing a coherent (or stable!) API.
I know. My students, who worked on a darcs GUI frontend, already experienced
this. ;-)

Best wishes,
Wolfgang

Jeremy Shaw
2009-05-08 19:35:51 UTC
Permalink
At Fri, 8 May 2009 17:33:25 +0200,
[1 <multipart/alternative (7bit)>]
[1.1 <text/plain; ISO-8859-1 (7bit)>]
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.
If you read this paper, you will find an undo system for a
colloborative editor complete with a theory that looks like a
primitive version of darcs patch theory (complete with the dreaded
merge bug of darcs 1):

Undoing actions in collaborative work: Framework and experience by Prakash and Knister
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.48.6443&rep=rep1&type=pdf

You will probably find these papers informative as well:

Recognizing creative needs in user interface design by Terry and Mynatt
http://www.cc.gatech.edu/fce/ecl/projects/openEnded/pubs/creativeInterfaces-creativecog2002.pdf

A Selective Undo Mechanism for Graphical User Interfaces Based On Command Objects (1994) by Thomas Berlage
http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.31.755

Flexible Conflict Detection and Management In Collaborative Applications (1997) by Keith Edwards
http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.49.5439

Undo Any Operation at Any Time in Group Editors (2000) by Chengzheng Sun
http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.32.6266

And, of course, you can use citeseer to find more papers that reference those.

- jeremy
John A. De Goes
2009-05-09 04:22:36 UTC
Permalink
Una Merge does real-time merging and has per user undo. And it can do
lots of stuff that seems darcs-like, though I don't know enough about
darcs to say for sure (e.g. moving a user's own edits after other
edits).

http://www.n-brain.net/una_merge.html

Regards,

John A. De Goes
N-Brain, Inc.
The Evolution of Collaboration

http://www.n-brain.net | 877-376-2724 x 101
Post by Jeremy Shaw
At Fri, 8 May 2009 17:33:25 +0200,
[1 <multipart/alternative (7bit)>]
[1.1 <text/plain; ISO-8859-1 (7bit)>]
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.
If you read this paper, you will find an undo system for a
colloborative editor complete with a theory that looks like a
primitive version of darcs patch theory (complete with the dreaded
Undoing actions in collaborative work: Framework and experience by Prakash and Knister
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.48.6443&rep=rep1&type=pdf
Recognizing creative needs in user interface design by Terry and Mynatt
http://www.cc.gatech.edu/fce/ecl/projects/openEnded/pubs/creativeInterfaces-creativecog2002.pdf
A Selective Undo Mechanism for Graphical User Interfaces Based On
Command Objects (1994) by Thomas Berlage
http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.31.755
Flexible Conflict Detection and Management In Collaborative
Applications (1997) by Keith Edwards
http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.49.5439
Undo Any Operation at Any Time in Group Editors (2000) by Chengzheng Sun
http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.32.6266
And, of course, you can use citeseer to find more papers that
reference those.
- jeremy
_______________________________________________
Haskell-Cafe mailing list
http://www.haskell.org/mailman/listinfo/haskell-cafe
Loading...