HNHacker News
TopNewBestAskShowJobs

Mindless2112

1,833 karma · joined June 30, 2012

submissionscomments
Mindless2112··on The Myth of Code Coverage
I like this parallelism between coverage and tests:

Coverage can prove that code is not tested but cannot prove that code is tested.

Tests can prove that bugs exist but cannot prove that bugs do not exist.

Mindless2112··on Error codes are far slower than exceptions
From Joe Duffy's series of blog posts on Midori[1]:

> Error codes fail the test of “zero overhead for common cases; pay for play for uncommon cases”:

> There is calling convention impact. You now have two values to return (for non-void returning functions): the actual return value and the possible error. This burns more registers and/or stack space, making calls less efficient. Inlining can of course help to recover this for the subset of calls that can be inlined.

> There are branches injected into callsites anywhere a callee can fail. I call costs like this “peanut butter,” because the checks are smeared across the code, making it difficult to measure the impact directly. In Midori we were able to experiment and measure, and confirm that yes, indeed, the cost here is nontrivial. There is also a secondary effect which is, because functions contain more branches, there is more risk of confusing the optimizer.

> This might be surprising to some people, since undoubtedly everyone has heard that “exceptions are slow.” It turns out that they don’t have to be. And, when done right, they get error handling code and data off hot paths which increases I-cache and TLB performance, compared to the overheads above, which obviously decreases them.

[1] http://joeduffyblog.com/2016/02/07/the-error-model/

Mindless2112··on South Dakota nurse says many dying patients still insist Covid-19 'not real'
The delusion of the left is that central planning and control will prevent the spread of the virus. That's not exactly wrong -- it just has to be the level of government control that China has. A lot of Americans, myself included, won't tolerate that. (And for the record, I wear a mask.)
Mindless2112··on Git is too hard
There is work being done[1] to make Mercurial work on git repositories.

[1] https://www.mercurial-scm.org/wiki/GitExtension

Mindless2112··on I am an Uighur who faced China’s concentration camps
It actually is impossible for most people for a lot of products. It would be much better to pass something like the PRIME Act[1].

[1] https://www.congress.gov/bill/116th-congress/senate-bill/220...

Mindless2112··on I am an Uighur who faced China’s concentration camps
Country of origin is often not stated on product listings, and it's not clear what it should say for things made partially in multiple countries.
Mindless2112··on The 2020 census is being ‘sabotaged,’ says leading U.S. statistician
At the time, slavery was legal. Unauthorized residency is not.
Mindless2112··on World reaction to long queues of voters in US
The Republican Party of California set up ballot boxes in locations frequented by Republican voters so that they can harvest Republican-favorable ballots and... throw them away?

I get that putting up ballot boxes that pose as "Official" should/may be illegal, but the ballots that go into those boxes are going to get delivered and counted.

Mindless2112··on Feds may target Google's Chrome browser for breakup
Okay, I thought "without cookies" was referring to having cookies disabled.

I use Cookie AutoDelete and YouTube doesn't give me any problems for discarding its cookies. But maybe one of the uBlock Origin annoyance filter lists I use is taking care of the nag screen.

Mindless2112··on Feds may target Google's Chrome browser for breakup
Why not use Cookie AutoDelete?

Firefox: https://addons.mozilla.org/en-US/firefox/addon/cookie-autode... Chrome: https://chrome.google.com/webstore/detail/cookie-autodelete/...

Mindless2112··on NestedText, a nice alternative to JSON, YAML, TOML
You wouldn't use this for arbitrary object serialization. Lists can only contain strings, not other lists or dictionaries.

As for stringification, JSON's data types are mismatched with pretty much everything that isn't JavaScript to some degree. If you need to serialize a 64-bit integer to JSON, you serialize it as a string because the parser on the other end is probably going to try to parse it as a double-precision floating point number. Once you've started serializing numbers as strings anyway, it's not too far to "serialize every scalar as a string".

Mindless2112··on Publishers worry as ebooks fly off libraries' virtual shelves
I don't have any statistics on physical books, but anecdotally the physical books I check out from the library happen to be much older than 2 years and still in good condition -- perhaps survivorship bias combined with my preference in books.

For ebooks there's this:

> Macmillan’s claim of only making $1.15 per book is incredibly misleading, Potash argued. “Seventy-nine percent expired and were removed from library catalogs because the two-year limit occurred first—not because they were checked out 52 times,” he said. In reality, the average is about 11.5 lends. According to Potash, the cost to the library is $6.07 every time someone borrows a Macmillan book.[1]

[1] https://www.vice.com/en/article/pa78wv/one-of-americas-large...

