News for hackers. Stuff that matters.
Re:Double-Entry Ledgers: The Missing Primitive in Modern Sof... by jgalt212 on Friday June 20, 2025 @07:34AM (#44326758)
I guess, but often, or often enough, you don't just need the balance now, but also then.
Re:Double-Entry Ledgers: The Missing Primitive in Modern Sof... by accrual on Friday June 20, 2025 @11:43AM (#44328812)
Makes sense. It seems like one would need a wrapper like "getBalance(accountName, dateTime)" which would abstract iterating over the ledger to find the balance at a certain time.

But I could see this being a performance hotspot - looping over rows and tallying a running sum across many accounts seems like a waste of cycles.

What's the alternative to the "what was the balance at date/time" in non-ledger based systems?

Re:Double-Entry Ledgers: The Missing Primitive in Modern Sof... by em-bee on Saturday June 21, 2025 @09:10PM (#44342161)
shouldn't the balance be calculated and and compared with the actual balance after every transaction? i have an account where money went missing. the only way to find out when that happened was to have a record of the actual balance after every transaction.
Re:Double-Entry Ledgers: The Missing Primitive in Modern Sof... by _boffin_ on Friday June 20, 2025 @12:18PM (#44329236)
Problem is solved with 4 timestamps.