« first day (1047 days earlier)      last day (3907 days later) » 

6:00 PM
In relation to stackoverflow.com/questions/18491341/…. Are inner classes in c++ static members as opposed to the runtime languages(default)?
 
@CaptainGiraffe it's not an inner class, it's a function-local-class. That's the problem :/
@CaptainGiraffe whenever I have no response, I post a kitten video: youtube.com/watch?v=3oem-M2tQU4
 
Image a particles update() method returns a bool. Which one would indicate its desired to be removed? (dead)
 
Return something meaningful.
 
Such as?
 
enum foo { success, remove_me, file_not_found }
 
@A.H. My eye is literally twitching
 
A PHP programmer who doesn't know shit about security?
Like, seriously, this is expected.
 
@CatPlusPlus :Maybe expected, but this was quite elegant, with the exec and the sudo already in place.
 
not giving random people root access is security now ?
 
6:13 PM
Yes.
 
good means the bar will be pretty low when I graduate
 
SAM
@Xeo I am 100 % agreed on that!
 
sweet, I managed to get a ticket for Gravity
 
… and of course he’s not the only one: github.com/…
 
6:15 PM
:php:
 
well, guys like these ensure our jobs are secure for the foreseeable future
 
@CatPlusPlus I only envision two states, more or less the first two. It isn't really handled to take any other input.
 
@Pawnguy7 Doesn't matter.
 
Is something wrong with php? or just people
 
Both.
And also the combination.
 
6:16 PM
Hrm... probably not a bad idea, and scales in case something comes up. I will do that.
 
It's not about scaling, it's about meaning.
 
That too.
 
bool update() is meaningless, because update is not intrinsically a query to which you can respond with yes/no.
 
@BartekBanachewicz Your coworker doesn't watch movies on his 23", does he? ;) I ordered an Asus 27" today.
 
6:18 PM
@CatPlusPlus false could mean "I don't wanna!!"
 
You can call it "named bool".
@FredOverflow It's ambiguous and not self-documenting and just ugh.
All that shitty PHP code reminds me that I wanted to read more about Active Directory and LDAP.
SSO systems are pretty fucking cool.
 
Ell
Hi guise
I have WiFi for the duration of a meal!
 
@Ell Did you get the extra large Coke?
@CatPlusPlus LDAP and AD are so last century. Now NSA has a subscription that can SSO any user on the Internet.
 
SAM
@Xeo What about this one? and this
 
Ell
I did :D
 
6:27 PM
New Humble Bundle now completely unrelated.
 
@KonradRudolph sadly that tells us nothing about that (troll) article :/
 
@sehe it gives me a nervous spasm
 
@not-rightfold She a naturist?
@KonradRudolph I don't think it works like that :/
 
@sehe it actually does
 
@FredOverflow Nice!
 
6:30 PM
When you see PHP code, assume it's insecure piece of shit. It's easier that way.
(And true in at least 99% of cases)
 
@JerryCoffin Why is this nice? Am I being left out from some great joke here?
 
@KonradRudolph you might want to (a) get more sleep (b) lay off the caffeine (c) see a doctor (d) all of the above
 
And also stop reading reddit.
I need a better Linux VM.
 
@CaptainGiraffe Not at all -- just that he was debating over 23 and 24 inch monitors yesterday, but is actually buying a 27" instead. Should be be really nice.
 
@StackedCrooked Wow
 
6:32 PM
@sehe At least (a) & (b) are definitely good advice today …
 
@MooingDuck hmm. have you used coliru before? He already does that.
 
@JerryCoffin He must have a really big desk, or a single monitor setup. 27" sounds expensive though.
 
No, he doesn't. He saves shared snippets, there's no cache for /compile.
 
@FredOverflow link please?
 
And cppreference links directly to the runner.
 
6:34 PM
@CatPlusPlus The cache also works for compile.
If the code was shared previously.
 
It's not very cachey.
You could save executables for some time.
But it'll be hard to do reliably with customisable command line.
 
hi
 
Yeah, the downside to full command line access is that I can't distinguish compilation and execution.
That's a bummer.
But that's how it is.
 
It might be a problem for scaling.
 
Preferably I'd like Coliru to stay small.
It's a hobby project after all.
 
6:40 PM
Too late for that.
Maybe a dropdown with available compilers and make the command line a template with holes for custom arguments.
Also an upside of knowing what's available.
 
Oh evening
Ok, so flash does sucks. Period.
 
