« first day (1606 days earlier)      last day (3568 days later) » 

09:00
@sehe k
premature optimization question incoming: I have a function where I'm calling std::find_if (...) and using a lambda as my predicate. Is that slower than defining a separate predicate function? Is the lambda constructed dynamically every time the function is called?
@Cinch Yes. The other question is, is it moral?
@Pris No, and no.
@Pris It’s more likely to be optimized by the compiler than using a function.
user3010322
user3010322
WHAT IS EVEN GOING ON HERE
09:01
@milleniumbug The other question is what happens if you try to evaluate
user3010322
30% noise, and still MAX ACCURACY?
in a boolean comparison?
user3010322
I give up.
@LucDanton :21999494, ty
@ThePhD it's a picture of noise, like the caption says
user3010322
09:01
@sehe :v
user3010322
Presumably, accuracy shouldn't go up with more noise introducted,
user3010322
and presumably, it shouldn't all be 90+% accurate, unless I've done something godly with my Machine Learning algorithms that make them noise-resistant.
@Cinch The human1 == human2 gets replaced by human1.operator==(human2) or operator==(human1, human2) depending on how the operator== is defined (member or non-member)
user3010322
In which case, the fuck did I do to achieve that bullshit?
@milleniumbug Yeah I know
But does that mean (void == void) is true?
or rather, is void true false or something else?
09:03
@Cinch That would be the argument types, not the return type.
presumably, you can make sense of these axes. Even if I did, the layout is so crummy that it's hard to read off any accuracy at all (FWIW it should be a point / scatter plot, likely. There's so much "non-information" in the lines)
@ThePhD That's the question being begged
If you have void operator==(foo, bar); then you do f == b with appropriate types. And you get no results.
hm.
i wonder why Wrap != const Wrap&
if Wrap = object
I wrote a simple class to test my case
this doesn't compile
isn't Foo& == Foo when using operators?
That’s a member function with two parameters, together with the implicit *this parameter.
@Cinch error: overloaded 'operator==' must be a binary operator (has 3 parameters)
09:06
@milleniumbug what's the third?
also i heard somebody came up with some idea to use friend with operator overloads
friend ostream& operator<<() or something
No friend in your snippet.
@Cinch rhs is the third and lhs is the second.
@milleniumbug and the first is?...
@Cinch *this
foo?
oh...
I see.
Again, C++ proves to be hiding semantics from me.
09:07
You don’t know how member functions work? Start here before learning about operators, it’s a prerequisite.
@LucDanton I forgot about them
@Cinch It's a rite of passage. You'll be snarky like us about C++ in no time.
But that's not important right now
Apparently a huge part of my midterm is going to be operator overloading
@Cinch The website I gave you the link, will help you to understand operator overloading
09:09
@SmartDev I don't care about a website
I'm coding.
@Cinch You should learn it properly and then start coding. That will explain you why you should add friend.
@SmartDev I don't have time, you see.
But I think I get it now
It's to let the global operator functions evaluate the internals freely
@Cinch Yes. right
@SmartDev See? I don't have to spend all day reading 1000+ lines of text
Also hey I figured out my C++ tutorial sucks
6
I will commence whittling down the text and restructuring later
(It's me personal pet project for self-learning and community)
@Cinch Best of Luck for your project
09:15
@Cinch It's a fun thing. People who want to write don't have that much experience, and people who have experience don't have time to write one.
@milleniumbug Well I suppose I could be doing a good thing then?
Puppy seemed pretty pissed, though
@Cinch that seems to be the default state of puppy
@orlp Poor guy.
@thecoshman mhm. A vertex is all of its components.
you need to spare some more ram and copy them
@BartekBanachewicz that's what I thought.
09:17
How do I make the global function supercede the member?
Delete the member
Still working on that church scene! 2 out of 4 "boards" done! #wip #pixelart #voxel http://t.co/J5nymE2VKm
looks cool
@sehe this kills the member
yes. You haven't convinced me you need it
@BartekBanachewicz Oh my
09:19
void operator==
toplel
@orlp ... please
@sehe your precious screen estate?
no my precious taste and sensibilities
>
delete &Wrap::operator==(const Wrap&);
just kidding, but is there no way to make the global supercede the member in precedence?
as if that weren't obvious. decapitations are not considered appropriate in chat, ask the kitty!
READ A BOOK.
Thank me later.
Bye
09:21
@sehe NO SEHE YOU GOIN?! :(
Too much cra[pb]
@sehe if you go i will kill crab
@sehe and kitten
i'm perfectly fine with that. As long as you're not making people see it. In SFW chats
paging: cleanup in isle 9
OH SHIT
SEND HELP
@BartekBanachewicz Anyone remember this voxel style game that looked like this? I remember it had really neat water effects. I wanna say it was a kickstarter thing but I don't remember for sure
09:23
@orlp get a life.
@sehe this is my life
Xeo
Xeo
3 messages moved to bin
@orlp you're what?
Xeo
Xeo
In that case, your life just went into the trash.
@Xeo bin*
@Xeo /usr/bin/
09:24
Gee. You're really hitting a new low. Go home
@Cinch stop
why is that surprising?
Isn't "hello world\u1337" a string of literals in wide character format?
So why does it take all of the string rather than just the first character?
@Cinch string literal
09:27
@Cinch wat
@Cinch What is 'it' and 'take'?
@Cinch no
It is a single string literal consisting of a sequence of bytes. \u1337 spans multiple bytes so you have more than 12+1 bytes in there.
No wide characters.
@LightnessRacesinOrbit So it literally takes the entire string I gave it and then casts it.
Remember, C++ char and actual characters are orthogonal especially once you bring [multi-byte] encodings into it
@Cinch opens your code
@Cinch augh. you didn't say L"hello world\u1337"
That is a single wide-string literal consisting of a sequence of wchar_ts.
If I try to find an FaQ on {} vs () initialisation... am I wasting my time?
@Cinch go away, (int*) satan
the "A" is usually capitalised
@thecoshman Here's your FAQ: Q. Does {} suck? A. Yes, very.
@milleniumbug because it actually sucks, or you do?
@Cinch If you're being as unclear in your tutorial as you're unclear here, the future looks quite blank.
@thecoshman It sucks.
09:32
@thecoshman If you literally mean empty braces {}, then it’s fine. In fact they really are uniform.
@LightnessRacesinOrbit C++ seems to be vague with multi-char in general
boost::value_initialized<whatever> a;
Nobody wants to comment on wchar vs char16_t and char32_t and const char* and char* and char and etc.
@LucDanton no... I mean like struct foo{int a,b,c}; foo myFoo{a,b,c}; :S
@Cinch Everyone has the "RTFM" stance on this.
09:34
well... maybe not that simplistic... but like if you are using std::make_pair()
@thecoshman They’re problematic in a generic context, e.g. with return vector_type { foo, bar }; it is really hard to predict what constructor will be used. Outside of that, it’s fine.
@LucDanton what about for use with PODs?
@Griwes C++ just doesn't seem in a very good place to support int'l natively without more Boost-like libraries or special constructs like locales
@thecoshman Doesn’t make a difference.
Which is fine but interesting
09:37
@Cinch Yes. In fact I'll apply your own comment here: // dtor - seems highly appropriate
> more Boost-like libraries
Sorry. Your library is not boost like enough for our enterprise
If I have a vector<vector<int>> and I want to add an empty vector<int> element, what's a nice and succinct way to do that?
@LucDanton so gernally speaking, avoid them. unless I know I need to use them.
@Pris emplace_back(), resize(size()+1), push_back({}) etc.
09:39
@thecoshman I only avoid them in generic contexts (save for {}). Rest of the time it’s braces everywhere.
@Pris To which std::vector?
Which do you prefer?
@Cinch ...why is an OOP course starting from waterfall? Wtf.
@sehe I didn't know you could do an empty emplace_back... neat
@Cinch The only one that would be allowed in a statically typed language
@LucDanton what do you mean by 'generic' here?
09:40
> I Object-oriented programming is not just about programming! I It’s really about program organization. I It means that programs are constructed out of objects.
@Pris Why would that be an exception? I gather you didn't realize what emplace_back does
lol
Let's start from "it's not even about objects".
Horrible class.
Yup. /cue Isaha episode
@Griwes Hey, I'm taking the midterm tomorrow
> struct BankAccount { float balance; };
> float balance;
09:41
... I see objects floating
Terrible, terrible class.
@thecoshman If the type to construct is a type argument, and the construction arguments are type-dependent.
With a terrible, terrible teacher.
@Griwes It's a C -> C++ track btw
> float balance;
09:42
'Type-dependent' is probably overzealous but fuck figuring that stuff out. It’s a rule of thumb.
@LucDanton I think I get you...
@Cinch If you don't understand what is wrong with that... then you need to read something.
@Griwes Oh I remember this one.
@thecoshman std::vector is the canonical example of when things get really confusing. I’ll show you.
I skimmed over it but yeah I do know floating points can cause... problems.
09:43
> Three French sports personalities are among 10 killed in a helicopter crash in Argentina during the filming of TV show Dropped, officials confirm.
jesus
doesn't get much more tragically ironic than that
> Object Oriented Replacement of C Features: iostream, Dynamic allocation
lol
@LightnessRacesinOrbit ?
> Vladimir Putin has admitted for the first time that the plan to annex Crimea was ordered weeks before the referendum on self-determination.
Dammit - I was wrong about Putin
@LightnessRacesinOrbit Like "we don't give jack shit about the 7 other deads"
09:44
> ”Better C” Features of C++
This makes me sad :/
@Griwes They're coming from C and vi over SSH
be gentle
It doesn't matter.
I doubt any introduction-level education on C++ uses integrals for currency, even though they should
If someone is coming from C, the first step in learning C++ is unlearning C.
Plus, since when isn't there const arguments in C?
09:46
@Griwes ikr
Not adjusting the C++ introduction to be more like C (this is extremely, extremely wrong).
Since 1998!
or we can be Linus today, ya know.
@LucDanton please do
AA nearly here to unstick a handbrake
Why am I nervous
09:46
@Griwes Well he's done a good job of going over the concepts in class
...as if we already had programming exp.
and as if we were 3-year veterans of C.
@Cinch I don't believe you. :P
@Griwes Better than my C instructor.
I think this should be updated to swap C++0x to C++11... but there be a fair few questions... and not sure if all of what is being said applies if you take the approved C++11 and then consider C++14 and onwards...
I have to admit that neither are really easy to learn from.
I come from C as well and C++ is far far far from a "superset of C"
09:48
@Rerito yup.
It's like Super-C and beyond.
@thecoshman Do you think rvalues and lvalues are important for beginners?
@Cinch Err, not.
Anyway, my student years learnt me one thing. If you want to learn something well, purchase good books on that topic and hit them hard
@Cinch does that matteR?
@thecoshman yes, I am writing a tutorial for myself and fellow beginners
09:50
He still doesn't understand he shouldn't. sigh
@Griwes Yeah I remember
@Griwes Well hey nothing you say can stop me.
(I think.)
(Maybe you should try?)
@Cinch for beginners, not really. But that's not why I pointed out the need to update that question.
*values are a tricky business, but one that I think most beginners can gloss over
@thecoshman swap? Why wouldyou change c++11 back to c++0x :S
@Cinch We have a saying in Polish: only a cow doesn't change its mind. Not sure what is the proper English equivalent.
@thecoshman I don't really understad them myself
09:53
@Cinch bullets can
> swap C++0x to C++11
@sehe Depends where they hit.
I mean the question and answers
@thecoshman that's not what swap means :/
@sehe ¬_¬
09:54
You can "swap X out for Y". But even that is ...
Xeo
Xeo
Oh gawd, it's not just SO... salesforce.stackexchange.com/q/68728

« first day (1606 days earlier)      last day (3568 days later) »