yarskegg
Re:Nearly All Binary Searches and Mergesorts Are Broken (2006)
on Sunday November 06, 2022 @09:40PM (#33500454)
I think this might be better for c/c++ though admittedly a bit more cryptic:
(x>>1) + (y>>1) + (0x01 & x & y)
Re:Why do arrays start at 0?
on Wednesday August 24, 2022 @09:18PM (#32588161)
That gets really dicey if you're storing the value of the index in a variable. Does the programmer need to know that if it's an INDEX they're storing that goes from 1-256 they can fit that into an 8-bit value because the compiler will magic away that last bit? Speaking of which, how will the compiler know which 1's are really 0's and which 256's are really 255's? Will it compile that 1+1=1 if I use that result as an index? Just having a 0th index is much simpler than all of that noise.
Re:Trolls convinced journalists they were “abortion bounty hunters”
on Saturday September 11, 2021 @10:18AM (#28492167)
Let me put it to you this way. Everyone knows that salicylic acid (originally derived from willow bark) is a precursor to aspirin that is effective as a pain killer, fever reducer, and anti-inflammatory.
https://en.m.wikipedia.org/wiki/Salicylic_acid
and
https://www.ehs.com/2015/07/salicylic-acid-safety-tips-hazar...
But salicylic acid is also used in skin care products like wart remover.
Here's a wart remover product for dogs and horses, which contains salicylic acid as an active ingredient: https://www.chewy.com/creative-science-wartsoff-wart-dog/dp/...
If, the next time you have a fever, you reach for the dog/horse wart remover... I'm gonna call that "dog wart remover" regardless of the fact that it contains an ingredient that is used to treat fevers in _humans_