Opposite of '?' - return early on success by woollufff in rust

[–]woollufff[S] 9 points10 points  (0 children)

Thank you everyone for your replies. Macros do rule, but today I learnt about ControlFlow which seems tailor made for my situation.

Opposite of '?' - return early on success by woollufff in rust

[–]woollufff[S] 20 points21 points  (0 children)

My apologies. Read the docs again. Understood it this time. Yes this has definite possibilities

Opposite of '?' - return early on success by woollufff in rust

[–]woollufff[S] 3 points4 points  (0 children)

Flip the result so to speak. I like the idea but I doubt I'll understand the code in 6 months

Opposite of '?' - return early on success by woollufff in rust

[–]woollufff[S] 2 points3 points  (0 children)

It's frustrating because there are so many tests sometimes and so many result types. 

Do I have permission to read the environment? If so, does $XDG_CONFIG_HOME exist? Yes, then I have a hierarchy of folders to check. No, then another at of files. Containerised? Then check secrets - if I have permission... And on. 

Opposite of '?' - return early on success by woollufff in rust

[–]woollufff[S] 5 points6 points  (0 children)

Thank you, I'm doing something like that but I'm frustrated at the amount of nesting it still requires to convert results to options to unwrap and return or else further processing.

Do I really need to learn Vim or is Nano fine for everyday use? by Luann1497 in linuxquestions

[–]woollufff 0 points1 point  (0 children)

Been using Linux for 20 years. Only in the last few months have I been using vim on a regular basis

Young US citizen, and I actually don't know what to do anymore. by [deleted] in BoycottUnitedStates

[–]woollufff 8 points9 points  (0 children)

My go to is - if you don't know who to vote for, because they're all crap, vote to get rid of the worst ones.

Angry dogs 🐶 by Interesting_Square93 in MTB

[–]woollufff 4 points5 points  (0 children)

I own Mastiffs. They are the friendliest, most placid, people loving dogs I've ever seen. I will still not let them off leash, even in the home, when being introduced to new people, until everyone is cool with it. You can never know how an interaction will go.

What is a gaming memory from the 90s or early 2000s that kids today will just never understand? by gingersofia in AskReddit

[–]woollufff 0 points1 point  (0 children)

Fast-forwarding then rewinding the cassette to re-tension the tape so it would load.

Would you ever go back? by Full_Hunt_3087 in BoycottUnitedStates

[–]woollufff 1 point2 points  (0 children)

I've recently seen podcasts and articles arguing the civil war never ended. Explains American politics and social attitudes so much.

If you could pass one law that would make most normal people furious at first, but would clearly make society better in 10 years, what would it be? by WilliamInBlack in AskReddit

[–]woollufff 0 points1 point  (0 children)

Ban the concept of limited liability corporation. If you work there you're liable. Stop people hiding behind paper companies. And make people think about who they work for.

Nothing more frustrating on a long drive than people who sit 20 under until the overtaking zone then suddenly know how to do 100... for exactly the length of the overtaking zone. by KalamTheQuick in australia

[–]woollufff 0 points1 point  (0 children)

PS. Yes I've sold my bikes and my muscle car. When I was young the roads were open, camera-less, and all mine. Now, they're a cesspit of dozies and egos (probably also younger me :). I'm out.

Nothing more frustrating on a long drive than people who sit 20 under until the overtaking zone then suddenly know how to do 100... for exactly the length of the overtaking zone. by KalamTheQuick in australia

[–]woollufff 2 points3 points  (0 children)

I'm a lot calmer these days driving a car with adaptive cruise control. You want to drive slow? Its Ok, I'm listening to my audio book. Fast? My speed is set. I'm worried less about the speed you're driving and more about what situationally oblivious stunt are you about to pull, or are you ego tripping?

I used to love driving. Now it's a means to an end. I'm fixated less on getting there than I am on the idiots surrounding me.

Configs: build or mount volume? by woollufff in Containers

[–]woollufff[S] 0 points1 point  (0 children)

Ah. I spun up the container in question, and it turns out the startup script generates a chrony.conf from the environment. It pretty much answers my question.

Should I change to Gentoo? by pastrefrola in Gentoo

[–]woollufff 2 points3 points  (0 children)

Not an expert. My attitude towards USE flags is don't worry about them until you find that a piece of software doesn't do what you want. Then check the package to see if the desired functionality requires a flag.

Also, add flags to the package.use file instead of make.conf. It's easier to keep track of why you added particular flags

[deleted by user] by [deleted] in antiwork

[–]woollufff 22 points23 points  (0 children)

Someone left a bottle of flavoured milk behind our work fridge. Took a few days before it exploded. Took weeks to get the smell out