I've experimented with lot's of ideas.
 
Evening.
 
@Jefffrey :lol:
 
Ell
I just noticed cppreference states all examples are compileable with Coliru
 
6:42 PM
lol
 
I'm sorry it took me 3 days to figure that out.
 
@Ell Yep :)
 
@Jefffrey You're even behind the Reddit crowd. You're bad and you should feel bad...
 
lol
 
@Jefffrey I told you that like 2 months ago.
 
6:44 PM
@CatPlusPlus yeah but at that moment I just stopped thinking about it.
 
@CatPlusPlus His mom told him that about 6 years ago, right after he was born.
I need to repent.
 
lol
 
@Jefffrey Yeah the red-eye really spoils the picture.
 
@StackedCrooked picture = icons from the adobe suit?
 
..?
Possibly.
 
SAM
6:49 PM
can anybody please tell me how to get latest g++ and clang versions on Ubuntu? Ubuntu repository is too late :(
Or would you guys suggest any other distro?
 
Then I don't know what you are talking about
 
@Jefffrey camera flash
 
It is a silly joke.
 
oh
 
@CatPlusPlus It's a joke, silly.
 
6:50 PM
@SAM Distro is not the problem, just fetch it from sources.
 
Since in the adobe suit, Flash is the only one to have a red icon I've immediately linked "red" to the icon :/
 
@R.MartinhoFernandes I like their cable management strategies :/
 
@SAM g++ compiles quite well with an older g++.
 
SAM
@CaptainGiraffe So shuold I compile the source and install it?
ok
 
@StackedCrooked lol
 
6:52 PM
@SAM yes
 
apt-get install -y python-software-properties
add-apt-repository ppa:ubuntu-toolchain-r/test
apt-get update
apt-get upgrade
apt-get install g++-4.7 g++-4.8 libstdc++-4.8-dev
 
SAM
@CaptainGiraffe @StackedCrooked Thanks friends !!
 
Copy paste from Coliru installer :P
 
SAM
(Y)
 
So, how 'bout that D.
 
6:56 PM
Non-games on Steam will never cease to be funny store.steampowered.com/app/227320
 
SAM
@CaptainGiraffe @StackedCrooked Should I remove my current installations of the compilers?
Or can I keep multiple versions without any conflicts?
 
@SAM I have had some troubles. Not sure how to advice.
 
SAM
OK then... I will uninstall the current ones
 
Hey guys
 
hey babe
 
6:59 PM
Just saw that cppreference has coliru integration now
that's awesome
 
wow
 
@kbok It's awesome :) Server is taking a big hit though :(
 
No wonder
 
I would have never thought coliru could have gotten this far :)
No offense
 
OMG I'm so offended.
Give me your IP so that I can ban it.
 
7:04 PM
@StackedCrooked Yeah, yesterday's been pretty hard.
 
@StackedCrooked 127.0.0.2
 
SAM
@StackedCrooked Have you written coliru ?
 
No, he willed it.
 
@SAM I hacked something together and named it Coliru. Yes.
 
BTW I'd like to make an install on my server, but I'm still waiting for either you or @sehe to write some docs about it
 
7:05 PM
@StackedCrooked lol
 
Dre
@Sta
... grr @StackedCrooked, how many times has someone broken out of your sandbox?
 
@Dre I don't know.
 
Ruby FTW though
 
There's more bash than Ruby in this.
(Also obligatory fuck Ruby)
 
@StackedCrooked, I bet you had an orgasm working with Ruby...
 
7:06 PM
@Dre If you know a way to break out of it then let me know so that I can fix it.
 
Typical. A guy makes a tool to compile and run stuff online and the first thing everyone asks is "But isn't that a security hole?"
 
Pff, I don't ask, I know.
 
@EtiennedeMartel Look at the comments of this question.
 
@CatPlusPlus, lol at the new "welcome message"
 
is it my ISP that's having problems with AWS or AWS that's having problems?
 
7:08 PM
YOUR ENTIRE SERVER IS CURRENTLY OPEN TO THE PUBLIC. I CAN RUN ANY COMMAND I WANT! — Stephen Jun 12 at 17:20
That is funny.
 
Large services have status monitors, just look at it.
 
except the page doesn't load.
hence why I'm asking people.
 
@zneak That's also a status.
 
Your running Linux stacked-crooked 3.2.0-24-virtual #39-Ubuntu SMP Mon May 21 18:44:18 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux — Stephen Jun 12 at 17:27
LOOK OUT I KNOW YOUR UNAME
 
