« first day (604 days earlier)      last day (4337 days later) » 

9:01 PM
@EtiennedeMartel Ok, I set it on the QDialog. But setting it on the QMdiSubWindow pointer that addSubWindow returns doesn't seem to change anything either
 
@basic6 Are you closing the QMdiSubWindow or the QDialog?
 
I'm closing the QDialog and I'm getting the feeling the sub window I'm adding to the MDI area shouldn't be a QDIalog class at all?
 
@basic6 Here's the thing. When you add a widget with addSubWindow, it wraps the widget in a QMdiSubWindow and returns a pointer to it. That's what you should close.
 
Alright guys, I gotta good one for ya. I have 3 integral keys, and I need to map these 3 keys to a pointer. How would I do so best?
I would prefer to use std::map where I could.
 
I’m laughing tears right now
 
9:13 PM
@EtiennedeMartel And here is the stupid question of the day: How do I close the wrapper subwindow from within my qdialog? I mean how do I get it (without manually passing it through the ctor and storing it, obviously, there has to be a nice way)
(it being the pointer)
 
@KonradRudolph He already raised more than 16k.
The Internet is amazing.
 
@RMartinhoFernandes He should counter-sue, they are, in the words of the lawyer himself, “publishing false statements about [theoatmeal] to gain publicity, popularize [FunnyJunk], and injure [theoatmeal’s] reputation in the marketplace“
 
@KonradRudolph That IS EPIC
@KonradRudolph Harrassment counter lawsuit much?
 
@KonradRudolph All those links have been taken down.
they were valid earlier but gone now
 
9:21 PM
@DeadMG At least those that I tried (almost all) were valid just minutes ago
 
@KonradRudolph Just tried right no
 
@basic6 Not that I know off.
 
19k nowq
 
sbi
@thecoshman Um, what?
 
there are 15 days left on the ticker
 
9:22 PM
@KonradRudolph Why does not the lawyers that come up with this crap get slapped hard? No links worked for me either.
 
he did it in what, an hour?
 
Yep.
Wrote about it on Facebook at 16:21 EST (so, 1h03 ago)
 
@CaptainGiraffe They all worked previously, but are gone now.
 
Bam, 20k reached.
 
9:26 PM
@Drise std::map<std::tuple<int, int, int>, T*>
 
@EtiennedeMartel I figured it out: In my QDialog, I overload closeEvent and before I accept it, I get a pointer to the parent submdiwindow by casting it (qobject_cast - that does the trick) and close this thing (which doesn't do anything until I close() the child qdialog - then it's gone, like it should be)
 
@MooingDuck /usr/include/c++/4.5/bits/c++0x_warning.h:31: error: #error This file requires compiler and library support for the upcoming ISO C++ standard, C++0x. This support is currently experimental, and must be enabled with the -std=c++0x or -std=gnu++0x compiler options.
Should (can) I use it anyway?
 
So you had the right idea - thanks for that!
 
Protip: next time, check the doc.
 
@EtiennedeMartel You are just chock full of protips :D
 
9:32 PM
@Drise -std=c++0x To boldly go...
 
@Drise Protip: @EtiennedeMartel knows all the protips.
 
I know, I know, RTFM, and I did, however I just didn't get that I has to close two windows in order to close one.... Anyway thanks
 
@Drise -std=c++11
@Drise tuple is a C++11 thing, before that you'd have to use boost::tuple or something.
 
@awoodland Nice. Also, thought you might find it interesting, it seems somehow over the weekend gdm got restarted. I lost the second monitor again to the lower resolution. So I unplugged and replugged and again and again, and I eventually used some compressed air, and tried it again, and SUCCESS!
 
sbi
@EtiennedeMartel More often, though, this chatroom feels like the sea of vomit the C++ tag ejaculates.
 
9:37 PM
@sbi Agreed, I have no idea how that tagline got the neon light.
 
@sbi Hmmm?
 
@sbi I believe that to be the fate of any sufficiently popular enterprise.
2
 
@CaptainGiraffe Thank me :D
 
@Drise weird - I swear there must be a pin that's only half connecting or something
 
sbi
@EtiennedeMartel What, "hmmm"?
 
9:38 PM
@awoodland I've miss placed my spare (cable), so no luck testing it. But it worked for ages before the second monitor showed up, and works standalone
 
@sbi What do you mean by that?
 
sbi
@EtiennedeMartel Have you considered that I might mean exactly what I say?
 
@sbi You mean we're crap?
 
@sbi He is just scoping the distance between profound and profane.
 
@CaptainGiraffe Because we're proud of what we did this morning when we thwarted yet another attempt at encouraging bad style?
 
9:41 PM
@EtiennedeMartel Somewhere inbetween, but this is where we hang =)
 
sbi
@EtiennedeMartel No, we aren't. But sometimes this room becomes.
 
maybe we should look for some more active moderation, compared to our usual hands-off
 
Awww, you're way too harsh.
 
sbi
@DeadMG NO!!!
 
what do you suggest?
 
sbi
9:42 PM
@EtiennedeMartel Ah, you're way too young to dare say things as they are.
@DeadMG Nuffink. It's fine the way it is.
 
@DeadMG What would you suggest as more active moderation in a positive way?
 
@sbi No, I simply have a ridiculously high tolerance.
 
More moderation? The anarchist in me is exploding!
 
sbi
@EtiennedeMartel (You're proofing my point.)
 
@StackedCrooked anarchist or just lazy?
 
9:44 PM
@MooingDuck Depends on my mood.
 
@sbi I mean by that that I think this room is a mostly positive thing in regard to C++ on Stack Overflow, and that the various small issues we might be experiencing are not serious enough for me to consider that we are a "sea of vomit".
 
> WE'RE TOUGH AND WE DON'T CARE. - 5h ago by Cat Plus Plus
And now we'd suddenly want more moderation. Hell no!
 
Not, me, I was just curious if Dead had any clever new ideas.
 
Maybe trolls should be given an free beer.
 
That being said, I have to leave now or I'm going to miss my train. See ya everbody in an hour or so.
 
9:50 PM
When is it a justifiable/good idea to buy top of the line tech?
vs the more "sensible" position of sticking with something cheaper that'll largely do what you need it to
 
sbi
@EtiennedeMartel And I mean that I often have to disagree with this analysis.
 
@AgainstASicilian That sounds like a common cost/benefit tradeoff, you need to associate value to the two. The bottom line will tell you. We can't answer that in a reasonable way.
 
sbi
@CatPlusPlus Beautiful! Thank you!
Oh. Is he back?
(Fits my previous message.)
 
10:06 PM
i think i'll ask my question again
here goes
Q. can std::numeric_limits<int>::is_modulo be true for sign and magnitude or for one's complement form?
 
Give me a good joke.
 
well maybe i should ask it as an SO question
or put it to [comp.std.c++]?
'k
 
@CheersandhthAlf What does is_modulo mean?
 
:4080659
60
True if the type is modulo.219A type is modulo if, for any operation involving +, -, or * on values of that type whose result would fall outside the range [min(),max()], the value returned differs from the true value by an integer multiple of max() - min() + 1.
61
On most machines, this is false for floating types, true for unsigned integers, and true for signed integers.
62
Meaningful for all specializations.
 
@CheersandhthAlf I still feel like it ought to be false for signed integers.
 
10:13 PM
but they're modulo on nearly all machines
AFAIK it's only on Unisys archaic architecture that they're not
notwithstanding the silly g++ optimization faults
 
@CatPlusPlus can you edit Error description to also say something like "In Microsoft Visual Studio, the error message is not in the 'Error Window', the full error message is in the 'Output Window'. We're sorry Microsoft made this confusing, but that's the way it is."
 
If I have a function someFunc(int, double, char); and I call someFunc(8, 2.4, 'a');, what actually happens to the variables?
 
but we already had this debate and disagree, I don't know why I posed that. Sorry :/
 
-1
Q: What is the fastest way to brute for a SHA-1 hash?

VijayI have a hash and the full decrypted plaintext of that hash. I am planning on trying to brute force it, it's a SHA-1 FIPS 180-2 hash. So my question is, what is the fastest way of doing this? I was thinking about decrypting the data and comparing it to the known plaintext, but then I thought i...

um...
 
@Drise in theory it makes copies of those values and passes them to the function. In practice, the compiler won't bother with copies. (Is that what you're asking?)
 
