« first day (511 days earlier)      last day (4437 days later) » 

10:17 AM
Great minds think alike. But perhaps Anders Hejlsberg has contributed more than that syntax to C++, e.g. while he was at Borland.
I only wish it was in Visual C++ 10, so I could define alias...
I have installed Visual C++ 11 beta, but it is so black and grey that I don't feel much enthusiasm for experimenting with its features.
"gray"?
 
I don't think it's a secret that the committee gets lots of proposals based on what other languages can do
MS does it regularly, proposing features from either C++/CLI or C#
@CheersandhthAlf but at least it also has bits IN ALL UPPERCASE
nothing like being shouted at by a grey IDE
 
Does anyone know the iterator invalidation rules for a std:: map ?
 
Xeo
@angryInsomniac Iterators to erased elements are invalidated. All others are not
And the same applies for pointers / references
 
@Xeo thanks :)
 
10:41 AM
@Mysticial deleted now
 
@Shog9 Oh cool! So you do keep an eye on us. ;)
 
@CheersandhthAlf Hmm... That question is... troublesome
 
I see you also suspended the user too. :)
 
@Mysticial Every now and then. ;-)
yeah
@CheersandhthAlf If there wasn't a great answer posted there, that would have been deleted ages ago, and no one would have cared. But it did, and so it's just hard to find.
@Mysticial If I destroy the account, I have a feeling he'll just come right back again. I'd rather he went away for a while, or at least emailed us. He was already question-banned, but whether this was a lame attempt to get around it or just throwing toys on the floor is hard to say.
 
Ah, ic. Wow, didn't know he was question banned too. His questions seemed okay, but of course I can't see the deleted ones (if any).
 
10:56 AM
yeah, he wasn't in terrible shape (until he started posting these answers). A few edits probably would have been all he needed.
@CheersandhthAlf Since you sorta mentioned this in another comment... That's not a particularly helpful answer, accurate though it might be. You could at least roll the other comments (@Cat's for instance) into it if you're going that way. The guy's obviously following instructions for VC++ and not realizing they don't apply.
 
11:13 AM
Just curious, how often does SO get 10+ 100-score answers in a single month?
This is the first time I've seen 13 of them since I hit 10k. Is it just an unusually strong month? Or is it just a seasonal thing?
 
Xeo
I also want a 100 score answer ;_;
 
@Xeo Try linking your template question to a few friends that know C++?
I've been trying (hard) to get my 76-point answer up to 100... I've gotten it about 10 votes since the residuals have dried up... still a long way.
 
@Shog9 You're wrong about "not particularly helpful". In fact, my extensive experience as a college lecturer/prof, and before that as a teacher at a vocational school, is that it's far better to give the person a fishing rod than a barbequed ready-to-eat fish. Also, doing the extensive barbequed-mre-fish answer is more work than the question is worth. Still, done. A service to SO, but I am sure, a disservice to the OP. ;-)
 
I'll admit that my 2 top answers were completely reddit-powered. I doubt either would have gotten to 100 without reddit.
 
Xeo
@Mysticial Isn't that the case for all high-scoring posts?
 
11:20 AM
@Xeo Not always. It's pretty obvious when something gets linked. More than 10 - 15k views = linked, or very googleable.
My 119-point answer, the silly "x = x++" question, got that high without getting linked.
It probably sat at the top of the SE hot list for a good part of the day before it finally got closed.
From what I've seen, the types of questions that make 100+ without getting linked at those with very catchy titles and are very short and easy to understand. The dumber the question, the better.
On the other hand, those coming in from reddit tend to prefer longer "articles" that are interesting.
 
@Mysticial link please
 
@FredOverflow You've seen it before. It's my 3rd highest answer.
The Java "x = x++" question.
 
Oh, a Java question.
no UB, not very interesting ;)
 
