Saturday, September 13, 2014

Spreadsheet-like program in the browser using loeb iteration and loop resolution

I finally did what I was trying to do: to add full spreadsheet like effects to hplayground the haskell-javascript framework that uses the haste compiler

See the example running:

I used the tryplayg IDE to develop the example and It works well. I have to improve it a lot however.

This program calculates speed, time and space. Each one depends on the other two. Each cell has two values: his current entered value and the expression which  calculates it from other cell values/expressions.  circularity is permitted.

The Cell recalculation code uses the famous loeb expression by Dan Piponi in the 2006. Until now by my knowledge there have'nt been any materialization of this formula on a real working spreadsheet. this one is close to it. Since loeb enters in a infinite loop when circular expressions are used, the program counts the loops and reduces complexity by progressively substituting formulas by cell values until the expression has no loops

This program is configured for immediate recalculation on cell change, but that can be adapted to allow the modification of more than one cell before recalculation by triggering it by means of a button.
Post a Comment