HNHacker News
TopNewBestAskShowJobs

bnegreve

2,040 karma · joined January 4, 2011

submissionscomments
bnegreve··on Why are free proxies free? (2013)
> only downside anyone else on your ip or range you specified can use that proxy too.

If you have ssh access, you can set up a proxy on the remote server, and use ssh dynamic port forwarding (-D) to forward the proxy connections on your local machine.

Using this trick you can safely use any ssh capable machine as a proxy. It works like a charm.

bnegreve··on This year, I resolve to ban laptops from my classroom
> maybe is because your lecture is boring as hell.

Maybe or maybe not, it's not surprising that all teaching material isn't always as immediately rewarding as checking facebook.

bnegreve··on Sleep sort (2011)
True, but writing a linear sort with bounded number of distinct elements is not really a challenge.

E.g.

Intput, T: array of n elements, m: number of distinct elements.

    for i in 1..m
       for j in 1..n 
           if( T[j] == i ) print T[j]; 
This is O(n * m) which is O(n) since m is a constant.
bnegreve··on Coq: The world’s best macro assembler? (2013) [pdf]
This issue is addressed in the FAQ: https://coq.inria.fr/faq?q=node/16&som=2#htoc4
bnegreve··on Coq: The world’s best macro assembler? (2013) [pdf]
Not at all, but I was told that the pun was totally intentional [citation needed].
bnegreve··on The Story of Apollo 17 and Why We Never Went Back to the Moon
Keeping an entire population of humans alive (possibly around 20,000 - 40,000 individuals [1]) on a space ship for at least 100 years (time required to reach Alpha Centauri with nuclear based propulsion [2]) is quite a technological challenge. So I wouldn't say it's just political, but I agree it's plausible.

[1] http://www.sciencedirect.com/science/article/pii/S0094576513...

[2] http://en.wikipedia.org/wiki/Nuclear_pulse_propulsion

bnegreve··on The Story of Apollo 17 and Why We Never Went Back to the Moon
Ok, but you get my point: there may be actual limits to the development of space travel technology. Your logic seemed to imply there was none. Sorry for speculating though.
bnegreve··on The Story of Apollo 17 and Why We Never Went Back to the Moon
I see an important difference. Planes, boats and cars are technology. Before we had planes, there were scientific evidences that objects heavier than air could fly (= birds). This in fact was a strong motivation for people to develop the technology.

We can go on Mars, that's for sure, it's close enough. But intergalactic space travel is harder. Not because of the limits of our technology, but because of physics. Not only there is not evidence that it's possible but there are strong theoretical results that suggest that we can't simply "travel in hyperspace" as they do in Star Wars.

You seem to believe that science can solve these problems, but today science is what's stopping us from doing it.

bnegreve··on 15-line hash table in C
Ok, let me rephrase then: On modern systems, checking the return value of malloc() is not a proper way to check that the system is out of memory and therefore it doesn't guarantee that the program will run correctly in any case.

That's what I wanted to point, and I agree that it remains useful to detect other types of errors such as the ones you mentioned.

bnegreve··on 15-line hash table in C
Note that on many systems (e.g. Linux), malloc/calloc won't always return NULL when you're out of memory because of lazy memory allocation policies. It will only crash when you start reading / writing. That makes it arguably less useful to test the return value.

edit: clarity.

bnegreve··on Linus: Parallel computing is a huge waste of everybody's time
People don't like sarcastic comments.
bnegreve··on Streem – a new programming language from Matz
It's definitely a good idea. Pipes are both very powerful and very simple to use and debug, yet they are not very common in general purpose programming languages (examples?). I'm not surprised that someone is trying to build a language around them. I'll follow that, but for now it's a bit too early to judge.
bnegreve··on Suicide has surpassed war as the leading cause of US military deaths
Well, let's look at this data on a plot

http://imgur.com/EuHcSzT

Conclusion: philwelch is not completely off.

(edit: make the graph less ugly)

