« first day (643 days earlier)      last day (4319 days later) » 

10:00 AM
Thats what I do here: http://ideone.com/Qw2Uf
But that's clearly problematic, it only works well for POD types and when you don't pass it to a templated function
 
Python's descriptor protocol is pretty crazy: docs.python.org/dev/reference/datamodel.html#descriptors
 
`I wonder where is the mistake, is it with the logic` - us to. Perhaps it is supposed to run forever? Who knows — sehe 6 secs ago
Urff. Fixed the typo btw
 
so auto name = person.name translates to auto name = decltype(Person::name)::operator.(person.name); person.name = newname translates to decltype(Person::name)::operator.(person.name, newname)
 
but what if I just want to simplify the setAge(int) and getAge() functions?
 
um, and person.name += " The Great" translates to decltype(Person::name)::operator.(person.name, decltype(Person::name)::operator.(person.name) + " The Great")? Or something, haven't really followed through with the details.
 
10:05 AM
so I have to make a class for my int just to... oh wait, I already do that with my attr<...> wrapper
that actually sounds ok...
I like it
yeah compound operators do pose a problem
My laptop is at 7% battery, I decided I'll go to bed when it dies... so if I never say goodbye, not that I think anyone cares, that would be why
 
A shooting near Denver.
+14 dead
+50 injured
last night*
 
Why batman though?
 
Oh boy. You mean, last night, I presume
 
@Flexo exactly what I was thinking...
 
this is why I don't do JS, just locked up IE ¬_¬
 
Xeo
10:10 AM
room topic changed to Lounge<C++>: Somebody take over the topic [c++] [c++11] [c++-faq] [needs-topic]
 
You go to watch a goddamn movie and get killed.
Preliminary reports suggest even kids and babies were killed.
 
Xeo
The world is fucked up, I thought we went over that already.
 
@DomagojPandža What. Kids and babies in the move theater at midnight?
 
I think we keep bringing it up because its fucked up that the world is fucked up.
 
@Xeo Never hurts to reiterate
 
10:12 AM
@sehe Yeah, I was surprised too... Isn't the movie 17+?
They brought in a robot for explosives
 
I feel like going all torrettes saying that
 
Xeo
ugh, so much stuff broken now...
 
@DomagojPandža I can see that. It's live
@vedosity You mean, de la Tourette?
 
Xeo
damn, my mIRC ini is completely reset, fuck.
 
Such things always seem to be "themes of movies". Situations like these really bring the horror to life.
 
10:14 AM
@sehe Tourette syndrome, yes
 
It doesn't look real, damn.
 
Xeo
I don't even want to know what else is broken, ugh...
 
I just realized that was a live video, looked at the time in the video, and realized that I'm so sleeping in tomorrow. Way in.
 
And being a first responder to such a scene, damn. Adrenaline levels.
 
@Xeo The world?
 
10:17 AM
@Xeo Is that because of the chkdisk or was that the Cat? What happened?
 
Xeo
must be chkdsk
 
Helpful of it
 
Xeo
killed atleast 1 directory, 1 anime movie, and the mIRC ini
 
topic corrupted, format and retry? yes/no/cancel
 
Good thing you had documents backed up
 
10:17 AM
I have only one question. Why? Why do such a thing?
 
when did this happen?
About an hour ago?
 
room topic changed to Lounge<C++>: Topic corrupted, format and retry? yes/no/[cancel] [c++] [c++11] [c++-faq]
 
Xeo
WTF
 
@vedosity Just after midnight denver time
 
Xeo
is every single fucking .ini reset or what?!
 
10:18 AM
@vedosity 00:30 local time, Aurora, ~Denver
 
Xeo
screw this, foobar2000 is also reset -.-
 
@Xeo reset ALL the user preferences!
 
But the quality of the video and the news.
Wow.
 
Xeo
really, WTF
whyyyyy
oh, awesome, TS3's settings are not reset.. "yay", I guess
 
hey, are all objects held in an std::map safely destroyed when the map goes out of scope? e.g std::map<my_obj, my_obj2> will the destructors of all the my_obj and my_obj2s be called?
 
10:21 AM
My battery is almost at the 1%... I wish that meant it was rich with power
 
@DomagojPandža I'm tempted to say it's irrelevant. But, yeah the quality does strike me as excellent
@IntermediateHacker Yes. Of course
 
nice. I was a bit unsure.
 
C++ is just amazing like that
 
@vedosity %battery would point to such things
 
guess that means I can't blame std::map for the undefined behaviour
 
10:22 AM
In that makes you a bit unsure?
:):)
 
@IntermediateHacker RAII, baby.
 
@DomagojPandža Exception safety guarantees, actually, honey
 
It strikes me as odd that the guy surrendered. I expected a suicide or someting.
 
'updation' ¬_¬ working with people with a poor grasp of the language you are working with is tedious... does the red line not make them think, hmm maybe I did use the wrong word
 
@DomagojPandža I hope he has a hellish time in prison before he goes to hell if there is such a place
 
Xeo
10:23 AM
okay, atleast only foobar's UI was reset...
too bad I have no idea how to get that back -.-
 
