« first day (747 days earlier)      last day (4217 days later) » 

12:00 AM
@nixeagle How are you initializing class members that VS2012 can't do?
 
class A {
    public:
    int b = 4;
};
 
That ^
 
@Rapptz Ahh
 
Only way around it is macrology :/
 
user142019
I dislike that initialization style.
 
12:01 AM
I put so much effort into leaving no food in my place since I won't be there for a few days
And now I'm hungry
 
user142019
@Ell Awesome. xD
 
@Zoidberg'-- reason?
it is a C++11 feature.
 
user142019
Because I like to keep things in one place.
 
@Ell Does it only work when your pointer is outside the white box?
 
user142019
12:04 AM
And that is the ctor’s initialization list.
 
@Zoidberg'-- Agreed.. can you chain constructors in C++11 now?
 
@Zoidberg'-- and when you have more than one ctor?
 
@Ell The upper left corner is the best.
 
user142019
@Collin I think you can.
 
Ell
@Collin your cursor must be inside the box
 
user142019
12:05 AM
@nixeagle Initialize it in all of them.
 
So you wind up repeating yourself?
 
@Ell backward for me, it only finds the pointer when it's outside the box, otherwise it just sits there searching for it
 
I think that was why the feature was added. To avoid excess repeating.
 
@Collin delegating constructors?
VS2012 doesn't support that either.
 
@Rapptz Yeah, I guess, something like java's calling this() from within some other constructor
 
12:07 AM
class A {
public:
    A() {
        //
    }
    A(int a) : A() {
        // stuff
    }
};
 
Yeah
 
Yeah, pretty sure it isn't supported by VS2012. I'm not even sure GCC allows it either.
 
user142019
Clang supports it.
 
user142019
But Clang doesn’t support inheriting ctors. :<
 
@Zoidberg'-- it probably will soon, gcc and clang seem to be adding the C++11 features on a fairly rapid pace. Heck gcc already has -std=c++1y already.
That is they are already implementing proposals for the next standard.
 
Ell
12:13 AM
what is in the next proposal?
 
2014? Oh what is in, not when.
 
user142019
@Ell New stuff.
 
G++ now supports a -std=c++1y option for experimentation with features proposed for the next revision of the standard, expected around 2017. Currently the only difference from -std=c++11 is support for return type deduction in normal functions, as proposed in N3386.
 
> if u ar nue hear, plss tak ai quik lok tru duh noob hents. thnk yuo.
5
 
user142019
If you are a room owner, please don’t pin that. Thank you.
 
12:16 AM
@kbok Just die.
 
user142019
I’m going to sleep, motherfuckers!
 
Ell
@nixeagle 2017? whaaat? :/
 
@Borgleader is rdue
 
Ell, apparently that is when they are shooting to have the next standard out. You know, before delays and such.
 
12:36 AM
@Rapptz g++ allows it
 
Well, there will probably be C++14, probably with some minor features and bug fixes, and C++17 is planned to be next major standard version.
 
@kbok shouldn't that be "heants"? or "heents"? i think "hents" is wrong
 
Ell
@Cheersandhth.-Alf haha
 
That's impressive.
 
@StackedCrooked Why is every web page an app, nowadays? What happened to http?
 
I'm using it for a chrome extension and it's pretty good.
@CaptainGiraffe http?
 
apple/html5/phones.
 
@StackedCrooked http:// ?
 
12:57 AM
http is a central element in making webpages apps
 
he means what happened to web 1.0 and wants us to get off of his lawn.
 
I think he meant what happened to actual web pages with content.
 
You mean <HTML><HEAD> ...
Ugh.
 
or that :)
 
Yeah as an application protocol. Ajax and in particular SOAP seems to detest http.
 
12:58 AM
Though really, there are still quite a lot of webpages that have content, not apps.
 
Ell
@StackedCrooked wow I find that very impressive
 
ajax uses http, soap I don't have any experiance with
 
@Rapptz no=) but I appreciate your sentiment.
 
Ah well.
I still think it's annoying that a lot of webpages require javascript to function
 
most of the useful ones don't.
But if you detest javascript, how are you here?
 
1:00 AM
I only detest it because I use noscript and it's annoying to make exceptions when there shouldn't be any.
 
but yea I do get what you mean. Many pages want it that don't really need it so you wind up making lots of exceptions in noscript for the top level domains.
 
And it ends up just being fucking text.
With some divbar that requires javascript
 
but but... HTML5!... Web 3.0!
 
@nixeagle I want my running moose back. Please get off my lawn.
 
If I have a class that is hidden for the user and its only purpose is to be a backbone, should I make the constructor protected?
 
1:05 AM
No seriously, what happened to providing important stuff real urls?
@Rapptz Why protected and not private?
 
It's a base class that is going to be inherited by all objects.
 
@Rapptz I can think of very few uses for protected that make sense. I don't think this is one of them.
 
22
A: What are practical uses of a protected constructor?

Henk HoltermanWhen a class is (intended as) an abstract class, a protected constructor is exactly right. In that situation you don't want objects to be instantiated from the class but only use it to inherit from. There are other uses cases, like when a certain set of construction parameters should be limited ...

 
@Rapptz Have you considered factory functions? Do you want need control of the construction?
 
I saw this, so I guess I'm curious.
Honestly I just wanted to initialize it via just int a = 10 or something but now I have to make a constructor. The class is just there so I don't have to repeat code. The inherited classes can change the base values though.
 
1:09 AM
Fine, protected messes up (re)usability not actual code.
 
So bad idea I take it? The two answers I see on SO don't think so but I've never really done protected constructors before.
 
Ell
man xpath is so useful!
 
@Rapptz I don't use C++ for "full" applications, I do lots of science/math stuff. My focus is keeping the code/design simple. Thus I tend to avoid more obscure features/designs.
 
@Rapptz generally, you declare a constructor as protected in order to limit its use to derived class. and you generally, you want to limit its use to derived classes because you don't trust ordinary client code to use it correctly.
For example, in a class hierarchy each class might have protected constructors that simply pass some factory object upwards.
 
I'm more interested in making sure the computations are bug free and correct than fiddling with access patterns, instead trusting myself and the few others to use it correctly. At some point you just got to trust that everyone is smart enough to do the right thing. I mean remember that anyone can simply do #define protected public if they really wanted to x).
 
1:18 AM
Basically, the class I have is a base class that will be inherited by all the objects. I don't want anyone using the code to actually make instances of the base class.
 
In conclusion a protected constructor is a design trick used for complex APIs, not your own code.
 
http://ideone.com/SZnxsB
Made this example for a friend. Any errors?
 
Plus if you screw it up, it is obvious as initialization is wrong.
 
@nixeagle That'd be a pretty dumb thing to do.
 
1:22 AM
@Borgleader Yes rename unsafeFunction to unusableFunction you are returning a pointer to a nonexisting object. or a ref.
 
@CaptainGiraffe Unsafe, Unusuable the point was to illustrate what shouldn't be done. I want to know if I said something wrong. Not if my wording could be more accurate.
 
@Rapptz right, but it is possible. What I'm saying is at some point you have to trust that programmers can read documentation and not screw things up. I personally try to avoid unneeded abstractions and restrictions in favor of simply documenting the correct way to do things. As I said, YMMV. I like what Captain said about "In conclusion a protected constructor is a design trick used for complex APIs, not your own code."
 
@Borgleader =) ok. Unsafe could well be interpreted as driving without a belt. This is not driving without a belt. This is driving into Mr Marcellus Wallace.
 
@CaptainGiraffe Unsafe is actually a pretty good word because often timees these functions return the right thing because the values haven't been written over yet. However they're not safe because eventually something will overwrite them and this causes issues.
 
