Re: Debugging assertion failures / printing the value of a value expression

2017-10-21 Thread John Lee
Thanks Simon I was referring to the combination of requirements below, which seems to not quite fit ledger. I don't mind so much how I achieve these with particular features: * Keep track of account balances (specifically bank balance) intermittently without recording all transactions (either

Re: Debugging assertion failures / printing the value of a value expression

2017-10-21 Thread Simon Michael
On 10/20/17 1:46 PM, John Lee wrote: I guess I should either dust off my very dusty C++ and try to fix it, or try one of the ledger spinoffs like beancount... maybe there are beancount / hledger people here who can comment re whether those systems have ways to tackle the problem from the thread

Re: Debugging assertion failures / printing the value of a value expression

2017-10-20 Thread John Lee
Thanks for this, but I wonder if you have read the previous thread I linked to fully? It discusses what I believe (from admittedly only a quick scan) are the same techniques you describe here, and the problems I ran into with those. Or did I miss something? Thanks again, I do appreciate any

Re: Debugging assertion failures / printing the value of a value expression

2017-10-20 Thread Michael Cooper
Ah, I misunderstood your original problem, apologies. Dodging your question again (since I really don't know the answer), I've also found that storing values in non-leaf accounts gets me into all sorts of trouble. It generally is confusing and my automation doesn't understand it. If this example

Re: Debugging assertion failures / printing the value of a value expression

2017-10-20 Thread John Lee
Hi Michael If you take a look at my previous thread here from a week or so back you'll see the problem you run into when trying to apply that to the transactions I posted in this thread. https://groups.google.com/forum/#!topic/ledger-cli/bqu-qNr6cjM Consider: 2017-10-01 * Opening Balance

Re: Debugging assertion failures / printing the value of a value expression

2017-10-19 Thread Michael Cooper
This isn't a direct answer to your question, but this is how I do these kind of balance checks: 2017/01/01 * Opening Balance Assets:Checking$1000 Equity:Opening 2017/01/02 * Savings Assets:Savings $100 Assets:Checking 2017/01/03 * Reconcile [Assets:Checking] $0 = $900

Re: Debugging assertion failures / printing the value of a value expression

2017-10-19 Thread John Lee
An example that currently has me puzzled: the first assert below passes, and the second fails. I'm interested both in learning why in this particular case, and more important, learning how to use ledger to debug problems like this in general. 2017-10-01 * Opening Balance