« first day (1787 days earlier)      last day (3175 days later) » 

3:00 PM
Invariance for both and the rest.
 
Why would std::vector<base> be a subtype of std::vector<derived> when derived is a subtype of base?
 
overriding functions can return a (pointer/reference to) D because all Ds are Bs, and can accept a (pointer/reference to) B because all Bs are Ds
@ʎǝɹɟɟɟǝſ wait that's not correct
 
@ʎǝɹɟɟɟǝſ that's unrelated
 
@AndyProwl That's contravariance
 
3:00 PM
also std::vector does both input and output so it should be invariant
 
@ʎǝɹɟɟɟǝſ nope
that's broken
 
> Action<Animal> is a subtype of Action<Cat>. The subtyping is reversed because Action<T> is contravariant on T.
 
look up in/out feature in C#
 
> For instance, if Cat is subtype of Animal, ...
 
you can enable it on every generic parameter in C#
 
3:02 PM
@ʎǝɹɟɟɟǝſ where is that from?
 
I'm hungry
 
Yes. Any function that accepts an animal, also accepts a cat.
 
Many programming language type systems support subtyping. For instance, if Cat is subtype of Animal, then an expression of type Cat can be used whenever an expression of type Animal could. Variance refers to how subtyping between more complex types (list of Cats versus list of Animals, function returning Cat versus function returning Animal, ...) relates to subtyping between their components. Depending on the variance of the type constructor, the subtyping relation may be either preserved, reversed, or ignored. For example, in C#: IEnumerable<Cat> is a subtype of IEnumerable<Animal>. The subtyping...
 
@AndyProwl Prolly the wiki
 
I could eat a pizza
 
3:02 PM
@R.MartinhoFernandes That's not what's happening in the contravariance example
 
@ʎǝɹɟɟɟǝſ stupid question: why would you use templates for this? I don't get it.
 
Action<T> is void(*)(T*)
 
Every function that accepts a Action<Cat> is also accepting a Action<Animal>
 
oh
 
@ʎǝɹɟɟɟǝſ not for arbitrary parameter
 
3:03 PM
What do you mean?
As opposed to what?
 
only if you declare your Action as Action<in T>
 
I have no idea what that means
 
this means that the parameter is contravariant
A<out T> means the parameter is covariant
 
That's totally what's happening.
 
@Rerito always a good idea
 
3:05 PM
@milleniumbug That rule of thumb doesn’t scale though :D Input of input is covariant (with respect to the outermost context).
 
So that example is contravariant only if you declare my Action as Action<in T> which means that the parameter is contravariant.
Yeah, makes sense.
 
A function taking an Action<Cat> can pass a cat to it.
 
in like ref in C#?
 
@Mr.kbok But I just finished my "quatre heure" :(
 
1 message moved to bin
bye
 
3:06 PM
If you give it an Action<Animal> you can still pass a cat.
 
@ʎǝɹɟɟɟǝſ well, if I have foo(function<void(Cat&)> f), then inside foo() I'm probably going to call f() with an argument of type Cat. If foo() gets called with a function that takes an Animal, that's fine, because I can provide a Cat to a function that takes an Animal. So function<void(Animal&)> can be used where a function<void(Cat&)> is expected. So it's a subtype
 
@Rerito always. (you could eat a small pizza)
 
(not in C++ ok)
 
@TonyTheLion why?
 
3:06 PM
@R.MartinhoFernandes Where are you reading that? Nowhere it's given Cat only in conjunction to a Action<Cat> parameter type there.
 
Aug 25 at 5:56, by Xeo
The Good, the Bad and The Rules.
 
@TonyTheLion wow that was fast
 
@ʎǝɹɟɟɟǝſ it's all you can do with Action<Cat>: pass it a cat
 
@milleniumbug I happened to see it before anyone else
 
oh wait I have him plonked, that explains it
 
3:08 PM
@R.MartinhoFernandes lol before the edit
 
still don't quite understand covariance and contravariance in the context of C++ subtyping :/
 
can't you guys permaban him?
 
@R.MartinhoFernandes ...or a subtype thereof
 
@Mr.kbok only @JonClements can
 
3:08 PM
@Sino so it'd be good if you stuck to the rules and didn't just frequent this channel to create noise... okay? Not going through this routine again... and you appear to be keen to overstep the line... let's not? If you really want more time off, it's no skin off my nose to provide you with it.
 
@AndyProwl I see
 
Xeo
@JonClements Question: Why the hell is he still not chatbanned?
This has been the what, fifth or sixth time?
 
@Xeo He was for a week.
I guess he didn't learn his lesson.
 
Xeo
And apparently he hasn't learned.
 
@JonClements Ok ;) I read rules
 
