« first day (1444 days earlier)      last day (3730 days later) » 

11:00
boost has experimental support for future::then.
@nightcracker I haven't tracked proposals for a while, but what is it about?
@LightnessRacesinOrbit Ooh, Tomalak ...
From the tip of his wand burst the Vlad, he landed on the chat, bounded once across the lounge, and soared out of the Stakcoverflow chat. Telkitty watched him fly away, and as his silvery glow faded he turned back to Tomalak, and her eyes were full of tears.

"After all this time?"

"Always," said Tomalak.
also (guess I'm breaking a chat rule here, but hopefully I'll be forgiven) async stuff is specialized syntactic sugar for a particular instance of the monad pattern
@StackedCrooked Last I checked, it was just the dumb approach that spawns a new thread.
@AndyProwl gtfo m8
11:02
lol
@chmod711telkitty what
I haven't been forgiven
@R.MartinhoFernandes Extending constexpr to allow constexpr arguments to functions that can only be satisfied by constant expressions and take precendence over non-constexpr overloads if ambigious. Then two more things: constexpr destructors that will only be called on constexpr objects and marking member functions constexpr that require *this to be a constant expression.
Josuttis being emotional was over deprecating std::async
user1804599
Deprecate everything.
anyway I'm convinced it will make it to C++17, pretty much everyone agrees that a task model is necessary, MS already prototyped it in the CTP, Herb Sutter had quite a long presentation about it
Xeo
Xeo
@nightcracker Meh, constexpr is overused.
async/await stuff sounds pretty fucking neato
user1804599
Nothing as neat as green threads and a VM that does its own scheduling.
11:05
@R.MartinhoFernandes This will allow safe, allocation-less compile-time std::string's, different implementations if a particular variable is known at compile-time (think overload int log(int x, 2) that uses a highest bit set intrinsic), compile-time string validation for formatting, etc
@AndyProwl even this is illegal struct X { X()=default; int val = {}; }; X const x;, i.e. all members initialized in-class
@nightcracker Pretty sure there might be something around, but meh.
@Xeo that's because in it current state constexpr is pretty useless
@TemplateRex yep
see I told you it was meh
11:05
constructor must be user-provided
everyone else is saying it
>:(
Xeo
Xeo
@nightcracker I said over used
@Rapptz the thing they're getting stuck on IIRC is executors and the generalization to support coroutines
@Xeo where is it overused? in stl or in general?
Xeo
Xeo
By people
11:06
@AndyProwl submit a defect report to Core
Xeo
Xeo
Exhibit A: nightcracker
I can see why it's overused really
it abstracts TMP with familiar syntax
constexpr is pretty neato
but I don't like when people want to add things to it where it doesn't make sense because they forget that constexpr can be called at runtime
@AndyProwl int val = {}, how am I not providing a constructor?
@TemplateRex heh, I don't feel like - I would have to think of some rewording and I don't know if there are edge cases or other stuff (e.g. with base classes, data members, and all of this must be recursive, etc.)
> A function is user-provided if it is user-declared and not explicitly defaulted or deleted on its first declaration
const char K_SLASH = '\\';
const char K_NOT_SLASH = '/';
11:09
@TemplateRex Where is the constructor there? int can't even have one. Perhaps you're confusing "constructor" for "initializer", which would be a fairly spectacular mistake.
beautiful
@LightnessRacesinOrbit it was a snippet, I meant: struct X { X() = default; int val = {}; };
also I guess Josuttis won since std::async isn't deprecated
the in-class initalizer + user-declared =default should constitute a user-provided constructor
@TemplateRex You're not providing a constructor; you're asking C++ to provide the default one itself. That's the oddity: one might expect =default to be the same as {} in this regard, but it's not.
11:10
@TemplateRex should obviously be int val = default; :p
@TemplateRex I would tend to agree with that
you could propose it, but meh
I also agree, but the wording may be non-trivial
also not sure it would fit as a DR, rather a proposal
user3010322
@Rapptz His points are valid.
@AndyProwl something like "all members, including those in base classes have in-class intitializer"
TRWTF is that A() = default is insufficient. — Lightness Races in Orbit 23 secs ago
user3010322
11:12
We have sol and already we can't deprecate new_userdata or userdata.
user3010322
Imagine if they decided to deprecate std::async
@TemplateRex yeah something like that
"in-class initializer or user-provided constructor"
@AndyProwl let the gurus worry about it, first they have to agree about usefulness
user3010322
The resulting shitstorm would be massive.
user1804599
You can deprecate it.
user1804599
11:12
Deprecation doesn't break.
and it's useful because it increases regularity and removes a gotcha
user1804599
You can deprecate everything.
true. Still I see it as a proposal rather than a DR
yeah it's not a defect it's just retarded
11:13
@LightnessRacesinOrbit some dutch plurals of nouns ending in a vowel get a '
but as a proposal it's pretty insubstantial so good luck
I tend to type it in English too
user1804599
@TemplateRex bullshit
@TemplateRex sorry, I didn't realise your sentence was Dutch.
user1804599
Only some do.
user1804599
11:14
And there are nouns ending in consonants that get apostrophes, too.
that's horrible
Xeo
Xeo
Your language is fucked up!
All languages are
user1804599
Yeah, because German and English don't have any exceptions whatsoever.
I don’t think defaulting on first declaration is ever going to count as user-providing a constructor though.
Xeo
Xeo
@rightfold I never said German or English are not fucked up.
SNAFU etc
@LucDanton why not?
SNAFU?
And since (IIRC) there is plan to allow aggregate syntax for struct foo { int i = 4; };, that would mean that struct foo { foo() = default; int i = 4 }; would be an equivalent class definition.
Substitution Not A Failure... U?
Xeo
Xeo
11:16
Situation Normal: All Fucked Up.
user1804599
Situation Normal: All Fucked Up.
Unless that plan somehow deals with the current requirement for aggregates not to have user-provided constructors.
oh
thank you
user1804599
Substitution Normal: All Fine and Unambiguous
11:17
@TemplateRex The whole point of such declarations is to mean ‘do as the compiler would do’.
@LucDanton but it's combined with user-input: namely the in-class initializer
that feels like user-provided constructor to me
user1804599
fuck anime
@TemplateRex Point being that there is a conflict with extending aggregate syntax (unless it’s handled nicely).
@rightfold dat twitter account
11:21
sequence<int> range(int low, int high) resumable
{
    for(int i = low; i <= high; ++i)
    {
        yield i;
    }
}
so nice
also, how does it have so many followers??
I want this
for all intents and purposes, except for const objects, classes X and Y behave identically
@R.MartinhoFernandes actually, I was wrong about being able to extend std::string
@Rapptz closed [low, high] range?
11:22
chest pains :/
I got this code from somewhere else
Xeo
Xeo
@Rapptz You can already! (somewhat. Boost.Coroutine etc.)
yeah, coroutines are cool
@TemplateRex An in-class initializer would both imply ‘I’m defining/providing parts of a constructor or constructors’ and ‘I am allowing aggregate syntax (which assumes no user-provided constructor)’.
Boost.Coroutine is not that straightforward though
11:24
@Xeo yeah yeah
but language solution vs library solution
I don't quite follow how in-class initializers facilitate aggregate initialization, can you give an example?
9 mins ago, by Luc Danton
And since (IIRC) there is plan to allow aggregate syntax for struct foo { int i = 4; };, that would mean that struct foo { foo() = default; int i = 4 }; would be an equivalent class definition.
A plan, meaning it’s not in the language so far.
apparently sequence<T> returns lazy iterators lol
11:25
It would allow struct foo { int i = 4; }; foo f = {}; foo g = { 8 };.
I'm looking forward to the videos
Xeo
Xeo
> stackless
meh?
@AndyProwl playing STL in 12 fps frame rate to actually hear what he is saying :-)
Xeo
Xeo
You're just slow
I like STL's speed.
I'm slow too
11:27
0
Q: Reference operator and shared_ptr C++11 misunderstanding

