« first day (920 days earlier)      last day (4254 days later) » 

00:01
@MartinJames You're a multithreading specialist?
@EtiennedeMartel hear about this?
@Pawnguy7 Nothing of much interest.
His top tag is multithreading.
@Borgleader Yep.
But please don't use the Sun. They are assholes.
That's the one that popped up on my FB newsfeed. I don't usually (aka never) read them.
Goddamn. Do any colleges offer 3D modeling courses?
00:04
Centre NAD does :P (better learn french though)
I always wanted to go to back to France hah, nice place
... It's in Montreal (Canada) you nub <3
@ScottW Awww c'mon cupcake, you know you love us
@ScottW take your clothes off
@Borgleader I went to Canada to see UneXpecT in concert once
@ScottW You manly person.
> Microsoft Xbox 360® Controller for Windows® (or equivalent) is strongly recommended.
I guess I'll have to buy a 360 controller then.
user142019
00:23
Ruby is awesome.
For moving objects, am I correct in thinking that it is as if... basically, the same memory is kept as is, but the... let's say object we just declared, now... refers to it?
user142019
Ruby laughs at Haskell's filter (`elem` [3..8]) xs with xs.grep(3..8).
@EtiennedeMartel What for?
what's a good show on Netflix?
00:39
Fringe, Top Gear UK, The IT Crowd, Stargate, ... (I only have access to the canadian library which is severely gimped compared to the US one)
hmmm
now downloading Castle at ... 1kbs
@Crowz House of Cards.
@EtiennedeMartel Dark Souls? :DDD
user142019
TIL: dinosaurs eat gems.
@Zoidberg Maybe gems eat dinosaurs.
user142019
00:47
Gems don't have mouths.
@Zoidberg How do you know? Maybe they're just scared of people, so they don't open their mouths near us.
user142019
Gems are inanimate.
@Zoidberg They're not dead -- they just move very slowly!
@ThePhD It's tomorrow but thanks :)
@JerryCoffin Glass actually moves incredibly slowly.
It's a really, really, really, really, REALLY viscuous liquid.
If you go to a really old house and look at the windows, they're thicker near the bottoms than the top, because the glass is slowly "melting" down.
01:01
@ThePhD Yes
<333
Oh my god you me and Cat can play together. <3
user1357851
I am going to another day of painting - to help my parents out of their new house, lol
I'm being the mage!
user1357851
We are the bunch of people who can afford to buy/build houses but no $ to pay for painters, so have to do it ourselves
@ThePhD Long-since debunked. They're thicker at the bottom because glass plates were molded centrifugally, which resulted in slightly thicker glass at the outside than the inside (and glass cutters were smart enough to put thicker at the bottom than the top).
01:03
"The =default; part instructs the compiler to generate the default implementation for the function. Defaulted functions have two advantages: They are more efficient than manual implementations, and they rid the programmer from the chore of defining those functions manually."

