|
|
Subscribe / Log in / New account

An introduction to Pluto

An introduction to Pluto

Posted Nov 4, 2020 13:29 UTC (Wed) by clugstj (subscriber, #4020)
Parent article: An introduction to Pluto

"In Jupyter, when a cell is executed, the result appears, and nothing else happens. Any global variables defined in the cell are available for subsequent execution of other cells. The variables can be redefined freely. The upshot is that the output of any particular cell execution depends on a hidden global state: which cells were previously executed and in what order.

Pluto, instead, analyzes the code in all of the cells and constructs a dependency graph, so that it knows the order in which the cells must be executed; this is based on which cells use which variables. Cells can be grabbed with the mouse and arranged in any order and this has no effect on the results. When the code in a cell is changed, the cell is run; all of the cells that depend on it, and only those cells, are also run, in dependency order. Therefore one is not allowed to define a global variable in more than one cell; an attempt to do so results in an error message."

So, Pluto is a spreadsheet and Jupyter is a broken spreadsheet?


to post comments

An introduction to Pluto

Posted Nov 4, 2020 13:46 UTC (Wed) by leephillips (subscriber, #100450) [Link]

Pluto's reactive model is similar to a spreadsheet.

An introduction to Pluto

Posted Nov 5, 2020 11:08 UTC (Thu) by wjt (subscriber, #56250) [Link] (1 responses)

Another implementation of this spreadsheet-style notebook-with-dependency-graph concept is Observable, by the authors of the popular D3.js data visualisation library. JavaScript's not my particular cup of tea, but spending a little time with Observable last year convinced me that the Pluto authors are right: the hidden global state is a fundamental flaw in the Jupyter execution model.

Spreadsheets are probably the most widely-used programming environment, despite their own flaws, so tools which bridge the gap between that and "real" structured programming environments are (IMO) important.

An introduction to Pluto

Posted Nov 9, 2020 14:41 UTC (Mon) by ballombe (subscriber, #9523) [Link]

> the hidden global state is a fundamental flaw in the Jupyter execution model.

Agreed. This makes Jupyter (and maple, etc.) problematic for teaching mathematics because students will invariably manage to put
the worksheet in an inconsistent state and will accept the incorrect result as true 'since the computer says it'.
Then follows an awkward discussion with the teacher.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds