« first day (369 days earlier)      last day (4562 days later) » 

10:00 AM
full class template specializations don't need any special treatment, right?
 
sbi
@FredOverflow Again, make them statics in a class template.
 
How would I make an object definition into a template?
 
Put it in a class.
 
a class or a class template?
 
Class template.
 
10:03 AM
no, a function template!
 
int one_global_object_per_tu; // what to do with this?
 
"Class template." is not star-worthy.
 
@FredOverflow Refactor away the global object?
 
@DeadMG In this particular instance, I really want it ;)
 
uh huh
 
10:05 AM
But I'm too ashamed to admit why ;)
 
why?
 
You should be!
 
what's the difference between T::method and T.method? They both seem to be accepted?
 
argh, fucking Internet company
@oorosco The second is deprecated, only for compatibility, and only by some compilers, IIRC. The first one is the Standard way.
 
Because it's an extremely ugly hack whose sole purpose is to prevent the immediate closing of the Windows console when starting a project from within Visual Studio with Debugging. Now you know ;)
 
10:07 AM
@FredOverflow Breakpoint?
 
@DeadMG I don't want students to get into breakpoints on their first encounter with Visual Studio.
 
if you're a new customer, you get free installation, if you're an existing customer, you can't just use your existing installation or install it yourself. You have to pay an obscene quantity of money.
 
what do yo uguys mean when you say, "deprecated"
 
sbi
20
Q: When do I use a dot, arrow, or double colon to refer to members of a class in C++?

sbiComing from other C-derived languages (like Java or C#) to C++, it is at first very confusing that C++ has three ways to refer to members of a class: a::b, a.b, and a->b. When do I use which one of these operators? (Note: This is meant to be an entry to Stack Overflow's C++ FAQ. If you want...

 
@FredOverflow static or an an unnamed namespace will achieve the same here, with accompanying potential ODR violation risks.
 
10:08 AM
@oorosco Bound to be removed from the standard sooner or later.
 
I'd much rather have to teach objects than ugly-hacks global objects
@FredOverflow It's not in the Standard, I believe.
Only MSVC, as far as I know.
or maybe it is
 
GCC has it.
 
@DeadMG Are you prepared for the whole truth? You have been warned:
namespace
{
    struct keep_console_open
    {
        ~keep_console_open()
        {
            std::cout << "\nPress ENTER to close console... ";
            std::cin.peek();
        }
    } instance;
}
And yes, that's the cleanest solution I could come up with :)
 
I know it's ugly as hell.
 
10:09 AM
Ctrl+F5 works for me.
 
Forgive me Stroustrup, for I have sinned.
 
@FredOverflow If you use const at namespace scope you get internal linkage for free.
 
If I'm debugging, I'll need to stop in the middle anyway.
 
@RMartinhoFernandes But that starts without Debugging. I never want my students to start their projects without Debugging.
 
sbi
@FredOverflow When they want to debug, they need to either single-step or learn to use breakpoints. When they don't want to debug, they can use Debug/Start Without Debugging (Ctrl+F5 on all keyboard bindings I know of), which keeps the console until they press a key. Never is there a need to change your code to run your program from within the debugger.
 
10:10 AM
Internet companies are so annoying
no wait, didn't I raeg this one already?
 
@DeadMG You did.
 
I always want them to start in Debugging. Because last year, when they hit a bug during non-debugging and I told them to debug, it was quite hard to reproduce the same bug.
 
rargh, the only competitor for cable only sells 18month contracts
wtf am I supposed to do with that?
 
10:12 AM
@sbi Why does Visual Studio only keep the console open in non-debugging mode? That seems totally pointless to me.
 
sbi
@FredOverflow So had they started with Debugging, they would have never found the bug? I'm sorry, but this sounds quite stupid.
 
@sbi What if the bug is triggered by rand()?
 
sbi
@FredOverflow Because in debugging mode you have all the tools necessary to do that yourself?
 
What if is triggered by time?
 
sbi
@FredOverflow Write code that catches such errors. Log. Attach to the running process with the debugger. Whatever.
 
10:13 AM
These are probably all good solutions for experts.
 
@DeadMG - I have a pro forma protest letter I use for long contracts that roughly says "It looked like you had a good product offering until I noticed you don't believe you will retain customers through the quality of your service and therefore I don't wish to be tied to what you clearly believe is an inferior service" (and 0870 customer services)
 
I wouldn't mind going with them at all, except that I only have 11 months contract on my accomodation
might bitch to the regulator
 
yeah - I think some utility companies could make a killing if they had contracts designed for student housing
 
well, the thing is
I already have cable broadband at the place
it's physically installed and plugged into my computer
 
@LucDanton Which of`struct X {} const instance;` and const struct X {} instance; would you prefer? ;)
 
