[darcs-users] ANN: hashed-storage 0.1

Petr Rockai me at mornfall.net
Tue Jan 20 10:17:20 UTC 2009

Hi there,

I have put together an initial proof-of-concept implementation of a
Storage.Hashed module.

The idea is to build on SlurpDirectory, while avoiding IO interleaving and also
reducing code complexity and providing "nice" API. This is sort of first step
in a hopefully longer set of refactors in the spirit of "bottom-up" design
school. However, I'll first provide documentation and unit tests for the
library and only when that is done, I will look into replacing parts of darcs
codebase with references to the library.

What the library currently provides can be seen in the haddock-produced

To give at least one example:

readDarcsHashed "_darcs/pristine.hashed" (Hash $ BS.pack "0000000198-d8d4ddb418707dbbf522720e98b88526b7ad440d855eb16a73e5299690237652") >>= flip writePlainTree "pristine.plain"

And check that pristine.plain really contains a copy of the pristine tree (this
is inside the hashed-storage repo itself). That reminds me, the darcs repo is
at http://repos.mornfall.net/hashed-storage/.


PS: I am not uploading to Hackage yet, for two reasons: I am not sure about the
name, and the library is far from useful as of now. I'll let you know about
eventual progress.

PPS: The other motivation for the library is to play around with alternative
packed and hashed formats. Something simple that would produce fewer files than
current darcs format is desirable. Reason: various filesystems and http, which
handle many files rather poorly.

Peter Rockai | me()mornfall!net | prockai()redhat!com
 http://blog.mornfall.net | http://web.mornfall.net

"In My Egotistical Opinion, most people's C programs should be
 indented six feet downward and covered with dirt."
     -- Blair P. Houghton on the subject of C program indentation

More information about the darcs-users mailing list