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

I think the tricks are more like "use dynamic dispatch instead of static dispatch".

O1 vs O3 is probably a fair way to do things. Some people will do that for debug builds, to get a mix of reasonable performance (for tests) and reasonable compile times. I'm not sure how meaningful the difference is going to be between O2 and O3, it's been a long time since I'd looked into it, and back then O3 wasn't really a thing people did.

comment 6y ago · link · parent

The compiler is slow at building code. It's much, much faster at checking it.

comment 6y ago · link · parent

> I keep reading in Rust surveys that Rustaceans just don't care that much about compile times enough to prioritize improving them.

Confusing since this is, to my knowledge, a top 3 issue just about every year.

That said, I think Rust programmers dislike compromise (maybe to a fault). Rust is naturally a 'have your cake and eat it to' language and the community very much likes to be best-in-class, so compromises on runtime performance to improve compile time (which is one way you can go today) are often not seen as viable by a large part of the community.

For what it's worth, I think I've called out compile times as probably one of my top issues with Rust, working on a fairly large and quite dependency heavy codebase. It isn't a deal breaker for me by any means, but it's a pain.

comment 6y ago · link · parent

Does it provide copy on write semantics? I wasn't aware of that being the case.

comment 6y ago · link · parent

A week? Might make sense to refactor, or just clone the data? Or ask the subreddit, discord, or whatever place you want for help.

I haven't run into a borrowchecker issue that took me more than a few seconds in a few years. The trick is I'm not crazy about avoiding cloning - Rust is still super fast. The curse of Rust making cloning explicit, and move by default being cheap/ memcopy, is that you often feel like "if only I could express it" and that problem seems to get worse the better you are, and then for me I hit a point where I stopped caring and just got shit done.

It's easy to remove clones later in my experience, once benchmarks show it matters.

comment 6y ago · link · parent

I'm on an intersection with caltrain, muni, and a freeway, but of course it can only be so informative. I'm not trying to say "Buses and trains aren't a problem" at all, I'm saying fuck motorcycles.

comment 6y ago · link · parent

Yeah, I do imagine it depends a lot on where you are. Even a few blocks from here the Caltrain can get much louder.

comment 6y ago · link · parent

I live outside Muni/Caltrain. They're not great, noise-wise, but the motorcycles are 10000x worse. I get a number going by a day, and I just can't understand why they're allowed to be so absurdly loud.

Buses/trains are relatively quiet, outside of a few edge cases like tracks scraping or honking when someone's in their way - rare occurrences.

comment 6y ago · link · parent

Cool! Sounds like a good idea. A key stretcher is probably a good idea too if you haven't done so. Given that this is local only, you can go pretty nuts on the key stretching. For example, on a server I'd say >100K rounds of PBKDF2. For local, you could do 1B.

comment 6y ago · link · parent

For the third point, why not just hash the password with SHA256 first? Sorry, I didn't look at the code, just going off of the described issue. If you have an arbitrarily sized input and you want a fixed 32 byte output, that seems by far the simplest way.

comment 6y ago · link · parent

I'd suggest reaching out to AWS about this. Explain the situation. AWS has a number of programs for startups that you may be able to apply for, including one that includes 100k worth of credits.

Also, if you can't afford to scale to new customers... stop? I'm sure it probably sucks, but like, does it suck more than having no runway? Seems like you'd be best served slowing things down and spending some time with AWS on cost optimization.

There aren't a lot of details to go off of here so I don't know what more advice to give.

comment 6y ago · link · parent

Totally agreed. I pay for Dropbox myself, but I don't know that I've shared a file with it in a decade or so. I just use Paper, which they continue to fail to market, despite it being absolutely amazing.

comment 6y ago · link · parent

I believe APP Suffers from the exact same issue, though APP is something I recently enabled anyway.

I don't know of a way, even with full gsuite enterprise policy access, to prevent an attack where the attacker has an active session and your password.

Some things you could do, but would not be full mitigations and likely just annoy an attacker in many cases (though that's often enough):

* via GSuite, enforce 2FA

* Enforce 2FA via hardware tokens/ APP

* Context Aware Access that validates that the login is coming from a specific verified device that is provisioned via your GSuite / conforms to policy, that way the attacker can't just steal the session/password and log in from another device? Maybe?

Really, the attack described requires like 3 different things to go wrong. I agree that there should be changes made to the system to improve this, but it's a rough model to protect a user when the attacker is sitting on the box they're logged into.

comment 6y ago · link · parent

I actually think their existing policy is not so bad at all, but it should notify you.

So: 1. Changing recovery emails should require 2FA

2. Changing any 2FA policy should email your recovery email

It does, after all, still require a password. We're really talking about a very, very specific use case where the attacker has a lot of access to an existing session.

I myself have had a phone break and rushed to a computer with a valid session so I could easily reset. It's really a huge UX win, and probably massively reduces 2FA burden/ support burden.

comment 6y ago · link · parent

I think the idea is that you want to be able to look back not just at the places you've been but also at yourself. I think it makes sense. Seeing pictures of myself as a teenager certainly has a different impact than seeing pictures of where I went as a teenager.

comment 6y ago · link · parent

Redis?

comment 6y ago · link · parent

I think the problem is that we have a very weak understanding of "better" or "worse" or "use cases". What would a better database look like? Maybe it's faster, or more stable, etc. But if what makes it better is that it is a better model, you end up with religious wars - it's the same reason why no one can really agree on whether a static or dynamic language will lead to "better" code, it's just too hard to tell.

As a user of KV stores and graphdbs myself I would have to use a traditional rdbms. It's been an absolute breath of fresh air being able to express queries in a graph-oriented way. For me the combination has been totally "better", but of course, that's not evidence based! Nor, really, could it be.

comment 6y ago · link · parent

Yes, I only addressed the part I agreed with. I'm not the author or trying to defend the entire article, just saying that I strongly agree with entrenched technologies being entrenched for very weak reasons. Do I think relational databases have no merit? IDK, probably not, though I haven't chosen to use one in a very long time.

comment 6y ago · link · parent

I didn't say it was.

comment 6y ago · link · parent

Is this really so hard to believe? Lots of things that are "Default" are just that way for historic purposes. One example, and I say this as someone who's generally a fan of the language, would be Java - it's taught in so many schools, because it's taught in so many schools.

Everyone says things like "You don't need a graphdb" because their default assumption is that there is a cost relative to rdbms, that's the bias of knowing rdbms. The "you don't need X" is one of the most common tropes, I read those words roughly every day on HN.

As a user of a graph database I'm quite pleased with the experience. I can model things extremely naturally, and relationships are dead simple to express.

Did I need a graph database? No, obviously, I could have used any database, but a graph matched my requirements.

comment 6y ago · link · parent

I don't totally agree about its strengths not being relevant. Memory safety is an extremely low bar that the web has generally managed to meet, but Rust has a lot of value elsewhere. The author talks about significant performance improvements, which would be very welcome on many sites, as well as improved error handling and data validation patterns.

comment 6y ago · link · parent

I often write my code to allocate at first just to get a feel for the API and business logic and then go through it later to remove them. Given that all of those frameworks are still fairly new it wouldn't shock me to hear that that's the case.

comment 6y ago · link · parent

What does overkill mean? I think unless shell history search is a "solved problem", which I don't believe is possible, there isn't such a thing as overkill.

comment 6y ago · link · parent

Feels like you've just described every single bug ever.

comment 6y ago · link · parent

To expand on other answers

HA = "Always available". Answers may be stale, but you'll always get an answers.

CP = "Always consistent". You may not always get an answer, but if you do, it's consistent.

You can't have both in a distributed system, because distributed systems are on networks, networks are imperfect, and therefor you get "partitions' (a silly term for failures). The question is, given one of these failures, do you block and wait for all nodes to agree on what's "right", or do you just respond with the best information you have available.

CRDTs play an interesting role here. http://swarmdb.net/articles/acid2/

comment 6y ago · link · parent

From the reddit thread I linked elsewhere (https://www.reddit.com/r/netsec/comments/hkg8co/10_years_of_...):

> There is no restriction or prohibition, correct. In fact, we are far more lenient than other companies when it comes to our policies. We have in fact never had to terminate a relationship with any customer of ours.

> We're generally only concerned with fraudulent customers who would lie during the quoting process with the intent to cause damage to the business by intentionally reposting all updates received online. Obviously, they have the right under the GPL to do that (the fraudulent representation notwithstanding), but we also obviously have the right to refuse future business with them. As noted by the lawyer in the link above, that right has been repeatedly reaffirmed by the US Supreme Court. It's not controversial whatsoever.

comment 6y ago · link · parent

If I had to deal with constantly having my name dragged over something I wasn't doing, I would probably be pretty upset about it as well. Further, the Linux Kernel community tends to have... some negative communication patterns.

But the content is very valid, you should give it a fair read, regardless of how you view Brad's language.

comment 6y ago · link · parent

https://www.reddit.com/r/netsec/comments/hkg8co/10_years_of_...

Brad goes into this here. Grsecurity has written extensively about this.

Read the links to their site where they go even further into detail.

Grsecurity is not violating any license. There are multiple quotes from authorities on the matter in that link. If they were, so would Redhat, Canonical, etc.

comment 6y ago · link · parent

Leaving them with hundreds of millions of dollars a year?
1
116117118
164