Pluto.jl vs Jupyter Notebook
Asked Answered
D

2

6

What is the difference between Pluto.jl and Jupyter Notebooks?

How do I decide which I should prefer for teaching students?

Is there a performance difference?

I only found https://www.reddit.com/r/Julia/comments/kxdjzh/pluto_vs_jupyter_notebook/, which does not include many details.

Dollarfish answered 13/5, 2022 at 12:22 Comment(0)
F
7

From Pluto.jl github page:

A Pluto notebook is made up of small blocks of Julia code (cells) and together they form a reactive notebook. When you change a variable, Pluto automatically re-runs the cells that refer to it. ...

The main difference between using Pluto.jl and Jupyter Notebooks with Julia is that Pluto.jl is dynamic. It re-runs all the above cells according to the last cell. Whereas outputs of Jupyter Notebook only change when the code blocks that created them change

Frore answered 13/5, 2022 at 12:29 Comment(1)
"above" and "last"?Anacreon
F
5
  • I find the largest pro of Pluto to be, that by design notebooks the same resuts. In Jupyter it is quite easy to create results that are dependent on the cell-execution order, which is hard to do in Pluto.

  • In jupyter you can chose to execute cells one-by-one, which can be beneficial, if you have large calculations going. This can not be done in Pluto, but one learns to take this into consideration, when writing notebooks.

  • Support for slides is very good for Jupyter. For Pluto only proof of concepts exist as far as I am aware.

  • Both are performant.

For teaching students I personally prefer Pluto. Some of the restrictions imposed make it much simpler to debug these notebooks (results do not depend on cell execution order). Also the notebook is basically a standard Julia source code file, which can be manipulated easily using any text editor. Pluto's Reactivity is also great in an educational setting, as it encourages students to play around with the notebooks. Lastly, there is the MIT course Introduction to Computational Thinking, which uses these notebooks for lectures and exercises and they are a great inspiration on how to use Pluto notebooks for teaching. I hope these insights are what you were looking for.

Frankie answered 13/5, 2022 at 15:58 Comment(5)
Coming from an R and Rmarkdown workflow, I love Pluto.jl, I just do not use Julia yet (or python). From what I understand Jupyter notebooks depend upon not only the order of the cells in the notebook (ie top-down) but on execution order. This seems problematic from a scientifically reproducible workflow perspective (if true- I don't use so this may have changed).Periderm
the only downside i've seen with Pluto is that the notebooks seem to download/install/compile required packages with each time you reopen/create them.Periderm
Updating requires a trigger. E.g if you make changes to using ... I too see the execution order issue as one of the main problems from a scientifically reproducible workflow perspective.Craniotomy
Another benefit is that a Pluto notebook contains a reproduceable package environment with all dependencies and their versions fixed. This is a main advantage compared to Jupyter. For long running cells, it is possible now to deactivate them in Pluto to prevent live updates.Tankage
Could you please elaborate on your comment that "in Pluto, but one learns to take this into consideration". What are some ideas about handling cells that take a long time to run? Thanks!Reproduction

© 2022 - 2024 — McMap. All rights reserved.