10:16 AM
why the hell am I being forced to pay fifty quid to get an engineer out and install it again?
 
sbi
@FredOverflow Really, I have nearly whacked my students over their heads whenever I found them putting statements in to stop the program at the end of main, and here I find an instructor who comes up with an ugly hack (which is so bad that everyone in their right mind would outright ban from their code) just to prevent them from learning to put a breakpoint somewhere. What's wrong with you?
 
@FredOverflow Neither.
 
@sbi I would have 100% agreed with you if we had talked one year ago, because in theory, the solution is as ugly as it gets. What's "wrong" with me is that I have gained first-hand experience with Strg+F5 and breakpoints and stuff, and it simply was too much accidental (that is, unnecessary) complexity for the students.
 
What's Strg? Ctrl in german keyboards?
 
Every ten minutes I would go, "No, you have to start with Strg+F5, because otherwise the console immediately disappears. Oh, you have a bug. Okay, then you have to start with F5. Hm, strange, where is the bug now?" I'm simply fed up with that.
 
sbi
10:21 AM
@FredOverflow I dunno. I usually had 18 students in the lab, and while it was hard to keep up with their confusion in the first few lab sessions, it got better pretty soon.
 
@RMartinhoFernandes yes
By the way, Stroustrup also uses a "keep console open" hack in his last book IIRC.
So I'm not too ashamed actually.
 
AMAGAD
a whole week to get an engineer to install my cable!
wtf is wrong with these people
 
sbi
@FredOverflow If some problem is persisting enough for me to have explained it trice, and a fourth student would ask the same, I would usually pause the session, demand everybody's attention, and explain it once and for all.
 
cpx
I can't open the sandbox room we have on here. is there something wrong?
 
@sbi But it's a stupid thing to waste time with in the first place. I'd rather have an ugly solution that works rather than a pure solution that distracts the students from learning the important stuff.
 
10:25 AM
Breakpoints are a pretty damn important thing to learn, I would say.
 
Yes, but not in your first 10 minutes of becoming a programmer.
 
actually, a breakpoint would have helped tremendously in my first 10 minutes
 
sbi
@FredOverflow I would never waste time explaining which keys to press in order to achieve something. I would explain them the concept (Single-Step debugging, Breakpoints etc.), give a hint in which menu to find them in their current IDE, and maybe explain where to turn on the menus showing the keyboard shortcuts. They are there to learn, do not diminish that by holding their hand all the time.
 
@cpx Probably someone broke it again with a bunch of nested message quotes.
 
if you need the services that a breakpoint offers, i.e., pausing the program, then you need a breakpoint.
especially in Visual Studio, where it's trivial to add and remove breakpoints just by clicking
it's hardly an arduous task to click on the side and see the big red circle
 
cpx
10:27 AM
I posted a special character the other day, I thought it broke it.
 
Stroustrup even goes so far as to provide a std_lib_facilites include all header, something every C++ programmer would strongly object to. But it's the right solution for his students. Inside that you can also find:
inline void keep_window_open()
{
    cin.clear();
    cout << "Please enter a character to exit\n";
    char ch;
    cin >> ch;
    return;
}
 
sbi
@FredOverflow The first thing they learn is "Hello, world!", where no runtime errors should arise, but which are simple enough to not to clutter the explanation of single-stepping through the code and using breakpoints.
 
just because Stroustrup does it doesn't make it right at all
arguably, I would say that the way he dealt with many things that cropped up in C++ that don't deal with C compatibility are actually kind of bad, and I'm not sure that I respect his judgement
 
sbi
@FredOverflow So this is something over which I disagree with Him. There's a few already, might be half a dozen now. So?
 
but I don't respect any judgement which is just handed down from the ether
Stroustrup can come justify his opinion if he wants me to take it seriously
non-justified opinions are worthless, whoever they come from
 
