/g/ humor thread
>>106660710i can't tell if he's just trolling us or he's really a dumb jeet
WOULD IT HURT TO USE YOUR FUCKING BRAIN (AND THE CATALOG) FOR A SINGLE SECOND?>>106660672
jeets smell even thru pictures
>>106660710
>>106661594
>>106661230why not both
>>106661596
>>106661594Yeah it's not googling if it's looking up an ancient book, expensive med app, or old lecture notes.. totally not the same thing.
>>106661938Back in the days of yore, youngling, masters of their craft were expected to have much knowledge memorized and - more importantly - understand the fundamental principles and interactions. The problem is not googling for information, it is trusting that information because you cannot question or analyze it further. In the IT field, it is easy to google a problem, get 4 incompatible answers and just try them until one works. you get that all the time because problem descriptions are similar, behavior changes over versions or implementations, solutions were not verified, etc.Troubleshooting humans is a bit more tricky.
>The stories and information found here are artistic works of fiction and falsehood.>Only a fool would take anything found here as fact.We got another one!
>>106660710I mean it wouldnt stop them ever since trump's entire thing won't actually charge any company as long as they suck up to commander spraytanned beef jerky
>>106660710Can /g/ even ever win?
>>106660710How else would you even write that function?
>>106663008>How else would you even write that function?
>>106661230>or he's really a dumb jeetWould be funny but even as a retarded nocoder I know about the meme
>>106663008Whatever your language's local variation of "Return (Number Mod 2 = 0)" is.
>>106662705this ain't /b/
>>106663076for me, it'sreturn (num & 1)
return (num & 1)
>>106663008>>106663032>>106663076>>106663269Why would you make it a function?Parity and bit checks are one of those dumb things that have no excuse ever to make a call even on dumb compilers or the most ancient platforms.I would say that#define IsOdd(num) ((num) & 1)is the way(the parentheses are very important and not redundant btw. Im tired of tards repeating that and then crying when they throw in nasty expressions with lower precedence operators into the macro) but even that is more verbose compared to just doing (1&num) everywhere and preprocessing is costly.>inb4 an expression is a function too, and more pure than general C functionsYou know what I mean faggot
>>106663410not wrong. but you shouldn't even need to call a function or macro just for this one simple check.
just import it with npm duh
>>106663410>#define IsOdd(num) ((num) & 1)but we want IsEven()
>>106663648!IsOdd()
Is anyone else a bit mystified by the fact that we were taught division with remainders in second grade, then the concept disappeared for 10 years, and returned as a mission critical concept for the organisation and delivery of all information?
>>106663052you may not like it but this is the canonically correct way to do it.
>>106660710Based troll
>>106663750
>>106663801thismost compilers generate jump tables up to a certain number to check for even even if you do x & 1 gcc I think goes up to int limit
x & 1
>>106663750true its weird, all i learned in hs was calculus and functions then in compsci im suddenly reminded by remainder division and need to become a pro at it in order to convert from any base to another
>>106664223no way
>>106663008if(x == 0) { return true;} else { return isEven(x-1) == false;}
>>106663410>Why would you make it a function?To make your code readable Pajeet.
>>106664302>needs a wrapper for x % 2post handand if youre whitebig corpo is 100% justified in hiring jeetsits the same fucking shit only cheaper
>>106664223I do x%1Why would you do & when you can do modulus?
>>106664330I think bitwise executes faster, but unless you're doing a modulo on 100k ints, I don't think the difference would even be detectable.