[darcs-users] Programmatic invocation

Jason Dagit dagit at eecs.oregonstate.edu
Sat Nov 5 20:20:15 UTC 2005


On Nov 5, 2005, at 4:47 AM, Wolfgang Jeltsch wrote:

> Am Samstag, 5. November 2005 01:05 schrieb Jason Dagit:
>> [...]
>
>> So, if darcs could be a library that applications could link into
>> then a gui could be built that really integrated darcs (even eclipse
>> is an example).  The other way to go with that is to embed a language
>> in darcs.  But, I prefer the idea of making darcs embeddable so that
>> you can choose your language by making bindings for libdarcs in
>> <insert favorite language>.
>
> I favor this approach.  One thing I really like about Subversion is  
> that it
> separates the command-line user interface from the part that does  
> the "actual
> work" by making the latter a library.  This way, you can implement  
> GUIs for
> Subversion in a clean way.  On the other hand, if a GUI has to  
> access a
> command-line tool instead of a library, this is bad design IMO  
> because the
> command-line interface is already a user interface and therefore  
> one user
> interface (graphical) builds upon another one (command-line).

I've thought for a while that darcs should just become the canonical  
implementation of libdarcs.  For one thing, this could make David's  
job easier.  He would be able to focus on the algorithms and the  
performance in Haskell.  If other people were good UI builders but  
didn't want to learn haskell maybe an FFI could be used.  This also  
assumes that there are good ways to turn a haskell library into  
something with C bindings.  I pick C because it seems that if you  
have C bindings then just about any language will have _some_ way of  
using it.

>
>> [...]
>
>> So....my proposal is for darcs to be an api which includes a way to
>> perform sql queries on the darcs repo database.  Any takers?
>
> Why SQL?

Hmm...I think I confused people on this point.  I was thinking,  
include an _optional_ sql interface mechanism.  I was hoping it would  
help provide a way to gather information about the repository and its  
history.  So, for example maybe you could do a query like "select *  
from changes where user = 'dagit'" to find out every change I had  
made.  I don't feel strongly about providing an sql interface, it  
just seems like a query mechanism is needed, and sql is well  
studied.  I also wasn't thinking that users would directly query in  
sql unless they really, really wanted to.

I wish I had time to work on darcs.  I think it's great and has so  
many ways it could grow and be even better.  A coworker was using  
darcs this last week and commented we need a darcs blame command.   
The command would work the same as svn blame.  I told him about darcs  
annotate, but he was not impressed.  For me, it's the performance  
that makes me use other tools in some cases.  Large repositories and  
patches are just not an option yet with darcs.

Well, just my $0.02.

Thanks,
Jason






More information about the darcs-users mailing list