« first day (572 days earlier)      last day (4394 days later) » 

5:00 PM
@DeadMG last_info is a pointer, so I need std::atomic<decltype(last_info)> but still that loop is bugging me.
 
@RMartinhoFernandes their first reasons are MSVC doesn't setup the floating point stuff before using floats properly, and that MSVC produces code not interoperable across all platforms. :D
 
@classdaknok_t compare_exchange.
 
MSVC is bad for kernels because it messes things up with for loops >.< excellent.
 
I believe that the actual reasons quoted are quite valid
 
5:03 PM
seriously, this article makes me afraid of the VC++ compiler
 
in the kernel you have to manually page in all your memory
 
@RMartinhoFernandes I need to block until last_info is nullptr.
 
@DeadMG "A good rule of thumb is that a C++ construct is probably safe if there is an obvious way to rearrange the code to make it legal C. An example is the relaxed ordering of declarations, including declaring variables in for statements."
 
@MooingDuck But the point is, unlike non-kernel mode code, the compiler matters a lot more than the language itself, because in kernel mode you're not at all interested in the abstract machine, but purely on a concrete machine.
 
so virtual functions and such are not the funsies
 
5:04 PM
@MooingDuck I think you're misinterpreting that.
 
@DeadMG that applies to C as well though
 
@MooingDuck Sure, but in C, you can call page(my_function_pointer); before calling it.
 
most of this article is "kernel programming is hard" and not "C++ is bad for kernels"
 
in C++ you can't
 
It means that since for(int i = 0; i < n; ++i) {} can be safely C89-ified to int i; for(i = 0; i < n; ++i) {}, that's a safe feature.
 
5:05 PM
@RMartinhoFernandes yes, this article is wonderfly insightful as to why VC++ should not be used for kernels.
@RMartinhoFernandes I'm not understanding your point.
@RMartinhoFernandes probably
@DeadMG wait, you can't?
 
@MooingDuck Only if you have an explicit function pointer instead of a virtual call.
 
@MooingDuck In most applications you can just not care about the compiler implements particular features of the language (i.e. you just program against the abstract machine).
 
@DeadMG ooooh
 
In a kernel it matters a lot, all the time.
 
now that that's settled
:))
 
5:09 PM
I'm sure you could write a compiler that produces code that is more suitable for kernels, but run-of-the-mill compilers are not very good for that.
 
@RMartinhoFernandes i honestly know of no such a jewl, jem, or beast
 
@DeadMG yeah, I just got to that section. Good info there
 
So, when I hear someone say "C++ is not good for kernels" I read it as "In practice, C++ is not good for kernels". (The speaker may mean otherwise, though)
 
@RMartinhoFernandes makes sense, but I've never heard anyone say that before. They all talk about exceptions, templates, and inheritance.
 
I can agree that in theory, it doesn't sound impossible.
 
5:11 PM
@RMartinhoFernandes it is not impossible, i did say it CAN be done... it's just not recommended.
 
I don't get why it's a big deal
surely for all your pagable memory, you just keep a list of those which have been paged out, and then page them in if they are on the list, then you use it.
that seems pretty simple and generic to me
 
most of the next section is about how C has pragmas to clearly control where each function/data goes in the assembly, where in C++ the pramgas fail due to templates creating functions at first use instead of where defined, and virtual function tables not being in code anywhere, and compiler generated functions...
 
It y u no rain.
 
everything after that goes back to "it's too hard for VC++ ."
@RMartinhoFernandes: Good article though, it explains why it's hard for compilers, and why they don't bother.
 
wow
2
Q: Crash in C++ code due to undefined behaviour or compiler bug?

m3tikn0bI am experiencing strange crashes. And I wonder whether it is a bug in my code, or the compiler. When I compile the following C++ code with Microsoft Visual Studio 2010 as an optimized release build, it crashes in the marked line: struct tup { int x; int y; }; class C { public: struct tup* p...

3 wrong answers... lol
 
5:29 PM
Hooray, I've never had two downvotes before. Any more? — Steve Townsend 1 min ago
Any more? no problem. — class daknok_t 13 secs ago
 
lol
 
There should be a badge for baiting so many downvoted answers. — Mysticial 3 mins ago
 
lol
 
@Mysticial hehe, lol
 
@RMartinhoFernandes But are stack objects treatable like an array of 1 object in C++03?
could be that if that wording was new in C++11, that VS is not implemented that way
 
5:37 PM
@DeadMG Dunno. And I can't take the time to grep the standard right now.
 
@DeadMG: I edited "C++11 Feb11 Draft" into the comment
 
I'm a liar.
C++11 §5.7p4
@MooingDuck Oh, you got it.
 
@MooingDuck Could be illegal in the draft that VS is implemented against, then. However, as the OP states, he still gets the same crash even with an array, which is obviously not problematic.
 
@DeadMG yeah, I'm pretty sure it was allowed in 03. I'd go with compiler bug
 
@MooingDuck ildjarn confirmed the wording is the same.
 
5:46 PM
I still hold the record for the only answer which was not downvoted.
 
We should put a countdown until D3's release as the room description.
 
3
A: Crash in C++ code due to undefined behaviour or compiler bug?

R. Martinho FernandesThe code is fine. It's a compiler bug. The code *(c++) = v2 will post-increment c.p yielding the original value. That value was assigned in the previous line and is &v1. So, in effect, it does v1 = v2;, which is perfectly fine. c.p now behaves as a one-past-the-end of a one element array th...

 
May 15: The day that the C++ room was empty.
 
I posted a correct answer, since no one dared stepping forward.
Now rep me :P
 
5:57 PM
@MooingDuck Actually, I think there'll be people in it, but they'll all be inactive because it's hard to chat while playing Diablo.
 
@EtiennedeMartel -windowed
 
-4
Q: What do a javascript have to could?

javascript is future Can anybody tell me what a good JavaScript (UI) library need to be good? I'm working at a library for UI and just useful functions, but all in the team are stuck! Can anyone please tell me what you look after, when sellects a good library. Thank you very much!

Poor english, or troll? YOU DECIDE
 
@MooingDuck I can't talk while I'm CLICKING FURIOUSLY.
 
@EtiennedeMartel May 15 is a Tuesday. I suppose at least some people will not play Diablo at work.
 
@RMartinhoFernandes Considering my coworkers engage in fierce Team Fortress 2 battles during lunch break and after work, there'll probably be a lot of Diablo 3 here starting next tuesday.
But I guess you're not all so lucky.
 
6:00 PM
@EtiennedeMartel TTS
 
@RMartinhoFernandes I won't. I might/will leave early though
 
You know, the game doesn't stop working on May 16. Just sayin'.
 
@RMartinhoFernandes of course, "early" for me is like 1a SO time or something
 
@RMartinhoFernandes I don't see what that changes.
 
6:01 PM
Hey. are we talking about C++? oh, of course not. :-P
 
Never.
@stdOrgnlDave If you scroll up a bit, you might actually find some C++ talk.
 
after Diablo 2 I'm not that big on Diablo 3, but I haven't been following it. what's the hype about?
@RMartinhoFernandes change that to "scroll up and read through a few days" and you'll get like 10 stars
 
@stdOrgnlDave It's about Diablo 3. I don't understand the question.
 
@stdOrgnlDave The hype is about the fact that Diablo 2 came out in 2000 (2001 if you count Lord of Destruction). That's 12 fucking years.
 
diablo3<3
 
6:06 PM
@stdOrgnlDave it's 3d.
 
fans wanted diablo3 a long time ago, we thought it would never happen, now its five days away.
 
@stdOrgnlDave they made Diablo 2, but without character growth, BUT IT'S PRETTY
 
very pretty
 
@stdOrgnlDave basically hype is because it's new
 
More than that. They streamlined a lot of the more annoying stuff, to the point where you no longer need to read a fucking strategy guide beforehand in order to make a character who can survive above Normal.
 
6:09 PM
like runes?
what do you mean
 
In Diablo 2, you had to be very careful where you put your skill points and stat points.
Basically, it was all about speccing.
In Diablo 3, it's all about the loot.
 
i thought the skill system sucked in 2d. people often would save all their points till lvl 90
d2.
 
D3 is much more "noob friendly". So I know that I'll be able to jump right in and enjoy it.
 
@ShaneKelsey they removed the runes, developers ran out of time
 
6:13 PM
are you serious?
 
hmphh. thanks for the info.
 
@ShaneKelsey no wait, I was thinking of something else, sorryy
 
I'm no longer a teenager with too much free time, so I welcome this shift towards casualness.
 
me too
 
6:15 PM
@EtiennedeMartel I think it moved too far toward noob friendly. Bigger stockpiles, and unlimited (but not free) respecs would have been better
 
@EtiennedeMartel OMG you're getting old.
Next thing you'll be telling us to get off your lawn.
 
The character growth in D3 is done for you, and the gameplay is too linear now.
 
@MooingDuck I agree to some extent, but there is the new Inferno that will be very challenging
 
@RMartinhoFernandes Yeah, 22, now that's old.
 
I didn't mean old as in "this body has been around for a long time", but old as in "I am responsible and shit"
 
6:18 PM
@RMartinhoFernandes Responsible, not really. Shit, yes.
 
"no longer a teenager with too much free time"
If you were not responsible you would make free time.
 
heh I have too much free time. No school till Aug
 
@RMartinhoFernandes Hmmm.
I guess I'll have to drink more.
 
be sure to drink responsibly
 
Yeah, I never drink more than I can piss.
 
6:21 PM
You never vomit?
 
I do... sometimes. Then I keep drinking.
 
@ShaneKelsey Yes, I take drinking very seriously.
 
yeah, I don't drink nearly as much as I did when I was a freshman in highschool.
 
@DeadMG How did the branching go?
 
@RMartinhoFernandes Turned out that the "fix" in fact did not fix anything, so I don't need to branch it or merge it back in later
 
6:27 PM
lol
unique_ptr is not copyable, so if you need to store a pointer from the first place you better go with std::shared_ptr, it should works fine. — Fredrik 1 min ago
Arrrrgh, when will people stop recommending shared_ptr?
shared_ptr is a niche tool.
 
Looks like the guy misunderstands how moving works.
 
@RMartinhoFernandes But but, ... it works /s
 
That said, I'm a fan of boost's pointer containers.
 
@EtiennedeMartel You are assuming that the idea of moving is even on his mind.
@RMartinhoFernandes I guess they have much better performance than std::vector<std::shared<T>>?
Ignoring the fact that std::unique_ptr works just as well for containers..
 
@StackedCrooked I think it's just the fact you don't have to constantly dereference everything.
 
6:32 PM
@DeadMG How's branching goin'?
 
@StackedCrooked No. I like them because given boost::ptr_vector<T> v; v[0] is not a pointer, but a T&.
 
@MooingDuck Of all problems that can occur when storing pointers in containers I think that's the least problematic one.
Dammit.
 
@CatPlusPlus the fix didn't fix anything :(
 
@StackedCrooked :D
 
Other than that, they're similar to Container<std::unique_ptr<T>>.
 
6:33 PM
@DeadMG What fix?
 
Speaking of move semantics, I'm going to move some food into my mouth.
 
@classdaknok_t I feel like I skipped breakfast, but I'm positive I ate :(
 
@CatPlusPlus My Direct3D9 renderer fails to render the models on my friend's system.
silent failure, of coures
 
daknok.mouth(std::move(burrito));
 
Today I realized that the most performance critical part of our code is in a std::map<Key, Dispatch> where the key is a datum of 6 bytes. How awkward.
 
6:37 PM
@DeadMG Intel GPU?
 
(added)
 
Why does this code not print a newline after each call to prn if I omit the std::move from the return of prn: ideone.com/6MhJi
shouldn't it be moved automatically?
 
@CatPlusPlus Nope.
 
@StackedCrooked test with unordered_map?
 
@MooingDuck I will.
 
6:38 PM
@DeadMG Outdated drivers, probably, then.
 
@SethCarnegie Oh, PoRNographic code.
 
@SethCarnegie first prn function has no return, probably related
 
@CatPlusPlus Nope.
 
@MooingDuck oh whoops, that's what I get for not using -Wall
 
Well, then either your code sucks or magic.
 
6:40 PM
@MooingDuck Thanks that fixed it
why did that even compile in the first place
 
it's hard to write good D3D code when it fails silently.
 
@SethCarnegie Needs more cowbell warnings.
 
@SethCarnegie good question
 
@RMartinhoFernandes prn is the name of the print function in clojure
 
@RMartinhoFernandes it should be an error
 
6:41 PM
yeah
 
@MooingDuck The standard allows it, as long as you don't use the returned value. Don't ask me why.
 
@RMartinhoFernandes it is being used
 
Yep, and that's UB.
 
it's being either moved or destructed and emitting a newline
 
@RMartinhoFernandes Thats very perlesque
 
6:42 PM
dumb compiler
@CaptainGiraffe no, perl would allow it even if you did use the returned value
 
@SethCarnegie Yes but with a very different semantic for it
 
Alt+Enter most certainly does not show hints
 
C++'s approach to buggy code is to call it "undefined behaviour" and consider its job done.
4
 
dumb IDE
screw netbeans
 
Any thoughts on why (here a global with struct S) S& operator = (S& a1, const S& a2) has to be a member?
 
6:44 PM
@SethCarnegie yeah, I hate Netbeans too :(
 
apart from the default ones?
 
@MooingDuck the 'intellisense' thinks that C++11 stuff is an error
 
@MooingDuck I like it almost as much as I like vim=)
 
@CaptainGiraffe because Bjarne wanted to keep some sanity in the language
 
@SethCarnegie isn't it just parsing headers?
 
6:45 PM
@CaptainGiraffe how could it define a language from parsing headers
 
odd question in here
 
the parser doesn't support C++11
 
@SethCarnegie NetBeans, code completion
 
Not sure where else to ask it
 
@CaptainGiraffe ^
 
6:46 PM
How can i MD5 a string in VB?
 
@HarryBeasant probably not a good question for the Lounge< C++ > room
 
Theres a CSI episode for that @HarryBeasant
 
We don't know.
 
How can I read the room name in SO chat?
 
@CaptainGiraffe That's about tracking IPs, silly.
 
6:47 PM
@HarryBeasant ask on SO proper
@CatPlusPlus you have to use md5 to track IPs, everyone knows
 
@CatPlusPlus Do you really think VB6 cares?
 
@SethCarnegie No, you just need VB GUI.
 
Xeo
@Xeo: Not in C++ terminology, though ;) — phresnel 3 hours ago
Seriously, a -1 for that?
 
@CatPlusPlus I think that C++ UBs plenty of things it probably shouldn't; but there are some things where I'm happy with UB.
 
The people who wrote Clang wrote an article on UB and why it lets you do certain optimisations, probably you guys know of it
 
6:50 PM
@Xeo I've had worse =) But yeah.
 
It's always optimisations.
Always an excuse.
 
@CatPlusPlus this is C++, that's the best excuse you can have
 
@RMartinhoFernandes You made me press ^D you ...
 
6:57 PM
I tried Harrys question on google, the results were unsurprising. Code samples and all.
 
figures
 
Anyone knows how to use verbatim (in LaTeX) in a sentence?
 
@StackedCrooked Never realized there is Hadworths constants to songs too.
 
@ManofOneWay \verb|stuff goes here|
 
7:03 PM
@ManofOneWay Didn't you just do that?
 
1
A: populating vector into map

R. Martinho FernandesChecking my favourite online reference it reads: template< class Key, class T, class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T> > > class map; Map is an associative container that contains a sorted list of uni...

 
Someday I will learn not to click every link you guys (ESPECIALLY R. MARTINHO FERNANDES) post here :/
 
Instead of providing an answer, I provided a walkthrough to reading documentation.
@MooingDuck What did I do?
 
@RMartinhoFernandes Thank you, helpful as always :)
 
@RMartinhoFernandes An awesome answer for a dot1 questioneer.
 
7:08 PM
@CaptainGiraffe The nice part is that I found a mistake on the reference page for std::less and fixed it so I could answer :)
Dinner time. Bye.
 
Suresh Venkat on TCS has implied that there is a secret central authority that decides the definitions of algorithms. I wonder how I get more information
 
@MooingDuck Sorry Mooing, what that sounds just like quack to me. What are you saying?
Is it a promo stunt for the Travelling Salesman movie?
 
I read that no matter how weird you are, you're never the weirdest guy on the Internet. But someone is. And that guy is totally fucked up.
(Reddit.)
 
nah
different people measure "weird" in different ways.
man
Sherlock Holmes 2 made me depressed
 
7:25 PM
@R. Martinho Fernandes thanks for the link to cppreference. pretty sweet site
 
@ShaneKelsey We need to get other places linking to it more.. it's google rank is a bit low
cplusplus.com comes up way at the top, I almost never find cppreference when I just do fast google searches
 
@RMartinhoFernandes Coming from Mr. TVTropes :P
 
Yeah, and cpp ref is soo much better :(
 
@ShaneKelsey So what's your preferred cp?
 
i bought the pocket reference from amazon
cp? compiler?
 
7:28 PM
cop porn
 
bloodshed
 
Bloodshed isn't a compiler, it's a company that made an IDE.
 
it has a compiler though no? the one its has
 
MingW I guess.
 
ive used gcc too
 
7:29 PM
I have used GCC too, unfortunately.
Still have nightmares from it.
 
what do you use now?
 
clang
 
In my humble opinion the compilers nowadays are so much better - by orders of magnitude - than they used to be. There wasn't even room for argument what the language was like it was all about the compiler.
 
@CaptainGiraffe doesn't everyone think that
 
2
Q: Virtual functions on classes derived form structs

MarkPI have a class that derives from a C struct. The class does not do anything special, other than initialization in the constructor, deinitialization function during the destructor, and a few other methods that call into C functions. Basically, it's a run-of-the-mill wrapper. Using GCC, it complain...

 
7:32 PM
that's not really debatable
 
What do you think about that question?
 
@KerrekSB To me it started out as an interesting one, stopped short in its tracks.
 
Too bad macro expansions can't have preprocessor directives in them
 
It happens all the time, something interesting turns out to be trivial or non-related
 
@CaptainGiraffe I don't think the answers are terribly useful...
 
7:36 PM
@KerrekSB I agree, they are missing the point. I was poking for clues in the comments.
 
@SethCarnegie That should be a [feature-request] to meta.C++
 
@Mysticial what is meta.C++?
 
@KerrekSB DeadMG enters the Arena.
 
@CaptainGiraffe Meh. Time to move on, perhaps.
 
@SethCarnegie The C++ board?
 
7:37 PM
Never heard of it
 
@KerrekSB Yep, DeadMG also failed answering.
 
@CaptainGiraffe Eh. My answer was really a non-answer. I should have just commented like Kerrek did.
 
It's too bad there's not a free open-source tool to recursively process C preprocessor directives like expanding macros as part of a build step.
 
@CaptainGiraffe I assume that WideC would have been able to compile that code.
 
@DeadMG Yes, covered in the Q's comments
 
7:39 PM
@KerrekSB It's just Wide now. And I doubt it could compile a sample where virtually all of the code is missing :P
 
@DeadMG Only (redacted joke quality too low)
 
@RMartinhoFernandes go into some open source projects and add global variables named foo and bar that are important to the code you contribute. make sure to use up the foo and bar namespaces also. make sure you use them on any new projects you start that someone else might collaborate on.
0
Q: N.O.V.A. 3 iPad 1 performance

std''OrgnlDaveI've been a bit frustrated, it seems nobody who owns an original iPad and posts on the internet has gotten N.O.V.A. 3. The multiplayer performance on the iPod 4 is supposed to be bad, so I was wondering if someone here might be able to chime in. How is the performance of N.O.V.A. 3 on the origina...

:-(
can't believe I had to resort to asking on gaming.stackexchange
 
you mean resort
 
@SethCarnegie what are you talking about?
 
nothing
 
7:41 PM
@DeadMG Pure virtual code, I guess.
 
Kerrek did you change your icon?
 
@KerrekSB I've had lots of those, never ever segfaulted!
 
I wonder what would happen to @RMartinhoFernandes if he segfaulted
 
gz
 
7:46 PM
happybirthday_animated.gif
 
@RMartinhoFernandes Congrats. Only 100 more days to go. :)
 
@RMartinhoFernandes I've been studying your kind. I will use my knowledge of compiler killing to slip in a stack smash the next time you're recompiling and take control. Then I'll force you to troll...errr...OK, don't need to take you over
 
@RMartinhoFernandes is that your second+ time of getting that badge
 
@SethCarnegie You can get it more than once?
 
@Mysticial I don't know
I was just asking because if it's his first time, I got it way before him
and I didn't think that would be the case since he has like 5 times my rep
Oh actually he doesn't
wow
 
7:50 PM
@SethCarnegie No. You can only get it once.
 
@SethCarnegie Rep doesn't have much correlation to the badge. If you've never been a repwhore, it can take a very long time.
 
I think it took me about 150 days to get 120 soft-caps.
 
Do you think it would be worthwhile to fork GCC and make error messages humorous? I get sick of seeing the same old "intializer is not a constant" or whatever crap all day. Also, any template error longer than 100 lines should be "there's no way you'll understand the error, just try something different."
 
7:53 PM
About 2 weeks of no caps at the start because I haven't learned the site yet.
Then it was pretty much rep-whore all the way... until I got sick of it.
 
@Mysticial and now you're basically the C++ SO moderator
 
@stdOrgnlDave no, it's not worthwhile
 
swooping in with the banhammer on questions that are awful
 
@stdOrgnlDave No I'm not. I suck at C++.
 
@Mysticial now I understand what you're doing here finally. you've come to the right place!
 
7:55 PM
@stdOrgnlDave I didn't know Mysticial can ban people
 
@SethCarnegie no, but we long for the days that we could...
 
@stdOrgnlDave A question earlier this evening was closed at -3 deleted at -11, thats a pretty hard hammer.
 
@CaptainGiraffe but not a *ban*hammer
sigh
 
I don't moderate much anyways.
Closing questions from higher rep users tends to invite revenge downvotes.
 
haha, revenge downvotes
 
7:57 PM
For when logic fails
 
when you have 44k why do you care about revenge downvotes? there would have to be an epic war
 
@stdOrgnlDave The person who made the question, had actually provided some moderately useful answers and recieved upvotes.
 
Yeah... I have two downvotes on my top answer. I don't know whether those are revenge downvotes, jealousy downvotes, or legit downvotes... :(
 
I had seriously hoped SO was free of that sort of crap but I guess not...perhaps a system of accountability (you know, where you can see who downvoted you) would be helpful
 
@Mysticial I could sympathize with that a downvote needs a comment or a user
 
7:58 PM
Ah the many species of the simple downvote
@stdOrgnlDave that would make revenge-downvoting even worse
 
@stdOrgnlDave It's not the rep I care about. But I'm slightly annoyed that my best answer is "marred" by two anonymous downvotes.
 
@stdOrgnlDave The internet is not free of any sort of crap - it's all crap all the time
 
=) Lets just agree that we have all been very frustrated with both commented and uncommented downvotes. It's not a biggie.
 

« first day (572 days earlier)      last day (4394 days later) »