« first day (1967 days earlier)      last day (3206 days later) » 

21:00
@melak47 here and here
@Morwenn gasp
No, seriously, it sounds like Javascript, because JS promises are really fucking nice to work with.
(Minus the fact you are still working with JS which is terrible to work with.)
But seriously, with good arguments people can be convinced. And the fact that the additions to std::future didn't make it in C++17 means that you actually have some time to do shit about it.
Sure, that's an argument for doing that.
The argument against is that I already have my own implementation that does all I want it to do :P
(And is semantically incompatible with what the standard already has.)
I wish there were more SA for variant than there were :/
It won't be possible to unfuck that :/
You're a fucking egoist :p
Yes, I am.
I am doing most of what I'm doing because I'm enjoying it!
Lol, me too.
21:04
And I hate committees so much.
They lead to solutions that please everyone (read: no-one).
user406009
@Griwes Like the std::variant snafu?
It's always a battle of arguments and example. That's fun.
@Morwenn It's a battle of ignorance :/
Ignorance tends to win with arguments.
No, seriously.
There was a discussion between Gabe and Chandler at last C++Now that proves that point pretty well - Gabe kept saying that ABI mismatches between multiple loaded DLLs is not a fuckup, and supporting the mismatch is a feature :/
21:08
what
@Lalaland Yes.
@Lalaland wait, why is std::variant fucked now? :(
user406009
@Griwes Wait, but isn't ABI mismatch almost impossible to avoid?
user406009
@melak47 Nah, it's fine. But there was a lot of endless discussion about it.
21:09
@melak47 Empty state in certain error handling situations.
@Griwes I'm guessing Chandler was right (he always is ;))
@Borgleader is that a frog?
@Lalaland Okay, I might be not entirely clear there - the exact case discussed (the original context was function local statics and the inline variables proposal) was "a DLL allocates memory and returns a pointer, which is passed to another DLL; that DLL tries to free the pointer and everything explodes".
or is it an alien?
Gabriel was saying that this is expected.
(While Chandler and pretty much everyone else around kept saying it isn't and that it's a sign of a gigantic fuckup.)
A moment later Gabriel called programmers using function local statics (who Chandler said were his clients, i.e. Clang's users) idiots, which prompted Chandler to leave the discussion.
21:13
@StackedCrooked yes
@Griwes :/
@Griwes Gabriel Dos Reis?
I use function local statics when I deem them necessary
So yeah, arguments don't always win on the committee level. I'm not saying that kind of discussion surely happens at the committee meetings (I'd expect it to not happen rather than to happen), but ultimately there's a point at which it does in fact happen, which is why I don't really want to get dragged into this crap.
@Borgleader Yes.
@Griwes Whats wrong with function local statics?
21:14
Although I prefer my function local statics to be thread-local
@Borgleader I have no idea. It's probably that their users are idiots.
TIL I'm an idiot
user406009
@Griwes Isn't allocating memory in in one DLL and freeing in another usually a pretty bad idea anyways?
Oh, I'm sure I mentioned it before, but apparently a compliant preprocessor is more important for the MSVC compiler team than... expression SFINAE. (At least a year ago it was so.)
@Lalaland Only because we let those mismatches to happen!
Doesn't Meyers' singleton use function local statics?
21:16
It does
If everyone was doing a sensible thing, it wouldn't be a problem.
@melak47 it does (i just checked)
@Griwes they introduced partial support in some update, so they're clearly working on it ATM
Yes; function local statics is the only sensible way to implement "singletons".
inb4 puppy coming in and saying "they're terrible because singletons are terrible"
21:17
Of course if the type of that singleton only allows a single instance, then it's terrible.
@Griwes nice discussion
user406009
@Griwes Well, you would still have problems if the different DLLs are using slightly different versions of the C++ runtime.
@Lalaland Which is what should make them fail at load time!
At least a year ago it was so.
isn't this what personality functions are for
@Borgleader I'm an idiot too. Comes from upbringing.
21:19
I'm an idiot too, btw :P
Function local statics is how I often implement... global objects :P
Could you overload operator delete to call back into the DLL for deallocation? :v
lol
@Griwes Well function local statics fulfil the normal requirements of a singleton quite automagically.
@CaptainGiraffe No - for singleton, no other instance would be allowed to exist.
which is silly
21:21
This way just creates an instance you can be sure exists when you need it.
@milleniumbug yes; extremely.
user406009
@Griwes For that, you can just make the constructor private.
@Griwes How is this not the case for the function static ? Sry. I'm an idiot.
int& asdf() { static int a = 5; return a; }
not a singleton, because you can create other ints
class T {}; T & default_instance() { static T t; return t; } int main() { T t; }
Yes; it has the operational semantics of singletons where they make sense.
@milleniumbug So const it and we are ok?
21:23
No; it doesn't have all of them, because some of them make no sense whatsoever.
@CaptainGiraffe wat
Are you arguing that the ability to make a copy of it is defying the singelton pattern? I'm missing something...
In OOP, a singleton is a class that can have AT MOST one instance.
Hence, int isn't a singleton, because you can have two integers easily.
Same with my above T.
@Griwes it has to self limit though
I don't see how milleniumbugs function is violating that.
@CaptainGiraffe He used int.
You can create as many ints as you want.
21:26
Oh, sry.
Can we get a moderator to shift-delete these last messages? My upbringing was sub-par.
FWIW, the other singleton, i.e. a type with a single possible value, i.e. unit/empty tuple/regular void, is much more interesting and worth discussing than a terribly limited and overused design antipattern. :P
yup, even the gang of four disregards singleton, this should discourage the cargo culters
isnt cout a singleton?
It's an std::ostream.
You can create as many std::ostreams as you want.
so its just a global variable of type ostream?
21:29
cout is a global
In fact, std::cerr is an another std::ostream!
The standard streams have this absurdly complicated init system.
i thought it might have been special in some way because of what it points to
Why weren't they just made function local statics? :/
It makes sense because it's tied to fd 1 which is a global too
That'd solve all problems (and automatically solve some additional ones with C++11!).
user406009
21:31
Isn't the actual stdout file descriptor a singleton?
because they protect special people who write to std::cout in their global variables' destructors
@Lalaland No?
@milleniumbug ...I think this would also work, because it'd just be re-inited?
user406009
I mean, like sorta in the sense that you only have one stdout.
user406009
You can't really make any more.
user406009
I guess you can always make more files/pipes/whatever.
user406009
21:32
And redirect them/rename them.
stdout is just a file descriptor.
std::cout and friends are a bit special by default though: they are guaranteed to be unbuffered as long as you don't redirect them.
With a special value, but still just an fd.
@Lalaland you do only have one stdout, it's stdout, but the type of thing it is, you can have many of
You can have as many of file descriptors as you wish (or rather, as many as the OS lets you have).
21:33
@Griwes I don't think this is what happens, but then again, I haven't tested this exact scenario
I'll make a test case
@milleniumbug Yeah; it's an interesting case to language lawyer on.
@thecoshman Isn't the type of cout, besides being derived from ostream, implementation defined?
(I wonder how much that expression hurts native speakers.)
@CaptainGiraffe No.
@CaptainGiraffe Their buffers are of implementation-defined types.
The stream objects themselves are defined to be std::ostream.
@CaptainGiraffe besides the point
« Change is_transparent to a metafunction » was rejected.
user406009
21:35
@Griwes So the buffer itself for stdout could theoretically be a singleton.
@Lalaland Doubt that.
@Griwes Thanks. My memory served up incorrect datums.
Want to put {weak,partial,total}_order(builtin types) into the library?
SF F N A SA
2 6 5 0 0

Investigate making a functor thing to pass these to algorithms easily.

Add a "Tony table", showing code before and after using the new feature.
Excellent news /o/
I doubt anyone would impose a special restriction checking whether there's just one of those in existence for internal implementation types.
user406009
Anyways, I think the more important consideration is global vs non-global variables rather than focusing too much on singletons.
user406009
21:36
Most of the negatives of singletons are primarily because they are global.
user406009
Not the actual "you may only have one" requirement.
Also I doubt anyone would make three separate types for cout, cerr and clog streams.
@Lalaland I deeply disagree with that sentiment. :P
The artificial limitation hurts everything around much more than their globalness.
user406009
What is it with SO questions going downhill so much recently?
user406009
I don't think they were this bad a couple years ago.
Most of the good ones have been asked.
21:44
^ this
the "golden age" of SO has passed.
if you want good questions you prob need to pick a new language or an obscure/on the rise library
Which means that most of the good ones are still there. Content-wise SO just keeps getting better.
or ask in :P
Or and GCC vs. Clang.
Ow, I'm late :/
Yeah.
:P
I do love a good question
user406009
21:46
@Griwes Wasn't there a meta discussion about getting rid of that tag?
Dunno.
those jerks
@jaggedSpire Depends if it has a purpose or just for the sake of it.
that tag is my precious
Should we on that issue?
21:46
Honesty, I mostly don't care about questions except when I need an answer.
eh, I like them when they're well researched
as in, not Meet's
I like them when there's some litb involvement in any way possible.
(Which includes saying "this is a compiler bug" and linking to a litb-reported thing. :D)
user406009
@Borgleader I guess we should start asking all our C++17 questions now for all that sweet, sweet rep.
Facebook still being a nazi when it comes to sex and nudity.
user406009
How do I do X in C++17?
21:48
Haha, there isn't much to ask.
@Morwenn solution: don't facebook
@jaggedSpire I like to Facebook. I've been there since 2007.
SOW I need to make sure no one has messaged me there in the last month or so
user406009
@Morwenn There's got to be a std::variant edge case question eventually.
@Lalaland If you have some good ones I'm all ears.
user406009
21:49
@Borgleader Nah, I still have to read over all the new stuff making it in.
That sucks.
Solution: call it in the ctor if you want to call it in dtor!
C++17 is an excellent bugfix release.
@Morwenn poor you
21:52
I'm doing fine, thanks.
In my programs I take the simpler approach of no global variables (at least not using the function local static trick)
But when I write a library I can't assume the users won't create globals in general
@Morwenn meaning?
static initialization fiasco makes me sad
user406009
@milleniumbug I wonder if it is possible for the compiler to have a diagnostic for that.
@Morwenn it's american vOv
21:54
@Borgleader Banning accounts that talk about masturbation, banning The Origin of the World every time it sees it, banning pictures of statues with bare nipples, etc...
@thecoshman Too bad it comes with the American downsides.
« Let's protect our children! »
@Morwenn Oh, yeah idk, maybe shit just gets flagged or smt?
Lo, if your children are old enough to browse Facebook by themselves, chances are that they already watched porn too ._____.
@Borgleader Yep.
@Lalaland I assume you can't unless proven otherwise :D
Oh, also their policy about real names may be one of its worse features to date.
@Morwenn ... that's my point
@Morwenn woah, didn't realise it was that stupid
21:56
It is.
@Morwenn what is that policy?
user406009
@milleniumbug The compiler should have a graph of when everything is initialized and deinitialized.
@thecoshman You can get banned if people flag you for not using your real name and you can't prove them it's your real name.
user406009
The more interesting question is if the diagnostic can be done without too much of a compilation speed penalty.
Which is a hell for transgender people, people who don't like their name, drag performers, people mostly known by their pseudonym, or whoever wants to be slightly anonymous.
21:57
@Morwenn wow, amazing
Yeah, right.
Xeo
Xeo
@Morwenn But anonymity doesn't provide money
Basically it depends on your friends flagging you.
I don't use my real name on Facebook
this sounds like it's a real winner of a combination with their policy on gender choice for the profile
user406009
21:58
I think you guys are a little bit unfair to acknowledge the counterargument.
Xeo
Xeo
@milleniumbug I don't use Facebook. Problem solved :D
user406009
The counter is that the real name policy helps prevent bullying.
@Morwenn I sort of get not letting people use random nonsense... maybe... but like, what's wrong with people going a nickname or some other common alias. What about actors who tend to have a stage name?
@jaggedSpire Yep. They are trying to mitigate that somehow.
user406009
Which is a serious problem on Facebook.
21:59
@Lalaland what? how?
maybe they shouldn't allow bullying
See also Phuc Dat Bich for shit and giggles.
@Xeo I'd very much like to, but they hold me hostage really

« first day (1967 days earlier)      last day (3206 days later) »