3:09 PM
weird
 
@Sino then follow them.
 
wow, this takes some commitment to being a PITA
I should be that determined in my job
 
@AndyProwl me too :)
 
yay, new phone confirmed to arrive tomorrow
can't wait
 
@AndyProwl That just reminds me how hilarious the last savagechicken is
 
3:11 PM
@AndyProwl There are more toxic trolls in this room who are smarter about it. So it's not as simple as calling in a mod to ban them.
 
@Rerito link?
 
@AndyProwl What phone you got coming?
 
@JonClements samsung galaxy note edge
 
That's a biggie
 
3:13 PM
yeah
 
@AndyProwl Oh, you went with edge after all?
 
I like big displays, hopefully it will fit in my pocket
 
@TonyTheLion I am following them, it's just a misunderstanding !
 
@Griwes yeah
 
I want to play with it at cppcon. :D
 
3:13 PM
@Rerito :P
 
Ahh... good choice... my brother has one of those... looks v.nice... I've stuck with my S3 for yonks now... still appears to work, so have't changed it :)
 
Currently with a S4 mini
 
@Griwes shall I trust you :D
 
I prefer smaller screens. Thos which fit more in the pocket.
 
I'm considering getting the Z3 compact
 
3:14 PM
@Morwenn ++
 
@Rerito Well, that's exactly what I have :p
 
My phone is broke.
 
@AndyProwl :D
 
@JonClements Actually I would have preferred a galaxy S6 but it's too expensive
(edge version)
 
I can't seem to make the Default Input stay with Keepass2Android
 
3:14 PM
@Morwenn My twin as well
 
I have Iphone 6S
 
It ALWAYS reverts back to the regular Android keyboard. Why the hell does it ignore my preferences. :(
 
@Rerito I have that one. Not bad at all
 
I can't even remove the Android keyboard.
 
@Rerito Oh, so you already know what you're buying then :)
 
3:15 PM
@AndyProwl Apparently my open content part of the talk will be right after (= 45 minutes :D) the main one.
 
I want t file a goddamn complaint.
 
I should start making my slides probably ;_;
 
It's a K2A feature
 
template<typename T>
sexy_type<0> is_sexy(T const &) { return sexy_type<0>(); }
this one's for @elyse
 
3:15 PM
sexy type lol
 
@Griwes I guess it's about time yes
 
It reverts to your previous keyboard after input.
Why would you want the K2A all the time anyway? It kinda sucks.
 
I think this applies to everyone in here :)
 
@JonClements I want to be admin please
13
 
@R.MartinhoFernandes I'm used to it and its layout, and I haven't noticed any significant differences.
 
3:16 PM
lolwut
 
@R.MartinhoFernandes Even when I set it as the default? That's.... strange.
 
@TonyTheLion Exactly
 
@Sino You can be admin of your own room if you like.
 
@R.MartinhoFernandes Seriously! I've been using it as a default for a long time now, and then it just stopped letting itself be the default. I never really used the copypaste functionality, only the type-out, so I didn't think I was leaking any precious info...
 
@TonyTheLion why do I love so much the board with the nail?
 
3:17 PM
@MarcoA. Because it nailed it?
 
@Morwenn Yeah, I've already broken a S4 mini. I wanted to buy the Z3 at that time but hadn't the money
 
@Sino That was hilarious. Kudos to you
 
So... S4 mini again
 
You had no credibility to destroy.
 
@ThePhD it sucks as a keyboard.
 
3:18 PM
@R.MartinhoFernandes But I like it. ;~;
 
It's not meant to not suck.
 
But I'm sick of touchwiz :(
 
It has barely any features.
 
@sehe At least he's determined. He's been saying that for like 2 weeks or so even before he got banned
 
I had to star that one, sorry
 
3:19 PM
The exclamanation point is right where I expect it to be, it has spell correction, skips ahead after using punctuation, even capitalizes the next letter. ;~;
 
The one cool feature they added was automatically restoring the previous keyboard after use
 
0
Q: std::unique_ptr memory and preformance

Narek When you reach for a smart pointer, std::unique_ptr should generally be the one closest at hand. It’s reasonable to assume that, by default, std::unique_ptrs are the same size as raw pointers, and for most operations (including dereferencing), they execute exactly the same instructions...

>Scott Mayers
 
@Rerito Well, mine fell a few times and it doesn't have a scratch. I guess that you won't break that one easily ^_^
 
