Describable, Typesafe Computations
summary
Compares three concrete solutions for auditable business calculations: plain logging (error‑prone and order‑dependent), treelog (a Writer/monad‑transformer based described computation), and an implemented library calclock that represents calculations as data (enum cases Variable/Expression/Binding), uses typeclass operators, and is zero‑dependency at core. Demonstrates a royalties example with a 75% royalty and a minimum keeper share of €0.80 per sale, shows custom min operator and squants integration, produces tree or flat serializable logs, guarantees log/value consistency, and has been used in projects though performance is unmeasured.
AI-written summary · about
chapters (14)
- 0:00Start
- 2:19Example use case
- 3:32SelfPub royalties calculation
- 4:28Calculation with logging
- 4:58Log output
- 11:03Accessing the result value
- 11:46Showing the tree log
- 12:11SelfPub royalty calculation log
- 12:39Assessment described computation
- 15:09Goals
- 16:04Solution
- 17:05calclog
- 43:52Summary (2)
- 45:36Thank you! Questions?
