« first day (35 days earlier)      last day (4921 days later) » 
00:00 - 17:0017:00 - 00:00

12:19 AM
hmm
 
 
2 hours later…
1:59 AM
Hmm?
 
2:53 AM
@JohnDibling "sure, it works now. what happens tomorrow when it unexpectedly breaks?"
 
3:17 AM
0
Q: Please retag from [adl] to [argument-dependent-lookup]

Johannes Schaub - litbPlease retag questions from [adl] to [argument-dependent-lookup] and (possibly) make the former a tag-synonym of the latter. Making them synonyms is possibly not without trouble, because there are two questions that use it with different meaning - one about "AIR Debug Launcher" and one about some...

 
3:36 AM
only 10 questions and 2 are mistagged? seems better to simply retag those two and revisit when there are more questions
 
@JohannesSchaublitb No love for [koenig-lookup]? ;-)
 
KL is the old name, no slight intended to Koenig, but ADL should be the preferred name now
 
I know.
I'd guess that he's probably glad to have his name removed from ADL :-P
 
"When working in a team on one project, it is a really good idea of having basically the same file structure for all developers, at least, for everything that is important for your project (not only all of your source code, but all tools, drive letters etc.)" stackoverflow.com/questions/4229718/…
do people really do that?
 
We did that on my last team. You could check out the source to anywhere, but you had to map our third-party dependencies to x:; it made setting up the build scripts much simpler and helped with build automation.
I'm sure there are other ways to do it, too...
 
3:52 AM
dependencies should be in the repo
yours is different enough because you're essentially using symbolic links; the above quote isn't
 
They were in the repo, but there were 40 gigs of dependent libraries and hundreds of gigs of test data.
 
I don't see the problem there
with centralized VCS, you only check out a particular subdirectory if that's all that interests you, so large dependencies are still in the repo
with decentralized VCS, a group of repos forms a "single repo", e.g. hg's subrepos, so it requires more thought upfront, but you still can check out a particular subset if that's all that interests you, so large dependencies are still in the repo
 
We needed to check out all 40 gigs of libraries to be able to build the main project. There weren't pieces of it, really.
 
by "that's all that interests you" I'm talking about cases where you want to distribute just your source or want to otherwise work on it without building
 
Oh. I've never found it very useful to write source code and not build it.
 
4:04 AM
but if the 40 gigs is always required in all situations, I don't see the problem from using relative paths
there are tons of ways to work with source without writing it :)
 
@FredNurk The issue was being able to check out the dependencies just once but be able to check out multiple copies of our sources so we could work on multiple branches. To do that, we either had to enforce that all projects were checked out into a common location relative to wherever the dependencies were checked out, which was impractical for us.
 
um, I thought I covered that with the CVCS and DVCS description above
 
I may not be explaining this very well.
 
I'm tired and may not be understanding very well, too
in any case, your use of x: is much better than requiring identical machines as the above quote does
 
4:20 AM
I didn't think he meant that everything had to be identical; I thought he meant that you should make sure source structures are identical.
Oh, he did say "all tools, etc."
Well, nevermind then.
 
4:57 AM
/me sips his buttermilk
dammit i should get sleeping. it's already 6am in teh morning here
lol
 
sorry to post in wrong channel, does anyone know vb?
 
@Ahsan yes, many people know vb
@JohannesSchaublitb at six in the morning it's time for a cup of coffee, today's news, so on. just forget you haven't slept
@JohannesSchaublitb "buttermilk"? you mean you have butter in the milk?
 
5:14 AM
@AlfPSteinbach it's called that way in germany "buttermilch" :)
 
@JohannesSchaublitb hm. i googled it. it seems to be the same as "kefir" in norway?
@tina good morning. it actually is morning also in Norway and Germany. 6 am
Coffee!
what does that mean, "ahhan"?
 
@AlfPSteinbach i think "kefir" is again something else. i'm not an expert, but we have Kefir here too and it's a bit different
 
@JohannesSchaublitb maybe we don't have buttermilk in norway, then. or perhaps kefir is just a special kind (made with kefir grains or something)?
 
i'm really all noob
2
 
well, it's morning. i'm putting on the radio on the PC. it's interesting experiment to also have the same station playing on the stereo. there's a few seconds lag on the PC... :-)
norwegian radio P4, it's about a beauty contest for women mutilated by land mines, first done in Angola.
oh, i'm off topic!
mms://mms-cluster2.nextra.no/P4_Norge
 
5:26 AM
i suspect you just got up?
hmm norway. that should be in my timezone
 
in a sense. i been writing. i attempted to view an old sf series from 1978 (nrk is very nice, puts old series on the net) but then my machine wouldn't have none of it
 
@Alf i'm currently writing the "typename" faq entry
i like TNG :) occasionally watching some of it
i bugged haskell IRC channel all day long yesterday with silly questions xD
 
oh, this was a kind of "alien" forerunner, about a year before the "alien" movie. very scary, called "stowaway".
i think it's interesting to see how they visualized future computing equipment in 1978 :-)
it actually looks pretty modern
probably not available in germany, but: nrkbeta.no/2010/10/27/blindpassasjer
 
Neo
hi I wanted to compile part of my php code into a C++ Apache module, can anyone give me advice?
 
5:43 AM
@Neo dunno. look at hiphop, developers.facebook.com/blog/post/358 ?
 
Neo
yeah I just finished compiling some stuff in hiphop
it's really cool
the problem with hiphop is it's take it or leave it
 
oh, blame andrei. i think he's at facebook :-)
 
Neo
you can't only use it for part of your application
whose andrei?
or at least I don't know how to
 
Neo
I'm gonna actually use hiphop to change my php sysntax into c but I want it to be an apache module so I can still run the website in php
 
5:46 AM
check out hiphop mailing list, perhaps?
 
Neo
m.. where would I ffind an archive of that?>?
 
i'm amazed at my google-foo powers :-)
 
Neo
pretty impressive
 
ok, hope that helped a bit. afk
 
Neo
thanks
 
6:27 AM
ohh!
0
Q: "typename" / "template" and dependent names

Johannes Schaub - litbI'm getting weird errors in a template definition where I want to access a type declared in a template parameter, like T::type. Likewise I try to use templates declared in a template parameter, like T::foo<int>, but it won't compile! I heard this has something to do with dependent names. W...

 
7:12 AM
@JohannesSchaublitb Very nice.
Much better than the common recommendation of "when you get weird errors when using templates, try adding template and typename until it compiles right." :-P
 
7:56 AM
@James thanks xD
 
 
1 hour later…
9:14 AM
3
Q: Trailing Array Idiom

Prasoon SauravWhat is Trailing Array Idiom ? P.S : Googling this term gives The vectors are implemented using the trailing array idiom, thus they are not resizeable without changing the address of the vector object itself.

 
9:51 AM
Hello, world!
I answered Prasoon's question about the trailing array idiom, but now I've got a question myself.
Anyone here familiar with GCC internals?
Or with Google code search, for that matter?
Never mind!
 
10:52 AM
@larsmans I'm not. I once delved into the GCC source and modified it a bit, to back up an idea I had for more high-level exception handling. It was very untidy old K&R C source.
@tina yes
@larsmans to use Giogle code source, just use it... ;-)
@tina A macro redefinition is where you have a macro called SOMETHING, and you define the macro SOMETHING. It has the same effect as #undef SOMETHING and then #define SOMETHING, except that the compiler will more probably emit a warning
 
11:13 AM
if i were to write one of those faqs, which one should i write?
@tina "FAQ" is literally short for "Frequently Asked Question". But it's really a collection of answers to frequently asked questions, or one answer in such a collection. The general C++ FAQ is the C++ FAQ Lite, maintained by Marshall Cline. The C++ guys here at SO have started to create a SO C++ FAQ.
@tina Sorry, an error: Marshall changed the name back to just "C++ FAQ" (not "C++ FAQ Lite" any longer) in August.
 
sbi
11:32 AM
@AlfPSteinbach See my comment to Johannes' latest. As great as his may be, I'm all in favor of picking an existing question and giving a good answer to it. For one, if you add a question that had been asked before, per charter it should actually be closed as a dupe. And these made-up questions did get a lot of flak. If we advertise a new answer to an existing question here at the right time, there shouldn't be a problem for a good answer to bubble up.
As for what would be worth: have a look at my comments here: stackoverflow.com/questions/4182579/constructor-in-c
 
@AlfPSteinbach How about Exception Handling in C++? I dont see a very good FAQ/article on exception handling on SO.
@sbi Can this question be tagged [c++-faq]?
 
@sbi are you saying that good way to provide a faq item is to find best of host of duplicates of existing question, and tag it as [c++-faq]?
@PrasoonSaurav exception handling seems an overly broad topic. The C++ FAQ has 17 distinct items on exception and error handling.
 
sbi
@PrasoonSaurav I said it before, I'm not the FAQ police!
21 hours ago, by sbi
@JohnDibling I dunno. I'm not the FAQ police. :) Was this asked before?
 
sbi
21 hours ago, by sbi
@JohnDibling Well, anyway. If you consider something worthwhile, then that's fine with me by default. None of us has any experience with this. Let's just try what we think works, and weed out later.
@AlfPSteinbach Yes, that's what i think we should do. We should take questions that really are frequently asked here, and turn them into FAQs.
For one, that's one of a few major arguments for a C++ FAQ here.
 
11:41 AM
@sbi Ok :-)
 
@sbi I'm with you on that principle, but I'm unclear on practical approach
 
@AlfPSteinbach then how about an article on STL containers (when should we use which one)? :)
@sbi I thought you were the C++-FAQ "Standard". :D :D
 
@PrasoonSaurav oh, that's a can o' worms, the deque versus vector thing, not to mention the silly-decision about list splicing. i'd probably spit vitriol writing it :-) so...
 
sbi
OK, I'll try to outline what I think:
1. Pick any of the frequently asked questions.
2. Improve on the question if necessary.
3. Write a good and comprehensive answer to it. If the topic is too big, write several answers, with one linking to the others. (If in doubt err to the side of several answers.)
4. Advertise it here, so we can all up-vote it. :)
There's a few problems with this approach. For example, it would be good, if this answer would be accepted. That might be hard to get for an old question.
 
@AlfPSteinbach : The one on the STL containers would be very good because I don't think C++-FAQ (Marshall Cline's) includes those stuffs. Plus read the third point If the topic is too big, write several answers, with one linking to the others.
 
sbi
11:46 AM
But that could be overcome by preparing an answer, and shooting it when such a question comes in freshly. (There's problems, too. For example, it could be closed as a dupe before that answer gains enough traction...)
I'll try to bookmark thoughts about the FAQ that come up here.
This is my first shot:

FAQ thought #1

5 mins ago, 2 minutes total – 4 messages, 2 users, 0 stars

Bookmarked 1 min ago by sbi

 
Is there any way to search for collections of questions that form a duplicate group of size > n? I checked search page, didn't see any?
 
sbi
There was some way to make comprehensive DB searches introduced a few months ago.
Lemme see.
I can't find it. :(
Ah!
 
I can see only 3 messages(not 4).

`sbi 75%` `Prasoon Saurav 25%`
 
@sbi Thanks -- I'll look into it (if not someone else solves that first)
 
sbi
12:02 PM
@PrasoonSaurav Huh?
 
I was talking about the number of posts [here](http://chat.stackoverflow.com/rooms/10/conversation/faq-thought-1) . See the names of the participants at the right hand side.

4 messages, 2 users, 0 stars

FAQ thought #1

20 mins ago, 2 minutes total – 4 messages, 2 users, 0 stars

Bookmarked 17 mins ago by sbi

 
hi
 
sbi
@PrasoonSaurav Well, I was just trying to bookmark my thoughts. You just intervened without my consent. :)
@Daniel: Hi.
 
Hello, i'm actually not an expert in C++
And was wondering what it's like compared to C
 
@Daniel C++ is not a superset of C. :-)
 
12:08 PM
ah
 
o.O i just heard a beep
 
@sbi Oh!!
 
Hehe, DB queries great: most controversial answer on C++ (upvotes canceled by downvotes): stackoverflow.com/questions/1783465/…
 
sbi
@Daniel C supports one programming paradigm: Structured Programming. C++ is a multi-paradigm language, supporting Structured, Object-oriented, Generic, Functional... Programming.
C++ programs can be easier to write and to read (especially when it comes to resource management and error handling). But since C++ is so open-minded, it's huge, with a real lot to learn about it. I have been programming C++ for > 15 years, and I'm still learning stuff almost every week - and that's not even counting the next version of the standard...
 
12:18 PM
oh ok
 
@Daniel If C : River then C++ : Ocean where : means can be thought of
 
lol ok
 
 
1 hour later…
1:40 PM
argh, I have to teach myself SQL again. ok, things gets rusty after a decade of non-use. but really
 
I'd be very happy to have a decade of vacation from sql. i can't tell if i hate relational or sql because i don't know any other relational language. but god.
 
I'm just trying out queries to the SO database, here
Table Posts has column Id, corresponding to PostTags.PostId (I think), that is column PostId in table PostTags. PostTags.TagId corresponds to Tags.Id. Tags.Name is e.g. 'c++'. Query to retrieve say just 5 posts with tag 'c++'?
Sorry, that should be Tags.TagName
I'm guessing that I have to name something in order to avoid name clash Posts.Id and Tags.Id (which is different id)?
Uh, should I tag above call for help as "homework"? I'm at home, but it isn't really work?
 
2:39 PM
@FredOverflow: please see my comments in your just-posted faq. i really disagree with how the posted advice is given
 
This really took some time, and I can't believe that this is how it should be done!
declare @CppPosts table (PostId int)

insert @CppPosts
select PostId
from PostTags inner join Tags
on PostTags.TagId = Tags.Id and Tags.TagName = 'c++'

select top 13 Id as [Post Link], Tags
from Posts inner join @CppPosts on Id=PostId
 
@Alf your link is broken
or is that not a link?
 
not a link, I just pasted the SQL.
 
gotcha
 
as I recall things in SQL could be nested, like putting the definition of @CppPosts where it's used, but I can't get that to work
hm, afk
 
2:56 PM
@JohnDibling Good points in your comments, why don't you make them into an answer?
 
I actually am doing that rioght now
 
@JohnDibling awesome
 
3:20 PM
@Fred: OK version 12 posted, please take a look
Already edited to version 2 :)
Version 3
 
@JohnDibling Why did it start with version twelve? :)
 
because i have fat fingers
 
@JohnDibling Like Homer Simpson when he tries to call the nuclear plant in "King-Size Homer"? :)
 
lol exactly
 
> The fingers you have used to dial are too fat. To obtain a special dialing wand, please mash the keypad with your palm now.
ouch there was a piece of wood in my salad!
 
3:32 PM
lots of fibre in that salad
is this a frequent question?
9
A: Why does dynamic_cast only work if a class has at least 1 virtual method?

John DiblingBecause dynamic_cast can only downcast polymorphic types, so sayeth the Standard. You can make your class polymoprphic by adding a virtual destructor to the base class. In fact, you probably should anyway (See Footnote). Else if you try to delete a B object through an A pointer, you'll evoke U...

Version 4 :)
 
4:08 PM
@JohnDibling Oh, now I see, here's link to query form: odata.stackexchange.com/stackoverflow/query/new
 
@Alf: Ah, cool. Didnt know about that, thx
 
But in addition to having forgotten nearly everything about SQL, my brain is now in sloooooooooooooooooooooooooooooooooooooooooooooow mode.
@tina The const _E* specifies the function result type. It is equivalent to _E const* which you can read backwards as "pointer to constant _E", where _E presumably is a template parameter or typedef that in the end will be char or wchar_t (most probably).
@tina The c_str() says that this is a member function named c_str() that doesn't take any arguments.
@tina The following const says that in the body of that member function, the this pointer will point to const object. This means the function can't modify the object that it's called on, at least not in a way that's apparent to calling code. It also means that this function can be called on a const object.
All this said, chances are that you're now looking at the source code for a particular implementation of std::basic_string, and probably code written by P.J.Plauger (or perchance Pete Becker). It's not a good idea to look at that code. The Holy Standard(TM) defines exactly what it should do, and that's all one needs to know... :-)
@tina No, not can only, but can also. If it were not const, then it couldn't be called on a const object.
yes, i think you got it
Because there's no non-const version of c_str(). There's no need. Since it's const it can be called both on const objects and on non-const objects.
The const-ness says it promises not to change the object in any way that caller can see. So it can be called on any object. In contrast, a member function that doesn't promise to not modify, cannot be called on an object that is const.
Mostly all that you need to know about c_str() is that it produces a pointer to a zero-terminated string, commonly known as a "C string".
right
 
