Better HN
topnewbestaskshowjobs
Log inSign up

ComputerGuru

32,405 karma · joined Jan 3, 2008 (18y ago) · 8,297 submissions

mqudsi on most sites.
Submissions

comment 8y ago · link · parent

The first cars were electric. Electricity powering cars isn’t hard to to envision.

comment 8y ago · link · parent

Meh. They got lucky because they didn’t use affected hardware due to valuing price over performance. It’s certainly not because of any brilliant insight or preventative measures they took.

comment 8y ago · link · parent

I don’t even have a problem with shorting. It’s fair game, and a company’s bug bounty should reflect what they stand to lose by not paying top dollar to preempt exactly that. Any talk about the company being “entitled” to anything is BS. If someone had a vulnerability that would get them access into anyone’s Dropbox as their IPO rolls out.. they’ve earned it.

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

I’m with you, but again, context. A compromised machine used to be a hosed machine until you reinitialized the drive and started clean. People are just starting to wake up to the fact that there’s another computer in your computer to which the same maxims apply.

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

I have no doubt that the findings are real, but they are more along the lines of bugs rather than “halt the press” gaping security holes.

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

I think it was very quickly obvious to everyone what the deal here was. Why are we still giving them the limelight?

comment 8y ago · link · parent

It’s pretty well known that when you say you have multiple top priorities, what you really mean to say is that marketing is your top priority.

comment 8y ago · link · parent

It was only disabled as a mitigation to these specific attacks, in case you though it was an experimental or “at your own risk” type of thing.

comment 8y ago · link · parent

Fwiw quadratic hashing was only added to khash in 2013. Depending on when you first tested it, that may not be the reason it was faster.

comment 8y ago · link · parent

Nice example. To make your point clearer: that motion blur is how much the ball moved in just 1.5ms

comment 8y ago · link · parent

fwiw, yours is nicer :)

comment 8y ago · link · parent

Thank you. It was supposed to be a platform-agnostic uuid library embracing the benefits of C++11 and beyond. But that was a pipe dream :)

comment 8y ago · link · parent

Well, that's actually the root problem which I avoided discussing until now: why does String have a str special case but no other data type does? Same with Path and PathBuf. Why does there need to be a distinct data type for a non-owned view into an object? Why is that not just part of the language in the first place? C++ needs string vs string_view because it has no borrow checker, but rust could (theoretically) implement this without the need for two different types.

comment 8y ago · link · parent

> * String returns str.

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

I mean that &string should not be a type distinct from &str.

I absolutely don't think &str should silently allocate for converting to String. But I think &str should zero-allocation convert to &string (and bypass dealloc, too).

comment 8y ago · link · parent

Hi Steve! Sorry, I didn't mean to imply in the core API. I don't think (though I too could be wrong) that &string is used anywhere that AsRef<OsStr> isn't also available.

comment 8y ago · link · parent

Yes, anything implemented for &str is automatically implemented for String... except some API are stupidly implemented for &string instead. And you can't pattern match strings properly (think some `for in`) without first explicitly converting to &str.

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...

2: https://crates.io/search?q=neosmart

comment 8y ago · link · parent

That's not the problem. There absolutely should be two different types (and I don't even care that the names are so poor). But half the rust APIs take one type and the other take another (even when the string isn't manipulated or stored in any way, shape, or form). Some interfaces are only implemented for string and others only for &str.

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

I don’t understand why Wikipedia still serves a different link to mobile browsers. Responsive design (especially for what is basically an all-text website) is a thing, and the client should choose which stylesheet and what image sizes it selects. Plus we wouldn’t have this mobile link vs desktop link nonsense.

comment 8y ago · link · parent

Thomas Ptacek (tptacek, aka @tqbf on twitter) is the number one poster by net karma on HN. Security expert, startup founder, and all-around nice guy. He did good here.

comment 8y ago · link · parent

ESR: https://en.m.wikipedia.org/wiki/Eric_S._Raymond

comment 8y ago · link · parent

The last time I checked, only for POC. In my uuid library [0], macOS is basically the only one I can’t create a per-thread rng and instead have to spin up a new one each time.

0: https://github.com/neosmart/uuidxx

comment 8y ago · link · parent

I was with you until this:

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

I think hyphenation is more of a hack that good line breaking can generally avoid.

comment 8y ago · link · parent

Yes, but what was in it for Vitallium? Continue working thanklessly on a project to serve others’ needs, who has a whole will leave en masse as soon as headless chrome gets to parity with proxy support?

comment 8y ago · link · parent

No, I understand that. But look closely at the x-ray/CT and you'll notice that the rubber is nowhere near even around the core.

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

It's funny, because based off the header image on that page [0], that's what I expected the discussion to be about. The center of gravity in those four samples is hugely off.

[0]: https://espnfivethirtyeight.files.wordpress.com/2018/03/juic...

comment 8y ago · link · parent

Note that the actual link is https://blogs.msdn.microsoft.com/vsoservice/?p=16295 but I am hesitant to call out the current link at https://blogs.msdn.microsoft.com/bharry/2018/03/02/a-good-in... as blogspam.

comment 8y ago · link · parent

I am extremely disinterested in sports, but still found this a fun and intellectually gratifying read. It's good to broaden your horizons and think about the science behind changes in life.
1
164165166
277