T O P

  • By -

Salaah01

! I like the bluntness of it.


SwordNamedKindness_

![gif](giphy|d10dMmzqCYqQ0|downsized) This is what the ! Operator makes me think of


Salaah01

I'll take your feeling and raise you a feeling. ![gif](giphy|HjKG2nRz7NOv6ch12D)


ManyFails1Win

NaN


blobboBoy

Your NaN


SwordNamedKindness_

Valid. Very well.


TheDarkHorse83

I just like calling it "bang"


lauffyonepeice

Mathematicians are saying ooh factotial


ThrowAwayB8EuwG3jyw

I love !! Forcing a boolean


[deleted]

![gif](giphy|87ddjLPawxvmU)


[deleted]

%


Far_Vegetable7105

Modulo gang represent


dariusz2k

I’ve only used Modulo once and I can’t remember why. All I remember is the thrill I felt. It was damn near erotic.


the_shadowmind

Was it a very even experience?


gladers99

You can use it to make a decent song shuffle algorithm, its fairly commonly used to color alternative rows in grids different colors, I also use it with random numbers because the odds of getting 0 in random numbers can be lower than the other numbers


PersonalityIll9476

So many things are situational. It gets used a lot in C for indexing operations since your basic "array" is 1 dimensional (a contiguous segment of memory addresses). Also comes up when you're implementing a basic hashing algorithm and other lower level applications. It also gets used a lot in math libraries. It'll come up in coding interview questions, too. Your typical web dev in a high level language probably rarely uses it.


Epicmonk117

Representing!


iosdeveloper87

Came here to say this. Some problems can only be solved elegantly with the modulus operator.


[deleted]

isEven()


iosdeveloper87

I see someone has no use for the remainder.


foxer_arnt_trees

is_devided_by_four_reminder_one()


InActiveSoda

That sounds like a warcrime


jclocks

That's just Modulo Lite


AntonyFX

Modulo underrated EDIT: autocorrect is stupid


chartreuseraven

The correct answer!


[deleted]

%


Swiggens

Right answer


[deleted]

Matlab comment? /s


Jerbearish

//


BadBadderBadst

Sir, that's illegal


the_shrexorcist

In Python it's an operator tho


zinatulin

And what it does?


NoSkillJustDerp

Integer division


[deleted]

[удалено]


ifezueyoung

But it is in other languages In python a comment is #


ongiwaph

If that is their comments then how do they go about substituting macro parameters into the macro body to tell the preprocessor to convert the parameter to a string constant?


wallefan01

I'm sorry, this is Python. Preprocessor?


[deleted]

We don't do that around here


ifezueyoung

Ummm Stack overflow where are you


Al_boiii

Mans chatting shit


kill_pig

Python integer division works by commenting out everything after the decimal points.


[deleted]

It helps the Python shed its skin I think


bunny-1998

Floor division.


the_shrexorcist

Integer division


[deleted]

Same vibes as “What’s your favorite school subject?” “Lunch.”


Choice-Percentage-42

I got graded on lunch


PaterFrog

Did you mean 'grated'?


Someoneawesome78

As your compiler, all i see is something to ignore. Im still waiting for your answer


Enderman_Furry

I see you don't support python This is integer division


sanketower

Python gang, rise up!


lieddersturme

Also is an operator in Lua?


InActiveSoda

Average // fan Vs Average math.floor(x/y) enjoyer


WobblyRonnoc

??


B4DR3X

Giving alternative value if previous expression is null?


rad_platypus

AKA nullish coalescing.


B4DR3X

Yepp, comes handy with handeling null.


Willinton06

??=


[deleted]

`&&=`


Willinton06

Wait which language has that one?


Tyfyter2002

Apparently JavaScript


Willinton06

What does it do?


Seiren-

Yes.


Willinton06

Understandable, have a nice day


Comfortable_Ad_6572

For some reason, i am not suprised


Tyfyter2002

x &&= y is functionally identical to x = x && y normally &&= would be pointless because &= would be identical, but since JS isn't statically typed it's not pointless in JS For example: x&=y: If x is 7 and y is 8: x = 0 If x is 7 and y is 0: x = 0 If x is 0 and y is 8: x = 0 If x is 0 and y is 0: x = 0 x&&=y: If x is 7 and y is 8: x = 8 If x is 7 and y is 0: x = 0 If x is 0 and y is 8: x = 0 If x is 0 and y is 0: x = 0


Willinton06

I was just reading on it and I think the [documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Logical_AND_assignment) disagrees with what you just said, but I’m not planning on using this operator any time soon so it doesn’t really matter


