« first day (2028 days earlier)      last day (2921 days later) » 

9:00 PM
not really, its me trying to understand references
 
Then you're probably out of luck.
 
damn
 
1563
Q: What are the differences between a pointer variable and a reference variable in C++?

prakashI know references are syntactic sugar, so code is easier to read and write. But what are the differences? Summary from answers and links below: A pointer can be re-assigned any number of times while a reference can not be re-seated after binding. Pointers can point nowhere (NULL), whereas ...

@Morwenn That seems open to question. Salt is one of the (very few) things we have taste buds to sense directly.
 
nwp
@JerryCoffin I don't really like the answers to that question
 
@JerryCoffin Apparently babies tend to like sugary things but only people who eat salty things when young grow to like them.
 
nwp
9:03 PM
but to be fair I was too lazy to read them all
@Shiro think of references as alternative names to variables. They are particularly useful when the original name is not easy to get.
 
vector<LatLng> coordinates = {..}
vector<LatLng> &x = coordinates;
cout << &coordinates << endl;
x = a;
cout << &coordinates << endl;
Question: Why does this print the same thing twice ?
 
Ven
are you really..? please do some research before asking questions, especially here
 
nwp
what is a? but the answer is probably that both things are alternate names for the same thing
 
Ven
@nwp ???? changing the value of a variable doesn't change its address
 
oh, a is another vector<LatLng> = { ... }
 
Ven
9:06 PM
@Shiro changing x changes coordinates.
 
@Shiro let's say we have a variable, a reference share its memory, a pointer will keep its memory address.
 
Magnitude 8.0 Cinch alert
 
Cinch Andreas
 
Ven
@LucDanton ve-gra
 
nwp
I think the trick to make the lounge be useful is to give incorrect answers to stuff so that everyone jumps in correcting it.
 
9:08 PM
Hope my beer is fresh now.
 
shouldn't &coordinates point to the memory address of the first item it contains ?
 
nwp
nope, points to the vector
 
so when I change coordinates to point to a different vector (a) why does it change its value to be that of a ?
 
Ven
@Shiro you're taking the address of the vector, not of the backing array.
 
nwp
@Shiro coordinates is not a pointer, you cannot make it point to something
 
9:10 PM
The beer is fresh /o/
 
nwp
I though you didn't like beer
 
The chocolate mousse looks ready too. Too bad I don't want anything sugary anymore for tonight.
@nwp That's Jerry.
 
@ven so how would i be able to take the address of the backing array ?
 
nwp
choco mousse and beer is a really strange combo
or maybe it's clever as it covers more range of taste
 
damn, chocolate mousse, making me hungry...
 
9:12 PM
I ain't eating chocolate mousse in the end, so...
 
Ven
@Shiro use cppreference, google, and stackoverflow, please. en.cppreference.com/w/cpp/container/vector/data
 
also yeah beer + chocolate mousse seems kind of weird
 
@Morwenn This also sounds over-simplified to me. The one study I recall reading about this was much more restrained in its conclusions (to put it mildly). Let's see if I can find something.
 
Nothing beats runny camembert + sesame bread anyway.
@JerryCoffin I probably read an oversimplification and only remembered a simplified version of the conclusions.
Probably something in Sciences & Vie.
 
nwp
I don't like bitter stuff
 
9:14 PM
I like light and fluffy chocolate mouse
 
"Children who had been exposed to starchy foods as infants were more likely to lick salt from the surface of food when they were preschoolers compared with children who didn't eat starchy foods as infants. However, children exposed to starchy food as infants did not actually prefer salty foods, such as pizza and French fries, more than children who were not exposed to starchy foods as infants[...]"
 
@Ven thanks a lot, i understood references better. those couple of comments you made previously was what i needed. "changing the value of a variable doesn't change its address"
 
Fun.
 
