« first day (1119 days earlier)      last day (4055 days later) » 

00:00
date and time functions
<chrono>?
user1804599
Buffer overflow awaits.
I read Accelerated C++ plus two online C++ books and it isn't covered in any. However it is covered thoroughly in The C Programming Language Second Edition.
The only time thing I have used is time(0) for a random seed or whatever it was.
00:04
Looks like @LucDanton is making Eric Neibler do some serious thinking again. ericniebler.com/2013/11/07/input-iterators-vs-input-ranges
@rightfold Careful -- you're in serious danger of becoming (or at least being accused of being) a repwhore!
user1804599
@Pawnguy7 I use std::random_device()(). :)
@rightfold I do now.
I basically cloned the C#/Java Random.
I have no idea what it does, though.
user1804599
Use std::mt19937.
@JohnMerlino In C++98 and C++03 that was true. C++11 it isn't any more. Now C++ has date and time functions of its own, many of which are new and original, not based on the C library at all (though I believe some of them have been back-ported, so to speak, to C11).
@rightfold I think I used default, which on VS is twister I think.
user1804599
@JerryCoffin I am a repwhore.
@Pawnguy7 I vote for Blum-Blum-Shub as the default (slow, but safe--probably even if somebody decides to use it for crypto).
user1804599
@Yang You might want to do a double check before eval. :) — rightfold 7 secs ago
user1804599
Also fuck chat and comment oneboxing being broken if there’s a / before the #.
Question: for years I've tried to have at least one AMD and one Intel-based machine for development and testing. Is AMD still viable/competitive enough to bother continuing this?
00:17
For some reason it reminds me of @CatPlusPlus
Now it works for towers of height 9 :)
@Borgleader This in an extremely bad use of the meme.
What is the blue thing?
In fact, it's horrible.
I hate it.
@Griwes I know, it's awful. But it's 100% Cat++
user1804599
00:21
I am going to sleep!
user1804599
See you later.
@Pawnguy7 Karel :)
00:41
Heeeeeelo
Yellow.
I forget what that was from.
@Pawnguy7 Green.
That reminds me.
Why is it that mixing paint colors always seems to end up brown?
I recall that from the rare childhood moments I used paint.
Black actually.
Might be.
I suppose that would make sense then.
Or does it?
I don't know how paint works :\
Ack.
00:45
Have you done something with today, 'Guy?
MS Word, why are your outlines screwed up.
@Jefffrey of course not
Although.
>:(
@JerryCoffin, how you doin'? :)
4 hours ago, by StackedCrooked
If @Pawnguy7 wasn't confused about it, did it really happen?
Why don't you go and farm some reputation?
00:48
@Jefffrey Oh, pretty fair I guess. Been tired all day--I think I slept too much last night.
@Pawnguy7 Yes.
That is a thing?
@Jefffrey looks like no new commits
@JerryCoffin I think it's the weather. Everybody around me says the same thing. We are going into hibernation or something.
@Pawnguy7 Eh, tomorrow. Today I had to go to university and do other stuff.
@Jefffrey Could be--I guess @Sehe would know more about that than I do... :-)
01:15
@Jefffrey I thought two days ago it was tomorrow.
@Pawnguy7 lol, probably
I'm full of shit to do. Unfortunately.
I keep accumulating things :\
Keep getting stuck on stuff.
I hate it when the bank I am with give me stupid questions to select from as security questions
Seems to be true for at least half of the accounts I have ever made.
It is like making passwords need to have different characteristics.
If you force it, nobody is going to remember it.
I have 5 different passwords for 10+ accounts, lol
01:27
Perhaps the randomized passwords remembered for you thing isn't a bad idea.
All the password carry certain meaning for me & I hope for me only but we know it is not true >_<
Do we?
"MangoDonut" for the win.
Although.
Perhaps words are a bad idea.
@Pawnguy7 I usually try to include a string of at least 5 completely meaningless letters (e.g., "bqybw"). 5 characters by themselves aren't enough to withstand a concerted attack, but they're enough to render most dictionary attacks ineffective.
Good point.
One thing I have wondered though.
I have seen several places where you have a limited numbers of attempts, say 5.
I would think any attack wouldn't be very efficient with this, right?
Unless you have a botnet or something, and it allow that.
Well, not efficient, just... wouldn't work very quickly.
01:55
@JerryCoffin how does that work?
What the serious fuck?
I just watched "American Beauty" (1999).
and?
It screwed me over pretty badly. I don't even know what to say.
02:03
How so?
(I haven't seen it)
Plot sounds strange though.
@Jefffrey Oh, @Rapptz watch that too. You guys should have group therapy :P
It has pedopornography/adolescence/anger/happines/homosexuality/nazis/freedom/guns/phil‌​osophy all in one fucking film.
Oh.
That is interesting.
Nazis?
Also Kevin Spacey.
Should that name mean something to me?
02:05
@Pawnguy7 Yes
K-pax?
Also just look at this:
@Jefffrey You're looking for trouble, ish
dont onebox it, and tag nsfw
I had some serious trouble watching some of the takes.
02:06
I have no idea what I am looking at.
Or who the guy is.
@Borgleader It's the movie poster by the way.
@Pawnguy7 Does that... confuse you?
@Jefffrey The poor girl is nothing but skin and bones. Should eat more roses.
Yes.
02:07
@Jefffrey Eh, things have been binned and flagged for less
iirc anyway
@Borgleader it did a bit, yes
@Borgleader I know you are right grand master :)
I wanted to be a GM once...
Let's just say that movie is very far away from what I've expected.
That went kind of how programming went.
Just plateaued.
02:09
@Pawnguy7 GM?
General motors?
The chess variant.
Oh, "grand master".
I figured that would be implied because you had just said it.
@JerryCoffin So far I'm liking the outcome.
@Pawnguy7 I don't listen to what I say :S
02:10
Apparently not :D
How is this line:
> With history in mind and wisdom in hand, let’s make the world better.
Can wisdom be in hand? I am not sure.
A clichè (don't kill me @EtiennedeMartel, please)
The first part?
Every part of that phrase.
Probably.
I have been kind of braindead today.
And other days...
@Pawnguy7 Hmm. Do you realize it's a metaphor, right?
02:12
For this powerpoint on procedural generation.
I have "we can look forward as we generate the future"
Overemphasis for the win :D
I'm confused.
I'm definitely lost in your speech now.
@Jefffrey How dare you
I was infected.
@Jefffrey well yes. I was thinking, in your hand as a tool of sorts, to be used.
That... that... can spread? runs away
02:15
@Pawnguy7, I love you nonetheless.
@Borgleader Come closer...
@Pawnguy7 Well, metaphorically speaking, yes.
This is what happens when I am forced to think of things.
I was thinking...
People write because they want too, often.
Take virtually any article out there.
02:16
Just think that, with metaphors, it doesn't have to always make sense.
Well. It is an unlike comparison, sort of.
But it needs to make some kind of sense.
I cannot think of a metaphor which does not.
Actually, people will never tell your metaphor sucks, because they can't let others think that they might have failed to understand it.
Hrm.
Well in any case,it has definitely been used.
And as such, might not be suitable for premeditated expression.
02:21
@Pawnguy7 Usually you depend on getting a copy of the file of hashed passwords (for example) so you can get access to the correct data directly, not via the normal login mechanishm.
@JerryCoffin how do you get said file?
@JerryCoffin That's a nice article :3 I want to try his code now
@LucDanton So am I. Eric's obviously a really smart guy, but having somebody else (especially somebody like you who's already done some independent research/testing/work on the subject) just about has to improve results.
I'm making sure to share my findings on the list. Posting one bit already.
@Pawnguy7 Depends on the OS. It should normally be protected, but often isn't (at least as well as it should be).
02:30
@JerryCoffin are we talking about a web server?
This is interesting.
Mind sharing?
@Pawnguy7 Mind meld FTFY
@Pawnguy7 Typically wouldn't be the web server proper. Most often something like a LDAP server that the web server uses to authenticate users.
03:17
@Pawnguy7 The discussion that was going on with you and jerry was interesting.
03:27
@CatPlusPlus : thought you would love to read this
@Jefffrey passwords?
Why do dumb/weak people believe in fortune tellers?
I am agnostic
I neither believe nor disbelieve, but I am much in doubt of other people's strong beliefs
@User17 Churchill once said: "If you are young and you are not a liberal, you have no heart. If you are old and you are not a conservative, you have no brain."
I say: if you are an agnostic, you have no guts. If you are religious, you have no brains.
03:44
@Pawnguy7 yup
Oh. I had no idea what I was doing :D
@JerryCoffin Haha, I have guts, probably more than the amount of brain I have even though I did graduate with honours from one of the top universities here in Australia and in top 1% of national maths competitions. I am a VERY daring person ... just look at the amount of times I am trying to whoring the Stackoverflow moderators out :x
Well.
Once one of my cousin said my other cousin was domesticated, she was free range raised. I said I was free range raised too, she told me I was wild!
Everybody has a philosophy.
On how they live their life.
Yes?
Aw, nobody responded.
I lost my train of thought.
03:48
.
Also.
What do you mean by weak here?
What is it to be strong?
easily convinced by other people without thinking it through yourself
@Pawnguy7 I think it's arguable in quite a few cases. Quite a few people are so busy just getting up, going to work, etc., that they don't really have any time to think about a philosophy of life. In a way, that sort of reflects some sort of philosophy I suppose, but I'd say it's pretty weak reflection (at best).
and need for approval by other people
@User17 I would call that human nature
I mean.
If everybody you know told you you were worthless.
It is hard to not let that get to you.
Is it not?
03:51
that's why strong people are also likely to be assholes
Those traits do seem to come together, yes.
@JerryCoffin but most people don't really think when they have time either ...
@JerryCoffin This is true.
Though it makes one consider.
Of what purpose is such a life?
Well, you end up dead anyway :D
@User17 Undoubtedly true. Doesn't make a lot of difference either way though: whether because they can't or just don't care, I doubt that most people spent much time in deep thought about their philosophy of life.
but you can change your life if think it through ... through investment for example, through risk taking, through working differently
Not listening to investment gurus help too - use your own brain
03:58
What is interesting.
Is history undeniable has many of the same patterns.
But people are convinced it is going to be different.
With that, I bid you good night.
humans & ants are not so different
but I get sticks everytime I say this ...
@Pawnguy7 At least in my experience, happiness. When I think back on things, the happiest times of my life were mostly the times I didn't have enough time to think about such things.
@JerryCoffin Happiness can be quite physical thing - like alcohol, or runners high
@ScottW Yep.. never after 11:00 PM
They say happiness in intelligent people are the rarest thing to find, I beg to differ
04:02
@ScottW I told you, parental control ;)
so true
star time $
@ScottW Except for mood swingers. :)
@ScottW A large slice of the pie they are.
Also women.
I am bipolar hormonal woman, a tough asshole
although I am usually happier when left alone
04:33
@User17 what physical process or habit toughened your asshole?
repeated usage :x
Hey everybody, time for my hand-wavy drive-by question drop…
Trolling makes me happy - is there something wrong with me? :'(
@User17 Only if you contradict yourself and waste everyone's time. Yesterday you made a huge global warming denial by argument from authority of the masses, today you're an independent-minded agnostic who doesn't care what people think.
0
Q: Inheriting pseudo-traits idiom

