« first day (582 days earlier)      last day (4382 days later) » 

9:01 AM
@LukaD Where did you get your image/avatar? I keep seeing similar ones but I can't figure out what they're from.
 
I don't understand what people think "duplicate" means. There is a difference between why and how to fix, you know…
 
why is a duplicate of how to fix
 
It's not. The why answer should give an explanation why it's copying. The how to fix answer should give an example of how to enforce moving it.
Also, it the why question is a dupe of the how to fix question, it should say "Possible Duplicate Of:", not "Possible Duplicate:".
^ that always bothered me.
 
I think it's correct. If it had 'of' there wouldn't be a colon.
Although I am terrible at grammar
 
Why wouldn't there be a colon? There follows an enumeration.
A question can be a dupe of multiple other questions.
 
9:10 AM
Hm, I dunno
 
I'm a creationist; I believe man created God.
 
9:24 AM
@Pubby I got my avatar from eightbit.me
 
Ah, I see
Wish I didn't have to sign in to try it out.
Although I'm not a fan of that silly 'hipster retro' stuff.
 
 
1 hour later…
10:31 AM
int foobar()
{
    // note the missing return
}
lol this compiles fine in both C and C++
 
@FredOverflow Does your code contain #define foobar main?
 
That would be an error? I thought it was just UB.
 
Ell
It's only a warning for no return
 
@KerrekSB I said compile, not link. Oh wait, I think you meant something else.
@Ell no warnings here
 
@FredOverflow VS2010 warns for such things. In fact, it issues that warning frequently, even when it could determine it was unnecessary, especially when exit by exception.
however, it is indeed UB and no compiler diagnostic required for non-returning non-void functions
 
10:58 AM
Is hardcoding error strings bad?
 
11:22 AM
Nevermind
 
What's going on here? stackoverflow.com/questions/10413418/… A ~2 week old question has good answers, then a "questionable" answer is posted and (almost) immediately upvoted and accepted.
 
Magic.
 
11:44 AM
@CharlesBailey Yeah, that's weird.
What if an accepted answer gets delete-voted?
 
Who is flagging in C chat?
Also, constant static storage initialization still doesn't have defined order across TUs, right? Does it even have any order? (IIRC the compiler can reorder it based on dependencies or something)
 
@KerrekSB You'd have thought that if you wanted to upvote your socket puppet or "best friend forever" you'd at least use all the available information to post a correct answer.
 
@CharlesBailey Quite.
Now, is it just me or is the code in this question not actually real C++?
@CharlesBailey So what .. downvote the question as well?
 
@KerrekSB If you squint at it, add some missing colons, assume some typedefs exist for type, type1 and type2 perhaps it might become valid?
 
@CharlesBailey Now my eyes hurt.
 
11:51 AM
@KerrekSB Stop squinting, move on to a question that's worthy of looking at, then.
 
@user167908 Warning: user prime-number alert!
 
What are "stdin keys"?
@DeadMG Where's the original question?
 
@KerrekSB Dunno, it was by that user 1131997 or whatever guy though, and the code (and other content) was basically identical
 
@DeadMG We should close as exact duplicate, I guess.
 
@KerrekSB I'm quite content to downvote him. The more often he asks it, the more often I can downvote! :)
the comments were cleaned and the question closed, so I can't fin the original
 
12:03 PM
@DeadMG OK, no worries
 
Ell
12:38 PM
hi all
 
12:52 PM
hi all
 
Ell
bye all
how awesome am I at conversing, right?
 
What is with people and those inline members questions. It's been like gazillion of them in the past week.
 
1:15 PM
0
Q: C++ strange "format" of output string

JoroI am writing a C++ applications that is working with files. I have implemented standard operations like writing and reading from the file, some search functions, etc. After doing some operations, my output strings come in a very strange way. For example the text "Address -", comes as "?п&&am...

 
Anyone know library for pdf creation that supports templates for pages?
 
^ The close-voters are right, but I suspect for the entirely wrong reasons! Argh. I cannot berate them, there is no room to explain.
@CatPlusPlus At the risk of possibly offending you, they're copy-cats?
 
@CatPlusPlus and why quote the standard in your question if you can't be bothered to read it? (not you, you obviously ;) )
 
