Re:Pluto.jl – a reactive, lightweight, simple notebook
by WolfOliver on Friday August 28, 2020 @11:46AM
(#24306241)
I wonder how they are doing it? simply re-evaluating every cell?
[ Parent
| on HN ]
Re:Pluto.jl – a reactive, lightweight, simple notebook
by ddragon on Friday August 28, 2020 @01:54PM
(#24307902)
It's mentioned in the video [1], it does static analysis of the code to create a graph of dependencies (for example which cell uses a variable defined by another cell), so when you update any cell it will find what cells are affected by the change (the downstream nodes on a directed acyclic graph) and only evals the code on them (instead of running everything). Julia is particularly good for those kind of code analysis since it's a very Lispy language.
It also does a trick of creating new modules to manipulate scope to make deleted variables/import/cells invisible (and therefore free to be garbage collected).