bnegreve··on Gates Foundation to require immediate free access for journal articles
The law in not that absolute, some constitutions include the right of revolution (http://en.wikipedia.org/wiki/Right_of_revolution)

Without going this far, I personally think civil disobedience is ok in that case. How can you change the law, if the law is absolute? (I've noticed that this is a rather controversial opinion though.)

bnegreve··on Bootstrap and JQuery CDNs Down in UK, France
It works now.
bnegreve··on Just had a heart attack
As soon as price enters the equation, you're not going to maximize your life expectancy. This is math.

> I think that anyone would agree, though, that either outcome is far better than dying young.

Right, but how can you be sure? Doctors are clearly overly precautions because they don't want true negatives. In some cases (e.g. if you need to support kids) it may be reasonable to risk that.

bnegreve··on Reallocarray() in OpenBSD: Integer Overflow Detection for Free
C isn't a subset of C++ (eg see [1]) but more importantly proper C++ has very little to do with C.

In my experience people use "C/C++" to refer to "C with class compiled with a C++ compiler" rather than to "C or C++".

[1] http://stackoverflow.com/questions/1201593/c-subset-of-c-whe...

bnegreve··on Four Banks, Including JPMorgan, Fined in Europe Over ‘Cartel’ Behavior
Nationalization is the extreme example. It happened a couple of times [1]

[1] http://en.wikipedia.org/wiki/Nationalization

bnegreve··on What’s New in Emacs 24.4
> You can find the text file at: http://www.gnu.org/software/emacs/news/NEWS.24.4

This is org-mode syntax, so you can browse it with org-mode.

bnegreve··on “We will sell you this microwave under the following conditions”
It should be clear how you pay, though.
bnegreve··on Elon Musk argues that putting a million people on Mars ensures humanity's future
It's a nice quote but with this logic you can justify any absurd attempt to do anything. At the time Columbus crossed the Atlantic Ocean it was a (relatively) reasonable thing to do given the boat they had. Can we say the same about the ones who tried 500 years before and died? Probably not.

Is the right time to try colonizing Mars? What would be the chance of success given our current technology level? I think those are very relevant question that needs to be discussed with facts rather than quotes.

bnegreve··on How to explain zero-knowledge protocols to your children (1998) [pdf]
A good definition from the PDF:

He wanted, in fact, to show that it is possible to convince without revealing, and so without unveiling his secret.

Or from wikipedia [1]:

In cryptography, a zero-knowledge proof or zero-knowledge protocol is a method by which one party (the prover) can prove to another party (the verifier) that a given statement is true, without conveying any information apart from the fact that the statement is indeed true.

[1] http://en.wikipedia.org/wiki/Zero-knowledge_proof

bnegreve··on Woman Receives the World's First 3D-Printed Skull
With traditional manufacturing methods, you would need to make a mold. Molds are very expensive unless you can reuse them for thousands of units.
bnegreve··on A tiny group of people can see ‘invisible’ colours that no-one else can perceive
> can we create two images on a computer monitor that appear the same to a person with normal color vision yet appear different to a colorblind person?

It surely depends on the type of colorblindness, there are many [1].

[1] http://en.wikipedia.org/wiki/Color_blindness

If you're monochromate or dichromate, I doubt that this is possible. Monochromates or dichromates are simply missing one or two color components out of three.

If you have anomalous trichromacy, you can by creating a monitor with pixels of different colors.

In any case, I don't see how it is possible to identify a tetrachromate with a trichromate (RGB) monitor. I tried to increase the contrast and change the hue of the color test to understand what was different between the apparently similar colors but I wasn't able to find any difference.

bnegreve··on The skyline problem
This is an instance of finding the Pareto front [1] of a set of points in a two dimensional space.

This problem is also known as "skyline queries"!

According to [2], author's bound O(n log(n)) is the best bound for d=2.

[1] http://en.wikipedia.org/wiki/Pareto_efficiency [2] http://pdf.aminer.org/000/211/201/on_the_computational_compl...

bnegreve··on Our Use of Little Words Can, Uh, Reveal Hidden Interests
Ok so to summarize: when they are talking to higher-ups, people don't want to make strong claims so they use wordings that make it explicit that this is "only" their personal opinion rather than an absolute truth. And they typically do so by using the word 'I'. Which is therefore a good indicator to detect who's the higher-up.

I would agree with this, but this all very implicit in the post.

bnegreve··on Our Use of Little Words Can, Uh, Reveal Hidden Interests
> We use "I" more when we talk to someone with power because we're more self-conscious.

Isn't it simply because you need to introduce yourself and provide a bit of context when you write an unsolicited email? That seems to be a reasonable explanation for the two examples from the post...

bnegreve··on Google's Self-Driving Car Can't Navigate Heavy Rain or Most Roads
True, but self driving cars have to be much better drivers than the average human for multiple reasons.

If a human has bad driving habits you can fine him or revoke his driving license without impacting the rest of the drivers. A bug is a self driving software would require to stop all the self driving cars at the same time. Obviously, that would be a problem.

Bad drivers only drive one car at a time and thus they have limited potential impact. Again, a bug in the deployed driving software would impact many more cars, with consequences multiplied by the number of cars. This could have disastrous human consequences, thus more care must be taken.

Finally, human are legally responsible, if something bad happen they can compensate for the damage caused. This is unclear who would be responsible in case of self driving cars.

bnegreve··on Facebook's std::vector optimization
In reply to sibling posts.

- if you need dynamic storage you should use a std::vector instead of new [].

- with std::vector-s, if you want to save the cost of the copy you can redefine the vector allocator to use realloc or even mremap.

Edit @xroche: For example, you can create an allocator that manages an initial chunk of memory (allocated with malloc) and grows it when it's required using realloc inside the 'allocate' call.

Edit2: So I've implemented an allocator that behaves (almost) like a described above but I admit that it's a bit more hacky than I though. Drop me an email if you're interested.

bnegreve··on Facebook's std::vector optimization
It's the same with realloc: there is no guarantee that it will grow the chunk in place.
← PreviousPage 14 of 25Next →