« first day (1433 days earlier)      last day (3514 days later) » 

9:00 PM
It's quite catchy imo.
 
user559633
@R.MartinhoFernandes the internet says that "A Most Wanted Man" is clearly and objectively the right answer.
 
Xeo
@Loopunroller I like thunder, though :<
I like storms
 
@Xeo You like Blitz++?
 
Xeo
I love the feeling of watching a storm
 
@Xeo Me too. I feel all cozy and invulnerable
 
9:02 PM
Actually AMWM already "started"
 
Xeo
Hm, TIL: You can disable ads in uTorrent
 
@Xeo Most awesome of all (IME): sitting on a mountain, hearing thunder and watching lightning happening in the valley below you.
 
Xeo
@JerryCoffin Unfortunately, I'm not an old hermit up on a mountain
 
But there are about three hours of ads before the movie, so.
 
@Xeo Don't need to be an old hermit--just able to climb a mountain (and fortunate enough to do so at the right time).
 
9:03 PM
Yep, still showing trailers, 15 minutes late.
 
@Xeo I like watching heavy rain
I don't like thunders and stuff
they ruin the atmosphere
 
Xeo
@AlexM. They are the atmosphere for me.
They literally create it!
(turning O2 into O3!)
 
hah, they're like pattern breakers to me lol
they break the nice constant sound of heavy rain falling
 
@R.MartinhoFernandes And if you apply the Carmichael function in adequate proportion to the order of Pi(3*3600) modulo 357 you'll find that pirating it is the right solution. Remember: Copyright™ isn't your fault!
 
Yeah, screw that.
 
9:06 PM
@Xeo Proof?PS: O(2) = O(3) = O(1) :o)
 
Also really cool just after a good thunderstorm--one of the best times for photography.
 
when the rain is heavy you also don't often hear other noises, except maybe cars
everyone stays inside, the dogs also shut up and find shelter
 
I usually fall asleep to rain noise.
 
@R.MartinhoFernandes May i ask where you live?
 
9:07 PM
@Loopunroller 3x02 + V => 2x03.
 
@R.MartinhoFernandes Regnet es häufig nachts in Berlin?
 
Nein.
I just put on a recording of rainfall.
 
Ah, ok. nvm.
 
Film starting. Bye.
 
And everything died down.
@JerryCoffin Mind if I pick your mind for a bit?
 
9:19 PM
we're all watching robot's movie
despite him not knowing it
 
@Xarn You want to pick the mind of the mindless void? Good luck with that.
 
Why can you hear a pterodactyl when it uses the bathroom? Because the P is silent.
 
All I see is some kind of a bug there. Pretty sure I could pull some nerves out of it. Using the proper tools ofc.
 
41
A: C++ vector that *doesn't* initialize its members?

bames53For default and value initialization of structs with user-provided default constructors which don't explicitly initialize anything, no initialization is performed on unsigned char members: struct uninitialized_char { unsigned char m; uninitialized_char() {} }; // just to be safe static_...

 
@Xarn Not a bug--a wasp.
 
9:26 PM
isn't this UB?
 
TIL about weighted reference counting.
 
this is a good song
 
@JerryCoffin damn wasp
 
your music licence is officially revoked
 
Meh
At least he is not metalist talking about how metal is the only pure music.
 
9:30 PM
I don't know anyone like that
 
