« first day (1612 days earlier)      last day (3327 days later) » 

12:00 AM
can't they include those things later on ?
 
not really
 
What's a good VPS provider?
 
@Rapptz my school
@DemCodeLines are you still trying to figure out the optimal way to multiply by 21?
 
x * 21
 
(((x << 2) + x) << 2) + x
that should work
that's g++ with no flags. clang++ prefers to just multiply by 0x15 :)
 
12:08 AM
@androidplusios.design Some things can be added on later, but exceptions generally pervade how you write code, so if you're going to have them, you want them there early (before you've written much production code). Much of the Google style guide (for one example) basically comes down to: "Our code isn't exception safe. Here's the hoops we jump through to keep that problem from killing us."
 
user1804599
argh stupid PHP with its explicit captures
 
@Rapptz DigitalOcean
 
@JerryCoffin Also "We can't be bothered to train our programmers" and "We write shit code to be consistent with old shit code; who needs improvement?"
 
Is there someone who does the opposite of what Uncle Bob does?
 
Uncle Bob?
 
12:11 AM
Robert Cecil
 
@Blob yes :(
 
7 mins ago, by Blob
(((x << 2) + x) << 2) + x
but why would you write this? who knows
 
13
Q: How do you raise an intelligent and happy daughter in a sexist world?

AnnaFirstly, apologies for my English. It is my third language. I don't have enough space to explain my reasoning. I just don't want my daughter to be influenced by the media or the general opinions of "society". My daughter is a baby in my womb. I've decided no TV ever, no movies, no pop music...

4
 
sup
 
12:16 AM
The actual question is, "what shift direction and number of one-bit shifts will divide an unsigned value by 8"
 
what shift direction and number of one-bit shifts will divide an unsigned value by 8
 
@DemCodeLines divide by 8? that's 2^3. (x >> 3)
i'm disregarding the first part of your sentence because i don't understand it
 
Which direction is it shifted
 
Guess
Or better yet, do some research of your own
 
12:19 AM
Right?
 
yes
@Pris this is fucked up
 
The problem is not the direction, but the "number of one-bit shifts" part
 
@DemCodeLines 3 of them
((x >> 1) >> 1) >> 1)
 
this is now my goto drink to relax with
A gin and tonic is a highball cocktail made with gin and tonic water poured over ice. It is usually garnished with a slice or wedge of lime. The amount of gin varies according to taste. Suggested ratios of gin to tonic are 1:1, 1:2, 1:3, and 2:3. In some countries, gin and tonic is marketed pre-mixed in single-serving cans. In the United States, most bars "use soda out of a gun that in no way, shape or form resembles quinine water", according to bartender Dale DeGroff. To get a real gin and tonic, DeGroff recommends specifying bottled tonic. Alternatively, one can add tonic syrup to soda water...
 
Sorry for this stupid question, but what does 1 in ((x >> 1) >> 1) >> 1) mean or how does it relate?
 
12:23 AM
@DemCodeLines you have a variable "x". you shift it right three times
no one kicked me for coming back. it's almost 9. urghhh
 
So kind of like third root of 8?
 
@Puppy To train their programmers, they'd first have to learn something themselves...
 
root?
where did that come from?
 
How do I get better at this programming stuff?
 
You divide by 2. Then you divide by 2 again. Then you divide by 2 yet again.
@Jefffrey read Cinch's tutorials
 
12:25 AM
Never mind. I just want to understand it, so I can actually do the other problems by myself.
 
lol
 
@DemCodeLines if you actually bitshift instead of multiplying in real code
someone will murder you
there is absolutely no benefit, but it has the disadvantage of being unreadable.
 
@CatPlusPlus lol
 
lol what
 
@DemCodeLines What problem are you facing?
 
12:28 AM
Reminds me of something
don't know what though.
@Pris lmao
Good laugh. Thanks.
 
@Rapptz laugh? i'm horrified
 
@Blob A great deal here depends on what you're really doing. There are times/places (e.g., hashing algorithms) where code that's defined in terms of bit-shifting should damned well be left that way, and converting it to use multiplication/division would be obfuscation.
 
@JerryCoffin for some reason, i doubt he's in that position.
it looks like he's just trying to microoptimize
 
@AlexM. WHATS UP
 
ayyyyyy nooble
 
12:33 AM
ayyyyyy Alex
 
@AlexM. is back?
 
I got caught up with ESL and all that
and forgot to drop by for like 4 days
 
ESL?
 
the CS GO tournament at Katowice
 
Oh.
 
12:34 AM
here i was thinking "English as a Second Language"
 
^
If I had money, I would get CS:GO
Sadly, I have no money.
 
my friend shares his steam library with me, but cs:go won't let me play multiplayer
i can only play against bots
 
@Blob Could be--but I think even that, while useless, has far less negative influence than you seem to believe. Anybody who has even the slightest difficulty understanding that x<<3 is the same as x * 8 is simply incompetent.
 
Woah what.
x<<3 is x * 8?
 
@JerryCoffin true, but it has the potential to be obfuscated. it's not obvious that (((x << 2) + x) << 2) + x is x*21
you need to do (4x+x)*4+x
which no one wants to do
 
12:40 AM
Oh I get it.
Bitshift 3.
And then 2^3
Is 8
I think...
 
@Nooble @JerryCoffin called you incompetent
 
:(
 
@Nooble No
 
@Blob No, if you want x*21, just leave it as x*21.
 
Unless assuming x is an unsigned integer
 
12:43 AM
Well yeah.
 
23 hours ago, by DemCodeLines
What is the shortest sequence of shift, add, and subtract operations applied to x that will produce 21 times x?
 
I'll take dumb questions for 200$ Alex
I should go to sleep maybe
But Monday
Ugh
 
you want Alex dollars?
 
He might be solving some problems
 
@ParkYoung-Bae really?
 
12:45 AM
@AlexM. Yes.
 
Shut up Jerry don't prove me wrong on a Monday morning do you have no decency
 
Ha! It's still sunday night for me.
 
@ParkYoung-Bae None whatsoever!
 
Ok this "just write code and it'll work out" thing is not working out
 
I call some people incompetent, prove others wrong, and worst of all have the unutterable gall to use logic when arguing with my wife.
 
12:47 AM
@Blob Jerry said anybody which refers to a human. I'm not human. I'm not incompetent after all!
 
Jerry has decency - still Sunday night 4 him
 
I should write a spec for myself
 
Dec 5 '12 at 20:48, by Nolwenn Le Guen
@JerryCoffin lalalalala all your flawless logic will not reach my utter stupidity!
 
I don't get why opengl requires all this function loading bullshit
 
@CatPlusPlus I hail your attempt at pissing off the TDD crowd.
 
12:48 AM
lol TDD
 
is there an actual TDD crowd
oh man and I thought the FP crowd was lame
 
What I do has a name?
 
Yes they live in packs in the swamps
 
what's next, AOP crowd?
 
It has a significant crossover with IT crowd
badumtsh
 
12:48 AM
@Pris You should be using a function loading library--like GLEW.
 
@AlexM. I'm not sure if it's a very big crowd, but there are at least a few of them.
 
Why do you argue with stupid people? I will pretend to agree with them while achieving my own goal by exploiting their stupidity
 
3 is a crowd they say
 
@chmod711telkitty I couldn't agree more
 
Kinda looks like almost-B to me though
 
12:49 AM
@Nooble I am but its confusing. How do I know what platforms I need to use it on? And I still don't get why I need to do it at all
 
Because GL ABIs are frozen at 1.x
Except maybe OSX because Apple is not very good at computers
 
@Pris Just call glewInit() and be done with it :)
 
@CatPlusPlus Has anybody who said that actually tried a threesome?
 
Dunno
Should make a study
 
@Nooble I dont think glew even works with open gl es
 
12:51 AM
@Pris Oh your using ES?
 
All these jokes and I forgot what I wanted to say
rip
 
well damn it's 9 and i haven't started
urgh. alt-f4
 
@Nooble I'm using both across different platforms
 
I hate when this happens
Oh, I know
wtb interactive curve editor (as in, math functions, not Bezier)
 
@CatPlusPlus I guess I just dont get it. I don't see other libraries or packages requiring this weird function pointer crap and they seem to work fine even when updated
 
12:55 AM
GL is built around the idea of core API and extensions
 
> built
> A small strongly, statically typed language
Urgh this comma
 
Do you strongly object to it
 
Haha.
 
@CatPlusPlus I, strongly objectify, it.
 
Why did I hear there were guys forced to marry goals but I have never heard one marrying a sheep?
 
1:10 AM
i just had a genius idea
to prevent kids from using facebook, you can give them some name facebook will reject as fake
parenting success
 
@Blob I am doing some problems
 
@Blob But then they'll get bullied.
 
@Nooble as if they're not going to stuyvesant
bullying isn't a thing
probably the same in most of them
 
@Blob good call. 9 years late
 
With how weak today's generation is, they'd start crying and do stupid things if their name was rejected by Facebook lol
 
1:23 AM
all of them. truth
 
Well not everyone...
 
Big words eh.
 
Anyways, Facebook is losing its popularity.
 
@ParkYoung-Bae zing, much appreciate this
 
@DemCodeLines By what metric
@sehe Hi sehe!
 
1:25 AM
How about the number that will divide an unsigned value by 32?
 
@JerryCoffin and, how does that work out :)
 
@DemCodeLines Nah. People is starting to treat it as commodity. It's not the new thing anymore.
 
@DemCodeLines 5
 
But usage still grows.
 
1:26 AM
sigh how?
 
log2(32) = 5
 
I'm actually curious how you got 12.
 
By marketing. Isn't facebook a publicly held company? Growing numbers are a must. Even is usage is on the decline
 
Show your work!
 
how do you make embed a link with <kbd>? /cc @sehe
 
1:27 AM
Yes
 
Wait where did log come into this?
 
I wanna do that <kbd>Live With Coliru</kbd> thing
 