10:29 AM
@sbi I don't understand what you mean in your second sentence. A few of what?
 
A few somethings.
 
sbi
@FredOverflow Things I disagree with him over.
 
a few things over which Our Glorious Leaderâ„¢ sbi disagrees with Our Glorious Creatorâ„¢ Stroustrup
 
hmm
kind of reminds me of Kim Jong Il
don't they refer to him as their Glorious Leader in North Korea?
 
sbi
10:32 AM
@FredOverflow You know, one thing my students used to fuck up rather badly was inputting. They put std::cin into a bad state and then wondered why the next input would not wait for them to enter something. What do you think would happen to this fabulous hack in such a case?? The console window would close before the students had a chance to even see what happened! Then that is the moment you would have to introduce them to basic debugging techniques - on top of their current problem.
No, rather teach the right way right from the start.
 
@sbi The students cannot break std::cin because we completely shield them from it until week 13 or something.
 
wouldn't the clear() call clear any bad state cin is in?
 
sbi
@DeadMG Yes, it would.
 
Ah, writing efforts progressing a bit. A few more pages. Yes that's the c++/unicode/windows thing.
 
@sbi Basic debugging is taught in week 3 or 4. You know, putting break points, step into, step over etc.
 
sbi
10:35 AM
@FredOverflow And starting their IDE, typing, and compiling is taught when? Sorry, you will have to teach a few basic techniques before you can start creating and testing even the simplest programs. single-stepping and breakpoint-setting is among those.
You can teach the rest of the clever debugging techniques later anyway.
 
@sbi week 1. And I don't agree that debugging should be taught from the start.
 
@FredOverflow - when do you introduce debugging then?
 
sbi
@FredOverflow Neither do I, except for a few basic things. Really, you wouldn't teach all the capabilities of the editor from the start either - yet a few things they will have to know before they can start typing in their programs.
 
5 mins ago, by FredOverflow
@sbi Basic debugging is taught in week 3 or 4. You know, putting break points, step into, step over etc.
 
debugging should be taught as soon as students are capable of introducing bugs
 
10:40 AM
Most bugs students introduce in the first 1 or 2 sessions are compile-time bugs.
Like forgetting the semicolon or mis-spelling a variable name.
I think debugging should be introduced when students have a first feel of compile-time error vs. runtime error. And that simply does not happen in week 1.
 
sbi
@FredOverflow Nor do they need to debug in week 1. So have them start without the debugger and be done.
Really, I had students who were unable to browse through a folder hierarchy on the drive, search for an .sln file, and open the damn thing. (That is no joke.) What do you think I would do with these? I told them that a few basic techniques are necessary to know before you can start programming, that I would help with all those that are about the tools exclusively used for programming (compiler, IDE, etc.), but they need to know how to find and open a damn file to be in my course.
The professors (I was an external lecturer) backed me up on this.
 
@sbi I'm not exactly pristine but I once had a person not understand the concept of a "file" let alone how saving into folders worked.
 
@sbi - 2 years ago there was a student in one of the labs I was in that couldn't open an browser and view the worksheet at the URL shown on the projector without help
 
Some people are just tech defficient to the max.
Hey do you guys have any links to a good makefile tutorial?
 
i once had a student who could not compute 1 percent of 100.
 
10:47 AM
Haha
Are all of you professors/ta's?
 
I'm an RA
 
sbi
@oorosco I think none of us is, and consider it unlikely any of us ever was.
 
sbi
@awoodland What's that?
 
@AlfPSteinbach WTF is an homeopathic economist?
Oh, it's a fake news site.
 
10:48 AM
@sbi - Research Associate - non faculty, first postdoc
 
sbi
FWIW, I once had a male CS student who had an email address with the same last name and a female first name common in the generation of my parents. After having somehow managed to pass two semesters of Java programming he was unable to call a member function on an object given the object, the functions name, and the necessary argument. He tried my course three times, with 6 chances to take the examinations, always declined to even try until the 6th and last chance, and failed badly then.
 
@AlfPSteinbach - I rather liked this homeopathic A&E sketch
 
I'm going to go to my first comp. sci. competition in a few minutes. :D
 
@Maxpm - competition?
 
10:54 AM
that A&E thing was funny :0
 
@sbi I sometimes wonder how something like that is even possible. I have encountered my fair share of students just like that myself...
 
OMG you get money prizes?
All I ever got was... well, nothing.
 
Must be some programming dyslexia.
 
Yeah, and the problems are like "print a pyramid of * characters."
Cake, but it usually boils down to how fast you can do it.
So I'm a little nervous.
 
Well, good luck.
And send me the money let us know how it goes.
I ran such a competition in my last year at high school. One of the teachers managed to convince a local shop to sponsor it and provide prizes.
But since I was running it, I couldn't get the prizes :(
 
sbi
10:59 AM
@FredOverflow This guy put an enormous amount of energy into cheating. He would copy the solution for an assignment from someone, and then sit for hours to understand and modify it, so I wouldn't be able to catch him out. He must have wriggled through several semesters of CS study with that. However, my examinations didn't check whether someone remembered what I had said, but whether they had understood, so learning the script by heart didn't help him.
Apparently, nobody ever had done this to him and he considered it an injustice that I did.
 
The whole thing was a disaster though. There were three prizes, but only two students manage to score at least one point.
I like to think I didn't pick problems too complex.
Is this incredibly complicated?
 
@RMartinhoFernandes no, it is perhaps too simple
 
Well, only two out of twenty managed to solve it :(
 
Minimum number of bricks moved != minimum number of brick moves. (Just commenting on wording and not the actual problem here.)
 
@sbi At our university, we have come to the conclusion a long time ago that 100% cheat prevention is simply not possible. So we don't put too much energy into preventing it. As long as someone is able to explain a solution and answer questions about them (Why do you do x here instead of y, what happens in line z), we are happy. Of course, if someone is unable to answer these questions, we often ask "Did you write this yourself?", and most cheaters immediately fold like a deck of cards then.
 
11:03 AM
@LucDanton In this case, it is.
 
One of these cheaters even had an @author tag in their source code with my name, and when I asked him what an @author tag means and why it has my name on it, he couldn't answer the question :)
 
@RMartinhoFernandes Well then yes it is too simple.
 
@LucDanton Well, that's what I thought, and I included that one as the problem that everyone could solve, so that it wouldn't be frustrating for anyone.
 
I fear that while the solution is simple, understanding the problem might not be.
 
sbi
@FredOverflow You know, when the guy put so much energy into making the thing his own, I wouldn't even object if I had seen him copying it. But he would only learn by heart, repeatedly asking those he had copied from what a certain line does, until he had learned it. I even suspected that he took several different solutions and combined them somehow, probably with help from others. But he would never remember what he had shown me even a week later, when a new exercise was based on the last one.
 
11:06 AM
E.g. when I hesitated on the wording, what's the skill set to use to solve the problem, and what information in the problem is useless.
 
i think it's difficult to draw the line between copy-and-modifying, and cheating. we do have to copy the letters we use, and even the words, and certain sentence constructions, even whole sentences. so also in programming.
 
sbi
I found that I seem to have been the first lecturer my students had to turn in code who actually looked at their code - and rejected it when it was bad. In the beginning of every semester the students were shocked to find that I put aside their program's result ("I was sure you could hack something together that would do what the spec demands, but now let me see the code please!"), and bashed their code for illogical structuring, stupid identifiers, etc. That had never happened to them.
 
I translated the problem into Portuguese for the competition, so that wording might not correspond exactly to what the contestants saw.
But yeah, you need to think a bit to get the solution.
 
Dunno what the intended public was, but I know some people would just balk at the avalanche of information. Some would thrive though.
 
15-16-year-olds after having 2 or 3 years of programming classes.
 
11:09 AM
@sbi Sometimes I don't bother to have the students run the program. But I always look at the code :)
 
@RMartinhoFernandes Then I can't vouch for the Portuguese version but I think the real obstacle with what I've seen would be understanding the problem, not solving it.
 
sbi
@FredOverflow Yeah, I did that, too. At the two universities I did that (FH's for Germans), all students were shocked.
Often I looked at the code, then had them run their program, and provided input that would break them. :)
 
@LucDanton am i misunderstanding something? what i understood was that bricks had to be put on top of the too-short piles to make them average height. total # of bricks moved = total difference from av. height for the too short piles, yes?
 
Two more gems from the Stroustrup header:
using namespace std;
#define vector Vector
 
11:12 AM
@FredOverflow wow
 
@sbi You must be a terrific tester then :)
 
