[darcs-users] uber-interactive UI

Zooko Wilcox-O'Hearn zooko at zooko.com
Mon Jan 18 17:32:14 UTC 2010

On Monday, 2010-01-18, at 3:15 , Eric Kow wrote:

> So my traditional response has been to resist this sort of thing  
> (eg. Zooko's http://bugs.darcs.net/issue107, which obliterate  
> during push; revert during record) on the grounds that while they  
> would be very useful, they would also make the UI complicated and  
> horrible.

A very cool thing about darcs's user interface (command-line  
interactive) is that you can add extensions without complicating the  
UI for the current behavior.  Here is what I see when I run "darcs  
push" with the latest version of darcs:

$ darcs push
Thu Jan 14 23:42:20 MST 2010  Brian Warner <warner at lothar.com>
   * tahoe_add_alias.py: minor refactoring
Shall I push this patch? (1/1)  [ynWsfvplxdaqjk], or ? for help:

There are 14 keys that I can press to do something, not counting  
space bar, up-arrow or down-arrow.  If a new option appeared at the  
end of that list, such as 'o' for obliterate, I don't think it would  
make the "darcs push" UI much less convenient or intuitive, even for  
people who never want to obliterate a patch while pushing.

I really like darcs's "command-line interactive" UI, and I wonder if  
some of the interesting new innovation of hunk-editing of could  
somehow be implemented in the "command-line interactive" mode instead  
of the "drop into an editor with a minilanguage" mode.

> One solution may be a sort of darcs shell that you could drop into  
> from interactive mode (inspired from Florent's :revert).

Personally, I strongly resist learning new "shells" or "modes" that  
are for specific tools.  I will spend a lot of effort figuring out  
how to do what I want with a single, synchronous command-line or by  
configuring a configuration file before I will even consider learning  
how to use a stateful interactive tool.  This is because I know how  
to record the history of what I have done with command-lines and text  
files, how to make it reproducible and automated and to program it.   
I can't do that with a stateful "shell", which means whatever I do in  
there is lost to me -- I can't reliably look back in history to see  
what I did and I can't necessarily reproduce it.

Also a stateful shell will often end up re-inventing features which I  
already know how to do in bash, and it irritates me to learn a tool- 
specific way to do what I can already do in a general way for all  
unix tools (using bash).

I guess the darcs interactive command-line *is* such a thing already,  
but it managed to sneak up on me by just asking a nice innocuous yes- 
or-no question the first time and so I didn't realize until too late  
that it was training me to use it as a stateful tool-specific UI.

Fortunately, on reflection, all of the things that I do with the  
darcs interactive-command-line could also be done in a single non- 
interactive invocation of darcs by passing the right command-line  
options, so I don't feel like I'm trapped by relying on it.



More information about the darcs-users mailing list