Linear types, distributed compute, spreadsheets, and Lisp

https://news.ycombinator.com/item?id=34212440
by daly • 4 years ago
3 4 4 years ago

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

Related Stories

Loading related stories...

Source preview

news.ycombinator.com