@FredOverflow ouch, is it true?
 
Concentrate!
 
@AlfPSteinbach yes
 
sbi
@FredOverflow No, that's not serious, is it?!
 
11:14 AM
@sbi click the link :)
 
sbi
@StackedCrooked You bastard, turn this off!
 
Lucky, still in the two minute mark.
Btw, you can use adblock locally to remove something from the DOM.
 
hmm th\at broke firefox
 
sbi
@StackedCrooked Luck you! I would have flagged that.
 
Hey how can i find out where the memory location is in my .cpp:

First-chance exception at 0x75f3b9bc in project_3.exe: Microsoft C++ exception: std::out_of_range at memory location 0x0022ef3c..
 
sbi
11:16 AM
@FredOverflow Actually not, but they failed at very simple tasks. (Like checking for std::cin >> i to have succeeded before proceeding.)
 
@sbi I don't mind a 30 min ban occasionally :)
 
@oorosco Use a debugger.
 
I'm using visual studio
 
sbi
@oorosco Start your program with F5.
 
And it throws that. Orr are you telling me to step through until that happens?
 
11:17 AM
@sbi At our university, we do "Labor-Übungen", in which we coach the students while they are writing the code. Not looking at the code is pretty much impossible :)
 
sbi
Unless you have fiddled with the rpesets, the debugger should break at an exception thrown.
 
Yes i want to see that point lol, but it takes me to a locked class where the final throw or w.e. is made instead of my erring location
I have a lot of things to step through potentially if i debug which is why i'ma sking how to "jump" to it
 
sbi
@FredOverflow Here, too, but the first who tried to turn in their work were always the best, those who had done it at home, or didn't need much help from me in the lab. So I hadn't seen (much of) their code by the time they tried to turn in.
 
@oorosco you can tell it to break on first-chance exception. do that.
 
sbi
@oorosco When you are at the point of the throw statement, look at the call stack. (Debug/Windows/Call Stack)
 
11:18 AM
@oorosco Tell the debugger to break on std::out_of_range exceptions.
 
How do i do that?
@AlfPSteinbach
 
@sbi right, same observations here basically
 
debug menu
 
There should be a window called Call stack around.
If not, "Debug > Windows > Call stack" should make it visible.
 
sbi
You can jump to different stackframes by double-clicking on a stack frame in the call stack window. You can inspect the variables in those stackframes, so you have a chance to see how you ended up there.
 
11:20 AM
Okay thanks :)
 
sbi
@StackedCrooked Ah, you switched to FF7, too? :)
 
Meh, I seem to be failing.
 
sbi
@StackedCrooked http://
 
@sbi What happens with FF7?
 
11:21 AM
 
@StackedCrooked Missing hot potatoes.
 
sbi
@RMartinhoFernandes When you copy links from the address bar, it sometimes omits the http:// and I have yet to find what rules are behind that.
 
Oh, thanks for warning me.
Oh, wait I'm running v7 already.
 
@sbi I use Chrome for browsing and only use FF for this chat. (Because I frequently quit Chrome and I don't want to reopen this every time I do that.) But, it's FF7 :D
 
sbi
That gets me at least once a day, sometimes ten times.
 
11:23 AM
Never run into that issue.
 
sbi
@StackedCrooked Yeah, but up to FF6 this never happened to me.
@RMartinhoFernandes In FF7?
 
Right, never.
 
sbi
Now this is curious.
 
I sometimes have to strip an s from https because the chat won't onebox with those. But that's because of an extension that chooses https over http.
I always get the correct link.
 
sbi
Maybe it's one of those extensions I'm using? A checkmark buried somewhere in the options dialog?
 
11:26 AM
Hard to tell, but possible.
 
sbi
Taking @Tony's job to post funny pictures, here's one I just ran into:
 
I wonder how many bug reports they get that are really bugs in extensions.
That must be annoying.
@sbi Poor kid.
 
@sbi the poor kid
 
sbi
@RMartinhoFernandes I bet it's far above 50%.
@RMartinhoFernandes You know, this isn't a real Uruk-Hai, so the kid won't be slaughtered and eaten.
 
It isn't? How can you tell? ;)
 
11:29 AM
Looks exactly like Lurtz to me.
 
cpx
@RMartinhoFernandes Exactly
The Uruk-hai are fictional characters in J. R. R. Tolkien's fictional universe of Middle-earth. They are introduced in The Lord of the Rings as an advanced breed or breeds of Orcs that serve Sauron and Saruman. The first uruks appeared out of Mordor in attacks on Gondor in . Terminology The name "Uruk-hai" has the element Uruk, which is a Black Speech word related to Orc, related to the word "Urko" in Tolkien's invented language of Quenya. The element hai means "folk", so "Uruk-hai" is "Orc-folk". A similar term is "Olog-hai" ("troll-folk"), used for a breed of especially strong and vi...
 
sbi
@FredOverflow Erm, because there never were any real Uruk-Hai?
 
What about the Third Age?
You're not trying to tell me that was just a story, are you?
 
@AlfPSteinbach Yes.
 
@sbi I know, sarcasm :)
 
