« first day (257 days earlier)      last day (4708 days later) » 

12:01 AM
yep :) We don't talk C++ here :P
 
12:12 AM
hi @BillyONeal
 
Hello, "Tony The Tiger". :)_
 
what brings you to this chat?
 
An ad on the main site
'cause I waste way too much time hanging out answering things in the [c++] tag.
 
@TonyTheTiger The girls.
 
hahah :P That's what brought me here the first time, never left since :P
 
12:13 AM
Never? See the world, man!
 
@BillyONeal we don't answer questions in this room though
@BillyONeal lol, so to speak
 
@jweyrich Don't call them "girls". It's sexist and chicks hate that! :-)
 
huh "girls" is sexist? Really?
 
im here because i dont want to do code documentation sup
 
lol, I'm here cause I'm an addict :)
 
12:26 AM
10
Q: Not Using Getters and Setters

MaxpmI'm making a very simple class to represent positions in 3D space. Currently, I'm just letting the user access and modify the individual X, Y and Z values directly. In other words, they're public member variables. template <typename NumericType = double> struct Position { NumericType...

 
12:40 AM
@sbi: I couldn't resist mentioning that article on quasi-classes.
 
Girls? Where?
 
12:54 AM
everywhere, just look :)
 
1:30 AM
lulz
 
Tiny question that doesn't warrant a full post on SO: What does the "s" in "lhs" and "rhs" stand for?
 
Side.
 
Ah, of course. Thanks.
 
Left-hand side, right-hand side.
 
@CatPlusPlus do you ever sleep?
 
1:41 AM
Pfft. Sleep is for lesser beings.
And systems where performance is a concern.
 
@TonyTheTiger Not today, I have to fix my erratic sleep schedule.
Also HAVE TO DEVOUR PLANETS.
Solar 2 is cool.
 
0
Q: const function parameters in C

J. Andrew LaughlinI have some code that looks like this: /* main.c */ static char** stuff = NULL; void func1() { func2( stuff ); } /* file1.c */ void func2( const char** const stuff ){ ... } GCC complains: warning: passing argument 1 of func2 from incompatible pointer type. note: expected const char ** c...

Looks like this is becoming the new i = i++ question
 
@CatPlusPlus lulz, hahah addiction is a powerful agent :P
wow, I have never seen this as a func arg declaration const char* const* const& argv what does it mean?
 
Reference to const pointer to const pointer to const char. Or something.
It's insane.
In any case.
 
1:52 AM
@CatPlusPlus I was just about to send that link.
 
Nope.avi.
 
Urgh. I'm too much of a perfectionist. In what order do you declare overloaded operators? I was going to do them in the order of precedence, but certain operators fill the same precedence level.
(Most of my time "coding" is spent pondering crap like this.)
 
@BillyONeal wow that's pretty scary :)
 
I don't think about stuff like that. :P
 
1:54 AM
You can declare them in any order. They still follow the precedence rules of the language.
 
So arbitrary.
 
@Maxpm what's the point in this ponderings?
it really doesn't matter in what order you declare them... it's irrelevant, even to us anal C++ programmers
lol
 
There is no point. I know it doesn't matter functionally, but aesthetically, I can't help but feel that a certain order is expected.
 
@Maxpm I have never heard of any kind of a preferred order
 
2:50 AM
Some order is natural... say += before +, == before != as the latter tends to be written in terms of the former. But there's still lots of arbitrary choices.
(That flows naturally for smaller classes with in-class operator definitions)
 
 
2 hours later…
4:52 AM
Good morning.
 
 
1 hour later…
sbi
5:55 AM
@MartinhoFernandes You are up <yawn!> way too early for my taste.
 
morning
 
@sbi It's almost seven now.
 
good morning to all*
no..? hm.. I guess it's not a good morning then
 
Oh, the night's over?
Damn, that was fast.
 
-1
Q: Was Apollo 11 Moon Landing in 1969 by NASA real? How possible?

maniclornThe United States's Apollo 11 was the first manned mission to land on the Moon on 20 July 1969.[4] There have been six manned landings (between 1969 and 1972) and numerous unmanned landings. Manned Landings were Apollo 11, Apollo 15 in 1971, Apollo 17 in 1972. By US there were several Unmanned ...

Someone thinks this classifies as science-fiction.
 
6:03 AM
@MartinhoFernandes :)
 
What's a word that implies a full path to a file, including the file's name?
Does just "path" work?
 
