What is !steamdeck@lemmy.world doing over with the red dots 🤔
What is !steamdeck@lemmy.world doing over with the red dots 🤔
I wouldn’t put it so aggressively, but I stopped arguing with one of them recently, because I realized that I was punching down. I’m not going to try and diagnose, but some sort of neurodivergence that leads to hyperfocusing on irrelevant details, and black and white thinking.
I don’t think the answer is insulting them, that just validates their ingroup/outgroup mentality. The best thing to do is to just encourage them to keep on trying to improve themselves, and try to work on their maturity for when they become adults.
Wonder why they didn’t just keep everything on one site and only show stuff marked safe unless you toggle a switch? Maintaining two whole different sites that sync seems like more work for them
You’re probably getting downvotes because of the terrible title, but the article is interesting, and talks about putting this into practice:
https://civitai.com/articles/6792/flux-captioning-differences-training-diary
Is there a good tl;dr on what is new and interesting about flux? Does it use a different architecture, or is it just bigger?
The collect
’s in the middle aren’t necessary, neither is splitting by ": "
. Here’s a simpler version
fn main() {
let text = "seeds: 79 14 55 13\nwhatever";
let seeds: Vec<_> = text
.lines()
.next()
.unwrap()
.split_whitespace()
.skip(1)
.map(|x| x.parse::<u32>().unwrap())
.collect();
println!("seeds: {:?}", seeds);
}
It is simpler to bang out a [int(num) for num in text.splitlines()[0].split(' ')[1:]]
in Python, but that just shows the happy path with no error handling, and does a bunch of allocations that the Rust version doesn’t. You can also get slightly fancier in the Rust version by collecting into a Result
for more succinct error handling if you’d like.
EDIT: Here’s also a version using anyhow
for error handling, and the aforementioned Result
collecting:
use anyhow::{anyhow, Result};
fn main() -> Result<()> {
let text = "seeds: 79 14 55 13\nwhatever";
let seeds: Vec<u32> = text
.lines()
.next()
.ok_or(anyhow!("No first line!"))?
.split_whitespace()
.skip(1)
.map(str::parse)
.collect::<Result<_, _>>()?;
println!("seeds: {:?}", seeds);
Ok(())
}
You probably wouldn’t be committing this, unless you’re backing up a heavily WIP branch. The issue is that if you’re developing locally and need to make a temporary change, you might comment something out, which then requires commenting another now-unused variable, which then requires commenting out yet another variable, and so on. Go isn’t helping you here, it’s wasting your time for no good reason. Just emit a warning and allow CI to be configured to reject warnings.
That’s 👏 what 👏 CI 👏 is 👏 for
Warn in dev, enforce stuff like this in CI and block PRs that don’t pass. Go is just being silly here, which is not surprising given that Rob Pike said
Syntax highlighting is juvenile. When I was a child, I was taught arithmetic using colored rods. I grew up and today I use monochromatic numerals.
The Go developers need to get over themselves.
Another good one is Glasgow -> Glaswegians. Here’s a pretty interesting article about a few odd demonyms:
https://www.atlasobscura.com/articles/demonyms-linguistics-nicknames