You are viewing archived messages.
Go here to search the history.

Pandi Lin 2025-09-08 21:00:41

Hi everyone ** đź‘‹

I’ve been working on a JavaScript implementation of Sussman & Radul’s propagator model and wanted to share some progress + questions. here's the link to the repo: github.com/Semi-0/Propagator

I currently have two branches:

  • A custom push-based version (works, but amb can get weird). (In the AMB branch)
  • A more f aithful scheduler-based version, closer to the original design. (but amb still acts weirdly when execution gets large)

It supports almost all of the original Scheme machinery, and I’ve been experimenting with a reactive extension so propagator networks can drive UI updates.

Lately I’ve been exploring some theory: I noticed interesting parallels between wired diagrams in category theory and propagator networks , and I’m researching how to separate representation from execution (syntax vs. scheduler). And how I can perhaps making the propagator more self-reliant as independent programming languages.

Since I’m pretty new to open-source, I’d really appreciate advice on two fronts:

  • Research direction → does this “wired graph <-> propagator <-> representation/execution” connection resonate with anyone? Are there papers or projects I should look at?
  • Sharing the code → what’s the best way to make an infrastructure repo like this easier for others to understand? (Docs? examples? small demos?)

Thanks in advance for any pointers

Pandi Lin 2025-09-08 22:38:29

For anyone not already familiar with propagators, here’s a quick refresher:

A propagator network is a collection of small, independent agents connected by cells that hold partial information. Each agent watches its inputs and, whenever it can deduce something new, it updates other cells. Unlike ordinary functions, information can flow in many directions at once — for example, if you know two sides of a right triangle, the Pythagorean propagator can solve for the third no matter which two you provide. This makes propagators a general model for constraints, dataflow, multi-directional reactivity and incremental reasoning.

When Leggett 2025-09-09 15:07:39

I’ve never actually worked with propagators - they’ve always been a little academic for my needs, but I am interested in them. I’ve written reactive/incremental compute systems from scratch, and there’s a little resemblance, but I’ve mostly just heard about them from seeing some talks online and reading a bit about it. I’m curious the scale of system you’ve built with propagators.

When Leggett 2025-09-09 15:10:39

In terms of your questions - have you looked at Statemate for inspiration? It’s more specifically for reactive systems, but it has a strong separation of spec and implementation and uses diagrams.

Pandi Lin 2025-09-09 17:12:42

i am primarily an artist and designer working with multi-media, so i work with propagators more frequently on creative exploration. The current prototype face scalability issues because all the intermedia value are retain in the memory, this gains expressiveness but also creates memory pressure. i think this could be solved by distinguishing between discrete and continuous cell. What draws me to propagator is how they enable language level expressiveness while the topology of graph is traceable and modifiable at run time, and all the value is inspectable. Also compound propagator reinforce composable structures naturally. Most reactive systems i encountered in production level seems to deviate from the core ideas in the FRP from first principle and original Haskell implementation of FRP around behaviour composition, like (draw (circle mouse-position)) where every behaviour is a pure function, so they maintain predictability and testability. And in Propagator because every cell is continuous value, therefore you could have similar behaviour composition.

Pandi Lin 2025-09-09 17:17:53

The most promising aspect for me is how propagator might be utilized in live coding. Right now most tools for artist are imperative like Processing, or open-framework. A few advanced tool like Tidal Cycle made by Alex McLean utilizes reactive programming. But propagators might have same expressiveness with functional reactive programming while being much more generic and utilizing multi-directional linking. This could potentially enable cooperative visual audio or even more experimental cross-media uses. In live coding, this might enable something like: (to-synthesizer (take-arm-rotation (gesture-recognition webcam)) audio-out)

(bi-link circle-position (some-transform-function synthesizer))

Pandi Lin 2025-09-09 17:18:05

Since you've built reactive/incremental systems, what drew you away from propagators being too academic?

Pandi Lin 2025-09-09 17:20:04

also thank you for your inspiration i am reading the documents right now

Pandi Lin 2025-09-09 17:29:50

What's particularly interesting is that while in reactive programming, connecting multiple reactive functions to one subject is not recommended (due to side effects, resource issues, and race conditions), in propagators this is actually encouraged for robust structure.

Cells are built to accumulate all related information, then delay the decision of what to do with that information. So you could have multiple sensor tracks feeding data from different channels with different world views into the same cell, and the dependency tracking system and contradiction handler can determine what to do with these messages - whether to combine them, defer them, or resolve conflicts, or attempt selecting them based on what might fit in a bigger picture

Pandi Lin 2025-09-08 22:38:29

For anyone not already familiar with propagators, here’s a quick refresher:

A propagator network is a collection of small, independent agents connected by cells that hold partial information. Each agent watches its inputs and, whenever it can deduce something new, it updates other cells. Unlike ordinary functions, information can flow in many directions at once — for example, if you know two sides of a right triangle, the Pythagorean propagator can solve for the third no matter which two you provide. This makes propagators a general model for constraints, dataflow, multi-directional reactivity and incremental reasoning.

