« first day (1133 days earlier)      last day (3832 days later) » 

4:00 PM
@User17 like the ones who leave to check something out, to never return?
You can make it warmer with your love.
Hm?
Oct 29 at 21:22, by Pawnguy7
@ScottW you should fix SFML for me,with the power of your love :D
Jul 7 at 19:24, by Pawnguy7
Your conditional love disgusts me.
So, I have made a few uses of your habits :D
 
@ScottW Currently -6C here in Colorado. Worse, the streets are slicker than snot on a doorknob.
 
Also.
Why do people have group projects.
 
user3010322
Group projects are the bane of my existence.
 
@Pawnguy7 So they have others to blame when the project fails.
 
user3010322
But they're the only way to accomplish larger tasks. =[
 
4:04 PM
@ThePhD Larger task->type faster. :-)
 
@JerryCoffin True, true.
 
user3010322
@JerryCoffin Access Violation: 0x000000C.
 
I almost want to have a group programming project.
but in this case, I cannot fix it, and nobody is working together :\
(not programming related)
@ScottW Via what medium?
 
I have a question.
 
@ScottW at my current rate of code, that would be a pretty one-sided project.
 
4:06 PM
Tsk tsk.
 
user3010322
@EtiennedeMartel I'll answer your question. <3
 
Perhaps when I have no school, me and Jeffrey can put something together though.
 
So. I'm doing some type erasure thing, with an abstract base class and a templated sub class.
 
user3010322
Sounds standard so far.
 
4:07 PM
And I was wondering if there was a way to use something like enable_if to specifiy what override to use depending on the case.
 
Seems a good plan.
 
user3010322
@JerryCoffin That's awesome. xD
 
user3010322
@EtiennedeMartel Uhm. Isn't that the point of having a virtual method in the first place?
 
@ScottW And how were you affected by "Your Testicles and You"?
 
ah
baby
 
I've missed you
 
I'm hungry now.
 
@ScottW Damn--too young to get the proper emotional scars from the experience.
 
@ThePhD Tell that to your employer.
 
@ScottW Probably too old now. The age at which to emotionally scar somebody for life is (apparently) quite critical.
 
user3010322
4:11 PM
@R.MartinhoFernandes I would never.
 
@ScottW I just finished breakfast.
 
user3010322
The funny thing is, I always get put on projects by myself when I go to do internships.
 
@ThePhD No, I mean, let's say I have a pure virtual method f, which is overriden in the subclass. Could I make "multiple" overrides and have only one of those be the "true" one depending ont he subclass' type parameters?
 
user3010322
@EtiennedeMartel Sort of. I kinda do that in my own class
 
@EtiennedeMartel MI.
 
4:12 PM
@ScottW not sure if I get it.
 
@R.MartinhoFernandes Hmm?
 
C++ isn't Java. Ugh all these getters and setters. — Tony The Lion 9 secs ago
 
user3010322
 
Oh you don't even need MI
 
user3010322
That's one way to manually choose. But as @R.MartinhoFernandes, you can also use multiple inheritance.
 
4:13 PM
You can just have SFINAEd internal overloads and call them from the one override.
 
user3010322
Or other fancy things.
 
@R.MartinhoFernandes Ooooh.
 
@ThePhD I see no virtuals there.
@ScottW haha
 
Drink! Feck! Arse! function TCollisionShape.collisionCheck(withShapes: TCollection<TShape>): TShape!
I need more coffee:(
 
user3010322
@R.MartinhoFernandes It was an example of overload selection, not necessarily of the virtual part.
 
JBL
4:15 PM
@TonyTheLion toString(). Definitely looks like Java. In C++.
 
@ScottW Can have virtual templates.
 
> class EmployeeArray10{
I don't even...
 
JBL
There's probably ten Employees.
 
Did anybody mention the using yet?
 
@Pawnguy7 It's the least of the problems there.
 
4:19 PM
True.
 
JBL
@ScottW This question should not be deleted. It's the perfect arrangement of what not to do.
@ScottW I haven't said you did.
 
I say you both said something.
 
JBL
@ScottW I hadn't... Oh fuck we're set then.
 
Also lines like:
employee1.tostring();
makes me wonder.
It's not the first time I see that.
 
What do you think? Is my comment on this answer too harsh (or not quite harsh enough)?
 
4:22 PM
@Jefffrey I think Java's base object has toString()
 
JBL
@JerryCoffin Sweet !
 
@JerryCoffin It's perfect.
 
JBL
@Pawnguy7 Yep.
 
Also what is he talking about? With arr[1] you are still using pointers.
 
JBL
@Jefffrey Shhh, don't mention the words "pointer arithmetics".
 
4:25 PM
Is it used for logging or something?
Wait, no maybe it is serialization.
 
@ScottW Of course--been there since .NET 1.0, which was apparently as close to a direct clone of Java as MS figured they could get away with at the time.
 
@JBL Oh wait. I forgot that it does represent an offset that needs to be calculated.
@ScottW Yes. Pointer arithmetics.
 
0
Q: how to translate C++ program to assembly language

user3019164I do not know what instruction I have to use in order to translate %2 #include <iostream> using namespace std; int main () { int number; cin >> number; if (number % 2 == 0) { ; I cannot translate this part. cout << "Even\n"; } else { cout << "Odd\n"; ...

bad question day
urgh
 
I wonder why they think that part specifically needed translating.
 
JBL
Aw, got sniped, @TonyTheLion.
 
4:27 PM
@ScottW both.
TAHW
 
JBL
@Jefffrey Uh oh.
 
@Jefffrey pointers are not arrays
they are not the same thing
 
I'm saying that arrays can be seen as pointers.
 
JBL
And that's not "can be seen as" exactly...
 
arrays are arrays, and arrays decay to a pointer to its first element in certain circumstances
everything else is a lie
 
JBL
4:29 PM
Especially the cake.
 
I remember when I learned that.
 
I've been taught lies then.
 
Pretty sure I was initially taught that an array is a pointer to the first element.
I cannot really blame them though.
For most purposes, it is, and...
Such simplifications are in many kinds of teaching.
 
JBL
It's a little bit more.
Also.
 
I mean.
I still don't really know what implication this has.
 
4:31 PM
word for "having much quantity"? this component in my app will have the heaviest dataflow by far and I'm explaining why I'm optimising it
 
Except that you need to extern it as an array if you declare it as an array.
@LightnessRacesinOrbit overly numerous?
Wait, that isn't a word.
 
JBL
Misread.
 
"traffic-heavy" might do
 
JBL
Which is, how genius, what we're saying for quite some time now.
 
> I am using a global array (I know they are evil).
Guess who said it?
 
4:35 PM
@ScottW :)
 
Yes :(
 
Next question... "polarily opposite"?
 
user3010322
Linker errors are the worst. =[
 
4:38 PM
The all knowing @JerryCoffin answered it:
2
A: how to translate C++ program to assembly language

Jerry CoffinIn a typical assembly language, the integer divide instruction will also give you the remainder. In the case of remainder when dividing by 2, it's a lot easier to translate to a bit-wise AND with bit 0 though. E.g., on x86: mov eax, number test eax, 1 mov esi, offset even_string ...

 
I cringe reading my questions.
6
 
I cringe reading your questions too
 
@LightnessRacesinOrbit Big as your mom.
 
0
A: Static char *buf = NULL

Patatoto initialize the ptr to zero the same as static char *buf = 0;

lol
 
user3010322
@Pawnguy7 I have no such problems, because my account was destroyed. :D
 
4:40 PM
@ScottW "the use cases are polarly opposite from one another"
 
@TonyTheLion CrappyQuestionsRUs! :-)
 
fstream does not create files if they don't exist?
 
@JerryCoffin :)
 
user3010322
One day, I'll have a completely tokenless callback system. =[
 
JBL
@LightnessRacesinOrbit "Opposites" isn't enough ?
 
4:43 PM
I've been taught that an array of N elements of type T is laid down in memory as N sequential elements of type T leading to N * sizeof(T) bytes being occupied. Now they also convinced me that x in int x[10] is a pointer to the first element of the array and that expressions like x[i] are equal to *(x + i) and that demonstrated that x was a pointer.
And yes, pointer arithmetics.
 
@ThePhD Unlike my last synchronous design, which had a token callback system.
 
They also taught me that the type of x is int[] which is the same as int(*) which is the same as int*.
 
I am still not sure quite what functions pointers are either.
 
user3010322
@JerryCoffin I had a tokenless callback system... once.
 
JBL
@Jefffrey Try to delete x (or free it if C-suckage). See ? They're not the same.
 
4:44 PM
@JBL what?
 
The name of a function is a pointer, and operator() invokes it somehow?
 
user3010322
But then Robot went and ruined it by asking me to handle dynamically generated lambdas. In a goddamn for loop.
 
int[] is not the same as int*, there is a decay, but that doesn't make them equal.
 
So, what does int[] not have in common with int*?
 
@Pawnguy7 no, function pointers are pointers to functions, and the language allows to use a function call operator on them
 
4:45 PM
@Pawnguy7 its a pointer to a function, a type all by itself
just like any pointer is a type by itself
 
user3010322
Maybe I should just go back to that system, but take the C# route. If you don't store the lambda in a variable, you don't get to remove a lambda if you add it directly to a list.
 
@Jefffrey that they're different types
 
@ScottW shit
@JBL shit
@ScottW better!
 
@TonyTheLion But behave exactly the same way?
 
turns out "polarly" is a word, though
 
JBL
4:46 PM
@LightnessRacesinOrbit :(
 
@ThePhD Whoosh.
 
@Jefffrey from personal experience, not when using extern. Not sure what else.
 
user3010322
@JerryCoffin Aww, I really missed it? :c What was the joke?
 
JBL
@Jefffrey They don't !
Because one can decay into the other, that doesn't mean they're equivalent !
 
@ThePhD "A token X" can also mean "an X that's there purely for show".
 
4:47 PM
@ScottW compile-time arrays?
 
user3010322
@JerryCoffin ... Ooooh. I see what you did there!
 
@TonyTheLion depends. int[] is a declaration for a pointer in most cases - in contrast to int[X] ;)
 
@ScottW is that what you meant by allocations?
 
oh damn
 
user3010322
intelligence += 1
 
JBL
4:48 PM
@ThePhD How much intelligence does "1" account for ? :)
 
Far as I know, T * = new T[n] is a pointer.
 
@JBL Ok, then what changes between int[] (as a type) and int*? Practically?
 
JBL
@Jefffrey One is an array, one might point to one.
 
Well, gotta run. Back later.
 
JBL
4:49 PM
@LightnessRacesinOrbit 'tsokey !
 
Well, I can also do T * = new T(). Both have types T*`, correct?
 
Pointers point. Arrays don't.
That's all you need to know. :)
 
@ScottW pointer to an array would be (T[N])*
 
@Pawnguy7 Its a pointer to the first element of that array
 
Yes.
A pointer. To an element.
Just you know you can read past that index.
 
4:51 PM
@ScottW no. new T[N] returns T*
 
@JBL Sounds a lot like a dialectic difference.
 
JBL
@Jefffrey No. You can't do the same things with an array than with a pointer...
 
@ScottW new T[N][M] returns (T[N])* ;)
 
@JBL For example?
 
Ugh C
 
JBL
4:52 PM
@Jefffrey `int n[2];//Array of size 2, set in stone for whole execution
 
@JBL that is an int[2], not an int[]
 
-2
Q: Which Complexity Times Better

user3022610Can Any one explain to which of these average case is better Big O(n+k) vs Big O(n^2). Please I have read many Book, but looking for a human answer I thinks big O(n+k). Though?

oh gawd
 
JBL
@ArneMertz Oh snap.
 
@JBL Doesn't mean I can't do n[2].
 
4:53 PM
@ScottW static vs dynamic, nothing to do with arrays, does it?
 
JBL
@Jefffrey Wait I misread.
 
@JBL void f(int[] iarray) is exactly the same as void f(int* iarray)
 
Xeo
@ArneMertz no
 
@Xeo where's the difference?
 
Xeo
void f(int[] iarray) is a compiler-error. :)
 
4:54 PM
@ScottW If I declare an int the plain way, it will be destroyed at the end of scope
That is the entire point.
You don't want it automatically destruct.
 
@JBL, just as well as in int* x; I can do x[1].
 
@Xeo meh just noticed - void f(int iarray[]) then
 
I don't use smart pointers on arrays.
Anyway, my point is.
There is nothing specific to arrays here.
 
@StackedCrooked > kill: Operation not permitted wtf coliru?
 
JBL
Crap I write shit today.
 
4:58 PM
Difference as compared to what?
 
@ScottW Because a pointer is not automatically destructed at the end of its scope?
 
Pointers are destroyed when they go out of scope as well.
Like.
If I do T* = new T().
 
@ArneMertz fixed
 
user3010322
Man
 
Then it does not get destroyed either.
 
user3010322
4:59 PM
This song relaxes the crap out of me.
 

« first day (1133 days earlier)      last day (3832 days later) »