Well, sometimes when I want to make that explicit I use "absolute path" or even just "full path".
 
File& File::Open(const std::string FullPath);
 
A relative path won't work?
If it does, I'd just use "path".
 
It will.
I guess I'll just have to trust people to read the documentation.
Thanks.
 
6:10 AM
Then FullPath is a bit misleading.
 
Yeah.
 
Make it p and let them wonder.
 
xD
Sometimes, I get urges to name my variables "JonSkeet."
 
Also, Y U NO USE IOSTREAMS.
 
@Maxpm That's concerning.
 
6:15 AM
I sometimes have an urge to name a variable "tmp". And sometimes, I do.
 
The File class does use iostreams under the hood. The purpose of the class is to provide an array-like interface for accessing files, since random access in iostreams is quite lacking.
So you can do stuff like this:
MyFile[5] = "This is line five.";
 
And how are you determining which line is fifth? :P
In terms of seeking, that is.
 
Keep an index somewhere?
I hope.
 
Then you'd have to update all of them after one line is changed.
 
@Maxpm if that is a constructor, check out the keyword explicit.
 
6:17 AM
It can't be a constructor.
 
ups
didn't read carefully
 
Yeah.
 
never mind!
 
It's basically a vector of strings. When saving a file, it dumps the vector's elements and separates them with newlines. When opening a file, it uses push_back to add lines as it reaches them.
MyFile[5] = "This is line 5" just modifies the vector. I actually made a mistake; it modifies line six, not line five.
 
Well, yeah, that would work.
It's a tad inefficient though.
 
6:19 AM
Unless the file is freaking huge.
 
IMO that kind of an interface has really limited usefulness.
 
Perhaps.
It just seems more intuitive to me.
 
What?
 
Billions you say.
 
6:26 AM
We just caused another extinction.
A good one, mind you.
Rinderpest (also cattle plague or steppe murrain) is an infectious viral disease of cattle, domestic buffalo, and some species of cloven-hoofed beasts, including buffaloes, large antelopes and deer, giraffes, wildebeests and warthogs. The disease is characterized by fever, oral erosions, diarrhea, lymphoid necrosis, and high mortality. After a global eradication campaign, the last confirmed case of rinderpest was diagnosed in 2001. On 14 October 2010, the United Nations Food and Agriculture Organization announced that field activities in the decades-long, worldwide campaign to eradicate ...
 
What's the other disease we completely eradicated...?
 
Exterminated you say.
 
Smallpox is the other one.
 
@Maxpm Smallpox in 1979.
 
Er, that's right.
 
6:27 AM
 
EXFOLIATE.
I really want a Dalek liquid soap dispenser. You would press down on the "head," and soap would come out of the turret thing. Bonus points if it screams "EXFOLIATE."
 
> Animals don’t have silly ideas about vaccines causing autism or being made by the evil corporations that spread chemtrails and try to use microwave weapons to make us buy transfat-containing irradiated GMO products from Haliburton and the Freemasons. Most farmers know a thing or two about animal health and realize how important protecting their herds are. So there are no issues with eradicating these diseases by vaccination as there are in humans.
> But we can do this with human diseases. We did it with Small Pox and we can do it with Polio, and Measles and Mumps and Rubella and others.
 
there's a +1 button on google search results. interesting
it's shiny
 
Google launched a social networking thingy.
 
Yep.
 
yeah, Google+. we spoke of it yesterday :)
 
Baww. What's the syntax for hotlinking images?
 
Pasting it.
 
Just the link.
 
XKCD has special treatment, just paste the XKCD link, not the image link directly, and you get the full XKCD experience.
 
6:36 AM
MINE IS BIGGER.
2
 
How convenient.
That's what she said.
 
She?
Wow, you guys are weird.
 
LOL.
 
I like the way you think
 
6:37 AM
Er... Yeah. >_>"
 
I really don't.
 
Don't judge me. It's 2:37 AM and I'm about 2/3 of the way through rewriting my library.
1/2 if you include documentation.
 
Phew, who needs documentation.
 
Certainly not me, with names like JonSkeet.
 
WTF is wrong with Chrome? How can a measly PDF file harm my computer?
 
6:40 AM
JonSkeet jonSkeet(JonSkeet Jawn_Sk33t);
Perhaps the formatting will make your eyes bleed.
 
