« first day (561 days earlier)      last day (4386 days later) » 

2:00 AM
@stdOrgnlDave a class, which initiaties a to 4
@stdOrgnlDave btw u couldve done like this:
 
@DavidFrank OK, so you know how to declare a class
 
A() : a(4) {}
 
and even an initializer list
 
Impressive.
 
guys, im better than this
im not a pro at c++
but i know the syntax quite well
 
2:01 AM
Now do a member function pointer declaration :D
 
Alright, but what do you want to know? And be precise.
 
@DavidFrank look, you're kind of asking us to explain why the sky is blue, except in order to really understand the answer you need to understand the quantum effects that act on the photons
 
Because otherwise I might just go and bash Java all night long.
 
@DavidFrank Have you checked out MIT's Open CourseWare?
 
(BRB, gotta buy some coke (the beverage, not the drug))
 
2:02 AM
where's that link to that picture? "I had a problem so I thought to use Java."
 
i want to learn how c++ differs from java/c#
not the syntax
but the way you design/think
 
For starters, you don't think with inheritance all the time.
 
@DavidFrank there are about 1000 different ways to "think" in C++, some less valid than others, but many equally effective
 
why are getters/setters bad?
why is it better to give access to your variables directly?
 
@RMartinhoFernandes Composition over inheritance not unique to C++.
 
2:04 AM
@DavidFrank (a) because they are overused in Java, (b) proper design should minimize the need to use them.
 
@DavidFrank You could start with a book like Accelerated C++ and follow that with Effective C++. That's how I got started initially.
 
@StackedCrooked Sure. But composition over inheritance doesn't work quite that well in Java or C#.
Well, it does work, but it takes more work too.
 
do you guys think that c++ is better than java?
 
@DavidFrank What is bad is to write getters and setters for everything.
 
not at performance but usability
 
2:06 AM
I regularly write getters, btw.
But a getter/setter pair? Not really.
 
@DavidFrank it really, really, really, really depends on context...Java is good for some things, C++ is good for those things but also many more things :-D
 
aham
what about .h/.cpp files?
 
just like VB has a place in the world, so does Java
 
why is it good to duplicate your functions?
 
@DavidFrank I had a friend ask me this, you can define your classes in headers if you really want, though it makes compile times worse
 
2:07 AM
@stdOrgnlDave how do you usually do then?
 
If a variable can be read and written by the client, the language provides a mechanism for that already: public access.
 
@DavidFrank me? hmm, let me show you something
 
@stdOrgnlDave it just really pisses me off that i have to double my functions
 
@DavidFrank here is a class that is implemented mostly in the header: ideone.com/7Z0j1
 
@RMartinhoFernandes You know, that's why I tend to like .NET-style properties a lot.
 
2:11 AM
@stdOrgnlDave how does it make sense to put the body of ur function to another file?
 
@EtiennedeMartel Oh, yeah, when in .NET, I stick to properties too. It gives flexibility, and no boilerplate.
 
@DavidFrank here is a class that builds off that but is implemented mostly in a .cpp file
 
@DavidFrank Yeah, that is annoying.
 
@RMartinhoFernandes But I noticed that when I use properties, roughly 95% of the time I just write auto properties with private setters.
 
Yep, me too.
In C#1 it was annoying.
 
2:14 AM
Yeah, C# 1 properties had all the boilerplate, and none of the fun.
 
@DavidFrank analyze the getter/setter ish ness of those
 
@stdOrgnlDave i see
@stdOrgnlDave there are cases when you do need to use getters/settesr
@stdOrgnlDave like for models as i said earlier
 
@DavidFrank yes, and ones where getters/setters aren't as important
 
If it's just a class that carries data around, why add getters and setters? Just expose data.
 
@RMartinhoFernandes so you can validate the data
 
2:18 AM
If it does something other than carry data around, i.e., has semantic value, put semantics in it, not getters/setters.
@DavidFrank You don't need that if you can't construct objects with invalid data in the first place.
 
you might want to handle more pieces of data together
you have a car, which has a color, number of doors etc.
you wont have a variable for each property
you will have a car object
which will contain all these properties
 
@DavidFrank ideone.com/zSRqM this is mostly meant for inheritance; you'll notice it doesn't really expose much, but only a little is getter/setter
 
