Trump was not elected by a "majority of Americans". He was not even elected by a majority of Americans who voted. In fact, he did not even win by a plurality of Americans who voted.
Because of weirdness of the way the Presidential election process works in the US, it's possible to win the election with fewer votes than your opponent; you just need a majority of electors, but most states allocate electors in a winner-takes-all fashion.
> there should be such travel restrictions
Voting for someone does not mean that you agree with all of their policies. It's possible that a large number of Americans disagreed with those policies, but preferred other policies Trump held over Clinton, like lowering taxes and reducing regulations. Or that enough people were sufficiently uncomfortable with a woman as president. Or that enough people were convinced by the combination of Clinton conspiracy theories with the email scandal.
> but most states allocate electors in a winner-takes-all fashion.
And, while there is a positive relationship between population and elector count, electors aren't even assigned proportional to population, so even if each state assigned electors proprtionately to the vote, you could still win with less votes than an opponent if your support is concentrated on low-population states.
It has two modes of operation; one in which it uses ptrace with PTRACE_SYSEMU, which was implemented so that User Mode Linux could intercept all syscalls. This works in all environments, whether or not hardware virtualization is available (included VMs which don't enable nested virtualization).
The other is that it can use KVM, without any hardware emulation, to utilize hardware virtualization support and do it more efficiently.
Neither way relies purely on user-space; they both use kernel features that are designed specifically for allowing one user-space process to virtualize another.
Rust is increasingly frequently taught in schools; and when Haskell or OCaml are taught in schools, it's usually as part of a "programming languages" survey course where you learn a little bit of a few languages of different paradigms, and I expect that most students won't really retain much from the class a year or two later unless it helped them develop an independent interest in functional programming.
This is accurate about the US -- in Europe things are quite different. Haskell is regularly taught in first programming courses in the UK, for example, and OCaml is very widely taught in France.
There’s been a few over the years, one of the first was an OS class before Rust 1.0. As you’ve mentioned downthread, sometimes they stick with it, sometimes they don’t. Often classes that are run by grad students or adjuncts change when the teachers change.
Two classes off the top of my head from this spring:
Ah, looks like the registrars were still coming online when I tried. When I first tried Gandi, it didn't seem to like .app, but now it does and lets me choose "landrush," which I assume is the way to buy a domain during the EAP.
It's only for the current early access period, so if you don't have a named project already I'd suggest just waiting for the period to end then your pricing is steady. We know how to design good auctions but I'm not sure there's any design that'll be kind to purchasers who can't easily evaluate the value of the item to them while still meeting other more basic goals.
This particular article is about a Firefox developer deciding to spend a little bit of time applying some of his knowledge on profiling and optimizaiton to the Rust compiler, without being a core compiler developer and involved in any of the big performance-related initiatives that are ongoing.
So it's going to focus on a few micro-optimizations that someone can find by doing a little bit of profiling and making some small, isolated changes.
I think there are a couple of major reasons why rustc is slow, and then a lot of ones which just boil down to "we haven't gotten to that yet."
One of them is that rustc was originally written as a self-hosting compiler while the language itself was still in flux. So for the early years, there was a lot of churn just due to keeping up with the language changes, and just implementing the language, not being able to really focus on performance and optimizations.
Once the language stabilized, the compiler was not really the best written piece of code in Rust because it had been written before some features existed, before people had figured out idiomatic ways to do things in Rust, and because it had been written with the assumption that it could just work with the AST and a high-level IR and translate that directly to LLVM and let LLVM handle all of the optimizations.
Shortly after the 1.0 release, a big project began to define and use "MIR", a mid-level IR between the high-level IR that is much closer to surface syntax and LLVM's low-level IR for generic optimizations and code generation. That project took a while to complete, but has finally been completed; that lays the base for new language features, improvements in existing language features, and being able to do better work on optimization; it has led to several major improvements in compiler performance that have already landed.
Another issue is, pretty similar to the C++ issue; Rust has generics, which offer many of the same compilation issues as C++ templates. They are constrained a bit more than C++ templates, and don't have the SFINAE philosophy, so I think it's possible for the compiler to be smarter with those, avoid monomorphization in some cases, and so on, but it is still likely that in heavily generic code, you may not be able to do much better than heavily templated C++ code.
There are also some issues that are just holdovers from the fact that language evolution, correctness, and ease of development was prioritized over compiler performance in the the initial versions; for instance, the de-sugaring of high-level constructs causes rustc to produce a lot of LLVM IR that LLVM winds up just optimizing away. Having rustc be smarter and produce less of this is a major optimizaiton goal.
A few major examples of improvements that are underway or being considered: sharing generic code between crates (if two crates in your dependency graph each instantiate Vec<i32>, you shouldn't have to compile that twice), sharing closures between generic instances (if there's a function that depends on some generic type T, but a closure in it that does not, there's no need to duplicate that closure for both instances of that function), doing some inlining in MIR (lots of high-level Rust features depend on inlining to produce "zero-cost abstractions", so doing that earlier in the process may reduce the amount of work that LLVM has to do).
And then there are improvements for allowing for better parallelization and incremental compilation, better link time optimization, and so on.
tl;dr: it will get faster, in a real sense, not micro, but in the end it will be constrained by language design to be closer to the C++ compiler end of the spectrum than the Go end of the spectrum
It would be nice to be able to use something like Keith Winstein (Stanford) et al's gg.[1] Sort of `make -j1000` for 10 cents on Lambda. Linux kernel cold compilation in under a minute.
So that you can easily rebuild and re-run each one with difference in build settings, instrumentation, etc, and get comparisons between the baseline and the modified version, without having to check out a different branch each time.
Sometimes it's just quicker to work with two separate working directories than switching branches in one.
Except part of the problem is that it's not even doing a very good job of giving a good authoritative answer either.
In the earlier days, it was designed to straddle the line more with a wiki; there were "community wiki" questions and answers, but people couldn't get reputation for those, and if someone's question or answer was edited enough it would automatically converted to "community wiki". However, people would get upset about losing the potential karma, so that feature was taken away, and major edits to other people's answers that change the meaning of it started to be discouraged.
However, there's no way for anyone other the person who originally asked a question to change which answer is accepted. So if someone asked a question 10 years ago, and someone gave a bad answer or an answer that is now out of date but which was accepted, and those two people have now left the site, there's no good way to get the first answer to the question to be the correct one. You can write a better answer, and even if it's upvoted, there will still be the accepted answer ahead of it.
I've tried following the original, more wiki-like spirit of the site by editing such answers, and then gotten other people reverting me because the edit would "give reputation to someone who didn't deserve it."
I feel like the incentives, and balance, and community of the site are just off right now. It still serves a useful purpose, but it could be a lot better, but whenever I've tried making suggestions for how to improve, I've gotten so much pushback that I've just given up.
Trump was not elected by a "majority of Americans". He was not even elected by a majority of Americans who voted. In fact, he did not even win by a plurality of Americans who voted.
Because of weirdness of the way the Presidential election process works in the US, it's possible to win the election with fewer votes than your opponent; you just need a majority of electors, but most states allocate electors in a winner-takes-all fashion.
> there should be such travel restrictions
Voting for someone does not mean that you agree with all of their policies. It's possible that a large number of Americans disagreed with those policies, but preferred other policies Trump held over Clinton, like lowering taxes and reducing regulations. Or that enough people were sufficiently uncomfortable with a woman as president. Or that enough people were convinced by the combination of Clinton conspiracy theories with the email scandal.