Oh, PDF exploits are real. Especially those targeting Acrobat Reader.
Did you know you can embed JavaScript in PDF? Yeah.
 
@CatPlusPlus What. That's terrifying.
 
Ah, should have thought of stupid Adobe backdoors^Wproducts.
 
How does that even...?
 
PDF is an obscure format, full of arcane features that allow you to do weird stuff.
I've seen more than one PDF application.
 
6:44 AM
That's devilishly brilliant.
 
You misspelled 'utterly stupid'.
 
Reminds me a bit of this one site that played Pong with browser windows.
 
Luckily we have perfectly fine and safe formats for that kind of thing.
That no one uses :(
 
As in, the ball was a window, as well as the two paddles. They moved around the screen.
 
Oh great, the fail whale is back.
 
6:48 AM
Fun.
 
@DeadMG (You probably know this already, but just incase you didn't : ) a sudden drop in your calorie intake can make your body go into an emergency mode and you will end up gaining weight instead. Stick to your usual routine and work out more. That with normal sleep should help.
 
I love template compile errors.
They're as indecipherable as they get.
 
I just realized why I wasn't getting any mail for the past two days.
My mail client wasn't running.
 
Well, there's yer problem.
How detailed are you guys in your exception descriptions?
 
they took eer juubs
 
7:01 AM
hey this is kind of off-topic, but whats the appropriate way to "bump" your questions on stack overflow
 
@bfly2000 bounties
 
im pretty sure im too low to have a bounty, so im guessing theres nothing i can do huh haha
 
If something changes, they get bumped automatically. But please don't do edits for the sake of bumping.
 
or you can post it here to draw attention
 
okay thanks
well its an android question
 
7:03 AM
@Maxpm "Bad stuff happened. Deal with it."
 
is that fine?
 
oh. better than to post it in the android chat :)
where the android folks are
 
yeah they never let me in haha, oh well thanks for the help
 
Not caring whether it's okay or not to post it here, I doubt you will get more help than in the Android room.
Oh, the Android room is closed?
Figures.
 
@MartinhoFernandes I've been using something along the lines of throw std::out_of_range("Accessed illegal index in Foo().");. I feel like it's the debugger's job to show the type and location of exceptions, though.
 
7:05 AM
Now on a serious note, I prefer to have the exception type conveying most of the information.
 
I'm too lazy to make new exceptions, so I throw runtime_error everywhere.
I'm evil.
 
i was always told not to use exceptions..
 
By whom?
 
@CatPlusPlus No you're not. If you were evil, you'd just throw 666; everywhere.
 
my teachers
 
7:06 AM
Figures.
 
it was a couple of years ago now
 
Well, they were bad teachers.
 
What did they suggest you use instead?
 
@MartinhoFernandes Figures, indeed.
 
Return error codes?
 
7:07 AM
they said that there is always a way around exceptions by using return values and such. and that exception handling is expensive
 
abort(), abort(), ABORT().
 
haha
 
Fuck expensiveness. Exceptions are not the part you want performant in your code.
4
 
Just like how my teacher told me to never use "\n." Even when iterating over arrays and printing values.
 
maybe I should post a question about that on SO. Why and when to use exceptions?
 
7:07 AM
Don't.
I'm sure there is one already.
 
I'm really glad I browsed SO enough to know better.
 
@Maxpm well I do see a reason for that. std::endl also flushes the stream which \n doesn't
 
And virtual calls are expensive, and containers are expensive, and RTTI is expensive.
 
Yes, but consider the following:
 
@CatPlusPlus exactly! better to not program at all! :)
 
7:08 AM
And the answer is in the tag wiki.
 
@MartinhoFernandes oh, ok, I'll check it out :) thanks
 
The AAA game developer mantra.
 
for (int i = 1; i <= 999999; i++)
{
    std::cout << i << "\n";
}
std::cout << std::flush;
Much better for performance.
Do you REALLY need it to update after every line?
 
I saw a program that did yes
 
99% of software doesn't need to render 90FPS full of blowing up stuff at 1920x128 with full antialiasing and postprocessing.
So the argument is moot.
 
7:10 AM
And freaking error return codes make you create convoluted and brittle workarounds for exceptions.
 
To me, std::endl seems to imply "We're done outputting. The user can check out what's on the console now. Oh, and we happened to end it with a line break."
Error codes are horrible.
 
You start by adding "output reference parameters", and that leads to empty constructors on things that really shouldn't have one...
 