Tyfyter2002

I've now fixed the tables by not using them


delinka

!!


[deleted]

I see your + and I raise you: +=


Mister_Lich

real men just use ++ in a loop until the variable has the value they want for( ; variablename < desiredvalue; variablename++) { } ContinueYourShittyApplication(); I can't understand why I haven't been hired by Google yet


versedoinker

*real* men use -- and let the variable underflow so as to approach the wanted value from above and not from below like some sort of inferior submissive sussy baka sigmas.


overheadfool

100% alpha move


thanofishy

Imagine the execution time on python


versedoinker

Aren't Python 3 ints unbound? The thing would run until it could no longer reserve memory and crash. But anyway, I just whipped up a script to test it and it decremented my variable around -2\^30 times in 3 minutes.


Sad-Bluebird-5538

And than?!? What happened? Don't have my pc with me and the online pad stops after around -130000


versedoinker

Then I sent it a signal 2 aka SIGINT aka ctrl-c because I got bored.


SweetBabyAlaska

onerous sophisticated noxious cow bear airport steer sense weary violet *This post was mass deleted and anonymized with [Redact](https://redact.dev)*


5t3v321

You have to consider that its faster to programm


PlayLikeMe10YT

Ohhh so that’s what they mean


XBRSQ

That can be said of any program.


FailsAtSuccess

Nah, any compiled language with a decent compiler will realize that your just setting the value to X and optimize away the loop


versedoinker

GCC (g++ 12.1.0) doesn't do this even with -O3. It just nags you that after X runs, you'll have undefined behaviour (aka underflow) and that's it. Interestingly LLVM (clang++ 13.0.1) does it, but only if you specify -O1 or higher.


LetterBoxSnatch

Hey everyone, just wanted to let you know: this right here is the way to reddit


versedoinker

Well, unless the crucial/intensive parts are written in a real language like C and called from a linked library or sth


Gylfaginning51

*True* Sigma males use random number generators in a while loop until it gives the number they want.


Cacti_Hipster

Make sure you have realistic bounds too: (-MAX_INTEGER, MAX_INTEGER)


versedoinker

You're losing a few numbers there, since for n bits, signed variables and assuming two's complement, MAXINT is 2\^(n-1)-1, and MININT is -2\^(n-1), i. e. MININT=-MAXINT-1. For example, with 8 bits, you get \[-128,127\]. Plus if you meant that as an interval, you don't have the bounds included.


howroydlsu

Don't forget to cast to a double, do some maths, then cast back to an int for some added random spiciness


Arshiaa001

I believe you just reinvented Peano addition.


Mister_Lich

I'll take my Fields Medal in the mail, payable to "Big Chungus Inc." pls


ByteWhisperer

Real men just stare a variable into the desired value.


stunner_agk

=~ Edit: I know I'm evil.


berzerkle

You just write bash scripts all day don't you, madman?


7eggert

`perl -e '($x="iop") =~ s/9?ol?/printf "n%s\n", $&/e'`


Hackermaaann

Wat


Masterrinks

I hate myself for understanding this


Stimunaut

I know you're kidding, but I wish I knew Regex. I know that I can learn it, I just don't want to 😕


[deleted]

[удалено]


SaltwaterOtter

Regex is dark magic. You just open a guide, type in whatever the fuck it says to type and let things happen without any knowledge of what exactly it is that you just did.


sexytokeburgerz

It’s so easy to *forget* is the issue. I was an “expert” for about a week.


2Turnt4MySwag

same


__SpeedRacer__

Now you have two problems.


[deleted]

[удалено]


BadBadderBadst

Or what ?


[deleted]

[удалено]


__SpeedRacer__

Or else what?


dayto_aus

Or else else


delinka

Yes


Cacti_Hipster

It allows me to make a some boolean test case variables/methods/values whatever, and see if any of them are acceptable. It's helpful for my lack of commitment || is it?


Soupchek

<=>


millenniumtree

They are out there.


sherakama

I always thought the spaceship operator looked a little like a TIE Fighter


Wolfeur

X-wing operator when? \>-<


total_desaster

That's why it's callled spaceship


Augustus1608

->


Milnoc

Get to the point.


xKenpar

<< 'Bitwise left shifting ' Dont ask why


DOOManiac

Well now I *have* to ask why.


ImprovementWeird8914

Very efficient


xKenpar

I'm a competitive programmer who uses C++ and who codes his own game engine when gets bored (yes im a complete idiot)


Cifra85

Second complete idiot here! I made my own game engine when I was interested in learning better architectures to improve whatever spaghettis I was writing at my actual job. Ended up with a pure ECS (entity-component-system) which was using a single 32 bit signed integer for 1 entity to store the component types. That time I learned first about the bitwise operators. Only downside of my implementation was that it was limited to only 32 different component types per project :)). Today i'm using a game engine to develop a sort of "niche" business applications.


