- 14 Posts
- 29 Comments
m_f@midwest.socialto Fediverse@lemmy.world•Lemmy User Feedback and Improvement Thread: Share Your Complaints, Suggestions, and IdeasEnglish0·11 months agoIt would be nice if communities that are similar enough could “share” a comment thread, so you don’t end up with comments scattered over many different communities for the same link. The mods could toggle something in the settings and say “This other community is good and we’ll be OK sharing posts with them”. You also wouldn’t have to explicitly crosspost.
m_f@midwest.socialto Fediverse@lemmy.world•Lemmy User Feedback and Improvement Thread: Share Your Complaints, Suggestions, and IdeasEnglish0·11 months agoSome apps will collapse those into a single post, but not all of them, and not all the time. It would be nice if that were better.
m_f@midwest.socialto Fediverse@lemmy.world•Lemmy User Feedback and Improvement Thread: Share Your Complaints, Suggestions, and IdeasEnglish0·11 months agoIt would be nice if there was a way to handle instance/user migrations. If an instance gets their domain name taken away, there’s no way AFAIK for the admin to say “Here’s our new location, with a verifiable signature”. Likewise there’s no way for a user AFAIK to move their account with a verifiable signature that the new one is still them. Ideally this could all happen automatically with signatures getting synced automatically and all that.
I’m sure it would be a lot of work and no idea if ActivityPub would get in the way, but it would give people a lot more assurance that they didn’t pick a server that will screw them over by going down.
m_f@midwest.socialto AI Generated Images@sh.itjust.works•[Community challenge 22] Busy Bees: Animals with JobsEnglish2·2 years agoYou’re not getting past this bouncer
Prompt
ChatGPT came up with the punny name on its own:
A large, heavy animal, resembling a buffalo, dressed as a bouncer at a cyberpunk-themed nightclub in an all-animal world. The club, named ‘Byte the Dust’, showcases a grungy, cyberpunk aesthetic, with a neon sign that’s bold and futuristic. The buffalo bouncer is wearing high-tech, neon-lit glasses and a distinctive cyberpunk mohawk. The outfit is a rugged, cybernetic ensemble with metallic accents. It stands imposingly at the club entrance, which features rough textures, rusted metal, and dimly lit neon lights. The buffalo’s expression is tough and unwavering, in harmony with the gritty cyberpunk theme. The artwork should be in a realistic style, highlighting the formidable presence of the buffalo and the intense, neon-tinged atmosphere of ‘Byte the Dust’.
Double curly is pretty common IME, but I have more experience in backend which is less likely to be involved in an error like this. Off the top of my head, handlebars, django, and jinja2 all use that style.
m_f@midwest.socialto Lemmy Shitpost@lemmy.world•What's your favorite Robot Unicorn Attack movie?6·2 years agoIn case anyone hasn’t seen it yet:
https://neal.fun/infinite-craft/
It’s pretty fun. Similar to OP, I was able to get all the way to crafting specific Mario Kart DS courses.
m_f@midwest.socialto Python@programming.dev•Generic Typing with `Iterable[str]` or `Collection[str]`: Should you use it?11·2 years agoIf you’re writing code that generic, why wouldn’t you want
str
to be passed in? For example,Counter('hello')
is perfectly valid and useful. OTOH,average_length('hello')
would always be1
and not be useful. OTOOH, maybe there’s a valid reason for someone to do that. If I’ve got a list of items of various types and want to find the highest average length, I’d want to domax(map(average_length, items))
and not have that blow up just because there’s a string in there that I know will have an average length of1
.So this all depends on the specifics of the function you’re writing at the time. If you’re really sure that someone shouldn’t be passing in a
str
, I’d probably raise aValueError
or a warning, but only if you’re really sure. For the most part, I’d just use appropriate type hints and embrace the phrase “we’re all consenting adults here”.
m_f@midwest.socialto Programmer Humor@programming.dev•What could go wrong trying to solve AoC in Rust?45·2 years agoThe
collect
’s in the middle aren’t necessary, neither is splitting by": "
. Here’s a simpler versionfn main() { let text = "seeds: 79 14 55 13\nwhatever"; let seeds: Vec<_> = text .lines() .next() .unwrap() .split_whitespace() .skip(1) .map(|x| x.parse::().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 aResult
for more succinct error handling if you’d like.EDIT: Here’s also a version using
anyhow
for error handling, and the aforementionedResult
collecting:use anyhow::{anyhow, Result}; fn main() -> Result<()> { let text = "seeds: 79 14 55 13\nwhatever"; let seeds: Vec = text .lines() .next() .ok_or(anyhow!("No first line!"))? .split_whitespace() .skip(1) .map(str::parse) .collect::>()?; println!("seeds: {:?}", seeds); Ok(()) }
m_f@midwest.socialto News@lemmy.world•Every Conservative Supreme Court Justice Sits Out Decision in Rare Move141·2 years agoSure, but do you think if the lower court decided that the case could move forward, the justices would’ve sat out? I doubt it.
m_f@midwest.socialto News@lemmy.world•Every Conservative Supreme Court Justice Sits Out Decision in Rare Move1562·2 years agoBecause there were not enough justices for a quorum—the court needs at least six and only Justices Elena Kagan, Sonia Sotomayor and Ketanji Brown Jackson remained—the court affirmed the judgment of a lower court to dismiss the lawsuit.
Clever. Appearing to do the right thing at face value coincides nicely with getting the case against you dropped. It’s likely impossible to sue a majority of the Supreme Court if they don’t care to be sued.
NEVER GONNA GIVE YOU UP
NEVER GONNA LET YOU DOWN
ONLY WANNA FILL YOUR HOG AND CRANK IT
That’s ok, they’ll just move to their second cabin, complete with what looks like an outdoor dining set.
I’m no astrophysicist, but those moon orbits do not look stable. High tide vs low tide must be pretty interesting
What was the prompt for this?
m_f@midwest.socialto Technology@lemmy.world•I hate how everything requires you to download a shitty proprietary data harvesting app nowadays when everything can be done just fine without an app.English33·2 years agoGood, that’s the only way people like that will change
m_f@midwest.socialto Mildly Infuriating@lemmy.world•Nord VPN tv commercials are incredibly misleadingEnglish1·2 years agoVPNs are great for avoiding the nastygrams that your ISP forwards to you from media companies. They get sent to some company that doesn’t care about US laws instead, and probably laughed at before being deleted
m_f@midwest.socialto Mildly Infuriating@lemmy.world•Nord VPN tv commercials are incredibly misleadingEnglish1·2 years agoEverything’s visible for HTTP, and in fact some ISPs inject their own ads into HTTP content. HTTPS is harder for malicious actors, but your ISP can tell when you’re visiting pornhub.com, and will happily provide that to the government. With encrypted SNI it’s somewhat harder, but if you’re visiting an IP address of 1.2.3.4, and that IP address is solely used by pornhub.com, it’s not hard to guess what you’re up to.
Here’s a recent HN thread about the objects: https://news.ycombinator.com/item?id=35937540
Metalworker status symbol seems compelling, as it explains several facts about them, and the knitting angle could be a chicken vs egg situation. Either knitters found an existing and relatively common object to be useful for their needs, or knitting is older than we think and the need for these tools drove metalworkers to decide that a hard-to-make tool was a good status symbol. Or maybe it’s both/and, with both needs influencing each other. I can easily imagine some metalworking culture deciding that this hard-to-make tool is a good status symbol, and they eventually turn it into something that’s not actually useful for the original purpose, but works great to show off.
Remember to direct your anger in the right place:
https://en.m.wikipedia.org/wiki/Democratic_National_Committee#Current_leadership
Their failures gave us Trump and empowered nasty people like this. The entire structure needs replacing ground-up with people that aren’t gobbling corporate cock.