« first day (263 days earlier)      last day (4700 days later) » 

7:02 PM
brb, gotta go windows
 
Ugh, dual-boot.
 
what do you normally run @kbok?
 
@Martinho From what you sent me I have seen that if I want a function to be inline the definition must also appear in the header file. The reason I asked was that in a question from the book im studying it asked me to make an inline function print, however in the book solution (which I had to buy), it put the function definition for print in a seperate file therefore the book author actually answered his own question wrong. Good way to confuse your readers.
 
I'm not completely sure if that is wrong.
Modern compilers are damn smart, and they may be able to inline functions even in that case.
 
The books dated 2000. Suppose i'll just have to continue on and hope that with more practice with this language i'll get a better understanding of how it works. Thanks again for your help.
 
7:11 PM
@Collecter arch linux
 
alright
 
@Collecter Is installing steam mandatory ?
 
pretty much
since you buy and install through it
to play online i am pretty sure you need to be logged into steam anyway
 
I see
 
(right now their summer sales are going on, i love the bargains, just be careful and not buy every game simply because it is cheap)
 
7:14 PM
I often do that on gog.com
 
you can buy beat hazard through other means, but that and its expansion are cheapest on steam
 
Hum I have an error, "Your account creation request failed miserably."
 
When trying to make a steam account?
 
yes
 
@MartinhoFernandes Hitchhiker's Guide reference
 
7:24 PM
Yeah.
 
I remember phrases....
Especially unique as HhG
 
I have no idea. try a different username?
 
Narnia books have quite a few like that.
 
Not a big fan of those.
 
Series of unfortunate events.
Also has a strange way of describing things that follows that pattern
 
7:26 PM
Haven't tried those :(
 
Extend the phrase as long as you can....
 
@Collecter I hate these useless error messages. Like when Websphere MQ says "ERROR 6114. BYE"
 
Account creation failed miserably..... => Password length too short.... little did you know
Or maybe they didn't want to say
Account creation failed. Ran out of space on server harddrive.
Or....
Account creation failed. Reached hard-code limit of 1,468,342,220 accounts
 
Username too short. They sayd it was OK but I changed and there we go.
 
Nice.... told you it was something that simple
Error: Error
 
7:30 PM
Error: Success
:)
 
That sounds more like Steam
You actually downloaded the game.... must be something wrong.
Uninstalling
 
hi
struct Foo {
    boost::function<void()> bar;
};
 
Hi @StackedCrooked
 
^ can I use lambda instead of boost::function as member here?
@kbok howdy
 
Error: Stack underflow
 
7:32 PM
@StackedCrooked How so?
Lambda types are unnameable.
 
unnamable? :(
 
process stack size negative.... reaching meta-space.... ejecting... downloading universe.... internet done!!! All your memory...
 
Wait, you're talking about C++11 lambdas or Boost.Lambda?
 
@MartinhoFernandes C++11 lambda
 
One day.... lambdas and l-ions will lie down side by side....
 
7:33 PM
@kbok so it is working now?
 
So they can't be named with typedef either?
 
fission mailed...
 
@StackedCrooked You can with decltype. But that's not very useful.
 
@MartinhoFernandes Very Useful(TM)?
OK....
 
typedef decltype([](){}) foo; auto y = [](){};
 
7:35 PM
declare type lambda, and then you still can't make a member out of it
 
The type of y is not the same as foo.
 
huh.... that makes no sense.
 
Each instance of a lambda expression has a different type.
 
@Xaade updating
 
That's what auto and std::function are for.
 
7:36 PM
typedef decltype(int) WHAT; auto y = 45; WHAT and y are the same.
 
@Xaade But 45 is not a lambda.
 
0
Q: C++11 lambda as member variable?

StackedCrookedCan lambda's be defined as class members? For example, would it be possible to rewrite the code sample below using lambdas instead of function objects? struct Foo { boost::function<void()> bar; }; void hello(const std::string & name) { std::cout << "Hello " << nam...

 
so.... lamdas can't be typedefed with equivalency
 
It's a question now :)
 
WTH.... how do you check if lamdas are equivalent.....?
No two lamdas are the same.... look this one has a black spot around his left eye.
 
baaa....
@MartinhoFernandes BUT WHY
 
Because the standard says so :P
 
because it's inefficient to check
 
Checking for lambda equivalence is complicated.
 
it would have to ensure the code is the same
and lamdas that are stateful would never be equivalent
so it would have to check for stateful lambda
 
7:40 PM
auto x = [](int a){ return 2*a; }; auto y = [](int a){ return a + a; }
 
which is incredibly hard to parse.
 
Do you want these two equivalent?
 
no
I want code to match code..... bit by bit
that's the only useful equivalence....
because then I could check by source.
 
Couldn't the compiler emit the same code for them?
 
such that if the lambda is the same address, it is equivalent.
 
7:41 PM
Also, what do you want to do that for?
(There may be valid reasons for it, but it does seem weird.)
 
To spread the joy of lamdas around and check to see if I'm calling the same thing.
 
@Xaade That's identity, not the equivalence.
Equivalence is assert(x == y);.
 
I could then index lambdas and create a lamda reference table.... so that there's less of them
 
auto x = [](){}; auto y = x; assert(x == y); //?
 
the compiler could reduce code for me if the lamdas do the same thing
Yeah.... just like that....
if y == x, there's no need for two of them
 
7:43 PM
But those don't have the same address.
 
DAMN IT.... stop making sense
I want..... to eliminate.... code.
That does the same thing
 
And like you said, stateful lambdas make it even worse.
 
And I'm two lazy to refactor
 
Xeo
Ever heard of premature optimization? Forceful code elimination counts as one.
 
Is it like premature ....
I might get flagged for that one
 
7:44 PM
@kbok so you buy it?
 
@Xeo AHA.... is it like premature flagging????
 
@Collecter I just did
 
@kbok Now.... get a music file with no sound.... and play the game.... easy-sauce
 
@kbok my name on steam is the same as here. so Collecter
@xaade you would also score little to no points
 
Xeo
Are you talking about Audio Surf? Sounds like it
 
7:47 PM
Beat hazard actually
 
@Collecter There is two "Collecter"s
 
Gosh I hate all those "it won't be C++11" people.
Come on! Someone just flagged "Hi"!
 
LOL
We have a serial flagger in this room.
 
@MartinhoFernandes I find Hi offensive.... I'm against doing drugs.
 
It's not in this room.
 
7:52 PM
Where is it...
 
I didn't even check which room it was, but now I'm regretting it.
 
Oh.
 
You can't check now.... :(.... I would go there and say hi.
 
I reflexively marked it as invalid, which I usually do, but for this one, I didn't even think about it.
 
@MartinhoFernandes So is that a case of premature flagging?
 
7:53 PM
It's a case of "Stop pestering me with your stupid flag wars" flagging.
 
@kbok what is on each profile?
 
One guy from michigan and one guy from slovaqia
 
i am from michigan
 
@Collecter Yes i just saw the game play time :)
 
