« first day (1722 days earlier)      last day (3228 days later) » 

8:00 AM
@Xeo but & at the beginning and alone says it captures everything by reference
if i remember correctly
 
Xeo
@VermillionAzure Everything not named as a capture
it's for implicit captures
explicit captures override that
 
> [&, &i]{ }; // error: i preceded by & when & is the default
 
drop the redundant [&,
 
Xeo
okay, let's start again
 
it's not that hard m8
 
Xeo
8:02 AM
You can do either [&, var] or [=, &var] to specify defaults and explicits
 
either do [&] or do [&stuff, &other].
 
[&] or bust
 
Xeo
@nabijaczleweli depends :P
 
ahhhh
implicit capture.
 
Xeo
if I want copies, that indeed goes "bust"
 
8:03 AM
Why would you want copies, though?
 
Xeo
Because the variables I capture only exist in that scope?
there's many reasons
@VermillionAzure Yes. The default ([&] or [=]) defines how you want to capture variables that are named in the body of the lambda. You can then exclude specific variables from that (or add variables that aren't named) through [..., var] or [..., &var]
 
Hmmm, if your lambda leaves its scope with variables, I guess that's a good point
 
Xeo
And of course there's the generalised lambda captures now
 
@Xeo interesting
 
Xeo
@nabijaczleweli Not the only reason, though.
Copying may be wanted even if the variables stay in scope, if you want to capture a specific value (that may change after the lambda was created)
 
8:06 AM
@Xeo cough cough CLOSURES cough cough
 
Xeo
@VermillionAzure Lambdas.
 
@Xeo oh where's rightfold when you need xim?
 
Xeo
you can't have general closures that don't need you to specify anything in C++ because of lifetimes.
 
Generalized captures look interesting
 
meh
at least C++ is better than C
i tried to look upon the GNU make source code
 
8:09 AM
@VermillionAzure rip your sanity
 
@nabijaczleweli it's so hideous...
macros everywhere for compatibility and options
random comments about systems...
 
Xeo
@nabijaczleweli They're awesome!
 
It's like they had no documentation or something for the actual code. Like, do they have doxygen for that?
 
Xeo
Mainly because they finally allow move-captures
But also because you can just stuff in anything you want
 
@Xeo which is nice
also...
why do I feel like fold expressions feel a lot like Lisp?
reminds me of car
it's like... C++ and Lisp are becoming one... together... in a fiery, coldly reminiscent embrace
 
Xeo
8:21 AM
@VermillionAzure They feel like functional programming vOv
 
8:34 AM
oh my god
OH MY GOODD ABI CHANGES NOOOOOOOOO
 
@VermillionAzure lol, what?
 
@wilx wait a sec
nvm
fuck GNU make
ugh
just ugh
on the other hand, I found the macro to turn the new ABI off...
 
@VermillionAzure inb4 flag
 
I'm wondering.. if I have a priority_queue.. how do I get the result of the heapsort?
:3
these adaptors are so limited.. I can make_heap and then sort_heap on a vector, but via the adaptor... nope
 
user1804599
You are confusing priority queue which is an abstract data type with heap sort which is an algorithm.
 
user1804599
8:49 AM
Algorithms are but implementation details of abstract data types.
 
no I'm not. I'm trying to get a heapsort out of a heap.
 
user1804599
If you want to deal with heaps, use heaps directly, not something that happens to use a heap as an implementation detail.
 
I'm not asking for a priority_queue::heapsort()
that is nonsense
 
The entire point of priority queues is to be presorted by priority
idk what you're trying to do here
 
user1804599
@MarcoA. then it's an incredibly retarded API
 
user1804599
8:51 AM
It should be called heap_based_priority_queue then.
 
priority_queue uses make_heap internally hth
The order you're getting the elements is the heap order
 
uhm probably because sort_heap does the sorting in-place, and having sort_heap(my_priority_queue) would destroy the semantic of the container in the first place
right?
 
It's also unnecessary, because being heap-sorted is the goddamn invariant of priority_queue
 
user1804599
Also I don't see any heapsort method on en.cppreference.com/w/cpp/container/priority_queue.
 
Agreed. It is by design. I'll just stick with a vector instead.
 
8:52 AM
@rightfold You're bad at reading
@MarcoA. You too
 
cats can't read
 
You don't have to call sort_heap because you can just iterate on priority_queue and get the exact same thing
It maintains that order at all times
 
Xeo
You can't iterate on priority_queue
 
I can't do that (lol)
 
@Xeo lol cplusplus
 
Xeo
8:53 AM
:D
 
well I might pop off the highest/lowest element each time
 
BaseSystem base_system("SDL_Test!", 1280, 720, SDL_WINDOW_OPENGL);
  TexturePool tp(base_system.get_renderer());
  tp.load_texture("circle.png");
beautiful.
 
user1804599
You can subclass it and expose the begin and end functions of c.
 
The fuck is BaseSystem
 
@CatPlusPlus Shhhh...
 
user1804599
8:54 AM
Protected is the worst access specifier ever.
 
Xeo
BassSystem
 
It's all right now...
But to be serious
it's the RAII version of everything I need for SDL
 
It's seriously bad name
 
Xeo
You suck at naming
 
Whatever
it's technically my first real C++ project
 
8:55 AM
Also you don't have to call SDL_Quit
 
@CatPlusPlus ...
why not?
what if I want to restart SDL?
 
That's probably not supported anyway
Also dumb
 
user1804599
lol global variables
 
Also for the same reason you don't have to free resources when you exit, you're not using anything OS can't tear down itself
 
@CatPlusPlus You're overlooking a few things.
 
8:56 AM
_exit or bust
 
Say I want to induce another renderer during the program
Might be viable. If I want to do effects.
 
idk what that means but you don't have to "restart SDL" whatever that would mean
 
@CatPlusPlus Say I need to restart the window
or the renderer
 
Recreating the window doesn't require Init/Quit
Also your class violates SRP
 
Or, you know, what if I want to nicely encapsulate the init in one object with exceptions?
 
8:58 AM
@CatPlusPlus leave to poor kid alone, there are no good OS abstractions, it's all terrible, except for Peanuts, but that's unfinished :P
 
It's pointless
 
@CatPlusPlus Not really
Let's compare
 
You can't continue without Init and you don't have to propagate it anywhere
 
what's the point of not open sourcing drivers?
 
It doesn't need to be in a named object
 
8:59 AM
I don't get it
 
@khajvah What's the point of not open sourcing everything
 
I hope you like doing stuff like this
 
user1804599
@khajvah they use proprietary algorithms that they don't want the competitive companies to use.
 
lol nesting
 
8:59 AM
@CatPlusPlus that is one point of why I was asking for something better
 
@CatPlusPlus to sell and earn money
 
but anyway
 
so that's why I wanted to encapsulate it all in an object
 
SDL_Init doesn't belong there
 
user1804599
Also, open-sourcing may allow people to port them to Linux and Microsoft doesn't want that to happen.
 
9:00 AM
@CatPlusPlus then where does it belong?
 
Fucking snackchat
 
@rightfold makes sense
 
Also, I'm fine with it being in the BaseSystem anywyas
 
It's a dumb name for a window class
 
@CatPlusPlus But... it's not exactly the window class either
 
9:01 AM
SDL_Init doesn't belong in a window class, SDL_CreateWindow doesn't belong in whatever the pointless class would be for calling Init
@VermillionAzure That's the point
 
user1804599
Microsoft is literally FIFA.
 
@CatPlusPlus Because it's not
 
Why do I even bother
 
9:02 AM
@rightfold Explain.
 
Wonderful.
Now everything has RAII and everything gets initalized in order...
and I don't need to worry every again.
 
lol you don't even have quits
Good RAII
 
@CatPlusPlus ???
 
Nevermind
 
user1804599
9:04 AM
May 26 '12 at 16:39, by Cat Plus Plus
Your code's bad and you should feel bad.
 
@rightfold It'll be bad for a long time
Bah.
Baaaaaaaaaaaaa.
 
Your Window class has no dtor and is broken
Your Renderer class has broken copy ctor
Your BaseSystem is doubly pointless without a dtor
 
@CatPlusPlus Oh good I missed these
also how is the Renderer broken
 
@VermillionAzure You do double-destruction if you copy
 
@nabijaczleweli mm, i see.
 
9:08 AM
Use a shared_ptr
Probably with a custom deleter
 
Don't use shared_ptr
 
If all your class does is create a thing and store it then it's pointless anyway
 
@CatPlusPlus (it also frees it)
 
You gain nothing over using unique_ptr (except bugs)
 
9:11 AM
but how would i allow the sequential constructor?
 
@CatPlusPlus Copy constructor and copy assignment
 
Which are broken
These things are not copyable
 
@CatPlusPlus which is why i'm deleting them
 
singleton?
 
and creating only move ones
@chmod711telkitty opaque I think
I think that's the term
 
9:12 AM
I am confuse
 
Not in that code you don't
 
You cannot copy them because you cannot really "use" their structures directly
they can be referred to only through its pointers and the API given to you
 
@VermillionAzure cough cough get() function cough cough
 
except it's C style so... cannot use std::shared_ptr
 
@VermillionAzure inb4 flag
 
9:13 AM
@nabijaczleweli and there is no get() I think in SDL
 
SDL_Renderer* get() {
 
You can always use std smart pointers
 
@nabijaczleweli I was going to...
And then I couldn't use std::shared_ptr with SDL_Texture* without creating a function object for its destructor...
 
Don't use shared_ptr
 
9:15 AM
@CatPlusPlus It makes the most sense there, though...
 
And then the kicker is that we cannot use it on SDL_Texture because the compiler will not know its size.
 
Whaaaaat
 
@nabijaczleweli the error is on my question up right now
I thought about trying to force the smart pointers onto it but no.
 
Is SDL_Texture a type
 
9:16 AM
@nabijaczleweli It's a struct I believe coded in C.
 
Types have fixed size
(except fucked-up GNU extenions)
 
@nabijaczleweli But you can't reference it I think
Only through opaque pointers
 
@VermillionAzure It's a fucking class type
How could you not fucking reference it
 
@nabijaczleweli No, it's not. It's a C-struct.
And I think the struct size is not known at compile time because its implementation dependent.
 
structs are classes
 
9:18 AM
@nabijaczleweli not always
 
THEY MUST HAVE FIXED SIZE
IT'S HOW TYPES WORK
 
@nabijaczleweli ...
implementation-dependent size I think
 
@VermillionAzure Yes, it's ifdefed
Size of (class-)types must be known at compile-time
 
@nabijaczleweli yeah, I just retested it
> std::unique_ptr<SDL_Texture> ptr = nullptr;
Doesn't compile.
Error?
 
= nullptr
remove it
 
9:20 AM
> error: invalid application of 'sizeof` to incomplete type 'SDL_Texture'
same error without it
 
@VermillionAzure Use complete types you psycho
 
@nabijaczleweli ugh you don't get it don't you
 
You cannot do SDL_Texture txt then
 
SDL is a C library. It has an API partially based on opaque pointers.
 
it's as broken as your mother
 
9:21 AM
@nabijaczleweli SDL is, like, really good man.
It's been used for a few projects.
I think Linux/Civ IV was one of them
 
class-key - one of class or struct. The keywords are identical except for the default member access and the default base class access.
 
@nabijaczleweli You just don't get it.
436
Q: What are POD types in C++?

paxos1977I've come across this term POD-type a few times... what does it mean?

Probably this.
SDL is a C library.
 
It means that struct is different from our usual thinking of struct and class
 
facepalm
 
9:23 AM
It means it's just POD. In C.
 
facepalm as hard as your mother in bed
 
Why don't you try it.
And then come back.
 
I use a sane API, thx
 
Whether it's POD or not doesn't matter
 
@CatPlusPlus probably.
It's something about the API and I think it has to do with opaque pointers
 
9:24 AM
coliru.stacked-crooked.com/a/655367936ead56e5 also see your classes are pointless
Also don't use shared_ptr regardless of anything else
 
@CatPlusPlus what
 
@nabijaczleweli Incomplete types don't have known size
And if your C library has complete types exposed in public headers you're doing it wrong
 
@CatPlusPlus Yeah, but some implementations - no finger-pointing! - give you zero instead IIRC
 
@CatPlusPlus ah... Yes. This is more like I was looking for.
 
(For sizeof, that is)
 
9:26 AM
I should've gone that route.
well, to continue
 
Also the structs are the same as classes
 
@CatPlusPlus Thanks you've been a big help
 
So you're both just shouting stupid things
 
@CatPlusPlus lol yes
 
9:40 AM
guys what do you think of rust's traits?
 
So goddamn hot.
 
user1804599
@khajvah terrible.
 
so damn cold ... even at 16 degrees this afternoon!
 
user1804599
Member functions have namespacing and design decision problems. Therefore protocols are superior.
 
9:53 AM
damn I am getting 'tender' ... used to live in a city that snows in winter & now I think 16 degrees is cold ...
but after dinner & hot shower it's not too bad now ...
also, it's 18-20 inside study ... there is no air cond or heater inside my bedroom, but I have layers of beddings so I usually wake up really warm despite the fact sometimes it's only 2-3 degrees in the early mornings
 
Xeo
@R.MartinhoFernandes 34 degrees here
 
Oh. I was talking about me. I'm 35 degrees.
 
Xeo
sure
 
heh, got fiber
 
user1804599
1ms ping is unacceptable.
 
10:07 AM
1 mega seconds
 
user1804599
@Xeo let's go to the islands in the north: buienradar.nl/weerkaarten/gevoelstemperatuur
 
user1804599
R.I.P. Limburg.
 
10:31 AM
the download speed is actually higher but speedtest.net is not fast enough
 
@Mr.kbok r u really a prof, do u have a PhD to start with? Or can people become a prof in your college without a PhD?
 
Xeo
looks like Sidonia?
 
@Mr.kbok nice throughput. nice ping.
 
user1804599
It's fake.
 
10:45 AM
@Xeo yep
I like it a lot.
 
Xeo
new season started a couple days ago
 
user1804599
seasons
 
user1804599
 
Xeo
10:45 AM
new season of animu, I mean
not specifically Sidonia, sorry
 
ah damn
@rightfold C++ Seasoning
 
user1804599
:)
 
user1804599
Best talk ever.
 
Sean knows his stuff.
He's the Parent of C++.
 
user1804599
Life is too short to compile C++.
 
user1804599
10:54 AM
mythbusters marathon
 
user1804599
crazy merkins
 
crazy merkels
 
user1804599
lol
 
Yesterday they recorded 42 degrees temreture in my city
and I still don't have an a/c
 
tough it out
I'm suffering too but it only gets 35 degrees here.
32 degrees atm
 
user1804599
10:58 AM
32º is very warm for an automated telling machine.
 
user1804599
they are typically cooler
 
Probably even warmer for the poles now.
 
I thought atm would be hotter because you know ... machine dissipates heat when does work ...
 
@rightfold lol dude
 
user1804599
11:03 AM
@khajvah lol gordon
 
user1804599
I like the memes.
 
user1804599
 
I like how hard working he is
 
lol
-62 damn
 
user1804599
11:08 AM
 
Mostly cloudly. lol
 
user1804599
> Why did the chicken cross the road?
Because you didn't fucking cook it.
 
user1804599
XD
 
lol
 
user1804599
> You used so much oil the US wants to invade the plate.
 
user1804599
11:12 AM
These are so awesome.
 
user1804599
 
@Puppy who's a good boy?
 
user1804599
@MarcoA. @Ven is
 
@rightfold good summary of the Lounge
 
11:21 AM
n° 4 is the best one
 
Not as good as this guitar guy ^
 
user1804599
4º is good.
 
11:41 AM
@khajvah Ahaha Italian nerds arguing what is pizza on his pizza video
 
> I'm Italian, worked in Pizzeria, graduated as Commis Chef... i got 21 years old and i eat pizza home made almost evryday... NEVER SEEN IN ALL MY LIFE ROSEMARY ON PIZZA... You "Chef" should use Basil instead of Rosemary
lol
 
Ell
s'knobs
 
user1804599
lol
 
user1804599
12:03 PM
RAIN
 
user1804599
cool
 
@R.MartinhoFernandes that's hot
 
In case anyone cares.
@R.MartinhoFernandes omg that's awesome.
 
Pity I fucked up and no one got theirs.
 
12:14 PM
I want one of these, where can I buy one?
I can paypaling
 
user1804599
Bring them.
 
12:40 PM
@R.MartinhoFernandes if you'd have told me there'd be tshirts I'd have come too :<
21 hours ago, by Alex M.
maybe I'll sleep even better now
omg I did
it's like when you sleep so much you feel like ugh but then after an hour you're like overclocked and can do anything
 
@R.MartinhoFernandes Nice.
 
I'm quite surprised, that CoD[UO] still has such big playerbase.
 
Unconference folks: I still want to get rid of the T-shirts. Say something if you want to arrange for getting one. No obligation whatsoever.
17
Can someone pin that for me?
I'm on a phone.
 
I want one.
 
12:56 PM
Twas 20€ each. Email me at rmf.io to sort it out.
 
hello how is t-shert formed ?? thank you
kek
 
@R.MartinhoFernandes something
 

« first day (1722 days earlier)      last day (3228 days later) »