Better HN
topnewbestaskshowjobs
Log inSign up

wfunction

3,901 karma · joined Oct 15, 2012 (14y ago) · 1,547 submissions

Submissions

comment 10y ago · link · parent

What's your alternate recipe for success?

comment 10y ago · link · parent

Totally disagree. I enable it on the rare occasions I need to and disable it immediately after I'm done doing what I need. This happens quite rarely (a few times a year) so, basically: no, I beg to differ.

comment 10y ago · link · parent

> You rarely see Unix apps re-creating files: there you instead you specify the behaviour in case the file exists with the flags of the open(2) call.

I think your lack of knowledge about this problem is betraying you. This is outright wrong. First, look up CreateFile() in Windows; it has flags to specify things like this as well. Second, the reason programs delete files in the first place has nothing to do with the lack of such flags. It has to do with the fact that they want to write new contents but don't want to lose data in the event of an abnormal termination. If you truncate the file that you're opening instead, then you lose that data if something goes wrong. So they create a new file and replace it with the old one when it's written.

Finally, as far as I know, 'nix tools have a tendency to outright replace files MORE than Windows tools do. That's why the underlying Windows kernel API function (NtCreateFile/ZwCreateFile) has a FILE_SUPERSEDE parameter... whose entire intention is to mimic POSIX behavior:

> The CreateDisposition value FILE_SUPERSEDE requires that the caller have DELETE access to a existing file object. If so, a successful call to ZwCreateFile with FILE_SUPERSEDE on an existing file effectively deletes that file, and then recreates it. [...] Note that this type of disposition is consistent with the POSIX style of overwriting files.

https://msdn.microsoft.com/en-us/library/windows/hardware/ff...

comment 10y ago · link · parent

Would anyone happen to know what the accident rate is for drivers who drive manual vs. automatic as a whole?

What about among the same drivers who drive both? (This one is to control for distractions that might be present when driving automatic but not manual.)

695.

WikiSort: Fast, stable, in-place sorting algorithm in the public domain(github.com ↗)

3 points · by wfunction · 10y ago · discuss

comment 10y ago · link · parent

Thanks!

comment 10y ago · link · parent

You totally missed the point of my question. I was NOT asking "I have an allocator that doesn't store the buffer size; how can I use it?"

I was asking, "I don't think an allocator should need to store the buffer size internally; why not formulate the challenge so that the block size doesn't need to be stored?"

comment 10y ago · link · parent

What about Chromium?

comment 10y ago · link · parent

That means it uniquely identified you to Google every day then, right?

comment 10y ago · link · parent

What if I want to write a malloc that requires the size to be stored separately? (i.e. one that needs to be paired with free(ptr, length) rather than just free(ptr) for good performance.) Wouldn't that provide more flexibility in the challenge and be more useful (e.g. for C++'s std::allocator)?

comment 10y ago · link · parent

The problem is sometimes I DO want to watch the video. I just don't want it to always autoplay.

comment 10y ago · link · parent

CNN especially gets on my nerves. They seem to have gone out of their way to do everything they can to make sure all plugins/extensions that try to block it fail.

comment 10y ago · link · parent

I'm like this too. I can't stand unread email.

comment 10y ago · link · parent

What bothers me is, how do they tell someone is a Russian citizen?!

705.

LinkedIn to be blocked in Russia; Google, eBay, Uber, and Booking.com have moved(washingtonpost.com ↗)

17 points · by wfunction · 10y ago · 16 comments

comment 10y ago · link · parent

But I think the point was that it's a (large) city.

comment 10y ago · link · parent

You don't really always need it all the way up to the highest possible when you're dealing with e.g. hard floors IMO. Though your mileage may vary obviously (and that wasn't really a crucial part of my comment).

comment 10y ago · link · parent

Question: how good are Roombas at actually cleaning? With an actual vacuum, I can turn it high or low, or press it harder or easier, or stick it at weird angles to make it clean. How good are Roombas in comparison?

comment 10y ago · link · parent

More interesting stuff is here (but the PDF was worth posting by itself):

https://paranoidsbible.tumblr.com/cybersec

710.

The Master Opt-Out List [pdf](a.pomf.cat ↗)

2 points · by wfunction · 10y ago · 1 comment

comment 10y ago · link · parent

Good to know -- thanks for the anecdote!

comment 10y ago · link · parent

> let's take this a step further: two republicans, one falsely registered as a democrat, now have been paired off at the polling station in Araphaoe County. the lie was bought, the fraud complete. now what?

I don't know, but you seem to be completely ignoring my point. I'm trying to figure out the probability of this happening. I'm NOT trying to figure out what to do after this happens.

comment 10y ago · link · parent

> that's a risk you have to take

Well, obviously. But the risk can be high or low, right? You could either let any random voter you don't know walk in and become a volunteer after filling out a form, or you could let maybe ~50 people that the party's head/nominee personally trust pick a set of volunteers nationally based on e.g. personal knowledge or some concrete evidences of their past contributions and allegiance to the party. Or something else; there are lots of possibilities here. So I'm asking what the criteria are so I can understand how likely it is for something to go wrong here... I obviously understand nothing 100% bulletproof, so there's no need to point that out.

comment 10y ago · link · parent

> everything we did was in pairs of republicans and democrats

Question: What constitutes a Democrat or a Republican? Is registering as one enough? What guarantee is there people aren't lying about the parties they identify with?

comment 10y ago · link · parent

> Super cool stuff!

Literally!

comment 10y ago · link · parent

> Where discrimination becomes wrong is when it's based off race or some other protected class.

Really now?

If a 50-year-old doesn't want to live with a 20-year-old, that's wrong to you?

If a theist doesn't want to live with an atheist, that's wrong to you?

If a woman doesn't want to live with a man (or woman for that matter), that's wrong to you?

If an Israeli doesn't want to live with a Palestinian, that's wrong to you?

If a pacifist doesn't want to live with a veteran, that's wrong to you?

If an American Indian doesn't want to live with a British, that's wrong to you?

You think people who want to rent out a mere room or two of their home should be forced to disregard the "protected class" of the tenant? That genuinely makes sense to you?

Like seriously... discrimination is not black and white. It shows complete ignorance when you say discrimination based on a protected class is somehow automatically wrong. The context (in this case, whether you're living with them) matters -- a lot.

comment 10y ago · link · parent

Same thing with the Facebook app; whenever you're searching for something, it shows the result you want, but then like 0.5-1 second later it pops up a different result above it so you tap the wrong thing. Drives me insane.

comment 10y ago · link · parent

Sorry, I wasn't asking what's interesting about delta functions -- I've used them as well. I was asking about the document and what's significant about it, since it seems quite incomplete (?) and hardly goes into any depth (or breadth for that matter)... there are lots better ones out there so I'm confused why anyone posted this.

comment 10y ago · link · parent

I feel like there's a third category right in between: those who take a job only if the KNOW they can learn it along the way.
1
232425
52