How can you tell C and C++ apart? C will have if (error) goto cleanup; as every second line.
3
And that is good C code. Bad C code will have if (error) /* 50 lines of cleanup */ every 50th line.
 
Worse C code doesn't check for errors.
 
never written C. why not have a cleanup() function?
 
7:12 AM
That is Cthulhu code.
 
@Default One for each function?
Or sometimes, more than one?
 
@Default Infeasible and you'd still have to call it manually.
 
Because it doesn't really make sense to use a function there.
 
@MartinhoFernandes uhm.. uhmm. yes! :)
 
void clean_up_process_xyz(); // When else will this be used other than in process XYZ?
 
7:14 AM
// cleanup.h
void cleanup1(void);
void cleanup2(void);
void cleanup3(void);
void cleanup4(void);
void cleanup5(void);
void cleanup6(void);
void cleanup7(void);
void cleanup8(void);
 
I would have such a function take and return an int.
 
Why? It aborts anyway. :P
 
An error code during cleanup from an error code?
 
Then you could write if(error) return cleanup1(ERROR_X);
 
Where would that go? The error handler error handler?
 
7:15 AM
But I'm trying to salvage already hopeless code.
 
Errorhandlerception.
 
@Maxpm It would pass it up. That's what you do with error codes.
 
We need to go deeper.
 
And that's what you get for free with exceptions.
 
We need to go derper.
 
7:16 AM
Yep.
 
I heard you liked exceptions so I put an exception in your exception so you can throw an exception when you throw an exception
 
That terminates you.
 
indeed it does :)
 
Not necessarily.
 
int************************ foo;
"declare foo as pointer to pointer to pointer to pointer to pointer to pointer to pointer to pointer to pointer to pointer to pointer to pointer to pointer to pointer to pointer to pointer to pointer to pointer to pointer to pointer to pointer to pointer to pointer to pointer to int"
 
7:17 AM
try { throw 42; } catch(...) { throw 666; }
 
try { playSports(); } catch(ball) { using face(); }
 
And nobody fixed the syntax error yet.
 
Pretty sure it's missing the stuff after catch.
 
I don't usually catch exceptions. I'm the one throwing them most of the time.
 
7:19 AM
8 seconds left, pheww!
 
Probably not a correct use of using, but it's 3:19.
 
@Maxpm not if your Napoleon :)
 
I need caffeine.
Why did I think it would be a good idea to rewrite my library overnight? @_@
 
I need tea.
 
@Maxpm You're on a deadline or something?
 
7:25 AM
I thought I'd fix compilation errors overnight.
I wrote few lines of code 10 hours ago.
And that's about it.
 
Gosh, you leave code lying around with compilation errors?
 
Only for g++.
One buildbot green, one buildbot red, everything is in perfect balance.
 
Speaking of g++, it's being anal about the ordering of arguments.
 
Arguments, or ctor init list?
 
If find the ctor init list warning pretty useful.
 
7:29 AM
It's both useful and annoying as hell.
 
g++ -I./MyLib/Include -L./MyLib/Binaries -lMyLib -o MyProgram MyProgram.cpp
 
Oh, those arguments.
 
^ Refuses to link MyLib.
 
Yeah, the driver is pretty awful with things like that.
 
I had a correct order lying around somewhere...
 
7:29 AM
At the end should work.
60% of the time, it works every time.
 
g++ MyProgram.cpp -I./MyLib/Include -L./MyLib/Binaries -lMyLib -o MyProgram
Which one makes more sense: The order in which they should be "seen," or that awful thing?
 
g++ is an arcane piece of crap, really.
 
why should the ordering matter?
 
Because g++ says so.
 
Exactly.
2
Q: GCC Command-Line Argument Pickiness