@StackedCrooked Stephen's answer is also quite lulzy.
 
7:10 PM
(btw you should run grsec kernel)
 
yeah, but nobody else seems to be talking about it on the Interwebz, so I'm curious if it's my ISP that's having issues, or AWS that's having issues.
 
(I probably told you this a year ago or so)
 
I remember. It's on my todo list.
 
downforeverythingorjustme dot com
I don't actually remember the name.
everyone probably
 
SAM
Ok guys... time to bed...
 
7:18 PM
the past two nights around 3 AM my router disconnected from the internet, and refused to reconnect, saying my account data is invalid. then it started working again around 6-7...
 
Ell
What a noob that commenter is
Downforeveryoneorjustme
 
@SAM Who're you gonna bed?
 
Or isup.me
 
@sehe bedman!
 
7:30 PM
Bed busters!
@EtiennedeMartel He's just looking out for a MISGUIDED FELLOW DEVELOPER!!!!!!!!! Sorry for shouting
 
Gah, I can send mail from gmail using my university address, but I can't fetch it. The university's interface is so much worse.
 
Is there a way a template can accept only types derived from a base?
 
Plus gmail actually tells me when I get new messages so I don't miss things.
 
d⋅e ≡ 1 (mod φ(n))
why even bother, the right side is always 1, no?
 
@Pawnguy7 std::is_base_of
 
7:32 PM
> if you started with python, and learned C# you would be pretty good at most languages
True? Anyone?
 
@Jefffrey It's not true. It depends on whether or not the student is stupid.
3
 
Do you guys think that starting with C++ is a "good" idea?
 
@Jefffrey No. Every language has gotchas and idioms.
 
no, learn C first, it's THE best language.
 
@evening GTFO
 
7:35 PM
@evening bait?
 
truth hurts, bye
 
lol
 
lol bye
 
@evening I'm hurt :(
 
@chris Any runtime way?
 
7:37 PM
I feel like C++ has really helped me a lot at being a better programmer. But I can't put it into convincing words. Maybe I'm not convinced that much myself.
 
Maybe I should just make overloads. Hrm.
 
@Pawnguy7 If it's only accepting those types, why would it be runtime instead of using SFINAE?
 
@chris Not certain how.
 
@sehe I CAN'T HEAR YOU.
 
@Jefffrey Let me convince you. Ever since you've picked up C++, Jefffrey, you're programs have been better. A lot better.
 
7:43 PM
@Chemistpp Erm.
 
lolwat
 
If so, that has nothing to do with C++ itself.
 
not convincing enough?
@EtiennedeMartel The language lends itself to better structure for Jefffrey's programs. It just means he meshes well with the style of C++
 
