3 ms·
Math with time (and space/memory)... You just found the difference between computer science and math. And the reason proof-of-work in blockchains is possible.
by cel1ne 6y ago
Math with time (and space/memory)... You just found the difference between computer science and math. And the reason proof-of-work in blockchains is possible.
- nine_k 6y agoRegarding time... It's sometimes not easy to say what happens when in a Haskell program. Yes, monads give you a sequence, but it's usually not the one sequence of an imperative language.
- nybble41 6y agoIndeed. And while monads provide a certain kind of sequence, it's important to remember that what is being sequenced is just some data dependencies—later effects can depend on the result of earlier effect. The evaluation order can be completely different depending on the type of monad and how the data is actually used. For an extreme example, take the forward & backward state (or "Tardis") monad[1], or for that matter any monad that implements MonadFix (including IO). The fact that the code is written in some order using a monad does not imply that it gets evaluated in that same order. [1] https://hackage.haskell.org/package/tardis-0.4.1.0/docs/Control-Monad-Tardis.html https://hackage.haskell.org/package/tardis-0.4.1.0/docs/Cont...