sbi
11:34 AM
@FredOverflow I, of course, didn't know that you know, though!
 
Well, now you know :)
 
sbi
@cpx Wow, how did you find that?
 
Google Image Search?
 
cpx
Yeah.
 
sbi
11:35 AM
I've never used that. How do you do that?
 
You give it an image, and it search for it and stuff about it.
 
tineye can also do reverse image search
 
sbi
Ah, got it working already.
 
oh, wait, the world ends tomorrow
 
cpx
Its available for browsers like firefox, chrome but not sure about opera.
 
11:36 AM
@AlfPSteinbach What's special about tomorrow?
 
sbi
Thanks, I already learned something helpful today, and I hadn't even had lunch!
 
I assume that it works by creating a hash of the image. So I don't think it will work unless the images are identically binary.
 
cpx
lol
 
@StackedCrooked It works with non-binary identical images.
 
11:37 AM
@RMartinhoFernandes did you just disprove my point?
 
OK. So it's more clever than that.
 
@RMartinhoFernandes it's the end of the world
 
Sigh.
Why wasn't I warned before?
This is not fair.
 
"These dates can be trusted entirely because they come right out of the Bible."
 
sbi
11:40 AM
Sorry, I blew this the first time.
 
how is that scam still running?
and at what point does it become fraud in the legal sense? because they are making money out of it clearly
 
How are they making money?
 
from donations
"family radio" is clearly not poor
 
They're asking donations for what? To prevent the end of the world?
 
to spread the warning
there were loads of "I gave up $100k in savings" stories last time it was big
 
11:44 AM
Right, and then they spread the warning. I don't see how that makes it fraud.
> I re-named my iPod "The Titanic". Now when I hook it up, my iTunes informs me that it is syncing The Titanic
 
Turak mukto!
 
en.wikipedia.org/wiki/Fraud#United_States - the only bit that's dubious from that is point 4
 
No, wait, they ask money to spread the warning. And they spread the warning.
Also I doubt point 3 is provable.
How can you prove the world isn't ending tomorrow?
 
3 is provable for all the people that donated for the may 21st date
 
@RMartinhoFernandes Give me 24h to think of something.
 
11:49 AM
@awoodland But you said they donated to spread the warning.
As far as I know, the warning was spread.
 
but they only wanted to financially assist in spreading the warning because of a demonstrably false existing fact
I guess it's too complex to manage a private prosecution because otherwise the "have you had an accident that wasn't your fault" brigade would already be on it
 
sbi
@MrAnubis I think you mean Toruk Makto, no?
 
I like letting legalities to lawyers. I feel like they deserve it.
 