I've been observing reddit/r/programming for a while now. And I'm starting to get a sense as what kind of SO questions they like.
But I haven't seen a single SO question get posted there for several weeks now. So I'm starting they think that they might have blacklisted SO or something.
 
11:39 AM
hmm
 
Oh, something about vim arrow keys on #1 at reddit.
By the way, should I learn vi or emacs? :)
 
Here's the list of the top SO submissions to reddit all-time:
Might be interesting to have a look at the most successful SO submissions to reddit.
My top 2 answers sit at #9 and #10 on that list.
The regex question was reddited twice: #7 and #8.
 
vim arrow keys? don't i have an answer on such a question?
ah no it was on emacs
 
Cycles in family tree software: "You know what, your life has a bug, my software is just fine!" - victorstanciu
 
> I think you mean incest and not insect... Please tell me you do!
@Mysticial lol
Oh, my favorite question finally broke a 100 points :)
103
Q: Throwing the fattest people off of an overloaded airplane.

IvyMikeLet's say you've got an airplane, and it is low on fuel. Unless the plane drops 3000 pounds of passenger weight, it will not be able to reach the next airport. To save the maximum number of lives, we would like to throw the heaviest people off of the plane first. And oh yeah, there are milli...

still laughing at that one :)
 
11:54 AM
same :)
almost 6AM here, I should sleep
night
 
"Asking pairs of people to compare-exchange - you can't get faster than this." lol
perv
 
@JohannesSchaublitb What is that, speed-dating?
 
Hello.
A Dutch news site linked to a Pirate Bay torrent (Norton AV source code) in a news article. Take that, government! :P
 
12:16 PM
lol
 
I have to admit, WinGDB is pretty nice for visual studio
 
@rubenvb i don't know what is wrong. compiling llvm and clang with that gcc4.7 edition requires 5 hours on my box
building native on linux took only like 1h
 
@JohannesSchaublitb hmm, I have no clue either. I did experience a slow LLVM compile cross on Linux too. Just use the 4.6.4 for it then, I guess. I'll see if I can get an updated 4.7 out soon, see if it's any better.
(note 4.6.4 is actually just the 4.6 branch, it's a 4.6.4 prerelease, but you knew that)
 
i'm compiling on windows7
i wonder if when i once compiled clang i can use clang to build clang on windows?
 
I've tried, and know that CMake wasn't ready back then. I think it worked when I used MSYS+configure+make, but the tests wouldn't run on my setup. Maybe CMake works now too (it assumed clang==MSVC libs and stuff, which did not get along with MinGW-w64).
It seems CMake has improved. It recognizes Clang with GNU binutils stuff. Building now :)
ah wait, never mind: it tries to link to .lib files anyways. <sigh>
 
12:46 PM
oh no it's now been for 15minutes on "linking libclangclang.dll"
or liblibclang.dll or whatnot
 
How much RAM have you got? Is it a debug build?
 
finally it's finished
1GB
yes, debug build
i shouldn't have started thunderbird while linking it
 
that will take long, regardless. If you don't need debug, don't build in debug. It's probably swapping the hell out of everything.
 
heyho
 
i thought i get better backtraces
 
12:49 PM
yeah, that's true, then you'd need debug.
 
but clang.exe will probably with all its dll files need over 1GB
 
I don't know how correct Clang's debug info is on Windows though, haven't tested it to be honest.
 
my own proprietary language compiler with static llvm linked takes 130MB
in debug build
a single binary xD
@rubenvb shame on you xD
and when i build in release mode it gets down to 16MB
still all linked statically. that actually impressed me
 
that's quite nice :)
I don't know if clang is linked statically or dynamically. It seems so big vs the gcc compiler (cc1/c1plus) binaries to be dynamically linked to the clang dll.
 
one word: c++
@rubenvb this week clang added user defined literals
so it may be worth providing a fresh mingw clang binary
 
12:58 PM
yeah, the previous one just missed the fixed nested initializers too :(. I'm having trouble building a ToT LLVM/clang unfortunately on my Linux build box. I'll try again later today.
 
ToT?
 
@jalf Was about to ask that myself
 
TOtio hoTel
 
@DeadMG did you do the IQ test already?
 
1:04 PM
guess
 
Guess how much?
Or you just didn't go?
 
heh
took me a long time to get to sleep, stupid stomach, and I slept right through my alarm
 
my flatmates came down and woke me up to make me turn it off
eventually
 
1:05 PM
Better not take an iq test when you are in that kind of shape.
 
@jalf Top of Trunk or Top of Tree.
 
ah
Turtles on Trains
 
damn, regular SO is a popular as hell site
 
damn it, all repo.or.cz mirrors have gone unupdated for 12 days
FUUUUUU
 
@ScottW the big deletion drama of 2012
or, of early march 2012. I'm sure we'll get another one this year
 
1:07 PM
Anyone have a GNU binutils git mirror?
 
the important thing is
 
@DeadMG cake
 
I kicked Windows in the balls repeatedly, and now my development machine works once again
 
aha: git://sourceware.org/git/binutils.git
might explain ld failing to do its job.
 
I fixed three bugs in my renderer and none of them were the reason it didn't work
fuck you Direct3D :(
 
1:11 PM
lol
It's like exterminating the termites in your neighbour's house
 
man, I wish I'd held on to the working clang I managed to build a few weeks ago
 
huh
apparently, I managed to turn off Intellisense for VS2010
 
the latest from xcode gets confused about a super simple lambda, and spews out a stacktrace. And if I pull the latest from svn, it won't build, regardless of which compiler I try to use
 
I had not trouble building it yesterday.
 
and the one from macports gives yet another set of errors when I try to use it to build my lib
inside some boost header, even
 
1:16 PM
man
VS10 looks so lame compared to VS11
my source code's all black and shit! :(
time to crack out that customization menu and make my macros pink and my variables italicized
 
pink macro's'll tell you something is wrong when you read them for sure.
 
it's an error-check macro
one of those #define HELP_ME(expr) HelperFunction(expr, #expr, __FILE__, __LINE__) jobbies
 
Those can be very useful.
 
D3D Debug Runtime, y u no tell me what's wrong? :(
 
1:28 PM
lol
 
yay fixed it
 
@JohannesSchaublitb You went all standardese on their asses!
 
@rubenvb I didn't actually notice any asses in that report except Johannes' :P
 
1:36 PM
@StackedCrooked such xxxholes. he was so beautiful
 
It's hard to believe.
You'd expect that they'd be given a warning or some punishment. But they are simply taken away from school and killed.
 
stupid ppl don't think straight
 
@StackedCrooked I wish I could say that I was surprised.
 
@DeadMG my ass is in the barn. tss
 
@ScottW Well, they won't do it again, that's for sure.
 
1:55 PM
damn
now that my code works, I don't know wtf to do next
 
2:13 PM
release it
 
no wai, man, that's shipper talk!
lol
hmm
apparently, my GPU can't cope with rendering 30k polygons?
that can't be right
well this is odd
according to PIX, it took ten whole seconds to change the depth stencil surface?
 
2:42 PM
please discuss my usenet post which currently is in the moderation queue
 
why is the typename = void argument even needed?
 
@DeadMG it is required
 
... right
why is it required?
 
because otherwise it would be <typename T, typename enable...::type = 0> struct hash<T> { .. }
and then it would violate rules
 
ok
 
2:45 PM
because hash<T> would be identical to the primary template
but hash<U> is different because it's the second parameter
i tried to trick and say template<typename T, typename ...U, typename enable_if<is_enum<T>, U>::type ...> struct hash<T, U...> { ... }
but the result of such a partial specialization is effectively undefined behavior
because it's a case of "If every valid specialization of a variadic template requires an empty template parameter pack, the template definition is ill-formed, no diagnostic required."
 
documenting code is extremely distracting.
 
i hate that i have to document "getFile()" with "returns the file"
 
my productivity halved today, just because I spent thrice the time documenting every function than I took to write it in the first place.
 
stupid doxygen warnings
 
How many game developers are in this room ?
 
2:54 PM
@angryInsomniac me!
I think everyone has probably tried developing games more or less.
 
@IntermediateHacker True :) I am trying to learn game programming: P
 
@angryInsomniac 2D or 3D?
 
@IntermediateHacker 3D :) Actually am planning to go guildhall :D
 
