hledger, haskell
October 19, 2013

More on ledger

I promised to describe hledger today. But first I need to discuss ledger some more, to hopefully correct any wrong impression of it from yesterday’s post.

The bottom line: ledger is great, now more than ever. I’m also going to talk more about ledger and bugs than I wanted to. But the topic interests me, so here goes.

How buggy, really ?

Yesterday, as well as praising ledger I said “over time… it remained hampered by frequent bugs, outdated documentation”. This was true for a while, at least for me. Keep in mind I am a passionate, opinionated and picky software developer and have been a heavy user, explorer, and promoter of ledger. I ran ledger and hledger side by side to understand features and corner cases. What was an irksome bug to me might be unnoticed by others. For a while I probably saw more bugs than anyone else, perhaps excluding John W.

At that time ledger 2.x was current, and it was pretty easy to find bugs in it; ledger 3.x was in development, and also quite rough around the edges. This was even more true if you call missing or wrong documentation (including installation docs) a bug - which I generally do, especially if the situation persists for a long time. Which it did.

Once you got ledger installed and running, bugs were mostly in unusual code paths or combinations of functionality. So ledger bugs usually were (and are) deterministic, arising only in certain situations, often in the more esoteric features. So throughout 2.x and 3.x, if you got ledger installed you have always been able to run reports and get the right answers. Except when you trigger a segfault issue, which is unusual but not unheard of. I’m trying to be accurate here.

How is ledger now ?

Things are much better today. ledger 3.0 (prerelease) is the mainstream version. It has an extensive test suite and I hear it is very solid indeed. It is also blazingly fast, feature-rich, and has the biggest community of the ledger-likes. Many people rely on ledger daily for extended periods of time and have no problems. I would still be one of those people if Haskell wasn’t so darn good. In fact I am still one of those people - I will run ledger on occasion to compare results with hledger, answer support questions, or for features hledger doesn’t have.

Based on mail list and bug tracker chatter I believe non-severe bugs are not too uncommon in ledger 3. This seems very natural, given it’s extensive set of interlocking features and that its main developer has other demands on his time. All software has bugs.

What about hledger ?

Since we’re on the topic, let’s mention hledger bugs. I probably see more of John’s bugs and am blind to my own. But I do feel hledger has fewer easily-findable bugs than ledger, and I think this is worth talking about. I believe this is due to being second (much easier), being simpler and less featureful (by design and necessity), and being written in Haskell.

Do ledger and hledger get along ?

Lest you wonder. Yes, we get along great. I’ve kept hledger as close and cooperative a fork as possible. John is a pleasure to collaborate with, graciously sharing the #ledger IRC channel and ledger insights. I built and maintain ledger’s website and contribute IRC support. Designs and features have flowed both ways between the projects. What’s more, John is now a genuine Haskell nut and has his own Haskell-based ledger experiments cooking.

We’ll get back to hledger in the next post.