Language, Expression and Design



August 2014

hara documentation published

by Chris Zheng,

I've been chipping away at a small utility library called hara (in the spirit of useful, clojure-utils and medley) for the last 2.5 years. After much trial and error, two major rewrites as well as structural changes to the project, I'm now confident enough to release documentation to cover at least part of the functionality that won't change. It's also made me appreciate just how difficult it is to achieve simplicity.

The documentation can be found here. There are a four highlights of the library that I would like to point out:

  • The first is that you can use as little or as much of the library as you want. Each namespace is actually its own maven package. This was mentioned in a previous post about lein-repack

  • The docstrings as well as html have all been generated from tests using midje-doc. This is seriously cool because I hate writing code examples just for the sake of it.

  • The library includes a code abstraction I named the abstract container pattern. There are two forms in the hara.extend: extend-abstract and extend-implementation that have been extracted out from the code pattern described.

  • Code as data is embraced through the hara.expression package. I really like the simplicity of how code can be loaded from a config of sorts with this approach.

There is not much user documentation or how each of these packages can be used in a particular context. Oh well. I don't mind. I wrote it mostly for myself anyway =)

comments powered by Disqus