« first day (1011 days earlier)      last day (3940 days later) » 

7:00 AM
@sehe “judgemental” – clearly talking about a female here
 
@sehe so far, it seems like no one else got it...
 
@KonradRudolph ... Meredith can be a man's name IIRC
@ScottW Nope. I mean mostly trolls, no substance
@jalf /care
 
So they want to ban porn in the UK by default, and you'd have to ask your ISP to enable it.
not sure what to think
@ScottW you are my substance <3
 
@KonradRudolph Not all judgmental people are female, nor are all females judgmental. The latter assumption is a matter of the bad ones giving a bad name to the other 0.01%.
 
@sehe It was a joke … if I say (imply) that “women are judgemental” then that’s obviously ironic, isn’t it? Being quite judgemental in itself …
16 secs ago, by Konrad Rudolph
@sehe It was a joke … if I say (imply) that “women are judgemental” then that’s obviously ironic, isn’t it? Being quite judgemental in itself …
 
7:02 AM
@KonradRudolph I knew that. I'd be sucker not to take you up on it though
needs citation
rofl
 
@KonradRudolph Reread mine and see if you think it's serious.
 
@JerryCoffin Happy belated Birthday :) :) :)
 
@TonyTheLion Thanks Tony!
 
@JerryCoffin Ouch. I read the 0.01% the other way round
 
7:05 AM
@daviesgeek You can stalk all users at once by watching stackoverflow.com/questionssehe 22 secs ago
 
@KonradRudolph I originally saw that line (or something similar) used about lawyers, but it seemed like it'd be funny here too.
 
@KonradRudolph %10.0 is still the minority :)
 
@sehe …
 
@JerryCoffin It was. I'm stumped not more people have starred it
 
I'm new to C++ and I'm trying to implement my own vector class for fun. It's in a template so it can take arbitrary types, the problem is that I can't achieve commutativity with the * operator. I read some answers on stackoverflow and it seemed this was due to my operator* function being a member function, and that I should just declare it twice outside of the class with the argument ordering reversed. I tried that, but it doesn't work because it says 'T' isn't defined.
Any pointers?
'T' being my typename for the template.
 
7:10 AM
Well, after trying it for a bit, I'm convinced that the "SkeetStalker" is pretty worthless. I set it to stalk myself, but I can't imagine wanting to answer most of the questions it suggested (and in quite a few cases, I see no commonality at all with a question I might answer).
 
@seth the operator has to be a template too
 
@seth int*
@seth Why do you want to make * commutative?
 
@jalf can you direct me towards some documentation to read, thanks for the response
 
In fact, how does operator* work on a vector?
 
Because it's just multiplication by a scalar.
 
7:11 AM
@seth First a question: why would vector implement * at all?
 
I'll implement dot and cross products with out operators for clarity.
 
aah … you’re talking about a mathematical vector
yes, that makes sense
 
yes, sorry if I was confusing.
 
@KonradRudolph how it works, simple. Just: what does it do...
@seth We're all brainwashed to think vectors are glorified arrays with automatic storage management (std::vector)
2
struct Vector
{
      friend Vector operator*(Vector const&, int); // note: nonmember fn!
      Vector operator*(int);
};
 
understandable, what interested me in this was my recent use of std::vector for strings and doubles. I wanted to see if I could recreate at least the double behavior.
 
7:14 AM
@seth don't you have a C++ textbook? I'm not sure what documentation to give you on "how to make a function a template"
 
^ something like that should do
 
You'll have to define the function twice if it's for scalar quantities.
 
template <typename T, typename Scalar> T operator*(const Vector<T>& lhs, Scalar rhs);
 
@sehe Not entirely -- but you do run into a problem: it's not immediately clear whether A * B means a dot product, cross product, or scalar product.
 
one for Vector operator*(scalar, Vector) and another for Vector operator*(Vector, scalar)
 
7:15 AM
@jalf I do not, but I know there is cplusplus.com and thought there may be other online resources. I come from a Python background, but wanted to learn a lower level language (not C yet). This isn't for school or anything, just personal interest.
 
Also it'd be unclear what operator* does for Euclidean vectors.
@seth cplusplus.com is crap
 
@seth If you want to learn C++, you really should get a good book
 
@JerryCoffin … or a declaration.
 
@seth Warning: you're unlikely to find anybody here who thinks highly of cplusplus.com.
 
It is not really an "online tutorial" kind of language
 
7:16 AM
this is more of an exercise in having an idea and following it through in C++ than it is in a practical and unambiguous implementation of mathematical vectors.
 
@KonradRudolph Of course, that's possible too, but it's usually fairly clear when that was intended (not always, but usually).
 
Oh, I didn't know of the taboo, it's just what has provided me with the most immediate answers to my syntax and function argument questions.
 
@seth Slightly more elaborated: ideone.com/9guFEF
 
@Mysticial Ahhh. So that's why it got voted up so much.
I was so confused. How do you check that anyway?
 
@Rapptz it got upvoted because it was the highest upvoted A in the last 24h?
 
7:18 AM
@sehe After the initial 10, it kept being upvoted over time.
That usually never happens after all interest of the question dies out :/
 
@Rapptz It would have been amazing if it were the other way around
 
@seth It’s not taboo, it just contains some mistakes and seems resilient to fixing them. There’s an alternative (en.cppreference.com) which is a Wiki and thus everyone can just fix mistakes – and it’s generally considered to be superior
 
@sehe It probably got upvoted enough to make it onto the multi-collider, which produced more up-votes. May have done well enough to make it into the newsletter tomorrow, and if so that'll probably help it even more.
 
Oh. The popularity contest part of SO. Oh how I like that.
 
Damn, the weather here in Cambridge flipped, now the forecast for the whole week is rain instead of sunshine :/
and I had a boat trip planned today :/
 
7:20 AM
@KonradRudolph thanks, I will bookmark that.
 
SO seems to consider 'populism' a-la reddit a "bad thing", while fueling the the selfreinforcing vote circle is more or less moving in the same direction (not that I don't see a difference)
 
I spent most of my effort making the table truthfully lol
 
@seth Yup it's the best online reference outside of the standard (chat.stackoverflow.com/transcript/message/10775830#10775830 <--)
I bailed out: http://stackoverflow.com/questions/17792878/boost-spirit-permutation-of-rules/17796980#17796980 ended up doing a screen shot
Also: unfair vote distribution :)
 
JBL
Good morning.
 
Moawning
 
user142019
7:24 AM
Favorable morning.
 
Today is a great day
 
user142019
Hoe kom?
 
JBL
@sehe How so ?
 
Wieso?
Perché?
@rightfold Just thought I'd be the first to mention it. Save you the work :/
 
Xeo
Mornin
 
7:29 AM
morning
 
user142019
7:41 AM
Good moming.
 
@sehe I tried using a template as you said, but I'm not sure if I'm doing this the best way. ideone.com/yS3PHk
 
user142019
std::array<T, 2> values;
 
user142019
Normal arrays are quirky.
 
@seth so much indentation... ;)
Anyway, looks pretty reasonable to me
 
Yeah in my IDE it shows up as 2 spaces, but when I copied it over they are tabs. I'll try to fix that.
err not IDE, just sublime text 2.
 
7:49 AM
oh, except the parameters should be passed by const reference, not just reference
 
@ScottW WHAT?
 
I know you should pass by reference if you can to avoid copies. Is const just so the compiler knows that won't be changed?
 
Xeo
can't be changed
 
The reason I removed the `const` is I get the following errors:

lc.cpp:27:34: error: passing ‘const Vector<int>’ as ‘this’ argument of ‘int& Vector<T>::operator[](int) [with T = int]’ discards qualifiers [-fpermissive]
lc.cpp:27:34: error: passing ‘const Vector<int>’ as ‘this’ argument of ‘int& Vector<T>::operator[](int) [with T = int]’ discards qualifiers [-fpermissive]
 