Why is this more efficient than not defining them at all?
Oh.
Aww. =[
@Pawnguy7 It's explicit semantics.
@Pawnguy7 Because the compiler-generated version maintains itself when you change the class.
struct DoNotCopy { BigHonkinData data; } // Nothing to tell the compiler not to make a copy constructor by itself
and the performance is superior to a user-written copy constructor
@DeadMG an empty one, even?
01:05
an empty copy constructor is useless
@Pawnguy7 If (for example) you define an X::X(int), the compiler will no longer automatically generate X::X() -- but if you specify =default;, then it will again.
user1357851
I actualy love doing house renovations - same way I love wild lifes, hiking, ocean swim and food, trading shares, doing property investment ... & making apps. I like to do so many things, I am absolutely good at nothing. Thus rejected by all the professions by every profession.
user1357851
Time for my ice mocha, then a bit coding followed by ... painting :x
I understand that, I was just wondering, why, for example, these are different:

private:
X::X() {}

X::X() = default
the second is trivially default constructible if it's members and bases also are
the first is not
in the general case, the compiler can prove, given the definition of X and the =default; constructor, the trivialness or not of the default constructor.
for a user-defined constructor, the compiler cannot.
01:08
Ah.
having various functions be trivial enables optimizations on the assembly level
especially copy constructor and destructor
but the maintainability aspect is more important, I believe
@DomagojPandža yeah and it's awesome :D
Given that there are no performance issues (no optimization is needed), is = default or unspecified preferred?
well, they're not really the same, since unspecified does not always mean the compiler will generate one
whereas =default does.
4 mins ago, by Jerry Coffin
@Pawnguy7 If (for example) you define an X::X(int), the compiler will no longer automatically generate X::X() -- but if you specify =default;, then it will again.
@Pawnguy7 The case you mentioned earlier of an empty copy ctor is not only useless -- it could hurt efficiency. The compiler will only generate a move ctor if there's no user-declared copy ctor. An =default; can keep the compiler generated move ctor, but explicitly defining one will prevent it -- even if it actually does the same as what the compiler would have generated.
01:17
@DomagojPandža: idk when you'll get this, but I was going through one of the power points from crytek and they seemed to mention that their deferred lighting solution suffered from light leakage and that they had to have the artists place blocking volumes around the levels to fix that. I was wondering if instead it could be fixed using shadow volumes projected from the camera & carmack's reverse?
01:36
I am confused about variadic templates.
How would you use them inside a class?
you'd hardly be the first
variadic templates and classes have no more interaction than non-variadic templates and classes
user1357851
I started my day happy ... until I started working on my app & when I press 'run', it crashed - instantly dropped into a hude piece of ice
The ellipses I used to know all had the same type.
huh?
va_list weren't required to have the same type
variadic arguments and variadic templates are not really related mechanically at all
01:39
When I was learning variadic templates Xeo told me to write something that takes the sum of the template parameters
user142019
Variadic arguments are an ugly hack.
Taking just variadic templates.
How would you use them within a class?
what the hell are you even talking about
it's the same as non-variadic templates.
user142019
That's an overly ambiguous question.
user142019
How would you use variables within a class?
user142019
01:43
How would you eat within Europe?
2
Hello, World!
Like... say we have template <typename ... arguments>
okay.
Normally, I might have, for example, void doStuff(T t) {}
But... is arguments an array? How would I use it?
void doStuff(arguments&&... args)?
user142019
01:45
user142019
Because hey, who doesn't like to sleep with trees?
user142019
@Pawnguy7 depends on what you want to do with it.
I still don't know what he's asking
user142019
If you need to iterate them, you use template recursion.
user142019
You can also expand them to an array if you want:
user142019
01:47
template<typename... Args>
int sum(Args... args) {
    int[] xs = { args... };
    return std::accumulate(std::begin(xs), std::end(xs), 0);
}
user142019
Assuming they're all ints. :v
@zoid wtf is up with your new gravatar? That's not a zoidberg!
user142019
It's a pony!
In fact, what girly cartoon is that from?
as in My Little Ponies?
Ok, I officially don't get it. What are variadtic arguments? I didn't see those before.
01:50
you don't wanna know
you mean va_list?
they're a C holdover
That stuff is garbage
Oh. Nothing new?
and awful even by C's standards
which is really saying something
user142019
01:51
@Pawnguy7 it's what printf uses.
user142019
You hardly ever need them in C++.
user142019
Aka never.
I was under the impression it was something else. I just heard it "varargs", not variadic.
user142019
Maybe if you're doing some very low level shit but it's very unlikely.
variadic arguments are from C.
variadic templates are from C++
01:52
Ah.
I was recommended to not touch the arguments, and I never did.
user142019
From D. :v
lol
Nice that you can use what one might consider its useful purpose, though. In exception handling. ("gotta catch em all")
Those are ellipsis.
user142019
catch (...) is completely unrelated to variadic arguments and variadic templates.
01:53
Are they not the same thing?
user142019
... has a thousand different meanings.
No, like, I thought that used to be used - the same one as varargs - to catch any exceptions.
a thousand?
can you list them all? =p
user142019
Variadic template, pack expansion, catch all, variadic arguments, sizeof....
user142019
01:54
Okay, five. :P
@Zoidberg There are uses for them in C++.
user142019
@JerryCoffin I know but it's rare.
@Zoidberg And trailing off at the end of an SO chat message...
@Zoidberg Not all that rare. They work nicely as a last-chance match anything (but worse match than anything else) type for overloaded functions (but note, you never plan on actually receiving any arguments this way).
user1357851
Unicorn meat, yum yum yum!
user142019
01:57
And why wouldn't variadic templates work there?
Is it me, or does the standard library use a bunch of templated things? :\ I don't get why there are so many templates. Not sure why, but I read them terribly.
user1357851
Grilled unicorn meat served with gravy, butter potato & veges
@Pawnguy7 here's a crappy example. coliru.stacked-crooked.com/…
user142019
@Rapptz array size can be inferred.
I know but it shows sizeof...(args)
user142019
01:58
Ah. :P
@Zoidberg How would you use them as function overloads?
user142019
void foo(int a, int b);
void foo(double a, double b);
template<typename... Args> void foo(int a, int b, Args&&...);
user142019
? :v
Wait, was it pawnguy that had trouble with recursion?
Good morning.
02:04
I get why templates are good for collections, but...
std::uniform_int_distribution<int> distribution(1,6);
Why is ^ templated?
user142019
Because you may want a distribution on long or long long or short.
user142019
Or maybe even char if that works.
uh, short?
Oh. The int in the name was a bit misleading :\
@Pawnguy7 There's many numeric types, you know.
user142019
02:05
@Pawnguy7 integral would've been better but it's so long already!
@Pawnguy7 Integer: short int, int, long int...
@Zoidberg Why... You're now a full-fledged pony.
Why do you think I find reading templates so bad?
You learned from a bad book?
I learned how they work, but...
@Pawnguy7 You just ain't that used to the standard library?
02:10
@MarkGarcia Very, but... it seems to many any fancy C++ stuff, whether it is rvalue references, a bunch of templates, and that stuff.
@Pawnguy7 These are all fancy things. Fancy but useful.
@MarkGarcia I would say that, yes. I just don't get why I have such trouble with them. Either that, or I think of it as a "oh, my, a wall of text, I can never read that", and so fail before I start. Maybe I just need to take time and look at it.
I think it looks cool, but that's just me.
@Pawnguy7 One advice: start using std::vectors instead of plain-old arrays.
@Pawnguy7 That's how most should start familiarizing the library, in my experience.
Theres an example. I don't get why you need iterators. It seems a mess. I simply want to access things, I don't want iterators, but no...
02:16
To iterate on things
I used for loops for that.
No iterators required.
Both indices and pointers are very specific models of an iterator
@Pawnguy7 Iterators (in STL) are mostly used to iterate containers without the need of knowing what kind of containers they are.
Iterators are a generalisation
They don't have to be backed by a container
They can generate things on fly, or be sinks
Like std::ostream_iterator
How'd you learn C++?
02:20
Not using much of the standard library :D
And I do not understand your explanations, unfortunately.
If you iterate without knowing what kind of container it is... what would you do with the elements?
It's not relevant
Iterator knows what kind of container it is and how to access the element it's pointing at
user142019
@Rapptz Not at all. (Y)
Client code just gets elements
@Zoidberg Buttcrack.
user142019
I love crack!
user142019
02:22
And butts!
Abstraction is a process by which concepts are derived from the usage and classification of literal ("real" or "concrete") concepts, first principles, or other methods. "An abstraction" is the product of this process – a concept that acts as a super-categorical noun for all subordinate concepts, and connects any related concepts as a group, field, or category. Abstractions may be formed by reducing the information content of a concept or an observable phenomenon, typically to retain only information which is relevant for a particular purpose. For example, abstracting a leather socce...
@CatPlusPlus what would you do with said elements?
user142019
@CatPlusPlus that picture is great.
@Pawnguy7 Whatever you want?
@CatPlusPlus lol, random cat
02:23
You're not gonna get far programming if you don't understand the concept of abstraction
just go on cppreference if you need a reference :S
@CatPlusPlus WTF. An abstracted cat?
I can't speak for the tutorial part though. I just remember the first edition basically being a reference.
Get maths and compsci 101 books or something
user1357851
02:25
Abstraction is when you build the structure for a bigger cat, you don't know which of the following cat your implementation team will come up with:
user1357851
Oh shiiiiiit.
SHIIIIIIIIIT
@CatPlusPlus I get the idea of abstractions, but iterators to me seem sort of like the java library: a bunch of needless things, when all I really want is one simple thing, but it makes me jump through extra hoops.
SHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIT
@Pawnguy7 What hoops
02:27
In C++ or Java?
Client side of iterators is literally trivial
You dereference it to get the element and increment it to get to the new one
Let's say I want something from a vector.
All I want is to be able to go vector.at(int index).
@EtiennedeMartel Oh shit that's cool /cc @ThePhD
@Pawnguy7 "Hey vector, gimme that!"
And how do you iterate on all elements?
02:28
Now it is like... vector.at(index + vector.begin())
What
No it's not
@Pawnguy7 wut
.at() and [] take indices
But hey what's this
Maybe it was a list, I don't remember.
@Rapptz FFUUUUUU
SMOOOTH MCGROOOOOOOOOOOOOOOOOOOOOVE
02:29
for (size_t idx = 0; idx < vector.size(); ++idx) { vector[idx]; } // hi iterators
He is so doing my video game music.
Now replace vector with a container that doesn't have random access operator
Guile's Theme?!
@CatPlusPlus this looks like normal access to me
@CatPlusPlus why does it not have said operator?
@Rapptz The theme that goes with everything.
02:30
It's a very specialised iterator kindof
@ThePhD Better send an email.
oh my god how did I miss this one
@Pawnguy7 Because random access is not feasible for all data structures?
Or just plain doesn't make sense, e.g. in trees
@Rapptz I'm currently listening to Spark Mandrill's theme.
@CatPlusPlus in terms of performance?
02:31
I'm new to git. i just did a git pull and somebody made a code change which i now have. waht command can i run to see what changed between what i last had and what i now have?
@EtiennedeMartel I will, after I finish making the 2d game I'm working on
You still might want to iterate on all tree elements
And hey there's even more than one way to do it!
@Pawnguy7 Oh you.
Tee hee.
Pawnguy feels like he's a regular now. <3
02:31
Apr 19 at 13:25, by kbok
Welcome to your new favourite place! Please read the newbie hints so that you can feel at home.
Iterators are a generalisation
either that or I was using a list for random access... that might be it.
list doesn't have random access
@ThePhD If I didn't, somebody would. Anyway. Also, in this case, I don't know a thing about git, so I cannot help either.
A generalisation (or generalization) of a concept is an extension of the concept to less-specific criteria. It is a foundational element of logic and human reasoning. Generalizations posit the existence of a domain or set of elements, as well as one or more common characteristics shared by those elements. As such, it is the essential basis of all valid deductive inferences. The process of verification is necessary to determine whether a generalization holds true for any given situation. The concept of generalization has broad application in many related disciplines, sometimes having a ...
02:33
Hm. Well, I am going to blog about how much I don't know C++.
Iterator concept is not specific to C++
@Pawnguy7 Aw. Don't be. We all have experienced utter ignorance.
Well, C# lists have random access, so I claim that I was misled.
.NET's List is std::vector
Does .NET have a C++-list implementation?
user142019
02:35
std::list is a linked list.
LinkedList
But you don't need linked lists
Most of the time
Come to think of it, why is it called vector?
02:36
@Pawnguy7 Something mathematical...
No, it's not mathematical
Well, I think one definition is something with a magnitude and direction... Does a collection have a direction?
@CatPlusPlus I thought it was...
@Pawnguy7 Forward and backward. 1D directions.
Ordered contiguous list of elements in maths is a tuple :v:
I don't remember why it's a vector but hey now it's a compsci term get used to it
@MarkGarcia vector mostly comes from physics.
user142019
02:39
@Pawnguy7 because vector is a the term for one-dimensional array.
user142019
But only who the fuck knows why.
You can represent a "physics vector" as a 1-dimensional array of numbers, so...
@JerryCoffin Trigonometry also has the concept of direction and magnitude.
Not sure why 2D is called a matrix either, but I got to admit, it sounds cool.
@CatPlusPlus std::vector<R> of size n <=> R ^n
02:40
Morning
@Pawnguy7 Just because it's a movie...
I have not seen those.
2D arrays and matrices are different beasts
@MarkGarcia It does, but rarely represents it as a 1-dimensional array.
I suppose. Although in that case it must have carried over somewhere.
02:41
@LucDanton So a tuple :P
I AM BEING SUMMONED
JOOOOLLLYY COOPERATION
@JerryCoffin Then it seems that my teacher had taught us well by going from 1D to pre-3D concepts.
@CatPlusPlus I don't disagree here.
user142019
And maybe they choose the term "vector" instead of "array" because arrays were already something else in C++.
@Zoidberg And the term "array" is somehow generalized.
user142019
02:44
Array is a general term.
@LucDanton std::vector modifiers such as push_back aren't endomorphisms, so you're projecting or restricting vectors to other dimensional spaces the whole time. Also they don't provide any scalar multiplication or anything else at all and don't require the elements T to build a proper field.
user142019
It's an ordered contiguous list of objects.
And vector spaces are usually over a field.
Array and a vector is the same term in compsci context
Wow, look at us being all mathematically pedantic~
02:45
@Zoidberg "Ordered"?
Yes it's ordered
There's an order
user142019
@MarkGarcia yes arrays are ordered.
user142019
Unlike unordered sets or sets in mathematics.
user142019
Or hash tables.
user142019
02:46
Don't confuse "ordered" with "sorted" because that's something completely different.
Maybe let's say that it's mostly whether order matters
Pfftt.. what does that guy know. I've never even heard of this "Bjarne Stroustrup" person. — Calvin Apr 17 '09 at 0:35
Two sets with same elements in a different order are equal
Two vectors with same elements in different order are not equal
user142019
@EtiennedeMartel I love the sarcasm in that one.
user142019
@CatPlusPlus "different order", but… but…
user142019
02:48
Sets have no order. :D
@LucDanton I just woke up after too little sleep because the autobahn is too loud, and that was the first thing that came into my mind. :P
{1, 2, 3}
There's an order
It doesn't matter and can be changed on a whim but there you go
@Zeta You need coffee!
Don't have any, and the next store in a reasonable distance opens in 3 hours. After all it's 4:50 am here.
insomnia causes me to have nightmares, the nightmares keep me from sleeping and is in turn causing me to have insomnia. I can't stress enough how beautiful this circle of mental destruction is
user142019
02:49
{ x | x ∈ R && x mod 2 = 0 } tell me the order.
@Zeta Tea?
Neither. But I guess a shower should be enough, brb
@Zoidberg The same as in R
user142019
Tell me the order of R.
C++11 was first C++08 right?
02:52
C++0x
Grrr.
R has total ordering
@Rapptz I thought that was after the date got changed from 2008
Trying to write up how to queue work is tougher than I thought...
0, things, 1, things, 2, things, 3, things
And in the other direction
user142019
02:53
OIC TIL
who cares about order when we got defined behaviour and UB?
More summoning~!
In mathematics, a linear order, total order, simple order, or (non-strict) ordering is a binary relation (here denoted by infix ≤) on some set X. Such a relation is transitive, antisymmetric, and total. A set paired with a total order is called a totally ordered set, a linearly ordered set, a simply ordered set, or a chain. If X is totally ordered under ≤, then the following statements hold for all a, b and c in X: : If a ≤ b and b ≤ a then a = b (antisymmetry); : If a ≤ b and b ≤ c then a ≤ c (transitivity); : a ≤ b or b ≤ a (totality). Antisymmetry eliminates uncertain cases when ...
user142019
Thank you @CatPlusPlus for teaching me so much.
user142019
You're the best teacher ever.
user142019
02:54
Stupid Dutch language which uses same word for "learn" and "teach". :v
Eh I'm not sure on terminology itt really but hey it's 5AM and I just woke up
user142019
Oh it's also fine in English. :v TIL
user142019
It's 5 AM? Holy shit.
user142019
I taught it was like 2 AM LOL.
You can't words
02:56
Untie, bad spellers.
Damn.
std::bind can't do what I need it to do. =[
What do you need it to do
user142019
I'm watching a show with blue and yellow pegasi.
bind eliminates all of the arguments of a function call if you don't use placeholders (e.g., _1, _2, _3)
user142019
@ThePhD lambdatime.
But, it seems not to eliminate the return type.
user142019
02:59
Oh.
So I can't make a std::vector<std::function<void()>> work;, because the return type for each std::bind will depend on the function passed into the Queue function itself.
user142019
[=] { std::bind(…); }

« first day (920 days earlier)      last day (4254 days later) »