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

Hidden Dependencies - Always Re-Run Directive #657

Closed
jordanmb opened this issue Nov 7, 2020 · 7 comments
Closed

Hidden Dependencies - Always Re-Run Directive #657

jordanmb opened this issue Nov 7, 2020 · 7 comments

Comments

@jordanmb
Copy link

jordanmb commented Nov 7, 2020

I'm absolutely loving the interactivity of Pluto.

I've been working on audio software akin to Pure Data but with a Rust backend / Julia frontend interface. The problem I'm having is that I have hidden state dependencies in my code from building the underlying audio graph. The notebook cannot tell that my audio output must be re-run when I change a bound input parameter.

Is there some way to annotate an always-rerun directive so that any changes will result in my final output being regenerated? If not, can someone help or point me towards implementing this feature? Thanks!

@fonsp
Copy link
Owner

fonsp commented Nov 8, 2020

Is this helpful? #564 (comment)

@jordanmb
Copy link
Author

jordanmb commented Nov 8, 2020

Unfortunately no, since the dependencies are external.

@jordanmb
Copy link
Author

jordanmb commented Nov 8, 2020

Though creating no-op dependencies is possible, that would become very cumbersome for anything non-trivial.

@fonsp
Copy link
Owner

fonsp commented Nov 9, 2020

In that case, Pluto might not be the right tool for your problem. I can't make it work for everyone, sorry

@fonsp fonsp closed this as completed Nov 9, 2020
@jordanmb
Copy link
Author

jordanmb commented Nov 9, 2020

Fully understand, but it's so close to exactly what I need and mostly an adjustment to the dependency graph. I would love to contribute if you later feel that it could be an appropriate addition to your project.

@aplavin
Copy link
Contributor

aplavin commented Nov 10, 2020

Not sure if I correctly understand your problem, but looks like something like this could help:

# cell with input parameters:
a = 123

# cell with audio output that indirectly depends on "a"
begin
    a
    output_audio()
end

That is, just put your parameter somewhere in the output cell so that Pluto recognizes the dependency. I do this from time to time in similar scenarios.

@jordanmb
Copy link
Author

Actually, that is pretty helpful. I hadn't realized that you could have statements that don't evaluate anything like that. Thanks.

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

No branches or pull requests

3 participants