undefined behavior, go!
 
1:26 AM
I wanted to know if there was anything incorrect but since were arguing about wording I'll assume there isn't
 
@Borgleader Sure. Driving into Marcellus provided a positive outcome too =)
I just need to put this here youtube.com/watch?v=DCrDuGyZ6FA
Heres the positive outcome. youtube.com/watch?v=tVRPz6-Tkww
 
2:05 AM
Holy crap this place is dead
 
Time seems to be moving really slow for me. It's weird
 
Today was weird.
 
Do anyone here know how to use Interlocked::CompareExchange<T> in C++/CLI?
 
Anyone here written C++ compilers before?
I'm writing one for a new platform
 
2:23 AM
Nope.
 
nvm, figured it out :)
 
Ell
2:42 AM
@IDWMaster which new platform is that?
ahh I'm too tired
goodnight all :)
 
Night @Ell
 
@IDWMaster walter bright knows a thing or two about writing compilers. i don't know if he's on SO though
 
Has anyone here implemented any tail recursive compilers (for lisp, sml etc) in C++? I'm curious how one would design a way to turn recursion into a simple loop
 
Xeo
0
A: Compiler added optimization causes different behavior for "final" methods

XeoYou're entering the realm of undefined behaviour since you're accessing an object through a pointer / reference to a type that is not the actual type of the object. 3.10 [basic.lval] p10 If a program attempts to access the stored value of an object through a glvalue of other than one of the ...

@Mysticial ^^
And man, Nicol Bolas is just everywhere. oO
Anyways, 13 answers to go..
 
I don't run into the C++ guys too often anymore.
@Icekilla And with that restriction, you've just made a difficult problem into an extremely difficult problem. I'm not kidding... — Mysticial 1 min ago
Goddammit, C++ or at least Boost really needs a bignum library...
 
Xeo
2:54 AM
@Mysticial Well, d'uh, you're answering stuff most of us can't. :P
And not really answering much else.
 
@Mysticial Have.. have you always had that extra 'i' in your name? How did I not notice it before?
 
I run into all the assembly and SSE programmers now.
 
Xeo
Hrhr
@Collin Not another one..
 
I also do compiler questions, but I seem to be the only one in that field here.
 
@Collin No, it's a new thing :P
 
Xeo
2:55 AM
8 hours ago, by Rapptz
http://chat.stackoverflow.com/search?q=mystical&user=&room=10 lol
 
Whew
 
Told you man, over 100.
 
Xeo
@Borgleader Stop trolling. :P
 
I saw you commenting on that final optimization question and thought it was someone trying to subtly impersonate you
 
Xeo
Dammit, how come my internet is so slow right now.
 
2:57 AM
@Xeo Awww cmon! :(
 
Much too late for my troll awareness to work
 
Xeo
Okay, I have a choice pop up right now.. edit either the question to make the class names match what I used in my answer and get away without that annoying "edited X Y ago", or go the proper route and edit my answer, or just leave everything alone.
 
Xeo
@Rapptz So? That's neither standard nor Boost.
That's what @Mysticial was talking about
 
I know I know.
 
3:01 AM
@MK. For something that needs to fit into a Stackoverflow answer, it's pretty big. — Mysticial 53 secs ago
 
I just remember discussing this a while ago.
 
Feel free to link that on the comments.
 
Xeo
Phew, I just checked and never screwed up @Mysticial's name. Must be because I always just type @Mys(t)<tab>
 
Oh wow, implementing it in C? That's pretty annoying.
 
So the size of your e-penis in this room is inversely proportional to the # of times you've screwed my name... awesome...
 
3:05 AM
inversely proportional?
 
Xeo
@Rapptz The less, the better
 
I know what inversely proportional means.
 
Xeo
What did you mean then?
 
Possible division by zero.
 
Xeo
haha
 
3:07 AM
@Rapptz That means you have an amazing dick.
 
Xeo
But you mean "by zero", right?
Or I'm getting confused.
 
oops
 
Xeo
Okay, taking rep bets: What will happen first: Me reaching 200 answers (missing 13) or KerrekSB getting 1000 upvotes in (missing 34)?
 
latter
 
Xeo
I feel like that too. :(
 
3:10 AM
I put my money/rep on Kerrek. :)
 
It's okay. Top 5 is better than Top 10.
 
3:30 AM
What will happen first, me getting 3k rep, or christmas :P
 
"This question has been deleted - no more answers will be accepted." after typing a full answer
 
Xeo
Gotta love that
Linky?
If it's not mod-deleted, we can undelete it.
 
but i don't think
it's nice to undelete against the OP's wish
 
good evening everyone :)
 
