« first day (1964 days earlier)      last day (3210 days later) » 

04:00
@Puppy round two, short complete example of the problem: coliru.stacked-crooked.com/a/5ce9431048e1974d (cc @Morwenn @JerryCoffin )
@caps add a move constructor to OtherClassChild
@LucDanton Thanks, that was it.
Can't believe it was that simple.
I assumed it would be generated automatically...
yes, but you were confused
@caps now’s a good time to learn about the rule of zero
@LucDanton The child class was using the rule of zero!
That was the whole point of the Owners in the parent.
m8 the destructor is the specialest of the special members
04:10
Even the parent was using the rule of Zero.
Ah crap.
So making it virtual and default disables the other ones?
But I can't leave it undefined and non-virtual, right?
I didn’t notice it the first time around but you can in fact remove it, rather than declare a move construction. (I assume, not tested.)
thanks for being destroyed in my place
Remove the destructor?
well, the declaration
Hmmmm...
04:12
I can’t coliru very well because an update broke my fonts in Firefox somehow, shame
good excuse
the rules of X are about declarations btw
e.g. foo(foo const&) = default; gets rid of the move constructor altogether
Right.
Even though you used the default copy constructor.
I still can’t get used to template<Iterator It>, template<typename It> requires Iterator<It> looks better to me somehow
04:16
why not scrap template
and just do Iterator it
class template in this instance
Oh! Nay! You have to specify it if you have virtual functions!
I always put function template constraints at the end, too
@caps you are confused again
@LucDanton Hm?
04:20
Aaaahhhh...
@Rapptz when it comes to function templates the cool people do Iterator{It} void foo(It it); anyway
not me
@Rapptz of course
I guess I'm not cool
04:21
But I'll still have to specify a move constructor in the parent.
@caps iow Ro0/Ro5
@LucDanton Right.
@Rapptz so what’s your stance on class templates anyway
I like template<typename It> requires Iterator<It> I guess
I’m wondering if I’d get into the groove of template<Iterator It> if I had colouration for it
04:28
Oh, wow.
Input iterators don't even have to have vali- WAIT
Input Iterator it = { ... };
auto x = it;
*it;
*x; // this is a thing with them, right?
04:43
> Is it viable for someone without work experience to find a job with heavy C++ focus?
Well yes of course this is how the best C++ codebases are made
> Are finished studies more important than skill?
lol
@LucDanton Thanks again for all the help!
> we're building a React Native app that is helping connect individuals affected by Cancer
@Rapptz
Soon you'll be able to literally npm install cancer
05:06
turns out the -> ConvertibleTo<X> thing isn’t working too well
it was ConvertibleFrom earlier
@LucDanton C++ 1z Concepts?
@caps yeah
Are those available right now in Clang 3.7.0 with the -1z flag?
Like, could I be using them in production code right now?
@HubertApplebaum was it? I would say you have an amazing memory if I believed you
05:08
If so, is the documentation on cppreference?
@caps dunno
and dunno either
22 hours ago, by Luc Danton
> { x.foo() } -> ConvertibleFrom<int>;
Hmmm...
@HubertApplebaum my plan worked, thanks for looking it up for me
I took the bait graciously
05:11
22 hours ago, by Luc Danton
the meaning of the constraint is actually ConvertibleFrom<_, int>
The answer, for curious reader, is that concepts are not in clang in any way. But they are in gcc 6.0 with the -1z flag.
that’s right though, so I guess I wrote the concepts wrong
@caps separate branch for Clang IIRC
Must be a very experimental branch?
@LucDanton I wouldn't be surprised
05:29
debugging concepts as annoying as ever
sothendont.jpg
very inappropriate use of a good reference, -3/10
> concept 'ConvertibleTo<int, int&>' was not satisfied
interesting, by all means it should be int&, int&
oh there’s possibly a decay or something silly like that, brb checking :/
oic, cos { expr } -> Concept<Args...>; adds constraints as if calling f(expr) where Concept{Expr, Args...} void f(Expr);
I implemented it differently originally
05:55
okay so I was putting off figuring out more of the placeholder syntax that concepts-lite brings
turns out if I have e.g. -> Concept<Args...>&&; then it’s the same as if checking against an invented Concept{Expr, Args...} void f(Expr&&);, if I read that right
it also turns out that’s not implemented properly in GCC
it’s also still not quite what I want, since Expr is behind the ref-qualifiers
the closest thing is something like the deduction in Concept<decltype(auto), Args...> var = expr;
sadly decltype(auto) is not allowed to appear here
new rule of thumb: ditch be really careful with compound requirements
cool, it’s really easy to demonstrate the finer points of compound requirements with e.g. { *it } -> same_type<int&>; (which will never be satisfied)
… also that really shows how the convertibility check is built-in, i.e. { *it } -> int&; obviously works
I’d better get rid of ConvertibleTo to never make that mistake again lol
06:12
what would we do without you, luc
yay now it compiles and passes tests
06:35
@HubertApplebaum I’m predicting a shortage of vowels due to the Color Clr problem, I’m already using Range Rng (I picked that up from std-range discussions I’m fairly sure) now I’m considering Array Arr and so on
I regret but Arr isn't vowel-free
> concept bool ArrayLike = Array<Type> || detail::is_std_array_specialization_v<Type>;
kinda ghetto but oh well
06:54
wow FB suggesting me expat insurance for HK
that's quite the targeting
@HubertApplebaum Tell FB you already have it.
and what insurance company and its plan.. etc..
I'll tell FB I'm a local
Dear FB meet Mai Long Dong
@HubertApplebaum That'll definitely get them confused.
as if they don’t already have it in their database
Lol.
07:03
I HAVE A PROBLEM
I have cstring_span which has a constructor like:
template<std::size_t Size>
span(value_type (&str)[Size])
    : _data(str), _size(Size) {}