Anyone has knowledge of g++ makefiles ?
 
@iammilind g++ doesn't read makefiles. Do you mean GNU make makefiles?
 
1:26 PM
yes .. exactly
I am very weak at makefiles
and I just wanted to know that if I want to show what compiler options are there when a code is compiled
i.e. g++ -I ... -D...
@CharlesBailey .. simply "make -n" ?
@CharlesBailey, I am sorry I din't understand exactly
I tried "make -n <common.mak>" and it says no target to build
 
If you run make -n it won't build any files (other than required makefiles) but it will show you the full commands that it would run to perform the build.
 
umm .. I am still not getting anything helpful
 
@iammilind :-( I tried.
 
Is there a way that I can edit the common.mak and when compile it again then instead of simple compiling
it would show g++ -I ... -D...
I simply want to see that what options are mentioned
at presently it show like this:
%.d.o: %.cpp
@ "echo compiling" $<
@ $(CPP_COMPILER) $(CC_DEBUG_FLAG) -o $@ $<
so when I give make, it only displays "compiling x.cpp" ... but I want to see the full options
 
Like I said, run it with -n to see what it would do.
But the last time I suggested that you said it wasn't helpful.
 
1:36 PM
yes ... it doesn't show anything :(
 
Change "echo compiling" to "echo compiling: $(CPP_COMPILER) $(CC_DEBUG_FLAG) -o $@ $<"?
 
Or you could remove the @ prefix, but I assume that you want the neatly formatted output most of the time.
@iammilind Do you actually need to build everything or is your output up to date?
 
everything is fine ... but the problem is that even if I edit something in common.mak .. nothing shows up while compilation
I also tried removing @
the thing is the common.mak is mentioned in all other .mak files
 
What does make -B -n output?
 
Add common.mak to list of dependencies
 
1:39 PM
@CharlesBailey, i tried , but no luck
@Pubby, dependencies means ?
even I tried removing common.mak itself .. but compilation always goes as usual
don't know why
 
Read the makefile documentation/tutorial? It's a very simple program at it's core.
And keep in mind that recursive make is considered harmful.
 
ya :) I tried some simple tutorials .. but couldn't get why my changes don't take affect in common.mak
any good link ?
 
@iammilind I can't see your makefiles, I've tried to be helpful and you've called my help useless. I don't know what you expect me to say or do.
 
@CharlesBailey, I am sorry that "make -n -B" are not being helpful because they don't show apart from some "if"s
anyways .. thanks for your time :)
I will try to dig something more and will comeback if something more specific to ask
I am actually work on a VNC server and I can't copy paste from it
 
Hi Charles, thanks for your help on that clarification of the ODR.
@CharlesBailey, so does the standard saying "each definition of D shall consist of the same sequence of tokens;" always imply that the function definition must be the same? Or can it ever mean something different?
 
Als
1:54 PM
@ChrisA: If it is different it is UB.
I believe this is discussion with regards to inline functions?
 
Thanks @Als, (yes this is with regard to my question about inline functions stackoverflow.com/q/10673570/677667)
I'm relatively new at interpreting the standard, so I'm wondering whether "same sequence of tokens" always means "same definition".
 
@ChrisA Was that the question @CatPlusPlus was complaining about?
58 mins ago, by Cat Plus Plus
What is with people and those inline members questions. It's been like gazillion of them in the past week.
 
Als
@ChrisA Yes it does,
 
@Pubby, I didn't know he was complaining about it. I did search for an answer before I asked.
@Als ok, thanks.
 
Oh, it's not a problem or anything, there's just been a lot recently
 
Als
2:02 PM
@ChrisA No problem :)
 
@ChrisA "The same sequence of tokens" means that the definitions have to consist of the same sequence of tokens. That's the first requirement of them "being the same" but it's not the whole story.
 
-1
Q: Why cannot implicity convert sub class object to base class object in C++?

ipkissSuppose we have: class A { } class B : A { } And we all know that B b = new A; is not possible. We can find lot of explanation on SO as well as on the other sites. Some of the answers such as because B is a kind of A and so on. OK, I agree, but let see what happens in memory: So: A a = new B...

 
@CharlesBailey, ok right. But it's enough to disqualify my case from that exception from the ODR, so it's all that I need.
 