@kbok i play a lot of tf2 dont i?
 
7:59 PM
@Collecter Indeed.
 
@ kbok that is spread over a few years though
at least 2 maybe 3
@kbok by the way TF2 is free to everyone now
 
nice
 
what did you make your name so i know not to reject
 
@Collecter "wireshar"
 
alright
 
8:09 PM
Hmm, seems like you can't even use lambdas in decltype. That's probably for the best though.
 
This works (but it's kind of pointless):
auto say_hello = [](){ std::cout << "Hello"; };
struct Foo {
    typedef decltype(say_hello) Bar;
    Bar bar;
    Foo() : bar(say_hello) {}
};
 
Yeah, because there's only one value you can use for that.
 
Xeo
@StackedCrooked Yeah, as you won't be able to initialize it to anything else
 
@Xeo exactly :D
 
Hah, found it. It was the JavaScript room!
 
8:15 PM
It's like, like, ... a singleton!
 
Xeo
Someone flagged "sex" ... and it was not in this room!
 
I said "Hi" and didn't get flagged.
Instead, I got warm welcomes.
 
8:37 PM
Why people knowing the C or the C++ standards by heart is measure of e-peen in SO? This just annoys the hell out of me.
 
Xeo
@hexa e-peen is all about knowing what you're doing / talking about... so what exactly is wrong with that? When I'm talking language lawyer, I better know the standard.
 
It's wrong when it doesn't help
 
Xeo
9:04 PM
Hm
When I have the source of a .lib available, can I tell the debugger somehow where to find it so it jumps in the .cpp instead of showing disassembly?
(Visual Studio 2008)
 
9:42 PM
@StackedCrooked Added an answer
 
@LucDanton good, accepted.
 
A fun exercise I did was writing a make_overload template.
e.g. assert( make_overload([](long) { return 42; }, [](int) { return "Hello"; })(0L) == 42L )
 
Xeo
9:58 PM
Oh hi @sbi!
I just noticed that if you change one letter, 'padding' becomes 'pudding'. I'm totally gonna call all padding I have to do from now on 'pudding'.
2
Oh well, gotta go, see ya tomorrow o/
 
10:44 PM
@Xeo sex?
 
hey
how come the other guy got the answer? his solution is the same as mine!
2
A: A C++ covariance/overriding/circularity problem

DeadMGAs you're generating code by machine, it's OK to use some dirty, filthy tricks. class B; class A { public: virtual B* CLASS_A_get(); } class C; class B : public A { public: virtual B* CLASS_A_get(); virtual C* CLASS_B_get(); } class C : public B { } // In B's .cpp file, you can ...

 
11:24 PM
Oh god, 20 flags! I didn't even knew that thing could have two digits. It's no longer a circle! It's an ellipse now!
@DeadMG Yeah, it sucks.
This guy got the accepted with a very lousy answer.
-3
A: Is std::shared_ptr guaranteed to be initialized to 0 by default?

inesticalYes, it should. I've learned not to trust automatic 0-values though.

Wow: t.co/Yfc1Ntd. Not sure how I should react to this.
It's... incredibly accurate.
 
@MartinhoFernandes You mean your ad preferences involve all this risque stuff?
 
What risque stuff? Those are your ad preferences!
 
11:40 PM
You know, that joke actually is giving me ideas for opting back in.
 
lo
 

« first day (263 days earlier)      last day (4700 days later) »