MaxpmGCC can get pretty picky about the order in which it accepts its arguments: # Works. g++ Foo.cpp -L. -I. -lBar -o Foo # Linker errors. g++ -o Foo -I. -L. -lBar Foo.cpp What, specifically, are the ordering requirements for command-line options?

 
7:32 AM
:(
 
Ask whoever invented find, because obviously they went to design GCC frontends.
 
Shameless self plug.
 
I feel my English is starting to break up.
Lol, Twitter.
> If you try to follow a user who was recently suspended, you may see an error message that your account is suspended. Really, the account you’re trying to follow was suspended; your account is okay
 
Pro.
Speaking of being pro, I forgot the public: label.
What IDEs do you use, if any?
 
vim + make + gdb :P
And Visual Studio at work.
 
7:48 AM
Butterfiles.
 
Was that a typo or on purpose?
 
> Also, the placement of the -l option is significant.
Gee, thanks, documentation.
That helps a lot.
Actually, digging deeper, it is quite helpful.
> It makes a difference where in the command you write this option; the linker searches and processes libraries and object files in the order they are specified. Thus, foo.o -lz bar.o' searches library z' after file foo.o but before bar.o. If bar.o refers to functions in `z', those functions may not be loaded.
For some reason, the placement of source files seems significant, too.
 
@Maxpm Ever tried cgdb?
 
@StackedCrooked Nope. What's that?
 
@MartinhoFernandes Typo?
 
7:54 AM
Butterf - i - les or Butterfl - i - es?
 
Gawd, don't tell me I've screwed up even that simple word.
I haven't slept, that's my excuse.
 
If it makes you feel any better, I simply forgot to define my destructor. I just didn't do it.
 
Seems to be popular around here.
 
Errors. Errors everywhere.
 
And yes, I'm using files made of butter as an IDE.
 
7:55 AM
FAT32? ;)
 
@CatPlusPlus Is this an xkcd reference ?
 
@kbok Everything is an xkcd reference around here.
 
@kbok It's always an xkcd reference, unless it's a something else reference.
 
Is it bad if I know the number of that one by heart?
 
7:57 AM
@MartinhoFernandes That was quick
 
Nah. I had the "Do Not Erase" one memorized a while back for school.
 
33 secs ago, by Martinho Fernandes
Is it bad if I know the number of that one by heart?
 
I just realised it's Thursday.
How'd that happen.
 
It's been Thursday for four hours.
 
10 hours here.
I win.
 
7:59 AM
Well, actually, it's been Thursday for 22 hours.
And it will be for another 28.
 
I think we are abusing xkcd references in SO
 
Yes, that totals 50.
 
Magic.
 
Let's do something different today
 
I've wasted 3 days, wee.
 
8:02 AM
what's the deal with the dimensions ?
 
Oh, look, a COBOL comic.
8 upboats left to silver badge. 10 for .
 
Joy.
Alright, I can't possibly stare at this console window any longer.
I'll leave the g++ fighting to tomorrow.
'Night everyone.
Or morning.
Or whatever.
 
Any JS people out there ?
The javascript room has been inactive for 9 hours
 
8:39 AM
PHP is slowly turning into Perl.
 
Hello
 
@ÓlafurWaage From where I stand, that distinction is pretty much irrelevant.
 
They added Traits (compiler assisted copy paste)
 
can anyone help me with one line in python ( translate it to c++ ) :)
Because im trying to rewrite function to python i'm stuck in one place:
x = modulo(a,temp,N)
Couldn't find anything on google, only modulo operator
 
39 mins ago, by Cat Plus Plus
8 upboats left to silver badge. 10 for .
Ask him/it. :)
 
8:43 AM
@CatPlusPlus, ahoy
 
@Chris isn't that a function somewhere in your code?
 
And if you tell what modulo does, someone might know what the C++ equivalent would be.
 
yes
x = modulo(a,temp,N)
is in code i've found online
 
@Chris then it is a function defined somewhere in that code
because modulo is not a function I know of in python
 
ok crap :)
thanks a lot... i think i need go to sleep :D
 
8:47 AM
gn
 
night :)
 
Anyone knows a free DLL dependency scanner ?
 
@kbok "Dependency walker"
 
@StackedCrooked : thanks
 
9:39 AM
Last day at my current jobb.. Should I implement a easter egg? :p
 
My last day is tomorrow.
I deleted the easter egg left by the previous guy.
 
Hehe.. don't think I'll do it anway. Wouldn't know where to put it..
 
And if bugs count as Easter eggs, and I think there are enough already :)
 
True that!
my boss is buying me lunch.. bye
 
9:45 AM
@MartinhoFernandes Rotten easter eggs :)
 
10:00 AM
hi
 
@Maxpm It's even faster if you replace "n" with '\n' ;-)
 
@StackedCrooked once again I read it faster than I could interpret it and thought that Alex's boss was buying him rotten easter eggs for lunch.
it's fun to misinterpret
 
10:16 AM
@Default That would be a nasty goodbye gift :)
 

« first day (257 days earlier)      last day (4708 days later) »