DWin

joined 1 year ago
[–] DWin 1 points 1 year ago (3 children)

Oh sorry, I misread what you typed and went on a tangent and just idly typed that in.

One thing you could do for your situation if you're planning on iterating over some array or vector of items is to use the inbuilt iterators and the chaining syntax. It could look like this

let output_array = array.into_iter()
    .map(|single_item| {
        // match here if you want to handle exceptions
    })
    .collect();

The collect also only collects results that are Ok(()) leaving you to match errors specifically within the map.

This chaining syntax also allows you to write code that transverses downwards as you perform each operation, rather than transversing to the right via indentation.

It's not perfect and sometimes it's felt a bit confusing to know exactly what's happening at each stage, particularly if you're trying to debug with something mid way through a chain, but it's prettier than having say 10 levels of nesting due to iterators, matching results, matching options, ect.

[–] DWin 1 points 1 year ago* (last edited 1 year ago) (5 children)

Just use this syntax

let myResultObject = getResult() 
let item = match myResultObject {
	Ok(item) => item, 
	Err(error) => {
		return;
	} 
};
[–] DWin 2 points 1 year ago

Yup, never nest.

All the conditions should be checked and returned if they failed as you go through the function with the successful response being the last line.

[–] DWin 11 points 1 year ago (1 children)

Eh, in my experience that's not how development works. With every new tool to improve efficiency, the result is just more features rather than using your new found time to improve your code base.

It's not just from the publishers and shareholders either. Fixing technicial debt issues is hard, and the solutions often need a lot of time for retrospection. It's far easier to add a crappy new feature ontop and call it a day. It's the lower effort thing to do for everyone, management and the low down programmers alike.

[–] DWin 1 points 1 year ago

The game is absolutley worse with analogue controls.

[–] DWin 2 points 1 year ago

I'm on a 2060 super with Manjaro and I haven't had any issue with drivers other than when I accidently uninstalled all the drivers at once, and then it was just a matter of running a command found from googling to get it back up and running.

I haven't tried an AMD card, and I'm strongly considering it for my next, but I just haven't seen you have a issues people report.

[–] DWin 18 points 1 year ago (2 children)

Beyond good and evil.

It's sales were poor but the reviews were great. A fantastic adventure game with a great story and a world that felt so incredibly lived in. It had a bunch of interesting mechanics that focused on stealth rather than confrontation.

Playing it now the scope feels pretty small but it's still a very tight experience.

[–] DWin -3 points 1 year ago

These are of course bad words, but it ignores words that have decreased in sensitivity as they've moved away from their original meaning. How much intent should we unknowingly accept from words we don't know the origins of?

The word "daft" used to be used as a term for someone "crazy" or "mad". Nowerdays this has been socially softened to be used when someone makes a basic mistake.

Lame used to be for someone physically impaired but now is used to denote something that's uncool.

And then if we wanna dive super deep into it and we look at a lot of high fantasy, the origins are possibly abhorant. Some species are believed to have been directly influenced by racial stereotypes in their formation.

Should all high fantasy be destroyed because of this? Or have we socially evolved past using those comparisons as a way to separate each other in society?

[–] DWin 2 points 1 year ago

I don't think you understand, we need a solution that requires us to do nothing and make absolutely no changes in our behaviour

[–] DWin 1 points 1 year ago

Oh interesting, appreciate the info. I thought even their Silverstone wing was less extreme than this one? Unless they just thought that was too inefficient to even consider

[–] DWin 4 points 1 year ago (3 children)

Their gamble on high downforce for a wet race unfortunately hasn't paid off. If it suddenly starts bucketing it down then Lando can still make a solid comeback if they play the strategy right

[–] DWin 0 points 1 year ago

Is there any prediction for rain?

view more: ‹ prev next ›