I think it’s worth emphasising here: Don’t put it off!
There are millions who can tell you from experience that good intentions count for nothing when it comes to backups.
I’d recommend going and setting up Timeshift right now: https://github.com/linuxmint/timeshift
It’s easy to set up, it takes literally 10 minutes, and if you decide later you want to use something else, you can just uninstall Timeshift and delete its backups. But in the meantime you’ll be protected with backups.
It’s literally the first thing I install on a new system and it’s saved me multiple times from having to do a complete reinstall.
Thanks for your thoughts, I appreciate it!
I assume you have got it by now? I certainly hope so! xD
Have you been enjoying it?
I’m considering buying a Shinobi - I’m inclined towards having dedicated function keys - so I’d love to know what you think about the Shura compared to the Shinobi.
There’s a nice list of this feature by language on the Wikipedia page for anyone interested: https://en.wikipedia.org/wiki/Null_coalescing_operator#Examples_by_languages
Yeah, you’re quite correct, it’s not exactly equivalent, I just went on auto-pilot because it’s used so much for that purpose 🤖
It’s much closer to being a true null-coalescing operator than ‘OR’ operators in other languages though, because there’s only two values that are falsy in Ruby: nil
and false
. Some other languages treat 0
and ""
(and no doubt other things), as falsy. So this is probably the reason Ruby has never added a true null-coalescing operator, there’s just much fewer cases where there’s a difference.
It’s going to drive me mad now I’ve seen it, though 😆 That’s usually the case with language features, though, you don’t know what you’re missing until you see it in some other language!
Ruby:
a || b
(no return
as last line is returned implicitly, no semicolon)
EDIT: As pointed out in the comments, this is not strictly equivalent, as it will return b
if a
is false
as well as if it’s nil
(these are the only two falsy values in Ruby).
That is so much better 👍
They ingested it, but only as a joke.
People have already given direct answers, and the indirect answer of ‘set up regular automated backups’ (which everyone should set up right now if they haven’t already), but for the sake of throwing another option out there, people could take a look at ‘trash-cli’: https://github.com/andreafrancia/trash-cli
(P.S. I know OP might not have actually deleted the files with ‘rm’, but this addresses a broadly similar issue.)