I'm wasting a bit of time working on multi-core CPUs, parallel
execution, and distributed workloads.<p>Spreadsheet execution order is determined by data dependency.
If cell A depends on cell B then cell B must compute first.<p>The first optimization would be partial cell computation until the
dependent data is available.<p>Which thought leads me to linear types and distributed workloads.
One could block a computation waiting for a result. Linear types
seem like an excellent model for such communication. It is
especially interesting if the communicated values are not just a
simple cell value but more complex types.<p>Further down the rabbit hole is implementing the spreadsheet in lisp.
Each cell has its associated lisp function. The interesting aspect here
is that you transform a "time-based" model of computation to a
"dependency-based" model. Such a model is easily distributed.<p>One could write a "spreadsheet macro" in lisp with a list of functions
to embed in particular cells.<p>For a recent discussion see:<p>Homoiconic spreadsheets/ What, How & Why (by Eli Parra)
https://www.youtube.com/watch?v=U9uZlEqUQw0&ab_channel=LondonClojurians
The key distinction between Eli's approach and mine has to do with the primary approach. Eli is enhancing a spreadsheet. I'm approaching the problem as a new programming approach.<p>I'm suggesting that you could change the linear, time-oriented evaluation of code within your program without explicitly using a spreadsheet. This change of control flow based on spreadsheet-like dependency gives new freedom for things like distributed computing. Also unlike spreadsheets, there is no need to update only a single cell.
Obvious but i've not thought about it before...<p><pre><code> Interlinked with the value rule:
- All data cells can be read for any code cell
- A code cell's writes only the value of its data cell
</code></pre>
<a href="https://youtu.be/U9uZlEqUQw0?t=474" rel="nofollow">https://youtu.be/U9uZlEqUQw0?t=474</a> (start at 7:51)