how is Scott Mayers formed
> preformance
lol
 
> Scott Mayhem
 
.i..i
 
afective modenr +c+
 
@ThePhD pretty much all keyboards do that.
 
@AnastasiyaAsadullayeva Actually value_ptr (if it existed in the standard) would be. I rarely need unique ptr.
 
@R.MartinhoFernandes Well, that's all I really need.
 
3:20 PM
@Borgleader what are the semantics of that
 
> Game developer.
Everything makes sense now.
 
Its great to be a room owner.
 
@AnastasiyaAsadullayeva A pointer that copies the pointed value when copied I guess, but sitll manages its own memory.
An equivalent of deep_copy_ptr maybe?
 
@Morwenn I made my old S4 suffer...
It still works though. But the screen is cracked everywhere
 
It's Scott Meyer---s--- by the way. — ʎǝɹɟɟɟǝſ 9 secs ago
murkdown fail
 
3:22 PM
Murkdown cant handle things being together.
 
@Rerito My old Blackberry fell from my pocket once every ~2 days. Also, I drowned it at least twice. It still works though.
 
And they didn't provide alternative syntax for strikethrough like they did for italics/bold
 
@AnastasiyaAsadullayeva its an owning pointer but it will copy the underlying thing, as opposed to unique_ptr which cant be copied because "unique"
 
@ʎǝɹɟɟɟǝſ don't you know Mayers? Leading export on preformance — sehe 5 secs ago
 
@Morwenn I smashed him against a wall out of anger
 
3:23 PM
@Rerito That's hardcore o_o
 
(But at that time I already knew I was buying another one so... :p)
 
I'm not buying it
 
@ʎǝɹɟɟɟǝſ MeyersSimon Kraemer 37 secs ago
:P
 
the room I set up seems to be idle. How could I interest you people here to join it?
 
strip
or pay them money
 
3:25 PM
@sehe bear you made me laugh
 
Since then, my new one had a few falls and got a scratch on the corner. But the screen is not cracked or anything
 
@ʎǝɹɟɟɟǝſ don't you know Mayers? Leading export on preformance — sehe 2 mins ago
 
> This user has been temporarily suspended by a moderator and cannot chat for 6 days.
 
It's just that I'm tired of it and want to change
 
Not necessary anymore.
 
3:25 PM
@Mysticial oh, lol.
 
@Borgleader Yeah but then polymorphic pointees?
 
@AnastasiyaAsadullayeva Hmm?
 
@AnastasiyaAsadullayeva Copy function is configured with a template parameter
 
@Borgleader How do you copy a value_ptr<Base>(new Derived())
 
@ʎǝɹɟɟɟǝſ you should retag it as
for consistency
 
3:29 PM
@AnastasiyaAsadullayeva Like boost::ptr_vector does. You slice it all the way.
 
add also perhaps
 
user1804599
@ʎǝɹɟɟɟǝſ example of contravariance: (Base) => A is a subtype of (Derived) => A.
 
@Morwenn horror
 
Default setting slices it, but you can provide a Cloner with a template parameter
 
3:29 PM
he got the tags right at least
 
@milleniumbug Not bad.
 
@MarcoA. They were edited in
 
user1804599
std::vector should be invariant.
 
invariant?
 
That's how I wrote a value_ptr
not covariant and not contravariant
 
3:30 PM
@milleniumbug How does that work?
 
user1804599
Because it's mutable.
 
0
Q: Invetory on Openerp

Gaby LI need to make a comparation between two inventories, but I have 6000 products, and I want to get the stocks from the database, for to make my comparation fastly. The problem is that I not find the table on the database with this information. I found on the option " developer mode" that the tab...

 
@elyse As in, un-slicable and the like?
 
is it so hard to get English right? Don't people re-read their posts?
 
3:31 PM
Eh, I need to dig into the idea to make my polymorphic::vector optionally copyable then.
 
@MarcoA. If you're not a native speaker, then yes
 
@MarcoA. Not everyone is native
 
@AnastasiyaAsadullayeva If your Base provides a copy operation, then you can write struct BaseCloner { Base* operator(Base* a) { return a->clone(); } };, and then you use value_ptr<Base, std::default_deleter<Base>, BaseCloner>
 
user1804599
@ThePhD what?
 
@milleniumbug Got it, not bad but a bit verbose
 
3:32 PM
I.. don't see those terms as terribly difficult to get right.. plus you've got google. Perhaps you meant.. takes a few seconds
 
@elyse Erm. Nevermind.
 