10:17 PM
:4080671 But if the underlying representation doesn't have a pattern outside the value domain it has to be is_modulo = true. Am I missing something? .. Looks like Alf is agreeing.
 
i think a clue might be that the standard doesn't say that signed overflow is UB
it says instead that if the result value cannot be represented, then u haz UB
but when the operation is modulo, the result can be represented...
 
@MooingDuck Yes. Is there any more to that (what the compiler actually does to it?) (Should this be moved to SO, or has this been asked already?)
 
@CatPlusPlus Also, according to the sscce website, that's not what correct means
 
So with that One's complement should not be is_modulo = true;
 
@Drise I think you need to explain what it is you're looking for. There's hours of details, but I don't know which if any are the ones you're wanting.
 
10:22 PM
@MooingDuck I'm just generally curious. How does 8, 2.4, and 'a' get memory, moved into memory, and passed into the function (you see where I'm going?)?
 
@Mysticial There are quite a few WTFs contained in that small space.
 
user457812
@Drise It might help if you look at the assembly a compiler produces to figure that one out.
 
And I ask again, would this be better moved to SO?
 
just do as nils says
 
user457812
10:24 PM
I'd assume all non-trivial questions are better moved to SO, and this one is probably non-trivial.
 
@Drise It would depend on whether it's inlined or not. If it isn't they are passed according to the calling convention.
 
K.
 
user457812
Though I guess that depends on what you consider non-trivial. Either way, go look at the assembly and figure out what your question is from there.
 
@Drise generally the compiler has a stack. It will put 'a' on top of the stack. Then it puts 2.4on top of the stack, then it puts 8 on top of the stack, then it adds space for the return type, then the return point in the current function, and then jumps to the beginning of the function's code.
 
Time to gather the (precious) pointz.
 
10:26 PM
@Drise The function will look at the stack, grab the parameters, do it's thing, put the result in the space provided on teh stack, then jump to the calling code pointed at on the stack. The calling function will then copy the result wherever it wants it, and pop all that off the stack.
That is more or less kinda sorta how the c standard calling function thing works. And why iteration is faster than recursion.
 
user457812
It's calls all the way down
 
0
Q: What happens in memory when calling a function with literal values?

DriseSuppose I have an arbitrary function: void someFunc(int, double, char); and I call someFunc(8, 2.4, 'a');, what actually happens? How does 8, 2.4, and 'a' get memory, moved into that memory, and passed into the function? What happens if the function is declared as inline?

 
@MooingDuck "And why iteration is faster than recursion." In most cases. There was a popular experiment in here a few months ago, rewriting QuickSort to a faster iterative version. Failed pretty hard, regardless of the fairly good ideas put forth.
 
@CaptainGiraffe Tes, you're right. Iteration is not always faster than recursion.
 
So I just click the "change picture" on the userpage to set it to my Gravatar?
 
10:36 PM
i was thinking of an assymetry in time
when one particle splits in two other particles A and B, unless they spiral out conservation of momentum sees to say that they should appear to emanate from a common (infinitesimal) point
but for the opposite process, A meets B and they fuse to create that particle that can split, then the probability of them meeting exactly head on should be zero
oh well i mentioned that at least once before
but, is the logic of that reasoning wrong, and if so, how?
 
@CheersandhthAlf On those scales it makes perfect sense.
 
I second @CaptainGiraffe
 
The head on is what LHC is measuring.
 
well that's roughly head on, as opposed to infinitely exactly head on
 
You need a many particle system to make sense of time.
@CheersandhthAlf Heisenberg, there is nothing infinitely exact, and the interactions does not make that distinction.
 
10:43 PM
i think conservation must be infinitely exact
otherwise, over time you would get huge discrepancies
 
This is in the fundamental equations only. Whenever you come up with a series of interactions probabilities are vanishing.
Yes the conservation quantities are exact.
 
@MooingDuck Thanks, and curse luchian for answering first, but he always posts very well when he does.
 
Consider a fairly complex situation like when an atom is capturing an electron in the nucleus.
 
Though, is it cheating for him to post first, and then finish answering later?
 
@Drise I hold no grudge, he has a good answer too
@Drise I did too :D (I'm still editing mine) It's only kinda sorta not-really cheating.
 
10:46 PM
@Drise Thats (TM) Jon Skeet, so it's perfectly allowed. He made it apache licensed.
 
Also, why doesn't luchian prowl here?
And damnit, this is the second good question I've had with no votes D:
I are frustrated.
 
@CheersandhthAlf That can also happen in reverse with no odd things happening in between, just input of the proper amount of energy quanta.
 
@CaptainGiraffe i think it's psychologically interesting. given a simple example that puts things to the point, you're asking to instead consider a complex, fuzzy situation where nothing's clear. why?
 
Also, in Luchian's dissassembly, what is __imp_std?
 
@Drise oh. uh, fixed :/
 
10:51 PM
@CheersandhthAlf What would be your SSCE in this case?
 
@CaptainGiraffe my what?
 
@Drise from context, I would guess it is the name of the class/namespace that that function is implimented in. Or maybe that's just how GCC mangled/demangled it?
 
@CheersandhthAlf What is the situation you are thinking about? atoms colliding? quarks? electrons?
 
@MooingDuck So does std get moved to __imp_std?
Yay! I gets points.
Ok, seriously kidding. I just like to use the Yay! prefix.
 
@Drise not "moved to", but maybe the compiler calls it that internally. or maybe the code is in a namespace called __imp_std, and the "normal" operator<< simply calls that function.
 
10:53 PM
hopefully particles that are considered fundamental. electron is nice. if can emit a photon, then choose that.
 
@CheersandhthAlf This youtube.com/watch?v=rEr-t17m2Fo just tells you interesting consequences of this.
 
does he talk about assymetry of splitting / reverse process?
 
@CheersandhthAlf Not at all.
 
well then i don't think it's very interesting
 
does netbeans have a way to find implementations of a interface's member function? or even just implementations of an interface?
 
10:55 PM
i think the elephant should be mentioned :-)
 
@CheersandhthAlf It's not an elephant. It's just the way the successful models are.
 
what exactly is the way they are?
you know, none of the current models succeed at modeling time
 
....sometimes I hate my teammates
 
i think time must be really simple
and fundamental
 
In QM you have often no concept of time, state/quantum numbers is what gives particles and systems its behaviour.
 
10:58 PM
so i think about assymetry that's ubiquitous
 
here's a list of some of the members of our "user" class:
    protected String language_ID_ = null;
    protected int tts_language_ID_ = -1;
    protected String default_prompt_lang_id_ = null;
    protected int default_tts_lang_id_ = -1;
    protected Vector<String> prompt_languages_ = null;
    protected Vector<String> tts_languages_ = null;
    protected String cached_tts_lang_id_ = null;
 
and information loss
 
I feel like at least some of those ought to be static members
 
Time merely gives the states a spreading, uncertainty if you will. This is how the model of excitation and deexcitation works in an atom.
 
i think the assymetry is big elephant (unnoticed), and information loss is cow (holy)
 
11:00 PM
@MooingDuck What lang?
 
@Drise Java :(
 
@MooingDuck Why subject yourself to such pain? (besides things like, you know, eating... and maybe electricity)
 
user457812
I'd rather starve than deal with Java.
3
 
@Drise I've just discovered that some of those members are never mentioned. Ever. Even in the class they're "part of"
 
11:02 PM
@CheersandhthAlf I understand your point, but I'm afraid I cant answer it responsibly. Entropy is not an elephant nor cow, just a many particle system. Maybe you'd like to look at that video still. Sean is a great lecturer.
 
i think, as soon as examples are made to be more complex instead of more simple, one is on wrong track
 
@Drise $$$
 
@MooingDuck So you don't like to eat? Damn, you're hardcore.
 
@Drise $$$->money. But the inverse is much harder. I'll live life the easy way.
 
@CheersandhthAlf My example? If so, in every less complex example it is only considering fields, a photon is a field, the electron is a field interacting by photons, so it is kind of hard to discuss, unless we discuss the standard model. I have no idea about how you deal with/what you know about the microscopic world and I took a guess.
 
11:06 PM
I kind of wish everything were as strict as possible by default in programming languages. For example, in C++, int foo would be like const int foo, and something like var int foo would make it variable. I often find that doing things the "proper" way takes more effort than the "improper" way, which is a little sad.
 
i wonder if a preprocessor for C++, that made the defaults opposite, would be a hit
 
lol
 
#define true false
 
@Maxpm We have all had those thoughts. perl is not your language. But just imagine to const_cast all your variables? Maybe you'd like to try a functional language?
 
#ifndef _DEBUG
#define if(X) if(rand()>0 && (X))`
#endif
 
11:10 PM
@CaptainGiraffe I'm not saying that everything should be const_cast, but that "variables" should need a special qualifier to be mutable.
 
:4080950 everywhere you have if, it will choose the wrong path about 1/65000 (for visual studio) in release builds.
 
I'm using variables as an example here. I also have D in mind, where you get things like @safe pure nothrow int add(const int a, const int b).
My proposition is that it should be int add(int a, int b), and there could be keywords like impure and var.
 
Thats the Succubus of functional languages. You are drifting to the dark side.
 
Mosquitos suck. Okay, enough puns for this week.
 
D isn't really a functional language any more than C++ is an OOP language. Sure, they contain features of the paradigm, but they're not centered around it.
I have read a bit of Learn You a Haskell, and I loved it. I hope to learn some more once I finish school in a week.
But the idea is language-agnostic.
 
11:14 PM
From a student in my class to one arguing to him about iDevices stating that they have "good graphics": "Man, we had good graphics back in the 80's when we had PacMan!"
 
@Drise MsPacMan was so hot!
 
Another reason for languages to adopt this philosophy is that they might be easier to teach. A "correct" program in any reasonably complex language has dozens of nuances that can distract from the fundamentals, so programs designed to teach the language are actually dumbed down so much that they're bad examples.
 
@Maxpm php is easy to teach. Just sayin.
 
@CaptainGiraffe So is UML, apparently.
 
Now, arguably, this could make the languages more difficult to teach at an intermediate level. "Whoa, you can change the value of foo?" That's kind of fundamental, and it might not be good for the language to hide that kind of thing from its adopters.
@CaptainGiraffe I'm not sure what your point is.
 
11:18 PM
@Maxpm Just that php is quite opposite of what you are suggesting.
 
@CaptainGiraffe Not really. Teaching someone to program in PHP is not the same as teaching someone to program the "right way" in PHP, using its equivalents of const. Correctly programming PHP is actually very, very difficult and tiresome. You have to jump through hoops to make, say, a constant array, so most people don't bother limiting themselves.
 
@CaptainGiraffe Easy to teach, maybe. But certainly not easy to use.
PHP is a bug.
8
PHP is a parasite with the web as host.
It's a cancer.
We must stop it, but we can't. It's too strong and it spreads too quickly.
 
So while we have lists of best practices like "make your variables const unless you plan on changing them," "make member functions const unless you want them to change the object's state," etc., maybe a better approach to get people to do these things is to make them easier than the incorrect alternatives.
 
@CaptainGiraffe The problem is that no PHP book or tutorial teaches about discipline. And that is why there is so much crappy PHP code online.
 
But hey, strings are floating pointer numbers after all, aren't they?
 
11:23 PM
@Maxpm Good point, but still it is easier and faster to get those ignorant of programming to produce a webpage with a shoppingcart sum, than it is to get the same people to produce a multiplication table in c++.
 
No PHP book or tutorial teaches about discipline because discipline in PHP is so pointlessly hard. Which is my point.
 
@CaptainGiraffe Are you seriously comparing PHP with C++ in terms of programmer productivity?
 
@EtiennedeMartel no not at all, what made you think that?
 
@CaptainGiraffe Because you just compared PHP with C++.
And, you know, C# is easy to learn as well, and much less error prone than PHP.
 
PHP is no more a programming language than a chair is a brick.
 
11:25 PM
@EtiennedeMartel no, I made statements about people being ignorant to programming and their progression.
 
The difficulty of teaching a student to get a program "up and running" is irrelevant. My wish is that those early programs are as correct as the programs made by veterans of the language, who know how to protect themselves from shooting themselves in the foot.
 
@MooingDuck Got a sec for another (quick) question?
 
Java is now used in introductory programming courses by (I think in the majority) Universities around the world because of its tools and apparent simplicity; it's readable names and verbosity. php is also used for those same reasons, and the additional very important reason results are immediately visible in attractive way. The console is not attractive.
 
@CaptainGiraffe For the record, we're both in agreement that Java and PHP are both awful languages that are bad to teach at all, let alone as a first language?
I think that the command-line should be the first thing programmers learn to use.
 
The problem with PHP is that it's so easy to learn. This attracts idiots (who write bad horrible code). If PHP did more error checking, had more sane scoping rules, was consistent, was more type-safe (i.e. no implicit conversions), and was more difficult to set up, it might have not been so bad.
 
11:32 PM
@Maxpm For sure, I'm the last soldier standing fighting for my multi-paradigm c++. I'm not kidding it is a fight.
 
@CaptainGiraffe Oh, carry on then.
 
My best argument, that is actually measurable is that my c++ guys are better at Java than the Java guys are after 3 similar courses + a primer for the c++ guys.
 
@CaptainGiraffe Reminds me of this:
 
The console's power and automatability are analogous to programming itself, and it can even teach some basic concepts, like functions that take arguments. It is such a shame that the command-line was never officially taught in my CS 1, CS 2 or AP CS classes. That's two years.
 
> The recruiters-who-use-grep, by the way, are ridiculed here, and for good reason. I have never met anyone who can do Scheme, Haskell, and C pointers who can’t pick up Java in two days, and create better Java code than people with five years of experience in Java, but try explaining that to the average HR drone. — Joel Spolsky
 
11:33 PM
I pity the fools who are dependent on their GUIs.
 
@RadekSlupik Yay Joel, once again!
 
Anyway, as an example, let's say I invent a new language called C==.
C== is a very simple procedural language with some elements of functional programming.
 
I'm designing a language that is procedural and has functional elements. :P
 
A C== teacher gives an assignment to create a function that calculates the hypotenuse length of a right triangle, given its leg lengths.
 
Does std::endl call cout.flush()?
 
11:37 PM
Here's how a so-called veteran might write the function:
@Drise Yes.
 
@Drise no
@Drise it calls flush on whatever stream you pass it to
 
@SethCarnegie Lol, thanks
 
Is there anything I need to link besides libsicuin.a when trying to use MessageFormat in ICU?
 
@Drise it effectively calls flush. It may be inlined, for example.
 
Which is calling flush
 
11:38 PM
pure double HypotenuseLength(const double LegLengthA, const double LegLengthB)
{
    return sqrt(LegLengthA*LegLengthA + LegLengthB*LegLengthB);
}
 
My professor insists on using \n and .flush combinations because, according to him, endl is equivalent to #define endl '\n'
Like literally just asked him.
 
Okay, pretty reasonable. The parameters are const because they are not changed, and the function is pure because it has no side-effects and it is deterministic.
Now, a new student learning C== might write the same function like this:
double HypotenuseLength(double LegLengthA, double LegLengthB)
{
    return sqrt(LegLengthA*LegLengthA + LegLengthB*LegLengthB);
}
 
@Drise It can very well be. I would not be surprised by that implementation.
 
Same thing, but it's impure and there is no const. The teacher avoids these topics because they introduce unnecessary complexity for new students.
 
@CaptainGiraffe no it can't, because #defines don't respect namespaces
 
11:41 PM
@CaptainGiraffe I say that meaning he says that assert(endl == '\n'); evaluates to true.
 
@SethCarnegie conditional define id suppose.
 
What?
 
So, when the student becomes more experienced, he will have to train himself to byte the bullet and always remember to type out pure and const. That doesn't seem like a lot, I know. But a more restrictive program should be easier to write than its less restrictive equivalent.
 
"endl is simply a new line character"
 
@Drise Have you pointed this out to him?
 
11:42 PM
@Drise I think endl is required by the standard to flush the stream
 
return flush(__os.put(__os.widen('\n')));
 
And there's the flush
 
on my FSF! implementation. I did not know the FSF did code.
 
@Maxpm He's rushing through the lecture, I didn't want to call him out on it.
 
Your poor classmates.
 
11:46 PM
@Drise You're not chatting during a lecture are you?
 
@CaptainGiraffe the lecture is in regards to "What is a class"... and "How do you make a class?"
I think I'm above that for now. Also note: I've taken this course once before.
 
@Drise online or live?
 
I'm sitting in a classroom.
 
@Drise So you failed?
 
@SethCarnegie No, but I had never heard of a class or pointer before, so I struggled. So instead of learning the major concepts, I was struggling to grasp the founding ideas.
 
11:49 PM
ah
 
I basically took CS 1 and 2 twice. I had a free period every fourth day this year, so I would sit in on them.
 
I got very little from the course, and now that I use it daily at work, I figured I could use a better grade and nail the more advanced topics (like graphs) with ease.
 
@Drise Out of curiosity, how intuitive/easy-to-grasp did you find pointers? A lot of people apparently have trouble with them. They're like the C++ equivalent of monads.
Which reminds me: I still need to learn monads. ._.
 
I never found a use for them the way they were presented to me. So I didn't see why int x; int* y = &x; *y = 5; was needed.
I got the idea (pointers point to memory somewhere), but just didn't understand why.
 
Hm.
 
11:53 PM
@CaptainGiraffe Also note: I hang out here. I think I'm beyond learning what a class is.
 
What does "A is covariant with B" mean?
> Nothrow functions do not throw any exceptions derived from class Exception. Nothrow functions are covariant with throwing ones.
 
Also note: I'm intelligent and curious enough to ask questions like:
1
Q: What happens in memory when calling a function with literal values?

DriseSuppose I have an arbitrary function: void someFunc(int, double, char); and I call someFunc(8, 2.4, 'a');, what actually happens? How does 8, 2.4, and 'a' get memory, moved into that memory, and passed into the function? What type of optimizations does the compiler have for situations like th...

 
I know the dictionary definition of covariance, but I'm a little lost.
 
Anyhow, lecture is over, I'll catch you peeps later.
Thanks for the entertainment.
 
Is it "every nothrow function behaves like a throwing function," or vice-versa?
 
11:56 PM
that
like you can call const methods on non-const objects but not vice versa
Within the type system of a programming language, covariance and contravariance refers to the ordering of types from narrower to wider and their interchangeability or equivalence in certain situations (such as parameters, generics, and return types). * covariant: converting from wider (Animals) to narrower (Cats). * contravariant: converting from narrower (Triangles) to wider (Shapes). * invariant: Not able to convert. For example, a type W that may hold one of the values from the set {a,b,c,d} is wider than a type N that may only hold values from the narrower set {a,b}. Hence, a type...
 
@SethCarnegie What is this wikipedia stuff and where can I buy a copy? A lot of that stuff is quite well written!
 

« first day (604 days earlier)      last day (4337 days later) »