Hi Stephan, All

I've just realized that despite fossil is an executable it does not
prevent if from exporting functions for other programs to use (at
least on Windows, am not sure if this is possible on *nix).

I've just made a simple test executable Prog1.exe that links to
another executable Prog2.exe. You can run Prog2.exe normally (it has
it's own main function), but also you can link to it and use the
functions it exports. My Prog1.exe uses a test function from
Prog2.exe. All works as a breeze!

A quick look on wikipedia and PE format
(http://en.wikipedia.org/wiki/Portable_Executable) shows that PE is
somewhat related to a unix COFF format. Perhaps the same trick is
possible on *nix platforms. I think that it would solve a lot of pain
in creating JSON API.

  Best regards,
  Jacek


2011/10/6 Stephan Beal <sgb...@googlemail.com>:
> On Thu, Oct 6, 2011 at 12:02 PM, Gilles <gilles.gana...@free.fr> wrote:
>>
>> Thanks for the info. Out of curiosity, what do you mean by "monolithic
>> design", and why is it a problem to write a GUI?
>
> Fossil is a standalone application, not a C library of functionality. That
> means that in order to write a UI the only possibility you have is to parse
> the command-line output. Since fossil makes no guarantees about output
> format, it's basically impossible (or, long-term, futile) to try to create a
> UI in this way. This worked (barely) with CVS because CVS had well-defined
> output formats (where as fossil is more "free form" (which i happen to
> prefer, so that isn't a complaint)).
> The JSON API effectively adds a library interface (of a sort) to fossil,
> which allows other applications to call specific functions of fossil and get
> well-defined responses which are easily parsed (JSON format) and understood.
> For example, we can write a shell-like interface which communicates with a
> fossil instance over JSON, hiding the JSON bits from the user in the form of
> command-shell-style input and output.
> More infos about the JSON API (still incomplete, but can already do a good
> deal) can be found here:
> https://docs.google.com/document/d/1fXViveNhDbiXgCuE7QDXQOKeFzf2qNUkBEgiUvoqFN4/edit?hl=en_US
> --
> ----- stephan beal
> http://wanderinghorse.net/home/stephan/
>
> _______________________________________________
> fossil-users mailing list
> fossil-users@lists.fossil-scm.org
> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
>
>
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to