@DavidFrank struct car { color_t color; int doors; }?
 
lol color_t :-P
 
2:20 AM
@RMartinhoFernandes you might want to add some functionality to your car
 
@DavidFrank Well, what functionality?
Because getters/setters won't add functionality to that.
 
@DavidFrank those are a few examples of different "design patterns" that go in the same program. I have to go
 
im NOT talking about getters/setters
 
The "functionality" getters/setters "add" is already there.
 
I have to go, gotta cut this short
 
2:22 AM
@DavidFrank Then give an example.
 
ok
im on it
 
Put the validation on the type, not the value.
 
class User
{
string firstName;
string lastName;
string nickName;
public:
string getFirstName() {...}
void setFirstName(...) {...}
...
string getFullName() { return firstName + " " + lastName + " [" + nickName + "]"; }
};
 
class User {
    string firstName;
    string lastName;
    string nickName;
    string fullname() const { return firstName + " " + lastName + " [" + nickName + "]"; }
}
Still works fine.
 
ok
then tell me, why everybody tells to use getters/setters
 
2:25 AM
The getFirstName and setFirstName thing don't add value.
 
@DeadMG Do you have a good library for generating a navmesh?
@DavidFrank Only the Java programmers do. And they also tell you to use singletons and factories.
 
@EtiennedeMartel My use case does not require a navmesh.
 
@DavidFrank No idea.
 
but it's my understanding they're usually generated by artists/level designers?
 
I never found a persuasive argument for using them everywhere like that.
 
2:28 AM
im leaving
 
@DeadMG Yeah, if your terrain is static, then offline generation is possible. But I was wondering about a free and/or open source library that just generates a navmesh based on what you throw at it.
 
it was nice to talk to you guys
bb
 
Hmm, looks like this might work: code.google.com/p/recastnavigation
Oh, it's what Wolfire uses for Overgrowth, I think.
 
@EtiennedeMartel Unfortunately, I would have no idea.
 
@LucDanton Wait, it broke ResultOf!
Noooooes!
 
2:41 AM
Don't Panic
 
Well, I did what I could...
 
@RMartinhoFernandes Time to get drunk!
 
I'm already drunk-ish. That may be related.
 
You need to find your happy place.
And stay there for a while.
 
3:10 AM
> Full of delicious spicy noodles.
Has Lounge<C++> become a chinese restaurant now?
anyway, good morning all.
 
Morning.
I'm gonna go sleep soon though.
 
you sleep in the morning? :D
Who the fuck are these (apparently Turkish) girls who spam replies to my tweets?
 
I consider it to be late at night.
I prefer to fall asleep before daybreak though. Or else I might get the stupid idea to forego sleeping and start a new day.
 
lol
you're from Europe right?
 
Belgium.
 
3:17 AM
I knew it. For some reason all the Europians in this room (with the possible exception of @sbi) hardly sleep at night.
 
I ordered something from Amazon.ca this morning. Then a bit later I got an email saying it had been shipped. On a saturday afternoon. But, since it's going through good old Canada Post, nothing's going to move until monday. Weird stuff.
 
Apr 11 at 21:30, by DeadMG
for once, I need to get some sleep- some proper sleep
 
@IntermediateHacker I think most people here, regardless of location, hardly sleep at night.
 
Mar 29 at 3:32, by Cat Plus Plus
No sleep -> no sleep -> bwuh?
 
@EtiennedeMartel Doesn't seem very weird to me.
 
3:18 AM
Feb 27 at 21:57, by Tony The Lion
I hope I get some better sleep tonight, I've been really sleeping badly lately
Mar 19 at 3:36, by R. Martinho Fernandes
Europe never sleeps.
See what I mean?
 
@StackedCrooked Well, normally, around here, nothing happens on the weekend.
 
@EtiennedeMartel Amazon.ca might work on saturdays.
 
Perhaps.
 