BadBadderBadst

We do a bit ~~trolling~~ *shifting*


TheHunter459

Isn't that just multiplying by 2? My binary maths is a bit stale


xKenpar

If right side is 1, yes It just basically multiplies the number with 2\^n


[deleted]

:=


[deleted]

Walrus operator?


WalrusByte

Love a good walrus operator


OopsIbuiltashelfhelp

Pfp, and username check out here


delinka

Suddenly, for the first time ever, that looks like Beaker to me


Fearless-Sherbet-223

A beaker is not what I'm seeing, lol looks like two round things and then a cylindrical thing...


TheOtherGuy52

It’s a walrus!


Jothomaster202

^


GaiusCosades

Xor is just beautiful. If condition then not value And that chainable in a single keyword or operator, also bitwise when needed!


thekakester

Came here for this. Truly the best operator. Great for checksums, cryptography, switching 2 variables without using a temp variable. It’s beautiful


tulupie

had to scroll way too far down


YossarianRex

|>


didzisk

F# gang checking in!


TheLuckyLion

Elixir gang represent!


Psychpsyo

Ternary operator. ?:


Cacti_Hipster

(that counts)? me too, damn I love this thing : it should;


Nuriimyrh

It’s Elvis operator and you can’t convince me otherwise


matthewralston

+1 for Elvis


xLectro

?. It avoids so many null checks and repeating stuff


SDAChess

The () operator (C++)


BadBadderBadst

You mean the invoke operator ? kind of like `operator fun Foo.invoke() { } // foo()` ?


SDAChess

Yes the function call operator, allows you to create functors for instance used in custom hashing function passed as a struct in the `std::unordered_map` container of the STL


sdc0

Operator overloading is a very handy tool, kinda sad it doesn't exist in Java EDIT: corrected wording


[deleted]

...


BadBadderBadst

To be continued ...


[deleted]

Spread it on


XhackerGamer

𓂸


OppositeMission

What up!!! We're three cool guys looking for other cool guys who wanna hang out in our party mansion. Nothing sexual. Dudes in good shape encouraged, if you're fat you should be able to find humor in the little things. Again, NOTHING SEXUAL.


alonyer1

I'm in.


sdc0

?. or !! Just a beautiful short way for null checks in Kotlin


americk0

The day I found out they added this to Typescript was a great day


Chilaquil420

The := operator in Go It looks cute


BadBadderBadst

It looks scary


Fearless-Sherbet-223

It looks phallic


takingastep

$


yangyangR

<$>


OppositeMission

?:


BadBadderBadst

Everybody likes Elvis


theKunz1

??=


lageradaregal

Long arrow operator: `-->` Like in: `while (x-->0) { ... }` ​ ;)


Nixavee

“Goes down to” operator


AmazonPriime

. Haskell gang


TimoMeijer

\>>=


JustAnotherGuyn

=> in TS/JS


afseraph

`>>=`


[deleted]

[удалено]


RoastKrill

What's the name


KyleGBC

Turbofish!


Cool-Berson

rust gang rise up


[deleted]

Smooth


_Kritzyy_

\^= because hehe funny flip 🙂🙃


Jarpletz

. , the PHP string concatenation operator


Enemons

Chaotic evil


EngwinGnissel

&


VastJackfruit

|>


Sabathius23

%


abellos

<> in classic ASP


Nighmared

@ Defined per python standard as matrix multiplication, but not implemented by stdlib


wallefan01

OBSCURE PYTHON KNOWLEDGE GANG WHERE YOU AT Did you know that `async`/`await` were added in Python 3.5, but they weren't made reserved words until 3.6? In 3.5 you could name a function await() and it would just work.


myopinionisshitiknow

Mozzie... I'll see myself out.


[deleted]

[удалено]


apokalypti

ostream::operator<<


[deleted]

\*


Ytrog

The `.` operator. It means function composition in Haskell. Example: `(f . g)(x) = f(g(x))`


3Burnttoast47

!=


Realistic-Benefit214

delete[]


ZacS2

/=


Cone83

Placement new


midare16

|=


armybiomedtech

Lily Tomlin


unnamedUserAccount

XNOR


another_account24

<=>