Then the author of the article concluded: "Pass it on: Feeding babies salty foods may boost their preference for salt later in life." I suppose "may" covers a lot, but there seems to be little or nothing in the article or study to support this "conclusion".
 
9:18 PM
I sometimes eat salt right out the bag.
 
@JerryCoffin I wonder how many calories I might burn jumping to conclusions.
 
It does appear that the ability to taste salt develops somewhat later than the ability to taste sugar. Given that salt is less crucial to survival than sugar, that's probably not much of a surprise.
 
@Khaled.K Thanks !
 
@Morwenn Depend on how big of a mat you used, I suppose.
 
9:21 PM
they help the fort fire people? to take their jobs?
 
@JerryCoffin Do we even need salt to survive?
 
@ArchbishopOfBanterbury I suppose it wouldn't have to be in the form of salt, but we clearly need sodium (and trying to consume anything like pure sodium would be...problematic, at best).
 
Makes sense, I haven't got much of a clue when it comes to biology - never liked it
 
salt in umami cooking is usually used to emphasize other flavors
 
9:32 PM
@Khaled.K About my previous question, I get why &coordinates does change, but why doesnt &coordinates[0] change either ?
@Khaled.K I meant to say "I get why &coordinates does NOT change"
 
@EtiennedeMartel uh
does that mean the same thing as here
 
Ven
@Shiro the vector is able to reuse its backing array. If you don't need more space than previously, why allocate a new chunk of memory?
 
@Shiro coordinates and coordinates[0] are two different things. coordinates is the vector object, coordinates[0] is the first item in the vector.
 
coordinates = { ... };
a = { ... };
vector<LatLng> &x = coordinates;
cout << &coordinates[0] << endl;
x = a;
cout << &coordinates[0] << endl;
shouldn't this print a different address ?
 
@Shiro the cout statements are identical, how do you expect different output?
 
Ven
9:38 PM
@Shiro read my last message
 
I don't get it.
If I have
A a1 = ...;
A a2 = ...;
and then I say
a2 = a1;
then the original a2 value is gone and a2 variable contains the same object as a1
isnt that right ?
 
so when I do x = a
I change the value of coordinates to "a"
so &coordinates[0] should now be equal to &a[0]
why is it not
 
@Shiro The values of a are copied into the backing array of coordinates.
 
ohhhhh.........
 
9:43 PM
operator overloading
 
so how would I do what I am trying to do here
 
@Shiro There's no easy & explicit way to do so with std::vector.
 
perhaps std::swap does this ? or am i wrong
 
Basically, you want coordinates to point to another array, which means that you want pointer semantics. std::vector has value semantics.
 
o ok, i got you
 
9:44 PM
std::swap indeed swaps the pointers.
 
oh, thats convenient
 
Well, if you want pointer semantics, I don't think relying on std::vector is the best thing :(
 
no i dont, i am just trying to understand what the hell is happening
overloading = operators doesnt seem like a good feature of a language
 
Magic.
 
why not call a method by name so that everyone can see it
 
9:47 PM
Syntactic sugar.
Also, you generally know when you're working with a language where operators can be overloaded, so that's generally not a problem.
 
user1804599
Anything related to overloading in C++ is absolutely retarded.
 
user1804599
Avoid if possible.
 
user1804599
It's completely broken.
 
wow. actually if you click with the middle mouse in the "=" operator my IDE goes to the definition of the method
i wish i new that earlier, woulda saved me from a lot of frustration
 
Oh fuck, Ménage à 3 is so great. I can't stop laughing xD
 
9:58 PM
@Shiro without operator= operator overloading would be barely useful for its best use case: smart pointers
proxies would be impossible
 
@doug65536 Best use case: smart pointers. Seriously?
 
@JerryCoffin well, its the best case where POD copy would never work
 
That... sounds a bit random.
 
@Shiro You should probably dig deeper than the surface syntax and really get to grips with what it means to define a variable. That's much more fundamental to understanding what is going on.
 
