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

trent shipley trent.shipley at gmail.com
Sun Nov 19 15:41:28 UTC 2017


ASCII examples (view in monospaced font):

NormalSheet
-------------------------
  | A               | B |
-------------------------
1 | 1               |   |
-------------------------
2 | 2               |   |
--------------------------
3 | 3               |   |
--------------------------
4 | 4               |   |
-------------------------
5 | =SUM(A1:A4)     |   | (answer is 10)
-------------------------
6 | =myFunction(A5) |   |
-------------------------

==================================
A new sheet
==================================

myFunction (it has the "function sheet" property)
----------------------------
  |  A                 | B |
----------------------------
1 | =PARAMETER(double) |   |
----------------------------
2 | = A1 * A1          |   |
----------------------------
3 | =RETURN(A2)        |   |
----------------------------

Copy to CSV

NormalSheet

1
2
3
4
5
=SUM(A1:A5)

=MY_FUNCTION(A6)

Copy second sheet to CSV

MY_FUNCTION (a function sheet)

=PARAMETER(double)

=A1*A1

=RETURN(A3)

On Sun, Nov 19, 2017 at 12:05 AM trent shipley <trent.shipley at gmail.com>
wrote:

> I have a vision for a spreadsheet that is programmable as a spreadsheet
> itself. (Excel, for example, is programmable in VBA, but VBA requires
> switching modes to the VBA environment and using a non-spreadsheet idiom.
> Excel is not self-programmable as a spreadsheet.)
>
> First there one function in a cell or array can reference other cells and
> arrays, including those that contain functions themselves. Second,
> IF(boolean,then,else) functions provide for selection.
>
> Third, the Function local scope property for a sheet in a workbook, the
> PARAMETER() function, and the RETURN() function allow the spreadsheet
> programmer to write new functions, including recursive functions.
>
> * Is a spreadsheet you can program from the spreadsheet a reasonable goal?
> * Has it been done?
> (I don't have the academic CS chops to know what keywords to use, and how
> search CS publications in English.)
>
> I have written a 30 page essay on Scriptsheets, but the essence boils down
> to the above. (If you, for some inexplicable reason, actually want the
> draft of the essay I'd be more than happy to share it with the
> understanding that you would provide feedback).  I call the proposal
> Scriptsheets.
>
> So the plan is to take something like GNUmeric or LibreOffice Calc and
> graft on a primitive function sheet interpreter.
>
> It would be natural to use C++, but the astute will note that a
> spreadsheet basically does not rewrite cells (unless you use a circular
> reference), so I'd also like to use a functional language, maybe Haskel.
>
> * Would using a functional language as a basic language of the project
> save effort and intellectual load?
>
> In the longer term I'd like as much of the spreadsheet programmable as a
> spreadsheet to be written to run on the JVM.
>
> As near as I can tell near future Java and typed functional languages,
> include the following options:
>
> Eta,
> Frege,
> Kotlin and,
> Scala.
>
> Note that a spreadsheet needs to give the satisfaction of immediate
> results, or failing immediate results, the sensation of actively working,
> so if the language could be interpreted that would be a huge help.
>
> * Which combination of typed, compiled, interpreted, FOSS functional
> language that runs on the JVM, JAVA, Haskell, C++, C, used in that order of
> preference, makes the most sense for the Java compatible functional
> language at the top of the preference hierarchy?
>
> Note also, that I have only the equivalent of an AA degree from a CIS, not
> a CS, perspective, so the odds are the whole idea is vaporware, unless I
> can determine feasibility and desirability, then sweet talk real developers
> to help out.
>
> trent1967.48 at outlook.com (junk email address)
>
> See also the spreadsheet at http://orgmode.org/  it's cool.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20171119/b2cc7cf2/attachment.html>


More information about the Haskell-Cafe mailing list