I have a feeling they're going to kick his ass.
A blanket party, at least.
 
@vedosity 'book of blood' comes to mind...
@DomagojPandža a la 'full metal jacket'?
 
I am really curious what is going through the guy's head right now.
 
Not enough bullets
SCNR
 
Can I generate a class based on another class's fields at compile time?
Ie I have `class A { int x; int y; }` I want `class B<A, N> { int x[N]; int y[N]; }`
Fuck you markdown.
 
10:28 AM
so... you want to create a template class, that get's its types based on the types another class uses?
 
Yes.
 
how would the compile know which types to use?
 
:4606620 class A{ int x; int y; }; class B<A,N> { decltype(A::x) x[N]; decltype(A::y) y[N]; };
 
@Cicada You'd have to use a tuple instead of class A. Then, Boost MPL would easily do the transformation for you
 
Dunno. Template magic?
 
10:28 AM
@Cicada oh right, of course :P
 
@thecoshman I think you can safely let the 'think of the question' part to the asker :)
 
you could get more magic with pointer to member variable in variadic template I think
 
I just love the emergency lights of police vehicles.
 
@Flexo I was assuming, generically
 
but you'll still need to name the variables explicitly
 
10:29 AM
Ah =/ I want a generic thing.
 
@Cicada ;o
 
15 people, damn.
 
@Cicada can you modify A or say anything more about it?
 
I have full access to A indeed
Basically I want to have a class that holds many instances of another class
But instead of storing them as an array, I want each field to be stored as an array
This is for sequential memory access (CUDA strikes again)
 
thinking you might be able to do something magical with a macro in A for it's members
 
10:31 AM
@DomagojPandža I don't get this:
 
ah, your after le good old 'class of array' rather then 'array of class'
 
Is this the shooter coming out? Everyone seems so relaxed about it, including the officers
 
@thecoshman Yes. But generic.
 
is the number of arrays generic?
 
@sehe What the hell? That's just disturbing. And what are these schmucks doing at the door, they should evacuate to safety.
 
10:35 AM
@Cicada Perhaps you can just use the std::array<> or std::vector<> per member storage, and create an accessor struct only for convenience:
struct Accessor
{
      Accessor(size_t index) : _index(index) {}
      int & x() { return x_arr[_index]; }
      int & y() { return y_arr[_index]; }
private:
      size_t _index;
};
@DomagojPandža Erm... tending to the wounded, likely.
 
@sehe if am not mistaken, she wants a generic class, that can convert a struct{int} or a struct{int, string, foo} into a series of arrays for each type
 
@thecoshman Duh. I can read. I can also invert the question if I think it is more feasible
 
which might required some macro wizardry...
 
""He did not resist. He did not put up a fight," Fania said. Police seized a rifle and a handgun from the suspect, and another gun was found in the theater, he said."
Regardless, shoot on sight.
 
@DomagojPandža Of course not, he'd escape punishment
 
10:37 AM
@DomagojPandža oh, so your American ¬_¬
 
He killed 15 people. And wounded another 50. Including a six years old.
I don't know if there is a punishment good enough for this asshole.
 
Xeo
@DomagojPandža And there are people who killed 80 others
or who abduct and rape little children, killing them afterwards
 
Same goes for them.
I mean, what the fuck? What needs to snap in your head to do such a thing?
 
Ell
you might realise that life is pointless
or that there is no heaven or hell
or something to that extent
 
@DomagojPandža death is not a punishment
 
10:41 AM
lol
I don't believe in god, heaven or hell. Actually, I have a firm basis to claim otherwise.
 
Ell
I agree
solitary confinement is much worse than death, IMHO
 
In this example: ideone.com/iSvvQ. The value returned from the function giveMeA will not be copied but moved into a? In C++11
 
Ell
imagine being locked in a tiny cell for years and years
 
But that isn't a reason good enough to kill people.
 
besides, there are lots of disease and drugs we can use him to test with
 
10:42 AM
I appreciate the 75% of a century I got.
 
@DomagojPandža ¬_¬ you'r 75?
 
I'm optimistic. :Đ
 
¬_¬ do you know the difference between 'got' and 'hope to get'?
 
@DomagojPandža Perhaps nothing. You shouldn't assume the same thing area has ever been right in people like this.
 
@thecoshman Don't make me throw an exception, you nit-picky bastard. :P
 
10:51 AM
@ManofOneWay Was this answered? I think it would be better to pass a temp by value into the constructor. That way, after inlining, the compiler will trivially change the member initialization into a move construction since the temp is going out of scope anyway.
 
@DomagojPandža meh, I'll just re throw it
 
@ManofOneWay That and the RVO you already knew about, I assumed
 
LOL ! Great Venn Diagram!
Select * FROM cookies inner join sex on cookies.food_id = sex.food_id where NOT EXISTS ( select 1 from sex , love , firendship where (sex.relationship_id = love.relationship_id) AND (sex.relationship_id = friendship.relationship_id) );
 
@sehe I'm curious in how the compiler handles the RVO since the returned value is created in another scope. I don't see how you trivially move a value created on the stack frame for a function to the previous stack frame without copying it.
If the function is inlined sure, but if the function is not inlined I would see a problem
 
