Hacker Timesnew | past | comments | ask | show | jobs | submitlogin
Demystifying Tupper's Formula (thegreenplace.net)
124 points by picture on May 23, 2023 | hide | past | favorite | 18 comments


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


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


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.


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


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!


The secret formula of Tupperware was to get people like my mother to buy it.

So. Much. Tupperware.


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.


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.


Tupperware is an example of very durable and safe plastic.



"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.


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.


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.


Agreed, it's quite amazing what we do. Well I haven't done much :)


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.


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


You can use basically the same ideas to arrive at ANS compression (current sota, in terms of speed).


That is amazing and so simple, thanks for sharing. Kind of reminds me of the fast square root story.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: