How randomness improves algorithms (2023) (quantamagazine.org)
29 points by kehiy 2d ago 11 comments
Solving the Nostr web clients attack vector (fiatjaf.com)
24 points by evanjrowley 1d ago 3 comments
Dicing an Onion, the Mathematically Optimal Way
58 surprisetalk 31 8/16/2025, 1:54:19 PM pudding.cool ↗
They made the horizontal cuts evenly spaced between the cutting surface and the top of the onion, which is nonsensical to me. I believe that a single horizontal cut at around 15-20% height would be better for uniformity than a horizontal cut at 50% height.
I really struggled to effectively cut onions until this: https://www.youtube.com/watch?v=CwRttSfnfcc
Haven't looked back since.
Thanks much!
https://en.wikipedia.org/wiki/Square_watermelon
Imagine the half onion is a half rainbow. You know there’s another half rainbow lurking below the surface, the onion’s ghost of the sphere it once was. Place your knife as usual for each of your ten dice cuts, but instead of cutting straight down towards the cutting board, angle it slightly inward towards the end of the onion’s ghostly half-rainbow sphere below the board. Check your fingers for safety and then make your cut. Assuming your knife isn’t a plasma cutter, you’ll be stopped at the cutting board without ever reaching the onion at the end of the rainbow, and that’s cool. Set your knife at the next dice point and try again :)
(This still improves on the other dicing cases and only costs 1% uniformity by using 100% radius as the target.)
what does this mean, exactly? I don't cut onions. Also I assume there is some pre-step where you cut the onion in half on some axis, but I don't know which.
I’ve always just made equal horizontal and vertical cuts, then slice the onion crosswise.
This results in pretty much no large pieces, and only some smaller pieces (which I prefer over larger ones, anyway).
I don’t care about standard deviation — I only care about minimizing the maximum size (but still without turning them to mush).
(Also, I know this was more of a fun mathematical look at chopping onions vs. practical. But still the “two horizontal cuts” thing seemed to be practical guidance, when it seemed like just equal horizontal and vertical cuts is far superior. But, granted, it’s a little trickier to do.)
EDIT: looking at Youtube, looks like the 2-cut thing is normal. But adding a few more cuts isn’t that much harder, and eliminates the larger pieces from the 2-cut method. I’ll stick to my method, even if it’s a little more work.
In my experience it does worse, as the onion gets unstable to do the vertical cuts.
https://news.ycombinator.com/item?id=44894302
I also like that the article ends with the perfect Kenji-ism. "Yes, technically my method is statistically ideal, but like, it's home cooking and it doesn't matter, heterogenity isn't the enemy". Reminds me of Adam Ragusea (https://www.youtube.com/watch?v=5cWRCldqrxM), we're not making fancy french cuisine, we don't need a perfect brunoise!
In my opinion, so long as you are chopping onions, all is well. Sure it could be dangerous, with fingers and egos at stake, but far worse is to not be chopping onions as that means ready meals, take out meals and having a poorer diet.
The most important part: much less eye watering.
I enjoy the art of prep with my beautiful wa gyuto, I truly do. But if you put a 5 pound bag of large onion on front of me to dice, I will prefer the machine...
What was the point of this judgmental comment?