Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
tveita
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
89 ms
·
811.
▲
by
tveita
13y ago
Ellipsis and slice are used for slicing. e.g: class MyContainer(object): def __getitem__(self, key): return key >>> c = MyContainer() >>> c[1] 1 >>> c[1:] slice(1, None, None) >&
812.
▲
by
tveita
13y ago
Nice and concise. It would be complemented nicely by a list of Python "gotchas". E.g., off the top of my head, mutable default arguments, or trying to catch multiple exceptions with "except Exception1, Exception2:". That
813.
▲
by
tveita
13y ago
So this seems to be the relevant law: http://law.onecle.com/texas/penal/22.07.00.html I think the most relevant items are "threaten[ing] to commit any offense involving violence to any person or property with
814.
▲
by
tveita
13y ago
They don't mention the exact charges, but I think it's safe to assume that's the maximum sentence for the charges. So "terrorist threats with nothing to back it up" aren't necessarily worth 8 years in prison, b
815.
▲
by
tveita
13y ago
Relevant opinion: http://www.usatoday.com/story/opinion/2013/06/23/pink-floyd-... > "We've heard Pandora complain it pays too much in royalties to make a profit. (Of course, we also wat
816.
▲
by
tveita
13y ago
"subsidising travellers"? If anything the travellers must be subsidising the non-travellers now. A couple of megabytes of data do not cost hundreds of dollars to move just because you have to route through one more network.
817.
▲
by
tveita
13y ago
I do mean the hash function "SHA-512/256", as defined in FIPS 180-4 [1]. It is basically a version of SHA-512 that truncates the final result to 256 bits (Like SHA-384). It is not vulnerable to length extension, because unlike SHA-256, the
818.
▲
by
tveita
13y ago
It does matter what hash function you use, though. MD5 and SHA-512 are both vulnerable to length extension, but there are other hash functions that are not, like SHA-512/256, SHA-3 or BLAKE. The documentation for both Keccak and BLAKE2 reco
819.
▲
by
tveita
13y ago
Unless I'm missing something, the example code will just calculate the checksum of "key:value&key:value&key:value", so actually anything with the same number of parameters will pass. Assuming "key:value" is supposed to read "#{key}:
820.
▲
by
tveita
13y ago
That would require the CPU to currently be using at least 33% of the laptop power on average, which sounds high. My phone is currently reporting 30% on wifi and 24% on the display - and this is a small screen device that spends most of its
821.
▲
by
tveita
13y ago
Keep in mind that the entire Bitcoin network could be replaced with one trusted party with the computing power of an average smart phone. The network is currently paid 150 Bitcoins every hour to be that party, and in an efficient market, al
822.
▲
by
tveita
14y ago
Oh, wow. I had assumed that people who visited around the same time got the same next page URL, maybe as part of a caching strategy or something. This way seems impractical, TBH. Certainly for the user - the expiration a bit of a nuisance,
823.
▲
by
tveita
14y ago
That doesn't sound too different from finding and exploiting a bug in an online bank. If e.g. someone found a way to log in as other users, that would reflect poorly on the bank's security, but it wouldn't entitle them to withdraw all the m
824.
▲
by
tveita
14y ago
They're not actually being sued, are they? That part seemed a bit dishonest to me. It looks like so far they have only been served a particularly obnoxious cease and desist letter.
825.
▲
by
tveita
14y ago
My impression was that TokuDB is a single-server database, as a backend for MySQL. In that case it wouldn't be a direct competitor to HBase and Cassandra, both of which you normally wouldn't even consider unless you expect to have a cluster
826.
▲
by
tveita
14y ago
One correction: I don't think CipherCloud have actually claimed to do homomorphic encryption - at least I can't find any such statement on their web site. That was an assumption on the part of the StackExchange user. It would be hard for th
827.
▲
by
tveita
14y ago
> How long was the salt? AFIK, MD5 hashes with an insufficiently long salt can be bruteforced with open sourced CUDA setups. The length of the salt has little impact on security beyond 16 bits or so, where it's still feasible to generat
828.
▲
by
tveita
14y ago
"Markets can remain irrational a lot longer than you and I can remain solvent." — John Maynard Keynes The best thing to do with bubbles is stay the hell away. Better to put your money in an actual investment with real returns.
829.
▲
by
tveita
14y ago
There was a 7% drop today, and a 5% drop yesterday, and so on and so on, though so far the price has recovered after each one. I think you'd have to be crazy to be either the buyer or the seller of this, unless you were doing it for the pub
830.
▲
by
tveita
14y ago
Not quite sure which "Samsung team" you are referring to... Would that be the same guys responsible for the /dev/exynos-mem vulnerability?
831.
▲
by
tveita
14y ago
> And if Google+ challenges you on a name violation, you can "clear your name" with purely online-evidence, if you like. Their help page states that you may appeal with "Proof of an established identity online with a significant followi
832.
▲
by
tveita
14y ago
A good and well thought-out appeal on the Google+ naming issue: https://plus.google.com/103112149634414554669/posts/WAu688n8... Even after they allegedly changed it to allow "well-known" pseudonyms, the Google+ naming policy just seems ar
833.
▲
by
tveita
14y ago
Mine froze when I entered the castle garden looking for the bride. :( Using Opera 12.14, exception traceback: http://pastebin.com/DJXrkae5
834.
▲
by
tveita
14y ago
> False positives from SHA-1 hash collisions are detected after object retrieval from the disk by comparison with the requested key. I was curious why they would bother, but it seems this isn't quite accurate. What happens is they first
835.
▲
by
tveita
14y ago
> MurmurHash3 wasn't _designed_ with low collision rates in mind There is a difference between "low collision rate" and "collision resistance". Real-world data often contain regular patterns that can cause "bad" hash functions to give v
836.
▲
by
tveita
14y ago
For what kind of job would you recruit people who think single handedly implementing a fully compliant C++ compiler is suitable coursework? Hopefully nothing involving project planning.
837.
▲
by
tveita
14y ago
That's awful. This seems to be something of a theme with RoR. XML parsers that parse YAML, JSON parsers that parse YAML, YAML parsers that parse Ruby... Why would they let that mess near user input? I thought Ruby included a proper JSON par
838.
▲
by
tveita
14y ago
These are all reasons why you'll do fine with MySQL if you're stuck with it, but they don't give a compelling reason to choose MySQL over e.g. PostgreSQL. One thing I like about MySQL is the support available from third parties like Percona
839.
▲
by
tveita
14y ago
I have encountered situations where this is convenient, and I have yet to see it cause any bugs or problems. In the places I have seen it used, the 'arbitrary' column typically has the same value for the entire group, e.g. for efficiently s
840.
▲
by
tveita
14y ago
Really this is how it should work. It's a fairly safe default assumption that people are searching for recent information if the query matches a current news story. As an example of the opposite: In the days right after the earthquake and t
More ›