Ruby has it as well:
a ||= b
# which means
a = a || b
# wich is the same as
a = b if !a
# which rubyists like to write as
a = b unless a
# or as ternary
a = a ? a : b
Just a small frog hopping from post to post. Because it may be Wednesday my Dudes!
Sometimes in German, sometimes in English.
Ruby has it as well:
a ||= b
# which means
a = a || b
# wich is the same as
a = b if !a
# which rubyists like to write as
a = b unless a
# or as ternary
a = a ? a : b
Everyone makes errors, but not everyone reflects and learns from them. I feel like that the Ubuntu team(?) did the right thing here.
I see, yeah that is a difficult one
On my Android phone I just have to press any volume button (up or down) so it gets silent but the call is not declined
I mean a bow kind of sits in top of your shirt. So it should be
<°√}
\ \
\ \
\ \
{ = }
/\ /\
TL;DR do not use ==
FYI bandcamp was acquired by Epic and subsequently sold to Songtrader 2023
Not sure about the situation in Norway, but Switzerland has a quite right-conservative government and is also expanding their surveillance , e.g. Proton freezes Swiss investment over surveillance fears
Oh boy do I have bad news for you:
It is not exactly the situation you mentioned, but I think it is at least highly related?
Yes, clickbait. It is more like the opposite to me: Linus mitigates chaos before it ensues. Which is an absolute reasonable pro-gamer move in my eyes and speaks of good (time) management.
I mean, if men would have to carry the baby for nearly 10 months within their own body and after giving birth having to do all the care work like lots of women had and have to do, they would be baby killers more often as well.
I used symlinks with windows in like… 2007?
This noob even forgot zero
Not really an answer to your question, but worth a read to widen your horizon: It’s a huge problem that most health apps are created by men — here’s how to fix that
There is also a list on wikipedia
I get where you come from and my first thought was similar. But keep in mind: hurting or even killing someone else is not like simply stealing the Amazon packages from your MAGA neighbour’s front door to annoy them.
Acting violent against someone else will have consequences for your own life. It does not matter if you where morally right to do so, even when you where simply fighting for your life. You will feel shame and regrets because you are an empathic human being. You will think about this act every time your mind wanders off.
I don’t care about about the attackers well-being, do not get me wrong. I care about your well-being.
We must stop these thugs before they can go after marginalised groups. Anything else is just pyrrhic victory.
The for the link!
My head makes the bible verse sound like singing because I listened to SITD’s so much
Where is this from? I know these lines from a German band called SITD: Richtfest starting at minute 3:00
This is basically one of the core ideas of Ruby: that you can read it like a story. Once you are used to reading it as “do X unless Y”, you will miss it in other languages. Note that I wrote Y, not Y is true. Because often Y is a statement that has meaning in itself.
Example:
# imagine that given_name is some text from user input # this is of course valid: user.name = given_name if !user.is_locked # but this reads more fluently: user.name = given_name unless user.is_locked
Ruby also allows using
?
as last character in method names, which is a convention for methods that return eithertrue
orfalse
.Same goes for
!
(the bang operator), that is commonly used to tell developers that there exists a non-bang version of the same method as well. The bang method is often the more strict version (e.g. raises an error instead of returningnil
; or having side effects compared to the non-bang version).So the above example may be more commonly written like this:
user.name = given_name unless user.locked?
and the question mark makes you automatically adding is or has while reading: Set the user’s name to the given_name unless the user is locked
Of course this is all by convention and you may also do it different. But that’s how most Ruby code is written.
To stay consistent, lots of projects use RuboCop, which warns you on inconsistency based on your project’s settings.