inb4 const or braces or literals
And a free function template<OStream> operator<<(OStream&, cstring_span) etc
when doing some_stream << "lala" MSVC complains about ambiguity
ofc making the constructor explicit fixes that but I don't like making it explicit
why is it ambiguous idgi
is it a Standard stream?
@LucDanton loot at those sigils though
it's almost rust
I don’t know the overload resolution rules by heart so I usually SSSSSCCCCCCEEEE those things
ya’ll have to do it Hairy
07:08
I'm trying a rebuild to see what stream does that
std::basic_ostream<char,std::char_traits<char>>::operator <<' : 6 overloads have similar conversions
check what the compiler says for a const char* + implicit from char array overload set
what’s value_type btw
there’s a caveat for array refs overloads involving cv qualifiers but I don’t think that’s the situation
wait wait maybe you're right for once
07:13
wow yes that was it
Oct 28 '14 at 1:05, by Luc Danton
btw if you overload on const char* and const char(&)[N] then char data[] = /* init */; will be accepted by the first overload.
different situation
@HubertApplebaum if that overload is meant for literals ya hafta consider the situation with the terminating zero btw
yes this whole thing is broken anyway
surprising I know
did you wroted it
I already know the answer since I dove into the transcript
Ven
Ven
Yo
needs more enable_if and a sprinkle of luc_danton_traits
07:18
m8 my code has no enable_if are you crazy
Not everyone has concepts
r u jelly
Morning lounge
Ven
Ven
Yo
Stop reminding me of enable_if. I need to refactor a huge mess that was caused by enabling MSVC using a ton of those...
07:25
"Bonjour,