Xeo
hm, atleast mIRC and foobar now seem to be back to their old UI... I hope I got it right >_>
 
10:57 AM
@ManofOneWay The stackframes get modified by inlining
 
Morning Everyone BTW
 
@sehe As I said, I understand if the function is inlined. But if it's not?
 
I think RVO is usually done by passing a reference to a 'virtual' parameter into the function, that receives the result value
 
Yup, that's the whole point of RVO, it doesn't act when the function completes as the "standard" prescribes it, it can just reference a piece of local memory (receiving stack frame) that is used to "return to".
As long as the program works as intended™, the standard doesn't mind.
 
hi
Is Microsoft Network associate status difficult to attain
Microsoft Network Partner
 
11:05 AM
@techno Erm. Yes, it is about 142 difficult
 
What?
i mean standard membership Microsoft Network Partner
any one have any experience?
 
@techno Very very very difficult. Don't even think about trying to attempt it.
 
@ecatmur I don't mean gold/silver
@ecatmur Just membership in Microsoft Partner Network.
 
I think it depends on who you know
 
11:10 AM
If i recall correctly , you have to be "introduced" as a partner by one of higher status
 
@LeandroArielPezzente Means?
great
 
actually that could be simpler now
 
i did not know it was this difficult
 
I was going to generate meta information and then traverse that with recursive inheritance
 
@Flexo woot. BOOST_FUSION_ADAPT_STRUCT much ? :)
 
Ell
11:19 AM
I think static reflection would do no harm
 
@sehe damn didn't know about that
 
That is almost exactly the same. Adapts to a Fusion Sequence - which can transparently be used as a MPL Sequence for meta programming (it models the MPL Sequence concept)
IIRC
 
lulz
 
11:35 AM
hey guys, I've found a revolutionary way to write comments from the source that I am investigating now:
#if (0)
many lines
of comments
#endif
 
I'm utterly flabbergasted.
 
Extraordinary.
 
innovative thinking!
 
@Riga That's appalling
 
yes, quite... useless.
 
11:38 AM
this is the first time I see such a trick :)
 
@Riga There's probably a reason for that
 
That's not a trick, that's stupid.
Unless they're keen on C89 compat.
or wait
 
no the man just thinks "differently" you know :)
 
@Riga patent it!
 
C99 introduced //. /* */ was there all along.
 
11:39 AM
like Steve Jobs said :)
 
Xeo
/*
many comment
lines from
here on
*/
so, how is yours really different?
 
^ less typing!
 
@Xeo Brilliant!
 
yeeah
 
@rubenvb Really? Huh.
 
11:39 AM
@rubenvb /* doesn't nest. So, #if/#endif beats it! /cc @Xeo
 
@Maxpm yeah, I got confused.
 
Xeo
@sehe OMG! brb, regex search/replacing my comments
 
D has nesting comments- *shot*
 
@sehe oh bullocks. If you're nesting comments you should learn how to write code.
 
@sehe Nuh uh.. If my comments had #endif in it, I'd be screwed
 
11:40 AM
^that.
 
Xeo
@Neil Only at the beginning of the line
 
I'd be asking for trouble, but all the same
 
Xeo
if the line doesn't start with # (minus whitespace), it's not a preprocessor directive
 
But the preprocessor converts comments to whitespace before macros
 
@Xeo And if the line doesn't contain */, it's not an end comment
 
11:42 AM
My favorite is still the `??\` trigraph.
 
so in a sense, comments are preprocessor "directives"
 
Markdown, I will lead you into the woods and shoot you in the dead of night.
 
@Maxpm double the `\`.
crap
Markdown pwnage.
 
Plus, if someone ever actually proved that 0 == 1, all your #if (0) commentary would go to hell
 
@rubenvb Not really.
I heard Clang used to keep comment information in the abstract syntax tree or something.
Which is obviously very separate from preprocessing.
 
11:44 AM
yeah, ok. But Clang is an advanced compiler.
The preprocessor as described in C99/C++11 does remove comments.
 
Most languages have comments, but not preprocessors. Maybe comments are ignored by the lexer, but that's still part of processing.
Preprocessing comes before everything.
 
@rubenvb Hey, just pointing out the difference. Which it clearly is
 
@rubenvb Really? Comments are specified as the preprocessor's responsibility?
 
@Neil I can't help it if you mix methods :)
@Maxpm Yup
 
Wow. Learned something new.
Clang wasn't standard-compliant. Gasp.
 
11:47 AM
@Maxpm 5.1.1.2 in C99. Translation phase 3, before preprocessor directives.
@Maxpm what?
Phases of translation are purely a theoretical concept. The as-is "rule" applies here too.
 
The as-is rule?
 
Well, if it works the same way as described but implemented differently.
 
Hm.
 
probably not the right term I used, but whatever...
 
Clear enough
 
11:50 AM
Nothing prevents the compiler from keeping the comments with line numbers and still replacing it by whitespace...
C99 does not mandate a seperate preprocessor program.
 
I need to train myself to use IEC binary prefixes.
 
Don't.
 

« first day (643 days earlier)      last day (4319 days later) »