« first day (503 days earlier)      last day (4431 days later) » 

10:00 PM
@sehe Well, I'm getting in bed.
 
@FredOverflow and 6. I like Saw 6.
 
I stopped after 3 I think.
 
@StuartBlackler You use of smiley tells us to stay quiet
 
Can't wait till TR2!
 
What will it contain? File system?
 
10:05 PM
Asio, Signals/Slots, Filesystem, Any, lexical_cast, new string algorithms among others.
 
By the way it appears fresh papers have been published today by WG21.
Who said I was going to bed!
 
you did :)
 
Well I am. Eventually.
 
I won't. I'll certainly die tonight browsing through WG21 papers :)
 
Mmmh, is it appropriate to pin that link?
There aren't that many papers and I don't think everyone follows WG21 closely.
 
10:10 PM
Wow, "active issues" and "defect report" are looong lists.
 
Does a private constructor imply a private copy constructor and a private operator=?
Or do I need to make those private explicitly?
 
@daknøk no
@daknøk yes
 
It's good that C++11 has = default then. :)
 
I hope not. They are useless and dangerous.
 
10:15 PM
@daknøk If you want them to be "private", why not = delete them?
 
@FredOverflow they will be called by a friend class.
Or maybe not. Exceptions aren't required to have operator= and a copy constructor, right?
 
@daknøk Right, because they are usually caught by reference, anyway.
> There is well-established existing practice with gcc, Clang, and Intel C++ all implementing a similar, if not identical feature.
@daknøk People seem to want them.
 
@FredOverflow That's strange when you have std::vector.
 
Sure, but then again, most C++ users are strange themselves, aren't they? :)
 
Maybe for embedded systems where std::vector isn't available and heap allocation is very expensive.
 
10:18 PM
for example
 
@daknøk throw is like return and required the type to be copyable with C++03. I'm assuming that just like return it's now possible to throw move-only types but the exceptions types aren't going to suddenly change their requirement. So stick with copyable exceptions.
 
Oh wait, exceptions are copied to a special storage location, aren't they?
 
That too, yes.
 
@FredOverflow I get a compile error when I = delete the copy constructor.
bad_lock_file(const bad_lock_file&) = delete;
// ...
throw bad_lock_file(); // Call to deleted constructor of 'daknok::bad_lock_file'
I'll just = default them.
 
@daknøk But not if it's simply private??
 
10:21 PM
Nope.
 
That doesn't make any sense, does it?
 
They are probably copied somewhere. Wait I'll look it up in the holy Standard.
 
What compiler, what version?
 
@LucDanton clang 3.1
 
@daknøk But how can they be copied if the copy constructor is private?
 
10:22 PM
@FredOverflow I don't know. :P
 
The move constructor is defaulted and public.
If you delete the copy constructor then the move constructor gets deleted as well.
 
And it's too loud to actually go to sleep. Figures.
 
> Each standard library class T that derives from class exception shall have a publicly accessible copy constructor and a publicly accessible copy assignment operator that do not exit with an exception.
 
4
Q: catching exception objects by reference, temporaries, lifetime issues

FredConsider the following code: #include <iostream> #include <stdexcept> void foo() { throw std::runtime_error("How long do I live?"); } int main() { try { foo(); } catch (std::runtime_error& e) { std::cout << e.what() << std::en...

 
But that's standard library exceptions.
 
10:23 PM
It's common sense. You throw by value.
If copy ctor would throw, it'd end up in std::terminate.
 
@CatPlusPlus You cannot not throw by value, right?
 
Well, yeah, but you could throw pointer to an exception object by value.
E.g. throw new foo();
 
Who would be responsible for deleting the foo?
 
There's no polymorphism that way though.
 
> Data structures that allocate from the heap access, by design, a global resource that is often highly contended in a multi-threaded program. Therefore, avoiding heap allocations is usually advantageous for performance. Allocating such data from the stack is much more efficient, because the stack is local to each thread and bytes on the stack are often cached locally.
@daknøk this makes sense
 
10:25 PM
Well, you don't do that, hence why I said "you throw by value".
Which means copy ctor is used.
 
@LucDanton You can throw by value and catch by reference, then you get polymorphism.
 
@FredOverflow Well yeah.
 
@CatPlusPlus And therefore the copy ctor cannot be deleted?
 
Or throw.
 