I like too many kinds of music to ever possess a license :(
 
^ Great song.
 
oh god
 
or rather, I like specific songs from multiple genres
 
9:31 PM
I counter with
that guy is a way better singer without autotune
 
The singer in the video I posted above is Rebecca Black. She also appears in Katy Perry's music video for Last Friday Night.
 
I know.
 
needs moar chinese food
 
@Puppy You know?
That's amazing.
 
yes.
 
9:33 PM
Just ordered a paper copy of Alexandrescu's Modern C++ Design.
 
dead trees? you're dead to me
 
I like having a collection of C++ books.
 
@Rapptz I don't see any UB there. If you used any type other than unsigned char you'd have problems, but it allows pretty free reinterpretation.
 
@Puppy Trees from tree plantations are destined to die.
 
Doesn't anyone here listen to sane music? :-D
 
9:34 PM
@StackedCrooked True, but their nutrients could be usefully recycled into the earth instead of wasted as paper
 
Do you guys know if it's UB to use std::string::reserve and then std::string::data to write to the buffer?
 
@Xarn define sane music
 
It's ub.
 
not sure.
depends on exactly how it's specified, I think.
 
In C++11 it's defined to be contiguous, if anything
 
9:35 PM
@Rapptz You want uninitialized memory?
 
almost as good as drugs: youtube.com/watch?v=PLgSo90JhAQ
 
I could use std::unique_ptr<char[]> but I want to see if it's defined for std::string
 
@Xarn Would you settle for insanely awesome (awesomely insane?) music? youtube.com/watch?v=_rwNe2QXwrU
 
@Rapptz what about resize?
 
too expensive
 
9:37 PM
I'M BACK!
 
@JerryCoffin Very much not my style, but still miles ahead of the first three things.
 
struct Raw { Raw() {} char c; }; vector<Raw> vec; vec.resize(1000); // should not init
 
I'm specifically talking about std::string though
:<
 
Approx 40 years old... close enough, expected ~30.
 
@StackedCrooked Bad, you suck.
 
9:38 PM
I excel at bad.
 
@dolan you know, I just realized it would have been twice as awesome if his name was also jamie hackins instead of jamie hankins
 
0
A: C++ vector that *doesn't* initialize its members?

PuppyThe optimal solution is to simply change the allocator to do nothing for a zero-arguments construct. This means that the underlying type is the same, which dodges any kind of nasty reinterpret_casting and potential aliasing violations and can non-intrusively uninitialize any type. template<typen...

 
@StackedCrooked I bad at Excel. I guess we're about even.
 
@Rapptz basic_string<unitialized_char> and then cowboy cast it to string
 
lol
 
9:42 PM
just use the no_initialize allocator and problem solved.
 
@StackedCrooked Never quite understood the fascination with cowboy casting.
 
you made fun of ThePhD for doing his a few months ago
hypocritical m8
 
@JerryCoffin conscientious cowboy
@Rapptz He inspired me.
Such greatness that is ThePhd.
 
And then when the de-allocator is invoked...? — Lightness Races in Orbit 4 mins ago
I don't know the answer to this (I'm not great at allocators) but it seems like a legitimate concern.
 
What on our green earth would the intention behind this be? stackoverflow.com/questions/25918446/…
 
9:45 PM
whoops
 
@Rapptz It's not.
 
prove it?
 
it's not going to be a problem to destruct a non-constructed char.
 
@Rapptz It's not too expensive if you only create the string once and keep reusing it (using some kind of object pool).
 
the issue is that it is
 
9:47 PM
@Puppy ah, the elusive non-constructed char.
 
:(
I already tried the sane™ way
I don't feel comfortable with having a global object pool either
imma go with the raw_char hack thing
 
@Rapptz "if it's UB to use std::string::reserve" That has to be an implementation defined part of the spec.
 
Problem with pooling would be that strings are copyable. So you'd have to be careful to avoid accidental copies.
 
Even the Archbishop of Canterbury doesn't believe in God half the time. Christianity is totally dying. (Note: use of the idiom "half the time" is not intended to suggest precisely 50%.)
 
I'm having a bit of a problem wrapping my head around pointers (coming from Java / Python). I have a function that imports a data structure from a file.

1. Whenever I create an object in a local scope, should I be allocating on the heap and returning a pointer?

2. Should I be using a smart pointer?
 
9:51 PM
@Rapptz what exactly are you trying to do?
 
@LightnessRacesinOrbit Half? You mean all? He basically downplayed his misbelief
 
ah fucknuggets, I got an interview tomorrow
 
And why do you need std::string. Would a string_ref class also work?
 
not sure why these always scare me so much
 
I wanted to write to std::string's internal buffer
 
9:52 PM
@Puppy just chill and you'll be fine :)
 
That's not hard :)
 
@sdasdadas 1 NO! 2 maybe 3 Ask the question on SO
 
@Puppy smile when you meet them
 
@Loopunroller On the one hand there's nothing particularly wrong with this in the framework of their belief system: we are human and faith is subject to human frailties. On the other hand, to doubt that much in a position such as his and talk about it openly via public broadcast is new.
 
@Captain It seems like it's been asked before - I've definitely read a few answers on the topic - I can't quite understand when to use them, still, though.
 
9:54 PM
We just hear so much nowadays about all the horrible shit going on in the world, and we hear it so fast, thanks to modern infrastructure and media, that faith in any sort of benevolent deity is fast becoming untenable
It makes a lot more sense in isolated communities... but there aren't many of those left.
 
@LightnessRacesinOrbit I'll have to lookup some words there :D
 
lol k
i'll unpack while you're doing that
 
@LightnessRacesinOrbit Unpack what? Your archive?
@LightnessRacesinOrbit Christians be like "He only said that to attract attention to christianity, nothing wrong with that"
 
@sdasdadas Ask the question on SO tag it c++ explain your Java views. There are more than a few knowledgeable c++ gurus in there also versed in Java. Explain what you are trying to accomplish.
 
@CaptainGiraffe Will do, thanks :)
 
