Hacker Newsnew | past | comments | ask | show | jobs | submit | bennettnate5's commentslogin

It's common in English writing to interject additional details in on a noun by using a phrase separated with commas. I've personally found Oxford commas can in certain cases make it unclear whether you're interjecting or not, like so:

Alice, the cook of the house and the guest were very chatty that evening.

Alice, the cook of the house, and the guest were very chatty that evening.

In the second, is Alice the cook of the house or not? This is the ambiguity of Oxford commas.


If you’re one to omit the Oxford comma in your writing, then how do I resolve the ambiguity in your first example?

Here's a potential winning strategy: take a coin out of your pocket and flip it 100 times. If it lands heads 51 or more times, take both boxes; otherwise, just take the one. Provided the computer had anticipated you being the kind of person that would do this, it would anticipate you are probabilistically more likely to take the single box exclusively and put the million dollars in it. Regardless of the outcome of the coin tosses, you get that million dollar box, and you still get the added $1000 in the first box 49% of the time.


Not commenting on the quad tree specifically but I know a lot of reasoning that goes into non-binary tree structures comes down to performance gains from exploiting cache entry size. When each node lookup in the tree is going to trigger an 64-byte load from L1, it's often much better performance to have your tree have 4 or 8 pointers to children in that cache entry rather than two if it means you do on average half or quarter as many traversals.


This is also why we use quaternary min-heaps instead of binary ones for general purpose applications.


> prince Fëanor

> one of the good guys

Uhhhh...

Feanor drew his sword on his half-brother and threatened to kill him because he was paranoid Fingolfin was trying to usurp his power. He compelled all of his sons to swear an oath to slay any man, elf or being in possession of the silmarils (which led to subsequent needless bloodshed).

Then he ordered and carried out the mass-murder of relatively unarmed Teleri in order to rob them of their ships.

Such actions does not a good guy make.


And yet even Feanor was a “good guy” at one point in time. It wasn’t until many years after the invention of the palantiri that he went off the rails, and that was only after talking to Sauron for a while.

But I think that Feanor’s character is irrelevant. An evil person could create a tool that ends up being useful for good purposes. Tools are neutral; they don’t inherit the character of their creator or their user.


The simplest example is `memcpy(dst, src, len)` and similar iterative byte copying operations. If the function did not use noalias, the compiler wouldn't be free to optimize individual byte read/writes into register-sized writes, as the destination may overlap with the source. In practice this means 8x more CPU instructions per copy operation on a 64-bit machine.

Note that memcpy specifically may already be implemented this way under the hood because it requires noalias; but I imagine similar iterative copying operations can be optimized in a like manner ad-hoc when aliasing information is baked in like it is with Rust.


That's not a great example, since memcpy() already has all the information it needs to determine whether the regions overlap (src < dest + len && dst < src + len) and even where and by how much. So pretty much any quality implementation is already performing this test and selecting an appropriate code path, at the cost of a single branch rather than 8x as many memory operations.

The real purpose of restrict is to allow the compiler to cache a value that may be used many times in a loop (in memcpy(), each byte/word is used only once) in a register at the start of the loop, and not have to worry about repeatedly reaching back to memory to re-retrieve it because it might have been modified as a side effect of the loop body.


I find it humoring that this article inadvertently contributes to its statistic


The authors are getting their conclusions all wrong; this is clearly convincing evidence that some teachers are slipping HGH in their students' lunch meals! /s


When support needs are infrequent enough on the customer end, this effectively becomes a market for lemons--a customer can't know how good your support is until they've bought your product, and by then it's too late for them. People can advertise world-class customer support for one-time purchases because the few customers that encounter the awful support won't move the needle that much compared to shifting money from long term support teams to sales teams.

That being said, I realize this dynamic is likely much different for frequent/long-term buyers such as B2B solutions where quality support does translate to better retention and word-of-mouth advertising.


> They were named after President Lincoln, but only as a marketing tactic

> there's no real connection

Funny--I always thought it was meant to be a pun on linkin', as in you're linkin' the logs together because they have those slots that fit precisely together on the ends.


I think it's both that and the popular tale of Lincoln having been born in a log cabin (which for some reason I thought I had heard wasn't actually true, but from looking into it now, it seems like a lot of sources say it is, so maybe I heard wrong?)


Not to be confused with the National Archives _Museum_, where you can still readily visit to see important documents such as the declaration of independence.


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

Search: