« first day (1098 days earlier)      last day (3866 days later) » 

5:00 PM
Should I allow Vector<double> + Vector<unsigned> or similar to happen?
 
Vector is a 2D x-y point.
 
Ell
@EtiennedeMartel Reminds me of monty python
 
@Jefffrey how?
 
you know what they say
Jesus Saves, everyone else takes 2d6 damage.
 
5:03 PM
@Pawnguy7 Implicit conversions that exists between unsigned and double.
 
@Jefffrey what might operator+ look like?
 
@ScottW yep one can tell by the way he walks.
 
Xeo
@Jefffrey Fuck implicit conversions.
 
@Pawnguy7 template<class T, class S> operator+?
@Xeo Yeah, you go and enjoy a shitload of static_cast.
 
5:10 PM
Why would you?
 
Do what?
 
Need so many casts?
@ScottW Just exercising free speech.
 
@R.MartinhoFernandes Because a "speed" is represented by an unsigned, a versor is represented by a Vector<float> and a Position is represented by a Vector<double>.
 
@Jefffrey You suck.
 
@R.MartinhoFernandes It would explain a lot of things if it wasn't his code
 
5:12 PM
@Jefffrey Why would you do that to yourself?
 
@R.MartinhoFernandes Do what?
 
1 min ago, by Jefffrey
@R.MartinhoFernandes Because a "speed" is represented by an unsigned, a versor is represented by a Vector<float> and a Position is represented by a Vector<double>.
This.
 
What's wrong?
 
It's arbitrarily stupid and the real problem, not the casts.
 
@Jefffrey All real number in the same physical system should be represented by the same floating-point or arbitrary-precision data type.
it's a complete fucking waste to have positions that can be doulbes if speeds can only be unsigneds
 
Xeo
5:13 PM
@DeadMG But there's the versor!
 
@DeadMG Hmm. The versor can be negative?
 
Xeo
I'm sure that one can do something to the speed.
 
I don't even know what the fuck a versor is.
 
Don't use unsigned to mean "not negative". It doesn't work (well, in a way, it does: it ends up as "non-negative or garbage").
 
5:14 PM
@DeadMG A vector of magnitude 1.
 
right.
 
@DeadMG It's which way the speed is pointing :)
 
Ell
@R.MartinhoFernandes I was about to look for an article explaining why this is the case
 
so what you're saying is, "Instead of using a vector to represent velocity like a sane man, I used a magnitude and versor."
 
Ell
Because idk why it is at the minute
 
Xeo
5:15 PM
@Jefffrey Uh, isn't it a quaternion of magnitude 1?
 
"And I was so stupid, I even made it so that you could never travel at 0.5 per second, in some direction".
"And in addition, I made positions more precise than directions, utterly and completely wasting the extra precision".
 
@DeadMG I presume it's scaled, but even so...
 
in other words, Vector<double> for velocity, Vector<double> for position, problem solved.
 
Xeo
@Ell With unsigned, you can't check if it accidentally became negative. It's just going to be ridiculously huge - but positive.
 
Today I tried = delete to disable a free function overload and it worked :D I didn't know it could be used that way.
 
5:16 PM
Right.
That make sense.
 
Xeo
@StackedCrooked = delete can remove any and all function definitions
 
@R.MartinhoFernandes Isn't that exactly what it means?
 
@DeadMG You are not "right" there, but for the rest yes. I'll use Vector<double> everywhere.
 
#define const =delete
2
Woop
 
@Pawnguy7 It means something like integer with modular arithmetic.
 
5:19 PM
I cannot comprehend what you are saying :\
 
It doesn't prevent you from giving it a negative value. It only makes such cases turn into garbage.
 
-6
Q: C# Tips on hacking

Zain HannahIs there any program that i can code in c# or php or anything to be honest, i want to get information from a friend and for that i need to watch there screen or get there files or passwords to websites? [FACEBOOK] is there a way to do this and then send them the program acting as saying like it's...

 
int y = -17;
unsigned x = y; // whistles
 
@R.MartinhoFernandes doesn't it overflow and be near the max?
Or... underflow? Whatever you call it.
 
@Pawnguy7 And most of the time, that's garbage.
 
5:20 PM
Probably. That is why you don't give it negatives :D
 
Xeo
@Mysticial "i want to get information from a friend [...] or what there saying about me behind my back"
lolz
 
@Pawnguy7 If you're going to that effort, you can just not give negatives to an int.
 
Xeo
Facebook introduces the most fucked up meaning of "friend".
 
Is a negative speed, distance or size less wrong than a unsigned overflow?
 
Xeo
5 mins ago, by Xeo
@Ell With unsigned, you can't check if it accidentally became negative. It's just going to be ridiculously huge - but positive.
 
5:21 PM
Whether you use signed or unsigned you have to make it right.
 
@StackedCrooked Does it matter? Is it more wrong?
 
@Xeo Just check before the operation?
 
Just use int.
@StackedCrooked You cannot check unsigneds for <0.
(Well, you can, but that's always false)
 
I check before the operation.
 
If you have an unsigned number within the max of a signed, it is a safe cast, correct?
 
5:22 PM
Just like I need to check before a/b to prevent division by zero.
 
@StackedCrooked What operation?
 
user1804599
Eh, the assignment.
 
a - b is always preceded by a check or assert that a >=b .
It's become a habit.
 
Why don't you just use ints and keep the same check?
 
If I change to int then I can also check afterwards I guess.
@R.MartinhoFernandes Up until a year ago I was told to use unsigned for something which can conceptually not be negative.
Now it suddenly changed.
 
5:24 PM
It's a broken promise.
It doesn't really bring any benefits.
 
Xeo
It should throw std::broken_promise!
 
And it's very annoying that std library uses unsigned. It constantly leads to compiler warnings.
 
Do character literals evaluate to, say, 200, and the char which stores it overflows (if it is signed)?
 
@StackedCrooked I agree. (And the committee does too)
 
And then I have to static_cast again.
 
5:26 PM
'LoungeWorld - The New Dimension' starring Jefffrey Notprawn.
 
Xeo
@R.MartinhoFernandes Some do, anyways.
 
@StackedCrooked I replace those loops that cause warnings with algorithms :P
(Yet another argument against loops :P)
 
Xeo
Against index-loops, you mean :P
 
@R.MartinhoFernandes And they will slap everybody with a breaking change, which is semantically wrong, but allows for different type of checking and brings undefined overflows. Yay.
 
@Griwes They... won't.
They're just sorry for it.
It's not semantically wrong.
 
5:28 PM
I would prefer an integer wrapper that does the right thing.
 
Didn't Herb and Bjarne say something about changing? I'd have to re-view that part of the questions.
I would prefer direct access to carry flag.
Is there any sane arch without one?
 
Or a ranged_integer which does bound checking.
 
@Griwes I fail to see how that would be useful.
 
...for the same reason why stuff like jc is useful?
 
(Cue example of thing you can implement with it; cue "provide it as builtin" reply)
 
Xeo
5:29 PM
> deleted by Zain Hannah 1 min ago
ahaha
 
Holy shit, dat rep
 
I don't mind. I always use unsigned for loops anyway
 
Xeo
ew, you use (index-)loops
 
@MohammadAliBaydoun It's 222,222 !
 
Yes, yes I do.
 
5:30 PM
I disliked loops before it was cool to do so.
I'm a hipster.
 
What is wrong with loops?
 
Nothing.
 
I'll just leave this here~
 
He's just going to tell you not to remake anything that exists in algorithm
As if those are the only uses of loops.
:|
:(
 
I'll also tell you that "it is not in <algorithm>" is not a good excuse to write poor code.
 
5:33 PM
Since I learned about futures and promises I almost never use condition variables again.
 
So now using loops is poor code?
@ScottW I slept for 2 too.
 
I haven't liked them for years :S (to be clear, we're talking about some specific kinds of loops)
 
@Rapptz Hey, once the masses are reaching the elite's standards then the elites must raise their standards in order to remain elite.
 
@StackedCrooked You're welcome.
 
for (auto&& elem : cont) {} ftw
 
5:37 PM
@R.MartinhoFernandes Would be really handy when creating arbitrary precision integers. Otherwise, pretty much useless.
 
(Unless I actually need the iterators)
 
7 mins ago, by R. Martinho Fernandes
(Cue example of thing you can implement with it; cue "provide it as builtin" reply)
hehe, I totally saw that coming :)
 
@StackedCrooked We've upped our standards. Now, *up yours!
 
@JerryCoffin cool
 
@StackedCrooked That's good! It leads to perpetual improvement of both groups.
 
5:38 PM
@JerryCoffin I think it should probably std::abort instead of throw.
 
@R.MartinhoFernandes Yup -- it's pretty much a one-trick pony. And I'd have a hard time arguing against having an arbitrary precision integer class in the standard library either.
 
I don't care about being elite because I know regular index loops have their uses.
 
In the past the elites promoted for and while over goto.
"two or more, use a for"
 
(And, for the record, I'm not talking about idiotic for(unsigned i = 0; i < container.size(); ++i) )
 
Xeo
Zipping up random-access ranges is a bit nicer with indices, since you only need to compare against one thing after determining the minimum size.
 
5:40 PM
Ah well.
 
@Xeo And then you package it in a function and call it a day.
 
@StackedCrooked I actually had that, once upon a time. This is more flexible though. If you don't handle the exception, you get something pretty close to an abort (except the stack gets unwound first) but if you want to handle the exception to do something else, you can.
 
@StackedCrooked with stride equal 1, no
 
@Rapptz what are you talking about?
 
I'm talking about the room's trend of hating index loops.
 
Ell
5:42 PM
I don't think there is one really
 
@Ell Meh, not the first time I've heard it.
 
I have to use GCC 4.5 at work which doesn't yet have the range-based for loop. It's really painful.
 
@Ell I've been harping about it for years, and since GN2013 others have picked up on it too.
 
Xeo
@R.MartinhoFernandes Sure
 
@Rapptz I think hate is a little strong. It's more a matter of preferring to use other things when appropriate. The strength and weakness of a traditional for loop is its flexibility. You can use it for almost any sort of looping--which means you have to read all of it to have a clue of what's going on. With a ranged-for (for example) it's easy to match the pattern, and know what's going on without reading all the details.
 
Xeo
5:46 PM
Damn my head hurts. I should've bought something to drink yesterday.
 
Wait, what?
 
@StackedCrooked I s'pose if I were being really good about things, I'd let the user supply a template parameter that would determine how it reacted to an out of range value. I've never really needed it though, so I've never bothered.
 
@Xeo super peer-pressure :)
 
@Xeo Usually, my head hurts because I did buy something to drink yesterday.
 
Ell
darn java generics bit me again! Can't do GenericType t = new GenericType(1, 2, 3);
 
Xeo
5:50 PM
@MartinJames When I don't drink anything during the day, I get a headache after work.
 
Erm, yes, you can?
 
user1804599
@MohammadAliBaydoun FTFY
 
Xeo
@R.MartinhoFernandes Non-alcoholic.
 
@Xeo Can't you like go outside and buy something? Or just drink water?
 
Xeo
@R.MartinhoFernandes Lazyness is my arch-nemesis.
 
5:51 PM
Too lazy to drink water?
Dude, that's dangerous.
 
@not-rightfold Say what
 
Xeo
Nah, I just don't don't like tap-water.
 
user1804599
Water is nice.
 
0
A: Combining two uint32 to ulong64 in c++

Federico ChiaravalliHow about memcpy(&var_64, var1_32, sizeof(var1_32)); memcpy(&var_64 + sizeof(var1_32), var1_32, sizeof(var1_32)); Is this what you need?

 
Now I must get ready to buy something to drink today so that my head will hurt tomorrow. I'm serving at beer festival from 20:30 - 21:30. Beer is free during my shift, but outside it I must buy :(
 
5:52 PM
^^ seriously?
 
@Mysticial hehe, the other guy wrote Mystical.
 
@JerryCoffin Yeah, I guess you could use policies. But in the end that always seems overkill.
 
@R.MartinhoFernandes It's a rite of passage into adulthood.
 
5:54 PM
I would have unionised the 64 with a couple of 32's, (if only to annoy those who do not like that trick).
 
@R.MartinhoFernandes lol
 
@Xeo Eat salty soup for breakfast and you'll feel thirsty all day. (Which will make you drink water at work.)
 
@StackedCrooked Two wrongs making a right?
 
It might prevent the headache :)
 
Just drink water.
 
5:57 PM
Two wongs make a right, but only when the Chinese takeaway is closing.
 
@MartinJames Socialist pig!
 
Hmph... snort...
 
I really want a beer right now.
Or two. Or ten.
 
@MartinJames you mean, everyone
@EtiennedeMartel Start with ten
 
Then decrease, I know.
I have a university degree, I know all the beer tricks.
 
6:02 PM
I might as well watch that smash documentary
 
Ell
@MartinJames ub! ub! ub!
 
wub wub wub
 
This is some recent code where I attempted to use a higher abstraction than just bare loops. (Even though there's still a while loop.)
 
@StackedCrooked You had to showoff your slick OS X window style with a screenshot, hmm?
 
I have no choice in the matter :)
Actually I do. I could just takes a screenshot of a screen area.
But yeah, it's fancier like this :D
 
6:14 PM
Or pasted the code.
 
Nah, I don't want people to copy/paste my elite code. They should at least go through the trouble of using OCR.
 
@StackedCrooked well.. the body of your while-loop is.. mad.. long
 
Some asshole ruined Johannes' rep :<
 
Time to leave. See y'all tomorrow.
 
6:19 PM
@refp Yeah, but it's indivisible. Well you could divide into sections and implement those sections as separate functions. But that would be misleading I think, because the functions would have to be called in a certain order, so they are not really independent entities. (I hope that makes sense.)
 
ugh this is SO fucking obnoxious
 
@StackedCrooked utilize a local struct in the function where you define the functions, kinda like an _implementation holder
 
@LightnessRacesinOrbit I know.
 
so that the logic will be easier to follow
 
I'm considering adding the University of Nottingham to my UCAS choice list ;_;
 
6:20 PM
the continues throw one off when skimming through
 
@MohammadAliBaydoun You should :)
Just don't stalk me when you arrive
 
But we'll hang out on the CS department booze cruises
 
@refp I could do that, but would it really be an improvement I wonder..?
 
@StackedCrooked in a sense, with proper naming of the functions, trade of is code complexity
 
6:23 PM
I should make sure my personal statement makes me stand out. Unfortunately, I'm most likely going to fail at that and write something they've seen before a million times~
 
@MohammadAliBaydoun Probably
UoN CS isn't that hard to get into, though. You only need two As and they can be in anything you like
 
Even a secondary IT course? :P
 
user1804599
34 mins ago, by not-rightfold
@MohammadAliBaydoun FTFY
 
@not-rightfold I still don't get it ;_;
 
fixed that for you
 
6:27 PM
I know what the acronym is, I just don't understand its purpose in this context :o
 
Xeo
Well, what could he have "fixed" about litb's rep?
 
Oh. That's what he was referring to. :|
 
BTW, having used VS 2012 now I can safely say it's definitely too ugly to use. I thought all that all-caps everything's-white crap was new in VS 2013?
(Disclaimer: Express all)
 
Ell
Noooo eclipse... don't crash...
 
user1804599
Don’t use Eclipse and it won’t crash. vOv
 
6:39 PM
@LightnessRacesinOrbit No. The all-caps (or at least some of it) is in VS2012, and the everything's-white crap is just a theme you can fix.
 
Xeo
Dark theme ♥
 
yep
 
+ Comic Sans
Just kidding :D
... Maybe.
 
@Pawnguy7 dislike.
@Pawnguy7 not a funny joke...
 
@caps I have used it in the past, so I thought it was.
Who are you?
 
6:42 PM
@DeadMG FWIW, the all caps can also be fixed (though it requires direct registry editing, to which some object). stackoverflow.com/a/10859562/179910
 
@Pawnguy7 My profile says "I am a software developer for a small company in Oklahoma. I work mostly in C++, but I also use SQL and work on some web-based projects."
@Pawnguy7 does that help?
 
user1804599
Nice answer, yet another reason to suspect the designers of PHP are high on drugs. — Ezequiel Muns Dec 20 '12 at 0:12
 
user1804599
lol
 
@JerryCoffin Eh, I never really cared too much about the all-caps.
 
@DeadMG I guess it doesn't bother me all that much, except to the extent that it shows how far they have their heads in the wrong places. In any case, if @LightnessRacesinOrbit wants to fix it, the info to do so is right there. (Though it does sound like he dislikes it enough in general he probably doesn't consider that a material improvement).
 
Ell
6:45 PM
GAH
 
Xeo
@not-rightfold ... what?
 
Ell
android is crap
 
Xeo
They're supposedly high because function binding happens at the point of definition?
 
Ell
why is this so bad!
Why is there a setMinHeight and a setMinimumHeight!?!?! ahbflasndfwakn34i21-30 2m14ej[q0-m wefasm m\spfwaopmefm
 
Xeo
Mobile-Dev has claimed another victim.
 
Ell
6:52 PM
The design of the android api is just awful :/
 
@JerryCoffin You got it. The principle of the thing bothers me as much as anything else. It shows systemic failings, in my eyes.
"We want to make it look like a website" is just fucking retarded, especially when you consider that even a website with all-caps menus is horrendous to look at
 
@LightnessRacesinOrbit The excuse they've given is that they're doing that on tablets, and claim that being on a tablet somehow makes it all right. The whole thing sounds like nonsense to me (but I think Windows 8 on a tablet is utterly horrible as a whole, so I guess at least this way it fits in better with the rest of the mess).
 
@wilx I use a custom script in ~/bin/shoot (mapped to Ctrl+Win+PrtScr). It directly uploads png to imgur (and it allows me to Gimp it before commit)
 

« first day (1098 days earlier)      last day (3866 days later) »