@seth mainly it's to avoid compile errors. What'd happen if I wanted to multiply a const vector by a scalar? Your operator wouldn't work because it expects a reference to a non-const vector. :)
whereas if I pass a non-const to a function expecting a const, then it'll just silently add the const
 
7:52 AM
I see
 
wtf typo
 
JBL
Iterator == vector ?
 
well, I meant vector ;)
 
JBL
Haha !
 
@seth the problem is that the member function itself is not marked const (so it requires the this pointer to be non-const, and so calling it on a const object causes an error)
 
Xeo
7:53 AM
@seth Needs int const& operator[](size_t i) const
(FWIW, I really dislike that we have to overload to get both const and non-const versions. There should be a better way.)
 
@Xeo why do you need a non-const version?
 
That makes sense, thanks. I haven't used const (how do you do code snippet format in chat?) after the arguments of a function before, I need to read about this.
 
Xeo
For example for a non-const return type, like with operator[] here.
 
Awesome, interesting gotcha:
4
Q: Shared pointers delete recursive data structures recursively and the stack owerflows

John BumperI have a number of long linked lists (they have up to 20,000 items). They have different beginnings but they can eventually point to the same node from some node onwards. I've decided to let such linked list to grow together and share the memory between them. That is why I ve decided to implemen...

hadn’t thought of that at all
 
@Xeo but it returns a copy. That's completely orthogonal to the constness of the function, isn't it?
 
Xeo
7:57 AM
@jalf int &operator[](int index)
 
@KonradRudolph heh, nice
 
Xeo
The & is weirdly placed, but it's there
@KonradRudolph Yeah, not much you can do about that, though.
TCO would be nice, though
 
@Xeo oh right
 
I have always put & and * before the variable names, is that an uncommon convention?
 
Xeo
In C++, I'd think so
 
7:58 AM
@seth depends on who you ask
 
Xeo
It's part of the type, so I group it with the type.
 
I tend to group it with the type, but our official coding style at work is to put it with the variable name (and I always forget to do so)
it's not a big deal. Just do what you like better
afaik the only real reason for grouping it with the variable name is to avoid confusion when you're doing int *i, *j;, to which my answer is "don't do that in the first place"
 
Xeo
Yea
 
Xeo
FWIW
11
Q: Why is it thought of 'T *name' to be the C way and 'T* name' to be the C++ way?

XeoNote: This question is about the position of the asterisk (*). In most C code I see (e.g., in Beej's guide to network programming), all variable declarations / definitions use the T *name format, i.e., bind the * to the variable name. The pointer is thought of belonging to the variable, not the ...

 
8:01 AM
@KonradRudolph the lightsaber boomerangs are priceless.
@Xeo thanks
 
@Xeo That answer needs some cleaning up.
Oh wow, that's how Bjarne typed it.
Bjarne needs some cleaning up.
 
Yeah I had been thinking about it the C way.
 
@Rapptz yeah, it took me a minute to parse that
 
@Xeo update the link too, since you beat me to it.
Honestly the T *foo, *bar; thing never happens in C++.
 
Xeo
8:07 AM
7 mins ago, by jalf
afaik the only real reason for grouping it with the variable name is to avoid confusion when you're doing int *i, *j;, to which my answer is "don't do that in the first place"
 
Damn. getenv is retarded.
 
Xeo
I will agree that this is a marginally better answer than mine, though it says approximately the same thing with a more subtly expressed opinion bias (but at least it's a famous person's opinion bias, and I guess that counts somehow). But I will say I wasn't aware of this Stroustrup quote when I wrote my answer. So it's amusing that we both said basically the same thing. — Omnifarious Jun 24 '11 at 22:42
This is comment is just... I don't know, it feels like it's blaming me for accepting this answer.
 
Is getenv implementation defined or something?
 
Xeo
No clue, it comes from C's runtime support library
 
Guess I'll just use WinAPI, seems strange tbh. I just wanted to get the PATH environmental variable.
but it only gives me C:/mingw64/bin, where g++ is found lol
 
8:12 AM
The Surprising Subtleties of Zeroing a Register http://randomascii.wordpress.com/2012/12/29/the-surprising-subtleties-of-zeroing-a-register/
^ relevant /cc @Mysticial interesting article
@Rapptz Because it returns a nullptr on missing vars?
 
Because it's lying to me :(
This is interesting
7
Q: Are 42% of human deaths worldwide from abortion?

CoomieLately, social media has been flooded with all sorts of "facts" about abortion. This one in particular caught my attention: "42% of yearly deaths in the world are from abortion" I don't want this to degrade into an argument about what "death" is, so for the sake of the clarity assume abortion...

 
> If current rates continue, it is estimated that 35% of all women of reproductive age in America today will have had an abortion by the time they reach the age of 45
 
Nov 18 '12 at 2:05, by R. Martinho Fernandes
Ok, here are my thoughts, @sehe: personally, I prefer to make circular lists with sentinels, as that gets rid of any special casing for the front (it requires slightly more complex code, though); that aside, using unique_ptr for next pointers can result in stack overflows, so I don't like it either (your clear function gets it right, but your default destructor doesn't!).
 
