Live data from Hacker News

Scoped Propagators

orionreed.com

11–20 of 32 posts

Re: Scoped Propagators

#11

Some of the videos are broken for me (using Firefox). Otherwise looks pretty neat. Compared to FRP it is perhaps a bit more declarative in the definition of scopes, but otherwise seems equivalent. I'm interested in more details on this. I'm also a bit confused by > This model has not yet been formalised, and while the propagators themselves can be simply expressed as a function ... I have not yet found an appropriate…

> Compared to FRP it is perhaps a bit more declarative in the definition of scopes, but otherwise seems equivalent.

FRP systems are typically limited to acyclic graphs. The system in this article allows for cycles.

Re: Scoped Propagators

#12
As written, a "scope" is a function, s: G² → None + T, from the current global state and the previous global state to an optional value of some type T. Meanwhile, a "propagator" is a function, p: G² × A × B → B, from the current global state, the previous global state, a source node, and a target node to a new target node, such that p(g, g', a, b) = if s(g, g') is None then b else f(s(g, g'), a, b) for some f: T × A × B → B.

For example tick(g, g') = time(g') - time(g), and change(g, g') = if node_s(g') ≠ node_s(g) then () else None where node_s(g) gets the source node of the change scope from global state g.

In practice the outputs of a scope can be computed once per state change and called an event, rather than computed on demand each time it's used, and scopes which return None don't need to be propagated. Also, I suspect it would be useful to restrict scopes to (A × B)² → None + T or even just A² → None + T, so that events are limited to propagating along chains of edges.

Re: Scoped Propagators

#13
post #4

Interesting concept! It does remind me of the observables somewhat, where nodes are functions, which accept data coming in from events, which it transforms, and then chooses to emit new values or not. This flips that, so nodes are data, which accept functions from events, it applies that function to itself, then decides to propagate that event onwards or not. I like it! That model works really well for this sort of v…

I only glanced at the article, but it also reminds me of Dataflow programming, incrementally updated materialized views, etc. (all the same concept at the end of the day, and yes, very similar to observables)

Re: Scoped Propagators

#14
post #5

Some of the videos are broken for me (using Firefox). Otherwise looks pretty neat. Compared to FRP it is perhaps a bit more declarative in the definition of scopes, but otherwise seems equivalent. I'm interested in more details on this. I'm also a bit confused by > This model has not yet been formalised, and while the propagators themselves can be simply expressed as a function ... I have not yet found an appropriate…

All but two of the videos are broken for me on both Chrome and Firefox. I would love to see the rest! I encourage people to read the original Propagator Networks paper by Alexey Radul (advisor: Prof. Gerald Sussman of SICP) referenced in the Prior Work section. It's full of fascinating ideas. https://dspace.mit.edu/handle/1721.1/54635

As a workaround in firefox, I was able to right-click, "save video as", and open in VLC.

Re: Scoped Propagators

#15
post #4

Interesting concept! It does remind me of the observables somewhat, where nodes are functions, which accept data coming in from events, which it transforms, and then chooses to emit new values or not. This flips that, so nodes are data, which accept functions from events, it applies that function to itself, then decides to propagate that event onwards or not. I like it! That model works really well for this sort of v…

Why would it be good when a node is data, since the data is always changing and the function would stay the same?

Re: Scoped Propagators

#16
post #4

Interesting concept! It does remind me of the observables somewhat, where nodes are functions, which accept data coming in from events, which it transforms, and then chooses to emit new values or not. This flips that, so nodes are data, which accept functions from events, it applies that function to itself, then decides to propagate that event onwards or not. I like it! That model works really well for this sort of v…

I only glanced at the article, but it also reminds me of Dataflow programming, incrementally updated materialized views, etc. (all the same concept at the end of the day, and yes, very similar to observables)

It remind you of dataflow programming because it's literally the same thing.

Re: Scoped Propagators

#17
post #4

Interesting concept! It does remind me of the observables somewhat, where nodes are functions, which accept data coming in from events, which it transforms, and then chooses to emit new values or not. This flips that, so nodes are data, which accept functions from events, it applies that function to itself, then decides to propagate that event onwards or not. I like it! That model works really well for this sort of v…

Why would it be good when a node is data, since the data is always changing and the function would stay the same?

    the Scoped Propagator model is based on two key insights:
    1. by representing computation as mappings between nodes along edges, you do not need to know at design-time what node types exist.
    2. by scoping the propagation to events, you can augment nodes with interactive behaviour suitable for the environment in which SPs have been embedded.
It's pretty specific to UI similar to the examples, but in terms of these big infinite canvas UIs, you have a whole bunch of objects you need to make dependant on each other, but who ALSO hold their current state statically. Subtly different from a spreadsheet, where Excel for example treats functions (=$A$2) differently from a single value (4). Functions are always derived, where as single values don't rely on anything.

Like a sticky note on a canvas, should always be available to type into. But maybe we also want something else to change it's value when it changes. (key insights #2, this is for infinite canvases)

Rather than building some big god-object that stores all "root" state for the static value of things, and transforming that thru a big tree of functions you need to keep maintained, you could reverse it:

Each node only knows it's own state, but it's peers give it instructions about how to update itself to meet their business rules, for just that pairing.

The result is the same, it's a big web of functions, but now you don't have to make the distinction between "derived" state or "base" state. It's always static state, and things are just updated adhoc by these events that describe the changes without explaining "why" the "to" node has to apply them. (key insights #1, you do not need to know at design-time what node types exist.)

Re: Scoped Propagators

#18
This is genius, and very well described.

Could be a meaningful bridge between “nocode” and code, avoiding what seems like a common pain point of eventual nocode limitations. I know there are other solutions in this space, but yours is very nicely done.

Please continue work on this, and yell out if you need collaborators.

Re: Scoped Propagators

#19
post #4

Interesting concept! It does remind me of the observables somewhat, where nodes are functions, which accept data coming in from events, which it transforms, and then chooses to emit new values or not. This flips that, so nodes are data, which accept functions from events, it applies that function to itself, then decides to propagate that event onwards or not. I like it! That model works really well for this sort of v…

I only glanced at the article, but it also reminds me of Dataflow programming, incrementally updated materialized views, etc. (all the same concept at the end of the day, and yes, very similar to observables)

As Gerald Sussman says in "We really don't know how to compute!":

> It's not dataflow! It's closely related, but it's not.

https://youtu.be/HB5TrK7A4pI?t=2071

Re: Scoped Propagators

#20
post #5

Earlier quoted context omitted.

All but two of the videos are broken for me on both Chrome and Firefox. I would love to see the rest! I encourage people to read the original Propagator Networks paper by Alexey Radul (advisor: Prof. Gerald Sussman of SICP) referenced in the Prior Work section. It's full of fascinating ideas. https://dspace.mit.edu/handle/1721.1/54635

Would love to know which videos are broken and any other details so I can try and fix that!

Firefox doesn't support H.265/HEVC.

bridging.mov and examples.mp4 are working as they are H.264/AVC, the other videos are H.265/HEVC

Post reply on HN