@DemCodeLines The inverse to exponentiation. If each bit represents 0/1 (2 states), then each position represents a power of two (1, 2, 4, 8, 16...). So, a bit shift either multiplies by 2 or divides by 2
 
@Rapptz The only logical thing after you got 11 and you didn't die for a whole year
 
@sehe You mean usage is decelerating, but I think it still is growing because of "third world" countries.
 
1:28 AM
@sehe Not very well at all, to be honest.
 
:22105141
What the...
 
:91278394
 
Why is my keyboard being stupid.
:22105153
 
@DemCodeLines 3 bits to the left: 2*2*2, aka 2³. Would be 8, of course. The inverse is also true. Wanna divide by 8? Shift right log2(8) == 3 bits
 
PEBKAC
 
1:29 AM
@ParkYoung-Bae Ok now it works.
 
@Nooble Else Skynet.
 
:)
 
@JerryCoffin I sympathize.
@Blob Well, go right ahead. Permission granted (you know you can just view source, right)
I think I killed @DemCodeLines with a modicum of math there
 
i'd have to go through your posts ;_; Apparently just doing it normally like you'd expect unexpectedly works
but it doesn't have the pretty blue thing yours does
but that's ok
 
@Blob All of them?! I do this in every freaking post.
 
(Admittedly the last ~3 weeks I've been low on motivation so I treated some posts with the respect they deserved. Or a fair multiple of that)
> answered Apr 28 '11
Coliru didn't exist then
1
A: GIT: revert selected commits since a certain commit, release, then reapply them

seheThe most elegant way is to rebase --interactive Update Since you clarified that this isn't even an option, clearly you have revert and cherry-pick left (like an accounted: no deletions, but 'counter-bookings'). This can get tedious. However, you can use UI's to your advantage. Or you can automa...

Can be done for though ^
 
@Blob Note his use of present tense ("do"), not past tense ("did") (whereas the link is to the distant past).
 
Dat awkward moment when you stumble into a years old post and are dumbfounded to make sense of it... only to realize it was a spectacularly dumb type
 
😅
 
@sehe Thanks--I'm certainly not getting any sympathy around here...
 
1:37 AM
@JerryCoffin lol - oh you meant "here", not "here". I thoght you meant "here". Don't take my "lol" the wrong way!
 
@sehe Haha not quite.
 
@DemCodeLines Oh. That. Please use the reply arrows
 
I just am confused. I was told the answer to "number of one-bit shifts will divide an unsigned value by 8" is 3. And the answer to the same problem but with 32 instead of 8 is 5. I don't understand that.
 
I'm off to see the wizard. Night all
 
Sorry
 
1:40 AM
@sehe No problem at all. Good night.
 
@DemCodeLines Good luck. I've explained it pretty aptly. If you don't understand, there's at least 4 different pointers to googleable concepts. And remember there's SO
@JerryCoffin darn. Another typo lost to time... :(
 
@sehe Good night.
 
I mean there is this:
 
Ok, I'm a sucker. 2*2*2 = 8, 2*2*2*2*2 = 32 (get it?)
`------------------> ^ 3 twos ^ 5 twos`
 
617
Q: Absolute Beginner's Guide to Bit Shifting

John RudyI've been attempting to learn C in my spare time, and other languages (C#, Java, etc.) have the same concept (and often the same operators) ... What I'm wondering is, at a core level, what does bit-shifting (<<, >>, >>>) do, what problems can it help solve, and what gotchas lurk around the bend...

Yes
So there are 5 2's compared to 3 2's?
 
1:43 AM
:D
2*2*2 aka 2³, 2³*2*2 aka 2⁵
 
Alright. What if the number was 10?
 
You're fucked
Bit's don't do tens. (Unless you used BCD, shift four bits!)
 
What do you expect?
What's the factor for a bit position? What are the factors of 33? (3*11... not gonna fly)
 
3,11
Oh
 
1:46 AM
Doh
Indeed.
Really off to bed now
 
Alright thank you!
 
@DemCodeLines Then you do x*8+x*2 (i.e., you find the powers of 2 in the multiplicand).
 
Oh my god I finished the video.
 
@DemCodeLines x*32 + x
 
@Cinch Nice.
 
1:51 AM
Would that be 6?
 
no
You decompose in a sum of powers of 2. 33 = 32 + 1. 27 = 16 + 8 + 2 + 1. etc
 
I did x*32 = 5 + x = 6
 
That makes sense yeah
 
@Nooble It's going to take awhile to upload to YouTube.
 
how long is it?
 
1:56 AM
@CatPlusPlus Here's the thing. When you were learning, people didn't keep mocking you. So stop doing it to others.
 
He was actually really saying your calculation made sense
Why are you bashing him when he's just trying to help?
God
 
It's hard to tell, given a long history of him mocking me everytime I ask something.
 
Given your attitude that shouldn't surprise you
Besides if you interpret everything as a personal attack why would people even want to help
 
I wasn't aware that I came off in that way, so I'm sorry.
 

« first day (1612 days earlier)      last day (3327 days later) »