« first day (1802 days earlier)      last day (3142 days later) » 

7:00 AM
@AnastasiyaAsadullayeva not sure what you're trying to say/ask there...
And with that, off to the office. Laters
 
Toodles!
 
@je4d Have fun at CppCon!
 
@sehe cya
I think I'd struggle not to..
 
@ThePhD It's been discussed on std-proposals. There are downsides; it's easier said than done.
 
@Potatoswatter Link me or fill me in?
Is there a short version of why qualified UDLs would be bad?
 
7:03 AM
@ThePhD I don't recall exactly what came up before, and I'm probably no better at finding the thread than you would be.
As a consolation prize, I can see a new problem by looking at your example. 123_x::y::kg apparently references namespace _x, and _x is reserved as a name to the implementation in the global namespace.
 
@Potatoswatter I thought it was double underscores?
 
@ThePhD Double underscores and underscore-caps are reserved for any purpose, anywhere. Underscore-lowercase is reserved for global namespace functions and variables.
struct s {
void _m(); // OK
friend void _f(); // wrong
};
 
@Potatoswatter {literal} would disqualify the parser from considering the subsequent _{blah} as something like that, no? That is, namespace _x would already be wrong, and _x::y::kg is to be x::y::kg in name, no?
 
Indent your code, please.
 
7:10 AM
> if you have an aggregate without encapsulation, hiding member functions in the TU is going to hurt performance (unless you have whole-program optimization and trust your luck a lot)
 
@ThePhD The _ is part of the {blah}. You want x::y::_kg but you get _x::y::kg, where it's illegal to define either of namespace _x or operator "" kg.
 
@Potatoswatter So then would it look like _x::y::_kg then?
I don't mind repeating the underscore to solve the ambiguity.
 
It's just a mess. Anyway, even lexing UDLs is a pain in the butt which is why MSVC took so long (if ever) to get them. I don't see much progress being made on this front.
 
So, {literal}_std::s for std::string, say, would be fine, and {literal}_x::y::_kg for user-style defined literals.
@Potatoswatter Oh, well. RIP my dreams.
@Potatoswatter Are you at the con? 'Cause I'd want you to at least ask someone anyways. :D
 
What are you trying to do wrong?
4
 
7:15 AM
@AnastasiyaAsadullayeva Qualified UDL lookup.
 
I cannot afford to go to any more conferences than I do. BTW, I'm looking for employment.
 
@Potatoswatter Oh, I had no idea. Best of luck in your endeavors!
 
I could try to help but I'ma student.
 
Are you gonna learn about using namespace x;
 
7:16 AM
Bumemployed
 
@Rapptz Is a bad idea for headers.
And doesn't apply when you've got UDLs that fight each other.
 
I don't even wanna know
 
"I choose you"_pikachu
 
I just paid 24 USD for a burger with fries and soda
Thanks HK
 
Hi
 
7:21 AM
@AnastasiyaAsadullayeva jee hope that was a good burger
@Grimbode Hi :)
 
@TonyTheLion @AnastasiyaAsadullayeva How are you? :)
 
I just woke up, but I'm fine.
 
I am very angry
 
Same still need to grab my morning coffee
Always so dramatic in life ? :V
Why angry though?
 
@Prismatic That’s because the underscore leads the UD suffix, but not the name of the operator. The name of the operator is operator""_suffix.
 
7:22 AM
@AnastasiyaAsadullayeva oh bby, whats making you angry?
 
user1804599
The call stack storing return addresses is a little unfortunate.
 
user1804599
Maybe I will use two stacks; one for values and one for return addresses.
 
there was a short period of hand wringing when at first the notation was operator"" _suffix (note the blank) but I’m fairly sure that’s in the past now
 
@TonyTheLion "what's your beef" FTFY
 
user1804599
Can you specify the stack size for the main thread?
 
7:25 AM
@Prismatic Use using. If/when you’re mixing same-suffix operators, you’re better off (temporarily) re-aliasing them to something else. Again, this is more or less how you would proceed for, say, friend functions which you can’t explicitly qualify either, or ADL lookups and so on. This is not new.
 
user1804599
I don't need 8 MB.
 
user1804599
Where should I do that? Pass it to the linker?
 
user1804599
Ah yea, I see nice thanks.
 
@TonyTheLion No time to shower this morning and I hate everything
 
user1804599
7:27 AM
ld -z stack-size=n
 
