News for hackers. Stuff that matters.
Re:Demystifying Tupper's Formula by brutusborn on Monday May 22, 2023 @11:54PM (#36039623)
That is amazing and so simple, thanks for sharing. Kind of reminds me of the fast square root story.
Re:Demystifying Tupper's Formula by userbinator on Tuesday May 23, 2023 @12:10AM (#36039719)
The meaning of digital data depends entirely on its interpretation. You can interpret a string of bits as an integer, a bitmap, machine instructions, text, etc. Once you have that idea firmly in mind, Tupper's formula doesn't feel any more surprising than e.g. the fact that the PDF spec is itself a PDF, or a physical book describing the process of bookbinding. It's self-referential, but not quite a quine.
Re:Demystifying Tupper's Formula by sorokod on Tuesday May 23, 2023 @02:06AM (#36040482)
I think this is unnecessarily harsh.

After all, what we call reality is just our brains interpreting data. That doesn't make realliity less amazing.

Re:Demystifying Tupper's Formula by spookie on Tuesday May 23, 2023 @03:27AM (#36041061)
Agreed, it's quite amazing what we do. Well I haven't done much :)
Re:Demystifying Tupper's Formula by wumms on Tuesday May 23, 2023 @12:35AM (#36039863)
> let d = (y / 17n) >> (17n * x + y % 17n);

> return d % 2n == 1n;

TIL(JavaScript): A BigInt is created by appending n to the end of an integer literal — 17n — or by calling the function BigInt().

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

Re:Demystifying Tupper's Formula by cabalamat on Tuesday May 23, 2023 @08:27AM (#36043316)
> TIL(JavaScript): A BigInt is created by appending n to the end of an integer literal — 17n

Am I the only person who thinks that looks ugly? I initially misread it as a typo for 17*n.

In Python it would just be 17. Python knows when an int is a bigint, because it is big.

Re:Demystifying Tupper's Formula by ygra on Tuesday May 23, 2023 @08:54AM (#36043542)
Type suffixes on literals are fairly typical in languages using C-style syntax, so for JS I'd expect it to make more sense that way than doing it like Python does. Apart from the usual problems you'd get when your numbers suddenly behave very different than before. That has to be an opt-in syntax change.
Re:Demystifying Tupper's Formula by eagleseye on Tuesday May 23, 2023 @02:41AM (#36040732)
I clicked expecting an article on a secret formula used by tupperware but was positively surprised by some pretty math in the morning. Nice breakdown, thanks!
Re:Demystifying Tupper's Formula by fencepost on Tuesday May 23, 2023 @03:28AM (#36041074)
The secret formula of Tupperware was to get people like my mother to buy it.

So. Much. Tupperware.

Re:Demystifying Tupper's Formula by rollcat on Tuesday May 23, 2023 @05:07AM (#36041748)
I mean it's very good. I have some 25 year old Tupperware in my kitchen and it's still doing absolutely great. Glass eventually breaks, Tupperware plates live. Cheap boxes sometimes break in less than a year. It's worth buying for the longevity alone.
Re:Demystifying Tupper's Formula by goeiedaggoeie on Tuesday May 23, 2023 @07:55AM (#36043020)
polymers degrade, especially with heat or UV. https://www.nationalgeographic.com/environment/article/micro...

Plastics have been a blessing to us humans and a curse to nature.

Re:Demystifying Tupper's Formula by userbinator on Tuesday May 23, 2023 @09:37AM (#36044069)
Tupperware is an example of very durable and safe plastic.
Re:Demystifying Tupper's Formula by goeiedaggoeie on Tuesday May 23, 2023 @12:17PM (#36046454)
Re:Demystifying Tupper's Formula by userbinator on Tuesday May 23, 2023 @03:55PM (#36050010)
"Detectable" != "unsafe".

A lot of FUD articles use that word, and your first link is probably the most factual. But FYI the only Tupperware products that have had BPA are those made using polycarbonate (PC), which is a hard and brittle plastic very different from most of their products and not the first to come to mind upon mention of the brand; on the other hand, the semi-flexible containers they're most known for are PE/PP, which don't require plasticisers at all.

Re:Demystifying Tupper's Formula by mathisfun123 on Tuesday May 23, 2023 @02:51AM (#36040795)
You can use basically the same ideas to arrive at ANS compression (current sota, in terms of speed).
Re:Demystifying Tupper's Formula by OscarCunningham on Tuesday May 23, 2023 @03:14AM (#36040963)
Tupper did eventually make a genuinely self-referential formula. Trávník has made a very impressive one with a smooth typeface. https://jtra.cz/stuff/essays/math-self-reference-smooth/inde...
Re:Demystifying Tupper's Formula by myspy on Tuesday May 23, 2023 @05:46AM (#36041994)
I didn't click the link and came here for a Tupperware discussion thinking they use some weird plastic and the green place did some research on that.
Re:Demystifying Tupper's Formula by pfedak on Tuesday May 23, 2023 @11:13AM (#36045459)
This year's MIT Mystery Hunt had a puzzle requiring you to implement increasingly complicated image-generating formulas: https://puzzles.mit.edu/2023/puzzlefactory.place/puzzles/gra...