4 ms·
Your complaints resonant strongly with me. I'd really love an ideally typed expression-oriented language to take notebook programming to the next level ... Th
by breatheoften 8y ago
Your complaints resonant strongly with me.
I'd really love an ideally typed expression-oriented language to take notebook programming to the next level ... This is my dream for what I want from swift notebooks ...
Something that:
- memoized all (non-loop?) values created in the notebook file scope
- automatically invalidated memoized entries after source change using control flow analysis and code coverage data from previous runs
- provides an approximation of the conceptual model of re-running the whole notebook 'from the beginning' when the notebook is executed -- but pulls memoized values from the memoized cache when present to make execution fast and to avoid repeating side-effects
- allowed for easy to issue interactive 'invalidate all memoized entries before/after here' operations in the notebook file ...
- involving editing code normally in a regular source-file in ide (with maybe a different extension to imply the different execution semantics)
- allowed for execution of code in debugger when desired without having to change anything ...
- supported inline graphical representations
- supported wiring custom graphical ui models into the notebook's execution context ...
- chubot 8y agoYes, in short, I think we both want the "dataflow model" and not the "stateful update" model. If anything should use the dataflow model, it's data analysis!!! And yes that's why I mentioned Observable, and I'm glad jashkenas also responded. As far as I understand, it's like a spreadsheet, so when you update your inputs, the outputs become consistent automatically. It's sort of like Make (or perhaps Make in reverse). Dataflow also allows your code to be parallelized. Some scientists don't care about this, but engineers do. It's an eye-opening experience to speed up naive data analysis by 1000x or more with shell scripts and a little C++.
- jashkenas 8y agoFantastic list! I'd encourage you to give https://beta.observablehq.com https://beta.observablehq.com a try. From all of your points — aside from a statically typed language and editing in your normal IDE — we try to hit that target on the nose. Every cell is only reevaluated when any of its inputs changes, inline and custom graphical representations can render your live data — and even be used as values to be passed themselves as inputs to other cells. For a very simple example, see: https://beta.observablehq.com/@mbostock/d3-brushable-scatterplot https://beta.observablehq.com/@mbostock/d3-brushable-scatter...