Better HN
topnewbestaskshowjobs
Log inSign up

wfunction

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

Submissions

comment 12y ago · link · parent

> Your computer can be compromised without demonstrating any visible signs of it.

Yours can too. How do you know yours isn't?

comment 12y ago · link · parent

> Even if you know what you're doing, do you know what your computer is doing? In detail?

It's just like a car. You don't have to know how your car's engine works to be able to tell tell when your car isn't running like it's supposed to. As for my computer, I know it in as much detail as I think is necessary for telling whether or not the computer is "healthy", so yes. (See my response to the other comment for more.)

comment 12y ago · link · parent

> And how do you know you have not got malware in years?

Same way you can tell whether you're feeling healthy or sick.

Same way you "know" something is wrong when your car stops running the same way it usually does.

i.e., I can't prove it one way or another, but that doesn't matter. In practice, I mentally keep a tab on how my computer is running -- my computer's CPU usage, network activity, I/O activity, internet connection speed, etc. so I can tell when something's not going right. I don't keep crapware on my computer either, so when a process shows up that I don't recognize, then I can easily tell. I have notifications set up for newly-installed system services, so when a new service or driver is installed I get a popup for that too.

Obviously, I can't prove it's malware-free, but who cares? I don't need to. I simply have no evidence in support of malware existing on my computer, so as far as I'm concerned, it isn't. Just like you can't mathematically prove to me that your car is OK, I can't mathematically prove to you that my computer is running OK. But that doesn't matter because I'm reasonably sure it is, and I have no evidence to believe otherwise. And that's really all that matters.

And for that matter, it's not like I could be sure I didn't have malware if I did follow those practice either. It's just a tradeoff between the likelihood of malware and the amount of convenience you're willing to give up. You can never be sure, and you don't need to.

comment 12y ago · link · parent

Yes? In fact I hate getting prompted for privileges/passwords/etc. I don't run antimalware either, neither on Linux nor Windows (permanent admin there too). I know what I'm doing when I'm working on the computer and I haven't gotten malware in years.

comment 12y ago · link · parent

Absolutely horrible idea. Linux users aren't exactly in desperate need of protection from their computers.

1146.

Frog flies as science defies gravity [1997](deseretnews.com ↗)

1 points · by wfunction · 12y ago · discuss

comment 12y ago · link · parent

Is there any actual HD video? I find it really surprising I can't find any...

1148.

C++: Checking units at compile time (2003)(everything2.com ↗)

28 points · by wfunction · 12y ago · 5 comments

comment 12y ago · link · parent

Actually that statement has a point. Have you ever tried implementing std::vector and java.util.ArrayList and comparing the two implementations? One of them is trivial, the other one is most certainly not. One of the reasons is exception-safety guarantees. I'll leave it for you to figure out which is which.

comment 12y ago · link · parent

Ok, that explains it. When you're used to Java it's easy to expect inheritance to be a big deal. The fact of the matter is that run-time polymorphism (aka virtual) is much more rarely necessary in the C++ world than the Java world. The only reason it's common in Java is that it's the only tool available for many job that C++ has other tools for, and it also avoids an extra composition overhead that doesn't exist in C++.

tl;dr: Just because it's "infinitely more valuable" in Java doesn't mean the same for C++.

comment 12y ago · link · parent

I don't know how you manage it, but I can tell you it is not reasonable to expect people to compile every compiler they want to use on every system they want to use it.

comment 12y ago · link · parent

> Exceptions have a significant performance impact

Are you talking about enabling exceptions, or throwing them?

comment 12y ago · link · parent

Seemingly off-topic, but I'm curious -- what language has the majority of your 20+ years of development been in?

comment 12y ago · link · parent

You say "if you build the cross-compiler" as though it's as simple as "if you cross the street". Have you ever tried building GCC? I've wasted days on it and in the end still failed to make it work.

comment 12y ago · link · parent

Performance is only one side of it. The bigger reason is http://stackoverflow.com/a/814939

comment 12y ago · link · parent

> The downside, of course, is just how much code exists that is written in pre-C++11 dialects, and how many programmers are trained to write that sort of code.

I do the same thing. Not because I can't write C++11, but because I still encounter systems with older compilers that I want to run programs on. What, is this surprising?

Let's face reality: it's a little unreasonable to expect every system you work on to have a compiler less than 3 years old.