my documentation. Was it even worth the time I wasted?
 
2:57 PM
@angryInsomniac nice. I've never tried 3D myself. Since its near impossible to create decent 3D games alone.
 
@IntermediateHacker Yup ... I did make this 2D game with a team a few years ago :P
 
@ScottW what's that?
 
It was a point and click engine :)
 
@angryInsomniac lol. I made this a few months ago.
there are some screenshots in the wiki section.
 
@IntermediateHacker any exe ?
 
2:59 PM
@angryInsomniac only a *.jar .
 
:2898288
@IntermediateHacker Java game ? :D
 
and it's incomplete. I made the complete tile level editor. but couldn't think up a story.
@ScottW does that make me a national hero?
<-- made a Java game and lived to tell the tale.
 
@IntermediateHacker will I ned to take a checkout of all your source ? :)
 
@angryInsomniac wait, I'll try to just post a link for the *.jar file.
 
@IntermediateHacker :) cool
 
3:05 PM
...uploading. please wait.
@angryInsomniac here
 
@IntermediateHacker Downloading a jar , hope there are no viruses :D
 
just open run_game.bat
*.jars are too slow to become efficient viruses. :D
controls for the game: 'Z' for action, Arrow keys to move. that's pretty much it.
 
Z ? what does that do ?
 
@angryInsomniac press it in front of an object, like a wall or something.
 
@IntermediateHacker Empty treasure chest ?! Thou shall burn in the fires of hell for all eternity !
 
3:09 PM
also, you can change the level. open level_1.txt with a text editor and create new tiles.
@angryInsomniac lol.
@angryInsomniac change $ T = treasure.png = A treasure chest! But it's empty. to something different.
^ in level_1.txt
 
@IntermediateHacker its cool though :)
 
yeah, but incomplete. :/
 
@IntermediateHacker Yeah , the story is the fucked up part
I too have an engine ready :D but no game to make on it :)
 
Guess programmers aren't creative. Seriously, thinking up an RPG story is kind of difficult.
 
@IntermediateHacker The art is the biggest headache !
@IntermediateHacker Getting artists to commit to a schedule or a project is hell !
 
3:15 PM
@angryInsomniac yeah. But luckily, for me, there is this site
all they need is an art-work taken from gaminggroundzero.com in the readme of your game.
 
@IntermediateHacker Cool ! I'll look into that :)
@ScottW I'm sure he/she would be glad to hear that :) (ref# pet)
 
damn, wish I had a pet artist. Is it available at local pet-shops?
 
@ScottW Probably the dude at the counter will be :D
 
I heard they are economical too. They can survive on just noodles and beer. No need for expensive pedigree food.
 
man
fuck you, Windows, I am the lord and master of every fucking file on my own fucking hard disk
 
Als
3:20 PM
Hmm
 
@Als @DeadMG And the award for most underwhelmed response goes to :D
 
@java 'everything is platform independant!' @C# 'everything is an object!' @C89 'everything is a dangling pointer!' ......damn i hate C.
 
Als
@angryInsomniac: the guy rather everyone here is always cursing about something, so whats new?
@JohannesSchaublitb Did you try that on gcc or msvc?
 
seriously, people who used C89 had a lot of patience and balls.
 
3:25 PM
@IntermediateHacker Nah, they just didn't have anything better to use, so their patience and ballsyness wasn't really factored in
 