struct Vector { float x,y,z; }; Vector a{1,2,3}, b = a; <-- no need for operator= right?
std::unique_ptr<Foo> a = std::make_unique<Foo>(1), b = a; <--- operator= is absolutely essential
otherwise it wont be unique at all
 
10:05 PM
Soooo, the only operator= I've written by myself in my whole library were used to implement a couple of classes that could only be moved from each other.
 
@JerryCoffin what needs operator= more than smart pointers?
 
std::vector for starters.
 
which is really a smart pointer to a new T[] that grows efficiently
 
std::smart_ass
 
Kappa
 
10:08 PM
@doug65536 What a dumb question
Your mum needs operator=(Mum&&) because it would be terribly inefficient to copy her.
10
 
are you guys seriously whining about operator=? get over it
when you base a language on a language based on assembly language, you get micromanagement. operator= lets you encapsulate some of it. what is the problem?
 
@doug65536 from where I'm sitting it looks like you're the one who said unique_ptr requires it
 
@doug65536 I'm pretty sure there is no operator=?, but I can sympathize with the general idea of wishing you could define new operators in general.
 
I don't
Haskell has all the operators you want and look at the meta status
 
nwp
@Shoe Your mom needs operator=(Mum&&) because we don't have enough mass to make another one.
 
10:12 PM
boo hoo. c++ is bad. waaaa
 
@JerryCoffin yeah, it's useful in general
 
The Haskell ecosystem seems to be full of illiterates unable to write anything other than symbols
 
@Shoe Copying might not be efficient, but ripping her heart out isn't acceptable either.
 
@Shoe But jeffrey even if it doesn't have symbols you can't read it, so what's the fuss about.
 
user1804599
Hasklel
 
10:13 PM
Fucking "Oh, that symbol looks nice" bimbos
 
Maybe just admit you're bad at Haskell.
 
user1804599
I wish I were a bimbo
 
@BartekBanachewicz lol
 
I mean people are gonna complain how FP is unreadable all day every day
 
That one was actually p nice
 
10:13 PM
well, fuck them
 
@Zoidberg That wish apparently came true years ago already.
 
I am bad at Haskell. I said that over and over again.
 
There was a paper about overloading random iterators (even the whitespace!) in C++ once.
 
@sehe I actually got Hate-UI to sorta work and my motivation is dropping. The "what the fuck am I doing this for even" attitude.
 
Best joke paper to date.
 
10:15 PM
In fact I'm bad at most programming related things
Or cooking
 
@Morwenn And if I'm not mistaken, that one actually was by Bjarne.
 
Or relationships
Man, am I good at something?
 
@JerryCoffin I think so.
 
Oh yeah, sleeping
 
@Shoe Don't do database stuff then.
@Shoe Don't worry, you're not alone.
 
10:16 PM
I actually love databases, that might have something to do with my lack of RL relations
 
Oh well, maybe you are :D
 
@Shoe I'm really good at eating. Used to be pretty good and drinking too...
 
Yeah, me too at drinking.
Meh, do you need to be good at things to enjoy life? Nah
 
I guess I'm only good at exciting random men across the internet when I don't want to...
 
I'm sure I'll find the perfect woman some day
 
10:17 PM
@Shoe Being good at enjoying life, perhaps.
 
Time for another beer ç____ç
 
Then I'll conquer the hell out of her
And make a shitton of babies
 
@Shoe I used to believe that too.
 
Sounds like a fun side project
 
@Shoe Raising children really is awesome. Definitely a highlight of my life, anyway.
 
10:19 PM
there are no perfect people
except puppy of course
 
@Shoe You better embrace the aromantic & asexual clan then.
 
@JerryCoffin That's what I hear
 
nwp
@Morwenn maybe it can be transferred: smbc-comics.com/index.php?id=1842
 
RapidJSON is surprisingly usable
 
@nwp I'm not busty (yet?), so that ain't the trigger.
 