9:57 PM
yuk Java
Surely his question has already been asked before on SO
Perhaps you should try using Google and seeing if it has
 
Surely, SO is not all about google hits. There are persons behind many questions too.
 
@TonyTheLion I have - I think I'm just confused as to the general rule for using dynamic allocation. Like, if I ever need an object outside of local scope, does that have to be wrapped? Things of that nature.
 
No, my point was that the question surely has been asked before and that asking it again will probably incur downvotes, because its likely a dupe
 
@sdasdadas You shouldn't typically need or want a local scope for this at all. Importing data from a file is two lines of code: std::ifstream infile("name"); std::vector<whatever>{std::istream_iterator<whatever>(infile), std::istream_iterator<whatever>()};
 
Don't get too tempted with pointers, would be my first advice
 
10:02 PM
@JerryCoffin Right, but once I want to transform that stream into a data structure it's scoped. Does that mean the data structure dies once I go out of scope?
 
Change the scope of your object
and don't use pointers
 
just return it from the function.
/solved
 
@Puppy I thought that you lose the information if you return - it just returns a copy of the object?
return the object itself*
 
yes copies
 
a move, actually
 
10:05 PM
Oh :/
 
fairly important distinction when dealing with non-copyable stuff.
 
C++ has value semantics by default
unlike Java, which I think has reference semantics (or does it?)
 
So I really should write my code without pointers, and then optimize if needed?
 
@sdasdadas Yes, of course (all locals are destroyed when they go out of scope).
 
no.
 
10:06 PM
@sdasdadas Use pointers wherever you can, they are faster (also pritty stars *****)
 
@TonyTheLion not... really.
@dolan shut up
 
user457812
Everything should be pointers. Cast your integers to pointers. Let your children grow up to be pointers.
 
Java has value semantics but those values are almost always references.
 
@Puppy I knew I was wrong before I wrote it.
 
@Puppy ~can't bin me~
 
10:06 PM
but trying it, at least I learn something
 
it's easy to get confused
 
So any time I create something locally, if I want to use it outside of the function, it needs to be some type of pointer?
 
no.
 
@sdasdadas Absolutely
 
shut up dolan
 
10:07 PM
@Puppy damn, the subtlety
 
@sdasdadas You should use pointers if and only if they reflect your real intent, not as an optimization (especially prematurely, but even otherwise, mostly).
 
user457812
Far as I know, Java only has value (or pass-by-value) support for its primitives (i.e., integers and floats).
 
@Puppy How would I use local data if I don't turn it into pointers? Or that data is also copied when I return the encapsulating object?
 
it also passes class references by value.
 
@TonyTheLion Java lacks the degree of integrity necessary to characterize the language as a whole this way.
 
10:08 PM
@sdasdadas Moved, not copied. And yes.
 
@JerryCoffin ok
 
user457812
Didn't know it passed class refs around by-value, but that sort of makes sense in a weird way
 
as long as you don't return a pointer that points to a local variable, then you're pretty much good.
 
@sdasdadas Don't listen to Puppy, he's not good at pointers
 
@nil the reference itself is copied
 
10:09 PM
Ok, I think it makes sense a bit, thanks
 
just like pointers are passed by value
ie, the pointer itself is copied
 
@sdasdadas When in doubt add more stars
 
user457812
@TonyTheLion Talking about Java.
 
that caught me out a few times....
@nil I know, analogies
 
@dolan :*
 
10:09 PM
@dolan you bastard
 
@nil It's trivial to imagine, if you have something like void f(String s) { s = "Hello"; }, then the caller of f doesn't have their value changed (which would be reference semantics). Instead the caller's local copy of s is changed (value semantics).
 
@Loopunroller My suitcase
 
So would I be right if I said C# has reference semantics?
inb4 you're wrong
 
if you use the ref (or out, I think) keyword it can have reference semantics, yes.
but by and large it doesn't.
 
