<div dir="ltr">Middle posting follows.<br><br><div class="gmail_quote"><div dir="ltr">On Thu, Nov 2, 2017 at 2:45 PM Matt Birkholz <<a href="mailto:matt@birchwood-abbey.net">matt@birchwood-abbey.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Thu, 2017-11-02 at 17:51 +0000, trent shipley wrote:<br>
> Right, it's not scripting using a classic programming environment,<br>
> like VBA, the BASIC that comes with LibreOffice, or  Python. <br>
><br>
> The idea is that you extend the spreadsheet idiom to program the<br>
> spreadsheet from a sheet or virtual workbook in the spreadsheet<br>
> without leaving the spreadsheet to work in a classical imperative<br>
> programming environment like VBA or Python.<br>
><br>
><br>
>   |A               | B              | C              | <br>
> 1|PARAMETERS(B1,C1)|<put input here>|<put input here>| <br>
> 2|                 |                |                |<br>
> 3|RETURN(B1*C1)    |                |                |<br>
> FUNCTION SHEET("MY_FUNCTION")<br>
<br>
That is very reminiscent of Emacs' Org-mode, which has plain text<br>
spreadsheets like the above.  With a key stroke or three a "source code<br>
block", a script written in any of a variety of languages, can be fed<br>
such tables and the results captured in the document as text, table,<br>
plot...<br>
<br>
There is a cool org-mode document demonstrating genetic drift using R<br>
plots and a little LaTeX for an equation.  Here it is rendered for the<br>
web.<br>
<br>
<a href="http://www.stats.ox.ac.uk/~davison/software/org-babel/drift.org.html" rel="noreferrer" target="_blank">http://www.stats.ox.ac.uk/~davison/software/org-babel/drift.org.html</a><br>
<br>
People use org-mode for everything from literate programming to<br>
reproducible research to organizing their lives (calendars and task<br>
lists).<br>
<br>
<a href="http://orgmode.org/" rel="noreferrer" target="_blank">http://orgmode.org/</a></blockquote><div><br></div><div>It looks like an interesting little tool. As one of it's tricks, it has a built in text spreadsheet you can use with Emacs Calc and Emacs Lisp. Emacs can be SO cool.</div><div><br></div><div>How do you use the spreadsheet. Can you program in the spreadsheet?</div><div><br></div><div>I didn't mean for my little prototype to imply I'm dreaming of a text tool. I want Scriptsheets to be a GUI environment (by stealing from the likes of GNUmeric or LibreOffice Calc); albeit a minimalist core GUI that can be enhanced with plugins.</div><div><br></div><div>Think of it this way. Traditional spreadsheets HAVE a programming language and an environment for the language. Scriptsheets will BE a programming language.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
> You have data, it's a spreadsheet.<br>
> The moral equivalent of sequence is referencing another cell,<br>
> including one that contains a function.<br>
> You have selection with the IF() function.<br>
<br>
You speak of morality and then call IF a function.  Blasphemer!<br></blockquote><div><br></div><div>In a spreadsheet IF() is definitely a function.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
> With the addition of just two keywords, PARAMETERS and RETURN you<br>
> have real functions.<br>
<br>
What's a "key word"??<br></blockquote><div><br></div><div>Keyword? Reserved word?</div><div><br></div><div>There are actually at least three things involved.</div><div><br></div><div>*Declaring (or in a GUI marking the property) that a sheet is for a function. This creates a local scope so the effects of the function don't propagate through the workbook, except for the effect of the RETURN(S).</div><div><br></div><div>*Declaring cells that will be parameters. In a spreadsheet, that is going to look like a function.</div><div><br></div><div>* Returning a result. That looks like a function too.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
> You have looping with functions calling themselves (recursion), and<br>
> possibly circular references.<br>
><br>
> My understanding is that's a complete programming paradigm.<br>
<br>
Fun!  Can you do it with coconuts?<br></blockquote><div><br></div><div>If you have a very fault tolerant Babbage class computer, you can probably do it with coconuts.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
---------------------------------------------------<br>
PLUG-discuss mailing list - <a href="mailto:PLUG-discuss@lists.phxlinux.org" target="_blank">PLUG-discuss@lists.phxlinux.org</a><br>
To subscribe, unsubscribe, or to change your mail settings:<br>
<a href="http://lists.phxlinux.org/mailman/listinfo/plug-discuss" rel="noreferrer" target="_blank">http://lists.phxlinux.org/mailman/listinfo/plug-discuss</a></blockquote></div></div>