@Griwes What the fuck
 
@Lalaland have you thought about modal dialogs? I thought about making a specialized "modal-able" root element.
 
Wait, what the actual fuck
 
In general message boxes and shit are pretty context-less
 
I'm speechless
 
10:25 PM
@Shoe Obviously not typeless.
 
As much as I didn't want to, I found this compelling. http://thecasefortrump.com/ @realDonaldTrump
4
 
ITT Shoe is Haskell.
 
Shots fired
 
Hey guys, let's make an operating system
 
Why?
 
10:26 PM
Because all OS suck
Ours won't
 
@Shoe Ok. Let's do it! ...aand it's dead.
 
Because it will never exist
 
@sehe hahah good one
@Shoe @Griwes already did no
 
@Shoe Haha, good one :D
 
@Morwenn Haha, good one :D
 
10:27 PM
I wanted to make a CMSIS compatible OS once
 
@sehe ahah, good one :D
 
Oh fuck, I just copied Bartek, did I?
 
don't worry my messages are MIT-licensed
 
I feel overpinged with random shit today.
 
Thanks ♥
 
10:28 PM
altough I am thinking about making a move to BSD3
 
Aaaand also overfucked by GCC with its fuckedupness.
 
@Griwes interestingly enough I did make a code today and not a single surprising cimpoler error was made
 
@набиячлэвэлиь thefuck.gif
 
@Griwes Note how all your problems seem to come from overlambding everything.
 
10:29 PM
you are gitting gud
 
also I need a Draw monad and it sucks
I don't wanna
i really didn't wanna
 
@Morwenn That... might be true.
 
@Griwes Image desc, accordicon to Google: "losowe gówno z czasów CS'a"
 
...but it's not my fucking fault!
 
oh maybe I can just
 
10:30 PM
@Griwes I mean, I almost never have compiler errors, and I hardly ever overuse lambdas. That might be linked.
 
@Morwenn The fucking compiler should be able to compile a fucking core language feature!
@Morwenn lol
 
draw :: Reader FuckingInformationAboutFuckingScreenSoYouCanRenderShitCentered [DrawRequest]
 
nwp
@Shoe start by writing core design goals?
 
I was joking
 
10:30 PM
@nwp 1. It won't be made.
 
1. It shall work
 
clang++ sucks at function pointer conversions though.
 
> lambdas
> overuse
> used mostly for closures and code generation
u wot m8
 
2. Praise Bjarne
 
I have no intention whatsoever to write that much code
 
10:31 PM
@Morwenn If you don't have compiler errors that means your static information checking sucks
 
also write it in ASM and deliver it on floppies
 
@BartekBanachewicz :D
 
the only alternatives are - you're writing trivial code (in which case no one cares) or you're not making any mistakes (yeah right)
 
@BartekBanachewicz SFINAE all over the place, so yes, probably.
I don't even understand the error messages when I forget a const.
 
@BartekBanachewicz Do you want to crush me at Heartstone?
 
@Shoe man I haven't played in ages
 
Actually, I'm not sure I want
Yeah, nevermind
 
my decks aren't upgraded into the new format anyway
I'm focused on SC2 right now
me and Puppy are actually improving quite a lot
8:3 today
 
@набиячлэвэлиь lol
 
@BartekBanachewicz 2 2/3
 
10:34 PM
@BartekBanachewicz No idea what that is but it sounds awesome
 
550 lines of SFINAE overloads of the same trivial function hidden in at least three times in 15 layers of abstraction and the thing still works. I'm honestly surprised things still work whenever I compile my testsuite.
 
@Shoe 8 wins, 3 losses
 
@Morwenn Does it take three days
 
@BartekBanachewicz Almost anything is an improvement on MS-DOS 8.3 file name limitations.
 
@набиячлэвэлиь note how both of your results make sense
 
10:34 PM
@BartekBanachewicz Yeah, no, I mean how good that is
 
