HackerTrans
TopNewTrendsCommentsPastAskShowJobs

onetoo

no profile record

comments

onetoo
·6 tháng trước·discuss
The equivalent in python-metaphor-land would be that python files clearly designate whether they are py2 or py3, and a single python interpreter can run both py2 and py3 scripts, as well as cross-include files of each version without issue.

Rust editions only (and rarely!) break your code when you decide to upgrade your project's edition. Your public API stays the same as well (IIRC), so upgrading edition doesn't break your dependents either -unless they don't have a new enough version of the compiler to support said newer edition.
onetoo
·năm ngoái·discuss
IIRC it's a single ministry with not a lot of machines (in the order of 100). Definitely not as newsworthy as it's being made out to be, but viability has to be confirmed before a larger rollout can be done, I suppose.
onetoo
·năm ngoái·discuss


  > Even more annoying is that I have to duplicate the iterator code: as I often work with frames that may be flipped bottom-up I want to write code like
  >
  >    let mut iterator = if !flipped {
  >       data.chunks_mut(stride)
  >    } else {
  >       data.chunks_mut(stride).rev()
  >    };
  >    for line in iterator { ... }
  >
  > but I can’t since objects have different type (and probably size) and there’s no realistic way to coerce them to the same interface.
For this specific case there is a relatively ergonomic solution using dynamic trait objects + temporary lifetime extensions, available since Rust 1.79:

  let iterator: &mut dyn Iterator<Item = _> = if !flipped {
    &mut data.into_iter()
  } else {
    &mut data.into_iter().rev()
  };
  for line in iterator { ... }
Alternatively, if this is not a feasible solution (e.g. we want to return the new iterator to an outer scope, or the overhead of dyn indirection is unacceptable in this context), one can consider using itertools::Either instead:

  use itertools::Either;
  fn conditionally_flip_iter<I: DoubleEndedIterator>(
      data: I,
      flipped: bool,
  ) -> impl Iterator<Item = I::Item> {
      if !flipped {
          Either::Left(data.into_iter())
      } else {
          Either::Right(data.into_iter().rev())
      }
  }
  // ...
  let mut iterator = conditionally_flip_iter(data, flipped);
  for line in iterator { ... }
onetoo
·2 năm trước·discuss
This doesn't necessarily find the best parameters, and it doesn't necessarily do it easily. From my reading, it will converge on a local optimum, and it may take some time to do that.

In theory, I don't see why the kernel couldn't have a parameter-auto-tune similar to this. In practice, I think the kernel has to work in so many different domains, it'd be impossible to land on a "globally good enough" set of tuning heuristics.

I'm far from a kernel developer, so I'm ready to be corrected here.

IMO if we ever see something like this deployed widely, it will be because a popular distribution decided to install it by default.
onetoo
·2 năm trước·discuss
I obviously can't speak for everyone, but I personally don't know anyone who strongly dislikes the US, and especially not US citizens.

The sentiment I personally hear when talking about the US (and, again, I don't speak for everyone) is more akin to the kind of sympathetic concern you might have for a friend who's become an alcoholic: It pains you to see them hurt themselves like that, but their temper flares when you suggest that maybe they drink just a little bit too much. But they can't be helped until they're ready to admit that they have a problem, unfortunately. So until then, all you can do is pray they don't crash when drunk driving.
onetoo
·2 năm trước·discuss
> e.g. it hasn't yet happened in Britain

Granted, I don't follow it closely, but from what discourse I've observed things on the other side of the pond don't seem quite harmonious to me.

> I'm not that sure it was entirely true even in the US between 1940 and 1980 either.

Which does not necessarily disprove the argument. Things were arguably less polarized and better working in the past, but my argument is exactly that the political incentives of a two-party system will eventually cause things to degenerate. The fact that things were once "reasonable politics" but have, over the course of decades, degenerated to "our policy is whatever is the opposite of their policy" is exactly the issue.

> Is it radically different in multiparty systems, though? If you are outside the government coalition you have similar incentives.

Similar, yes, but not necessarily the most effective political move.

If a disenfranchised voter can vote for a third (or fourth) party without their vote "being wasted", a strategizing disenfranchised voter no longer "has" to vote for a "least-worst" option in order to avoid the "most-worst" option.

In that case, painting your opponent as "even worse" does not necessarily win you votes. If it does, it likely also gives votes to the other parties in your political sphere, and if they get enough votes to make a coalition government without you, why should they bother to include someone whose primary policy is being a troublemaker?

---

To be clear, no system is perfect. I don't know what the best is, I just know it's not FPTP. The primary argument I am trying to make is that the polarization we see now is the inevitable (long-term) outcome of a two-party system, and that a two-party system is the inevitable outcome of winner-takes-all FPTP.
onetoo
·2 năm trước·discuss
> Thankfully US has all sorts of checks and balances and it might take a while for a single party to get control of the House, Senate, White House and the Supreme court

The fact that "it is good when government is deadlocked and ineffective" is an actual argument people use is baffling to me, but for the sake of the argument and out of assumed mutual respect, I'll do my best to stay objective for following:

> IMHO electoral systems matter but extreme polarization is the real problem

I absolutely agree that extreme polarization is a major issue.

I believe that FPTP inevitably leads to extreme polarization, when given enough time: FPTP inevitably converges to a two-party system (due to strategic voting), and a two-party system inevitably leads to extreme polarization (due to strategic politicians playing into strategic voting).

The argument for the latter goes something like this: Disenfranchised voters can be coaxed to vote for a least-worst option when the most-worst option looks worse enough. So it becomes more politically effective to demonize your opponent rather than argue your own politics.

Additionally, it is politically beneficial for you when things stay bad while your opponent is in charge, and especially so if things get worse. You can use their perceived incompetence as ammunition to further demonize them. So it becomes beneficial to use what government power you might have in order to hinder your opponent's attempts at improving things, even if what they're trying to do is something you agree with and would yourself do if you were the one in power.

Depending on your preferred political party, I'm sure you can think of examples of the above.
onetoo
·2 năm trước·discuss
Not from Berlin, but I imagine it is similar: It is usually the case that the more shady your "kebab pusher" is, the more delicious the kebab is.

If the sign says one price, the cashier says a second, and the cash register says a third? You've found the best kebab in town.
onetoo
·2 năm trước·discuss
Also from EU, additional tidbit: Not being a first-past-the-post two-party system allows for political parties to be more nuanced than a simplified left-right spectrum.
onetoo
·2 năm trước·discuss
And, as we all know, becoming a father when you do not wish to is completely without consequences, making the entire ordeal risk-free. Male birth control pill is useless, QED.
onetoo
·2 năm trước·discuss
By that logic, female birth control pills also have no value.
onetoo
·2 năm trước·discuss
"But if you dump the toxic waste into the river, there will be no river left," said the citizen.

"lol" said the factory, "lmao".
onetoo
·2 năm trước·discuss
If the EU is regressive then I don't want to live in your progressive society.
onetoo
·2 năm trước·discuss
As I said, I would love to work on things out of passion.
onetoo
·2 năm trước·discuss
I would love to work on things out of passion, but passion doesn't shelter me from the elements nor provide a steady source of calories.
onetoo
·2 năm trước·discuss
If you want to split hairs about exact terminology, then /reasons/casus belli/. I hope we don't disagree that their "denazification" story is bullshit.
onetoo
·2 năm trước·discuss
I don't know the exact procedures, but I imagine and would expect that they reopen the case if new substantial and substantive leads show up.
onetoo
·2 năm trước·discuss
Maybe that combined with the fact that Russia actively invaded another country for bullshit reasons means we don't want to point fingers at Russia without solid evidence, lest they use it to invent yet another bullshit reason to invade, I don't know, Sweden?

That specific reasoning is also bordering on conspiracy, but my point is that I don't think it's suspicious that countries aren't pointing fingers at Russia without solid evidence.
onetoo
·2 năm trước·discuss
Being out of things to investigate is a reason to end investigation. It is possible to follow all leads to the end and still have no conclusive evidence.
onetoo
·2 năm trước·discuss
An alternative explanation is that there is simply not enough evidence to tell one way or the other.