I said "there's no polymorphism that way" because the regular way has polymorphism, yes.
 
10:27 PM
@CatPlusPlus or move constructor, right?
 
Dunno, really.
Maybe.
It's probably optimised, but still.
 
Dang, I know so little about the technical details of exceptions. It's embarassing!
 
It's part of the ABI, and the ABI pretty much doesn't exist. :P
 
brb
 
int a[2] = {1, 2, 3};   // Is this really undefined behavior in C++? Wow.
> What happens when the runtime size of an array is smaller than the number of elements in its initializer list? The current wording (see below) specifies "undefined behavior"
 
10:32 PM
> An initializer-list is ill-formed if the number of initializer-clauses exceeds the number of members or elements to initialize.
Dunno if 'ill-formed' implies a diagnostic is required (which would make it not UB, I think).
I would lean that way however.
 
Okay, so the proposal is wrong.
 
1.3.9
ill-formed program
program that is not well formed
 
I think it doesn't. Doing namespace std { struct foo {}; } is ill-formed, too, AFAIR, but no compiler complains.
 
Thank you, International Standard for the C++ language.
 
rotten potato.
potato that is rotten.
 
10:34 PM
Potato potato banana.
 
Reminds me of an evil website named rotten dot com (don't look it up)
 
> [ Note: Undefined behavior may be expected when this International Standard omits any explicit definition of behavior or when a program uses an erroneous construct or erroneous data.
I could see this kind of 'ill-formed' falling under the 'erroneous construct' situation, yes.
 
@FredOverflow Anyone wanna star that? :)
 
> Many erroneous program constructs do not engender undefined behavior; they are required to be diagnosed. — end note ]
 
10:35 PM
You said "this".
 
This is really silly.
 
*this is really silly
 
Is this always the same as &*this?
 
No.
 
Of course, it should have been self. But that's neither here nor here.
 
10:36 PM
@daknøk When is it not?
 
@FredOverflow if *this doesn't overload operator& which returns this, where the latter this == the former this (not sure if that's required by the standard).
 
#define self (*this)
 
The set of diagnosable rules consists of all syntactic and semantic rules in this International Standard except
for those rules containing an explicit notation that “no diagnostic is required” or which are described as resulting in “undefined behavior.”
 
@daknøk Oh, of course. Stupid ability to overload operator& :)
 
I think it's diagnosable then.
 
10:38 PM
@CatPlusPlus This is actually rather nice :)
#define var auto   // Let's lure C# programmers :)
 
Of course, in Hell++ everything ends up with a diagnostic. And/or nasal demons.
 
Let me just say as a C# programmer coming from C++ that I hate var
 
Really? Why?
 
I prefer strong-types
 
var is strongly typed. It's just that the type isn't explicitly mentioned in the source code.
 
10:39 PM
^^^^ that
 
Bleh, it's inferred
 
Type inference is the only sane way to do static typing.
5
 
The Rails advertising team got it wrong too…
 
At least partial inference.
 
Function templates to type inference, and nobody has ever complained about that.
 
10:41 PM
People complain about templates all the time.
 
Anyone knows how the ModR/M and SIB bytes in x64 mode (using REX) works?
 
Variadic variadic variadic template template templates. Only then you may complain.
 
.........
auto i = 42, p = "hello";   // This works in neither C++ nor C#, right?
error: inconsistent deduction for 'auto': 'int' and then 'const char*'
Dunno about C# though (with var instead of auto, of course).
 
error CS0819: An implicitly typed local variable declaration cannot include multiple declarators
Meh, annoying people came back.
Good thing I quit trying to go to sleep.
 
I want to drive a Volkswagen Kombi, but it seems they aren't in production anymore.
 
10:47 PM
ebay
 
Oh, DoomRL got graphical tiles.
 
@ScottW have you got two monitors?
If not, you probably did look away to post it here.
@ScottW no you could've just pressed Alt+Tab, entered the stuff and hit return. :P
I see.
Does anyone here use a non-monospace font for text while programming?
I like Georgia italic for keywords.
 
@daknøk never tried
 
11:04 PM
@daknøk It's a hilarious video, though
where the Microsoft guy is like "I'm gonna sue the pants off you!"
 
True
 
11:16 PM
 
There is also a version with Tux drinking that.
 
0
A: "redefinition; different type modifier" in VS2010

