hallettj

joined 2 years ago
[–] hallettj 5 points 1 year ago (3 children)

No, I only heard the Cortex review which made me not want to read it.

[–] hallettj 4 points 1 year ago

Yes, I like your explanations and I agree that's the way to think about it. But either way you have some special exceptions because main.rs maps to crate instead of to crate::main, and a/mod.rs maps to crate::a instead of to crate::a::mod. I know that's the same thing you said, but I think it's worth emphasizing that the very first file you work with is one of the exceptions which makes it harder to see the general rule. It works just the way it should; but I sympathize with anyone getting started who hasn't internalized the special and general rules yet.

[–] hallettj 3 points 1 year ago (2 children)

Yeah, it's tricky that the file for a module is in a subfolder under the file that declared it, unless the file that declared it is named main.rs, lib.rs, or mod.rs in which cases the module file is in the same folder, not in a subfolder. There is logic to it, but you have to connect multiple rules to get there.

We see in the examples above that a module named whatever can be in whatever.rs or in whatever/mod.rs and you get the same result. mod.rs is a special name with a special lookup rule.

whatever/mod.rs whatever/submodule_of_whatever.rs works exactly the same as whatever.rs whatever/submodule_of_whatever.rs. We use mod.rs so we don't have to have both a folder and an .rs file with the same name. But that leads to the special exception where submodules declared in mod.rs are defined by files in the same folder as mod.rs.

main.rs is like the mod.rs of the entire crate. main.rs has a special rule where it's in the same folder as its submodules, instead of the normal rule where submodules are in a subfolder.

lib.rs fellows the same special rule as main.rs. (You use main.rs to define an executable, lib.rs to define a library.)

[–] hallettj 38 points 1 year ago

Wow, this is one of the most complicated Snopes analyses I've seen. But it seems like the statement is accurate with caveats. If the brightest component of Polaris is probably 50 million years old what was there before wasn't really Polaris. And then it doesn't make a difference whether sharks have been around for 450 million or 195 million years.

[–] hallettj 5 points 1 year ago

Well now the tense standoffs in TNG will forever be undercut by giggling

[–] hallettj 6 points 1 year ago

One of my favorites is from Sisko, but I guess this one is more of a soliloquy than a dialogue,

The trouble is Earth! On Earth, there is no poverty, no crime, no war. You look out the window of Starfleet Headquarters and you see paradise. Well it's easy to be a saint in paradise, but the Maquis do not live in paradise! Out there, in the Demilitarized Zone, all the problems haven't been solved yet! Out there, there are no saints! Just people! Angry, scared, determined people, who are going to do whatever it takes to survive, whether it meets with Federation approval or not!

[–] hallettj 12 points 1 year ago

It's Mao Zedong. He said, "Political power grows out of the barrel of a gun." He also led China to mass starvation and terrible poverty, so not someone Picard would subscribe to.

[–] hallettj 3 points 1 year ago (2 children)

I feel like I'm in the same situation - although I haven't done as much reading as you have. I want a movement with concrete objectives to rally behind, but I'm not sure where to find it. Besides wanting things to be better, real wages have been flat for decades while cost of living has been going up. That makes people look more and more for some kind of dramatic change. I worry that fascists have been more organized than socialists in presenting people with an idea that feels like dramatic change. (It doesn't matter if fascism won't make anything better if people believe it when they lie and say it will.)

From what I've heard the school of socialism that most speaks to me is "economic revisionism", despite that term being invented as a pejorative. The idea is that a series of reforms can be implemented within a democratic-capitalist system to shift to a democratic-socialist one. I think that although it has flaws we have a sturdy democratic political system, and we would lose a lot by toppling it. If revolutionary socialists or anarchists had ever come up with a comprehensive plan for a better system I might think differently; but everything I've heard of or read about is very hand-wavy. My understanding is that both Marx-Engels and Bakunin had ideas something like: we can't predict exactly what the better future will be like, but it will emerge naturally if we eliminate barriers inhibiting better human behavior. I'm not willing to risk throwing out what stability we have in the hope that something better will emerge if we believe hard enough. I think the next fight is socioeconomic, not political.

I've heard arguments like, "incremental reforms will never work because capitalists will chip away at them to take back any power they lose." I'm not currently sold on that argument because I think you're likely to have an unstable equilibrium of assholes making power grabs in any system. I've also heard "capitalism is fundamentally broken", but at this point in time I'm more optimistic about fixing the broken parts incrementally than about starting from scratch because I don't know what the replacement would be.

What I'd really like is a discussion of what reforms would make things better for everybody which would hopefully lead to a concrete plan that people can point to when talking to politicians, protesting, striking, etc. Or even better would be a plan that is already formulated that I can start pointing to. That might include reforms to spread wealth more evenly like a wealth tax, closing tax loopholes, raising the minimum wage, more social services. It could include political reforms to help pry power away from the wealthy such as campaign finance reform, stricter rules around gerrymandering and polling place access, more regulation on politicized mass media. Ultimately I think what would be required to clinch the shift from capitalism to socialism could be to democratize capital which might be accomplished by ideas like requiring companies over a certain size to have democratic governance models and employee ownership, or limiting the amount of capital investment a single individual can make. I'm sure there is work on these ideas, but I don't know where to look. I want to hear a discussion about what people more knowledgeable than me think.

A plan that caught my eye at one point was the book One Way Forward by Lawrence Lessig which Lessig seemed to want to turn into a political movement. I'm not sure what the state of that is.

Anyway, economic revisionism is not as exciting as the idea of tearing down everything bad, and replacing it with something perfect. But until I find an argument with an amazing new idea, it's what I think is the most practical solution.

[–] hallettj 2 points 1 year ago (1 children)

It looks like a useful tool - thanks for sharing all of that info! Personally I would prefer to set up a shell alias or wrapper script for each command I want to run in distrobox instead of using a missing-program hook.

[–] hallettj 2 points 1 year ago (1 children)

And he has cybernetic nipples!

[–] hallettj 11 points 1 year ago* (last edited 1 year ago) (2 children)

git rebase --onto is great for stacked branches when you are merging each branch using squash & merge or rebase & merge.

By "stacked branches" I mean creating a branch off of another branch, as opposed to starting all branches from main.

For example imagine you create branch A with multiple commits, and submit a pull request for it. While you are waiting for reviews and CI checks you get onto the next piece of work - but the next task builds on changes from branch A so you create branch B off of A. Eventually branch A is merged to main via squash and merge. Now main has the changes from A, but from git's perspective main has diverged from B. The squash & merge created a new commit so git doesn't see it as the same history as the original commits from A that you still have in B's branch history. You want to bring B up to date with main so you can open a PR for B.

The simplest option is to git merge main into B. But you might end up resolving merge conflicts that you don't have to. (Edit: This happens if B changes some of the same lines that were previously changed in A.)

Since the files in main are now in the same as state as they were at the start of B's history you can replay only the commits from B onto main, and get a conflict-free rebase (assuming there are no conflicting changes in main from some other merge). Like this:

$ git rebase --onto main A B

The range A B specifies which commits to replay: not everything after the common ancestor between B and main, only the commits in B that come after A.

[–] hallettj 2 points 1 year ago

It's because new phones are too big! I'm planning to take my reasonably-sized phone to the grave!

view more: ‹ prev next ›