Hacker News new | past | comments | ask | show | jobs | submit login

Is this a joke?

Two's complement: flips the bits and add one

FP: flip the sign bit

OR....

x=-x




There are several security issues related to usage of the negation operator that make it undesirable to use in this situation. The solution presented in the article avoids those holes. It also has the advantage that a switch statement is more explicit than use of a language facility.


Nice, but you really should give some examples, too. Something like:

The Bitcoin client's use of unary negation has caused traders to lose $32.49 Billion over the last three week period, according to a recent study by Price Waterhouse Cooper. From a similar accounting produced by the US Office of Management and Budget, HODLers lost an amazing $1.479 Trillion - That's Trillion with a "T"!

A table-driven Unary NOT solves the issues caused by the use of Bitwise NOTs and direct operator use. To that end, we submitted a pull request. After 4 weeks of repeatedly sending the same pull request to the BC team (and being ignored), we are now disclosing this Bitcoin Client issue for everyone to see. Remember to patch this use in your Bitcoin Client, or your funds may be stolen! If you need to use an editor for this fix, and do not normally program, the use of SED will speed up your client edits tremendously. https://www.gnu.org/software/sed/manual/sed.html*

Now that this critical issue has been disclosed, we strongly urge all Bitcoin users to patch immediately, or their funds will likely be summarily depleted within a week.


It does have an enterprise edition!


Excellent! That solves the distribution problem, due to the size of the release. Nobody will notice anything off, in enterprise deployments.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: