« first day (1780 days earlier)      last day (3166 days later) » 

user1804599
5:01 PM
bleh
 
user1804599
I don't want to work on my type checker.
 
user1804599
well actually
 
user1804599
oh why not let's do it
 
@Ell My boss is Hungarian, so I can ask him stuff if you need help.
 
user1804599
He's such a boss.
 
5:07 PM
Hmm.
Are destructors automatically created by the compiler if one isn't found?
I'm trying to decide if I need to create one for one of my classes.
 
@EthanBierlein Sure.
 
"sure"?
 
Ell
Yes they are
 
@EthanBierlein Yes, they are, and they call all the destructors of your data members.
 
Ell
In reverse order of construction
 
5:09 PM
Okay, thank you. :-)
 
@EthanBierlein So, you should almost never have to write one.
 
@EthanBierlein Use Rule of Zero
 
Ell
Meh that didnt make sense
Reverse order to construction
 
@Mr.kbok Unless you're working with a C API.
sobs
 
@Nooble If you're working with a C API, you usually write one lifetime management class and that's enough (if the C API is not shit)
 
Ell
5:11 PM
even if you're working with a C API, you oughtnt have to write offeb
 
Also shared_ptr are enough for most C APIs anyway
 
Ell
Kbok beat me
 
I also have to make special move constructors.
 
Ell
Why would you guys use const ref instead of value by default?
 
it's almost a flame bait topic
on one hand no copies, on the other hand aliasing
 
Ell
5:25 PM
Copies can be optimised out though
 
not everywhere
 
Ell
also semantics
 
Ell
Imho taking a reference could imply that the caller is required to keep the value alive for longer than the duration of the function
 
I actually stopped caring if somebody writes const std::string& or std::string
I only get annoyed when it's const int&
 
user1804599
5:28 PM
@thecoshman why not real grass
 
for arbitrary types (for example in generic functions) I take const T& if I only query the value (as in, no copies, no modifications, no storing the reference to it) to avoid slicing
 
Slicing I a complete non-problem
I always take by value unless there's a truly compelling reason not to
 
@thecoshman what? ew. I must have conveniently not read that part ever.
@elyse I imagine growing a cylinder of real grass has its challenges
 
user1804599
Why?
 
user1804599
I'm so bored.
 
user1804599
5:34 PM
I want to make software but I don't know what to make.
 
Because plant structures depend on gravity.
 
user1804599
They can grow plants in the ISS perfectly fine.
 
Jul 25 at 17:57, by Tony The Lion
Write a project idea generator
 
user1804599
Also, centrifugal force.
 
It took them 60 years and billions of dollars
 
user1804599
5:36 PM
You can grow the grass in a centrifuge and then flip it inside out. :p
 
And that kind of centrifugal force would require a lot of expensive equipment
 
user1804599
Or just grow it flat on the ground and then turn it into a cylinder.
 
I imagine if you took a really tight woven existing piece of grass and grafted it onto onto a sponge or some crap, it might hold together
 
user1804599
You don't have to grow it in that shape.
 
user1804599
You can reshape it afterwards.
 
5:36 PM
Yep true
 
user1804599
ok so wat do
 
go to sleep
 
Not always easy to hold real soil together though
 
user1804599
@unordered_meow no wtf it's 19:73
 
^^ Ask for help here.
 
5:38 PM
@elyse why not
 
Q: Help, I want to grow cylindrical grass to pick up chicks birds
3
 
also, 73?
@elyse masturbate
 
@unordered_meow uh
 
@EthanBierlein Why not?
 
@EthanBierlein are you uncomfortable with that word
 
5:40 PM
sometimes
if it's used in the context of education it's fine.
 
user1804599
0
Q: Can grass live upside down?

elyseHaving seen a video on how to pick up owls I was wondering if it were possible to have real grass live on the rotating cylindrical device (instead of fake grass). Is this possible or will it die or fall apart quickly due to gravitation? What if the device slowly rotates forever?

 
If I see the word "masturbate" in a chat room full of people that I don't know, I start to worry a little.
 
@elyse I was pretty sure that you'd do it :D
 
@EthanBierlein The state of this room
 
@unordered_meow woah only 3 pages?
 
5:43 PM
 
we're not doing that well
 
Okay then
penis
vagina
fuck
 
user1804599
@unordered_meow I love the bulleted list in this answer: meta.stackoverflow.com/a/270443/1804599
 
there you go, right at home
 
masturbate
 
user1804599
5:44 PM
@fredoverflow lol
 
just let it go
 
user1804599
 
what?
 
user1804599
5:46 PM
cute haircut
 
Thanks!
I had to get it cut though yesterday. :-(
 
user1804599
It's an emo haircut. Hence haircut.
 
user image
2
 
Not too much though.
 
@ElimGarak why do you have a vagina on your forehead
6
 
user1804599
5:47 PM
 
-1 not enough sparkles
 
@elyse who the heck is that
o crap should I have asked that
 
@elyse Is that Kanye West?
 
@Puppy Gosling doesn't deserve sparkles
 
@EthanBierlein That's Ryan Gosling.
 
5:48 PM
Damn, I got it mixed up with Stroustrup
 
That's right, we got so many penises, we have 24 pages of 'em.
 
@Puppy You suck
 
@Puppy Come on.
 
@EtiennedeMartel What about peanus?
 
5:48 PM
I made that mistake 3 years ago.
 
Imagine that ^^ with sparkles
All around his face
 
But I wouldn't make it again.
 
And a giant golden crown
 
There we go.
 
5:50 PM
Witness Sparkly Bjarne
 
A true Lounge Masterpiece
 
It's the only GIF allowed on the Lounge.
 
@TonyTheLion pin that
It's glorious
 
@R.MartinhoFernandes She
 
5:51 PM
@EthanBierlein I'm pretty sure it has been done before, and it doesn't really need it again.
 
@EtiennedeMartel IIRC, I've also seen sparkling rightfold.
 
@EtiennedeMartel That's a GIF? I thought Bjarne just sparkled by nature...
7
 
Oh, well I'm still bookmarking it
 
@fredoverflow Only in the sun.
 
@fredoverflow lol
 
5:51 PM
And we all know that, as a programmer, he always stays inside.
 
user1804599
Bjarne Stoeptroep
 
user1804599
Stoeptroep is Dutch for sidewalk trash.
 
v that
 
user1804599
Bjarne Stormstrooper
 
user1804599
5:52 PM
I love this one as well:
 
user1804599
 
yeah lol
 
ImageOverflow
 
user1804599
 
Bjarne Shoetroupe
 
user1804599
5:53 PM
Bjarne Strapon
 
user1804599
Bukkake Bjarne
 
user1804599
No, but I can watch the one on the anal history of Bjarne.
 
@TonyTheLion I've watched it on youtube.
 
Ethan, try not to molest the starboard too much. :P
 
user1804599
5:55 PM
I want to do something.
 
user1804599
I'm superbored.
 
@elyse now now
 
@ElimGarak I'm not molesting it. I'm gently stroking it's ass.
 
user1804599
 
user1804599
More language designers.
 
5:56 PM
@ScottW you too? sigh..
 
lel
 
Jeb?! They have MechJeb? We're toast
 
@elyse He's the Erlang dude right?
 
user1804599
Yes. :3
 
user1804599
5:58 PM
Joe Armstrong.
 
Watched an interesting talk by him recently.
He knows his stuff.
@ScottW Sure sure .... :)
 
user1804599
He was also the first man on the Moon, and somebody who has won the Tour the France as many times as I did and has half the amount of balls I have.
 
user1804599
@StackedCrooked Was it about concurrency?
 
user1804599
What I love about Erlang is that you can manage to introduce race conditions in places where in other languages you'd have only a single thread of execution.
 
6:00 PM
Well, goodbye now.
 
user1804599
I wrote Elixir today at work.
 
user1804599
For a very specialised message broker.
 
@ScottW Sofa King We Todd Ed
 
Must purchase more SSL certificates.
 
@ElimGarak nah, no need for ssl
 
6:04 PM
@StackedCrooked He seems really nice.
 
what is offensive? plonk? users? #?
or is someone just butthurt about something?
and it was flagged
 
I'm far from butthurt about anything
 
> Avoid entanglement of dog with wheel spokes.
lol
 
I've just been here a long time, and have met annoying users I decided I'd rather ignore
 
6:08 PM
yea I get it.
I'm saying your post was flagged.
meaning someone else is butthurt for other reasons
who you piss off today?
 
tootel him with vigor
 
better than pissing on them
RKelly?
you are the alpha pisser?
ohh fuck off. that isn't even funny. Flags ANNOY EVERYONE!
 
Don't they just :p
 
@JonClements if that was you... I'm not actually going to do anything. But imagine me giving you a stern look.
-_-
 
Can't be me - if I flagged something - it'd be immediate
 
6:16 PM
really? there is no 'mod flag as a user' flag?
 
@rlemon ಠ_ಠ
 
nope... all flags for spam/offensive both chat and site are immediate
 
anyone's using VC++2015? how do I make it pause after app exit? In previous versions ctrl-f5 did the thing, but in 2015 it doesn't
 
Ell
I made some bread dough with that yeast
I didn't put enough in though. Good job I'm letting it prove for a couple of hours in the oven!
 
hey guys. i'm having trouble in creating an array of objects in c. somehow, i'm able to create the array but when i want to get the value of a specific index, it seems that the address is the one i'm getting.
i mean C++
 
6:21 PM
C != C++
 
Ell
You should use a vector
Std::vector<T> mysfuff;
But I cba to teach atm, too hot :/
 
this is my code:

CAttackObject * attack_array;
	attack_array = new CAttackObject[2];
	attack_array = new CArcher[1];
	int archer_hp = attack_array[1].GetHitpoints();
	attack_array = new CBarbarians[2];
	int barbarian_hp = attack_array[2].GetHitpoints();
 
guys, gonna bail out for today
 
Ell
What is hapoenig today?
 
6:23 PM
Don't forget to continue pinging potential jammers to fill the sheet
 
Ell
Good night @kbok
 
@R.MartinhoFernandes tootel him with vigor
 
CArchers and CBarbarian are children of the CAttackObject.
 
use std::vector of std::unique_ptr<CAttackObject>
 
Ell
@rocky this is not good c++
 
6:24 PM
cc @Nooble @thecoshman @Lalaland
don't use stupid object hierarchy hth
@Ell Not the night, I have a party :)
 
Ell
std::vector<CAttackObject> attack_array;
 
bye
 
Ell
Oh have fun :)
Oh wait he is using hierarchy
 
@Ell, we are taught of c++ for a week. i'm sorry for the code. :/
 
Ell
Meh kind a pain
 
6:25 PM
@Mr.kbok Party hard then :p
 
Ell
@rocky its not your fault if you were taught that way
 
Use a polymorphic::vector to solve all your problems.
 
Ell
As long as you are willing to learn and willing to google things for yourself as well then we won't mind really
But I have to go also so someone else will have to help :/
 
@Morwenn u wot mate
 
@unordered_meow An old artefact of mine.
 
6:27 PM
The code works, it's just that it results for addresses not values. :/ @Ell okay. thank you for your concern. take care. :)
 
@rocky you're leaking two arrays
 
Frankly, it's no more than a std::vector<std::unique_ptr<BaseClass>> which uses indirect iterators to offer a nice interface.
 
@rocky also you're accessing out of bounds
@Morwenn almost like boost::ptr_vector
 
have you guys heard of lumina? its a BSD DE built on qt
 
6:29 PM
@unordered_meow Except the pitfalls of boost::ptr_vector are hard errors with mine. Also, there is an adapter mechanism to augment its power.
 
@unordered_meow can you teach me how i can make a new CArcher out of the AttackObject?
 
@Morwenn oh nice
 
Whatever happened to that Material Design desktop that someone announced awhile ago
 
@unordered_meow But otherwise, yes, it's close to boost::ptr_vector. It wanted to adapt the other standard collections, but was too lazy to do so.
 
user1804599
6:35 PM
terrible
 
@Mr.kbok I've no idea who's who
 
thanks @unordered_meow but it's a bit complicated cause our teacher haven't taught us about struct yet. :/
 
@unordered_meow Use coliru or StackedCrooked will be sad.
@rocky Lol.
 
@rocky but you do use class don't you
they're almost the same thing
 
6:40 PM
@rocky struct is exactly the same as class, except everything is public by default.
 
user1804599
And you can't say template<struct T>. :v
 
@unordered_meow yes. oh. i didn't know that, sorry. :/
 
user1804599
C++ should add trait where everything is protected by default.
 
protected inheritance by default...
 
hahaha nope
 
user1804599
6:42 PM
@Morwenn :3
 
user1804599
I want to write something in Elixir now.
 
user1804599
Or Erlang.
 
i have getters and setters on each of my subclasses (CArchers and CBarbarians) can i just call the function and return the exact value? the problem is in the declaration of the array. why is it like that?
 
user1804599
hahahhahha new[]
 
user1804599
rekt
 
user1804599
6:44 PM
FUBAR
 
user1804599
nopenopenope
 
@rocky Built-in arrays are inferior to std::array and std::vector
 
@rocky WAT?
@rocky there is no difference between structs and classes except structs are default public.
-dealwithit-
 
@DonLarynx yep, i learned it a few minutes ago. thanks guys. :) but i'm having trouble with arrays. :/
 
@rocky std::unique_ptr is used (among other things) to point to polymorphic objects, where the pointer is supposed to be responsible for the object pointed to (in other words, it owns it)
 
6:47 PM
@rocky lmfao what? the first assignment is useless af
 
user1804599
 
@rocky arrays are pointers to a memory location of some size, what's the big deal :O:O:O
 
@DonLarynx No
 
@unordered_meow no
@unordered_meow whats your fucking contradiction?
 
> arrays are pointers
nopenopenope
 
6:49 PM
shit...
 
@DonLarynx I called you a nooblet once because in my experience you like to speak on topics you're not experienced in yet
 
i'm a bit confused now. :/
 
user1804599
You're bad at C++.
 
user1804599
Stop going to school to learn C++ and read a good book instead:
 
user1804599
4269
Q: The Definitive C++ Book Guide and List

grepsedawkThis question attempts to collect the few pearls among the dozens of bad C++ books that are published every year. Unlike many other programming languages, which are often picked up on the go from tutorials found on the Internet, few are able to quickly pick up C++ without studying a well-written...

 
6:50 PM
this ^
 
> arrays are pointers
NO
 
i should read a book, and you should too, rocky.
 
user1804599
 
@DonLarynx Not in C++, no.
Arrays are of type T[N].
That decays to T* in certain contexts, but it's definitely not the same.
 
Thanks Griwes.
 
6:51 PM
(Same way a function name is not a function pointer, even though it can decay to one in some contexts.)
 
@DonLarynx more info here
 
you're right, because pointers are of size type and arrays are of size type*n
 
How the heck is that star worthy?
 
yes, i really need to. it's just that i have no time snce school is from 8am-5pm. plus assignments and work. </3
 
sorry for the confusion @rocky.
 
6:55 PM
it's okay @DonLarynx :)
 
@rocky Read this it's valuable input provided by unordered_meow
189
A: How do I use arrays in C++?

fredoverflowArrays on the type level An array type is denoted as T[n] where T is the element type and n is a positive size, the number of elements in the array. The array type is a product type of the element type and the size. If one or both of those ingredients differ, you get a distinct type: #include <...

 
@elyse Still waiting for a complete and crazy answer :p
 
> Due to the fact that addition is commutative, the following code does exactly the same:

std::cout << 3[x] << ", " << 7[x] << std::endl;
is pretty fucking weird
 
Thank you guys! I better get going, it's already 3am in the morning here and i still have classes at 8am. haha. i'll be a walking zombie again. thank you for the knowledge. :) goodnight everyone.
 

« first day (1780 days earlier)      last day (3166 days later) »