32,405 karma · joined Jan 3, 2008 (18y ago) · 8,297 submissions
comment 8y ago · link · parent
I just think if that’s your plan, you best not be bluffing and had better have something really good up your sleeve. I do have a problem with overstating your case and spreading FUD to try to make a quick buck off of at best B+ attempt.
comment 8y ago · link · parent
Anyone that is serious about security hopefully knows this.
(I have no skin in the AMD/Intel CPU game. Too many machines running both to bother. I can’t believe I have to say this on HN, it’s what I’d expect of [H]ard in 2004.)
comment 8y ago · link · parent
We’ve all publicly disclosed and written patches for countless security vulnerabilities in open source code that’s widely distributed with zero fanfare - not even a cve - because we realize the difference between a security bug and a world-stopping, corporation-killing security bug. And the arrogance of saying something along the lines of “if I gave them a day or a million years it wouldn’t matter because this bug is too big to fix,” is beyond comment.
At no point did I give RedHat 24 hours to patch something before coming out with a well-orchestrated PR campaign with the hype engine on overdrive. Just submit a patch, make sure they admit they’re wrong and will take the appropriate measures, and move on.
Now if they found a remote exploit that could let me run arbitrary code on any AMD processor even in a sandboxes environment... we’d be having a different discussion altogether.
comment 8y ago · link · parent
comment 8y ago · link · parent
Typed that out too fast, yes, that's my problem. * String is one thing but String.deref() is another. But * is the dereference operator. Operator overloading ftw ;)
> What you're looking for is TryFrom/TryInto which are still not done 2 years into the RFC: https://github.com/sfackler/rfcs/blob/try-from/text/0000-try....
Sorry, yes, I actually opened an issue with my suggestions regarding that one with particular focus on the fallible vs infallible nature: https://github.com/rust-lang/rfcs/issues/2143
comment 8y ago · link · parent
Dereferencing a string does not return a raw pointer, that was exaggeration on my behalf. But a string is a container, so *string returns.... &str? But string.deref() returns str?
Don't get me wrong, I'm fully invested in the language [0], [1], [2], but it's got a lot of warts that could have been avoided by thinking bigger picture. So many APIs are restricted by thinking easy instead of big pre-1.0. Like str being hardcoded into APIs that should have been generic (FromStr vs From<&str>, .parse() vs .into()), shipping 1.0 without async/await, and the whole mess with strings.
0: https://github.com/rust-lang/rust/issues?utf8=%E2%9C%93&q=is...
1: https://github.com/rust-lang/rfcs/issues?utf8=%E2%9C%93&q=is...
comment 8y ago · link · parent
Deciding betweene two distinct types &str and &string (not mut &string) for your function's interface is nonsense. It makes no sense to have to _decide_ between which two views of a string that you can read-but-not-manipulate you want to use, and it makes zero sense that they can't unify the types with some simple compiler magic. A constant reference to a string should automatically decompose into a view of that string and that should be that. [edit: as in that view shouldn't be a separate type]
Additionally, that dereferencing a string returns a pointer... that makes no sense. That's the kind of nonsense we ran away from in the C++ world.
strings are the reason I regret not adopting rust back when as a user of a pre-1.0 language I could have joined in efforts to lobby against this insanity.
---
As a sidenote, string_view is so late in coming to the c++ world that it's not even funny. Having a separate std::string with an "implementation-defined" in-memory representation in a world of c strings (char *) is inane beyond belief. (Yes, nulls in strings would still be a problem. But why do your strings have nulls in the first place? That data should probably be a vector of strings or a [vector|array] of uint8_t (even if just typedef'd to unsigned char) and C++ strings should have been mandated utf8, contiguous, and null-terminated. You should be able to compose a zero-copy, read-only, non-owned string from a character array and decompose automatically to it. And don't get me started on the fact that C++ doesn't have sprintf because of the obsession with sticking to the overly verbose and way too complicated streaming operators. Developers end up using c strings with sprintf to format text and then copy it back to a std::string just to work around that stupidity.
comment 8y ago · link · parent
comment 8y ago · link · parent
If we're comfortable letting a criminal go free of prison because guilt can't be proven beyond a reasonable doubt (and we should, for the record), we should be comfortable letting a child stay with its parents until the parents inability to care is established beyond a reasonable doubt.
The difference is that in one scenario it’s about punishing something that happened and is done and in the other it’s to prevent ongoing/future harm. If you’ve seen some of the things parents are willing to do to their own kids, you would see why it’s not that simple.
comment 8y ago · link · parent
The background images appear to actually be a video or something, but here's a screenshot I took:
https://share.neosmart.net/View/Index/nfgSDo.png
The two balls in the first column (so one old and one new) have a pretty symmetric distribution, but look closely at the others. Some are ridiculously uneven.
comment 8y ago · link · parent
[0]: https://espnfivethirtyeight.files.wordpress.com/2018/03/juic...
comment 8y ago · link · parent