FredOverflowThe error message is trying to tell you that _pctype was already defined somewhere else. It appears that _pctype is an identifier used by Visual Studio since at least version 2005. _pctype, _pwctype, _wctype, _mbctype, _mbcasemap These global variables contain information used by the ch...

poor guy
I first wrote "fucked" and then remembered that I'm not in the Lounge :)
 
(:
Firewallz
You could always try "you're Java'd".
I LOVE JAVA
not
 
11:32 PM
@daknøk The island or the coffee?
 
The programming language.
 
@daknøk What's there to love?
 
The syntax, the garbage collection, the filename restrictions, everything is just so horrib^W awesome!
No seriously I hate java.
I once made a video game in Java and I'm never going to do that again.
Game Maker ftw :P
 
I once did a Tetris clone in Java, and it wasn't that bad except for all the Design Patterns I put in there :)
 
sbi
@Shog, you're a humorless, trigger-happy, dusty, bird-brainy, self-censoring meta-cop. — Oh, wait. Oops. I take that back. Actually, you're my hero. Thank you for saving this brilliant question! Sheepish grin.
 
11:37 PM
I dislike how in Java an enum is actually a class and the values aren't just ints.
 
Why?
 
sbi
11
Q: Change the way really old questions are deleted

JaredParAfter the recent reputation recalc I noticed my reputation had dropped about 1K and the vast majority of that came from the deletion of really old questions. And by really old I mean questions that had survived for over 2 years. I hate to use the word unfair but I'm struggling to find a bette...

 
Strongly typed enums are good.
 
@daknøk References aren't less efficient in Java than ints, are they?
 
I cannot quite remember why. I wanted to use an enum in some way that worked in C++ but not in Java.
 
11:40 PM
@daknøk You can get an int from an enum in Java, and you can also get an enum from an int.
 
I guess it was that in C++ you can end an enum with count } and then count would be the number of values.
I needed that to randomly pick a value from the enum.
 
YourEnum.values().length or something is the size.
 
For power ups in my game.
Ah cool. Didn't know that.
 
YourEnum.values[somePRNG.nextInt(YourEnum.values().length)]
 
@sbi This is pretty awesome... in a way:
I'm just happy I'm not struck - yet. I have postponed my active SO rep hunting but sure 'd like to rep cap a few more times to get the Legendary badge, just for kicks. If Like Jared, you could be 'shot down' any day - that will take a bit longer.
 
11:46 PM
 
@CatPlusPlus Yeah, but that's just amusing/bizarre. Not a real problem. If like Jared you were looking to rep-cap, but you are stuck at -24 for the day...
 
sbi
> The only people who believe rep mean anything different today than it did yesterday are those who spend too much time on meta. To everyone else it means the same today as yesterday. — JaredPar
 
I just noticed it. It's funny.
 
I haven't really been affected at all
lost 20 rep and that's it
 
I lost some, but dunno how much. Don't really care.
 
sbi
11:51 PM
> I'm not looking forward to the day when What's the difference between JavaScript and Java? is deemed unworthy. I'm not proud of that answer, but I seem to get a vote for it pretty much every day. Having over -5k on my daily rep graph would make the positive contributions disappear in the noise. — Greg Hewgill
@DeadMG I lost nothing, because I regularly triggered the rep recalc anyway. But I still think those guys do have a point.
 
@sehe Which makes me wonder though. There has been one day where I repcapped, but a -50 deletion put it under 200. Is that going to delay my Legendary badge by a day?
 
@sbi Heh, yes. My personal loss is really quite independent of whether or not it's a good thing.
 
sbi
@sehe Yeah, and I think Greg's answer is pretty good. "I don't give a unicorn's ass about my current rep"
 
I lost 77. I never recalced once. I think only about 3 of my answers were ever deleted. (not by me)
 
^^ that. Is rather nice
 
sbi
11:54 PM
@sehe This has been done for a long time. The only thing new about it is that you now see it.
 
@sbi I know that. It is the 'see it' part that I think is rather nice :)
 
sbi
Every time I post on meta I get a refresher course in why people suddenly quit #stackoverflow in frustration.
2
 
@sbi jaredpar is not properly conditioned for the new generation
 
sbi
@CaptainGiraffe It isn't the new generation that makes meta such a madhouse. It's the old farts.
 

« first day (503 days earlier)      last day (4431 days later) »