
+++ Gwern Branwen [Jun 06 11 17:47 ]:
On Mon, Jun 6, 2011 at 4:45 PM, Greg Weber
wrote: Gitit uses darcs or git to store data, but through the command line interfaces. Unfortunately to my knowledge darcs does not expose a library interface. Gitit could be made faster and more secure by interfacing with libgit2.
Darcs does export a library and pretty much has ever since I first cabalized it; see http://hackage.haskell.org/package/darcs for the module listings. It's not a very useful API, however. I don't know how to use it, and John doesn't know how to use libgit2, I suspect.
I haven't had much time to work on gitit + filestore lately, and I'll have even less in the future. I'd rather focus my programming time on pandoc. So I'd be game if someone wanted to take the project in a new direction. Looks as if there are already Haskell bindings to libgit2: http://hackage.haskell.org/packages/archive/hlibgit2 A first step might be rewriting filestore to use libgit and libdarcs instead of shelling out to the programs. It also might be nice to create a filestore instance that uses a persistent in-memory datastore like acid-state; this would be very fast, and appropriate for a wiki (like hawiki) with mostly textual content. I would also not object to a rewrite using Yesod -- the type-safe URLs and the support for subsites would both be really useful in gitit. John