Skip to content
This repository has been archived by the owner on Jan 17, 2020. It is now read-only.

Change subscriptionsFn to take a model as an argument #125

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Change subscriptionsFn to take a model as an argument #125

wants to merge 2 commits into from

Conversation

astynax
Copy link

@astynax astynax commented Oct 15, 2017

Closes #116

Copy link
Owner

@z0w0 z0w0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a really good first step, but I'm fairly sure this won't continuously re-jig the subscriptions every update with the new model, which is what it will need to do. Please correct me if I'm wrong.

helm.cabal Outdated
@@ -1,5 +1,5 @@
name: helm
version: 2.0.0
version: 3.0.0
Copy link
Owner

@z0w0 z0w0 Oct 15, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should stay at 2.0.0 as that hasn't actually been released yet

@astynax
Copy link
Author

astynax commented Oct 16, 2017

@z0w0 you are right, subscriptions should react on model changes. I'll try to dig in this direction

@z0w0
Copy link
Owner

z0w0 commented Oct 18, 2017

@astynax should be able to change stepAction in Helm.hs to change actionSmp to be the result of calling subscriptionsFn with the updatedModel.

Let me know if you'll have the time to do that, otherwise I'll merge and adjust that myself :)

@astynax
Copy link
Author

astynax commented Oct 18, 2017

But if you call subscriptionsFn, how this new SignalGen replace the old one inside running Elerea's graph?

@z0w0
Copy link
Owner

z0w0 commented Oct 18, 2017

Hmm, true. It would generate a new graph every time. Probably not ideal.

@Ulrar
Copy link

Ulrar commented Dec 17, 2017

I might be off here, but if the goal is to allow changing subscriptions at runtime, wouldn't be simpler to just allow the use of a Cmd to either delete / create a subscription, or to request the call to the subscription function (i.e. Cmd.updateSubscriptions) ? That way subscriptions would be re-calculated only when needed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants