Hacker News new | past | comments | ask | show | jobs | submit login

Hey, thanks for the offer. I have been thinking about evaluation and the extent of my strategy so far has been to consider it as a dependency graph, which led me to this interesting article: https://hyperformula.handsontable.com/guide/dependency-graph...

Also it sounds like the right next step for me is to read more on incremental computation. Someone on reddit just pointed me to adapton: https://docs.rs/adapton/latest/adapton/

Actually implementing anything with Rust is on my TODO list (I'm spending some time on the UI prototype right now)

I will give a couple things a try and then, if you don't mind, I can ping you via email. I was checking out your website and loved the read on the parser -- not to mention A MAZE (played all the way to level 4!)




Wow! Glad you had a look around. Yes, please send me an email whenever you feel like.

And yes, you are going to need some sort of "support graph" and topological sorting. But this is way more complicated than it looks like. Most functions in a spreadsheet don't know it's dependencies until you are actually computing them, like `LOOKUP` or `IF`. Some functions like `RANDBETWEEN` or `NOW` change their value every time. In some modern spreadsheets some functions like `SORT` or `UNIQUE` spill their values to some other cells. Calculating dependencies correctly in all those situations can be challenging.

There is not a lot of literature on spreadsheet implementation and reading code of existing open source implementations is hard. And exception is Peter Sesoft:

https://mitpress.mit.edu/9780262526647/spreadsheet-implement... and https://www.itu.dk/people/sestoft/funcalc/

My recommendation would be to first set the scope. Then code manually the lexer and parser and drawn those two in tests. Excel formulas can be quite complicated! There are lots of fancy things you can do there like use arena allocators and other optimizations. I would try to avoid that on a first go.

Here is something that I have found extremely convenient. Excel saves the cell formula AND the resulting value. Meaning that to create a test case you just need to create an Excel workbook (and a xlsx parser, of course).

Doing the UI for a spreadsheet is an equally challenging problem.

Good luck!!!!

Oh, and remember this thread from a couple of days ago. Might be inspiring: https://news.ycombinator.com/item?id=37527720


Thank you! I've ordered the book and skim/bookmarked that thread!

Definitely planning to limit the scope to the most basic functions at first -- I don't even want to implement volatile ones or spilling until the right time comes :-)


(just jumping in here) You may want to take a look at https://www.scattered-thoughts.net/writing/an-opinionated-ma... which describes things on the spreadsheety and not-very-spreadsheety ends of the spectrum (moreso the latter). If you follow some of the links there you should find some good descriptions of various implementation strategies, e.g. Naiad style timely dataflow or incremental-style pseudotime.


thank you so very much! this is invaluable




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: