Visicalc Reconstructed
https://zserge.com/posts/visicalc/
A nice walkthrough for anyone curious about what it would take to write Visicalc in C
In the dumbest way possible,btw. I laughed, I cried. But found it amusing.
The Hacker News discussion has interesting tidbits
https://news.ycombinator.com/item?id=47410871
Mar 21 ยท 7 weeks ago ยท ๐ drh3xx, norayr
1 Comment
๐ฆ zzo38 ยท Mar 22 at 00:35:
It's amazing that forty-seven years after VisiCalc was first created every spreadsheet still works the same way. Cells, formulas, recalc, grid.
I think it is somewhat unfortunate, because one thing that I thought would help is a "zoned spreadsheet".
There is one or more pages, and each page has a "zone grid", which is the grid of zones; each zone has some rows/columns of the data grid.
Each row of the zone grid is worth a certain number of rows of the data grid (different rows can be worth different amounts), and similarly for columns.
Each zone might have properties such as:
- Name (a subset of visible ASCII).
- Whether it has multiple data rows or one data row. (If only one, then there is only one datum for all of the data rows it is worth.)
- Whether it has multiple data columns or one data columns.
- Optional formula; if specified then this overrides all data cells in this zone and you cannot enter data manually in that zone, but if not specified then data can be entered in this zone normally.
- Optional conditional formatting.
References can be to a specified zone and offset, direct or related to the offset of the current cell within its own zone.
I would probably want to use a file format using DER (it is better than XML, JSON, CBOR, etc, in my opinion), and many existing ASN.1 and ASN.1X types would be suitable for data in cells, such as:
- Boolean
- Integer (arbitrary size)
- Real number
- General string (most control characters are not meaningful but some might be)
- Sequence
- Date/time
- Scientific number
(Some implementations might use only a subset of these, and some might use additional types as well; this is just an example)
There might also be some application types such as:
- Reference to cells (and ranges)
- Functions
Another thing I find problematic in many spreadsheets is nondeterministic functions in formulas, such as random numbers, current date/time, etc. I think that such things should be done in macros instead; e.g. you might use a macro to fill a zone with random numbers, or with current date/time, or to search for the current date/time (without needing to enter it manually), etc.