News for hackers. Stuff that matters.
Re:Emacs Symbolic Integration by iso8859-1 on Wednesday January 06, 2021 @11:59AM (#25659545)
> the basic data is text

How can this work? Let's say I am developing a spreadsheet. Each cell has a formula, and it has a rendered text version. How can this work in Emacs? I want there to be a "underlying" strongly typed version of the data which is rendered, but Emacs forces them to be the same.

Unix (with pipes) also works with plain bytes, but many pipes are not necessarily rendered. Given that emacs is inherently visual, because you see the buffer if you're working with it, why can't there be data structures?

Re:Emacs Symbolic Integration by TeMPOraL on Wednesday January 06, 2021 @01:35PM (#25660676)
See [0] for examples of spreadsheet support in Org Mode (which, while often discussed as a thing of its own, is still part of default Emacs installation).

Basically, your table is drawn as text (with Emacs automatically managing its layout, and providing various shortcuts for larger manipulations like inserting or swapping rows/columns). Formulas are recorded as text below the table. They get recomputed on demand, or can be made to recompute on each edit[1].

--

[0] - https://orgmode.org/worg/org-tutorials/org-spreadsheet-intro...

[1] - https://orgmode.org/org.html#Advanced-features describes a bunch of features, including recomputation of select rows on edit/navigation, as well as marking which rows are names of columns or cells vs. data.

Re:Emacs Symbolic Integration by teataster on Wednesday January 06, 2021 @12:43PM (#25660117)
Emacs comes with a pretty good plain text spreadsheet. I have not figured out how to use it for large amounts of data (caped at 999 rows) but it's way more powerful than "your favorite spreadsheet software" as it allows for both calc and elisp formulas. All in plain text yeah, types are as strong as elisp's. And maybe I am wrong, but spreadsheets are not famous for strong types. I have horror stories to share on that respect.

I guess you could strong type by using a type cast formula with elisp...

Re:Emacs Symbolic Integration by Jtsummers on Wednesday January 06, 2021 @01:02PM (#25660345)
https://www.gnu.org/software/emacs/manual/html_node/ses/inde... - I presume you're referring to SES mode

SES is great as a quick & dirty spreadsheet. I also used it when I started "living" in emacs about 12 years back. I had SES worksheets for various things I'd often use Excel for. One was a stock tracker (downloaded data periodically form Yahoo! Finance), a tax estimator, a paystub tracker, a budget, leave tracker. Some were just worksheets for work problems (had a set of formulae and equations related to test cases, plug in numbers and determine what the expected output should be, or reverse it plug in received output and see what input should recreate it).

If you use org-mode, it has its own format for doing the same thing:

https://orgmode.org/worg/org-tutorials/org-spreadsheet-intro...

If I use emacs-as-a-spreadsheet, I tend to the latter anymore since I org-mode is my primary use of emacs anymore (with org-babel for editing source code).

Re:Emacs Symbolic Integration by teataster on Wednesday January 06, 2021 @01:39PM (#25660716)
I meant org-mode. I didn't know about the other one. Thanks for the info.

I do not use Emacs as spreadsheet often. As my spreadsheet needs are larger than org-mode is comfortable with. Pretty much business people sharing data at work. But I have used for reports and whatnot and it's fine.