- 0 Posts
- 12 Comments
Lightfire228@pawb.socialto
Programmer Humor@lemmy.ml•oh hey look i used my blender skills for memes again rule
3·3 months agoApply directly to the forehead
To explain
There are 2
Errorstruct / enum declarations, probably in separate filesTo the
?, they are different types and cannot be converted from one to the other (because they are two disparate structs that happen to have the same name, but can have different bodies)To fix this
You can either use
.some_func_result().map_err(|err| /* conversion here/*)?;+Or you can
impl From<Error1> for Error2And you should also name it
ThingError, so you can visually differentiate the two
+ There are like 10 different mapping functions, depending on if you’re using an option or a result
I never remember which one specifically i need, (
unwrap_or,map_or,map_or_else,ok,ok_or)I usually just hunt through the auto complete list until i find the function signature that gives me what i need
I mean, you just need to look at the conflicting files, fix up the code, then stage those changes and pop a new commit
There’s no “special” merge conflict resolution commit “type”
As for fixing the code itself, I usually look at what changed between both versions, and then re-author the code such that both changes make “sense”
We kinda do, with GPS satellites that have to correct their clocks due to the effects of gravity and speed
And communication with space probes
I use 24h clocks and ISO 8601 dates almost always
Honestly, I’m better at organizing code than I am my actual life
Timezones make intuitive sense for humans
UTC / Unix timestamps make intuitive sense for computers
The issue is bridging the gap
It’s an explicit “opt-out” by the OP, such that their content cannot (legally) be used to train LLMs or such (Chat GPT, Github Copilot, etc)Well, that’s what I assumed until i read the license terms. It doesn’t explicitly mention AI or LLMs, but it does say
You may not use the material for commercial purposes
Which i assume has the same limitations for AI training, for commercial AI
(I am not a lawyer)
While i also disagree with python’s tendency to use exceptions as control flow
Python is a pretty stellar scripting language. I wouldn’t use it for app dev, but it’s quite handy for the odd automation or CLI task


I use Hoppscotch
https://github.com/hoppscotch/hoppscotch