uhm, wow
 
I love this room ^
 
user142019
8:18 AM
@sehe Also don't forget that the compiler could optimize out zero-initialization if you assign it yourself.
 
@Rapptz I’m actually appalled by the statistic. Granted, the numbers are shaky but at least it’s from an independent, unbiased organisation
 
user142019
int should be zero-initialized. UB is retarded.
 
@rightfold I'll keep it in mind. Althought that article is more about the chiplevel
 
@KonradRudolph Yeah I was surprised.
 
According to the CDC, half of all pregnancies are unwanted, and half of that get abortions
 
user142019
8:19 AM
Even better, make using an uninitialized variable an error like in C#.
 
@rightfold Yeah, zero-init with opt-out. I want #pragma unsafe or similar in c++2z
 
people! Have you heard of contraception?!
2
 
@KonradRudolph can you imagine how few people want pregnancies [to be]
 
@sehe Well like I quoted above, about half
 
@KonradRudolph That's after contraceptives!
 
8:21 AM
@sehe Well I’m not so sure
That said, the statistic is still grossly misleading
Most pregnancies [citation needed] are spontaneously aborted within a very short time after gestation
Those numbers are completely absent in the statistics, and they would eclipse the cited “abortion” numbers
 
user142019
Is there an implementation that throws an exception or something similar if you use an uninitialized variable in debug mode?
 
user142019
Can easily be checked with a hidden Boolean.
 
@KonradRudolph It's misleading statistic day
In fact, about 0.27% of the yearly misleading-stats quota was predicted by the MSB for today.
 
Actually, yesterday won the prize
 
@rightfold a hidden boolean for every variable in your program, you mean. :) I'm not aware of any (valgrind might be able to help you though)
 
8:27 AM
when that ninny John Carr claimed that up to 50% of men who view child porn go on to harm a child
 
user142019
@jalf Yes. I don't care in debug mode.
 
What a complete retard
 
@KonradRudolph I saw your tweet. That's why I mentioned it ^
 
My god, why can you lie like this to the public with impunity?
 
> Unknown exception
How is that useful to me???
 
8:28 AM
Unknown
 
user142019
@TonyTheLion I don't know.
 
@TonyTheLion I agree. A better message would be
> I think I managed to avoid crashing the process here. Cross fingers
 
@rightfold MSVC's debug mode has some uninitialized variable checks.
but nobody sane would throw an exception if one was failed.
 
@DeadMG Statically C# Requires Definite Assignment
 
user142019
> or something similar
 
8:33 AM
or do anything similar to throwing an exception
once an implementation discovers such a bug, the only sane response is to terminate the program.
 
user142019
Remotely similar. :P
 