Especially true on older Linux systems, it's sometimes a massive pain or even pretty much impossible to upgrade the existing compiler in a package-manager-friendly way (try upgrading Ubuntu 12.04's compiler to GCC 4.9, for example), so you'd have to compiler the compiler from scratch. Which is a pretty massive PITA and more or less requires a PhD of its own for GCC (Clang is a little better). And on Windows VC++ isn't always exactly following the correct standard. It's not necessarily outright impossible, but it's pretty impractical.

comment 12y ago · link · parent

Uh, no, "virtual" should absolutely NOT be the default. I don't know where you got that idea from (Java?) but it's absolutely horrible.

comment 12y ago · link · parent

> But consider another example where the underlying target was "all points with rational coordinates". All the probes in a grid sampling scheme would hit the target, but the target has measure zero.

And how exactly would the Monte Carlo version differ here? Every single random number generated is going to be rational isn't it?

comment 12y ago · link · parent

Yeah, search for "Example #1" and subsequently "Monte Carlo" on this page:

http://jakevdp.github.io/blog/2014/06/06/frequentism-and-bay...

comment 12y ago · link · parent

> The advantage of Monte Carlo isn't that it's the best method

I feel like you didn't read a single sentence of my comment, because that's exactly what I said I was not saying.

comment 12y ago · link · parent

It's just a smart-aleck comment pointing out that there is a "bias" because we're using a finite number of points and we get the same exact answer every time -- and since that answer isn't exactly equal to pi, the procedure is "biased".

Which no one cares about because (1) this isn't a probabilistic process in the first place, so "bias" itself is meaningless, and (2) there is now an exact bound on the error, unlike the previous case (I guess you can think of this as the "variance" if you want).

comment 12y ago · link · parent

See my comment here. https://news.ycombinator.com/item?id=8159270

comment 12y ago · link · parent

I think you missed my point. I know this isn't how pi is calculated, that is completely irrelevant to what I've been trying to say. I also know Monte Carlo has other benefits, and that's entirely my point: the actual benefits aren't illustrated in the example.

what I'm saying is that the entire point of illustrating an algorithm by example is to illustrate the power of the algorithm compared to a naive approach, regardless of whether or not there is a better way to solve the example problem.

i.e., the example should motivate the algorithm. But computing pi is one of the worst possible illustrations of why anyone would use Monte Carlo, because it's inferior to the naive approach. i.e., it doesn't motivate why anyone would want to use Monte Carlo.

comment 12y ago · link · parent

I've done that too, and I think there's nothing wrong with that. All I'm saying is people should stop calling it Monte Carlo once they've found the correct solution and realized it has nothing to do with randomness.

comment 12y ago · link · parent

Who cares? The error is going to be there either way. And Monte Carlo can't guarantee any hard bound on that error, whereas using equally spaced points gives you a pretty darn good hard bound.

comment 12y ago · link · parent

I think we're talking past each other here. Talking about "sample space" inherently assumes you're dealing with a random process. My point is pi isn't random, so coming up with a random process just so you can force MC on it and then suddenly deciding you want to make it deterministic just so you can call it "pseudo-MC" is kinda... weird, to say the least.

I really wish people would stop trying to find ways of calling their algorithms "Monte Carlo" just to make their work sound fancy. All it really achieves is it makes them avoid thinking about how to solve the problem. Monte Carlo isn't a universal hammer. First you're supposed to show randomness actually helps you gain something, then you're supposed to start using it.

comment 12y ago · link · parent

Calling it "pseudo-Monte Carlo" is like calling a landline phone a "wired cell phone". It kind of misses the point.

comment 12y ago · link · parent

I will never understand why people think Monte Carlo is such a neat solution. There is nothing random about pi.

Why didn't you just pick the center of the square, use that to partition it into 4 pieces, and recurse for each subsquare?

Or just as easily do this? http://pastebin.com/ezi7S35N (Edit: just noticed a typo -- I should be initializing the numerator/denominator inside the loop, not outside, sorry.)

What's the point of adding randomness?

comment 12y ago · link · parent

Will I be able to view this on my phone? I might not have a computer handy live unfortunately!

comment 12y ago · link · parent

The options are not simply "drop data" or "don't drop data". The options depend on the logging source, because not every logging source requires a fixed-size buffer. The API itself needs to support various logging sources and thus needs to support extensible buffers (e.g. file-backed sources, the way ProcMon does). Whether or not a particular logging source supports that is independent of whether or not the generic logging interface needs to support it.
1
383940
52