« first day (220 days earlier)      last day (4729 days later) » 

1:44 AM
there's several questions on meta about c++ now, should there be a [c++] tag on meta?
meta.stackoverflow.com/search?q=c%2B%2B shows 1,587, but many of them wouldn't be applicable
 
2:00 AM
I just noticed [c++11] has been synonymed to [c++0x], anyone know when that happened?
I think a moderator did it, because earlier today I thought I had seen the reverse proposal was at a score of +1
(but, contingent on getting a moderator to reverse the synonym when the standard is published, I think this is a good thing)
 
 
3 hours later…
4:41 AM
is there any Image processing Forums website
i posted my question on this site
but no one did not reply me ///
i am googling more website site related to Image processing
but i did not find any usefull website
 
sbi
@DavidRodríguezdribeas Now it needs only one more vote. :)
@FredNurk According to stackoverflow.com/tags/synonyms @Jerry proposed it.
I think it's wrong. This way we'll still be talking about C++0x (a term that's been outdated since Jan 2010) five years from now. That's just plain stupid.
 
4:59 AM
@sbi but then either 4 people had to upvote it, which given how slowly the other time it was proposed (by someone else) didn't get accepted, I thought a moderator pushed it through
I guess if he had posted somewhere like here, people might've voted as a reaction
@sbi the term hasn't been outdated; remember it's a project codeword
> The name "C++0x" is a relict of the days where I and others, hoped for a C++08 or C++09. However, to minimize confusion, I'll keep referring to the upcoming C++ standard with the feature set defined here as C++0x. www2.research.att.com/~bs/C++0xFAQ.html
speaking of synonyms, this one looks good: stackoverflow.com/tags/oop/synonyms
 
sbi
@FredNurk I sometimes disagree with Stroustrup. This is one of those cases.
 
you disagree with the definition of a term he has de facto authority to define? :P
 
5:58 AM
Running 10 test cases...

*** 18446744069414584320 failures detected in test suite
 
6:20 AM
@FredNurk And so it is outdated, in teh same way that Longhorn is outdated because these days we talk about Vista
Or will be in a few months, anyway
 
6:32 AM
@LucDanton oops :(
 
@TonyTheTiger Removing a test case from the suite cuts down on a lot of failures
Of course it's not the test case that I've been working on and there are still failures but... progress!
 
@LucDanton oh I see
 
7:08 AM
morning @KonradRudolph!
 
good morning
huh, didn’t even notice that I was in the chat
 
oh lol
once you're in, you never get out, haahah :P
 
7:38 AM
wait what
someone emailed me asking what I meant with one of my tweets
 
@jalf Longhorn is outdated because there is now an official name; there is no official name for 0x – yet
though even for your specific example, I've more than heard msft people use codenames after release :)
 
cpx
Can you filter questions based on one of multiple tags? E.g Show me newest questions tagged or
 
cpx
That includes both tags
 
you can use stackexchange.com/filters for 'or'
(they changed the name, apparently)
 
cpx
7:52 AM
Done. thx
 
8:15 AM
@FredNurk yeah, I was talking about the case a few months from now, when C++11 is official
 
@sbi lol :P
 
sbi
I'll have a "Chicken 404", please.
2
 
@sbi with some 500 fries :p
 
Xeo
8:32 AM
ohayô o/
 
8:57 AM
hai
 
@Xeo Good morning :)
 
hey
 
hello
 
Howdy
 
sbi
#nudge How do you say nicely to people you want to follow that you have hard times mentally filtering out their "good morning" tweets?
 
8:59 AM
what's new?
 
sbi
:b
 
@TonyTheTiger Hmm, Japanese exams soon :)
 
@StackedCrooked huh? you study Japanese?
 
sbi
@StackedCrooked "Japanese exam"? Is that on par with "French fries" and "Turkish coffee"?
 
@TonyTheTiger Yeah
@sbi I like them all.
It's on par with Xeo's morning greeting.
:)
 
9:02 AM
@sbi In response to @pipelone, I can only say: “@a_williams, I’m looking at you!”
 
sbi
@StackedCrooked Oh, that. And I though he had his coffee mug dropped onto the keyboard.
 
really annoying :(
 
sbi
@KonradRudolph Indeed! In fact, I unsubscribed from him for that!
 
@StackedCrooked /me is impressed :)
 
