« first day (1418 days earlier)      last day (3514 days later) » 

5:00 PM
@R.MartinhoFernandes A proper conspiracy could easily explain how they're just displaying poor results to give you a false sense of security.
 
@CatPlusPlus because the copy constructor should be noexcept
@CatPlusPlus and I could use make_shared on the std::string constructor, but this would make it look different from the const char* one, where it would obviously fail spectacularly
 
@R.MartinhoFernandes haha
 
Don't have const char* ctor then
 
oh no wait
I mistook make_shared, I can use it
 
@nightcracker It's missing not having virtual inheritance
 
5:04 PM
@LightnessRacesinOrbit but it does?
 
@nightcracker Yes, so, it's missing not having it.
 
@LightnessRacesinOrbit the entire point of this is because @R.MartinhoFernandes suggested it
 
You should derive exception virtually
 
I also don't understand why you feel the need to store a pointer to a dynamically-allocated string. But in terms of external interface it's functionally the same as std::runtime_error, yes ([C++11: 19.2.6]).
@nightcracker Why?
@CatPlusPlus Why?
 
@LightnessRacesinOrbit the shared_ptr is to make the copy constructor noexcept
 
5:06 PM
I see
 
should probably add a comment for that
 
is this all a follow-up to the "Boost doesn't like to use std::runtime_error because they think it sucks" conversation?
 
1 hour ago, by R. Martinho Fernandes
@nightcracker Not deriving virtually from std::exception means you can't do use multiple inheritance sanely (doing so breaks catch(std::exception)). The standard classes don't, so they're off-limits as bases for exceptions.
 
Oh no can't use multiple inheritance
such a shame
 
You're not making any particularly compelling case for anything.
 
5:09 PM
wasn't trying to
didn't realise that was a requirement in the Lounge?!
 
So yeah, @nightcracker, do not use virtual inheritance because it upsets @Lightness.
 
@R.MartinhoFernandes Rock <---> Me <---> Hard Place
 
@R.MartinhoFernandes But it's reason enough to use it
also pizza
with ketchup
@Jefffrey
 
Xeo
ew
 
Yeah, Cat's a culinary Hitler.
 
5:12 PM
And how!
 
I believe the proper question is "but who was 4chan"
 
@LightnessRacesinOrbit To be fair, she was asking that to a "Tech Analyst".
 
@R.MartinhoFernandes to which the tech analyst responded "he might have been a systems administrator"
 
Said "Tech Analyst" explained to her that "He may - and I'm sure we're going to be able to get some more confirmation on this as the hours and minutes go on - he may have been just a system administrator who knew his way around and how to hack things."
That "more confirmation" part is awesome.
 
5:17 PM
Butt Analyst
 
> Like, if your password was literally "password", which is the most common password, change the "s" to a dollar sign.
And then this.
"Tech Analyst".
 
Xeo
HE WAS THE SYSTEM ADMINISTRATOR
he just wants you to make easy-to-"hack" passwords
 
> Like, if your password was literally "password", which is the most common password
 
Xeo
plan unveiled
 
> Like, if your password was literally "password", which is the most common password
I don't want to live on this planet anymore
 
5:19 PM
@nightcracker Not anymore!
 
people joke about this, but it's a huge fucking deal because it's one of those moments where you realise how much bullshit they must spew about everything else
 
Now it's "pa$$word".
 
which is surely a critical problem
 
@R.MartinhoFernandes By the way, what's the deal with MI for exceptions? I never really found much use for it.
 
@LightnessRacesinOrbit SANTA IS REAL CHILDREN AND OF COURSE HE WAS A WHITE MAN
Still my favourite thing from US TV news programs
 
5:20 PM
Oh, and btw, "Do we even know who is this 4 chan?" was followed by "person or website".
I don't think she's the one to be mocked.
 
Who was website
Internet makes you stupid, and TV doubly so
 
@CatPlusPlus internet can make you smart or stupid, depending what sites you visit
this chat room for example is a prime example of becoming as stupid as possible, ASAP
 
hmmm
 
The only thing funnier than journalism is games journalism and people getting upset at it
 
Planetary Annihilation has a Teleporter building that's basically a Stargate.
it's great.
 
5:22 PM
> for example is a prime example
did I really just write that?
 
Yes
You'll forever be a butte now
 
@CatPlusPlus butteau
@CatPlusPlus forever ... now
 
@Puppy I've used it only sporadically, to be honest.
 
@nightcracker Yes
 
@nightcracker Come back to the Lounge tomorrow and find out you're wrong.
 
5:26 PM
posted on September 03, 2014 by Eric Battalio

Hello C++ World! My name is Gabriel Ha; I'm a program manager on the Visual C++ team, and from everyone who worked to bring the following improvements to you, we are super excited to share the good news and look forward to hearing back on your experience...(read more)

 
hello c++ world here's some more broken things for you
 
Now this window blocks your work for much less time!
 
> This scanning occurs under three circumstances: when you first load the solution, on its own every hour, and when you force a Rescan Solution.
Haha timer based
Of course it's timer based
 
Why the heck is it still not being done in the background.
 
5:29 PM
@R.MartinhoFernandes What happens if you press cancel?
 
Nothin
 
> This prompt blocks you from performing those operations, sometimes for more than 5 minutes!
This is my favourite part in that post.
The exclamation mark is a brilliant addition.
 
@R.MartinhoFernandes God why is this an image and why is it rendered with such a tiny fucking font
 
hmm
117 test cases fixed by changing two lines of code.
 
5:31 PM
@R.MartinhoFernandes 184s wtf?!
 
But it's an improvement!
> Thanks for sharing your comment! If your comment doesn't appear right away, please be patient as it may take a few minutes to publish or may require moderation.
Dammit.
I asked whether they didn't have a wooden table available.
 
@R.MartinhoFernandes There are so many in that post.
I commented about it.
@R.MartinhoFernandes You're an Irish girl?
 
Oh, it's in.
Nice.
 
@LightnessRacesinOrbit It's a cultural reference.
 
5:33 PM
Irish I were drunk
 
@R.MartinhoFernandes what does it mean?
@CatPlusPlus no star
 
@R.MartinhoFernandes Thanks. Wasn't aware of Irish Girl. Remember wooden table but heck that's obscure
 
I'm used to that.
Typically signaled by the blank stares around the table.
 
using namespace std; // copyright cplusplus.com
 
5:43 PM
@R.MartinhoFernandes Well, it's a reference to something, anyway. Not sure it counts as "culture".
@nightcracker You forgot: it's also their trademark.
 
@JerryCoffin guess why I installed Personal Blocklist Chrome extension
 
to block things?
 
to block cplusplus.com
 
@R.MartinhoFernandes Cell Culture and the Bacteritones
 
5:50 PM
also, why is <random> designed like fucking std::long_name_distribution<non_default_type>(0, no_constructor_type_deduction)(g)
 
because C++...
 
because they thought it would inconvenience you, personally, and that just cracked them up.
 
@nightcracker Distributions are not designed to be disposable one-offs.
That's probably the #1 mistaken assumption about <random>.
 
@R.MartinhoFernandes but 90% of the time you're using either uniform_int_distribution or uniform_real_distribution for which there is no optimization to be had by storing some "distribution object"
 
optimization is irrelevant.
 
5:54 PM
uint64_t n = 72; std::randint(0, n - 1, g);
uint64_t n = 72; std::uniform_int_distribution<uint64_t>(0, n - 1)(g);
 
3 mins ago, by R. Martinho Fernandes
@nightcracker Distributions are not designed to be disposable one-offs.
 
but you almost always use it as a one-off
 
vOv I don't.
 
since often you're generating random numbers with some varying bound, and that bound changes
 
@nightcracker en.cppreference.com/w/cpp/numeric/random/generate_canonical would be close enough, but that size_t template parameter ruins everything
 
5:57 PM
@nightcracker often [citation needed]
 
@R.MartinhoFernandes [personal experience]
 