^ Needs more close-votes.
 
A definition could consist of the same sequence of tokens but not be the same because a token that is an identifier might refer to something different depending on the context surrounding the definitions. Hence the next paragraph.
 
2:06 PM
Is class A : B really private inheritance?
 
@ChrisA Yes.
@Pubby Yes.
 
@CharlesBailey, thanks for your help.
 
2:21 PM
@ChrisA.: E.g. here for example of same token sequence but still different. stackoverflow.com/questions/4276794/…
 
@CharlesBailey, cool, that was my next question.
I want to dig into this more. I hope my question didn't seem too newbish. I actually did read the standard, just didn't quite understand it.
@CharlesBailey (who seems to be now gone) thanks a lot. That's an awesome answer.
 
 
1 hour later…
3:41 PM
This is ridiculous. Chat's process is taking up 486MB of memory.
 
No, it's not ridiculous, it's because we're so awesome that we need that much memory.
 
Some stupid extension is leaking.
I hope it's not Ghostery or ABP, I feel vulnerable without them. :<
 
What, they're like your armored pants or something?
 
@CatPlusPlus haha, I feel the same, + NS
 
3:51 PM
I have a suspect. After disabling Stylish everything seems smoother and KoL's relay memory consumption isn't growing exponentially.
Like usual.
 
@EtiennedeMartel two of the best...dare i say essential plugins
 
Sadly original NoScript isn't anywhere near being ported to Chrome, and clones didn't work so well last time I checked.
 
user784668
@CatPlusPlus Use Dillo instead of Chrome, problem solved.
 
If you watch 'Brokeback Mountain' backwards, it's about 2 cowboys having sex.
 
> Lightweight browser alternative for those running Unix.
Unix.
 
3:55 PM
That's vague.
 
user784668
lol
 
Also FLTK?
That thing's still alive?
It's awful.
 
Now there's a weird ghost smiling at me from my Chrome toolbar.
 
better a ghost from your toolbar than the whole internet from your back
 
The annoying thing about Ghostery for Chrome is that you have to go to options every now and again and check new bugs to be blocked.
Firefox's version notifies about updates. :.
Everything but Stylish enabled. Let's see how it goes.
Now, how do I debug a leak in a Chrome extension.
 
4:17 PM
any opengl experts here?
 
Depends on your definition of an expert.
 
im still confused how opengl handles GL_QUADS, should i ever use those, or GL_TRIANGLES instead? can there be performance problems with using GL_QUADS now or in the future ? so if i use vertex array with quads, will my gfx card drivers convert that data into triangles and then send it to the GPU ? how about GL_LINES, is that supported too or should i use triangles for that too?
 
GL_QUADS is deprecated.
LINES is fine, doing lines with triangles would be pretty awkward.
 
how exactly is quads handled then
does the GPU somehow convert it to 2 triangles beforehand... and that will be slower?
 
Decomposing a quad into triangles is pretty straightforward.
 
4:27 PM
if i release a game which uses gl_quads, can i expect it to work well with everyone in the future?
 
For some near future. "Deprecated" means new applications shouldn't use that functionality.
 
Hello. How fast are you learning?
The best way to learn C++ is to get a book and practice practice practice. Just write some applications.
Even if they are command-line apps.
 
user784668
The best way to learn C++ is to abandon all the hope.
2
 
That's platform-dependent.
 
user784668
@LearningSlowly Unrite, you have to create a window first.
 
4:40 PM
@LearningSlowly You can use something like Qt or SFML
 
On Windows, you would use the Windows API Qt or Windows Forms. On Linux GDK or Qt and on Mac OS X you would use Cocoa. There are many alternatives for each platform though.
It is, so what?
 
user784668
@RadekdaknokSlupik s/GDK/GTK+/
 
@LearningSlowly Why?
 
WinAPI and X are pretty much the most "from-scratch" you can get. Otherwise you need to write your own windowing system.
 
user784668
:3775951 GDK is a part of GTK+ which you don't want to use directly. Just use GTK+, and unless you're porting it to a new platform, forget about GDK.
 