user1804599
Making std::vector<base> a supertype of std::vector<derived> would allow you to upcast std::vector<derived> to std::vector<base> and then push_back a subtype of base that is not derived.
 
@AnastasiyaAsadullayeva Other design of value_ptr would be to have a template constructor, with a copy operation stored in a type-erased functor (think std::function)
but that would introduce ~~overhead~~
 
@elyse You could upcast it into const std::vector<base>
 
user1804599
yes lol
 
3:33 PM
@milleniumbug Oh noes! It's the evil overheads!
 
is the name 'applied programming' putting people off joining the room?
 
wth is applied programming
 
applied applied math
 
apple-ied programming. iphone apps
 
I second Borg's question
 
3:35 PM
what is programming
 
what's a computer
 
@AnastasiyaAsadullayeva baby don't C me
 
The title is a pun.
 
@milleniumbug Isn't that how std::shared_ptr does it?
 
@Morwenn Yes. With a difference that std::shared_ptr has reference semantics
 
3:37 PM
anyway the room's title should be more interesting.. something involving the study of Pointars
 
Main use of value_ptr for me is reducing boilerplate for PIMPL
 
I agree.
That's probably one of the reasons I never used pimpl.
 
user1804599
pimpl popping
 
Isn't that also one of the goals of operator. BTW?
 
fuck me it works :3
 
3:38 PM
I changed the name
 
I'm piling all the crazy stuff I've been doing the last few months and it works
 
@Morwenn Dunno
 
@milleniumbug If you make operator. return a reference to the implementation, then it would allow not to duplicate the interface.
 
user1804599
hahahhaa operator. imagine adding that to C++
 
title still isn't getting people's attention
 
3:40 PM
@elyse There is a proposal
 
user1804599
turning 19 pages of standardese about name and overload resolution into 50 of them
 
@Morwenn Except the names are still hidden behind the translation unit firewall, so it won't help
 
@Mr.kbok what is
 
@edition are you expcting ppl to come flocking to your room instantly?
 
@milleniumbug We did discuss that recently interestingly. Namely how you can feed an std::function<Sig> to the parametrised version and end up with type erasure still.
 
3:41 PM
@Borgleader why not? :D
 
user1804599
@milleniumbug No. They aren't.
 
@AnastasiyaAsadullayeva lots of automagic stuff with templates and such
 
@Mr.kbok Kinky, share? :D
 
@Mr.kbok Do you even lift
 
Now I REALLY want to see it.
 
3:42 PM
@elyse Whether we want it or not, it's proposed by Stroustrup and Dos Rei, so... it might make it into the language.
 
no out of context star
 
I will when the code is in readable/compilable elsewhere state
 
user1804599
public:
    impl& operator.() { return *pimpl; }
private:
    class impl { virtual ~impl() = default; virtual void f() = 0; };
    std::unique_ptr<impl> pimpl;
 
user1804599
Now you can call x.f() just fine.
 
@edition You could look at the starboard on the right to gauge what kind of topic attracts the attention of loungers, and pick a room name accordingly.
 
3:42 PM
@AnastasiyaAsadullayeva i used to lift but then i passed the class and stopped
 
@Morwenn coincoin is a big fan of dos rei
I think he wants to marry him
 
@LucDanton changed the name accordingly
 
user1804599
panta rei > dos rei
 
@elyse Which is useless because you don't have any benefits of pimpl
 
user1804599
MS-DOS Rei
 
user1804599
3:43 PM
@milleniumbug Why not?
 
PC-DOS Rei
 
well, only some of them
 
user1804599
You can subclass impl in a different translation unit just fine.
 
@Mr.kbok Who is coincoin? .___.
 
3:43 PM
@LucDanton We would we go to another room to discuss a topic we ca discuss in the lounge...
 
The way around operator& is with std::addressof. Is there going to be std::referenceof as well?
 
@Morwenn Un canard
 
adding a private member to impl still triggers recompilation
 
@AnastasiyaAsadullayeva Leave Scott Mallard alone.
 
@ThePhD What would that go around of?
 
3:44 PM
@ʎǝɹɟɟɟǝſ The operator. overload proposal.
 
@Morwenn some guy in my team who hangs around here sometimes
 
@AnastasiyaAsadullayeva I don't understand French.
 
If you set a member in the constructor body is it default init'd once already (before the constructor body is executed)
 
That's never gonna make it, is it?
 
It better.
 
3:45 PM
@Morwenn En Brezhoneg?
 
That shit is fucking rad
 
And will make using std::reference_wrapper NOT a piece of shit.
 
@AnastasiyaAsadullayeva kenavo
 