Xeo
@StackedCrooked /me wants that too. :(
 
9:05 AM
@TonyTheTiger It's something I started about two years ago. I was laid off and looking for work. Taking classes seemed like a useful way to use my free time.
 
@StackedCrooked oh nice :)
 
It's actually really fun. I think I just love language classes.
 
@StackedCrooked :)
 
@Xeo Then do it :D
 
Xeo
@StackedCrooked Money. :/
 
9:14 AM
@Xeo I see. Being a student does limit your options. I remember all too well :(
 
@StackedCrooked pf, options. Who needs them?
 
@jalf C++ programmers :)
 
9:47 AM
:)
 
Btw, when asking for the time in German, do you ask "Wie spät macht es?", or is it "Wie spät ist es?"
 
AFAIK: "Wie spät ist es?"
 
@TonyTheTiger that seems right when I Google it, however, for some reason I always remember it as "Wie spät macht es?" ... Must be my faulty memory.
 
@StackedCrooked yes, machen doesn't really make sense in that context I think
 
Perhaps I'm confusing with french ("il fait..")
@TonyTheTiger are you able to converse in German? (I absolutely don't, lol)
 
9:58 AM
@StackedCrooked I wouldn't use "fait" for time. ("Quelle heure est-il?" "Il est midi moins 3")
 
@AProgrammer Damn
 
sbi
@StackedCrooked He is. He had beer with three Germans on Sat night, remember?
 
@sbi Yeah, from that I can only logically deduce that he is able to speak German ;)
 
@StackedCrooked somewhat, yes
 
@sbi You could have spoken in english and if drinking german beer teach you german, I should be able to spoken german, which I'm not.
 
sbi
10:00 AM
@AProgrammer Well, we did speak English, too, but we also just chatted away in German, and I did have the impression he understood quite a bit of it. And he definitely was able to answer in German, too.
 
I didn't really have good German teacher. All she did was tell gossip (in German). And then out of the blue a very hard exam.
 
@StackedCrooked My German teacher was German, so was quite good. Also, then did Support on my first job in German, got me some good practice
though I think you really only master a language after you've lived in a country where the language is spoken and you spoke for a few months non-stop
and German esp, cause the grammar is hard and painful
 
I wonder if I would have remembered any more of it if I'd taken german in school instead of french
 
@jalf ugh French, I don't speak it very well, though I did learn it
understanding, I can somewhat manage
 
Xeo
@TonyTheTiger I got a teammate that is from dutch and speaks english all the time. :) It's really nice to talk to him to improve my english.
@jalf Ugh. French... Burn that language D:
 
10:07 AM
@Xeo oh, but I thought you were English?
 
Xeo
@TonyTheTiger I'm german, what made you think otherwise?
 
@Xeo for some reason I thought you were American and lived in Germany... not sure why
 
Xeo
@TonyTheTiger I'd be glad if it was my english. ;)
 
@Xeo not sure where I got the idea from
@Xeo your English is not bad at all :)
 
sbi
@TonyTheTiger How to learn a language: 1) be in a country/area where only that language is spoken, 2) be alone, unable to depend on anyone except natives, 3) be hungry.
 
Xeo
10:10 AM
@sbi How to bust that plan: Have a photo handy and make a photo of what you want.
 
@sbi How to bust that plan: say "hamburger".
And keep eating burgers for the rest of your stay. End result: both your health and your speech sucks.
 
Xeo
@MartinhoFernandes "Hamburg" is a city in germany. :)
So if you're evil, you can eat human hamburgers too
 
Where the fuck did that come from?
 
Xeo
Don't question it.
I'm sleep deprived.
 
@Xeo Does it have anything to do with burgers? Like the origin or something?
 
Xeo
10:15 AM
@MartinhoFernandes Dunno, but in german city-name + "er" means a resident of that city
 
sbi
@Xeo I have lived in a furrin country for half a year, and believe me when I say that you run into a lot of things you didn't anticipate, so you couldn't have a picture of it with you.
 
Oh god, now that comment about canibalism makes some weird sense...
 
sbi
@MartinhoFernandes See, if you're content with eating hamburgers for weeks or even months, then that's all the foreign language you'll ever need. If not, you'll learn.
@MartinhoFernandes The German "Burg" means "castle" in English. Many German names of places end in "-burg". (Think "Newcastle".)
 
so, what's the big deal with inline namespaces in c++0x? only just read up on them, but can't really see the point. Why not just define the namespace the old way, followed by a using namespace?
 