@JerryCoffin pfff
 
@набиячлэвэлиь Nope, a minute.
 
Or how hard it is, versus who
 
@Morwenn still too long
 
Except when I run that one benchmark with quadratic template expansion.
 
10:35 PM
Like 8:3 against some AI campaign is not that impressive, against other players it might be depending on the ranking
 
@Shoe well, we don't pick opponents, matchmaking does. We faced guys from silver, gold and platinum, but their league doesn't really reflect their skill
 
> >quadratic template expansion
 
Or how the matchmaking is done
 
WHAT THE FUUUUUUUUUUUUCK
 
@Shoe it was against other players.
 
10:35 PM
@набиячлэвэлиь When you've got two lists of template parameters and you instantiate the matrix.
 
but really the guys that were in silver simply were on a roll upward
 
@BartekBanachewicz Because they were terrible?
I see
 
@Morwenn How long does that take
 
we're in plat now
 
@набиячлэвэлиь Too long.
 
10:36 PM
@Morwenn numbar plyx
 
@Shoe Nah, you can get placed low to start with even if you're pretty good. We got placed into Bronze league and that didn't last long.
we went on a like 20-5 bender and went straight up to Plat
 
@набиячлэвэлиь Well, give me some time to compile the shit again.
 
at which point we promptly had to learn how to play the game properly instead of just cheesing people every game ;p
 
yeah it took us 3 days I think to gold and 5 or 6 total to plat
 
> >give me some time to compile
buckle up
 
10:37 PM
@nick me neither (how should we have?)
 
@Puppy Nice
What is it 2 vs 2?
 
Archon
 
@Shoe Archon
 
manda nudes
 
one base, two people controlling it
 
10:38 PM
@sehe Wow, that apple music tweet. I wasnt interested, but not I'll slap myself if I ever start.
 
it can be difficult to organize who's doing what at some times
 
@sehe I did know, so I guess by hanging out more often at night
 
but obviously the idea is to communicate and not try to use the same units at the same time in two different ways
 
@набиячлэвэлиь Well, that's a 7x32 expansion.
 
which has happened to us
 
10:39 PM
sounds fun
 
@LucDanton Omniscience doesn't count
 
it's pretty amusing
 
Time to fetch another beer and some chocolate mousse.
 
@Borgleader It came from the starboard here
 
@Shoe yeah sc is actually so demanding it makes a lot of sense at our skill level :P
 
10:39 PM
@LucDanton dat burn :)
 
@Morwenn jfc why
 
it's not like either of us gets bored at any point of the game
 
@Gabriel yes, they're mandatory. You can delete after sharing though.
 
Fuck, it slows down my whole computer.
 
@BartekBanachewicz oh man, I know the feel
 
10:40 PM
@Morwenn lul
 
Hours and hours fly by and you don't even notice
 
@sehe vOv checked twitter before lounge
 
Oct 13 '12 at 22:56, by daknøk
lul means penis.
 
Oh huh, 2 minutes to cimpole. I thought it was longer.
 
10:44 PM
@Puppy let's get diamond first :P
 
@Puppy <3 dis song
 
I guess I'll listen to B.P. Empire then go to sleep.
 
@Morwenn That's what she said
 
@sehe Haha, no :D
 
user1804599
TIR: MultiIndex in languages without variadic templates? Just use heterogenous lists!
 
user1804599
10:49 PM
So easy.
 
user1804599
Brainfuck is the best name for a programming language ever
 
And yet people always try to censor it :(
 
No programming language will ever top HOMESPRING
 
@Zoidberg ...but should have been saved for the language now known as Malbolge.
 
A screenshot from the latest version of the Nissan ConnectEV app... https://t.co/Tseyvwyg3R
Oh god
 
10:57 PM
@JerryCoffin Haha, that one.
 
@sehe What?
 
call spiritbusters, that’s possession right here
 

« first day (2028 days earlier)      last day (2921 days later) »