3 ms·
> Anything vertically separated can be done in parallel. This assumes no contention on a limited number of bowls or having only one kitchen tool for beating or
by Terr_ 2y ago
> Anything vertically separated can be done in parallel.
This assumes no contention on a limited number of bowls or having only one kitchen tool for beating or whisking etc. :P
I point that out not to demand that the metaphor be bulletproof, but because I think it may help explore something about state-handling and the FP/imperative split.
How might this tiramisu-tree model change if we were limited to N bowls and 1 beater and 1 whisk, unable to treat them as statelessly-shareable or endlessly-duplicable?
- williamcotton 2y agoSounds like you need a Kitchen Monad!
- mrkeen 2y agoYou're describing (safe) locking of resources, best put forward by Dijkstra in 1965 as the Dining Philosophers problem. I have yet to see a more practical, elegant solution than Haskell's STM for this: https://www.adit.io/posts/2013-05-15-Locks,-Actors,-And-STM-In-Pictures.html https://www.adit.io/posts/2013-05-15-Locks,-Actors,-And-STM-...