@sbi yes the same :) my bad english :( , thanks for correction
 
sbi
@MrAnubis That isn't English.
 
11:54 AM
@LucDanton - I half like an excuse to argue with people under a fixed and arbitrary set of rules (which often they wrote themselves) without having to worry about details like "morals"
 
@sbi heard it in some arab song though
@RMartinhoFernandes tinypaste.com/633f0
@RMartinhoFernandes can you help me visualize the line in text above "Care must be taken with this solution, because if the unqualified nondependent name is used to form a virtual function call, then the qualification inhibits the virtual call mechanism and the meaning of the program changes. Nonetheless, there are situations when the first variation cannot be used and this alternative is appropriate:"
 
Oh, a Toruk Makto is not an Harry Potter spell.
 
sbi
@MrAnubis It's Na'vi, though, not Arab.
 
Is Avatar worth watching without the 3D?
 
@RMartinhoFernandes noooo
 
sbi
11:57 AM
@RMartinhoFernandes My teenage daughter is a huge fan, so we've seen the DVD about twice since the movie.
 
@sbi arab songs can't use that word?
 
I'm not sure what conclusion to draw from that, but I'll note it.
 
sbi
@MrAnubis Of course it can, that doesn't make it an Arab word, though.
 
@sbi neither i said it's a arab word :)
@RMartinhoFernandes help me with that question please , actually i am unable to understand the virtual function part in that line
 
sbi
@MrAnubis And I didn't say you said. I just pointed out that, while it might have been in an Arab song, it's a Na´vi word.
 
12:04 PM
@sbi Confringo!
:D
 
lol "MAKEN U KRAZEE" I thought that was its name lol
 
Its name is Great Cthulhu.
 
sbi
@MrAnubis I'm a muggle.
 
@RMartinhoFernandes What book, comic?
 
12:09 PM
@LewsTherin It's from The Call of Cthulhu.
 
@sbi HP spells works on muggle's too! :) (in part 4 , a old muggle dies due to spell in starting)
 
sbi
@MrAnubis I know that. (Did I mention I have a teenage daughter? Rolls eyes.) I was pointing out that you won't get a response from me.
 
@RMartinhoFernandes mmn will check it out
 
@sbi I'm sure you're not a muggle.
 
sbi
@RMartinhoFernandes Well, I'm sure I'm not a wizard.
 
12:12 PM
> chainik: Almost synonymous with muggle. Implies both ignorance and a certain amount of willingness to learn, but does not necessarily imply as little experience or short exposure time as newbie and is not as derogatory as luser.
 
12:27 PM
considering that older versions of g++, like 4.4*, don't support nullptr: is there any (general) way of testing at compile time whether nullptr is supported?
 
Other than version checks?
 
sbi
I'm sure boost has a macro for that. :)
 
One that checks for versions.
 
BOOST_NO_NULLPTR
 
12:33 PM
Isn't nullptr implementable in 03?
 
12:48 PM
@RMartinhoFernandes Interesting idea. Perhaps with operator T*()?
 
struct nullptr_t {
    template <typename T> operator T*() const { return 0; }
};
nullptr_t const nullptr;
Lacks constexpr though.
 
You should use anonymous struct I think.
 
There is a std::nullptr_t.
 
Second overload is redundant, T* can be U const*.
 
12:50 PM
nullptr is the same as nullptr_t(); ?
 
@StackedCrooked typedef decltype(nullptr) nullptr_t; is the official definition I think.
 
nullptr comes before.
 
@RMartinhoFernandes Why is it in C++11 a language feature then?
 
Possibly it does something else I'm missing.
 
Because nullptr only works when everyone uses the same nullptr_t
 
12:53 PM
Really?
 
But why is it magic and not just a library thing?
 
How can I write a constructor taking nullptr if there are five nullptr types?
 
Perhaps to avoid &nullptr
 
Or a conversion to nullptr?
As for magic not lib, idk
 
@StackedCrooked Good point.
I think nullptr is an rvalue. Lemme check.
 
12:54 PM
@DeadMG It would simply be a compiler error. And why the hell would you write a constructor taking nullptr?
 
@RMartinhoFernandes It is.
 
It is- just like true and false
All the new smart pointers can construct from nullptr
 
@StackedCrooked T(std::nullptr_t) = delete; T(void*); means you only take void*.
 
It reduces ambiguity
 
12:56 PM
Also, missing pointer to member conversion in my code.
 
Heh, not quite sure about my example, GCC accepts passing int*.
 
int* converts to void*.
 
I suppose a better example is struct foo { constexpr foo(std::nullptr_t); /* some pointer valued constructor */ };
 
template <typename U> T(U*) = delete; T(void*); is what you want.
 
@RMartinhoFernandes Well no that's a poor example of how nullptr is useful :)
 
12:58 PM
@LucDanton But does what you said your previous example did!
 
@RMartinhoFernandes My previous example accepts any pointer but nullptr!
 
Why did you mention GCC accepting int* then?
 

« first day (369 days earlier)      last day (4562 days later) »