@AnastasiyaAsadullayeva awww :(
 
@LucDanton how would you alias functions?
 
@LucDanton You could define a class which implicitly converts to char const*, then use ADL to find the literal operator like operator""_screw( lib::literal( "you" ) ). Sure to break compilers and brains alike.
@Prismatic auto & alias = operator "" _fun;
 
@Prismatic e.g. short and simple-ish auto this_one_op = [](auto x) { return foo::bar::operator""_suffix(x); };
@Potatoswatter qualifiy and that’s the perfect example
@Potatoswatter ADL for UDL ops doesn’t make sense. I mentioned ADL calls because they share a property where explicit qualification doesn’t make sense/isn’t as useful.
 
guys making docutils directives is hard
 
7:32 AM
The signatures for UDL ops are super restrictive so don’t think of being tricky there.
 
we should team up and work on inkdoc together
 
Since you're allowed to put a space between "" and _suffix when writing the full name of the operator, you can also define a macro: #define LIT_FROM_HELL hell::operator "" and then LIT_FROM_HELL _suffix( "bah" )
@LucDanton I joke…
 
This is just beginning to seem like a descent into madness
 
@Potatoswatter It doesn’t work m8 :v
 
Why not just use free functions over UDL operators?
 
7:33 AM
Why are you abusing UDL operators like this
 
ie, kg(123.456) instead of 123.456_kg
 
@Prismatic I enjoy them for reducing syntactic noise.
 
I get the thing on the right looks nicer
 
@Prismatic You mean, never define a UDL operator to do anything but call a free function? Yes, that's the right thing to (not) do.
 
also there’s the template version which has no equivalent and is super powerful (well… the string one moreso but that’s an extension)
 
7:34 AM
Why not 123.456*kg?
 
you mean raw UDLs
 
oh man
 
yes, but the template ones
 
@JohanLarsson also valid
 
what's the name of that feature again
how do I keep forgetting
it's so GOAT
 
7:35 AM
I am only talking about cooked UDLs here, but yes raw UDLs let you do cool stuff
 
RICHARD SMITH SAVE ME
 
ur a goat
 
what lame ass distinction is cooked UDLs vs raw UDLs
 
@Prismatic that’s not even the right terminology
 
I use UDLs for one thing: easy creation of objects
 
7:37 AM
@Rapptz it’s pointless
 
I don't even know what he means tbh
which one is cooked and which one is raw
are we talking about UDLs or meat
 
The raw ones you have to do the parsing yourself. The cooked ones you don’t.
 
Oh variadic char...
 
That includes foo_type operator""_foo(const char* s); which can be called for 123_foo.
 
er what
 
7:39 AM
Since that’s not the sexy version then we don’t care about raw vs cooked.
 
when was that one added?
there's const char*, size_t but that requires quotes
 
this is where i read about them initially
 
whoop whoop blog alert
 
lol wtf
 
7:41 AM
@Rapptz Yeah the terminology is probably 'cooked, for strings' (only raw is actual terminology, cooked is informal btw).
whoop whoop not the standard alert
> S shall contain a raw literal operator or a literal operator template
there’s both
oh wait
wrong factoring I think?
i.e there’s raw, template, and cooked?
Then 'raw' are the pointless ones :D
 
user1804599
char* memory = malloc(stack_size * 2);
void* data_stack = memory;
void* return_stack = memory + stack_size;
__asm__ volatile(
    "movq %0, %%rbp\n"
    "movq %1, %%rsp\n"
    "jmp staple_main\n"
    :
    : "r" (data_stack), "r" (return_stack)
);
 
user1804599
This may or may not work.
 
> A raw literal operator is a literal operator with a single parameter whose type is const char*.
@Rapptz That’s from around C++11 so they’ve been there forever
 
that is new to me
 
IIRC someone used that in tandem with C++14 quotes for version number literals not too long ago
also handy if you want more bases but are deathly allergic to templates
 
7:45 AM
what are templates
 
why would you use that version instead of template<char...> though
 
@Rapptz allergies
More seriously generalized constexpr can probably make the code look reasonable.
But I don’t like that they would always be called for all sorts of literals, whereas you can SFINAE out the template version and only handle, say, numeric stuff (…or you disable the extension for strings anyway but you get my point hopefully)
 
template<char...> isn't an extension though
the extension one is different, and cooler.
extension is template<typename CharT, CharT... Args>
 
Right, but you might feel like having one op for integral stuff, one op for floating point so the argument still holds :D
@Rapptz Oh that’s right, very convenient.
 
user1804599
I like that D lacks two-phase lookup.
 
Why weren't string literals simple defined as template <typename T, std::size_t N> stuff my_literal ( T (&arr)[N] ) {} ?
 
user1804599
@Rapptz That's what she said.
 
@ʎǝɹɟɟɟǝſ awesome. The joke is funny, but for the interviewer to actually try and crack it in an interview with the Dalai Lama .... that's weird
@elyse huh. We don't lose papers often
 
He is an hero
 
user1804599
> TonyTheCoshman
 
7:55 AM
an hero is quite a dark meme
 
user1804599
hmm wait, I don't need malloc
 
it dates back to /b/ was the edgiest part of the internet
 
user1804599
I can just set ebp and esp to point within the C callstack and then jump
 
@AnastasiyaAsadullayeva was I too accurate? My point is C++ is has zero-cost abstractions. You can have a struct just be a padded group of variables and every operation on them inlined.
If you're creating a game and do the whole "hide the implementation" cargo-cult for your coordinate type, you're doing it wrong IMO.
 
@sehe I mean, it seemed you are expecting LTO to not do a good job
 
7:58 AM
@TheForestAndTheTrees There is nothing "edgy" about the origins of that meme. I find it rather disturbing to be honest.
 
user1804599
LTO is easy.
 
@TonyTheLion Sorry, didn't mean to imply it wasn't disturbing or wrong.
 
@TheForestAndTheTrees Cool
 
@AnastasiyaAsadullayeva Rightfully so. It's better to just state intent. The whole separation of implementation is bogus here
 
user1804599
Rightfoldy so
 
7:59 AM
@sehe Could you pls elaborationating
 

« first day (1802 days earlier)      last day (3142 days later) »