I don't get why it's not defaulted.
Also, this ROTFL, MSVC, U R TEH FAIL TEH IT.
 
@nightcracker Yes, someone also had lots of personal experience dealing with the problem of loop advancement and actually made a proposal with it as motivation.
 
Aug 20 at 20:32, by Etienne de Martel
Fuck VS and its tendency to do heavy work on the rendering thread.
My guess is: their architecture makes it hard to reliably offload work to a background thread.
 
what architecture?
VS seems to be mostly lacking in it
 
6:02 PM
@nightcracker FWIW, that is also a supported scenario, and not with one-offs.
 
@Puppy A pile of shit is still a pile.
 
Granted, param_type is unwieldy as fuck, though.
 
arguably true
 
@R.MartinhoFernandes what? with one-off's you just pass it
 
Maybe I should make a small proposal to fix that.
11 mins ago, by R. Martinho Fernandes
@nightcracker Distributions are not designed to be disposable one-offs.
 
6:03 PM
don't waste your time
if I was Microsoft, I think I'd stop looking at VS or VC++'s source code as an asset.
and start thinking of them as liabilities
 
@R.MartinhoFernandes you claimed that one-offs do not support varying bounds, which is bullshit
 
@nightcracker No, I did not. Sorry for the wording.
 
> FWIW, that is also a supported scenario, and not with one-offs.
 
I meant that that scenario is supported without using one-offs.
 
oh
that's rather unfortunately worded then :P (or my english just sucks)
 
6:05 PM
Nah, you're right.
 
(not trying to put salt in wounds or anything like that, I'd honestly don't trust my english enough)
but this is a typical scenario of my usage: gist.github.com/nightcracker/7e7a5067ef17d09d33cb
 
Anyway, my point is that the reason <random> is not designed as you want is because its design goals were not exactly the ones you have in mind.
 
> Critical error detected c0000374
hmm wtf is that
 
It's meant to provide flexible generic building blocks.
 
hmm
is that like, "We couldn't be fucked to come up with a useful API so we give you the freedom to spend your own time implementing one"?
 
6:08 PM
Providing a my::randint(0, n - 1, g); function is trivial given std::uniform_int_distribution, but writing my::uniform_int_distribution in terms of std::randint is not as nice.
@Puppy They sacrificed a little convenience to gain much flexibility.
 
should I write template<class URNG> void random_bytes(unsigned char* buf, int buflen, URNG&& g) or template<class Iter, class URNG> void random_bytes(Iter begin, Iter end, URNG&& g)
I know the majority of my usage would prefer the first form
 
@Xeo so the question is do I make potato pay-to-win :∆
Oh lol typed a delta instead of p
 
actually, nvm, I should use the first form because it's meant as a repeated std::memcpy
 
I guess they could still add the convenient interfaces on top, but that might influence the likelihood of the proposal to be accepted.
 
What a cute little delta
 
6:11 PM
Bikeshedding and shit.
 
@nightcracker It's your internal function, nobody cares
 
@nightcracker Use the iterators.
 
You know
 
it's trivial to convert the first form to the second.
@BartekBanachewicz Yes.
 
See! You just did the same as they did with <random> :P
 
6:12 PM
Personal libraries are shit
It's the Lisp Curse
 
@R.MartinhoFernandes I think it's really a question of severity. Personally so far I haven't found <random> to be problematic, but I haven't used it that much.
 
randint is pretty much one line. Two if you want to be fancy with function local static thread locals.
"function local static thread locals" sounds nasty.
 
well fair enough then.
I'm just still scarred by std::thread.
worst Standard Library component since iostreams
and I'm not even sure if iostreams isn't superior to std::thread.
 
Ah, but there the building blocks are really, really basic.
 
incredibly basic.
 
6:15 PM
<random> already includes all the complicated logic.
 
and the user has to write unbelievably complex functionality on top.
 
It just doesn't have any glue.
 
yeah, I'm just sayin, scars.
 
Things like piecewise_linear_distribution are just awesome.
 
