groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [groff] A poor mans Excel


From: Ralph Corderoy
Subject: Re: [groff] A poor mans Excel
Date: Thu, 10 Oct 2019 15:45:54 +0100

Hi Ulrich,

> I have written a small perlscript, that preprocesses tables and allows
> to 
>
>     - add the values in selected collums
>     - to replace a table entry by the result of an expression

Thanks for letting us know.  As Mike said, please show us the code;
the list's archive will hopefully capture it for others that Google later.

On the general topic, to be more spreadsheet like it would need to allow
forward references too, e.g. y=x+z where x was earlier, and already known,
but z is yet to be seen.  And also in-line evaluation, similar to eqn's
`delim @@'.

This could still be done as a filter in a pipeline, but writing to stdout
would only be done for plain text and calculated results, buffering on an
unresolvable expression until reading had provided all the input values
and their inputs in turn.  Assuming «» as the brackets, a long input
of «x»...«x=42» would obviously require buffering it all.

To be a brief syntax, an implicit naming of `cells' might be required,
perhaps based on labels for row or column data, e.g. a tbl heading might
define labels for columns that would be deleted in the output.

    : Population «| pop» : GDP «| gdp»

And similarly for rows with a cell being «2,718,281».  That makes it
through to stdout as ‘2,718,281’ and sets the value for «foo.pop».
Prose elsewhere could refer back to that table value by label, expressions
in other «» could use `sum(*.pop)', etc.

As with all these little languages, much of the insight comes from
trying to apply it to one real task after another.  But the problem
seems tractable.

-- 
Cheers, Ralph.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]