Hacking at darcs

After a little more looking at darcs, I think I’m willing to live with its flaws. I don’t think I mind the lack of a nice repository for long-term storage — I haven’t managed to grow to like any of the others I’ve seen (cvs, tla, subversion, aegis), anyway. Tarballs will do in the meantime, and not having to worry about a heavy-weight repository when I don’t want to is cool.

Not having support for metadata (timestamps, permissions, or ownership) does still concern me though, so I decided to have a poke at darcs’ internals to see if that can be fixed. That happens to mean I need to learn Haskell (which I’ve been meaning to do since 1997, admittedly), so maybe when Andrae continues his programming theory blogging I’ll actually be able to follow what he’s talking about. Scary.

Anyway, Haskell’s a nice language to express darcs in; pattern matching definitely pays off, and monads do seem to keep the code reasonably clear. It’s still pretty complicated: reading three thousand lines of code implementing something you don’t understand in a language you don’t know, with an extended form of a grammar you’ve mostly forgotten anyway doesn’t make for a walk in the park. In any case, I think I grok it enough to think a fix for the metadata issue is possible, and David Roundy (the darcs author) seems to largely agree. Cool. Going from possible to patched isn’t trivial though.

In the meantime, and given I’ve decided not to use darcs as a primary/permanent/public storage format (yay tarballs!), it seems like now’s a good time to check various things into darcs and see what happens. For regular programming it does seem like timestamps shouldn’t matter, and while not having execute bits might be annoying, I can certainly live without everything else.

Leave a Reply