Live data from Hacker News

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

victorpoughon.github.io

111–120 of 122 posts

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

#111

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.

Not necessarily if you're following best practices. Modern angular is quite scalable and uses two way data binding

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

#112

Can you enter an RSA key and have it produce two prime numbers?

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.

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

#113
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.

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

#114

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.

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 :)

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

#115

Earlier quoted context omitted.

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.

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.

it's a fact of geographical and social independence.. so far there's no way to know what everybody did or is doing (well there's twitter but it's configured on noise rather than signal)

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

#116

Earlier quoted context omitted.

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?

Pretend you had developed a quantum computing advancement and push people to post quantum encryption

Migrating to post quantum encryption is important, but it's also important to not be herded into a "solution" that can be/has been easily compromised.

https://blog.cr.yp.to/20251004-weakened.html

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

#118
This is great.

Since you've asked about bugs, I tried pushing the limits and found the following:

    A1: 100          B1: =100-A1
    A2: =A1*(100-A1)
    A3: =A1*B1
A2 can be successfully set to anything reasonable (up to 2500)

However, setting A3 to exactly 100 doesn't work, even though setting it to 101 or 99 (or even 100.000001) does work.

Another limit:

    A1: 100          B1: 100
    A2: =A1+B1
    A3: =A1*B1
    A4: =abs(A2-100) + abs(A3-100)
Setting A4 to zero (or anything below 80) doesn't work. This doesn't improve if the constants in the A4 formula are moved a short distance away from 100.

In case you can't tell from that last example, I think being able to fix the intended values of multiple outputs simultaneously would be interesting. If you were to give more details about the solver's internals, I'd be keen to hear them.

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

#119

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

Why do you think that 6+8 is a better solution than 7+7?

It preserves an implicit relationship, ratio, between A and B.

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

#120

interesting. like Excel Solver? or OpenSolver, Gurobi, other optimizers? or different objective?

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 difficu…

Excel Solver allows you to create target function with different variables and describe limits for them. Then you may try to find maximum, minimum or exact value for the target function.
Post reply on HN