@EtiennedeMartel the post is the same here too. Once a package was delayed for a week. :(
 
@IntermediateHacker You've certainly done your research.
But you forgot Xeo.
 
3:23 AM
yeah.
 
@StackedCrooked I think that means we can say "Europeans except Germans"
 
wait, I just learnt from the transcript that @DeadMG owns a puppy.
I thought he was a puppy. lol
 
Our Gravatars don't always represent us.
I'm not a cartoon, and @StackedCrooked is not Monkey D. Luffy.
 
I'm not?
Dammit.
Ok.. I should probably sleep soon.
 
@StackedCrooked where's Zoro?
 
3:29 AM
Zorro? Who's that? :D
 
Ah, Zoro!
Reminds me of this thread. Changed the link!
 
lol. Anime forums, what do you expect?
> This was... approved?
 
It's 3 swords vs one ..saber?
Don't know if saber is the right word.
 
Isn't saber the weapon they use in star-wars?
 
3:33 AM
^ Hybrid Zoro/Zorro
 
@IntermediateHacker light saber.
 
The only thing I like about Star Wars is the Yoda guy.
 
Anyway, Sanji is the best.
 
3:38 AM
Sanji can't win from Zoro.
 
@StackedCrooked NO!!! Another retarded anime series to watch!
 
@IntermediateHacker Have fun :D
The opening doesn't look too bad.
 
yeah.
On second thought, I'd rather not waste my time watching obscure anime.
 
I'm off to sleep now.
Later.
 
@IntermediateHacker Technically my family owns a puppy.
but my Gravatar is an actual picture of an actual puppy that's actually part of my family
 
3:50 AM
I see.
Anyway, Fuck Oman-Air. They've changed my flight time to 2:55 AM. :(
So now I have to go to the airport half way in the night.
 
user868935
4:30 AM
@anyone know any tutorials about programming electronics?
 
5:40 AM
ship bottom
 
 
2 hours later…
7:16 AM
Anyone alive?
okay, so my time-zone is GMT + 0400.
So in the UK, it's 7 in the morning?
guess everyone's sleeping then
Yay I found free downloadable FIFA 98! Abandonware sites FTW!
 
url please
 
Terima kasih! Thank you :D
 
Terima Kasih?
 
thank you in malay
yeah
same thing
 
7:27 AM
I see. Shukria.
 
lol
shukria is urdu or hindi i think
 
both. But I speak Urdu.
 
ouwh great
urdu zindabad
 
+1 for that. :D
 
my gf is half pakistani
her mom speaks urdu
 
7:29 AM
nice. I'm half pakistani too.
my mom is an arab though. But she has lived in pakistan in her child-hood so she knows Urdu too.
 
ahh interesting
u know arabic too?
 
nah.
I know a little arabic, but I don't speak it fluently.
 
I'm learning arabic through youtube
lol
 
nice.
I'll have to learn arabic next year too. the high-schools here all teach Arabic as a compulsory subject in final year.
 
ouwh tough year that would be
the girl's name is Maha
 
7:34 AM
I'll probably fail in arabic. I don't know a thing about it. :(
 
quite an interesting person
arabic is hard man
together with persian and hebrew
excessive use oh "kh"
akhhhhh ikhhhhh ukhhhhh
 
yeah. :D
and I can't pronounce that "Duadd' alphabet.
It's pronounced something like "Fhdshuad"
Gives me a headache.
 
haha I know waht u mean
use so much energy to pronounce a single alphabet
 
ض
yeah.
where do you live?
 
in Malaysia
sometimes in Indonesia
 
7:37 AM
gentlemen help me, I am stuck and can't move forward stackoverflow.com/questions/10354786/…
 
@RandomJoe awesome. I live in Oman, sometimes in the UAE.
I live in Al-Buraimi, on the border of Oman and UAE.
 
hey UAE is niceeeeeee
 
yes. But Malaysia is nice too. UAE -> Burj-al-Khalifa , Malaysia -> Petronas Twin Towers.
Huge buildings are awesome.
 
@sanket have u tried using the boost::pool_allocator?
@Inter
oups
@IntermediateHacker where in the UK are u at currently?
 
@RandomJoe UK? I'm in Oman.
 
7:43 AM
ouwh I missread ur first statement
 
lol. I said the UAE n0t UK.
The United Arab Emirates, abbreviated as the UAE, or shortened to "the Emirates", is a country situated in the southeast of the Arabian Peninsula in Western Asia on the Persian Gulf, bordering Oman to the east and Saudi Arabia to the south, as well as sharing sea borders with [[Qatar]
 
I know
@IntermediateHacker << this one
oups
So in the UK, it's 7 in the morning? << this
anyway I love UAE
been there 5 times
 
I was just asking the time in the UK.
 
It's an amazing place
yeah misread that lol
 
 
2 hours later…
9:40 AM
ohh boy
 
hmm
0
Q: Boolean enums: improved clarity or just overkill?

class daknok_tSuppose we are writing a GUI toolkit in C++ (though this question may also apply to other languages). We have a button class with a member function hide, which hides the button. This member function takes a Boolean parameter animated to control if the button should be hided with an animation. cl...

Probably a dupe but I couldn't find it anywhere. :P
 
[piotrl@rincewind] ~ # su
su: Authentication failure
Woops.
That's... bad.
@classdaknok_t Did that. It's good. It's either that or keyword arguments.
Dammit root y u no login.
 
Try to enter the correct password.
 
If you hadn't noticed, it fails before asking for password.
 
...
"su" disables echo when asking for the password
 
9:52 AM
@CatPlusPlus I thought you left out that line, but in that case: you are screwed.
 
Disabling echo doesn't disable the prompt.
 
It still prints Password:.
 
Of course there was a PAM update.
Time for netboot recovery.
 
Clang team y u release broken clang binaries!
Whenever I use a lambda, it crashes during code generation.
 
10:14 AM
Hi guys!

Please help me to remind, where does stack-sub-site locate, which is about code-critisim?
 
If you are there, press Ctrl+D so you won't forget.
 
@classdaknok_t thank you!
 
My server boots so slowly.
 
I can't run fast in boots either.
 
Ha, fixed it.
L33t skillz.
 
10:19 AM
@classdaknok_t google still down?
Puss In Boots :)
 
@sehe maybe in Moscow.
 
And of course I forgot to add half of the things to rc.
That's what happens when you don't reboot a computer for 2 years.
Or maybe I did but it stopped working.
 
@classdaknok_t poor gents. must be due to the Ukraine championships that they cut all utility services
 
Or Google got pwnd by Russian hackers.
By the way Google gives people money for finding bugs, instead of suing them.
 
Yay, mails work.
I'm so good.
 
10:23 AM
Cats aren't good; they eat chicken.
 
Chicken's good.
 
Yep, and cat's aren't.
 
My server now workses perfectly.
 
Does variadic functions make bit flags useless?
 
No, why?
 
10:27 AM
That doesn't make sense to me. Give an example.
 
I dunno, couldn't you pass the flags as arguments?
 
@classdaknok_t What's wrong with eating chicken?
 
foo(A, B, C) vs foo(A | B | C)
 
...oh.
 
@Pubby You know how extremely difficult it would be to find out which flags are set, right?
Since you can pass them in any order you like.
@TomW D:<
 
10:28 AM
Eh, is_flag_set(A, pack...) is not that hard
 
Use bit flags, still much easier and people are more familiar with them. And you won't have templates and all the bloat, confusion and compile time associated with them.
 
oh boy
 
Actually it wouldn't be that hard to use both at the same time
Not that you'd want to
 
10:36 AM
@classdaknok_t 'Template bloat' is FUD if you don't measure.
 
Regardless, bitmasks are more comfortable to use anyway.
 
Are bitmasks typesafe? Am I thinking of C?
 
Anyone know where I can find large text file filled with nothing in particular?
I remember seeing one filled with lorem ipsum blah blah.. but can't find it any longer..
 
hiya babes
xxx
Sorry guys.. ignore the fool that just wrote that
@Pubby Thanks a lot.. that should do
 
user868935
10:48 AM
I need to set a bounty, but the button isnt there
 
@ChocoMan how old is the question?
 
user868935
24 hours
 
user868935
@classdaknokt but if i edited the question, would that reset the time?
 
hello, what is the quickest way to see if a floating point is a whole number? Is there a function for that? Or simply see if ceil() and floor() give the same integer?
 
@ChocoMan you need to wait at least three days. Editing it won't reset the timer.
@coolbartek you cannot. You can only get an approximation.
 
user868935
10:53 AM
ok thanx
 
ok, thanks
 

« first day (561 days earlier)      last day (4386 days later) »