@R.MartinhoFernandes reminds me of 80% of the Boost libraries
 
6:17 PM
It's like the difference between buying millions of transistors to replicate an integrated circuit, or just buying the IC and soldering it.
<thread> and <atomic> have only transistors.
 
personally I think that it's close to worse than nothing.
std::async wouldn't be too bad if not for the blocking future() crap.
 
@Puppy How bad can it be? It only has about 10 functions and 2 of them are ctor, dtor. There isn't much scope for suckness?
 
@MartinJames It's concurrency. There's a tremendous amount of scope for suck.
 
@Puppy lol, I meant std::thread in particular?
 
@NSA_PR Pa$$w0rd. FTFY.
 
6:21 PM
@MartinJames You mean, "How could a utility that depends on the user to manage the number of threads manually, and manually handle exactly what every single one of them is doing, and manually handle all the synchronization, etc, possibly go wrong?".
it's like saying, "How could it go wrong? We only Standardized mmap and told everyone to go roll their own malloc."
 
@Puppy If it makes you feel any better, (and it won't), the Delphi TThread class, and its support synchro, sucks too.
 
@Puppy It's not a utility, dummy. You are supposed to write one, based on the platform abstraction that std <thread> provides
 
No std::join_guard and std::detach_guard
 
@sehe Yes, that's the whole problem.
I am supposed to write everything that counts, and is obscenely difficult, platform specific, requires years of domain experience, etc.
 
Oh yeah, the whole destructor conundrum is nice.
 
6:23 PM
the thing the Standard provides is trivial.
 
@Puppy Well, that's like saying 'I was given a car and a can of petrol. I poured the petrol over the car and set fire to it. It didn't do me any good at all'.
 
any idiot could write a std::thread-alike, it's the stuff on top that matters.
 
@R.MartinhoFernandes I assumed that nobody would ever be daft enough to call it:)
 
@MartinJames That would be equally stupid if you went back in time five hundred years and gave those items to a peasant in Essex without any instruction or assistance.
 
Why am I here instead of finishing my packing?
 
6:25 PM
dunno :P
 
@milleniumbug Fuck join().
@Puppy I must buy a bag of Wag for B. I will divert your periodic reminders to Anne for the duration of my hols:)
 
lol
Daisy's been going nuts
we're having a patio added and she is being kept inside the house during the work
she hates not being able to patrol her territory
 
@Puppy Yeah - B. hates it as well. Wants to go and play with the workmen who are carrying heavy bags etc. and trying to use power tools. He can't understand why he has to be kept in:(
 
0
Q: C: Wait for brothers process termination

Luca TavillaMy program have to create n childs. When a signal is recieved a child is created. Then the first child wait for the others n-1 childs. The second one wait for the other n-2 childs and so on until the last child run and finish immediately. I write this code, but it don't work and i get nephews. ...

I've heard of child processes, but nephews?
 
Where are my Euros? I had about €25 left over from unconference and now I can't find them:(
 
6:35 PM
That was months ago.
Oh, right. Pounds.
Viking 2 landed on Mars 38 years ago.
 
That's a long time ago.
 
just shows how little progress we've made in interplanetary space travel since then
 
My Euros are on Mars?
 
I have no idea what you're talking about.
 
to whom are you replying?
 
6:40 PM
I have no idea either.
 
error: ‘std::mersenne_twister_engine<long unsigned int, ...numbers...>&’ is not a class, struct, or union type
wtf
 
MVP.
 
@nightcracker std::mersenne_twister_engine<long unsigned int, ...numbers...>& is a reference type.
 
6:44 PM
@R.MartinhoFernandes then how am I supposed to get get ::result_type?
 
You have to std::remove_reference first.
 
why can't it do that automatically?
 
@CatPlusPlus wut
 
Why should it?
 
@Mysticial Kerning reasons
 
6:45 PM
because there is no scenario in which it would be incorrect?
 
You can't write T&::foo, so I see no reason why you should be able to write U::foo if U is T&.
 
@CatPlusPlus yeah, I noticed right after I said that
 
