git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC] Common library for Git GUIs

From
JHJan Hudec <bulb@ucw.cz>
Date
Feb 17, 2009, 21:21 UTC
Message-ID
<20090217212145.GC2216@efreet.light.src>
In-Reply-To
<74161B7F-A178-49CB-990D-DF7299235C58@frim.nl>
On Tue, Feb 17, 2009 at 20:08:23 +0000, Pieter de Bie wrote:
Show 7 quoted lines
> On Feb 16, 2009, at 9:24 PM, Jan Hudec wrote:
>> What it should use:
>> - It should probably be in C++ or C, with bindings for at least Perl,
>>   Python, Ruby, C#(CLR) and Java. The bindings can be done either with
>>   Swig, or using some base library that already has them.
> It should be either C++ or C. If you want git devvers to work on it too,
> you'll probably want to go with C.

I don't think the really core devs need to work on this -- their time is best spent on the core. And many of the existing guis are in C++. For me, it depends on the user portable runtime more than anything else.

>>    - Bindings for languages. We can use Swig, but it has e.g. no  support
>>      for callbacks, so having portable runtime with already existing
>>      bindings that support this would be an advantage.
> I'd say bindings are pretty easy to create yourself.

The advantage of swing is, that one definition with a few typedefs would generate Python, Perl, Ruby, CLR, Java and a few more bindings. GObject would need more language-specific work, but would nicely solve integration into the garbage collector. You know, I want to save as much work as possible.

Show 10 quoted lines
>> Portable runtime options:
>> So what do you people think would be best? I see several options:
>> - QtCore
>> - Glib
>> - STL + Boost
> None of these, if you want any GUI's to use it. Noone is going to
> create a Gtk / Cocoa / Windows app that depends on Qt. Nobody wants
> to use Boost in any situation and Glib, while being smaller than the
> rest, is also difficult as it isn't shipped with many OS's, for example
> OS X.

I fully agree that nobody will want to depend on Qt -- QtCore is now a separate library, but the sources are not shipped separately AFAIK, so it'd be a pain. I would not think the case is as strong against boost and glib, though. People would either be getting binaries, in which case we can just bundle whatever dependency along, or building it and than one extra source tree (that can also be bundled for convenience) is not so much pain.

>> - POSIX + Msys on Windows
> I think lightweight is the way to go. If you go for C++, you can also use
> the STL.
STL does not have any support for threads, event loop nor signals. Though
thinking about it, we may not actually need them.
 - we only need threads if our event loop can't be integrated into gui's one
   and the gui can start our in thread itself -- it's not too much code.
 - we only need file descriptors in the event loop and it needs to be
   integratable into the gui's one anyway.
 - simple callback is quite likely good enough for us -- the gui will need
   multiple callbacks, but it will need to connect in it's own signal system
   anyway.
So the shell invocation remains and that's little enough we can cut&paste
that from glib.
> But, isn't this time spent better on getting libgit2 off the ground?

No, because what I have in mind is orthogonal to libgit2. libgit2 is supposed to be generic API for git, while I am proposing a specifically gui-oriented interface, which should implement all logic of a gui except opening dialogs and the widgets themselves, allowing the guis built on top of it to be totally dumb. Actually part of my idea is to create something, that can be later ported to libgit2 and immediately benefit many git interfaces.

-- 
						 Jan 'Bulb' Hudec <bulb@ucw.cz>
Previous: Pieter de BieNext: Johannes Schindelin
Message 5 of 15 in “[RFC] Common library for Git GUIs”
  1. Jan HudecFeb 16, 2009
  2. Guilhem BonnefilleFeb 17, 2009
  3. Jan HudecFeb 17, 2009
  4. Pieter de BieFeb 17, 2009
  5. Jan HudecFeb 17, 2009
  6. Johannes SchindelinFeb 17, 2009
  7. Jan HudecFeb 18, 2009
  8. Frank LiFeb 18, 2009
  9. Jan HudecFeb 18, 2009
  10. Abhijit BhopatkarFeb 18, 2009
  11. Abhijit BhopatkarFeb 18, 2009
  12. Fwd: [RFC] Common library for Git GUIsMarco Costalba, Feb 17, 2009
  13. Jan HudecFeb 17, 2009
  14. Marco CostalbaFeb 18, 2009
  15. David AguilarFeb 19, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.