Xeo
@jalf What were they doing again?
 
10:26 AM
that's what I'm trying to figure out. Sounds like inline namespace X {} is pretty much equivalent with namespace X{}; using namespace X;
so presumably, I'm missing something
 
@sbi hahah :)
Had me asking directions a few times last weekend...
 
10:42 AM
does anyone know if in .NET you can overload ToString on an enum?
 
you can't
 
enums don't get much special treatment in .NET. They're not class types or anything
 
could always define a separate (extension) method, which has an overload for your enum, and otherwise just forwards to ToString
 
10:49 AM
Yep, enums are just disguised ints.
 
11:16 AM
can you simulate iterators in .NET like the C++ iterators? So if I had an AddRange function, I'd like to be able to pass (begin, end) type thing. Is that possible?
 
kiiinda
you could, but it'd be all dynamic polymorphism, so they'd be slower
 
@jalf ok
 
@TonyTheTiger You can just use IEnumerable<T>.
And maybe the yield return keyword.
 
0
A: Thread doesn't terminate when main thread finishes

Tony The TigerIf printworker does not finish before your main thread is done, then main will die and your printworker thread will be killed by the OS. If you want main to wait for the thread you created, then you should call printThread.Join() in main. That will get main to wait on your thread. When main fi...

is my answer reasonable?
 
I don't see what you'd gain from a begin/end pair.
 
11:22 AM
or have I got wrong?
 
and you'd likely lose some type information (your iterators would just be treated as something like IIterator<T>, rather than the specifi std::vector<T>::iterator you'd have in C++)
 
@MartinhoFernandes me neither, but I was curious
 
Oh, and without operator overloading for things like *, ++, =, it gets ugly pretty fast.
 
@MartinhoFernandes ah yeah
.NET's #1 most baffling shortcoming
 
11:27 AM
@jalf When learning C++ I remember being impressed that it allows overloading operators.
My experience until then was mostly Java and C#.
 
@StackedCrooked in java it was an obvious design decision though. I hate it, but at least they made a conscious decision. In C#, it just seems like an absurd oversight that "you can overload operators... Just not on anything to do with interfaces"
I'm sure Eric Lippert would have some story of why this makes perfect sense and was a very well thought out decision. But it still feels like a goddamn stupid oversight
 
no idea if you can 'cycle' through operators as this question asks
1
Q: C++ cycling through operators

Ricky65Hi I have a sum, for example: x + y I also want to perform subtraction, multiplication and division on the same two variables: x - y x * y x / y what's the optimum way of cycling through all four operators in turn? I know this is easy to do in functional programming languages but in C++ ...

 
@jalf I think it is already somewhere on SO.
Argh, can't find it. I'm sure I've seen it before.
 
11:46 AM
@MartinhoFernandes well, my point is I don't care. ;) If it looks like a really stupid decision, and it, uh, quacks like a really stupid decision, then it probably is a really stupid decision
real-world duck-typing
 
Anyone familiar with kcachegrind? I can't find information on the web about demangling
 
Xeo
I'm at repcap with mere +15 rep in my stats!
 
12:01 PM
Where are references explained in the C++ standard (N3290)? I cannot find them
btw this might be interesting for you guys blog.llvm.org/2011/05/c-at-google-here-be-dragons.html
 
Another annoying C++ thing I just realized: private member functions need declarations in the header file.
 
heh it's a never ending story
ah it's 8.3.2
 
@MartinhoFernandes If you really want this then you can get around this using the pImpl idiom.
 
@MartinhoFernandes: Use PIMPL?
 
Xeo
@MartinhoFernandes This is about the only cool thing of Objective-C++ partial classes
 
12:16 PM
@Xeo I remember using "catgories" to add methods "afterwards".
 
Xeo
In that regard, C-style coding is superior as you can totally hide the private functions
I'd really like for classes to be extendible, like namespaces. Though, that's pretty much impossible to implement I think w.r.t. an objects size. what will it be?
 
sbi
@Xeo You can do the same in C++, by moving them from the class' private section into an unnamed namespace.
2
I usually prefer functions in unnamed namespaces to private member functions.
 
The one use case I see for a const reference (for example const blah(const vec3& a)) is to pass an argument to a function by reference where it's explicitly state that the function does not modify the object passed via argument, is that correct?
 
Xeo
@sbi But, friends and stuff :|
 
@Xeo Visitor pattern?
 