I'm glad I live in a time where C89 is obsolete.
 
Als
@sbi: Actually, I just visited the room today after like a month. And No I don't have any objections to being removed from the room owners as per the room policy. I couldn't be here for the same reason I had last time, perhaps You remember. Actually, strange enough I didn't even get the notification of your message or I would have replied earlier.
 
@Als gcc rejects it because it says "template parameter cannot be deduced" but I don't think it is correct
 
bye all. My mom's hijacking the internet for checking her facebook notifications. :'(
 
3:33 PM
hey guys
if im making a labirinth type tower defense game, what is the best algorythm for finding the way between those built towers?
A*?
thanks mate
 
4:06 PM
is there a type_trait that can be used to determine if T is a std::unique_ptr<> type? (where T is a template parameter)?
 
@kfmfe04 what is the higher level goal
by the way, what is a "squat"? like, "don't know squat"?
 
@CheersandhthAlf I am creating a MyQueue<T> class template which has-a std::deque<> inside. If T is a std::unique_ptr<>, I think I need to call move(), etc... If there are examples of different ways of dealing with this kind of problem, I'm totally open to other ideas.
 
why not always call move ?
 
That one's easy: you don't have to do anything. It fixes things itself.
 
move() won't break anything if T is a T* or some POD type?
 
4:14 PM
not really. MyClass(T t):t(t) {} does not automatically call move
@kfmfe04 no it does not break anything
 
ah,
> Slang A small or worthless amount; diddlysquat.
so then, what's a "diddlysquat"?
 
room topic changed to Lounge<C++>: Spend some time with us, and we'll prove you don't know diddlysquat about C++. [c++] [c++11] [c++-faq]
 
@JohannesSchaublitb ty - so I should also just replace push_back() with emplace_back(), etc...?
 
i think you are confused
 
4:22 PM
Anybody familiar with qt here?
 
4:51 PM
@kfmfe04 first check if the code is too slow from an end user POV. if it is, then measure. if measurements show that unique_ptr <del>copying</del>moving is problematic, consider whether it's worth it to do some optimization.
 
Xeo
The fuck...
We got this older bug report on nested lambda captures, with "Closed as Won't Fix", and this newer one regarding the same bug with "Closed as Fixed" (in VS11 RTM, of course).
 
all is relative?
 
@CheersandhthAlf If we truly descended from Adam and Eve then everyone is a relative.
 
5:09 PM
@Dijkstra i know some bits of qt
 
Dijkstra is in here? And he's using Qt? :S
 
Dijkstra would write his UI on paper.
 
Qt considered harmful?
 
Looks like an interesting read.
 
5:27 PM
@Pubby did you try what I suggested in your threading quesiton?
 
@bamboon I haven't tried anything yet, still thinking about what to do
 
@Xeo The first one was only closed as "Won't fix in this release". Read the comments.
 
@StackedCrooked in the end we are all relatives because we all descend from the big bang
 
I have a query about boost:shared_ptr , suppose I declare a shared_prt in a local context , then I populate it with a value from another part of the program (i.e. it has other references open) then , when the local pointer goes out of scope , is the data unavailable at all places (i.e. are all references invalidated) ?
 
@JohannesSchaublitb we are side-effects :)
 
5:34 PM
perhaps we are the result of undefined behavior?
gods virtual machine had a segfault?
 
Does that mean we are malicious?
 
i don't know!
 
If we are undefined behavior ourselves, then how can we ever write well-defined code?
 
the undefined behavior created non-undefined behavior things
 
@angryInsomniac No, of course not.
the entire point of shared_ptr is that all shared_ptr<T> are always either empty, or valid
unless you start doing funky bad things with release() and such
 
5:46 PM
Does shared_ptr have release?
 
@DeadMG Really ? wierd ! my program is behaving in a way that supports that hypothesis (not using release) , let me dig a little more !
 
