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

Pluto has hidden state and a mutable workspace in plots #2344

Closed
najtin opened this issue Oct 26, 2022 · 1 comment
Closed

Pluto has hidden state and a mutable workspace in plots #2344

najtin opened this issue Oct 26, 2022 · 1 comment
Labels
other packages Integration with other Julia packages reactivity The Pluto programming paradigm

Comments

@najtin
Copy link

najtin commented Oct 26, 2022

  1. 📹 A video recording demonstrating the problem. (You can drag a video file into this box)
    ezgif com-gif-maker(1)

  2. 📝 A short Pluto notebook file. (Upload the notebook file to https://gist.github.com/ and include the link.)
    https://gist.github.com/najtin/2ee0e788dffd86f32c53a619ed5964cb

  3. 🤕 Try to clearly explain what the problem is, it might not be obvious to others! Instead of saying: "This does not work.", try to say: "I expected ..., but instead I am seeing ..."

In the readme of this repository it states:

Pluto offers an environment where changed code takes effect instantly and where deleted code leaves no trace. Unlike Jupyter or Matlab, there is no mutable workspace, but rather, an important guarantee:

At any instant, the program state is completely described by the code you see.

No hidden state, no hidden bugs.

Therefore i expected that the order in which i run the cell wouldn't effect the output of the notebook. Maybe there is a misunderstanding somewhere on my side. What is happening is that the order in which i run the cell does effect the output of the notebook.

You can even delete the histogram cell after you ran it with shift+enter, and than run the plot! cell. Thus, Pluto does offers an environment where deleted code leaves traces, and that it has indeed a mutable workspace like Jupyter and Matlab.

Thanks for your time!

@fonsp
Copy link
Owner

fonsp commented Nov 1, 2022

Thanks for the issue @najtin !

In this case, a design goal of Pluto (no hidden state) cannot align with a design goal of Plots.jl (a "current plot" concept with modifier functions like plot!).

These misalignments happen sometimes, because we would like to support all packages, even if they are designed for an imperative programming style. We have some discussion about how to improve this experience here: #316 and #564

@fonsp fonsp closed this as not planned Won't fix, can't repro, duplicate, stale Nov 1, 2022
@fonsp fonsp added reactivity The Pluto programming paradigm other packages Integration with other Julia packages labels Nov 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
other packages Integration with other Julia packages reactivity The Pluto programming paradigm
Projects
None yet
Development

No branches or pull requests

2 participants