sbi
4:32 PM
@FredNurk @James Here my take on the issue of build paths: stackoverflow.com/questions/4229718/…
 
2
Q: What is the meaning of a const at end of a member function?

MatWhat exactly does the const keyword in C++ mean when it's written at the end of a member function (after the argument list)?

@tina at the start it means the return type is const.
`std::string foo()` returns a non-const string
`const std::string bar()` returns a constant string
@tina no, function can also return objects, such as std::string
@tina: From what book are you learning C++?
Hello @joh
 
@sbi where should we put the other dependent-name issues? I mean in particular: dependent base classes, dependent names in C++0x ("current instantiation"), dependent function calls.
 
sbi
@Johannes Huh?
 
hello there, @Fred !
 
@tina: const is just a kind of promise. it's useful because the compiler points out (with error message) where the promise is inadvertently broken. but you can break it if you want, you can tell the compiler to just accept code that breaks that promise.
 
4:44 PM
@sbi i mean should we do new C++ FAQ questions for them?
 
@tina right, it only restricts what the caller can do with the returned value/object.
 
or do you think one could put them all into "typename / template and dependent names"? or is that question to specific for those topics?
nerdy litb with his weird thoughts haha
 
sbi
@Johannes I think expanding the existing entry (preferably by adding new answers) would be the best. But that's just me.
 
4:46 PM
tiiinaaa! is she a girl?
lol i'll trust you! haha
 
@tina: You still didn't answer the question about the book. Learning C++ without a book is an extremely bad idea.
 
Hm, I'm now up to 4 "nice answer" badges. Perhaps I'm not as offensive and vitriolic as I thought I was. Time for infusion of grumpiness...
 
@joh: oh what is this "conditionally-supported" behavior? never heard about it.
 
sbi
@tina Without a book, all these discussions are useless. You will not, not, I repeat: not learn C++ by trial + error + asking basic questions. Pick up a book, start on page one, do all the exercises. Good books are recommended here. Assume anything not on this list to have errors. (Yes, they do. Trust me on that. There's tons of bad C++ out there, sporting the most hilarious errors.)
 
4:53 PM
@Fred it's when the impl can either support something or when it doesn't it is implementation-defined what happns, or some such thing
@FredOverflow they made the data-pointer2function-pointer conversion conditionally supported
 
@sbi Every C++ book has errors. For example, the explanations of lvalue and rvalue in "C++ Primer" are completely wrong.
 
Actually, puffed stomach lining is not so bad. Quite tasty.
 
@JohannesSchaublitb Why would I want to convert a data-pointer to a function pointer???
 
@FredOverflow Because Posix requires it to be possible, so presumably has function arguments where function pointer is treated as void*?
 
@FredOverflow sometimes it's needed, for dlopen for example
 
4:57 PM
hi guys
i have a one dobut
i am an android dveeloper
developer
 
@TilsanTheFighter I want a donut!
2
 
donut means
 
anyway, i see now: it defines it as "behavior that an implementation is not required to support", and says if a conditionally supported behavior the impl does not support is violated, a diagnostic should be emitted. in every place where it says behavior is conditionally (also for passing non-trivially-copyable types through "..." parameters) it says "is conditionally-supported, with XXX semantics." like "with implementation-defined semantics"
 
sbi
@FredOverflow Of course, every C++ book has errors. But not all are full of the most hilarious errors. Most of them, however, are. Sadly.
 
actually, i only find it saying "with implementation-defined semantics" but i guess theoretically it could also state other semantics.
 
00:00 - 17:0017:00 - 00:00

« first day (35 days earlier)      last day (4921 days later) »