This profile is from a federated server and may be incomplete. Browse more on the original instance.

DWin,

I tmux my vim session so I never have to exit it, I just end the session and NOTHING OF NOTE HAPPENS

DWin,

You monster, I prefer denial

DWin,

You don’t have to use the platform. Competition is good, and steam taking 30% is massive. I’m a huge fan of steam but the fears of what happens post-gabe should have us all wanting other companies to put pressure on them. Hopefully it’ll drive them to promise continued pro-consumer practices such as proton (let’s gloss over DRM)

DWin,

Just use this syntax


<span style="color:#323232;">let myResultObject = getResult() 
</span><span style="color:#323232;">let item = match myResultObject {
</span><span style="color:#323232;">	Ok(item) => item, 
</span><span style="color:#323232;">	Err(error) => {
</span><span style="color:#323232;">		return;
</span><span style="color:#323232;">	} 
</span><span style="color:#323232;">};
</span>
DWin,

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


<span style="color:#323232;">let output_array = array.into_iter()
</span><span style="color:#323232;">    .map(|single_item| {
</span><span style="color:#323232;">        // match here if you want to handle exceptions
</span><span style="color:#323232;">    })
</span><span style="color:#323232;">    .collect();
</span>

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,

It feels like maybe this could be a code structure issue, but within your example what about something like this?


<span style="color:#323232;">fn main(){
</span><span style="color:#323232;">    let mut counter = 0;
</span><span style="color:#323232;">    let output_array = array.into_iter()
</span><span style="color:#323232;">        .map(|single_item| {
</span><span style="color:#323232;">            // breaks the map if the array when trying to access an item past 5
</span><span style="color:#323232;">            if single_item > 5 {
</span><span style="color:#323232;">                break;
</span><span style="color:#323232;">            }
</span><span style="color:#323232;">        })
</span><span style="color:#323232;">        .collect()
</span><span style="color:#323232;">        .map(|single_item| {
</span><span style="color:#323232;">            // increment a variable outside of this scope that's mutable that can be changed by the previous run
</span><span style="color:#323232;">            counter += 1;
</span><span style="color:#323232;">            single_item.function(counter);
</span><span style="color:#323232;">        })
</span><span style="color:#323232;">        .collect();
</span><span style="color:#323232;">}
</span>

Does that kinda syntax work for your workflow? Maybe it’ll require you to either pollute a single map (or similar) with a bunch of checks that you can use to trigger a break though.

Most of the time I’ve been able to find ways to re-write them in this syntax, but I also think that rusts borrowing system although fantastic for confidence in your code makes refactoring an absolute nightmare so often it’s too much of a hassle to rewrite my code with a better syntax.

DWin,

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,

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.

What film, show or game that is not necessarily 'underated' didn't have the level of social impact it deserved.

What’s the antithesis of Arrested Development, Firefly or The Big Lebowski? Those may never have ‘found their audience’ but over time seemed to recognised by everyone. What are the deep cuts that you liked but it feels like everyone has completely forgotten they even existed.

DWin,

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,

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,

Yup, super quick to throw a cut together or some basic footage. It won’t replace the full adobe suite, but if you want to cut basic videos together it’s perfect

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • uselessserver093
  • Food
  • aaaaaaacccccccce
  • test
  • CafeMeta
  • testmag
  • MUD
  • RhythmGameZone
  • RSS
  • dabs
  • KamenRider
  • Ask_kbincafe
  • TheResearchGuardian
  • KbinCafe
  • Socialism
  • oklahoma
  • SuperSentai
  • feritale
  • All magazines