@R.MartinhoFernandes so whenever I write template<class T> auto f(T&& x) I should use remove_reference on T first? anything else I need to do to get typedefs?
 
Xeo
yes, also remove cv
aka
 
not sure if removing cv is necessary
 
Xeo
6:47 PM
implement bare_t, and do bare_t<T>::stuff
 
but std::decay includes everything you need, I think.
 
Xeo
right, that would work too in this case
 
@Puppy you're honestly saying that the stuff that exists is bad because you have lost patience dealing with bricks, and require prefab components? You're right to desire them (everyone does) but it's a strange reason to discredit the standard library bricks
 
@LightnessRacesinOrbit This
 
@sehe It's not that I've lost patience dealing with bricks. It's that hardly anybody can assemble those bricks into any particularly useful shapes.
even the Standard library implementers often get it wrong and they do nothing but spend all day reading the Standard memory model in detail.
 
6:50 PM
I don't see the problem. Hardly anybody needs to. AFAIK. (Okay, mebbe TBB, AMP, Microsoft Concurrency Runtime, etc. etc. is not enough)
 
implementing parallel algorithms efficiently is just not a task that should be required of every C++ developer.
@sehe Right, everybody just uses a totally different API because that API is actually useful, and the Standard one isn't.
 
@Puppy Huh. How did you leap to parallel algorithms all of a sudden.
@Puppy Granted
Still, it's like saying water is useless if it's not potable. Kinda glosses over the fact that you can't make potable water without water
 
@sehe And then there's a relatively new Intel's Cilk+ which seems to fit divide-and-conquer stuff better than the rest.
 
right, but everybody who can make potable water from water already has regular water.
giving everybody else regular non-potable water doesn't really serve any purpose.
 
@CatPlusPlus You are a "butte", as you often say.
Dirty one too.
 
6:53 PM
so what I'm really saying is, they Standardised something nobody needed and ignored the things they really did need, like Unicode, parallel algorithms/data structures, or task-based model, or actor model, or something like that.
 
@Puppy Unless they didn't have it before. Which is pretty true. It's like a kit that they can use to 3d print a water purification installation at home.
Yes, it's involved, but it's not worthless.
@Puppy I think it's more correct that they slowly moving from things that are not immediately applicable to things that are.
 
well, I kinda disagree, because we already had boost::thread and QThread and a thousand other cross-platform thread abstractions.
it's just that none of them are really useful without a whole bunch of extra work on top.
I don't really see how throwing std::thread into the mix aids things.
 
@Puppy I still think it is very valuable to "the industry" that the thing(s) that was Boost Threads has been formalized.
 
what's missing in this picture is that PPL is Windows-only and TBB is free on Linux only under GPL, I believe.
so if you're non-GPL on Linux then you either pay for TBB or you're kinda fucked.
or using Windows with Clang/GCC.
 
Precisely. So... they're slowly moving towards what matters: commodity libraries for everyone
 
6:57 PM
@Puppy It's the base from which they can build the other things you mentions. Such as the task-based or actor model.
 
What's wrong with std::async?
 
@Jefffrey Yes, except I (and every other prospective user) don't need that base at all. Only the library implementer needs that base.
 
@Puppy AFAIK, TBB's license is similar to libstdc++'s.
 
exposing it to me is useless.
 
Not-quite-GPL.
 
6:58 PM
It has runtime exception
 
@milleniumbug
 
@Puppy Here we go again
 
@Puppy Unless you want to directly use std::thread, because you want to try and write your own model.
 
So you can use it in proprietary software just fine.
 
6:59 PM
For prformanc
 
Open-source software you can just dual license as GPL and as whatever else you want.
 
~purformance~
 
@Jefffrey Which is fairly insane (and would be perfectly possible on top of boost::thread or the platform APIs)
 
@milleniumbug for one thing it's not, std::async's parallelness is implementation defined and for example libstdc++ chooses not to
 
@Puppy Not in a standardized way. boost::thread is not standard.
 

« first day (1418 days earlier)      last day (3514 days later) »