user1174133I'm trying to level-up my C++ knowledge and need help in understanding some of the constructions with reference pointers and shared_ptr. I have a construction like this: IState *m_Loader; void CStateManager::AttachState(E_STATE _estate, const IState &_state) { switch(_estate) { case STATE_LOAD...

the paper doesn't list await as a non overloadable operator
@R.MartinhoFernandes nope, I wasn't wrong, just concatenation wouldn't be supported
@Xeo somewhere between Sean Parent and STL would be ideal
@LucDanton ok, so how would that interfere with say foo const f;
out of all of the C++ people
@R.MartinhoFernandes also as an example, std::log2 std::log10 would never have to exist if constexpr arguments were allowable
I find myself disagreeing the most with Herb
@nightcracker Why do you keep pinging poor robot?
11:32
@Rapptz really, which points? smart pointer parameter passing?
@Rapptz I find myself the most annoyed with Andrei's micro-optimization talks without any concrete evidence
@Rapptz ping
Oh yeah. Andrei is up there too.
@TemplateRex I’m not going to repeat myself. Read again more slowly?
but the only thing Herb and I agree on is this await/resumeable/std::future::then etc thing
I can't think of anything else I've read from him that I agree with him on
Scott seems like a cool guy.
Sean Parent and STL are cool too.
everyone else is in between
Ell
Ell
I wish we had language coroutine support
11:37
@LucDanton but aggregate don't allow user-declared constructors, so once you have that, you could disqualify a class from being an aggregate, so I don't see the problem
lol wtf
#include <future>
using namespace std;
int main() {
    future<int> f1 = async([]() { return 123; });
    future<string> f2 = f1.then([](future<int> f) {
        return f.get().to_string(); // here .get() won’t block
    });
}
@Rapptz I like his auto style. big time.
@TemplateRex what is his auto style? using auto?
I don't
@TemplateRex a) they don’t allow user-provided constructors b) there is no user-provided constructors in my example, under current and post extended aggregate syntax rules.
11:38
using auto everywhere
like auto x = widget{};
ikr
widget x;
?!?!!
wonder what's the performance penalty for using too much 'auto'
@chmod711telkitty about tree fiddy
11:39
Agreed, should really be let x = widget {};.
@LucDanton #define let auto
done
damn beat me to it
@LucDanton right
which would work for non-movable types too
Ell
Ell
let let = auto
#define auto auto
11:41
@AndyProwl So you think the logical conclusion to Herb’s argument is to have auto&& x = widget {};? ;)
#define automobile auto
automobile car = "mercedes";
Herb says not to use auto&&
@Rapptz I don’t remember that… is that new?
yeah it is
from his CppCon thing
@Rapptz but with STL for(elem : range) there is not need for auto&&
11:42
auto&& is perfect forwarding right?
@TemplateRex stupid feature
@Rapptz but STL is cool :-)
wait
STL is a person?
doesn't make his proposal any less silly :v
@nightcracker Universal reference, if you go by that.
11:43
the one thing uncool about STL are his buttoned top-buttons on his shirts
wait, I have new headphones and I can swear these ping sounds come from somewhere else
can anyone ping me?
ah
I'm not going crazy
my laptop was also open on this page with speakers :d
@LucDanton They decided to rename it 'forwarding reference'
@Rapptz I find less typing very useful
11:44
@TemplateRex ah, pretty (un)fortunate name in the C++ community
not sure which it is
@TemplateRex 6 characters
@TemplateRex then I'd suggest you'd not use C++
@Rapptz 6 unnecessary characters
'unnecessary'
@Rapptz better IMO
11:46
I don't get auto&& anymore though
@Rapptz What does it forward to?
@LucDanton yes. No :) The logical conclusion is that C++ needs better declaration syntax
@LucDanton I mean, they renamed 'universal reference' to 'forwarding reference'
@AndyProwl yes, := so that we can forget about auto again
x := 1;
been there implemented that
11:47
right
who's going to submit the proposal?
not me
Since I’m the type to use foo_type<Bar> foo(Bar&& bar); auto&& lol = foo(42); without pause, what does that make me?
fuck the Committee
@Rapptz Well, the question stands.
btw, auto return types are very nice for quick prototyping, but nasty for Doxygen, because somehow clients still expect documented return type. Does anyone know of a Clang-like tool to get the return type from auto?
11:48
@Puppy I don't think you understand how this works
Oh meaning you use the reference for forwarding I suppose.
what, you don't get to have sex with Herb Sutter?
@LucDanton yes
@Puppy unless you are in soviet russia, because in soviet russia you fuck the committee
everywhere else the committee fucks you
@TemplateRex Doxygen uses libclang
11:49
@Puppy not that attractive anymore, since he lost the porn 'stache
@LucDanton Evil.
why @_@
@LucDanton Depends on what foo does with that reference.
@LucDanton I'm just kidding.
Herb says not to use auto&& because you don't know about the cv-qualifiers therefore it's bad™
11:50
@LucDanton was that meant to be a template?
@Rapptz the new range-based for uses auto&& by default though
@Rapptz Well there are no cv-qualifiers, done deal.
What’s the point of knowing about cv-qualifiers?
Xeo
Xeo
@LucDanton cept there may be, from the initialisers!
(I’m not shooting you btw :Þ )
@Xeo Not at the top-level!
Xeo
Xeo
True enough
11:53
You forgot std::move
your arguments are lvalues
I know
doesn't matter that they are lvalue &&s
I'm just wondering why there's some form of reference collapsing going on there
@Rapptz && is not a forwarding reference so you can only bind rvalues
@Rapptz there isn't on void set(test&&) { }, that's why it fails
You need to turn that into a template to make it work: coliru.stacked-crooked.com/a/d9bfade2a81a8097
@Rapptz auto&& var = init; …rest… is kinda like doing template<typename T> wat(T&& var) { …rest … } wat(init);, if that helps.
11:55
@TemplateRex fuck doxygen
Well, I get that for auto. I meant line #11.
is it just the whole
I got a data migration task that's literally "execute this SQL in this PMA instance"
'a named r-value is an l-value thing'?
@TemplateRex replace auto with implementation defined :p
11:56
I'm data janitor now
cause that's kinda lame
it's not
if it's named, you can reference it repeatedly
@nightcracker I don't see why some things would be supported and others wouldn't.
if it moved implicitly from something you can reference repeatedly, you'd be f'ed
@Rapptz What about line 11?
11:57
@AndyProwl yeah I suppose
There's no reference collapsing on line 11. You just initialize an rvalue reference. And since it has a name, the compiler won't move from it implicitly
user1804599
Oh, we have a drone.
user1804599
How fun.
@R.MartinhoFernandes well a constexpr std::string would not be allowed to 1. allocate memory 2. change size, so the only option would be to store a pointer to the original static "string", and this fails if you try to concatenate - that's why a strict constexpr std::string would be impossible unless you disallow concatenation
Ell
Ell
11:58
Hmm. I know values can be valid after being moved out of - but isn't this like the "billion dollar mistake"?
because new isn't a constant expression?
or any form of dynamic memory allocation
@Ell what "this"?
@LucDanton nvm, I get it
and they "must" be valid, not "can"
you just don't know what their state is
@Ell Not as such. More like freed memory.
11:59
so you can't invoke functions with preconditions on their state
@R.MartinhoFernandes you could make a constexpr_string using built-in array members

« first day (1444 days earlier)      last day (3730 days later) »