missionary

Jeremy 2025-03-29T20:08:13.942809Z

Hi, I'm lost regarding continuous flows. I had some preconceptions, but the wiki is pretty lacking and jumps straight forward to hooking it up with atoms and events. How exactly do they differ from discrete flows? what about signals? And I'm confused about the meaning of "semigroup". it's in the wiki and docs, but I didn't find any initial explanation

leonoel 2025-03-29T21:10:17.907869Z

A continuous flow is an effect producing a succession of states. In practice, it is just a flow with two special properties : • it's ready to transfer on boot - the initial state • transfer rate is decoupled from producer - intermediate states are discarded These properties are preserved by composition with the two continuous flow operators m/latest and m/cp. Continuous flows are usually created from either : • the successive states of a reference with m/watch, typically an atom • a reduction of discrete flow of events with m/reductions (which provides the initial state), followed by m/relieve (the decoupling part). A signal is a memoized view of a continuous flow, it is used to share states produced by a single effect across multiple consumers. Unlike its underlying effect, it has its own identity (i.e. m/signal is not referentially transparent). It is conceptually similar to the primitives found in popular reactive libraries like reagent, except it cannot be derefed - it must be composed like any other effect. The semigroup thing is an advanced feature that allows the succession of states to be produced as a sequence of diffs, assuming the diffs can be collapsed (via the semigroup function). The collapsing property is what allows signals to be insensitive to history, i.e successive states are consistent no matter when the signal is subscribed.

👍 1
euccastro 2025-03-29T22:27:04.741979Z

Semigroup is a general mathematical concept, not particular to missionary. If you are familiar with that concept, it helps you understand how certain parts of missionary work, and why they are sound. If not, it is probably safe to skip references to that concept in missionary docs, but if you are curious you can skim the definition in wikipedia and ask your favorite LLM to give you a gist of what it is about, and examples of how the concept is applied in other fields.

Jeremy 2025-03-30T00:08:48.419679Z

Thanks @leonoel. After lots of of re-reading and tail-chasing between ur reply wiki, docs, and repl trials, I now mostly understand the concepts. llms kept hallucinating stuff like m/hold (seems to be what m/signal really is), m/map, and m/filter, which confused me even more. I do think the wiki and docs are overly oriented to the perspectives of those in-the-know of or familiar with certain concepts.

👍 1
Jeremy 2025-03-30T00:09:25.125019Z

@euccastro yup, I'd save that for later