er, not at all.
 
user142019
They are both things you can do when an error occurs.
 
@DeadMG and lose place where the bug is? with exception you can get its call stack.
also, if you got a bug you still might want to dispose resources in correct order
 
user142019
Break.
 
8:43 AM
@Abyx Er, I don't know what debugger you're using, but for MSVC, if you try to terminate the program, it will break rather than terminate.
 
I don't always run stuff under debugger
 
user142019
Then don't complain about not being able to see stack traces. :V
 
morning
 
user142019
We were talking about debug-mode-only behavior, after all.
 
you don't need a debugger to get stack trace in .NET
 
user142019
8:46 AM
@NikiC Hallo!
 
screw .NET anyway.
 
user142019
.NET > C++
 
.NET is not a language.
you can't compare them
 
Also, fuck language wars
 
yep. no reason to have a war. C++ sucks and all other languages also suck.
 
8:50 AM
Why star that?
I mean, its silly
what has this room come to?
 
it's the Lounge
it always was like that
 
Yes, but we haven't turned into a complete loony bin have we?
 
no?
 
@Abyx lies!
@Abyx True. Its one mahoosive heap of ultimate suckage
 
I don't even want to know what's he's doing to cause conflicts with the boost namespace
 
8:55 AM
@jalf hmmm.
 
goddamn dog
she went on a barking rampage at about 4am
when I got back to sleep I had a dream about eating her
 
what a b!tch ... chilli hotdogs <3
 
Xeo
Cannibalism!
 
oh puppy.
 
lol
 
9:00 AM
neighbours dogs here has been annoying too - barking like mad at night. I wish them fleas!
 
user142019
@DeadMG Telkitty, get out of there!
 
Australia is so backwards .. all the royal reporting, few innovations.
 
user142019
Man.
 
user142019
Hero Fruitontbijt is the best drink ever.
 
user142019
But so expensive.
 
user142019
9:05 AM
0.75l costs over one fifty.
 
harhar
I drink the supermarket's cheapest cola
£0.17 for 2l.
 
user142019
Cola is nasty compared to Hero Fruitontbijt.
 
user142019
I'm going to buy a blender.
 
90.7s to compile a 45 line .cpp o_O
I must have done something horribly wrong.
 
Here we go
0
A: Are 42% of human deaths worldwide from abortion?

Konrad RudolphNo, the picture is not accurate. No, “"42% of yearly deaths in the world” are not from abortion. As Avi’s answer shows, the raw numbers are about right, albeit with a big uncertainty attached. However, the percentages are wrong because the 42% implies that the “total number of deaths” = “number...

gotta go now … pip pip
 
9:11 AM
freaking mineral water here cost $2 for 1.25 litre ... BUT IT IS WATER!!!
 
@DeadMG I used to drink that stuff lots, but I've stopped now, too sugary
 
I have when I have a tweet that needs 141 characters to end properly with a full stop.
 
Xeo
haha
 
Also, Cassini-Huygens is the best NASA mission ever. esa.int/var/esa/storage/images/esa_multimedia/images/2013/07/…
 
user142019
9:28 AM
What's a good existing brand of blenders?
 
BlenderMAX3000
 
Xeo
> It's convenient to implement multithreaded app, but I encounter progress bar problem.
lol
 
user142019
lol
 
@rightfold existing. Darn. Did you really have to add that requirement?
 
user142019
9:31 AM
@sehe See message below.
 
@Xeo He walked into a progress bar
4
 
hahahah
 
Xeo
I just noticed that boost::noncopyable uses deleted functions if available. Nice.
 
Somewhatbetterness
 
@KonradRudolph Like abortion?
 
9:36 AM
PSA A general thank you to you guys even supporting my Spirit answers even if most of you don't care much for
 
You wrote that in good spirits didn't you? :)
 
Xeo
As if @sehe would write in bad Spirit
 
@Xeo :)
 
@TonyTheLion Putting sugar in it would cost more than the end product does. It's sugar-free.
 
