7,244 karma · joined Sep 25, 2010 (16y ago) · 2,593 submissions
comment 6y ago · link · parent
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
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
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
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
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
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
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
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
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
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
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
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
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.
comment 6y ago · link · parent
(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
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
(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
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
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
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
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.