3:45 PM
@AnastasiyaAsadullayeva Ok, that was a lie. Please don't try to write breton ._.
 
Do you know what your name means btw?
 
@Prismatic The member is initialized according to the mem-init list or its brace-or-equals initializers. In the absence of either, it is indeed default constructed.
 
White sea.
 
@Prismatic can you clarify
 
3:46 PM
@ThePhD That class was not really supposed to be used for "regular" references. Someone here told me it was more for function references or something.
 
Of course I know it, I fucking chose it :')
 
Well not everyone has that luck you little white sea of cum
 
@ʎǝɹɟɟɟǝſ It has cruft from binary_function that should have NEVER been put inside of it in the first place (SRP and all).
But it's there, so I'd believe that.
 
@Morwenn Do you know what they call men who sail the white sea? :)
 
@milleniumbug Luc answered it, but to clarify I meant: struct Thing { Thing() { x = 5; } int x; } // will x be default init'd once before the assignment in the constructor
 
3:46 PM
(that was too easy. i had to im sorry T_T)
 
@AnastasiyaAsadullayeva Foam. Foam everywhere.
 
@Borgleader (You're not sorry, deep down you're squirming with enjoyment.)
 
@Prismatic yeah, right
 
user1804599
I don't like initialisation lists.
 
@Borgleader Cummoners?
 
3:47 PM
@AnastasiyaAsadullayeva Apparently my cousin's name means "little seal" :')
 
@Morwenn white sea men
 
So, any news on modules?
 
@ʎǝɹɟɟɟǝſ still broken
 
Nowhere near completion?
 
@Mr.kbok Et toi tu sais ce que signifie ton nom de famille ?
 
3:48 PM
@AnastasiyaAsadullayeva Yep
 
@Mr.kbok un petit phoque?
 
@ThePhD yep.
 
I use my beard as a scratch an itch surface.
 
Hehehehe.
 
@ThePhD ouatte de phoque
 
3:49 PM
how often does your nose itch
 
too often
 
Seal wadding.
 
The amount of Britons in this room is way too high
 
Yes that's kinda weird
 
Thanks @Luc for being less mainstream albeit a little bit less civilized
 
3:51 PM
Yeah, Luc is our favorite savage.
 
@ElimGarak no he is my favorite savage
 
And still, we don't meet.
 
@Borgleader That's some nice DoF going on. :P
 
indeed
 
@AnastasiyaAsadullayeva
there's no more code whatsoever
except the #include
it's all automagic :P
 
3:53 PM
I really wish there was a way for the user to only init some members of a class rather than having to specify a constructor for each and every possibility
 
@Mr.kbok But... but macros. ;~;
And invasive. ;~;
 
Oh I see
It's a GUI generator thingy
 
@ThePhD You can bind annotations out-of-class if you like
 
Does it handle transparency and animations? Transitions? Can I style with CSS3 and bind it to React?
 
@AnastasiyaAsadullayeva Yeah, but there's no code generation. It's only in C++.
 
3:55 PM
WOW
MOTHER FUCKERS LIED TO ME
I was going to take CHemistry BUT I CAN ALSO TAKE BIOLOGY AND APPARENTLY THAT'S ABSOLUTELY ACCEPTABLE
'm gonna fight somebody.
 
scott mayers
 
I already took biology. It's time to get SO MANY CREDITS.
 
@ThePhD find a windmill
 
@AnastasiyaAsadullayeva minimum requirements for your UI to not be shit
 
@AnastasiyaAsadullayeva I can feel the disappointment from here
 
user1804599
 
@Mr.kbok Interesting seeing WinMain without its four parameters.
 
@Mr.kbok And what do you use it for? Internal Hyper Secret Banking Company stuff? Or yours?
 
@AnastasiyaAsadullayeva yes, work. it's for managing all those config dialogs/ trade parameters/ market data etc
 
@elyse Might as well indent on 64 columns
 
I guess I should let people see the source of Furrovine soon.
 
user1804599
3:57 PM
Ugh, why is __func__ not a string literal
 
we have so many dumb dialogs, we just want them to be "guessed" out of the existing c++ classes
 
user1804599
Now you can't say "foo: " __func__.
 
@elyse What... is it?
 
user1804599
It's a static local variable.
 
So now we can just piggyback on the existing classes and forget about making GUIs altogether
@edition If that's the most interesting thing about my code then it must suck badly Oo
 
@Mr.kbok No, no, no, no
 
No it's nice it's the first time I see this
 
@Mr.kbok I didn't say that your code was bad
 

« first day (1787 days earlier)      last day (3175 days later) »