[Haskell-cafe] Speculation, OT: Program a Spreadsheet

trent shipley trent.shipley at gmail.com
Sun Nov 19 21:50:44 UTC 2017


Hi Olaf,

I must say you haven't convinced me that there is no use for a spreadsheet
functional language. Nor have you convinced that important, mission
critical work is not done in spreadsheets.

However, what you want certainly seems worthwhile.  Where can I see an
example of what Mathematica does. It costs the Earth, and I've never played
with it.

For simplicity I will assume serial code, not parallel.

Code is linear in almost all programming models. Code flows left to right
and down the page (screen, at least in English).

So what I imagine you want is something like a persistent code tracer, that
by default reruns the code as changes are made.

      | Input | Code      | Result | Comment | LaTeX  | Etc  | Many
Possible Columns
----------------------------------------------------------------------------
0001   | input1 | expression1 | result1 | comment1 | formula1 | etc1 |
-----------------------------------------------------------------------
And so on to the end of the program.

Like so?
A tabular view of the program and it's execution. You can program in the
table. The table auto-updates when you change stuff. Works best with LOTS
of screen real estate.

That would be kinda cool.

You might want to refine your idea and start another thread about that.
It's cool, but it's not a functional spreadsheet like in
https://www.microsoft.com/en-us/research/publication/a-user-centred-approach-to-functions-in-excel/
and
some of the article's citations, which is very much what I'm talking about.
It looks like I could have plagiarized most of my ideas from that article,
even though I've never read it before. (I was aware of comparisons of
spreadsheets to functional programming before.)


On Sun, Nov 19, 2017 at 1:39 PM Olaf Klinke <olf at aatal-apotheke.de> wrote:

> Hello Trent,
>
> let me suggest to step back and think about why people use spreadsheets.
> They provide access to data analysis functions, statistics and graphing
> that is otherwise missing (at least on) Windows systems. Serious number
> crunching is not done in spreadsheets, though. There is R, Matlab and the
> like. You should not try to comptete with that. The big selling point (in
> my eyes) of spreadsheets over scripting languages like R is that the data
> as well as the formulae and intermediate results are, well, spread out in
> front of your eyes. That is e.g. desirable when you need someone else to
> understand what you did and how you arrived at the answer given. But is it
> important that the intermediate result resides in cells C2 to C13?
> Certainly not.
> I wrote a small financial application in Haskell that would otherwise be
> done in spreadsheets. Haskell provided, via its type system, extra sanity
> checks and much more that spreadsheets don't provide. However, I often
> wished that there was a way to disassemble the computation into logical
> bits that can be formatted neatly and be presented to a human inspector.
> Haskell provides ways to do this, e.g. by mixing Haskell and LaTeX, or
> writing a small DSL with two interpreters, one for calculations, one for
> layout.
> So instead of enhancing a spreadsheet format I'd rather have a scripting
> language with a workbook file format à la Mathematica, where comments, code
> and results of computations are displayed together. Changing a formula
> triggers change in the results. (The workbooks I've seen don't do that.)
> Input data and intermediate results can be hidden or expanded via mouse
> click. Results can be traced back through the workbook's formulae up to the
> input data. (The latter is not always easy in spreadsheets.) One would need
> to research whether such a language exists. If not, I'd be happy to help
> develop it.
>
> Olaf
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20171119/2725039d/attachment.html>


More information about the Haskell-Cafe mailing list