Better HN
topnewbestaskshowjobs
Log inSign up

staticassertion

13,486 karma · joined Jun 1, 2016 (10y ago) · 4,896 submissions

@insanitybit
Submissions

comment 6y ago · link · parent

On an internet forum when someone brings up a topic lots of people will respond with different opinions about that topic. You can act like this is somehow specific to the Rust community, but I don't think it is.

TBH you seem to have a really odd bias against Rust, you repeatedly take something about it that's positive and try to spin it as negative, like possibly even for years? Maybe examine that.

comment 6y ago · link · parent

Your argument seems to be "people see problems and other people explain why those problems exist" and somehow you frame it like it's a bad thing.

comment 6y ago · link · parent

Yeah, and it still doesn't matter. Because if you run that command you are already trusting that site with RCE on your machine, so if the premise of the attack is "the site is bad" you were owned anyways.

comment 6y ago · link · parent

> (OT: why OP got downvoted so hard? It's a reasonable question to ask)

I find myself upvoting tons of comments in Rust threads where those comments are just asking questions, but are, for whatever reasons, downvoted. Happens on the Rust subreddit too. I don't know wtf it's about.

comment 6y ago · link · parent

Pretty sure Chrome has been using its own DNS resolver for ages. I don't see the issue either way.

comment 6y ago · link · parent

I assume DNS over Whatever will still respect the HOSTS file? I'd be really surprised to find otherwise, but would love to hear if that's the case! If you don't trust the browser you already have very little defense against ads, no? After all, the browser could always just resolve DNS itself.

HOSTS files may also be simplest (I totally disagree btw), but I can't imagine they're anywhere near the most common.

comment 6y ago · link · parent

I genuinely don't see how DNS-over-http/quic is leading to unblockable advertisements. Adblocking extensions, which have got to account for at least 99% of all adblocking, don't work on DNS at all afaik - they work on already resolved hostnames?

comment 6y ago · link · parent

Thank you, much appreciated.

comment 6y ago · link · parent

It's also Knuth quoting Tony Hoare, a man who I highly recommend everyone familiarize themselves with, he's a wonderful speaker and is extremely intelligent.

The context of the quote from both Hoare and Knuth is critical, and is always left out.

"We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil."

ie: 3% of the time you should absolutely care about 'small' efficiencies. Given that most programs spend almost all of their time in a few places, this is hardly surprising, and 3% is actually a fairly sizable amount of code to optimize to the degree which the paper is discussing (most people are rarely dropping to tools like goto for performance).

And, from the same paper (Structured Programming with goto Statements):

"The conventional wisdom shared by many of today's software engineers calls for ignoring efficiency in the small; but I believe this is simply an overreaction to the abuses they see being practiced by pennywise-and-pound-foolish programmers, who can't debug or maintain their "optimized" programs. In established engineering disciplines a 12 % improvement, easily obtained, is never considered marginal; and I believe the same viewpoint should prevail in software engineering. Of course I wouldn’t bother making such optimizations on a one-shot job, but when it’s a question of preparing quality programs, I don’t want to restrict myself to tools that deny me such efficiencies."

In other words, we should not write slower code when we can help it. Small efficiencies are well worth attaining in the general case, and the fears of writing 'unreadable' code because it's fast are mostly unfounded.

I believe this has never been truer. It's easier than ever to create highly tuned code that's hidden behind a 0 cost abstraction, and it's well worth it to tune that code for simple and obvious wins - we should never strive for inefficiency, as so many seem to advocate.

comment 6y ago · link · parent

> even 1ms I immediately take a look and make sure something isn't wrong.

Agreed. I didn't realize this when I was newer to programming, and I think it's in part because I was "thinking in milliseconds".

https://gist.github.com/jboner/2841832

latency.txt was a game changer for me, as well as starting to measure things in terms of nanoseconds.

Side note: is there an updated latency.txt?

comment 6y ago · link · parent

Gotcha, ok so specifically protocols built on TCP.

comment 6y ago · link · parent

Kinda interesting, I built this just yesterday but with an async "buffer" and "write", and I just used a simple incrementing identifier system.

comment 6y ago · link · parent

I can understand your post, but I don't quite buy the TCP thing. I don't think anyone is using TCP for ordering, they're using it because they don't want their packet dropped.

I guess all of the systems I build are just built to assume no order/ or to leverage causal ordering, because that feels much easier to reason about - enforcing ordering feels really hard, and like something that a message bus can only do some of the work of.

comment 6y ago · link · parent

Oh, gotcha, yeah maybe I'm just lucky like that haha

comment 6y ago · link · parent

What's a use case where strict ordering is critically important?

comment 6y ago · link · parent

Uh, I guess somehow I wasn't clear that I agree that the situation I mentioned is not IO bound but is in fact a mistake I see a lot.

comment 6y ago · link · parent

I feel like you're agreeing with me?

edit: To be clear, when I say "most people" I mean "many people I've talked to, especially with regards to excuses for not caring about their service performance", and that they are incorrect.

comment 6y ago · link · parent

Totally. I've seen similar things. I've also seen thread contention (such as on a connection pool) that can look a lot like a slow database query/ an "IO bound" workflow. I think profiling is just really hard and lots of code tends to be very inefficient at actually performing IO.

comment 6y ago · link · parent

Honestly, this is a reasonable question. I'm not really sure, and I think this is a gap in terminology (or even tooling), as I think we both sort of stumbled into the other day.

I want to say no? If I were to reframe the question as a slow function that I had to call, I wouldn't call it IO bound, so I think not - the fact that there's IO in between the two components is more of a confounding factor in profiling than an actual performance limitation.

comment 6y ago · link · parent

I was only commenting on this on HN just the other day. When most people say IO bound what they really mean is "There's a hot CPU but it's across a network" ie: "I wrote really inefficient SQL queries, therefor I'm IO bound, therefor I don't have to care about CPU" - and the process pushes further and further downstream as every service talking to one of these "IO bound" services also becomes "IO bound".

comment 6y ago · link · parent

Do you think this question is relevant or clever? I would rather a racist remark me directed towards me. I hope that satisfies whatever you're after.

comment 6y ago · link · parent

This whole conversation started off with "any crime" vs "a definitively racist tweet", not "murder" vs "thought crime".

Trying to consider any of these things in isolation is worthless and not really something that makes sense to discuss, it's just a sillier version of the trolley problem. Context is going to be everything.

Could someone convicted of murder be worth hiring? Yeah, sure, I'm not willing to say that that's not the case - what if they had an untreated medical condition, just as one potential contextual element? It's not worth discussing because it will end up with a "but what if but what if but what if".

The point I will definitely make is the original point I made - that if I determine someone to be a racist that is important to me, and if I find that someone is a criminal I will need more context before I determine that it is important to me.

comment 6y ago · link · parent

Oh I agree entirely that we lack paths to rehabilitation for both the (a) and (b) cases, couldn't agree more - it makes the judgment call to hire that much more difficult.

comment 6y ago · link · parent

I can compare anything I like, actually. That's my right and my responsibility as the one who determines who comes to work with me and my colleagues.

You can say that all "though crimes" are incomparable to legal indictments, and when you are hiring people that is your right as well.

comment 6y ago · link · parent

If it's rhetorical why are you asking me? What do you want from this exchange?

I have no interest in discussing who is or isn't racist, I'm saying that an already defined as racist tweet would be something worth considering in a hiring process.

comment 6y ago · link · parent

I'm perfectly willing to:

a) Understand violent criminals have made amends and are rehabilitated

b) Believe that people who were once racist are no longer racist

Both issues are, to me, a 'sad result of circumstances'. So all of that seems fine.

comment 6y ago · link · parent

The one hiring gets to decide who works there.

comment 6y ago · link · parent

I don't know? I don't understand what you're getting at.

comment 6y ago · link · parent

This is people in prison, not people sent to prison. Given that violent crimes have longer sentences, wouldn't that skew the existing count in prison considerably towards violent offenders, even if many more people are sent to prison for other offenses?

Further, because there would be shorter sentences, you're far more likely to encounter a candidate with a lesser sentence.

comment 6y ago · link · parent

As with all things there is a judgment to be made, and as the one doing the hiring it is yours to make responsibly.
1
109110111
164