On Sat, Aug 3, 2013, at 0:29, Harshad RJ wrote:
> On Sat, Aug 3, 2013 at 3:16 AM, John Wiegley <[email protected]> wrote:
> 
> > It is the sequence of transactions that matters, not their date ordering.
> 
> 
> Oh I didn't know that. It would have tripped me too had I used ledger in
> this manner. This becomes very difficult to analyze when transactions are
> spread across files and included together.
> 
> I am sure there is a good reason why the sequence is given importance. For
> example, it might otherwise be ambiguous to prioritize transactions within
> a day. Especially when = operator is used.
> 
> An alternative way to resolve the priority could be to error out and urge
> the user to define the sequence explicitly. For example, the user could
> specify the time of transactions within a day (for only those transactions
> that need ordering). Or instead of time, it could be some abstract number.

Over time I've found Beancount had very little practical use for intra-day 
checks and auto-adjustments. 

In the new version (recently rewritten), by design I've chosen not to do that. 
Assertions ("check" directive) always applies at 
midnight at the beginning of its date. Same with auto-adjustments ("pad"). 
There is no time, only a date (it's simpler), and the order of all declarations
is ignored, to the extent that you could shuffle or 
reorganize your input file and the output would be the same (easier to 
understand). I parse, creating the entries, then sort and process them.
All of which takes under 450ms on my laptop for my 6-7 years worth of 
transactions (in a mix of Python and C); it's not super fast, but it's fast
enough, especially given that this runs on startup of an http server that 
then just serves web pages from the already parsed list of entries.

The sort, however, takes into account the location in the file in the 
sort-key as a tie-breaker, i.e., the sort-key is (date, line-no). This makes
the registers look a little more like the input file where relevant-the entries
are in the same order as they appear-but otherwise has no other effect.


-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to