Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Linear types, distributed compute, spreadsheets, and Lisp
3 points by daly on Jan 1, 2023 | hide | past | favorite | 4 comments
I'm wasting a bit of time working on multi-core CPUs, parallel execution, and distributed workloads.

Spreadsheet execution order is determined by data dependency. If cell A depends on cell B then cell B must compute first.

The first optimization would be partial cell computation until the dependent data is available.

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.

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.

One could write a "spreadsheet macro" in lisp with a list of functions to embed in particular cells.

For a recent discussion see:

Homoiconic spreadsheets/ What, How & Why (by Eli Parra) https://www.youtube.com/watch?v=U9uZlEqUQw0&ab_channel=LondonClojurians



@daly I’m working on something relevant here and would love to discuss; email me: [email protected]


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.

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...

  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

https://youtu.be/U9uZlEqUQw0?t=474 (start at 7:51)





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: