missionary

Andrew Wilcox 2024-11-26T07:44:10.183419Z

I'm reminded of Leslie Lamport's comment that he didn't find state diagrams very useful, I think I may understand what he was getting at.

➕ 1
whilo 2024-11-24T23:31:45.885469Z

Is it possible to call cloroutine continuations from the same break multiple times? Atm. it steps when it is called to the next point as far as I understand. (reading the code again...)

whilo 2024-12-02T09:50:45.022419Z

Thanks for sharing. I will take a look and reply there. It might take me a few days though. Do you have a deadline?

leonoel 2024-12-02T10:01:21.045609Z

I don't

leonoel 2024-12-02T10:01:38.321509Z

Please share your thoughts

whilo 2024-11-25T08:00:00.152629Z

Ok, interesting. What are you thinking about? Anglican does CPS here https://bitbucket.org/probprog/anglican/src/ab6111d7fa8f68f42ea046feab928ca3eedde1d7/src/anglican/trap.cljc#lines-644, which is somewhat a lean pure S-expression based approach, but its support for Clojure was not complete and it was sometimes difficult to debug since it got stuck in endless loops somehow. I have not spent a lot of time trying to figure it out, but I got cloroutine to work in SCI (babashka) earlier and am implementing a forking operation for it right now, which would allow me to use it as an isolated simulation environment that supports a sizeable subset of Clojure, so the cloning could be very powerful to generalize Anglican like this.

whilo 2024-11-25T08:01:01.014249Z

Where I can both fork the SCI env/interpreter and the remaining continuation from outside the interpreter.

whilo 2024-11-25T08:33:00.007359Z

Just as a side note: I think my earlier questions with respect to forking FRP state were ill-posed btw. I think you have to basically fork the interpreter and I don't think it is possible to fork computations that operate over mutable data structures in a reasonable way (e.g. flows or CSP channels). I think I will opt to an idempotent, durable and persistent message processing (similar to replikativ or Rama) and "reboot" missionary or core.async after an interpreter fork with new bindings and message delivery mechanisms. Maybe I can keep track of message delivery in Datahike for now, its performance should be good enough for that and it can be easily forked even with durability on (which Datomic cannot).

whilo 2024-11-25T00:54:09.698899Z

Found it, you can invoke the continuation with a copying function, which is very cool. Is there a particular reason for this interface? (I need to check missionary again, I guess it is used by it)

leonoel 2024-11-25T07:44:49.013309Z

The cloning feature was an afterthought

leonoel 2024-11-25T07:46:27.658949Z

There are several problems with the current cloroutine API, I'm actively thinking about an alternative

leonoel 2024-11-30T10:09:04.300349Z

The changes I'm planning to make in cloroutine - https://github.com/leonoel/cloroutine/issues/32

🔥 1