Paul Tarvydas 2025-09-09 02:16:07

🎥 PBP Part Basics

PBP Part Basics

Guyren Howe 2025-09-09 05:48:11

How is this different from logic programming, with the similar property that information can “flow in many directions at once”?

Pandi Lin 2025-09-09 13:09:55

Propagators are a more generic substrate than logic programming, similar to arrow and monad. Logic programming can be seen as one specialization: if your cells carry logical constraints and your propagators perform unification, you get a logic programming system. But unlike Prolog, the same network could simultaneously host reactive updates, arithmetic constraints, or other inference styles. In fact, Sussman & Radul’s original work shows that when propagators are specialized for logic programming, you also get constraint programming “for free,” since both are just ways of refining partial information.

William Taysom 2025-09-09 20:57:49

Extremely insightful. Anyone familiar with monads will know they get messy when you start feeling the need for lifts and, heaven forbid, transformers. That's when something like the propagator model begins to feel like a good option. Start with a base program (the network) and then instead of messing it up with holes for lifts and transformers, insert a propagating value and let it figure out how and where to lift things. Propagators are especially good for whole program transformations.

Pandi Lin 2025-09-10 09:58:39

Indeed also in Propagator (ts implementation and original version) it has a layered datum system dedicated to handle side effects, dependency tracking system was being built upon that, the concept was inspired from monad but being much more flexible than that, also in my impl I embedded a first class no-compute value, which hints Propagator that to not propagation(I know this naming was bit arbitrary, maybe using maybe monad is better) this works well when some operation failed to succeed(like fetch element from array, or dict) but not count as an error, and i feel it was much more conceptually coherent than mapping over monad

William Taysom 2025-09-11 16:29:13

I'm going to need to look into this...

Pandi Lin 2025-09-09 13:15:32

In my current implementation, I initially separated the reactive scheduler from the “normal” propagator scheduler — which was a mistake, since one of the strengths of the paradigm is unification. I’m planning to merge them so that reactive updates, logic propagation, and constraint solving can all coexist in the same scheduling loop.

Guyren Howe 2025-09-09 19:09:33

I can’t find a working link here or in the YouTube video. For those interested in further info about Propagators, see: wiki.futureofcoding.org/Propagators

TIL that we have a wiki…

Christopher Shank 2025-09-09 20:24:57

Orion Reed and I submitted a positional paper for LIVE 2025 called "Live Programming in Hostile Territory". Now that it's been accepted, I'm excited to hear peoples thoughts and feedback! It touches on a topic wider than just live programming and, at least to me, is very relevant to the FOC community. Here is the abstract:

Live programming research gravitates towards the creation of isolated environments whose success is measured by domination: achieving adoption by displacing rather than integrating with existing tools and practices. To counter this tendency, we advocate that live programming research broaden its purview from the creation of new environments to the augmenting of existing ones and, through a selection of prototypes, explore three adversarial strategies for introducing programmatic capabilities into existing environments which are unfriendly or antagonistic to modification. We discuss how these strategies might promote more pluralistic futures and avoid aggregation into siloed platforms.

folkjs.org/live-2025

Andrew F 2025-09-09 20:48:10

All I can say is I'm in favor of adversarial interop! :D

Tom Larkworthy 2025-09-09 20:52:24

awesome piece, it made me think that targeting a static HTML file as a programming environment is not far enough, I should be aiming to target a div, wherever it may be (e.g. on someone else's website).

William Taysom 2025-09-09 21:04:02

I'm partial to the "competitive compatibility" phrasing, and AIs are proving especially good with the gross glue and shady shims that help get systems to talk to each other.

Christopher Shank 2025-09-09 21:32:02

Tom Larkworthy ha love it! I think you'd like this POC we have of HTML pipes to author computational notebooks with one new custom HTML element

folkjs.org/demos/pipes.html

Christopher Shank 2025-09-09 21:45:49

@William Taysom We debated using the term adversarial malleability (that Orion previously coined) in the paper as it more explicitly points to end user's adversarially modifying their software. Interop and compatibility have a connotation that implies more technical literacy.

William Taysom 2025-09-09 22:03:13

Yes, for your instance, the choice of terminology is good.

Tom Larkworthy 2025-09-10 06:08:48

Oh folk-pipe is great!

github.com/folk-js/folkjs/blob/main/packages/labs/src/folk-pipe.ts

Observable has Generator.input which listens to events and streams the values too (here). Thats the HTML -> reactive value direction. It does not have the other direction AFAIK, been looking for something!

I only recently realized JS Generators have the resource tidy up built in Generator.prototype.return . Worth knowing about if you not noticed, as they compose with js language features like yield * and for .. of.