PotatoswatterCatch-all traits classes like std::iterator_traits are useful by separating the properties of a type from its definition, so for example the properties may be made available before the definition is complete. Defining traits in addition to each client class itself is inconvenient, because the tr...

at least I am capable of thinking independently ...
04:39
I have a quadrupolar personality. Also magnetic.
We know you are a geek, but does your personality have to be a multiplier of 2 too? :'(
@MarkGarcia Is the typhoon sweeping across your area?
@Potatoswatter In your last situation, if the iterator is a class template then there's no escaping the need for a forward declaration.
Quadrupole magnets consist of groups of four magnets laid out so that in the planar multipole expansion of the field the dipole terms cancel and where the lowest significant terms in the field equations are quadrupole. Quadrupole magnets are useful as they create a magnetic field whose magnitude grows rapidly with the radial distance from its longitudinal axis. This is used in particle beam focusing. The simplest magnetic quadrupole is two identical bar magnets parallel to each other such that the north pole of one is next to the south of the other and vice versa. Such a configuration wo...
@User17 Yes, mostly in the central part of the country. Thankfully, our place isn't in the storm's path, though we're experiencing occasional rainfall.
@LucDanton Not sure what you're talking about. The forward declaration of the iterator class can occur inside the explicit declaration of its traits, using an elaborated-type-specifier.
04:45
template<>
struct iterator_traits< struct my_iterator >
@MarkGarcia good to know, hope you safe
Can you declare the partial specialization?
@User17 Thanks. :)
@LucDanton Yeah, declares the name my_iterator as an incomplete class and also the explicit specialization at the same time.
04:46
2 mins ago, by Luc Danton
@Potatoswatter In your last situation, if the iterator is a class template then there's no escaping the need for a forward declaration.
Class template.
@MarkGarcia Yeah, rain just started here about an hour ago. But the storm is supposed to stay to the south. I got plenty of pizza in the fridge, fortunately :).
@LucDanton Oh, gotcha. Technically the forward declaration happens the same either way. Putting it on a separate line isn't a big deal.
Not until you're allowed to partially specialize outside the original namespace (IIRC this is being talked about).
@Potatoswatter You're in Luzon?
> Wouldn't it be better if custom iterators looked like this?
My answer: no.
@LucDanton Yeah, I'm not sure if that's a good idea. At some point in the next few years I might have a change to vote against it :)
04:49
@Potatoswatter but you might not have electricity or gas ... what are you going to do with those frozen pizzas?
@LucDanton Feel free to answer. Do note that it's not really about iterators though, I should perhaps have made that more clear. They're just for the sake of illustration.
@User17 Not frozen.
Also, gas here isn't centralized, I have my own tank.
Doesn't change a thing. Everyone has their own namespaces to put their own things in, which won't be the namespace where your trait template is, and some people will want class templates.
you have a gas oven?
@Potatoswatter BTW, your messages in std-discussion always goes to my spam inbox. I don't know why.
@User17 Yes. Is it important? They're not frozen.
04:52
Here are the metrics by which your idea is worse: number of namespaces opened and closed (until, and if, the language is amended), number of forward declarations needed to associate a class template (or some of its specializations) with its traits, number of trait specializations opened.
@MarkGarcia The board interface sucks. IMAP sucks. Visit groups.google.com.
By the way, yes I'm in Luzon.
Why aren't you thanking me for worrying about your food quality :'(
@User17 In that case the correct response would have been "don't eat so much pizza"
@Potatoswatter Stay safe, both of us. :)
but then you would be starving
04:54
Come to think of it, I haven't written a trait class (as opposed to an individual trait) in a while. Takes too much work to make them play nicely with SFINAE. Then again some of my individual traits have silly implementations to provide useful defaults while still playing nice with SFINAE.
@LucDanton Well, in the general case when the traits need to be available before the class (or the inspected type isn't a class), the specialization and requisite namespace opening/closing needs to happen anyway.
but you don't eat pizza when it is frozen right?
@ScottW Frozen pizza is $(%(*$ hard. Effective troll: Only wipe the ice off and put it on your roommate's plate.
@ScottW You're more likely to swallow your teeth.
Nites.
later doggie
@Potatoswatter If you open the client class (or class template), you can write the defaults (e.g. put a using value_type = int; member). If you don't open the client class, then you can't inherit from the trait specialization so your scheme isn't applicable. I don't get what winnings there are.
04:58
@ScottW Good night.
@LucDanton What's "opening" a class? Either you're defining it or not.
Right.
The second strategy is using the traits as a base for the client.
The gist of it is I either define the client, or the partial specialization. Never both, unlike your scheme.
Um.
How do you make static and shared libraries with clang++?
Is it the same as g++?
04:59
Should be.
@LucDanton I need to define both.
Then the problem is with the trait class. std::iterator_traits does not have that issue.
I've been googling for a while and I can't find anything :s
And there's no partial specialization. I think you're going down a specific avenue and diverging from the general problem.
If you can't modify a type (i.e. it's closed), the mechanism of partial specialization is here for you to still provide a trait.
This is why there are trait classes to begin with.
05:01
@Rapptz Experiencing errors?
@MarkGarcia nope, I just want to support it for my meta build system thing but I have no idea if the syntax is the same or what
4 mins ago, by Luc Danton
@Potatoswatter If you open the client class (or class template), you can write the defaults (e.g. put a using value_type = int; member). If you don't open the client class, then you can't inherit from the trait specialization so your scheme isn't applicable. I don't get what winnings there are.
^ the terms "open" and "defaults" make no sense to me. Please elaborate.
@Rapptz I think it should be the same, though you'll only really know once you test it.
If open = define, of course the client class has to be defined or it wouldn't be very useful.
$ clang++ -fpic -c foo.cpp
$ clang++ -shared foo.o -o libfoo.so
$ clang++ main.cpp -L. -lfoo
@Rapptz First two lines is compiling the library proper, third is linking a complete program against it.
05:04
What I need is to have traits without having the client, i.e. it is still incomplete, or it may be a private member, or otherwise they are separate.
@LucDanton thanks
@Potatoswatter I can go struct iterator { using value_type = int; }; because the primary iterator_traits template using using value_type = typename T::value_type; as a default.
(And part of the argument for #2 is that such separation is inherently good, because description and implementation are different.)
Opening and closing refers to some languages where you can 'add' things to a preexisting type. You can't do that in C++, but it's still useful to mention in the context of 'I have this type that I can't modify but that I need to make compatible with some other things'.
@LucDanton But then use of iterator_traits is invalid before that iterator is defined.
05:06
@Potatoswatter For iterators, that doesn't matter. You can't use an incomplete iterator meaningfully.
17 mins ago, by Potatoswatter
@LucDanton Feel free to answer. Do note that it's not really about iterators though, I should perhaps have made that more clear. They're just for the sake of illustration.
Which means your question is flawed. This is not about 'writing traits like std::iterator_traits'.
@LucDanton Anyway that's untrue, you can use the traits of an incomplete iterator, which is really the whole point.
It's conceptually valid to ask for the value_type of foo_iterator even if you can't yet have a foo_iterator.
@Potatoswatter That's a bold claim.
@Potatoswatter It's not.
The template instantiation model of C++ doesn't allow for it.
Non-pathological cases need a complete client type at the point of instantiation.
And I don't mean just for the sake of the trait template, I mean for any useful bit of code.
@LucDanton Well, I happen to have a circular case where A needs a pointer to B and B needs to derive from A.
05:11
What you can do: write explicit specialization, forward declare client (A), use trait for client of client (B), derive from explicit specialization in implementation of A.
Hardly pathological. It's just a job for forward declaration. I need to separate resolution of the types from implementation of runtime algorithms, and that's perfectly fine.
I.e. another way to look at it: any explicit partial specialization is code that belongs with what it specializes for (here A), not what it specializes (i.e. doesn't belong with the rest of the trait).
@LucDanton So, what's the problem with my strategy #2: inherit from the explicit specialization?
So provide A (fully), or provide some aspects of it (fully), but you cannot both 'hide' A and all its aspects if you want to use them.
(Please don't say "explicit partial specialization," there is no such thing.)
05:13
@Potatoswatter You've put them side by side. They should be split.
@LucDanton What is side by side and should be split?
wtf
You wouldn't write a header with both an explicit specialization of the trait and a definition of the client.
@LucDanton Yes, I need certain traits of A to be used by B, and I need B to be complete because it is the base of A.
You would write a header with the specialization, mentioning the client, and implement the client wherever you want (inheriting from the specialization if you want to, that's a detail); or write just the client.
This all goes in one header.
05:15
5 mins ago, by Potatoswatter
@LucDanton Well, I happen to have a circular case where A needs a pointer to B and B needs to derive from A.
I misread that.
(I'm not being consistent with A and B; don't mind that.)
@Potatoswatter Regardless of traits you already have a burden of moving some things around then.
@LucDanton Yeah, well, I don't want to redesign this another time, so that's why I'm asking for arguments of elegance and style and best practices.
@Potatoswatter Declare client, implement traits, define client of client, define client, define members of either wherever?
05:18
@LucDanton Something like that.
@Potatoswatter I've always heard that the consensus for mutually recursive definitions is 'it's going to suck'.
@LucDanton Well, this is basically draft 3 of this mechanism. Drafts 1 and 2 worked fine, but it's always been a little convoluted. Adding genericity never relieved a headache.
@Potatoswatter Consider the trait specialization to be a 'refactoring' of some common functionality of both client and client of client: presumably the value_type (or whatever) is something that's part of both (although it could have some difference in meaning).
@Potatoswatter Is it an option to make one a nested class of the other? You can get away with lots of things thanks to some of the magic of class definitions.
@LucDanton The two aren't really peers, and there's actually a third class I haven't mentioned. None of this is simple by any stretch. It's elegant enough semantically, but I'm wondering how best to phrase it.
Might I suggest 'There would be nothing special to mention if not for the silly C compilation model'?
05:23
@LucDanton I thought about that, but you can't actually inherit from an enclosing class. I was a little surprised about that but it would have been an ugly design anyway.
Well, the magic is in the opening brace.
@LucDanton Not true, it's a genuine false dependency. The traits are metadata and it's OK to define them separately.
@LucDanton Is the language even specified lexically like that? No matter anyway.
@Potatoswatter I'm not 100% fine with that because it's complicated to model that imo. (E.g. orphan instances and things like that in Haskell.) That being said I don't think there's any easy solution, and possibly a solution that works for all use cases.
Sadly Ctrl-F 'opening brace' only finds one mention, for something else. Still though, it's actually more complicated than that :p E.g. struct foo { bar<sizeof(foo)> b; }; doesn't work, I would think.
Hiay guys :)
@LucDanton Oh, duh. The enclosing class isn't complete until after all member definitions are interpreted.
Anyhoo, I wasn't sad to see that alternative ruled out anyway :)
@GamesBrainiac Heyo
05:32
I'm afraid there are a lot of special bullet points and hand-waving to make decltype(auto) and the like work.
@Potatoswatter Hey! How ya been ?
@LucDanton It's the same for decltype and auto taken separately, so what did you expect?
No I meant auto some_member(foo, bar) -> decltype(things involving the class type);
decltype-for-expressions is straightforward and auto isn't an addition (barring silly initializer lists).

« first day (1119 days earlier)      last day (4055 days later) »