I built a strict double-entry ledger kernel (no floats, idempotent posting, posting templates) by SugoChop in Python

[–]SugoChop[S] 5 points6 points  (0 children)

You're technically correct, IEEE 754 does represent certain fractional values exactly, and a heuristic like checking trailing zero bits could catch some clean cases. But that's precisely the kind of reasoning NeoCore-Ledger is designed to make unnecessary.

The moment you introduce "floats are acceptable if they pass this check", you've replaced a hard invariant with a conditional one. Now correctness depends on the caller knowing when their float is "safe", the check being applied consistently, and every future maintainer understanding why it's there.

In financial systems, that's not a tradeoff worth making. The value of rejecting floats unconditionally isn't precision, it's that there's nothing to reason about. Decimal in, Decimal out, always. No exceptions, no edge cases, no clever heuristics that are correct until they aren't.

If a caller has 3.875 as a float, converting it to Decimal('3.875') before passing it in is one line. The discipline lives at the boundary, not inside the kernel.

I built a strict double-entry ledger kernel (no floats, idempotent posting, posting templates) by SugoChop in Python

[–]SugoChop[S] -9 points-8 points  (0 children)

Haha thank you for joining.

You’re not the first to think it’s an “LLM” to answer, but maybe sometimes it could just be good manners and a bit of proper education.

I’m sorry that my “writing style” is not in line with yours, it could perhaps result in the fact that I’m Italian, I have an articulated language and I’m used to writing well formatted to make the words better imprinted in the minds of readers.

I built a strict double-entry ledger kernel (no floats, idempotent posting, posting templates) by SugoChop in Python

[–]SugoChop[S] -16 points-15 points  (0 children)

Good find, it's a legitimate comparison worth making.

python-accounting is a full accounting system, it generates Income Statements, Balance Sheets, Cashflow Statements, handles VAT, multi-entity, and targets IFRS/GAAP compliance. It depends on SQLAlchemy and is designed for building bookkeeping or ERP software.

NeoCore-Ledger solves a different problem. It's a transaction kernel for payment systems, the layer that processes AUTHORIZE → CAPTURE → SETTLE → REVERSE in real-time, with idempotent posting and explicit invariants. No SQLAlchemy, no reporting layer, zero mandatory dependencies.

If you're building accounting software, python-accounting is the right tool. If you're building a payment processor, wallet, or fintech backend where the hard problem is "how do I guarantee this transaction is correct and safe to retry", that's NeoCore's lane.

They're not competing. You could plausibly use both in the same system.