Formatters are off-topic for this, styles come first, formatters are developed later.
My other reply:
How about this one? it more closely mirrors the switch example:
match suffix { 'G' | 'g' => mem -= 30, 'M' | 'm' => mem -= 20, 'K' | 'k' => mem -= 10, _ => {}, }
How about this other one? it goes as far as cloning the switch example’s indentation:
match suffix { 'G' | 'g' => { mem -= 30; } 'M' | 'm' => { mem -= 20; } 'K' | 'k' => { mem -= 10; } _ => {}, }
How about this one? it more closely mirrors the switch example:
match suffix {
'G' | 'g' => mem -= 30,
'M' | 'm' => mem -= 20,
'K' | 'k' => mem -= 10,
_ => {},
}
How about this other one? it goes as far as cloning the switch example’s indentation:
match suffix {
'G' | 'g' => {
mem -= 30;
}
'M' | 'm' => {
mem -= 20;
}
'K' | 'k' => {
mem -= 10;
}
_ => {},
}
A single match statement inside a function inside an impl is already 4 levels of indentation.
How about this?
The preferred way to ease multiple indentation levels in a
switch
statement is to align theswitch
and its subordinatecase
labels in the same column instead of double-indenting the case labels. E.g.:
switch (suffix) {
case 'G':
case 'g':
mem <<= 30;
break;
case 'M':
case 'm':
mem <<= 20;
break;
case 'K':
case 'k':
mem <<= 10;
/* fall through */
default:
break;
}
I had some luck applying this to match
statements. My example:
let x = 5;
match x {
5 => foo(),
3 => bar(),
1 => match baz(x) {
Ok(_) => foo2(),
Err(e) => match maybe(e) {
Ok(_) => bar2(),
_ => panic!(),
}
}
_ => panic!(),
}
Is this acceptable, at least compared to the original switch
statement idea?
US defaultism detected on Lemmic soil, lethal force engaged.
I find diplomacy hard when one side has been going for complete annihilation of Palestinians, which is only a logical continuation of a 3/4 century long conflict.
And that one side includes almost every governemnt, including the Palestinian “governemnt”.
But sure, diplomacy’s great, if they stopped attacking tommorow, retreated, and said they want to negotiate, and somehow had sufficient evidence to prove that it isn’t a trick, and that they reflected and regretted half a century of genocide in 1 day, I would advocate for their diplomatic attempt.
Random rant of the day: A few months ago I read an article that said: “after Hamas killed thousands of civilians on the 6th of October”; at the time Israel was doing its thing for at least a week and their ‘reported’ kill count wasn’t even a thousand yet, I hate these liars.
Ok, I see your point.
How about sending trained soldiers and cooperating with Hamas?
Or more easily, stopping trade with Israel?
Or more easily and more profitably, stopping weapon donations to Israel at the very least?
I am not speaking to you personally, but if people stop talking about things they become forgotten, so here I am speaking.
After searching your comment history for the string: “Doods” (all case) I have something to tell you: git off social media, it took me minutes of flipping pages to reach 5 month old comments before surrendering; I do feel like I know you as well.
Regarding the general feeling, I experience a similar thing with someone else:
@PanArab@lemmy.ml, who is noticeable for having one of the few Arabic names on Lemmy, تحريرها كلها ممكن (freeing it all is possible) and for being the moderator of !israelicrimes@lemmy.ml, and for being from Saudi Arabia, we could tell that because:
a) He has its flag on his account.
b) He put a picture of an expensive car on top of it, further proving he is from Saudi Arabia (لا مؤاخذة) (Sorry for teasing you)
Edit: he apparently moderates many other things as well.
I understand you, but I felt deep emotion seeing a 640x480 scene of a sprite (kidnapped female slave) punching another sprite and using some edgy language. Yes, it did require me to stop for a minute to imagine everything for it to hit this deep - which the game’s turn based mechanics helped me with.
I also feel the less detailed something is, the more HORRIFYING and VIOLENT it appears, as it stimulates imagination much more than HD scenes in games and movies, where most of the times that won’t be able to create something more SHOCKING that what you imagined (The modern +13 goal in games and movies plays a role too, so there might be bias)
There was a pirated TV channel that specialized - mostly - in horror movies, it had horrible audio and video quality - especially the bitrate, everything that appeared on the channel was horrifying, the lack of clearness induced a feeling similar to fearing the dark, the low bitrate in particular meant that you - the viewer - was practically blind in every fast scene, which dramatically increased the suspense.
You might tell me to just go read a book if I want to use my imagination, and actually that’s a pretty nice suggestion.
PS: the game in the first paragraph is the first Fallout if anyone’s wondering. I also barely heard of Ghost of Tsushima (or most modern games outside of FF7R)
“updating (the controls) for modern audiences” can be good.
My only experience of that is when they removed grid based movements from New N’ Tasty and forced players to use the analog, trying to walk felt horrible.
But something like the first 2 Fallouts on the other hand can really use a controls overhaul.
The lightest, this makes makes me think, what actually constitutes a gaming laptop, I have an old Intel 530 laptop, I can play Abe’s Oddysee on it, and probably fallout, which makes it a gaming laptop, why do gamers chase the latest hardware when for mere cents they can get a good experience, an experience which was a dream to many.
I don’t think higher graphics requirements hurt creativity, you can have an unrealistic looking game that is very GPU-intensive, I was mainly concerned about the costs and wasted money/efforts.
But lowering the graphics budget - and the budget in general - can make creativity/risk-taking a more appealing option for AAA studios.
Edit : I just noticed both sentences kind of contradict each other but you get the point.
As someone who has pirated many games, and who lives in a 3rd world country that barely cares about most minor physical crimes, I am not worried in the slightest.
everything after this point is closer to a rant and unrelated.
minor includes, but isn’t limited to: corruption, driving opposite side, hitting someone with your car as long as they don’t get seriously hurt (It happened in front of me once and it was kinda funny to be honest, the man got hit and kinda slept on the hood), damaging public property, blocking the sidewalks with your shop, Using a drill to draw a heart on the middle of the street to celebrate your marriage, blasting music hearable 3 blocks away several hours a day, and 12-year-olds driving cars
Piracy is 100% unpunishable where I live. (also atleast 90% of the population doesn’t know that software - aside of no-body-uses Google play apps - costs money, including Windows 7 and office 2010*)
*This is why I cannot share .odt Libre Office files.
I just got some idea yesterday regarding
impl
blocks, ready to be my respondent?I had a big
impl
block with 4 levels of indentation, so I cut the block, and replacedwith
mod impl_inputlist;
and moved theimpl
block to a new file, and did not indent anything inside that block.The advantage this has over just not indenting the
impl
block in place, is that people will have difficulty distinguishing between what’s in the block and what’s outside, and that’s why theimpl
was moved to its own exclusive file, impl_inputlist.rsMaybe I am overstressing indentation. Ss there something wrong with my setup that prevents me from accepting 4-space indentation?
I use:
Editor: Neovide
Font: “FiraCode Nerd Font Mono:h16” (16px fonts are addicintg)
Monitor: 1366x768, 18.5 inch, 10+ years old, frankenstein-ly repaired Samsung monitor.
Distance: I sit at about 40-60 Cm from my monitor.
That leaves me with a 32x99 view of code excluding line numbers and such.