I think the only bad thing you can do is delete ptr.get();
 
@angryInsomniac Wait- when you said "references" you meant "other shared_ptr<T>'s", right?
 
@DeadMG Yup
 
awesome
well, if you didn't start abusing release() or get() then you should be fine
 
5:47 PM
Actually , this is where the freakyness starts :
boost::shared_ptr<Resource> tempResource = (resourcesMap.count(tempResourceName) >= 1)? boost::shared_ptr<Resource>(resourcesMap.find(tempResourceName)->second)
: boost::shared_ptr<Resource>(new Resource(tempResourceName));
is leaking memory
(should have pastebin'ed that )
 
Xeo
@StackedCrooked No
 
Thought so.
 
@angryInsomniac What's the type of ->second?
 
@DeadMG boost::shared_ptr<Resource>
 
cause I got a funny feeling that it's gonna be Resource*
huh, maybe not
 
5:50 PM
@DeadMG nope .. gave up on naked pointers
 
well, you're creating a new object, so of course that individual statement leaks memory
you told it to
look, you need to show a SSCCE or I can't helpy ou
 
@DeadMG but thats how shared_ptr are supposed to be declared right ? (from the shared_ptr documentation) : shared_ptr<int> p(new int(2));
@DeadMG Hmm , ok , I'll try that
 
Xeo
MAAAAAH I hate my router. Fuck.
 
@angryInsomniac Yes, and the memory will be cleaned up. But not in that specific statement.
"leak detection" is worthless, really
 
@Xeo routers suck.
And NAT is an evil invention.
 
5:53 PM
@daknok_t NAT is a totally necessary invention
 
@DeadMG Umm , ok , can you tell me why not (or a google search term , or link to read up) in this particular statement ? because I cant seem to see the difference between the correct usage and mine
 
@angryInsomniac Uh, no.
 
Xeo
It's just that this stupid thing simply refuses to continue loading a webpage after some initial content...
 
Is there an antonym for the word "pointer"? For example if I have A a; and someone asks me: "Is a a pointer?"? And I want to respond with: "No, it's a _.". What is the word I should use?
 
@DeadMG Hmm , ok
 
5:53 PM
shared_ptr<T> cleans up when the last shared_ptr<T> pointing to a specific object is destroyed
 
Xeo
@StackedCrooked Object?
 
@StackedCrooked Value?
 
Aren't pointers objects too, Xeo?
 
Xeo
I've been trying to open the Boost.SharedPtr reference page for about 5 minutes now...
 
@Xeo I've heard someone use that word.
Techinically a pointer variables is also an object.
 
Xeo
5:55 PM
@daknok_t Yeah, technically
I've been trying to open the Boost.SharedPtr reference page for about 5 minutes now...
Every time I refresh, it continues loading a bit of the page... -.-
 
Try lynx.
Maybe it's stuck at the stylesheets or something.
 
@DeadMG Dunno. Do you think this question is appropriate for SO?
 
@StackedCrooked Meh. The worst that can happen is it gets closed
 
Xeo
@StackedCrooked: www.boost.org/doc/libs/1_49_0/libs/smart_ptr/shared_ptr.htm#FAQ
Q. Why doesn't shared_ptr provide a release() function?

A. shared_ptr cannot give away ownership unless it's unique() because the other copy will still destroy the object.

Consider:

    shared_ptr<int> a(new int);
    shared_ptr<int> b(a); // a.use_count() == b.use_count() == 2

    int * p = a.release();

    // Who owns p now? b will still call delete on it in its destructor.

Furthermore, the pointer returned by release() would be difficult to deallocate reliably, as the source shared_ptr could have been created with a custom deleter.
 
@Xeo That's interesting, thanks. (Actually I only asked it rhetorically because @DeadMG mentioned release in the context of shared_ptr.)
 
Xeo
5:59 PM
Anyways, dinner.
 

« first day (511 days earlier)      last day (4437 days later) »