[IPython-dev] Fwd: [SciTech] ActivePapers Python edition

Konrad Hinsen konrad.hinsen at fastmail.net
Thu Dec 12 10:11:47 EST 2013


Gabriel Becker writes:

 > I'm actually drafting a thesis chapter about this very subject right now in the context
 > of so-called "dynamic documents" in the R realm such as those processed by Sweave[1] and
 > knitr[2]. The issue is with how we determine and track dependency.

Thanks for your comments. What you describe is indeed very close to
the issues at the core of both ActivePapers in its current for, and of
an integration with IPython.

 > The solution to this that I am pursuing is essentially memoization
 > of code cells. That is, keying dependency detection and caching off
 > of the actual values of the inputs used by a cell, rather than
 > either the names of the input variables (as in the weaver[3], and
 > knitr[2]) or simple position in the document. This means that if

That sounds like a good approach.

 > The input detection necessary to do this can be difficult in a
 > general language like Python, but with some assumptions about the

I'll probably go for a simple approach that prefers to stay on the
safe side and re-run too much rather than not enough: unless the code
that was run is exactly equal to the current contents of the cells
concatenated in linear order, I assume the whole notebook needs to be
re-run. There's always room for optimization later.

Konrad.



More information about the IPython-dev mailing list