10:10 PM
@TonyTheLion No it's value except for ref/out params
(also __makeref but that doesn't count)
 
of course, in both C# and Java, the values are typically references, which is where the confusion comes from.
 
user1804599
They are actually pointers.
 
They are both, and neither
Sticking to C++ terminology for this discussion won't be very productive
 
pointers are a bit strange as they can exhibit both value and reference semantics.
 
user457812
10:13 PM
I would call them weak references but that's a different thing
 
that is indeed something totally different.
 
Xeo
> Starting in November, after the current WWI mini-series has come to an end, we'll produce our next mini series on the Sengoku Jidai period of Japanese history.
Oh cool, just saw that
 
ah fucknuggets, I've got an interview tomorrow
 
user457812
I've got.. PHP development.
 
user457812
And then AngularJS stuff.
 
user457812
10:20 PM
Because my job has me working in stuff I don't have a background in.
 
user457812
I am the person who gets thrown at stuff for lack of a concrete role. ಠ_ಠ
 
Xeo
@Puppy gratz?
 
nervous
also I feel tremendously sick for some reason
fucking pills get cracking
I'm starting to think they're losing their potency
 
Xeo
that's probably the nervousness too
 
nah
 
10:24 PM
it's called butterflies
comes from doing things irl
 
I'm definitely starting to think that the pills are losing their pop.
 
Xeo
@Puppy Stronger dose?
 
thinkin about it
 
user457812
I remember thinking that when I was on anti-depressants, but that's different
 
I lost my good sleeping habits
 
Xeo
10:25 PM
Hm, I should've bought something to drink today
I've had maybe 0.5l of water today
 
I dunno
these guys want to ask me about my long-term career aspirations.
 
Xeo
my head's telling me, through a coming headache, that I should've drunk more
 
can't a guy just focus on his immediate needs?
 
user1804599
drink now
 
@Puppy making progressively greater amounts of money each month sounds like a valid long-term career aspiration
 
Xeo
10:27 PM
Nah. You must've planned out your whole life, and the one after that before applying for a job.
@rightfold Guess tap water will have to do.
 
user457812
I didn't get asked about long-term aspirations for my job.
 
user457812
Probably 'cause the people here are aware that's a stupid question.
 
Xeo
yeah, I didn't have that either
welp, time for sleeps
 
fuck.
why did I let my mother take away my bucket.
3
 
10:33 PM
jesus
wow I missed my avatar so much. and the starboard.
 
Welcome back.
 
ugh.
maybe it's just my fate to eternally be sick at home.
 
@LightnessRacesinOrbit Aw. I thought you changed your avatar.
 
user1804599
10:51 PM
Editing a Vim with a background process that outputs request logs to the foreground is not fun.
 
I'm so frustrated.
 
shameful jefffrey
 
user1804599
/me gives Jefffrey a blowjob
 
@Rapptz Jefffrey isn't shameful (or saneful), just sameful.
 
@rightfold There's a userscript I'm using that makes /me turn your text italics.
tests
 
user1804599
10:55 PM
Make it add asterisks.
 
> At home, in my spare time, I've still attempted to start game projects and finish them. However it just seems to fail. I have a hard time finding the "spark" anymore. It's a weird thing though, because I still love games, and I still love programming. Hell, I can even feel a want inside me to develop games, it just seems like I'm stuck in a rut.
 
Oh it's this.
45
Q: SE Chat Modifications -- Keyboard navigation and commands for chat

Tim Stone Screenshot Use /command shortcuts to perform common chat tasks: See message history inline: Easily preview replied-to messages: And much, much more... About Legends tell of a prolific Meta Stack Overflow chatter who despised using their mouse above all things. In an effort to keep t...

 
> Editing a Vim
 
> An evil circle of feeling the pressure to have to make something so I can prove to myself that I'm still the developer that I was when I was younger. An increasing need to produce results so others can see that I am indeed a good programmer. This, coupled with the fact that I never seem to be able to finish even simple projects because I just lose the want to do it, have just made me lose all motivation and drive. It feels demoralizing.
This guy knows me.
 
he needs to discover "Stealing other people's solutions to problems"
 
10:57 PM
he needs to discover state benefits
 
user3010322
He needs to join State Farm.
 
22
Q: Is it bad if all my kittens starve?

StudokuI accidentally left the game running, winter happened and all my kittens starved. It's sad but it took almost no time before new kittens replaced them. Is there a major downside to starving all the kittens in the winter and replacing them in the spring?

 
@Jefffrey Whats that?
 

« first day (1433 days earlier)      last day (3514 days later) »