12:18 PM
@sbi What about access (which is the one thing private function members give you)
 
Xeo
@Nils It's one, but not the only
 
I don't see another one @Xeo..
 
Xeo
There's also the case of const-refs binding to temporaries
int const& tmp = GetIntByValue();
the temporaries life-time is extended to the life-time of the const ref
 
sbi
@LucDanton They give you access to private data, which you forfeit anyway, when you're using non-member functions. Just pass the data those functions need explicitly (from public member functions).
 
Xeo
12:20 PM
[drdobbs.com/cpp/184401197/](How Non-Member Functions Improve Encapsulation)
 
int const& tmp = blah ? A reference cannot change once it's set.. @xeo
 
sbi
@Xeo If your class befriends someone, then you basically turn everything that's private into an interface usable by that friend. And interfaces need to be in the class definition.
 
Xeo
somehow the markdown is dead..
 
@sbi I don't get that first sentence
 
@Xeo I asked it as an SO question a while ago
11
Q: Choosing between instance methods and free functions?

StackedCrookedAdding functionality to a class can be done by adding a method or by defining a function that takes an object as its first parameter. Most programmers that I know would choose for the solution of adding an instance method. However, I sometimes prefer to create a separate function. For example, i...

 
12:24 PM
ok, someone please tell me this guy has got it all wrong
0
A: Thread doesn't terminate when main thread finishes

Tony The TigerIf printworker does not finish before your main thread is done, then main will die and your printworker thread will be killed by the OS. If you want main to wait for the thread you created, then you should call printThread.Join() in main. That will get main to wait on your thread. When main fi...

cause AFAIK a thread cannot still run if it the program was killed... I don't see how he managed to come to that conclusion
 
Xeo
@TonyTheTiger you're answering C# question!
@TonyTheTiger In *nix it can, you can decouple child threads from the main thread. :)
 
@Xeo I know, doesn't matter... writing .NET code these days anyways
@Xeo this is windows...
 
sbi
@LucDanton If you give other classes or functions access to your class' private interface, it isn't all that private anymore. At least for those friends, it's public, and needs to obey all the restrictions public interfaces do.
 
In .NET you have background and foreground threads, and background ones will keep running after main thread terminates
 
@sbi I was referring to
 
12:27 PM
(but not after the process terminates, obviously)
 
:761858
 
Why do I have the Star Wars Imperial March stuck in my head?
dun dun dun du-du-duuunn dududunnn
 
Xeo
@jalf Thank you. >_>
 
sbi
@jalf You bastard! Now we all have it, too!
 
> They give you access to private data, which you forfeit anyway, when you're using non-member functions.
 
Xeo
12:29 PM
That's the same as if I suddenly posted a link to tvtropes.
 
@jalf that's not what I found
 
Xeo
While we're talking about it
 
@Xeo oh great
why doesn't someone just post a link to a monty python sketch on youtube while you're at it? Then I'll be here all night
 
sbi
@LucDanton You wrote that "access is the one thing private function members give you". I supposed that this means that your complaining because free functions don't have access to the class' private parts. But that's irrelevant, because they don't have access to anything in the class anyway, you need to pass it all explicitly.
 
@jalf >a background thread does not keep the managed execution environment running. Once all foreground threads have been stopped in a managed process (where the .exe file is a managed assembly), the system stops all background threads and shuts down.
 
12:31 PM
oh, it's the other way around then?
I always get them mixed up
 
@sbi Yeah that was my point, that member => freestanding isn't a straightforward mapping
 
@jalf so what the OP is saying seems utter tripe to me, unless I've missed something else
 
Xeo
No problem, don't need a thanks. :)
 
@Xeo don't worry, I won't
Weapons of mass distraction
7
 
12:36 PM
so does anyone know of a keyboard that's actually ergonomically comfortable, cause my hands and palms really hurt after typing on my keyboard for a while?
 
sbi
@LucDanton No, it isn't. I do use private member functions, too, because extracting everything into non-member functions sometimes is too cumbersome. (Especially with the kind of small classes I usually write nowadays.) However, I try to make as much private stuff as possible non-members, preferably in an unnamed namespace in the cpp file.
@TonyTheTiger Are you using ten fingers?
 
@sbi yes
 
@TonyTheTiger I like the Mac keyboards (the flat ones). I'm not sure if they are ergonomic, but they never gave me wrist pain..
 
sbi
@TonyTheTiger Do you have a wrist pad?
 
