Live data from Hacker News

Show HN: I made a spreadsheet where formulas also update backwards

victorpoughon.github.io

51–60 of 122 posts

Re: Show HN: I made a spreadsheet where formulas also update backwards

#51
post #41

The examples are great and these bidirectional calculators are something that people would love to have in traditional spreadsheets. So much so that Credit Suisse, which basically was running everything on heavily modded Excel, created a full language whose outputs were Excel spreadsheets capable of doing that. That thing called “paradise” was a total monstrosity but showed how much people wanted this. That said, you…

Constants are supported, use # as a prefix, e.g.; #50.

I'd like to add more constraints in the future like a domain constraint for variables.

Re: Show HN: I made a spreadsheet where formulas also update backwards

#52
post #49

“Formulas that update backwards” is the main idea behind neural networks such as LLMs: the computation network produces a value, the error in this value is computed, and then the error quantity is pushed backward through the network; this relies on the differentiability of the function computed at each node in the network.

All those words and you forget to provide people the breadcrumbs to learn more for themselves. The term of interest is "backpropagation".

Won’t another breadcrumb be Prolog and “declarative programming”[1].

Wasn’t Prolog invented to formalise these kinds of problems of making the inputs match what the desired output should be.

[1] https://en.wikipedia.org/wiki/Declarative_programming

Re: Show HN: I made a spreadsheet where formulas also update backwards

#54

Super cool! Well done. Now take it down and never let Microsoft get their hands on the code, or the entire economic system will go down in flames.

C-levels have been drawing random lines for years[1] - the invention of the graph let the genie out of the bag.

[1] https://x.com/gothburz/status/1999124665801880032

Re: Show HN: I made a spreadsheet where formulas also update backwards

#55
post #37

The idea is very interesting. As a default strategy you could preserve the ratio of inputs by scaling them to match the scaling of the output, instead of making them equal (for addition). Similarly, for multiplication, you could preserve the ratio of inputs as well, by scaling them by nth root of the scaling factor of the output.

Currently the solver does not use the previous values of inputs at all when solving. But it could use it in some cases as a heuristic I guess, yes!

Re: Show HN: I made a spreadsheet where formulas also update backwards

#56

Earlier quoted context omitted.

Does one stay locked in place? Unclear. If you set C1=A1+B1 then, when you set a value for C1, A1 and B1 are each half of that value, even if they started off unbalanced.

What is inputs a,b,c,d,and e are polynomial coefficients? I am hoping to get a fields medal plz respond.

You can actually solve fifth order polynomials with bidicalc! But it's a numerical solution, not an algebraic one, so no Fields medal.

Re: Show HN: I made a spreadsheet where formulas also update backwards

#57
post #15

In Excel you have goal seek for this functionality. I believe it does some form of numerical solving of the equation system. Good for every situation when you need to solve equations! In the context of using spreadsheets I think about solving simple financial or maybe construction/mechanical design problems where you don’t want to solve it manually or program it and a spreadsheet is a quick and useful interface.

It does not. It perturbates the variables and uses a hill-climbing algorithm.

Interesting. Note that the backwards solver of bidicalc does not use the previous input values of variables at all.

Re: Show HN: I made a spreadsheet where formulas also update backwards

#58

The first example on the main page has a formula with two variables being updated from changing one value. The immediate question I have is if I change the output, where does the extra degree of freedom come from on the inputs? Does one stay locked in place? Unclear. I am a huge fan of the concept though. It's been bugging me for years that my spreadsheet doesn't allow editing text fields after filtering and sorting…

100% this. When I reached the end of that page I felt pranked because the obvious question was never answered. How are these cases resolved? Is it possible to fix some inputs and only update others? What if I sometimes want to change input A, and other times I want to update input B? All this should be explained as early as possible.

Re: Show HN: I made a spreadsheet where formulas also update backwards

#59
post #44

Could you build an inverse kinematics solver with this? (I recently watched a youtube video of someone iteratively working out the solutions for a robotic arm, by alternating modifying the inputs and the results)

That's an interesting example I hadn't thought of. Probably? I'll need to try it. Thank you for the suggestion!

I think one issue will be that trig functions are kinda weird because they are non-injective. So they work but they are awkward (try solving cos(A1) = 0.5). Inverse kinematics is so well studied, you're probably better off using a dedicated algorithm.

Re: Show HN: I made a spreadsheet where formulas also update backwards

#60
post #36

A 2d sketcher with constraints is kind of similar. For example the equation A = B + C Where A, B, C are the lengths of 3 parallel lines. Within the sketcher you can drag the length of any one of those lines and the other two will adjust to keep the constraints.

Yes! I'd really like to make something graphical in this same idea space next. See g9.js for example, or parametric CAD software like FredCAD which kinda does what you said.
Post reply on HN