Xeo
3:38 AM
night
 
4:04 AM
tea time
 
4:24 AM
^ Impossibly chill tune.
 
 
1 hour later…
5:27 AM
what does mean, "Ghent sound"?
2 hours ago, by Cheers and hth. - Alf
it's nice to undelete against the OP's wish
 
Sound that's popular or created in Ghent I suppose
 
^ Just an exercise in out-of-context quoting.
the villa remix doesn't even sound like the same tune
i need to learn about remixes
 
@Cheersandhth.-Alf Ghent is the city that I live in. But I never heard of "Ghent sound".
 
it says in the youtube comments
 
Google doesn't know either.
@Cheersandhth.-Alf Aah I see it now.
 
5:36 AM
he he
co incidence?
i think!
 
Apparently the song is frequently played in Ghent.
That's probably why I like it :)
 
"i think!" ← C++ programmers' way of saying "I think not"
 
The friendly way of saying that you disagree.
Reminds me of how my great grandfather always told me: "A C++ programmer must not think, he must know!"
 
Your great grandfather?
 
5:42 AM
^ Lots of views, means = good?
 
Hm, I suspect Justin Bieber gets lots of views.
So it's not a single decisive factor.
 
@Cheersandhth.-Alf Help I'm alive ... That's Metric!
It's one of the bands I used to listen to a lot a few years back.
 
i was going to ask, how can find out about artists?
like
what does "liquid" mean? like ...
 
6:01 AM
Liquid? Dunno perhaps the word reminds some of quicksilver.
 
i think it is like waves maybe
i got lost in some house/trance music on youtube. not my kind of music
i don't understand why network works
 
@Cheersandhth.-Alf With "work" right in the name, it simply can't help working! :-)
 
think sentences about self could be like methods, with implicit first "i" argument
cout << "just" "ice" << endl;
 
In Japanese the pronouns are usually omitted.
 
6:42 AM
0
Q: C++ Counter modify loop

Justin Y.#include <iostream> #include <string> using std::cout; using namespace std; int counter; int main() { int penguins; cout << "How many penguins? "; cin >> penguins; for (int i=0;i<penguins; i++) { cout << "\nPenguin generated: "; ...

 
6:53 AM
I dreamed about meeting Bjarne again, and he even remembered my name, but it turned out he had me confused with somebody else much older with the same name :(
 
7:30 AM
Well, it could be worse.
 
At this rate, I'm going to get the Tumbleweed badge.
How many views is low views, anyway?
 
> I see it more as a consolation prize. No one looked at your question or answered it, so here's something to hold you over until you get an answer.
Tumbleweed is a funny badge.
 
Populist is even funnier.
It's a consolation prize for not getting the accept and an award for insulting the OP.
 
Also, since @tweet_xeo wasn't with us, every pub we came by was open and in one of them people even just left to free seats for us. :)
@Xeo see, it was your fault.
 
7:48 AM
Oh hey, there goes my tumbleweed.
I don't know if doing your own Q&A counts for that anyway, though.
 
user142019
Hello, friends.
 

« first day (747 days earlier)      last day (4217 days later) »