[darcs-users] Re: Darcs API?
Thomas Zander
zander at kde.org
Sun Apr 17 17:17:35 UTC 2005
On Sun, Apr 17, 2005 at 05:43:26PM +0100, Jamie Webb wrote:
> On Sun, Apr 17, 2005 at 05:28:33PM +0200, Nils Decker wrote:
> >
> > Hello,
> >
> > with the ongoing discussion about the license of the API i wonder if it
> > is necessary to have a binary API.
> >
> > Calling the darcs binary from another program for every action would be
> > expensive and inconvenient for the need to deal with the human-usable
> > interface to darcs. If darcs had a --slave mode that is designed to be
> > used from another program, darcs could easily be used from any other
> > language. The xml output of annotate is a first step in this direction.
>
> Presumably you're suggesting using a bidirectional pipe for this? Is
> that portable? I have a vague recollection of someone moaning that
> Windows didn't handle them properly/at all/something...
Normally you'd use a socket for that, which is supported on all systems.
Easiest example is xine. Search in the manpage on how "xine -n" works.
> Otherwise, makes sense. And makes the interface language-independent.
Unless the xml-output and the above mentioned interaction can be
combined (from a design perspective) I'd say its over the top for
something like darcs.
The assertion that calling darcs is too expensive is far from proven,
and frankly; I really doubt its a relevant overhead.
--
Thomas Zander
More information about the darcs-users
mailing list