Mindless2112··on Publishers worry as ebooks fly off libraries' virtual shelves
I'm more concerned for the libraries. They lose their ebooks after 2 years or 26/52 checkouts? Physical books can last for decades and innumerable checkouts if you have respectful patrons -- long enough that libraries eventually sell off old books to get shelf space for new ones.
Mindless2112··on Commerce Department Prohibits WeChat and TikTok Transactions
The point is that it is naive to claim that a foreign government will have no power over you.
Mindless2112··on Commerce Department Prohibits WeChat and TikTok Transactions
Instead, the CCP can say "it'd be a shame if the US authorities found out what you're doing, but if you share some of your company's confidential documents with us then we won't tell."
Mindless2112··on Commerce Department Prohibits WeChat and TikTok Transactions
Anything less than a sale will not assuage concerns, and the Chinese government has prevented TikTok from being sold. So no, it's dead.
Mindless2112··on The Case for Dumping the Electoral College
Maine and Nebraska are the two states that don't do winner-take-all. Most states won't switch to proportional allocation because the party with the most political power in a state is likely to lose electoral college votes by switching.

> In forty-eight states and D.C., the winner of the plurality of the statewide vote receives all of that state's electors; in Maine and Nebraska, two electors are assigned in this manner and the remaining electors are allocated based on the plurality of votes in each congressional district.[1]

[1] https://en.wikipedia.org/wiki/United_States_Electoral_Colleg...

Mindless2112··on Checked exceptions: Java’s biggest mistake (2014)
> checked exceptions pollute your API and expose implementation details

Exceptions aren't an implementation detail. They're part of the API contract. Checked exceptions make this explicit, but people don't like that because error handling is hard and pretending that errors don't happen is easy.

Mindless2112··on Albuquerque Police Engaged in Secret Intelligence Gathering Operation
One thing this article fails to mention is that Albuquerque is the property crime capitol of the US[1]. APD needs all the help it can get.

[1] https://en.wikipedia.org/wiki/List_of_United_States_cities_b... (sort by total property crime)

Mindless2112··on BitTorrent v2
3 years, not 12. BEP 52 was based on BEP 3 and kept the same metadata, including the creation date.

http://bittorrent.org/beps/bep_0003.html

Mindless2112··on Mathematicians should stop naming things after each other
You mean "C with Classes"?
Mindless2112··on Half of Americans fear a health-related bankruptcy
I'm assuming by "universal healthcare" you mean single-payer. I think the biggest problem is that changing who pays for it doesn't actually fix the problem. You've still got the most expensive, least effective healthcare system in the world -- now it's just financed with your tax dollars.
Mindless2112··on Battleshorts, exaptations, and the limits of STAMP
I knew I'd heard "battle shorts" somewhere before, but I couldn't think of where. It's the wrong kind of "shorts" though -- and regarding the other kind:

> What do you mean, "why has it got to be built?" It's a bypass! You've got to build bypasses!

Mindless2112··on Japan facing credit card number shortage
The credit card number space is not running out of numbers. Also, credit card numbers aren't random; they have a structure[1].

[1] https://en.wikipedia.org/wiki/Payment_card_number#Structure

Mindless2112··on Huawei CEO: After September 15 No More Kirin Chips
That was already China's stated goal in their "Made in China 2025" initiative.

> The initiative encourages production of high value products and services, like aerospace and semiconductors, to help achieve independence from foreign suppliers.[1]

[1] https://en.wikipedia.org/wiki/Made_in_China_2025

Mindless2112··on OneLook – Dictionary Search with Wildcards
I use the OneLook reverse dictionary all the time to try to find the right word (not for crosswords), but I do wish it were smarter. If only someone would make a deep-learning-based reverse dictionary.
Mindless2112··on Amazon Warehouse scam: 16TB HDD swapped for 8TB, returned for full refund
Depending on what brand you want, they're as cheap as $5 on B&H: https://www.bhphotovideo.com/c/search?q=sd%20card&filters=fc...
Mindless2112··on Can Our Ballots Be Both Secret and Secure?
Excellent! (And presumably more robust than the scheme I described.)
Mindless2112··on Can Our Ballots Be Both Secret and Secure?
For point 2, you could put the very local questions on a separate ballot with a separate unique identifier per voter. It would be mildly inconvenient though.

Someone should be observing the voter taking the strip of paper, but it would be done in a way to prevent them from observing which one was taken by the voter.

Mindless2112··on Can Our Ballots Be Both Secret and Secure?
1. The way in-person voting works where I live, no. Mail-in ballots naturally require trust that the inner envelope will not be correlated with the outer envelope.

2. It's not, aside from that it is more easily automated. "Helping" certain voters fill out their mail-in ballots is already an easy way to manipulate an election.

← PreviousPage 6 of 16Next →