Xeo
@sbi The good thing, that's about the only time when a template in a cpp file makes sense!
 
12:38 PM
@sbi no
 
Xeo
@StackedCrooked Flat keyboards ftw
 
@TonyTheTiger Yeah, a wrist pad definitely helps.
 
@StackedCrooked too flat I think, mine is already quite flat
 
@Xeo Yes!
 
sbi
@Xeo Yep, I use them a lot for that.
 
12:42 PM
@xeo love this one :)
 
sbi
@Tony: I'm using a Logitech Illuminated Keyboard, because (1) I wanted a keyboard with which I can type in the dark (I don't touch-type) and (2) I liked the tactile feedback when pressing its keys. I also use a wrist pad. (Mine's not of plastic, but of leather, though. It wasn't cheap I guess, but a former boss of mine paid for it. :))
 
the Monty Python sketch I mean
 
Xeo
@Nils It's the source of the term "spam" for, well, spam. :)
 
@sbi I don't necessarily need light, but wrist support... or something ergonomic to type on
 
meh just realized I don't know how the using keyword exactly works
 
12:48 PM
@TonyTheTiger You need cortisone then?
 
assuming I write using namespace std; in a header file where exactly will the std namespace be used? In all files including this header?
 
Xeo
@Nils yes
 
sbi
@TonyTheTiger Either go for a keyboard that comes with a wrist rest or buy a dedicated wrist pad. (If you go for the latter make sure that you buy a keyboard that pretty much breaks off at the space bar.) Otherwise buy whichever feels "right" when your press the keys in the store.
 
@StackedCrooked no, thanks... I actually had cortisone already, but in my foot, not my hands
 
but if I write using namespace std in a cpp file it will be just used in this file?
 
Xeo
12:49 PM
@Nils yes
 
@TonyTheTiger Just kidding :)
 
Xeo
Okay, if you include that .cpp somewhere, then that will leak too
 
ok
 
@StackedCrooked lol
 
sbi
@Nils You might want to read this: stackoverflow.com/questions/2879555/…
 
12:50 PM
thank you @sbi, where would my C++ knowledge be w/o SO
 
I wonder if the wavy keyboards make a difference, @KonradRudolph had one?
 
Xeo
@Nils In a good book, hopefully. :)
 
like which one, books so far didn't really that much impress me at least not scott meyers effective C++
even thought this one is supposed to be a better one
 
@Tony Needs some getting used to. But the important feat is not the curvature, it’s the wrist support
having to crook your wrists is the killer
so make sure your wrists point downwards away from the body, not upwards (as is normal)
 
@KonradRudolph ok, lemme find a good wrist pad then. thx
 
12:53 PM
@Tony The nice thing about the Natural Ergonomic 4000 (mine) is that it has a wrist support and the whole keyboard is tilted backwards
 
sbi
@Nils EC++ was written with the explicit goal to write a good 2nd C++ book. I think in that it succeeded, but you can't learn the language from it.
 
so the wrists fall naturally forwards
 
I found the C++ faq lite to be effective, as well as SO
 
@KonradRudolph not sure what you mean?
 
Notice the support below the front of the keyboard
now the front is actually (very slightly) higher than the back
 
sbi
12:56 PM
@Nils IMO you cannot learn C++ without a good book. Have a look at the short list of introductory beginner's books at stackoverflow.com/questions/388242/…. If you want a condensed intro with a steep learning curve pick Accelerated C++. If you need something more thorough, pick any of the other three.
 
@KonradRudolph oh I see, that's more natural then?
 
@Tony as I said, it actually takes some getting used to, and you need to make sure that (due to the increased overall height) your forearms are not too high (angle between forearm and upper arm should be >= 90º)
but once you get used to it, it’s way more natural, yes
you only need to get used to it because you’ve been trained by bad keyboards ;)
 
@KonradRudolph hmmm ok,thx for the info :)
 
Xeo
find the error....
Response ProcessRequest(Widget foo, Whatsit bar, bool *charge_acct) {
  // Do some fancy stuff...
  if (/* Detect a subscription user */) {
    charge_acct = false;
  }
  // Lots more fancy stuff...
}
 
@sbi all I have are the two Scott Meyers books.. I know this question.. maybe I buy Andrei Alexandrescu's book.. I wonder if there are any covering the new standard including examples how to write multi threaded code
 

« first day (220 days earlier)      last day (4729 days later) »