3,239 karma · joined Oct 3, 2016 (10y ago) · 1,374 submissions
comment 9y ago · link · parent
Alcohol even presents similar issues. If you're in a bad mood, drinking can make you angry and violent. If you're in a good mood it can make you relax. There's definitely a more amplified effect in the case of acid, but it's the same principle.
comment 9y ago · link · parent
It's a difference of a few minor things versus a whole swath of changes to the handling of strings in the language, heck, a python 2 print statement isn't compatible with python 3.
These are much more significant breaking changes which make porting code much harder than any of the other examples you've given. For the most part, developers don't have to touch or only have to make minor changes for specific cases to port to Ruby 1.9 or C++11 - look at those C++11 changes for example, so few people were doing those things and they're such bad practices that it simply didn't matter. They successfully preserved compatibility in the nominal case. But even following all the best practices in your Python 2 code will not make it run under Python 3.
comment 9y ago · link · parent
Breaking code like this was a big mistake in my opinion - it resulted in many people sticking on the old version for code and library compatibility. There are still libraries which don't work on Python 3, though now fairly few of them.
In addition to that, the unicode changes were in my opinion another mistake - they made it far more complicated to deal with strings and byte arrays as now even for the simplest of applications you have to put thought into character encodings. Another annoyance for me personally is that I often use python to do things like hex and base64 encoding, the removal of .encode("hex") really wrecked this one for me. Now I have to remember weird import libraries like "binascii" with weird function names like "hexlify".
Ultimately Python 2 works. And it works well, there just aren't that many compelling reasons to move to 3 given that it often is more complicated and breaks existing code. They have a few cool things now, so I sometimes use it for new code but there's still nothing that's making me want to delve into a port of my older codebases.
comment 9y ago · link · parent
Maybe I think punishment is important for moral reasons so longer prison sentences are something I favor. That's not exactly a logic level issue, that's not a media issue, that's a moral decision I've made. Just because my view of the world differs from yours doesn't make it less valid, maybe I made a decision based on my conscience or upbringing instead of on pure economic or improving lives grounds. I don't think that makes the decision less valid. Many such policies can be viewed in this light.
comment 9y ago · link · parent
On the other hand, I can't help but think comment threads like this amount to nothing more than "voting for the other guy is so illogical, clearly my vote is the correct one". A slightly veiled way to call anyone who doesn't vote your way stupid.
comment 9y ago · link · parent
Wait for the hype to run out, then look at it again when it's not at a peak value.
comment 9y ago · link · parent
The best bet in my opinion is to use commodity stuff but reduce the attack surface as much as possible by simply disabling, firewalling and physically restricting everything possible. In many cases like this, you could probably get away with absolutely minimalist control systems run on microcontrollers and similar with monitoring only over an isolated unidirectional interface (think fiber optic connection with no physical receiver on the other side).
comment 9y ago · link · parent
If you're using 16-bit Point of Sale software for example you might just decide to stick with 32-bit Windows as the VM wouldn't be worth it and would add more complexity for users.
comment 9y ago · link · parent
Why does your security rely on primary key obscurity? This seems like you're doing something horribly wrong, put some authentication on that or something.
And no, no they won't. Hitting a collision is very hard if you're using cryptographic strength random UUIDs, you wouldn't even be able to bruteforce 64 bits over the internet in a reasonable timeframe.
Go ahead, try the math on that, the only reason small keys are vulnerable to local attack is because you can perform an enormous number of attempts per second, often in thousands of millions of attempts per second and they can keep at it for as long as they want. The database server won't let you query anywhere near that fast. You will never get anything like that for network based attacks as you're limited by bandwidth, latency and of course, the other side who will notice if you even try to do this for any significant period of time and likely block your attempts or limit them greatly.
comment 9y ago · link · parent
Definitely true, in fact I tend to prefer hex for this purpose. But one minor note - assuming the whole thing is cryptographic-strength random, there's no need to compare first and last, just do first only or last only (last is usually preferred for UUIDs due to them sometimes containing a timestamp at the start), the odds of an accidental match is the same and the visual processing time of switching from one end to the other is lower.
comment 9y ago · link · parent
Results seem pretty good.
comment 9y ago · link · parent
Someone has it run on the openbsd code here: http://bxr.su/OpenBSD/ and it should produce a much more useful representation of the code, see http://bxr.su/OpenBSD/lib/libutil/bcrypt_pbkdf.c#98
Mozilla also has one called DXR which is designed for their large, C++ heavy codebases: https://wiki.mozilla.org/DXR
comment 9y ago · link · parent
For video though your options are definitely more limited, keep an eye on Riot, I'm not sure that it's ready yet, but when it is it will present an extremely good option. If you only need mobile, Signal does it today and is probably one of the most stable and secure products around, can't vouch for the video quality though personally.
comment 9y ago · link · parent
One thing to note though, different platforms don't necessarily implement the rand() function the same way, the standard does not define an algorithm for it, so unless you want your tests to run differently on every different C library it might not be the best idea to begin with.
comment 9y ago · link · parent