Live data from Hacker News

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

victorpoughon.github.io

91–100 of 122 posts

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

#91
post #49

Earlier quoted context omitted.

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

Yes, I'm glad to see a comment on Prolog. I think of it as _the_ foundational programming language for solving such problems. It isn't so much that it's a back propagation language; it's just that, based on which variables are bound at a given point, it will go forward deductively, or backwards inductively.

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

#92
post #76

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.

It would make more sense to preserve the ratio if possible.

Yeah, this concept is interesting but the fact that the simplest test case gives what's fundamentally a surprising result is very annoying.

It also doesn't help that in the example, the expected outcome of 53.3333/46.6667 isn't even considered.

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

#93
post #76

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.

It would make more sense to preserve the ratio if possible.

To get that, you could pass the ratio explicitly. C = 5A + 7B

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

#94
post #49

Earlier quoted context omitted.

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

Prolog has basically nothing to do with calculus.

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

#95
post #75
post #29

Earlier quoted context omitted.

It is for fun. Commercial products do not support this because functions are generally not invertible.

I would expect the opposite. Commercial products are run by product managers: they do whatever the business needs that day, and if it doesn't work for most inputs, "that's fine, our users will only ever need addition". Fun open source projects, run by the same programmer who does the implementation, obsess over finding the generic solution to inverting a function and end up with a version that isn't useful for anyone…

You can't even invert addition. If A+B=C and you change C, you can not infer A and B without making assumptions, like scaling them equally.

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

#96
post #58

Earlier quoted context omitted.

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.

You can do it and it is explained, actually. Use # as a prefix to indicate a constant, e.g.: #50 will be a constant and not a variable. In the future I'd like to support more user input constraints, in particular domain constraints for variables. So you could tell the solver that this cell must remain in some interval, and it would respect that interval instead of assigning any real value.

IMO constant should be the default and variables should be annotated.

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

#98
post #76

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.

It would make more sense to preserve the ratio if possible.

You can do this with bidicalc already! You just have to model the problem correctly. If you expect the ratio to remain constant, what you actually want is a problem with a single free variable: the scale.

    A1 = 1.0       // the scale, your variable
    A2 = 6 * A1    // intermediate values
    A3 = 8 * A1 
    A4 = A2 + A3   // the sum
Now update A4 (or any other cell!) and the scale (A1, the only variable) will update as you expect.
Post reply on HN