4:43 PM
Beware that they are C APIs, and therefore they suck.
@Fanael My bad. I never used GDK.
 
@LearningSlowly I think you might be going about this the wrong way. Ask yourself what you want to do, then look for the best tool to accomplish that goal.
 
user784668
@RadekdaknokSlupik And now you can't even fix your message.
 
Right... but what kind of application may change which library is best to use.
A game vs. some kind of medical database program would have completely different requirements.
No...
That's like saying I know how to use a hammer, therefore I must know how to use a jackhammer.
 
Oh I love documenting code…
  /**
   * @brief Returns the handle.
   * @return The handle.
   */
 
@RadekdaknokSlupik and the function name is called ReturnHandle, right? ;)
 
4:47 PM
@LearningSlowly: in Computer Science there is a concept of "interface", offered by a software layer which interacts with other software layers. At the bottom, you have the interface offered by the Bare Metal, which is handled by the operating system. Pick your interface and build upon it, possibly the one most high-level one.
 
user784668
@RadekdaknokSlupik GDK is the code that abstracts away the differences between X and Windows and Quartz and whatever. GTK+ is the actual toolkit.
 
@JamesCuster operator Handle() :P
@LearningSlowly if someone can write a game, he probably cannot write anything else.
At least not without lots of premature optimizations et al.
 
user784668
@RadekdaknokSlupik I only hope it's explicit.
 
@Fanael nope, and whether it should be explicit or not depends on the class it's a member of.
 
@LearningSlowly The "features" are not the hard part of creating a GUI program (or a console program, for that matter). The hard part of programming is in the design of the program, and how everything interacts with each other.
 
user784668
4:49 PM
@RadekdaknokSlupik Oh no, an implicit conversion! You'll burn in hell!
 
Yup.
Say you want to write a text editor. You'd have a textbox and save and open functions. You want those to interact with each other, you need a design for that. What will call what? What will happen when?
 
@LearningSlowly I highly recommend you read Bjarne Stroustrup's book Programming -- Principles and Practice Using C++
 
@LearningSlowly: it is usual for a beginner to starting with a GUI application. Unfortunately, it is not the good way to go, because GUI application requires a fairly amount of experience in decomposing a problem into smaller pieces, ability to correctly use a framework and a knowledge of some key concepts and mechanism (like event-driven programming). For a newcomer, it is simply too much.
@LearningSlowly: Focus on small but well-defined problems (like building a data structure), a thing that gives you the opportunity of learning things step-by-step.
 
He also touches on creating some small graphical programs
 
Documenting code is booorrrinnng.
 
user784668
4:53 PM
@RadekdaknokSlupik "Documenting" code with "documentation" comments ­— don't.
 
@Fanael I have bad experience with undocumented code, and I don't want others using my code to have the same experience.
 
You should learn Haskell.
4
 
API references are always better than nothing.
 
@RadekdaknokSlupik Do you really need to document Handle by saying it simply returns a handle?
 
@JamesCuster it may not be obvious. xD
But I'll not document everything.
 
4:55 PM
Maybe if you renamed it GetHandle() it would be more obvious ;)
 
GetObviousHandle
 
user784668
/**
 * @brief Returns five;
 * @return Five.
 */
constexpr int returnFive() { return 5; }
 
/**
 * @brief Returns five;
 * @return Five.
 */
int returnFive() { return 4; }
 
Outdated comment!
 
documenting everything is as idiotic as documenting nothing
 
4:57 PM
Meh I'll leave out anything that's obvious. Move constructors, copy constructors, destructors, Socket::connect, Socket::bind etc.
 
just document key functions and classes responsibilities, when they are not obvious enough
 
Yeah. Thank God.
Haskell is awesome.
 
@LearningSlowly: an awesome, purely functional language
 
Purely awesome.
 
@LearningSlowly: are you attending college?
 
4:58 PM
@LearningSlowly Seriously, read the book I linked to earlier.
 
It actually has a type system that wasn't patched together with duct tape.
 
Header files y u always longer than cpp files.
 
user784668
@CatPlusPlus It actually has a type system.
 
@LearningSlowly that's most often the case.
 

« first day (582 days earlier)      last day (4382 days later) »