Better HN
topnewbestaskshowjobs
Log inSign up

problems

3,239 karma · joined Oct 3, 2016 (10y ago) · 1,374 submissions

Submissions

comment 9y ago · link · parent

What's with the fake Apple-style message talking about allowing notifications? Seems sketchy.

comment 9y ago · link · parent

In large part that amounts to a combination of dosage and mental set.

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

Yeah, I know about that, but that's still longer and more annoying than the old way. Maybe I should just make my own library that just modifies strings and byte arrays and adds a few things for the common binary operations I do.

comment 9y ago · link · parent

Go ahead and look at those breaking changes, then compare with Python 2 to 3's breaking changes.

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

Nice, do they have similar for base64 too?

comment 9y ago · link · parent

It was source-level incompatible with older code so it couldn't be used as a smooth transition like... almost any other language upgrade I've ever seen.

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

The problem I see here is that your definition of counterproductive might not match mine.

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

Critical thinking is all well and good, but I'll hazard a guess that it won't help - many people know it but only apply it selectively.

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

Indeed, most of the things created on the Ethereum platform are just shittier versions of things that exist - while decentralization can be a huge boon to some things it needs to combat its inherent complexity increase for users. Ethereum does not lend itself well to that, as such almost everyone is there for a get-rich-quick scheme, not for the higher applications on its platform.

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

yes will give repeated data though, not just zeros, seems like it's more useful here - as others have pointed out, also uses less syscalls than /dev/zero.

comment 9y ago · link · parent

Building on commodity hardware is cheap, easy, quick to develop and often more stable and secure. Going fully custom results in more custom components which are often less tested and less audited than their commodity counterparts. Yes, it sounds like they'll be "simple" but it rarely is so - especially when your boss or sales team asks why you don't have IP-based monitoring.

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

Not really, if you block the domains of the trackers or prevent their scripts or remote content from running altogether there's no fingerprint for them to get. That does only apply to 3rd parties though, but they are often the main concern.

comment 9y ago · link · parent

Considering that Sourcegraph doesn't support C or C++ and those are pretty much the only languages I write that have less than perfect IDE crossrefence support I don't really see a point in Sourcegraph at the moment.

comment 9y ago · link · parent

I'm not saying a long random number cannot be secured or that using one is security by obscurity in the bad way, just that it's far too easy to leak a primary key by accident.

comment 9y ago · link · parent

What if those customers want to run legacy 16 bit apps in NTVDM? I have a few games I like that I occasionally fire up a 32 bit VM for just for this reason.

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

> As far as I know, all Bay Trail devices are running a 32-bit copy of Windows because of this.

Can you not just boot it in BIOS mode? Should be possible for the OS to escalate from there.

comment 9y ago · link · parent

> Botnets will just keep guessing until they find one.

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

> you'll match the last few and first few letters just as fast in your head

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

Looks like someone has opengrok run on openbsd here: http://bxr.su/OpenBSD/lib/libutil/bcrypt_pbkdf.c#98

Results seem pretty good.

comment 9y ago · link · parent

There's a tool called OpenGrok that pretty much does this except it's free and open source and it works on C code.

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 voice I can highly recommend Mumble, it's trivially self-hosted too and feels well integrated on all platforms.

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

> There's lots of uses for random but predictable numbers, e.g. adding random fuzz to a test suite run that you'd like to be able to repeat.

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

OpenBSD decided to violate the standard and return non-deterministic results:

http://man.openbsd.org/rand.3

comment 9y ago · link · parent

It's a common adage, see https://en.wikipedia.org/wiki/Betteridge%27s_law_of_headline...

comment 9y ago · link · parent

I think people might be downvoting because you're sort of all over the place and expressing 2 different opinions which seem contradictory.
1
121314
46