@Chemistpp A::operator = ( const A& a){
 
Anyway, I'm just trolling the last 10 posts
 
7:45 PM
@Pawnguy7 typename = typename std::enable_if<std::is_base_of<Base, T>::value>::type
 
@Chemistpp I know.
 
That's how I interject into conversation.
probably not the most subtle
But it works.
 
Nobody fell for it.
 
@Chemistpp I'd just like to interject for a moment. What you're referring to as "subtle" is, in fact, GNU/subtle or as I've recently taken to calling it, GNU+subtle.
 
Xeo
Ugh, Coliru seems to be broken on mobile, or atleast the editor box doesn't make the virtual keyboard come up
 
7:47 PM
So it doesn't work.
 
@EtiennedeMartel you're conversing with me so the desired effects were achieved! BE MY FRIEND ETIENNE
 
That's not what "trolling" is. Try again.
 
@EtiennedeMartel I meant trolling as slowly scanning? Not as in I'm trying to get a rise out of you
well I guess you can't use trolling like that
trolling means dragging bait, so I lose
wait
I was baiting for conversation
not aggression
so it does work like this
 
Xeo
damn, I'd really like to run coliru from within vimtouch, but I don't have curl. :(
 
@Xeo there are many online C++ compilers. Why does corilu seem to dominate here?
 
7:54 PM
@Xeo How can you not have curl? an arduino?
 
@Chemistpp It is up to date and made by someone we know.
 
@Xeo Create a C++ program that can do HTTP POST.
Or download wget.exe or something.
 
Xeo
@CaptainGiraffe android, nexus 7
@Chemistpp Because it's made by our bretheren!
@StackedCrooked Well, I'd need to be able to compile on my Nexus first for that. See the problem? :P
 
@Xeo Well now I will always use it. :) Who made it, out of curiosity?
 
@Chemistpp @R.MartinhoFernandes did.
 
8:00 PM
@StackedCrooked Cool. I will use it from now on! And suggest it to others. It is actually quite nice to test things. Saves so much time in setting up each solution
 
Ell
Yeah,the robot is awesome.
 
@Chemistpp Yeah, I use it a lot too.
@Xeo Are you watching any anime current season?
I'm watching loads of them.
 
lol
 
@Ell Back from Spain?
 
@Xeo Silver Spoon, Servant x Servant, Blood Lad, The World God only Knows S3, Watashi wa motenai, Love Lab, Highschool DxD S2, Danganronpa. It's a good season IMO.
 
Ell
8:06 PM
@deadmg not yet, I'm setting off tomorrow driving
 
Xeo
@StackedCrooked lol
 
@Ell It's Alive! Alive!
 
Xeo
@StackedCrooked I'm actually watching... none. :s Too little time.
 
@Xeo Ce le vie
 
You can marathon them later then :P
@Chemistpp la
C'est la vie.
ce le vie, wtf.
 
8:08 PM
@StackedCrooked Shit. I never learned french.
 
Xeo
I can highly recommend watching Illya, though
 
Ce le vie isn't it?
C'est and ce are not different?
la*
 
@Chemistpp c'est is short for "ce est"
 
Oh
well then, @Xeo C'est la vie
 
@Xeo Right I started watching that. Btw, I'm also watching railgun.
 
Xeo
8:11 PM
nice
 
@StackedCrooked railgun. Link please
 
@StackedCrooked "Cela est", actually.
2
 
@EtiennedeMartel Sorry :(
 
Ell
But I'm just about to lose wifi
 
Ell
8:13 PM
Talk to you guys in a few days probably! :)
 
@EtiennedeMartel maybe in canada.
but I believe you
 
@Ell :(
 
Anyone know what happened to that Eiriyou guy?
 
Is iteration safe for removal during iteration?
 
Xeo
nobody knows what happens to anybody in here
 
8:24 PM
@Pawnguy7 general answer: no. Accurate answer: yes, but it's tricky and ugly.
@Pawnguy7 assuming I understood the question properly
 
What is the best method for removing while going over a collection? Normally I make a list of things I want to remove whilst going through, then do it afterwords.
 
@Chemistpp allows us to provide arguments, allows us to use stdin, and the textbox isn't absurd. I don't know another that has all three of those. Though Coliru recently became unstable, so....
@Pawnguy7 that's the best method
for(auto it=c.begin(), it!=c.end(); /*THIS AREA BLANK*/) {
    bool delete_this_one = false;
    //stuff
    if (delete_this_one) it = c.erase(it);
    else ++it;
}
 
@Chemistpp He got elected president of Malawi
@MooingDuck I'd say. check the container iterator invalidation rules. That's the only thing that matters
 
@sehe I... this method works on all containers to my knowledge
 
You can't know all (non)standard containers
 
8:30 PM
fair enough. This works on the standard containers, and ought to work on any sane container
 
@sehe It is part of the C++11 container interface requirement.
whether or not any particular non-standard container meets that requirement is another question.
 
@DeadMG That's an excellent point. Still doesn't cover non-standard :/
 
@DeadMG which all containers meet? (std::vector<bool>)
 
however, AFAIK the C++03 container requirements only specified void as a return for erase.
 
@DeadMG Ah. You type too fast
@MooingDuck All containers
 
8:30 PM
so it should fail to compile.
 
@sehe If he means "container" as it's defined in the standard, then he sort of can (i.e., he codes against the spec, and any non-standard container still has to meet the spec, or it's not a container).
 
ultimately, if you return an iterator from erase, it should be either valid or end().
 
@MooingDuck What about the erase and remove idiom?
 
@sehe Given that I don't know name origins very well, I cannot call you on this.
 
@sehe No, I typed multiple messages but there was some error with sending the first one and I had to retry.
 
8:31 PM
4 mins ago, by Mooing Duck
@Pawnguy7 that's the best method
 
@Tuntuni Frankly, it's not very good.
 
@DeadMG Lol. That happens to me sometimes. Maunly when I do post too fast and the first was pending throttling but I didn't notice
 
@MooingDuck Well, I don't see your example using it so I thought that example was to demonstrate another best method.
@DeadMG Why?
 
hmm
 
Lol, Howard Hinnant's chrono-Compatible Low-Level Date Algorithms proposal has an interesting opening line:
> The purpose of this paper is not to propose a date class.
 
8:33 PM
now that you say that, I actually really don't know.
it's more of a reflex that I had.
 
@DeadMG good, because my first thought was disagreement
 
@DeadMG lol
 
@DeadMG remove and erase is slightly harder to follow IMO, because one usually has to break up the code. lambdas remove that though.
 
@DeadMG Maybe it's related to the shrinktofit/swap-with-empty idiom?
 
@MooingDuck Yeah, I really hate how std::remove doesn't remove anything.
@sehe Nah, swap-with-empty is pretty bad, but I don't see anything idiomatic about shrink_to_fit, it's just a function you call.
 
8:35 PM
@DeadMG It removes my happiness.
 
@DeadMG The silly thing about shrink_to_fit, AFAIR, is that the implementation may still decide to do nothing at all?
 
@StackedCrooked aww. Don't use it then.
 
@sehe Yep.
 
@tinkertim You Are Doing It Wrong. Also, I didn't know that The Phantom Derpstorm upvoted people at all (kidding, prolly was someone else)
 
No time for Java^
And yes, that was a shameless steal from r/cpp.
 
8:41 PM
yup. stainless sheel
> "And we will keep compiling till the end"
Sadly too true
 
@chris Awww Bjarne is so shy :3
 
Xeo
gaaaah, a kingdom for stable wifi!
 
@sehe Well, there was that one interesting isocpp thing about changing code during the runtime of a GUI application that I even downloaded and tried.
And of course, there are other efforts as well.
 
@chris "that isocpp thing". You mean, a syndicated blog?
 
@sehe s/thing/entry/
 
8:44 PM
ah
 
I haven't even looked at that website for a long time now. I have an RSS feed instead.
 
Try a big C++ project one day. Then do several integration servers. Enjoy :/
@chris How extremely prolific and industrious of you. That nobody else has thought of that. Amazing!
 
@sehe :)
 