@DeadMG s/cheapest/worst/
 
9:44 AM
@sehe oh boy, glad some one will agree with me. It's cheap for a reason people!
 
Because it's easy to manufacture?
 
I buy the cheapest cereal.
Tastes the same as the more expensive one, sometimes a little better.
Plus it comes in a bag. I think that's cool in the cereal world.
 
@R.MartinhoFernandes Because they don't pay for the brand.
 
cereal doesn't come in bags o_0
 
@thecoshman It comes in a box with a bag.
The cereal I buy doesn't have a box though, it's just a bag.
 
9:46 AM
oh I see
 
@thecoshman and sometimes, that reason is simply "if we sell the same product at two different price points, we will make more money"
 
@Rapptz yeah I've found that with most cereals... except golden nuggets, yet to find a cheap version of those that comes even close
I'm not saying only the 'proper' brand is nice, but in my experience, your cheaper then water coke, tastes cheaper then water.
 
@R.MartinhoFernandes dat
@DeadMG and dat
But also, because they don't invest in things like nutrients, taste, thirst-quenching qualities and other things of note
@Rapptz Yup. Mine too. That is, sporadically. We eat cereals as a ... 'break' from routine.
 
Water <3
 
Coffee + Water
 
9:50 AM
@TonyTheLion you spelled rum very strangely...
 
AAAAAA
GUESS WHAT I GOT
 
BBBBBB
 
@BartekBanachewicz stubbed toe?
 
user142019
Hero Fruitontbijt > Water > Coffee
 
9:52 AM
@BartekBanachewicz MEASLES?
 
@rightfold Take your Python away.
 
@rightfold + you'll balloon if you consume it in quantities proportional to your subjective appreciation ranking
 
@rightfold has a snake?
 
user142019
How is Python related?
 
user142019
@sehe It tastes good I so I drink it.
 
@R.MartinhoFernandes Are you saying he should stop comparing dick sizes? I dunno, it's not that big
 
@thecoshman @sehe ^
wtf are measles anyway
 
@BartekBanachewicz You have two slides from an OpenGL presentation?
 
user142019
Measles (also known as morbilli, English measles, or rubeola -- not to be confused with rubella) is an infection of the respiratory system caused by a virus, specifically a paramyxovirus of the genus Morbillivirus. Morbilliviruses, like other paramyxoviruses, are enveloped, single-stranded, negative-sense RNA viruses. Symptoms include fever, cough, runny nose, red eyes and a generalized, maculopapular, erythematous rash. Measles is spread through respiration (contact with fluids from an infected person's nose and mouth, either directly or through aerosol transmission), and is highly ...
 
@BartekBanachewicz The opposite of autism.
 
9:54 AM
@R.MartinhoFernandes i have the whole presentation, of course
@sehe lawl
4.4 <3
 
Huh. I just copied a link from google results and it wasn't google-hijacked?!
 
maybe wiki links ain't
 
Xeo
@rightfold Comparision in Python
 
anyway time to grab coffee and enjoy this beatufil presentation
 
> The MMR vaccine controversy centered around the 1998 publication of a fraudulent research paper in the medical journal The Lancet that lent support to the subsequently discredited theory that colitis and autism spectrum disorders could be caused by the combined measles, mumps and rubella (MMR) vaccine.1
 
9:56 AM
now I know what Game of Thrones fans feel when the new book comes out
 
@BartekBanachewicz "Oh shit, it's not ending any time soon"?
 
user142019
@Xeo Ohlol.
 
user142019
CoffeeScript!
 
Xeo
@R.MartinhoFernandes lol
 
@BartekBanachewicz everytime a new GL version comes out, Khronos kills everyone you ever loved? :)
 
9:59 AM
@R.MartinhoFernandes lawl
@melak47 let's find out, huh
 
Plot twist: he never loved anyone.
 
@BartekBanachewicz ... <leak>
 

« first day (1011 days earlier)      last day (3940 days later) »