HNHacker News
TopNewBestAskShowJobs

tjgq

177 karma · joined September 25, 2012

submissionscomments
tjgq··on Jordanian citizen was denied re-entry to the US on eve of his PhD defense at JHU
> Yes, just like not all startups are successful for VCs.

A dangerous analogy, because the sole criterion of success for a startup is to be financially successful, whereas there are lots of research ideas that cannot be translated into a profitable business, yet are still worthwhile to pursue. Think fundamental results in maths and physics.

I am all for universities to have sources of revenue other than taxpayer money. But I fear that making those the only sources of revenue (you did defend that in your original post) will instill a climate where researchers are prevented from pursuing research topics that cannot possibly bring in any money for their universities.

And this is not just about "knowledge for knowledge's sake", either. Think about, say, quantum mechanics or complex analysis. Would anyone have paid for the early research in these areas with the expectation of financial returns? And yet, here they are today at the basis of a number of highly profitable industries.

tjgq··on Jordanian citizen was denied re-entry to the US on eve of his PhD defense at JHU
You are aware that not all research leads to concrete, patentable ideas, right?
tjgq··on What language do you use to write apps for Android?
> Saying that "APIs" are not copyrightable will render tons > of open source projects licenses invalid, since all open > source licenses "rest on top" eg append copyright laws.

I don't think this is true. Open source licenses dictate what you can or cannot do with the code, not with the API it implements. You're perfectly free to go ahead and, say, implement a closed source version of a GPL library - as long as it's not based on the original code.

Abolishing copyright /in general/ would render most (all?) open source licenses void, but that's an entirely different matter.

tjgq··on Interfaces in Go make it hard to navigate code
Only if your Book.Read method has the same signature as Reader.Read (i.e., not just the same name).
tjgq··on How We Went from 30 Servers to 2: Go
Thanks. And wow, the CPython source code seems to be very much readable. I've been meaning to dive further into Python internals for a while, maybe this is the time to do so.
tjgq··on How We Went from 30 Servers to 2: Go
Okay, I think I get it now. The check you refer to is done inside the BINARY_ADD implementation. That's why the bytecode is the same for both cases. Am I right?
tjgq··on How We Went from 30 Servers to 2: Go
How can the interpreter know, at bytecode compilation time, that x is bound to an int? Surely it generates two code paths, one for the "common case" and another for when x is a general object with an __add__ method?
tjgq··on How would you responsibly disclose proof that p=np?
Technically, you could prove P=NP without actually discovering a polynomial-time algorithm for an NP-hard problem. Not all proofs are constructive.
tjgq··on Bitsquatting: DNS Hijacking without exploitation
This reminds me of this (slightly old) article, wherein the authors observe that about 1 in every 30,000 TCP packets fails the TCP checksum, even though the actual errors should have been caught by the link-level CRC. They go on to speculate about possible causes, which include memory corruption at the hosts.

A good read, and it seems to be an instance of the same problem.

"When The CRC and TCP Checksum Disagree" - http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.27.7...

tjgq··on Bitsquatting: DNS Hijacking without exploitation
Note that no error detection code is able to detect all errors; it just lowers the probability of an error passing undetected even further. (CRCs are pretty robust in that they always detect sequences of errors with length <= N, with N depending on the particular algorithm.) With a large enough sample size, you will hit errors.

In this case it is probably memory corruption. The OS won't be able to detect such a thing unless the memory has ECC (relatively uncommon these days). It could theoretically detect it if the memory pages were checksummed and periodically verified against the checksum, but afaik no OS does so.

tjgq··on Brainfuck interpreter written in the C preprocessor
Interestingly, any physical, finite machine can be modelled as a finite state automaton (which is even more limited than a pushdown automaton) with a large enough state space. The distinction only comes up when you consider idealized infinite machines.

Theory of computation is weird.

tjgq··on Brainfuck interpreter written in the C preprocessor
How is a "limit to how much memory [one] can address" not a physical, rather than logical, constraint?

Really, the crux of the matter is that you can have a function call itself an unbounded number of times in C (i.e. unbounded recursion). That you eventually run into a stack overflow is a limitation of the machine, not of the language; the definition of C does not prescribe a maximum number of recursive calls. This, together with conditionals, makes the C language Turing-complete.

tjgq··on Regexp-based RFC822 email address validation
They hint that they use this huge regex instead of a parser for performance reasons. At any rate, the regex was not written by hand; it is a concatenation of simpler, easier to understand regexes.
tjgq··on Reddit user captures video of 2012 voting machines altering votes
> In the US, I think most places let you write in whoever you want. If they get enough votes, they win. Google "Lisa Murkowski".

Yes, I would imagine write-ins could complicate the situation considerably (thanks for the link, btw!) - though, if the proportion of write-ins is small, it probably won't matter much.

> The other problem is that unlike parliamentary systems, in the US we vote for multiple things and not which party/who your MP is.

This also happens in Portugal; we do use different pieces of paper (and different ballot boxes) for each of the positions we are voting for.

> I think that we should be using paper ballots. What does it matter if it takes 2 days instead of 1 to figure out who won.

Yes, I totally agree with you. There are more important things than a speedy count, and resilience to fraud is certainly one of them. And as far as costs go, they are probably dwarfed by the amount spent on the campaign. I really don't understand why anyone would be so eager to speed up the process, except for shady motives.

tjgq··on Reddit user captures video of 2012 voting machines altering votes
The key observation is that, since counting votes is an inherently distributed problem (with a comparatively simple centralized step at the end), you can always deal with it by adjusting the number of polling stations.

I can speak for what happens in Portugal. We use the d'Hondt system with paper ballots, and it is not uncommon to have around 15 candidates on a ballot in certain elections, though we have no write-ins - only one checkbox per candidate.

In the last elections there were about 4,000 polling stations. Since about 6,000,000 people are allowed to vote, this is around 1,500 people per polling station on average (obviously, the distribution is not uniform). Turnout seldom exceeds 50%, so in practice the number of votes is much smaller.

Votes are counted by hand - no automation at all - at each polling station. Usually, within about 5-6 hours 99% of the votes have been tallied, with the remainder done with by the morning after.

I would say it is demonstrably workable to count votes by hand, even with a large number of candidates. I concede that write-ins may present a difficulty, but honestly: since (afaik) in the USA you can only vote on designated candidates, how difficult can it be to have all of their names appear on the ballot?

tjgq··on Guido van Rossum's Performance tips for Python
In general, function calls cannot be inlined by the Python compiler because (almost) any function name may be re-bound to a different object at run time.

A very smart compiler could probably attempt to prove that no such modification can occur at run time throughout the whole program; but this is much harder than simply deciding whether inlining a given call is worth it or not.

tjgq··on Fictional peer reviews rejecting famous papers (2005)
At the very least, (s)he would have had to understand the main ideas to deem them interesting (though perhaps the details were difficult to follow). So yes, you're right that it isn't technically a contradiction. The way it was written did come across to me as intelectually dishonest at the time, though.
tjgq··on Fictional peer reviews rejecting famous papers (2005)
On the topic of self-contradicting reviews, I once got one where the reviewer began by noting that "the paper is very difficult to read and almost impossible to understand" and proceeded to remark that "it contains very interesting ideas"...
← PreviousPage 4 of 4