Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cycles in continuous time - distill the essence of problem, find correct patterns and provide helpers #99

Open
leonoel opened this issue Nov 18, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@leonoel
Copy link
Owner

leonoel commented Nov 18, 2023

There is a clear need for cyclic dataflow in continuous time. Cycles can be implemented with atom, watch and ?<, the pattern works but is hard to get right and involves a lot of boilerplate. with-cycle seems to be an interesting path forward, a synchronizer derived from ?< conceptually equivalent to the following implementation :

(defmacro with-cycle [[sym init] & body]
  (let [a# (atom ~init)
        ~sym (m/?< (m/watch a#))]
    (reset! a# (do ~@body))))

Open questions :

  • what are the use cases for cyclic CT dataflow ?
  • can all of them be easily solved with with-cycle ?
  • are there better alternatives ?
@leonoel leonoel added the enhancement New feature or request label Nov 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant