Better HN
topnewbestaskshowjobs
Log inSign up

wireprotocol

7,244 karma · joined Sep 25, 2010 (16y ago) · 2,593 submissions

Submissions

comment 6y ago · link · parent

The article's thesis: "Microsoft has deemed C++ no longer acceptable...needs to move...best choice on the market today is rust".

If moving away from C/C++ to something, C and C++ are out of the running. You can claim that they should still be considered, but they've been around a long time and people have tried very hard to make them safer. There's been some success, but there's not a lot of evidence that real C/C++ codebases will become dramatically safer in the next 5 years. It looks like some people are looking pretty hard at alternatives.

Ada and fortran are both older than C++, so it is not clear that there ever was or ever will be a lot of net movement from C++ to either of those unless something exciting happens. It would be cool if Ada did get more appealing for C++ migrations, but I just don't see it happening.

That leaves D and Rust. Apparently a lot of people think rust has the mix of excitement, community, and technology to make it happen. We don't know for sure, but it seems like a reasonable bet to make if you are trying to dislodge C++ due to frustrations about memory safety.

comment 6y ago · link · parent

By "possibilities", I mean the possibility as an alternative to (or major safety improvement on) C++, which is what the article is talking about: "Microsoft has deemed C++ no longer acceptable...needs to move...best choice on the market today is Rust".

Ada is a possibility, but it's just not there and does not show signs of being there soon. There's probably not a net movement from C++ to Ada today, and there is no reason to expect differently over the next 5 years.

Rust is not a sure bet either. Lack of major real systems is a big question mark. But basically the article's thesis makes sense to me.

comment 6y ago · link · parent

I think this is a combination of two things, and is true of many new programming platforms (languages, etc.).

1. If the tech hasn't made full contact with reality yet. For instance, there aren't a diverse set of large projects written in rust yet, so it's a little easier to imagine that it's perfect.

2. We should acknowledge that technology choices have a big impact on one's career. Sure, we are all software engineers that could work in a lot of environments; but we are simply more productive in the ones where we have some experience/depth. If someone is learning rust today, in many respects that's a bet, and they (subconsciously or consciously) have a vested interest in rust's success. More experienced people will usually have a more balanced risk portfolio, spread between proven tech and a few up-and-coming technologies. But for people earlier in their career, it might be a pretty major bet for them.

comment 6y ago · link · parent

The thesis of the article was "best chance". So if not rust, then what? C++ and Ada have lots of great possibilities, but those possibilities aren't making it into practice (for whatever reason) despite a lot of time and effort.

Apparently, the author thinks that rust might make that leap sooner than Ada/C++. It seems like a reasonable guess, and with some backing by major players, it might well happen.

Sure, there's a lot of uncertainty while we are waiting to see the results from a diverse set of large projects. I have used rust enough to be annoyed by it, but none of the annoyances seemed like a major blocker to rust's future.

comment 6y ago · link · parent

The difference is that rust is safe by default. When doing something routine/trivial, you are typically operating with safe code.

comment 6y ago · link · parent

Having a minimal runtime is, I believe, a requirement to make any serious headway into a lot C/C++ use cases. The places where minimal runtime is not important have already seen big shifts to garbage-collected languages ~20 years ago.

You mentioned Ada, which does have a minimal runtime. It might be interesting if the community and ecosystem made a strong push into general-purpose programming, like rust has. I would give it another try.

Rust seems to handle heap allocations more fluidly (or at least closer to what I expect), but perhaps that wouldn't be a deal-breaker if I knew more about progamming in Ada. Rust also has better C integration -- it can match C structure layouts and operate on them seamlessly with rust semantics. But basically, it seems plausible that Ada could work with the right ecosystem around it.

Regardless, Ada has had decades to make the leap into general-purpose programming, and it hasn't done so yet. Rust is viable today for a lot of important use cases, and is not far off for a lot of others.

comment 6y ago · link · parent

"I've heard too many times 'just use Postgres', repeated as an unthinking mantra."

You use "unthinking" pejoratively, but being able to skip past some decisions without over-analyzing is really important. If you are an 8-person startup, you don't have time for 3 of the people to spend weeks discussing and experimenting with alternatives for every decision.

Databases are really important, but people make tons of important decisions based on little information. If you have little information other than "I need to pick a database", then Postgres is a pretty good choice -- a sensible default, if you will.

Everyone wants to be the default, of course, so you need some criteria to choose one. It could be a big and interesting discussion, but there are relatively few contenders. If it's not free, it's probably out. If it's not SQL, it's probably out. If it's not widely used already, it's probably out. If it's tied to any specific environment/platform (e.g. Hadoop), it's probably out (or there will be a default within that specific platform). By "out", I don't mean that it's unreasonable to choose these options, just that they would not make a sensible default. It would be weird if your default was an expensive, niche, no-SQL option that runs inside of Hadoop.

So what's left? Postgres, MySQL, and MariaDB. SQL Server and MongoDB, while not meeting all of the criteria, have a case for being a default choice in some circles, as well. Apparently, out of those options, many on HN have had a good experience with Postgres, so they suggest it as default.

But if you have additional information about your needs that leads you to another choice, go for it.

comment 6y ago · link · parent

Maybe it's one of those things where a good union is good and a bad union is terrible.

It's easy to say how good a union could be, but will it actually be that good? What kinds of things can go wrong? What weird laws are in place and how could that complicate things?

The bottom line is that if I am happy already, a union is more risk than reward.

comment 6y ago · link · parent

I have a theory that PHP is kind of like erlang -- as a framework and dev environment, not the language itself.

Each request is pretty much independent of the others, and each one can independently crash.

There was also CGI, but CGI always felt a little heavier, and the crashes were harsher (usually just a 501 error and nothing more). PHP embraced the crashes more and provided more information allowing faster debugging.

As a result, generally it was pretty easy to make resilient software.

Critically, PHP also embraced SQL databases, so that crashing meant aborting the transaction (if any). Erlang never meshed quite as well with transactional databases, so trying to keep consistent shared state in erlang felt tricky. In PHP, it was natural.

comment 6y ago · link · parent

Maybe it's worth considering an interface to a big int library that can defer carry work across many operations, and then normalizing at the end?

That certainly sounds useful for, e.g., totaling an array of big integers.

comment 6y ago · link · parent

Yikes. I was just trying to link to a relevant technique that the author might find helpful.

A big integer library may have many use cases; a benchmark only shows one data point. It's possible that by deferring carry work across more operations he'd see an even bigger improvement.

comment 6y ago · link · parent

The article here:

https://news.ycombinator.com/item?id=23351007

specifically recommends against the carry variants of addition, because the instructions are still dependent on each other and don't pipeline well. In other words, it's using the same algorithm, just buried in a single instruction, and that doesn't necessarily make it faster.

Have you considered using a strategy similar to what the article suggests? I think the HN comments also had some additional suggestions.

comment 6y ago · link · parent

The more obvious lever here seems to be money.

What you are suggesting is very round-about -- somehow slack is so useful that, by denying police its use, they will see the error of their ways?

Where does this end? We could also make them wear boots that are 5 pounds each, and use cars that randomly refuse to start 10% of the time. What is the point?

comment 6y ago · link · parent

This is what I don't get: saying they are theoretically good but problematic (without necessarily saying "police are a net bad"), and then saying it's unethical to do business with them for routine products.

If there is logic there, it's very subtle and I'm not getting it. Can you elaborate or compare it to a precedent?

comment 6y ago · link · parent

I agree that police are the last line of defense rather than the first. Many places would be quite peaceful without police, though it might depend on the timeframe. Bad actors can do an awful lot of damage, and you really don't want Hobbesian traps to develop[1]. Once they do, you'll start to have very fond memories of the police.

If disbanding police forces makes it very far in the political discourse, then gun control will be dead as a concept in the U.S. Even felons (who have served their time) have some rights, and without police to protect them, it would be inhumane to deny them self-defense. It's arguably inhumane even with police.

[1] https://en.wikipedia.org/wiki/Hobbesian_trap

comment 6y ago · link · parent

I'm just trying to figure out why it's bad that police use slack. If we don't want police to be able to communicate, why not just disband them?

Note that I'm not suggesting we disband them. I am just trying to follow the logic.

comment 6y ago · link · parent

In response to persistent injustice by police, there are really only a few options:

(a) Get used to it.

(b) Get ready to join up. More officers who care about justice mean that it's easier to get rid of the unjust officers.

(c) Get ready to defund/disband, or at least reduce the scope of, the police department.

It doesn't shock me that (c) is being mentioned. It's probably a bluff, but might have enough credibility to change the power dynamics.

comment 6y ago · link · parent

If your city had a ballot initiative to defund and disband the police department, would you vote for it?

EDIT: I'm a little confused about the downvotes. If the answer is "no", then what's the problem with police using slack? Isn't it just a basic tool for communication? Is selling them radios also bad? I should also say that my answer in my city would be "no".

comment 6y ago · link · parent

Are we saying that:

(a) police are a net good, but slack is aiding/encouraging particular bad behaviors; or

(b) police are a net bad and we should just deny them anything that enables them to do their jobs; or

(c) police are a net good, but it's bad PR to associate with them

comment 6y ago · link · parent

Why do you think I want a violent revolt?

If you can protect yourself, you can simply (along with fellow voters) abolish the police. Once they stop getting paychecks, they will go home peacefully.

Without private gun ownership, abolishing the police would be too painful because you'd be at the mercy of the strongest criminals. Private gun ownership at least affords some protecting while you reform.

comment 6y ago · link · parent

To me that's very up-front. There might be a lot of people who would try to hide disqualifying information, hoping you don't find it.

There are probably a limited number of landlords who rent to felons, and they have to just make 1000 calls to find a place.

comment 6y ago · link · parent

Let's say that there was the "perfect" non-lethal weapon. Kind of like a phaser from Star Trek set to "stun" mode.

Would that be a good thing? I imagine there would be a lot of cases where they just stun everyone because, why not?

For that matter, maybe just implant everyone with a lights-out switch.

comment 6y ago · link · parent

Self defense is the general principle, and one of the things it offers is independence from the police.

A long time ago maybe that meant not having police at all, today it means that the police can be fired.

comment 6y ago · link · parent

Where is the MLK of 2020? I want to see someone who can go beyond their anger and have a plan and lead.

comment 6y ago · link · parent

But the militia was imagined as a different thing than a standing professional army

comment 6y ago · link · parent

The point is, if citizens are armed, they can keep the peace (more or less) without police for a while.

comment 6y ago · link · parent

No. Without the second amendment, you are dependent on police for safety -- so dependent that there is little you won't put up with.

With the second amendment, you can simply fire the police without (as much) worry for your family's safety. It would still be bad, but at least you have an option.

So it's not necessarily a violent confrontation. You just get a mayor in place that will stop paying them. A large group of people can often get a mayor to do something if they have a specific proposal.

comment 6y ago · link · parent

The fact that it was used in '92 for riots means it will be hard to challenge.

I feel it is an afront to the Constitution and the founders' intent, though. The Second Amendment is there, in part, to avoid the need for a standing military at all, because standing armies have a tendancy to be turned on the people.

Another reason the Second Amendment exists is so that citizens can remove their local police and protect themselves until they organize a new poloce force. A bit better organization could have put that into effect in Minneapolis.

comment 6y ago · link · parent

Should people write programs differently than before, or just use existing concurrency constructs and things will execute with better parallelism?

comment 6y ago · link · parent

Will this always be a compiler extension, or is intended to be an evolution of the language?
12345
87