Êtes-vous en recherche active ou en veille d'opportunités ? J'ai un poste à vous proposer, vous pouvez me communiquer votre numéro de mobile en retour de ce message afin que je puisse vous appeler et vous parler de ce poste."
Trou de balle
Ven
Ven
Spam 2 recruiter
I should register his email to pr0n mailing lists
Ven
Ven
Je reçois plusieurs emails par semaine de "salut j'ai vu ton cv sur monster tu veux qu'on t'embauche" sauf que j'ai désactivé ce truc y'a 4 mois
Oooh yea
pourquoi y’a ton cv sur des canettes
Ven
Ven
Pour pécho de ouf
Tous les refrés qui s'énergisent verront mon résumé, izi
It's a bit annoying to receive phone calls because HR often means High Retarded
07:30
Solved this problem, changed my phone number :)
Ven
Ven
B-but how will hubert phone-sex you now?!
Skype ofc
my skype dr.dd0s add me
only good programmers can add me
i want friends
Ven
Ven
We don't have any for you
We don't have any for ourselves already
one of my favourite artists released a new song
@sehe @Morwenn @JerryCoffin ^
07:45
> internal compiler error: Segmentation fault (program cc1plus)
07:56
> error C2039: 'type' : is not a member of 'std::enable_if<false,_Ty>'
is it not
good question
it compiles but I have a sinking feeling
@HubertApplebaum what I have is an ICE
that's refreshing to hear
je te prépare un petit SSCE dont tu me diras des nouvelles
user1804599
Hello!
08:08
looks like a constexpr bug, shame as I was planning to add a constexpr test (yes it bugs out even without doing anything constexpr)
user1804599
bullshit
I can't repro with gcc or clang bullshit
guess I’ll leave that for later, I’ve actually been reducing a testcase for ~1 week yet and I haven’t totally given up on that
also I’m fairly sure creduce is stalling because it’s confused by concepts so it’s not like that one would go any faster
wouldn't be the only one
0.1/10
08:14
of course it works with gcc
In VS2013 the cout line errors with AMBIGUITY
@HubertApplebaum that’s clang
ton acuité est sans limite
on ne peut décidément rien te cacher
Is there some easy way to tell if a lib is built for debug or release version of the MSVCRT?
@HubertApplebaum OTan va la cruche OFlux qu’à la fin elle me brise les couilles
4/10 (-6 for the weird ')
08:18
@HubertApplebaum I’d suggest a partially ordered overload (have I mentioned I love those)
first, two things
a) i just realize I am drinking a english breakfast tea when I actually ordered a tea latte
that would also completely get rid of the previous ambiguity with [const] char* (although then you will only ever call the regular operator<< overload with string lits—but that’s sane you maniac)
Xeo
Xeo
@LucDanton You're still using that word!
b) she actually gave me two cups
@Xeo oh I thought my mistake was forgetting the 'spec' and this time I didn’t
took me a lot of focus
Xeo
Xeo
08:21
lol
@HubertApplebaum btw it’s nearly pointless to abstract over Stream& rather than just using std::ostream&, if you only care for the Standard streams
or maybe you have Microsoft macro magicks on hand
@HubertApplebaum one girl two cups, the next thing
@LucDanton I just copy what @Rapptz does
please blame the people who think, not me
I do that cause I don't want to include <iosfwd>
08:32
fite me
@Rapptz u r dumb
I like Stream& better anyway
and now I need to rewrite everything to use std::ostream&
thanks Rapptz
y
that implies all streams inherit from std::ostream
08:34
yeah the big caveat is 'if you only care for the Standard streams'
Let me check if I use only things like that
and I also prefer really, really specific overloads to help with finding errors etc. (hence why I ramble about partial orderings etc.)
if you don’t care for that it’s eh
Oh I remember now
<iosfwd> sucks ass
user1804599
eww std::*stream
it’s the 'I don’t want to include oh noes the bloats :( :(' argument that’s silly specifically
08:35
Yeah I do use streams that don't derive from ostream
since iosfwd only forward declares (duh) you can't do things like access the flags
unless you include <iostream>
and now I need to rewrite everything again to use template<OStream>
and man that's a pain
thanks Luc
@LucDanton But think of the compile time!
08:37
@Rapptz in that situation it’s not uncommon for me to split the i/o into a separate header to get the relevant headers, leaving a declaration only (with the help of <iosfwd>)
in Python, 1 min ago, by Ameer Hamza
hy i'm stack programmer and learner
only good programmer can add me
skype dr.dd0s
i need friends
for posterity
@Rapptz m8 <iostream> is for the stream objects
you are the worst at includes
it is
that's why I avoid it like a plague
I am
I will avoid <iostream> until I die.
08:39
$ grep '<iostream>' $here | wc -l
4
all source files, I guess I just played myself as the cool kids say
@HubertApplebaum I’m not going to grep the moon am I
man of little faith
$moon or gtfo
if ++x is Incrementable, what’s x += stride
08:45
lame?
@LucDanton IncrementableRedux
is it a $planet?
> cannot convert from 'std::basic_ostream<char,std::char_traits<char>>' to 'std::basic_ostringstream<char,std::char_traits<char>,std::allocator<char>> &'
why are you doing this
why
@LucDanton increasible
accumulatable
embiggened
je ne taris pas
@HubertApplebaum ah, the good ol' (stream << thing).str() // why no worky or similar I’m guessing
not my code (surprisingly)
08:56
that’s a nice error message unlike the .str() thing I guess
@Rapptz I was too harsh; you are the semi-worst
user1804599
I asked Siri what to do when the battery is empty.
user1804599
It didn't know.
user1804599
Now I'm stuck. Help.
user1804599
I'm used to Nokia.
ask Siri what it's wearing and let it tell you 'this is about you not me'
09:00
@HubertApplebaum Stream& :')
all of the "just works" with none of the fuss.
and then you change from a thing to a thong and everything breaks again
@LucDanton was from return stream << thingy; instead of splitting the statement
Yes I figured it out on my own
pls no jealousy
user1804599
Do everything possible to increase the number of Juncker's minions (aka EU citizens).
The good thing about Juncker is that he's got a levensthein distance of 2 from Fucker
4
09:05
wait, so you are changing from std::ostream& to Stream& then?
user1804599
Luxembourg distance.
@LucDanton No, all my code is template<typename OStream> already
That specific issue isn't my code
Someone copied it without thinking maybe
and thought it'd be a great idea to combine both statements into one
closed intervals are the worst thing ever
save a line save the planet
inb4 it was me
do I attempt a git blame
better not
09:10
ICE on requires requires { --pos; }???
@jaggedSpire tl;dr
shared_ptr vs references and a comment that says references passed to this object must outlive it!!
negotiations accepted on the number of exclamation marks
I co_await Luc's helpful input
not enough context
some object holds a list of connections and wants to load balance requests across those connections
I intend to create a load_balancer which is owned by the (some object) referred above and takes a range of connections
Of course the connections must outlive the load_balancer
I'll ssce
if the load_balancer literally owns such an object then the list items outlive it without too much care (iterator invalidation though)
Ven
Ven
09:17
Yo, anyway have their C++14 draft pdf handy?
so… job done?
@HubertApplebaum shared_ptr, it's not going to be done wrong because someone is an idiot
but luc said the other one
09:19
he's wrong
safe vs unsafe
you choose
I’m not the one underestimating idiots
user1804599
C++ I/O streams are cretinous.
@LucDanton thanks for holding me in such high esteem!
load_balancer should have a collection of shared_ptr<connection_things>
@Zoidberg lol is that a word
09:21
@thecoshman don’t you mean a shared_ptr of a collection of …
user1804599
Yup. :D
user1804599
perform :: Connection -> Request -> IO Response
withCookieJar :: Functor m => CookieJar -> (Request -> m Response) -> Request -> m (Response, CookieJar)
and why not put the shared_ptr inside shared_ptrs, twice the safety!
@HubertApplebaum references passed must always outlive the object, but assume idiots and use shared_ptr
user1804599
The perfect HTTP client API.
09:22
lol I booked a hotel and they sent me a mail with "Dear Vladimir, "
my name is not vladimir
user1804599
Park Young-Putin
@LucDanton no... because you are going to hand out shared_ptr<connection> to those who request it from the load balancer... no?
Vladimir Getin
and where did you get the double shared_ptr?
@slaphappy I'm the only consumer of my code, so probably shared_ptr is a good idea
09:23
@HubertApplebaum "assume idiots" works for friday-afternoon you, yes
@HubertApplebaum doesn't matter, in a months time, you'll forget it must outlive and break it. use shared_ptr
user1804599
Vladimir 中国便便
@HubertApplebaum What is the complexity of computing Levensthein distance?
wow the hotel messaged me on whatsapp
china so modern
I kinda like being called vladimir too
user1804599
便便便便便便便便便便
09:24
what's the topic of this conversation?
wow you use whatsapp?
yes
add me +33 vladimir
I don't have thatappp
user1804599
@fredoverflow Θ(mn) time and Θ(mn) space
user1804599
Where m and n are the string lengths.
09:26
What about if you don't know the second string in advance, but have a dictionary of possible words?
Wait, that question doesn't make sense.
How do I find the word with the smallest Levensthein distance?
no unique solution
mesosad
how was the hiking trip @Telkitty?
@Zoidberg Θ.Θ
@edition leaving this Saturday
09:32
@Telkitty fantastic
hectic
@Telkitty Buying Firewatch on steam this Saturday? ;)
Congratulate me. My leg got infected with Cellulitis . because of a fucking blister ;(
unrelated but packaged_task is p cool
http://www.ebay.com/itm/221320754748
Who the hell wants to buy iPhone 5S for 1K USD
09:47
It's "gold".
...
Probably it also includes the cost of fake ebay accounts which left fake 5 star comments -_-
@fredoverflow going for a 6 days hike this Saturday
Ven
Ven
LOL
school blocked tons of stuff. but just going via https - it works.

« first day (1964 days earlier)      last day (3210 days later) »