[HN Gopher] Show HN: I made a spreadsheet where formulas also up...
___________________________________________________________________
Show HN: I made a spreadsheet where formulas also update backwards
Hello HN! I'm happy to release this project today. It's a
bidirectional calculator (hence the name bidicalc). I've been
obsessed with the idea of making a spreadsheet where you can update
both inputs and outputs, instead of regular spreadsheets where you
can only update inputs. Please let me know what you think!
Especially if you find bugs or good example use cases.
Author : fouronnes3
Score : 227 points
Date : 2025-12-11 18:00 UTC (2 days ago)
(HTM) web link (victorpoughon.github.io)
(TXT) w3m dump (victorpoughon.github.io)
| remywang wrote:
| A bidirectional formula is also known as an integrity constraint
| in databases (plus some triggers for restoring the constraint
| upon updates)!
| PaulHoule wrote:
| Wow! See the classic https://en.wikipedia.org/wiki/TK_Solver
| RachelF wrote:
| and Borland's Eureka solver https://nagodede.github.io/eureka/
| kccqzy wrote:
| I think the concept is solid. I've only had a few minutes of
| playing with it, but I have the opinion is that from a UX
| perspective constants are more common than variables. So perhaps
| a cell containing a constant should not have a #, but a variable
| should.
| WillAdams wrote:
| Very cool!
|
| I'd love to see a version where cells are "torn off" and named as
| they were in Lotus Improv and one had a "formula pane" where one
| could see all the formulae for a spreadsheet.
|
| Would it be possible to create this in Python so that it could be
| a part of pyspread?
| throw310822 wrote:
| Hm? I don't get it.
|
| What's the point of calculating backwards non-invertible
| operations such as addition? Isn't the result just arbitrary?
| generalizations wrote:
| They said this:
|
| > Even a normal spreadsheet is fairly complex beast. But the
| novel thing about bidicalc is the backwards solver.
| Mathematically, updating a spreadsheet "backward" is a
| (potentially underdetermined) root finding problem, because we
| are trying to find a vector of unknowns such that , where F is
| the function computed by the cells formulas, and G is the
| objective value entered in the cell. Note that F is not
| necessarily a single formula, but the result of composing an
| upstream graph of cells into a single function.
|
| > The actual root-finding solver is a custom algorithm that I
| made. It a general purpose algorithm that will find one root of
| any continuous-almost-everywhere function for which a complete
| syntactic expression is known. It uses a mix of continuous
| constraint propagation on interval union arithmetic ,
| directional Newton's method and dichotomic search. It is of
| course limited by floating point precision and available
| computation time.
|
| But that really doesn't answer your question. I see no reason
| why the solver wouldn't decide every time it had a two-variable
| summation that ADD(X+Y) doesn't reverse to X=-90 and Y=100.
| fouronnes3 wrote:
| I made this mostly as a fun challenge :)
|
| You are right that there is some arbitrariness involved when
| picking a solution, however it's a bit more subtle than that.
|
| Let's say our problem has N free variables.
|
| Step 1 is finding the subset of R^N that is the solution to the
| root finding problem. If this subset is a point, we are done
| (return that point). Note that if there is no solution at all
| bidicalc should correctly report it.
|
| Step 2 is if the solution subset is not a point. Then there is
| multiple (maybe even an infinity of) solutions, and picking one
| is indeed arbitrary.
| kolarski wrote:
| does the algorithm tries to make minimal changes to the free
| variables ? If we have 1 + 1 = 2 and change 2 -> 4 then
| -100000 + 100004 = 4 is also a valid solution. When I tried
| it it changed it to 2 + 2 so perhaps there is optimization
| but also a valid optimization can be minimal free variable
| changes in which case it would be 1+3 = 4 and we update 1
| free variable instead of 2. I have no idea which is better
| just curios how it works. I like the idea very much.
| fouronnes3 wrote:
| The actual heuristic used to pick a solution from an
| infinite solution subspace is a bit too complex to explain
| in a comment. I really need a blackboard :D The main goal
| was actually to find a solution, any solution at all, and
| fast. I wanted the backwards update to be very fast to feel
| as magic as possible. So the heuristic is pretty simple and
| could definitely be improved!
| esafak wrote:
| It is for fun. Commercial products do not support this because
| functions are generally not invertible.
| dmurray wrote:
| 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's specific case.
| esafak wrote:
| 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.
| nrhrjrjrjtntbt wrote:
| You could add hints as a feature to this. E.g. interest = rate
| x principle
|
| The user hints principle is preferred fixed so they can see
| what rate is needed for a givem amount of interest.
|
| Hints could have a precedence order (then prefer to fix earlier
| terms on an operation on a tie breaker.)
| willrshansen wrote:
| 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 them down to the subset I want. I have to
| go all the way back to the mess of unsorted input rows to
| actually edit them.
| rahimnathwani wrote:
| 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.
| exe34 wrote:
| I think it would be good if you could lock one of them.
| hamandcheese wrote:
| You can.
| shomp wrote:
| With # (octothorpe) #Val
| idiotsecant wrote:
| What is inputs a,b,c,d,and e are polynomial coefficients? I
| am hoping to get a fields medal plz respond.
| fouronnes3 wrote:
| You can actually solve fifth order polynomials with
| bidicalc! But it's a numerical solution, not an algebraic
| one, so no Fields medal.
| geon wrote:
| It would make more sense to preserve the ratio if possible.
| pxx wrote:
| 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.
| rafabulsing wrote:
| To get that, you could pass the ratio explicitly. C = 5A +
| 7B
| fouronnes3 wrote:
| 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.
| ximm wrote:
| 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.
| fouronnes3 wrote:
| 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.
| nkrisc wrote:
| IMO constant should be the default and variables should be
| annotated.
| jy14898 wrote:
| you might like https://omrelli.ug/g9/ which is a similar concept
| but for graphics
| fouronnes3 wrote:
| I do like g9! It was a strong inspiration for bidicalc
| actually!
| thomastay wrote:
| This is really cool! It's like Excel's goal seek but can also
| handle the case of arbitrary input cells. Goal seeek can only
| handle one input and one output cell.
|
| But how do you handle the case where multiple variables can be
| changed? If multiple input cells is the key difference from Goal
| seek, i think some more rigor should be placed into the algorithm
| here
|
| e.g. setting A1 + B1 and wanting the result to be 5. Currently it
| bumps both A1 and B1 equally. What's the thought process behind
| this?
| fragmede wrote:
| Yeah. The UI could have a lock icon to set, eg B1 should stay
| fixed and then only A1 would change.
| tkzed49 wrote:
| It supports this. If you type # before a number, like #5,
| it's made constant.
| aatd86 wrote:
| LOL! Gemini suggested to implement this to me literally
| yesterday: bidirectional computations. The example was that given
| a temperature in Celsius and Fahrenheit, modifying either of them
| should update their counterpart. In angular that would be two
| linked signals for instance, but even that is a bit fringe.
| Gemini was going for something even more elaborated.
|
| I told Gemini that spreadsheets were actually not doing that and
| that I had ways to implement that behavior without the
| complexity.
|
| Just writing that to show the rabbit hole people are going to
| fall into if they let their llms go brrr. ;D
|
| In any case, the problem is interesting. The point was to include
| bi-directionality inside a graph of computations so that we
| didn't get bogged down by cycles. The benefit being that it would
| handle float precision issues.
|
| My more manual solution expect that floats precision issues are
| handled explicitly. I think that this level of explicitness is
| needed anyway for proper floating point error mitigation.
| maplethorpe wrote:
| That's weird, Gemini told me not to do this.
| aatd86 wrote:
| To not do what, to not implement a constraint solver for
| bidirectional formulas? If you input my above comment it is
| for sure going to weigh the pros and cons.
| https://gemini.google.com/share/f40bf53d9c21
|
| Excerpt from the initial convo with gemini: Thinking with 3
| Pro December 11, 2025 at 09:59 PM
|
| 2. Propagators (Constraint Networks)The Problem: Your
| valueref binder and watch logic handle one-way data flow
| well. But complex forms (e.g., "Start Date must be before End
| Date," or "Fahrenheit <-> Celsius") require messy, cyclic
| event handlers to keep everything in sync.The Academic
| Concept: Propagators (Alexey Radul / Gerald Sussman,
| MIT).Instead of functions ($A \rightarrow B$), you define
| Constraints. A network of constraints seeks a consistent
| value for all connected nodes. It is "multi-directional" by
| design.
|
| I see my message above being downvoted, I don't even know why
| ;D
|
| In the end Gemini did agree that it was not necessary to
| introduce this level of complexity for my use case.
|
| To be fair, Victor goes further because he adds a solver on
| top. In the research of a solution that might make sense. The
| issue in general is that not everything has a reverse
| operation so, in a sense, it is but an approximation.
| b-karl wrote:
| 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.
| moron4hire wrote:
| It does not. It perturbates the variables and uses a hill-
| climbing algorithm.
| fouronnes3 wrote:
| Interesting. Note that the backwards solver of bidicalc does
| not use the previous input values of variables at all.
| graemep wrote:
| This is very different in practice, because it is pervasive
| rather than something you have to set up for particular cases.
|
| If this was usual it would help a lot with people's tendency to
| hard code the correct answer rather than fix formulae. Just
| that aspect of it would be a huge improvement. People do this
| all the time with simple financial problem, for example.
|
| A lot of what people use spreadsheets for is not all that
| simple. Again, especially with financial applications. People
| manage huge amounts of money using horribly complex models
| implemented in Excel.
| aghilmort wrote:
| interesting. like Excel Solver? or OpenSolver, Gurobi, other
| optimizers? or different objective?
| fouronnes3 wrote:
| Never used any of those, so I don't know! I'd be curious to
| read a comparison from anyone who knows about them.
|
| I think what's pretty unique about the bidicalc solver that I
| made is that it does not depend on the previous input values to
| update backwards. It's truly solving the root finding problem.
| The advantage is that there are never any "stuck in a local
| optimum" problems with the solver. So you can solve difficult
| problems like polynomials, etc.
| digdugdirk wrote:
| 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.
| Towaway69 wrote:
| 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
| amirhirsch wrote:
| Cool!
|
| Constraint propagation from SICP is a great reference here:
|
| https://sicp.sourceacademy.org/chapters/3.3.5.html
| fouronnes3 wrote:
| I wasn't aware of this chapter, but I did use constraint
| propagation for the solver (among other things), thanks!
| iamwil wrote:
| Reminds me of functional logical programming languages like
| Verse. when you specify the output and ask for the inputs, you
| get all possible inputs.
| Towaway69 wrote:
| Came here to say the same thing but with reference to Prolog.
| SoftTalker wrote:
| Can you enter an RSA key and have it produce two prime numbers?
| spiderice wrote:
| A random tool like this would be the most entertaining possible
| way for something like that to be unleashed on the world
| jamestimmins wrote:
| My brother once suggested that there are probably bits of
| code/algorithms that would be world changing if they were
| released in academic journals, but instead were written by
| some unknowing programmer in an afternoon for their job
| coding embedded systems for refrigerators.
|
| This particular example may be unlikely, but it's a very fun
| idea.
| Suppafly wrote:
| Lots of people working in different fields end up
| reinventing things that have been known to math for
| centuries, often in clunky roundabout ways. I imagine some
| of them figure out things not known to math, but it's far
| more likely to go the other way.
| nico wrote:
| > Lots of people working in different fields end up
| reinventing things that have been known to math for
| centuries
|
| I remember reading, about a year or two ago, about a
| medical doctor that published a paper rediscovering
| calculus (I just looked it up, it happened in 1994,
| there's been many articles and videos about it)
| alexchantavy wrote:
| lmao: https://en.wikipedia.org/wiki/Tai%27s_model
|
| This is such a great story
| dizhn wrote:
| It's not clear from the Wikipedia article linked below
| whether she was rediscovering part of calculus or
| knowingly rebranding it. Do you know more details?
| Towaway69 wrote:
| Folks shouldn't be afraid to "rediscover" stuff.
|
| Primarily because the learnings you make are the same as
| the original "discoverer". Without those learnings, you
| might not be able to arrive at your true destination.
| Suppafly wrote:
| >Folks shouldn't be afraid to "rediscover" stuff.
|
| Luckily no one is suggesting that.
| geon wrote:
| A lot of people suggest that. So many that it has become
| an idiom. "Don't reinvent the wheel."
| RachelF wrote:
| A lot of the time engineers are focussed with solving a
| problem, to build a working machine/program, while
| academics just want to publish.
|
| This is also true with patents.
| InsideOutSanta wrote:
| Iirc, Heisenberg reinvented Matrix calculations to solve a
| problem in quantum physics. Not being a mathematician, he
| wasn't aware of the concept. Born recognized what
| Heisenberg had done and introduced him to his own
| reinvention.
| geon wrote:
| PBS Space Time released a video with that story
| yesterday: https://www.youtube.com/watch?v=c-Q5r3THR3M
| RobotToaster wrote:
| An anonymous 4chan user once solved a 25 year old maths
| problem, to answer a question about the watch order of an
| anime. https://www.scientificamerican.com/article/the-
| surprisingly-...
| fouronnes3 wrote:
| Jokes aside, let's say someone does figure out how to break
| RSA over a weekend project. The evil options are easy to come
| up with, but what is the actually responsible, ethical, thing
| to do? Never tell anyone?
| zoky wrote:
| Contact a known and trusted security researcher who can
| verify to the world that you did what you said you did, so
| everyone else can have as much time as possible to figure
| out exactly how fucked they are. Doing nothing isn't an
| option; once someone figures something like that out, it
| signifies that conditions were ripe for the discovery to be
| made, and it's only a matter of time before it's discovered
| again independently.
| dizhn wrote:
| Also fairly reasonable to assume it has already been done
| by someone who had a motive to break it and is keeping
| quiet.
| sroerick wrote:
| Pretend you had developed a quantum computing advancement
| and push people to post quantum encryption
| yonatan8070 wrote:
| Or enter a public key + some encrypted data to get the private
| key
| fainpul wrote:
| In Prolog you can write rules (similar to functions in other
| languages) so that they work "both ways". Let's say you have
| this rule that defines how pace ("runner's speed") relates to
| distance and time: :-
| use_module(library(clpr)). pace(Km, Minutes, Pace)
| :- { Minutes = Km * Pace }.
|
| Even though the rule only specifies how Minutes are calculated,
| Prolog can now also calculate the other values.
|
| You can query it, giving unknowns an uppercase `Name`, and it
| will give you the possible values for it:
| pace(5, 24.5, Pace) pace(40, Min, 5) pace(Km, 24.5,
| 5) pace(Km, Time, 5)
|
| You can try it here: https://swish.swi-prolog.org/
|
| So if you had a rule that defines RSA key calculation this way,
| you could enter a key and get all valid solutions for the
| primes. But of course complex calculations still take a long
| time. I assume it's similar to a brute force attack in that way
| (Prolog has clever strategies to explore the solution space
| though).
|
| Disclaimer: I'm not an expert in Prolog or cryptography, so
| this might not be 100% accurate.
| nrhrjrjrjtntbt wrote:
| Excellent (sorry accidental pun)
|
| This is a nice exploration.
| injidup wrote:
| 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.
| fouronnes3 wrote:
| 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.
| zkmon wrote:
| 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.
| fouronnes3 wrote:
| 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!
| adonovan wrote:
| "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.
| uoaei wrote:
| All those words and you forget to provide people the
| breadcrumbs to learn more for themselves.
|
| The term of interest is "backpropagation".
| Towaway69 wrote:
| 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
| vandyswa wrote:
| 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.
| uoaei wrote:
| Prolog has basically nothing to do with calculus.
| big-chungus4 wrote:
| "Formulas that update backwards" isn't really the main idea
| behind neural networks. It's an efficient way of computing
| gradients, but there are other ways. For example forward
| propagation would compute a jacobian-matrix product of input
| wrt output with an identity matrix. Backpropagation is similar
| to bidi-calc to the same extent as it is similar to many other
| algorithms which traverse some graph backward.
|
| I think you should be able to use bidi-calc to train a neural
| net, altough I haven't tried. You'd define a neural net, and
| then change it's random output to what you want it to output.
| However as I understand it, it won't find a good solution. It
| might find a least squares solution to the last layer, then
| you'd want previous layer to output something that reduces
| error of the last layer, but bidi-calc will no longer consider
| last layer at all.
| d--b wrote:
| 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 really need a way to set which cells are fixed and
| which cells are allowed to move if you want to move past basic
| examples.
|
| Most times you know what you want to do. like => if the user
| modifies that cell, find a solution for those specific ones.
|
| If you can enter that info, then you have a lot more constrains
| for your solver and will avoid a lot of edge cases where
| everything goes to 0, and you can check that the calculation
| entered is indeed reversible or not, or if it could have multiple
| solutions, and so on.
| fouronnes3 wrote:
| 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.
| amelius wrote:
| > and these bidirectional calculators are something that people
| would love to have in traditional spreadsheets
|
| People want them in general programming languages too. I can't
| count the number of times I had to implement the same function
| multiple times, but backwards in various ways.
| nico wrote:
| 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)
| fouronnes3 wrote:
| 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.
| amelius wrote:
| Closed form solutions might be more efficient (in time, energy)
| and perhaps more numerically stable.
| deckar01 wrote:
| Sympy can (often) solve under constrained systems in terms of the
| free variables. The problem I run into is discrete constraints
| that make solving less closed form and more combinatorial search.
| When textbook amplifier formulas significantly diverge from
| physical reality I model the errors as linear correction factors
| and use gradient descent to correct it in a few experiments, but
| I'm curious if there is software that has solved this problem.
| koolala wrote:
| Could this easily represent a Kalman filter and other typically
| complex control problems?
|
| Makes me imagine plotting a inverted pendulum and other real time
| systems. Could a cell variable be set to Time?
| areyousure wrote:
| I have wanted one general application of this idea in a
| spreadsheet. Specifically, I track some of my running, including
| speed (pace), distance, and time. Under different circumstances,
| I have exactly two of the three available and I want the third to
| be computed, but it varies which. I have found it fairly
| difficult to implement this kind of data entry in Google
| Spreadsheets and Excel, even know conceptually it's a very simple
| constraint "a*b=c" where I know some two variables.
|
| As a more substantive comment: You may find the thesis
| "Propagation networks : a flexible and expressive substrate for
| computation" by Alexey Radul interesting.
| https://dspace.mit.edu/handle/1721.1/54635
| fainpul wrote:
| You could create a table with 3 columns: distance, time, pace.
| Set the display format for time and pace to "Duration".
|
| Enter these formulas: distance = time / pace
| time = distance * pace pace = time / distance
|
| Drag fill everything down. At this point you get reference
| errors, but once you enter any two values (thereby overwriting
| the formulas in those cells), you get your result.
| davexunit wrote:
| Came here to see if anyone mentioned propagators. That thesis
| is excellent. I second the recommendation.
| culi wrote:
| You just need two spreadsheet tabs. One for the "raw" input and
| one with a formula that either takes the input if it exists or
| falls back to the calculated version
| filipeisho wrote:
| set A1 = 3 set B1 = 4
|
| set C1 = A1 + B1 = 7
|
| now change C1 = 14 expected A1 = 6 expected B1 = 8
|
| what it did A1 = 7 B1 = 7
|
| great
| fouronnes3 wrote:
| Why do you think that 6+8 is a better solution than 7+7?
| filipeisho wrote:
| When C1 changes from 7 to 14, that's a scalar change. The
| least-assumption, information-preserving update is to scale
| both inputs by the same factor.
| jsax wrote:
| This is pretty cool.
|
| This functionality is called 'break back' in a lot of enterprise
| modelling software. See [IBM
| TM1](https://www.ibm.com/docs/en/cognos-
| planning/10.2.1?topic=bre...) and [Anaplan](https://help.anaplan.
| com/breakback-1b7aa87d-aa13-49f6-8f7d-d...). They generally work
| in terms of scaling the inputs to match the new output though,
| which is a bit more basic than this approach.
| fouronnes3 wrote:
| Interesting, thanks! I had never heard of this. Yes, bidicalc
| is much more advanced. You can update any value of an arbitrary
| dependency graph of cells.
| satvikpendem wrote:
| Ah, two way data binding. If you've used any frameworks before
| React (and a couple earlier ones with the same philosophy) you'll
| understand how it becomes a spaghetti mess over time.
| culi wrote:
| Not necessarily if you're following best practices. Modern
| angular is quite scalable and uses two way data binding
| 1718627440 wrote:
| Sounds a bit like Prolog with a Spreadsheet UI?
| BSTRhino wrote:
| What a neat idea!
| lethal-radio wrote:
| What do you use it for?
| yogeshpaliyal wrote:
| amazing
| pedrozieg wrote:
| The interesting thing here isn't "spreadsheet, but backwards" so
| much as "spreadsheet as a constraint system". Classic
| spreadsheets are basically DAGs: data flows one way and a lot of
| UX assumptions (and people's intuition) rely on that. As soon as
| you allow arbitrary cells to be solved for, you're in "which
| variables are free?" land, and most of the confusion in this
| thread is really about degrees of freedom, not about the math.
|
| One way to make this less surprising might be to flip the
| default: treat all cells as fixed unless explicitly marked as
| solver variables, and give a lightweight visualization of "these
| are the cells that will move if you edit this one." That keeps
| the power of a general constraint solver while preserving the
| mental model spreadsheet users already have, and it opens the
| door to more serious use cases (financial models, physics,
| scheduling) without feeling like spooky action at a distance.
| fouronnes3 wrote:
| That's great feedback, thanks! I agree with you, but I don't
| want to flip the default because this is an experiment I made
| for fun, and the whole point is to lean in to the chaos a
| little bit. In a serious product the UX would definitely need a
| lot more work though.
| abakker wrote:
| Graphically, I really like the way autodesk makes sketches in
| fusion 360 blue until they are fully constrained, and then
| they are black. My intuition here is that you could color
| code "degrees of freedom" and "locked" states so that it was
| more intuitive.
| Animats wrote:
| Somebody did this back in the DOS era. The program was sometimes
| called "the crooked accountant's spreadsheet", because you could
| start with the outputs you wanted and get the input numbers
| adjusted to fit.
|
| Anyone remember?
| hallole wrote:
| Phenomenal! This is a solid prototype, clean execution. I've had
| exactly this idea, too: I've already given the spreadsheet the
| relationships between these values, why can't it just work
| backwards when values change? That premise hides a ton of
| complexity, though, I'm sure. Lots of scary matrices.
| fouronnes3 wrote:
| Thanks! Yes I loved the ratio of apparent simplicity to
| underlying complexity of this project. I have filled around 120
| pages of draft and notes just for the math of the solver :)
___________________________________________________________________
(page generated 2025-12-13 23:01 UTC)