Can we get a /g/ humor thread again?
>>53774890
That's pretty painful but that quick inverse square root is neat as fuck.
>>53774890
I do hate when turbo autismos have no comments in their code
>>53775347
The only thing I would have added there is a comment that would either explain its rationale or reference to a place that will.
>>53775037
my favorite part is that you can see the camera tripod in the mirror and know he has no friend to take the picture
>>53774890
genius
>>53775649
Kek'd
Where's the input in her code btw? It isn't a function either.
>>53775342
unfortunately true.
>>53775649
I love going through my really old Java code from when I first started.
>>53775424
mind blown
>>53774890
>an int is a number without a decimal!
>!
>>53775929
looks like JS in the global scope when 99% of the language's value derives from writing programs as IIFEs
she could be declaring the vars in an HTML document, calling the JS there, and reloading the page
>>53775342
Wouldn't something like
(i % 2 == 0)
be perfect?
Fuck, I know the % operator is in C# too.
>>53776313
Yes that's the point + that's how the set of odd and even integers is defined
>>53776339
Yeah, just gets me p r o p e r triggered lad.
>>53776275
Steve would kill himself if he saw this. I'm an apple fanboy but good god what the fuck.
Though I could tolerate the case, I will say that.
>>53776245
So she thinks she's a 'coder' because she knows html? Kek what a failure, only thing she's got going is that she isn't ugly.
>>53776313
The whole joke is that there are CS grads that don't know what modulus is. I can attest to this, saw it first hand when I interviewed newly graduated CS students for a simple junior dev job.
Mildly tech related
>>53774865
Wait, what?def concatenate_strings(string1,string2)
"#{string1} #{string2}"
end
>>53776275
How are you meant to use that mouse when it's charging?
>>53775319
It's not actually as much sorcery as it seems. The Wikipedia page explains it really well.
>>53774890
>multiple exits
>>53776451
I would blame the school on that one.
>>53776777
Who else anticipating that 6 turning into a 7
>>53777777
>>53776831
Chexkem
>>53775342
what is 102 then????
>>53776777
And?
>>53776313
No, % 2 is way more expensive than & 1
>>53777723
Your number is odd!
>>53776472
you're not
>>53776455
Holy shit that's funny
>>53776060
>tfw my highschool CS teacher would code like this
>>53776455
kek'd
>>53778209
>% 2 is way more expensive than & 1
Stop
>>53778209
This. Learn bitwise manipulation or gtfo.
>>53774865
>>53778609
The inline attributes over CSS get a bigger response from me than the double table tags.
>>53774890
this has to be a well aware parody, there's no way in hell...
>>53778854
>>53776060
never coded a gui before... what would be a better way than this?
>>53778878
>>53778889
>>53778845
But you've already been proven wrong. Not that you shouldn't still learn bitwise manipulation
>>53778910
>>53778839
are you retarded?
>>53778910
Wow, that's hot
>>53778927
>>53778927
fuck off reddit
>>53778927
>>53778949
Are you? High level constructs that compile to the exact same set of instructions cannot be "more expensive" than each other.
>>53778947
>>53778839
what powerline theme are you using?
>>53778974
>what is a compiler optimization
>>53778975
>>53778983
It's lightline with the wombat colorscheme
>>53778962
>>53778996
It's the reason why you're wrong.
>>53779015
>>53775649
>>53778881
I was also curious, so I looked into it.
I went through the photos on her twitter all the way back to when the photo was supposedly posted, and didn't see it. So unless she deleted it, it's fake. I hope to god
>>53778998
>>53779002
thanks i currently use Airline with wombat modified to grab my Xresources colors.
>>53779017
So your point is that no matter how smart my compiler is, I should never use the best method on my own?
>>53779052
somebody that can code cannot seriously make the comparison between those two functions. and who the fuck would comment what the fuck is an int
>>53779054
>>53778839
What are you using to be able to see the assembly of c code? That looks insanely useful
>>53779060
My point is the world runs on reality, and not on your imagination.
Those two snippets do exactly the same thing down to the last instruction. i don't know how you can possibly claim one of them is "more expensive" than the other. Did you just make up an inefficient implementation for %2 and an efficient one for &1? There's no modulo instruction in any common architecture, so your claim of efficiency is based entirely on false assumptions of implementation.
>>53779102
gcc -S
>>53779102
There's a gcc option to compile to machine code.
>>53774992
it missed the one on the bike though
>>53779083
>>53774890
Is that satire?
Left: one of the most famous optimizations ever.
Right: an incorrect, overcomplicated, unnecessarily commented version of "max" (which I'm going to guess was in the standard library anyway)
>>53779147
>>53775424
Somehow after all these years, I never noticed.
>>53778975
>>53778998
evry tim
I like this one
>>53779165
>>53779177
No but there's an operator she could have used
>>53779115
>Those two snippets do exactly the same thing down to the last instruction
The compiler knows that both do the same and it uses the best instructions in both different cases.
Completely trusting in compiler optimization is stupid.
>There's no modulo instruction in any common architecture
lel
>>53778998
Soon
https://wiki.mozilla.org/WebAPI/WebUSB
>>53776303
Tesla is open source.
>>53779179
>>53779193
Good too
RESCUE TAY
>>53779197
>>53776777
>>53777871
pretty much this to be honest family
there's plenty of causes where multiple exits is just fine
Guardif (!condition) return false;
In loopsfor v in array:
if (v.id == searchId) return v;
return false;
Why are you so salty over your meme education?
>>53779060
The point is that literally any compiler will do that. x86 (or pretty much any ISA I know) does not even have a modulo instruction, so the person writing the compiler has to think about how he will implement modulo. Why would he choose a slower implementation?
>>53779228
>>53779253
>>53774890
Too bad, the left side is stripped of comments.
My sides will be in orbit if she posted the original one.
>>53778609
>code
It's a fucking MARKUP language. My God, how the fuck do women screw this up???
>>53779271
>>53776275
>>53778962
Shit son, they know how to monetize stuff that idiots pay for everyday on FB
>>53779209
>The compiler knows that both do the same and it uses the best instructions in both different cases
Which is why they are both exactly the same "expense"
>Completely trusting in compiler optimization is stupid
Continuing to insist on something provably false is more stupid.
I think the problem you're having is that you're confusing the specific snippets of code in question with general implementations of modulo and bitwise and. I should remind you that the original claim was "% 2 is way more expensive than & 1" which is flat out false, and the only statement under scrutiny here.
>>53779238
That is not the point. A full implementation of the modulo operator that works on any input will in fact be much less efficient than a full bitwise and. That is not what the discussion is about, but rather very specifically modulo 2 versus bitwise and 1
>>53779215
>>53779290
holy shit
>>53779290
>>53779312
>>53777871int max(int a, int b)
{
return (a > b ? a : b);
}
>>53779234
>>53779336
What if they're equal? Better double that ternary.
>>53779351
If they are equal it doesn't matter if you return a or b.
>>53779351
>>53779330
1.44 MB of porn on that bad boy?
>>53779321
>>53779351
>What if they're equal?
Then it doesn't matter which one you output. They're the same.
Seriously.
>>53779330
>>53779357
But what if I want a?
>>53779367
>>53779371
>>53779351
Obviously you should return 5 if they are equal.
>>53774865
>actually typing out cd, pwd, and ls
>not using 1 letter aliases
REEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
>>53779386
Dilbert is great huh?
>>53779397
Don't forget to check whether a>b AND b<a though. You can never be sure enough with computers these days.
>>53779407
>not having a shell that automatically cd's into directories you type alone
>not having the cwd in your prompt
>>53775424
Isn't that on the bottom right a leg?
>>53776245
jesus christ i laughed too hard at this
>>53779407
That's stupid. You'll probably waste more time in the few times someone else has to use your terminal than you'll ever save.
>>53779408
>>53779415
>>53779444
>>53779420
Thread-safe version: a>b && b<a && a>b && b<a
>>53779454
>>53779449
>>53779449
>getting laid once or twice a year
If only
>>53779464
That's not thread-safe, though.
>>53779474
this makes me so fucking mad for some reason
why are you projecting your stupidity onto computers? why are you so fucking stupid?
>>53779481
I know, it was a bad joke.
>>53774890
more like CRINGE THREAD
>>53779495
>>53779460
>tfw you'll never be able to prank call clueless AOL customers in the 90s and talk them into erasing their own hard drives
https://www.youtube.com/watch?v=pOEeA_mdpUM
>>53779547
Could you make that pic a bit smaller?
>>53779547
>>53778559
I literally fell of my chair laughing
>>53779566
It came that way : (
>>53776464
jesus christ the gold never stops coming from this image
>>53779397
>lol like you are so random tee hee!
>>53778998
Being tortured at gitmo is literally better than writing drivers in Javascript
>>53774865
>super long prompt
>doesn't end with a newline
>>53774865
Did i do it right?
>>53779560
>>53774992
And the one getting graduated, I guess gorillas graduating and riding bikes literally does not compute.
>>53779475
I feel your struggle m8
>>53775649
this hurts me physically
>>53779639
Kek
>>53779498
your post is the biggest joke in this whole thread
>>53779460
>>53774890
that's gotta be a joke, no way someone is THAT stupid
>>53774890
>airplane software
This can't be real
>>53779714
She's a girl.
>>53779701
>>53779330
>>53779364
this thread gave me cancer
>>53779813
i gave ur mum cancer last nite :^)))
>>53779758
>use https
>problem solved
unless it blocks https
>>53779495
I've had to do this to a PS3 with a heat gun before. Fucking FTC banning lead solder.
>>53779547
what movie is this from? the anTimatrix? lolloollolollolo
>>53779844
Don't you mean ANSI-matrix?
>>53778854
holy shit
>>53779289
Markup languages used to be called code.
Code used to be called programs.
>>53778927
remind me when you have to enable himem on DOS to use RAM
>>53779234
>moves the connector a bit
>every freaking wire touching each other
>fuckedupmyhdd.jpg
>>53779560
>you'll never be able to prank call clueless customers
just try it, shits still the same, post results
>>53779179
>>53779290
I don't get it? Please explain?
>>53779537
https://archlinuxarm.org/
I wouldn't have corrected you if you were being entertaining.
>>53778839
>>53779115
>>53779118
God I love gcc, it's kind of a mess in implementation but it feels great not to have to bother optimizing code.
>>53780602
Time to learn bash bro
>>53778889
Why the fuck do you link your pictures. Stop doing that all you fags. It's fucking annoying. Nobody gives a fuck that it's ALL you,special little snowflake.
>contributing
>>53774865
>bai5 antioxidant infusions
shit looks hipster as fuck but it's actually really tasty, better than most other fruit juices
>>53779469
Please.
>>53774865
>>53774890
Congrats, legitimately mad.
>>53779015
>the dracula
>>53779312
What is it actually?
>>53775037
post the picture, you know which one
>>53779367
>>53778209
>>53778845
I want retards to leave /g/
>>53779386
Those where the times
>>53780602
It loops through the numbers all at once - for each number X it sleeps X seconds and then prints X.
Because it loops through all of the numbers at once, smaller numbers will sleep fewer seconds than larger numbers, causing them to print first, thereby printing them back out in order.
The output should be correct up until the number of inputs takes 1 second or more to process, at which point it will start to fail.
>>53779442
>someone else has to use your terminal
what dude? thats fucked up
>>53776464
valid way to do it, but actually fucking making a method is retarded, there's more characters in the method signature than the actual implementation lol
>>53775037
post the picture, you know which one
>>53779435
>having a shell
>>53775649
>>53778897
Using the tools that come with your IDE, like visual basic even.
this thread
>>53776472
You don't.
>>53779527
/g/ in a nutshell
>>53779165
SAVAGE
A
V
A
G
E
>>53779083
>>53781030
>dwm.exe isn't a shell
>>53779363
mySIdes = null;
>>53779547
>>53781042
Nice cloud.
>>53779723
Man, if my ex would have done that after she found out I was cheating on her I would have been so pissed.
>>53779701
>not having two PSUs
>>53779015
>the dracula
>>53779739
This, this 100x this
>hurr look at benchmark, nvidia betta
>>53778209
What about negatives? Or floats?
>>53775347
the original function did have comments. however, the only comment on the bizzare magic constant is "what the fuck?" which is not very useful
>>53774890
max(1,1) -> 5
>>53774865
new memes, just happened today
>>53776245
lmao man people can be so silly
>>53774865
>>53776060
This is part of a Monty Hall program I wrote back in the day
>>53780980
holy shit
>>53780763
Not him but, you have to wait longer to post the same (empty) message again, even with different picture, so its just easier to click on your own post with its unique number then to wait longer or make up shit.
>>53781221
Would be better if it wasn't a /v/ tier "epin kekz" screencap
>>53780844
>>53781189
>Bernie_Sanders_economic_plan.jpg
>>53781332
And the economic plan of pretty much every president after Nixon.
>>53775037
>>53781127
P E a a
P L E A
P F8 Sa S E
K I L
P F8 Sa S
M E
>>53781380
meme router
>>53781416
meme witnessed
>>53781180
>>53778839
unrelated question but why did you declare the int as volatile?
>>53781425
what am I looking at?
>>53779758
how do you do this?