Skip to content

Instantly share code, notes, and snippets.

@dustingetz
Last active April 10, 2024 10:58
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dustingetz/08c87050df3a26874d41886777422e8e to your computer and use it in GitHub Desktop.
Save dustingetz/08c87050df3a26874d41886777422e8e to your computer and use it in GitHub Desktop.
Missionary concept map

Missionary concept map

Missionary primitives fit into three categories:

Effect descriptions = pure functional programming which is about trees not graphs

  • continuous flow, m/?< (switch)
  • m/watch, m/latest, m/cp
  • m/observe
  • m/reductions, m/relieve
  • discrete flow, m/ap - switch and concat
  • m/eduction — discrete flows model event streams, which are simply async sequences

Note: These are all referentially transparent primitives that construct values or "recipes" that describe effects.

Publishers = "observable sharing," this is what gets you from Tree to DAG, and is no longer pure functional

  • m/signal
  • m/stream
  • m/memo (task)

Note:

  • the difference between effect descriptions and observables is memoization, which means state
    • signal/stream return stateful objects (identity) which carry the memoization.
  • this section describes the next iteration of Missionary, which is under active development as of this writing (2023 Feb 24). Leo figured out how to remove m/reactor (see leonoel/missionary#70). m/memo is new, and m/signal / m/stream no longer get a !

Ports = process coordination devices – think stateful objects, this is a form of OOP.

  • Discrete ports:
    • m/dfv = mutable single assignment reference
    • m/mbx = mutable queue reference. Fire and forget. Unbounded queue. Not backpressured [bad]. like an actor (actor = process + mailbox). All actor systems have mbx. All actors are fire and forget. Lack of backpressure is a reason Rich doesn't like actors.
    • m/rdv = channel/queue with backpressure; only put one value at a time until taken
  • Continuous ports:
    • atom – already exist so missionary doesn't add
      • this is a recursion primitive in practice - for cycles

Note: in Electric Clojure, ports are constructed in userland; the compiler does not emit ports. State and coordination is fully in userland control!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment