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

Intelligence agencies != law enforcement agencies

The NSA != your police officers

Just because encryption is a good technique to use against the NSA's surveillance that doesn't mean it's in the public interest in terms of law enforcement.

comment 12y ago · link · parent

How are you supposed to verify with FireChat who sent the message when you don't have an internet connection though? Are you supposed to route your (presumably encrypted) request through other (presumably connected) phones? What's the point of requiring an account when the their entire selling point is that you can use the app in places with no internet access at all, like the wilderness?

comment 12y ago · link · parent

Something I don't understand: can someone explain why FireChat needs an account when it doesn't require internet access?

comment 12y ago · link · parent

Two things:

1. I said earlier that I already know how to find the numbers mathematically. What I don't have any intuition for is why the numbers are correct (such as why both e and pi should be in the answer).

2. You can't just distribute the exponents without justifying that it's valid. (I don't know the appropriate conditions for doing this myself either, but I know they exist.) For example (e^(2 i pi))^(1/2) is not e^(i pi), it's e^0. In other words, you need to first reduce it mod 2pi. Now if you're dealing with complex numbers I have no idea what the conditions should be.

comment 12y ago · link · parent

Your intuition is nice for figuring out the directions, but not so nice for explaining the numbers. By which I mean, I can understand why it's real, but I can't explain why i^i = e^(-pi/2)... I would expect it to be a nicer number instead (like 1/2, or 1/e, or something like that). I can't really explain why both pi and e end up int he formula.

comment 12y ago · link · parent

Is there really an intuition for i^i? I can give you the answer but I have nearly zero intuition for it.

comment 12y ago · link · parent

Do you end up writing perfect code when you learn from examples?

Just like you, I learn from examples rather than by reading documentation... and I suspect that just like me, you don't end up spending 5 minutes writing perfect code. If true, to me, that means your friend's method is superior.

comment 12y ago · link · parent

It's not that it's incorrect, it's that it's pointless. The entire point of a linked list is that you don't move around the data, you just re-link nodes. So any sane algorithm that works on linked lists is already "in-place" by default; an out-of-place merge on a linked list would be pure madness. So saying that an in-place merge can be performed on a data structure that already has some overhead and which already performs everything in place is not a very insightful or useful observation.

comment 12y ago · link · parent

Ohh sorry, I thought you were talking about the merge, not the sort. Yes O(n log n) is allowed for the merge, but what I'm saying is that the Dr. Dobbs article's in-place merge sort is actually not quite an in-place variant of merge sort: its complexity (as far as I can tell) is O(n log^2 n) rather than O(n log n).

comment 12y ago · link · parent

See, that would violate the standard. The standard mandates O(n log n), but I don't think any implementation follows this. (Again, that complexity is indeed possible, but quite challenging and not something I've seen in standard library implementations.)

comment 12y ago · link · parent

Yeah, exactly. For those who didn't catch it: linked lists already have O(log n) overhead, because distinguishing between n items requires log n bits for the pointer. They're fundamentally not in-place.

comment 12y ago · link · parent

You're confusing two things:

1. Yes, merge sort is exactly the kind of algorithm you'd use for sorting linked lists

2. No, sorting linked lists is not the primary application of merge sort

comment 12y ago · link · parent

Are you talking about this?

https://github.com/gcc-mirror/gcc/blob/master/libstdc%2B%2B-...

Do you know what the time complexity of their merging algorithm is?

As a side note, an optimal merging algorithm is in the paper called "On Optimal and Efficient in Place Merging", and it's too complicated for me to expect it in a standard library implementation. (Although the STL doesn't need to be optimal, I think the sub-optimal linear-time algorithms are also complicated enough to not be used for the standard library, but correct me if I'm wrong.)

comment 12y ago · link · parent

> Can you clarify what you mean by that?

I'm saying their merge sort was likely not actually in-place.

comment 12y ago · link · parent

I don't think people have linked lists in mind when they talk about merge sort.

comment 12y ago · link · parent

It's really silly that they depend on the STL implementations, because I don't believe STL implementations actually implement in-place merges in-place. The actual problem of stable in-place merge is extremely hard, so I was really surprised it would show up in a Dr. Dobbs article.

1127.

Complex Step Differentiation(blogs.mathworks.com ↗)

47 points · by wfunction · 12y ago · 8 comments

comment 12y ago · link · parent

> We know they also exploited heartbleed.

Do you have links that show this is true?

comment 12y ago · link · parent

Maybe it was a frontdoor to their products/services instead of a backdoor. (Only half joking.)

comment 12y ago · link · parent

What about a backdoor in their routers? Or even a "front" door in their entire network infrastructure? Is it really that clear?

comment 12y ago · link · parent

250k euros per ride? How do they justify that?

comment 12y ago · link · parent

For someone who's never seen Ada code, could you explain what kind of strictness it has that doesn't exist in other languages like (say) C++?

comment 12y ago · link · parent

Am I the only one who's worried this may make the government less careful about giving orders in the future? (i.e. won't they figure "hey, let's just give the order; if they disagree then they'll defy it"?)

comment 12y ago · link · parent

Because I'm almost certain that it will cause some kind of inconvenience down the road. It's unlikely to be "free" -- no OS-level security feature I've seen has been "free" in terms of convenience.

comment 12y ago · link · parent

> I don't. Absolute security is impossible

Yeah then why do you suddenly jump when I tell you the same thing? To the best of my knowledge I don't have any malware, and to the best of your knowledge you don't either. Seems pretty equal to me, yet somehow you freak out when I say the same thing as you do. I'm pretty sure I'm at least as certain as you are that my system doesn't have any malware, so if that's not enough of an assurance for you then it shouldn't be enough for you either.

1
373839
52