Does operator= normally return *this?
 
@Pawnguy7 almost always. or void
 
8:48 PM
Why not return this?
 
I seem to have made a mistaken. I meant to say, a reference to *this.
 
it's been a long time since i've worked with operators. Though if I say:

int a = b + c; Does operator= get called for a?
 
@Chemistpp why would you return a pointer to yourself?
 
@Chemistpp No, it's copy-constructed.
 
@Chemistpp if int had members, it would call int::int(const int& rhs) (copy constructor)
 
8:50 PM
@MooingDuck ah, ok.
 
@Pawnguy7 almost always. sometimes void.
@Chemistpp if it were int a; a=b+c;, then (if int had members) yes, it would call operator=.
 
Are posts that are just spam with no actual question flagged for low quality or other?
 
@chris in theory
 
Any idea if the standard guarantees it for default generated?
 
@Pawnguy7 yes it does. otherwise I would have heard of such
darn it my program now has 16 dependencies :( Was 3 when I started here.
 
8:52 PM
@MooingDuck Well, I mean which do I choose? The former suggests in the description that it has a question in there, but low quality seems appropriate.
 
@MooingDuck for which intstance though... because my thought was that if you return *this, maybe you are returning the address for the RHS (thus modiying b in c=b+a) but I guess this is not the case
 
@Chemistpp no. return this; would return a pointer. return *this; would return a reference or value. By default, it returns a reference.
 
Oh
heh
 
@Chemistpp operator+ should not return a reference, it should return a value.
wait....
"because my thought was that if you return *this, maybe you are returning the address for the RHS" What? I think I misunderstood this. WTF are you talking about?
 
Does assigning in the same statement as declaration call the copy constructor?
 
8:55 PM
@Pawnguy7 in the same statement as what?
 
@MooingDuck I think I have forgotten the symantics. If you do c=b+a. (and they are classes, not defined types) would operator= get called for c or the result of (b+a)?
 
Basically, assuming we have Something a, if Something b(a) calls the same function as Something b = a.
 
@Chemistpp .... operator= would be called on c, and passed the result of (b+a)...
@Chemistpp c.operator=(b.operator+(a));
@Pawnguy7 yes
 
that'd probably be moved since it's a temporary
 
@MooingDuck Yes, this is what i meant, but I don't know enough. (I was asking way back when, not asking rhetorically)
Thanks..
 

« first day (1047 days earlier)      last day (3907 days later) »