« first day (780 days earlier)      last day (4183 days later) » 

3:00 AM
well I tried about 6 different things but yeah I give up :|
 
@Xeo I think the kernel is Obj-C free. That's the key difference between NextStep and Darwin.
 
Xeo
#include <type_traits>

template<int I, int... Args>
struct sum : std::integral_constant<int, I + sum<Args...>::value>{};

template<int I> struct sum<I> : std::integral_constant<int, I>{};
 
They employ plenty of monkeys to write Obj-C interfaces for the smart guys. Apple didn't make everyone drink the same kool-aid, at least when I was there.
 
Xeo
@Rapptz ^^
 
meh I would have never found that out
 
3:03 AM
@Xeo Heresy! template<> struct sum<>: std::integral_constant<int, 0> {};.
 
Xeo
Or if you want to leave out integral_constant
template<int I> struct int_{ static constexpr int value = I; };

template<int I, int... Args>
struct sum : int_<I + sum<Args...>::value>{};

template<int I> struct sum<I> : int_<I>{};
@LucDanton Pff.
@Rapptz The sum of all arguments is the first value plus the sum of the rest. Makes sense, or not?
 
I've rarely used <type_traits> before, let alone std::integral_constant
 
Xeo
That's why the version without it.
It's basically just a template<class T, T Value> struct integral_constant{ static const T value = Value; /*and a bunch of typedefs*/ };.
 
Well I understand it a little I guess
 
@Xeo Suppose I want to flatten std::tuple<Tuples...> to std::array</* compute common type here */, N>, N would be sum<typename std::tuple_size<Tuples>::type...>::value right? I'd like to get std::tuple<> working for free.
More simply, it's about 0, 1, infinity.
 
Xeo
3:09 AM
Nn, true
 
good evening sirs
 
Is it a stupid question if I don't get where value came from?
 
Xeo
Which one?
sum<...>::value?
 
yeah
 
Xeo
It's inherited from integral_constant (or int_).
Inheritence is awesome for composition when doing TMP.
 
3:11 AM
Ah I see
 
In case it isn't clear, members named type and value are a convention, they're not magical.
 
@LucDanton To a sufficiently anal person, any convention is magic.
 
type_traits seems cool
 
@Potatoswatter I disagree.
 
do you guys actually use type_traits in your day to day work or it's for fancy "theoretical" side projects?
 
3:13 AM
I don't have day to day work, I'm a hobbyist. Keep in mind that's new in C++11, too.
 
Xeo
Well, since I currently have no "day to day work"...
 
I don't code much since I work 12 hours a day and lack motivation to code after working
 
It's sad but I've replaced some of what I consider to be core stuff of <type_traits> by my own things, because some of them are flawed.
std::result_of really is pointless for instance.
 
I see
my first lead programmer in the games industry prohibited almost anything that had to do with templates (to be honest, Visual Studio .NET (the 2002 version) sucked... with templates)
things changed since then, but we never do fancy stuff with them
 
> It is in progress. Mostly implemented, but the patch is held by employer disclaimer, at the moment.
Ref-qualifiers support in GCC.
 
3:34 AM
LOL @ writing a GCC patch at work and losing it to lack of "free software" clearance
 
You're delusional.
 
@ITNinja What was that about plastic containers?
 
@Pubby wrong chat.
:)
 
3:53 AM
I think there should be a social networking spinoff. faceoverflow.com — Kip Jun 30 '09 at 13:24
^^ Just discovered that.
 
Xeo
Oh man, I got lost in spacetime, quantum-theory, wormholes, final states of the universe and similar stuff again on Wikipedia.
Time to head to sleep and dream about time-travel and similar shenanigans again.
 
night
 
Interesting, you can't have a pure virtual destructor marked with default.
 
Xeo
G'night.
 
Night Mysticial.
 
Xeo
4:06 AM
@chris With an out-of-class definition?
 
@chris I'm not going anywhere...
 
Oops. I missed the second line of that comment.
 
Xeo
struct X{ virtual ~X() = 0; } X::~X() = default; ?
 
@Xeo, Maybe. I figured if anything, virtual ~X = 0 = default; or switched would work.
 
Xeo
Nah, you get one or the other.
It's the same as having virtual ~X() = 0 { ... }, which also doesn't work.
(= default and = delete count as definitions)
Anyways, really off now.
 
4:10 AM
Good night, this time to the right person.
 
I'd like to sleep, but I've an annoying homework due tomorrow...
 
@xeo Gniiiight.
@Mysticial What kinda homework?
 
distributed systems
 
Um.
I'll pretend I know what that means!
 
Can't just farm it out to someone else? ;vP
 
4:22 AM
creates throw-away account, crowd-sources it on SO to break the record for fastest question-banned account
 
Lulz.
 
It's not that easy actually. I'd need another ip address.
 
Can't you just be somwhere else on school property and get a new one?
 
Nothing a distributed system can't handle.
 
^^
 
4:28 AM
Get someone else to crowdsource it for you.
 
And by the time that works out, I'd have already finished the homework the normal way. :)
 
Xeo
Get a distributed system to crowd-source it for you! Oh wait...
(Sleep typing, no questions.)
 
It's just a latency issue.
 
I've always been wondering how much answers factors into the question ban.
Suppose you have 100k rep and no questions.
Would it still take 2 or 3 bad questions to get banned?
 
They never ban anyone without a suspension first, so it's safe to try and find out.
 
4:33 AM
@Potatoswatter Question bans don't involve mods.
It's also been confirmed that disassociated posts don't count towards your ban since they are no longer on the account.
So technically, you can exercise your cc-wiki rights to remove all bad posts from your account.
But it's also been made clear on meta that doing so will likely get your account manually suspended. haha
 
It's been a while since I read the policy, but doesn't that just imply the policy to suspend first will be applied with mechanical reliability? Anyway, back to work…
 
Nope, there's no manual intervention for the question ban.
There hasn't really been any cases of this type of abuse though. Anyone who knows the system enough to see this "loop-hole" is already established enough to not be at risk of question ban.
Here's a good read:
77
Q: This guy keeps changing profiles to crowd-source his project

Ayman SafadiThe title pretty much sums it up. I could find at least 8 questions and 3 profiles just today. Is this abuse? Should I do something about it? What can I do about it? http://stackoverflow.com/questions/8694007/it-should-display-a-number-which-is-the-number-of-buttons-selected-but-it-is-not http...

 
4:52 AM
Also, the switch statement ends with a semicolon. — Josué Molina 3 mins ago
^ Eh? I'm pretty sure they don't need terminating semicolons in C++.
 
You're correct. They don't need a semicolon.
Only classes do. (and possibly other strange C++ constructs that I'm not aware of)
 
wat
 
@Mysticial I left a comment to that effect.
But that's a first for me though. You would think anybody who has seen any C++ code would know that switches don't need semicolons in their typical usage.
 
The switch statement does need a semicolon when used in statement form, like all simple statements. Which is useless so it doesn't really happen.
 
statement form?
 
4:55 AM
switch(42) ++i;
 
um... I didn't even know that was valid.
 
The compound statement (i.e., blocks) doesn't need a semi-colon.
 
user406009
WTF?
 
It is called the switch statement.
 
user406009
@LucDanton What does that even do? switch(42) ++i;
 
4:55 AM
for(;;) ++i; and so on
 
It's no different from while(condition) some_code(); in terms of grammar.
 
@Lalaland Let me check the semantics, I only read the grammar.
> If no case matches and if there is no default then none of the statements in the switch is executed.
 
So basically, switch(42) ++i; is useless.
I wonder what made the commenter think that switches require semicolons.
 
switch(foo) case 42: ++i;!
 
user406009
Would that be equivalent to if(foo == 42) ++i; ?
 
5:00 AM
Yeah, but it's extensible: you can add more cases after the semicolon and get syntax errors!
 
@Lalaland Not if foo isn't an integral type. If foo is some user-defined type, I'm pretty sure it wouldn't work with a switch statement unless it has a conversion operator to an integer.
 
5:14 AM
Nice... "Happy morning" got flagged...
Somebody is either really flag-happy, or there's some important context that we're missing. :D
 
4
Q: What are copy elision and return value optimization?

Luchian GrigoreWhat is copy elision? What is (named) return value optimization? What do they imply? In what situations can they occur? What are limitations? If you were referenced to this question, you're probably looking for the introduction. For a technical overview, see the standard reference. See common ...

 
...Why is there a feed for Luchian
 
The question got the tag added to it.
 
I see
 
are the un managed sections in C++/cli to be refered to as C++/cli or just C++ win32?
is the term unmanaged C++/cli right?
or should you just refer to those parts as C++
and is it any different from C++ u'd find in a stricly win32 project
 
5:23 AM
@Rapptz why not?
Also, I did not tag that C++faq
 
yeah someone else did
 
Now I see
guess I shouldn't just dismiss notifications
ahhh... it was right under the notification that I'd gotten this - stackoverflow.com/badges/521/memory-leaks?userid=673730
0
Q: clamping unsigned ints

user987280What is the correct way to clamp unsigned ints? For example, say I have: unsigned int ui = 5U; Now I want to subtract a value from it: ui = Clamp(ui - MAGIC_VALUE, 0, 255); I would like ui to contain 0 if MAGIC_VALUE >= 5. However, I can't just subtract MAGIC_VALUE as the expression ui ...

wth is clamping?
 
You have a frigging badge on ? wtf...
 
@LuchianGrigore Get it within a range
 
max(low, min(high, value)) kind of deal.
 
5:27 AM
@LuchianGrigore saturation
 
@Mysticial what's wrong with that?
 
@LuchianGrigore Nothing... it's just that I don't think of people getting tag badges in minor tags.
 
geez...
 
You've got one in openMP
 
5:30 AM
OpenMP isn't a minor tag.
 
and sse
that one has to be minor
 
also not a minor tag.
or not... only 3 of them.
Dammit, tag-badges should be weighted.
 
what would that achieve?
 
Like you should be able to get the badge despite not having enough quantity if there are enough votes.
Like 1000 votes/200 answers or 2000 votes/50 answers... haha
 
Oh yeah - I'd be the only one with the badge.
Use srand once. — chris 4 mins ago
This guy again
@chris srsly dude?
 
5:36 AM
denied
 
6:00 AM
@LuchianGrigore, I know I've already done an answer with a fair explanation on why. I didn't feel like doing it again. Too busy reading :)
 
@chris always with the excuses.
 
@LuchianGrigore Just pick better questions to answer. :P
 
@Mysticial what makes you think I can answer better questions?
 
You're already doing better than most of us.
 
3 mins ago, by Mysticial
@LuchianGrigore Just pick better questions to answer. :P
Easy for you to say mr. 5k
 
6:05 AM
No it's not, just look at how low my answer volume is nowadays...
There simply aren't that many interesting questions anymore.
 
True, I don't see you answering all that many.
 
And when they do pop-up, I'm either too slow, or it's outside my area.
 
Interesting questions rarely earn any rep
 
Boy, the naz'gul or whatever they're called are really fucking stupid
 
naz'gul?
 
6:07 AM
those riders from the LOTR
these fuckers
 
ahaha
 
Any opinions on the new hobbit film?
Well, they're probably predictions at this point
 
is it out?
 
Not yet
 
Ratings: 9.2/10 from 6,241 users
how does it already have 6241 votes?
 
6:11 AM
Huh? That's strange.
 
user406009
I can't believe they are actually going to split such as small book into three movies.
 
@Lalaland what book? what 3 movies?
ah, it already premiered - Country Date
New Zealand 28 November 2012 (Wellington) (premiere)
 
user406009
@LuchianGrigore Tolkien's "The Hobbit" is a single ~300 page book. Hollywood is planning on making three "The Hobbit" movies.
 
@Lalaland Doing something to get 3x the profit isn't surprising for hollywood
 
Still better than porn, with "Naughty Cheerleaders XXVII"
 
6:13 AM
back door sluts 9
 
Who is DMX?
 
Earl Simmons (born December 18, 1970), better known by his stage names DMX and Dark Man X, is an American rapper and actor. In 1999, DMX released his best-selling album ...And Then There Was X, which featured the hit single "Party Up (Up in Here)". He has acted in films such as Belly, Romeo Must Die, Exit Wounds, Cradle 2 The Grave, and Last Hour. In 2006, he starred in the reality television series ', which was primarily aired on the BET cable television network. In 2003, DMX published a book of his memoirs entitled, E.A.R.L.: The Autobiography of DMX. DMX released a mixtape The Weigh In...
 
Only two months until I start a Java course.
I'm going to miss using operators.
 
user406009
 
6:22 AM
two months until you die
 
Though from what I've done in school, I shouldn't even know about operator overloading.
 
@chris Java is a rep-farm btw... :P
 
@chris Java has operators, just not overload-able ones
 
@Pubby, Yeah, which unfortunately expands throughout their huge libraries of stuff.
 
@chris Write C++, compile to .NET, decompile to J#, do minor translations to Java, and you're done without having to sully your hands (much) with directly writing Java.
 
6:23 AM
@JerryCoffin Sounds reasonable
 
I know some C#. Maybe I can pass that off as Java.
 
@EtiennedeMartel My friend Rube Goldberg thought so...
 
user406009
I wonder if it's possible to creating a working operator+ "override" using their stupid toStrings().
 
@chris Maybe, as long as you stay away from any of the vaguely interesting parts of C# (e.g., LINQ).
 
@chris Probably not. Your teacher will be like "Woa, this looks way too awesome to be Java."
 
6:24 AM
Write a C++ interpreter in Java and use that
 
Or, you'll have to stick to C# 2.0. But even then it's not a perfect disguise.
 
@Lalaland I don't think so, because you have to return another string.
 
I should argue that the course curriculum makes no mention of Java, so I shouldn't be forced to use it.
 
You could potentially encode whatever your data is into that string though.
 
@chris What is the class about?
 
6:25 AM
Except the curriculum was written using Java terminology.
@EtiennedeMartel, ICS4U
 
@chris What
 
It's all pretty basic stuff
And they have to assume you don't know any Java.
 
Ottawa? Wut?
Is that a high school programming course?
What is going on here?
 
Yes
 
6:28 AM
Oh, well, it's good you get Java then.
Would be hard to get crappy Java.
Any other language would get mangled beyond recognition.
 
I guess at least being familiar with Java is good.
Our school does C++ in grade 11 and some pointless beginner language in grade 10 that I did myself instead.
 
Java isn't hard to learn.
It's a great first language.
 
We don't have a grade 12 one any more, so I had to take it online.
Either way, high school programming course = finish in two weeks.
 
@Mysticial That depends on whether you let your "must KILL" reaction get in the way or not...
 
6:32 AM
@Rapptz Dat milkshake.
 
user406009
Well at least it isn't PHP.
 
@Lalaland, Thank Stroustrup for that.
 
That image reminds me of the milkshakes.wmv video I showed @Mysticial
 
7:19 AM
 
Photoshop fail?
 
@Mysticial Did you take the JLPT?
 
@Rapptz no, there's no way I'd do well.
 
@Mysticial win?
 
@Mysticial Really? I think you'd do fine.
N1 isn't that hard, N2 is pretty simple too.
 
7:21 AM
I can't speak any of it, and I understand less than 10% of what's said in Anime.
 
It starts getting a bit annoying at N3 because they start adding new sections
 
I should say "understand" is somewhat of a fuzzy line.
Since a lot of the times, I get a "feel" for what's being said - even if I can't translate it.
Actually that last sentence is the usual case for me.
I wish I had the time to actually learn Japanese and Mandarin to a usable level.
 
Well the way I learn things is pretty different than most people. Considering everyone says I'm not normal >_>
 
I'd be a lot better at Mandarin if my childhood babysitter didn't quit.
 
I don't speak Mandarin
I know some common phrases
 
7:26 AM
Look at this -> youtube.com/…
 
After she left, I lost all my Mandarin.
 
why the fuck don't they keep running towards her, where it's safe, and they start going downstream? idiot naz'gul
 
lol
Anime physics is more entertaining.
 
Oh my god that reminds me of that video on youtube that got taken down :(
There's a reupload with the annotations on it
 
laggy as fuck
 
7:33 AM
the video? yeah the video is laggy
 
yeah
 
that's why I wish I had the original but it got removed somehow
 
what show is this?
I might happen to have it
 
@Rapptz Its making fun of anime (ation). I think
 
@Mysticial Shinkyoku Sōkai Polyphonica
 
7:35 AM
nope don't have it
 
There is one without annotations but the annotations make the video funny.
 
I hate annotations, but this one made it fun. Have to pause to read all of them.
 
Yeah I usually hate annotations too.
 
WELP
 
?
 
7:45 AM
I suck at drawing.
 
8:26 AM
 
sbi
Hi. I just flagged this again for undeletion, as I think it's unfair that it's deleted. Also, there's a lot of crap answers highly-voted for, and a few good ones that desperately need a few upvotes.
 
@sbi did you vote to un-delete?
 
sbi
@LuchianGrigore "A moderator has deleted this post and it cannot be undeleted"
 
meh
I wanted to vote to undelete, but can't :(
 
8:35 AM
well... that sucks
 
cpx
I can see the question, is it deleted?
 
sbi
@TonyTheLion Just flag it.
 
@cpx the link was to a deleted answer.
 
sbi
My flag reads: "That this is deleted is very unfair. It's criticizing the dominant opinion, but that's not a bad thing, because the dominant opinion in this thread is Wrong™. Technically, this is one of the few sound answers. I already had toned down the ranting, so it really should be fit to be undeleted." Feel free to paste or to come up with your own.
 
cpx
I see.
 
8:36 AM
@sbi done
 
cpx
I thought they allowed everyone to see deleted posts.
 
sbi
@thecoshman I tried hard, but the necessary efforts are higher than I can afford to spend.
 
same here - as in I flagged
 
sbi
@cpx You need a certain rep level for it.
 
to keep it deleted, that is MUHAHAHAHAHAH!!!!
 
cpx
8:39 AM
I can't even see my own deleted questions.
I can find my deleted answers though.
 
sbi
@cpx If you have a link to it, you can see it.
 
@sbi You still need 10k to see even your own deleted questions.
 
sbi
@Mysticial Well, now that you say it... I can't see my deleted questions on meta.
 
I honestly don't see why it was closed - the faq clearly says asking for tools is okay on SO
wtf... it won't let me vote to re-open...
 
sbi
8:43 AM
@LuchianGrigore Voted to reopen. It takes another 4 votes, though.
 
sbi
@thecoshman Rincewind has an even simpler rule for deciding whether something is food: If it doesn't manage to wiggle off your fork, consider it eatable.
 
cpx
For me when last time I checked it said "page not found".
 
@LuchianGrigore Done. If anything, it's the wrong close reason.
 
@Mysticial principially != extremely
 
8:44 AM
@Mysticial can you find any closing reason?
also, thx
 
sbi
@LuchianGrigore "I don't like it."
 
sorry... any valid close reason?
 
@LuchianGrigore Mildly towards "not constructive". But nowhere near close enough for me to vote-to-close.
 
Not constructive? In what way?
 
@Mysticial Yup. "Some level of jealousy". Probably. The kind that says it isn't fair that some questions get heaps of rep. That kind of unfairness isn't good for the site.
I mean, a modicum of that is what makes the site tick, but I wouldn't want to be seen encouraging it. Which is my reason for not asking the question myself.
 
8:47 AM
@LuchianGrigore By meta's current definition, it's a tool request/list question. But I wouldn't consider it anywhere near close-worthy. The question is fine.
 
but that's fine
Stack Overflow is for professional and enthusiast programmers, people who write code because they love it. We feel the best Stack Overflow questions have a bit of source code in them, but if your question generally covers …

a specific programming problem
a software algorithm
**software tools commonly used by programmers**
… then you’re in the right place to ask your question!
 
@LuchianGrigore as I read it, the difference is between asking about a tool (how do I do X with tool Y), and asking for a tool (give me a tool that does Z)
 
hmmmm... I've never thought about it that way
 
@jalf Spot on
"Give me teh codez" ~ "Give me teh toolz"
About 78.3% match
 
Yeah, more like 90% match
are you serious?
how is that even close?
 
sbi
8:56 AM
@R.MartinhoFernandes Hey, I was considering watching Skyfall. Are you in on that one?
@R.MartinhoFernandes Oh, so that guy is your dad?
@TonyTheLion Don't be a fool. He's now happy you gave him the idea.
 
@sbi lol
 
@sbi Sure.
Is it still on?
 
sbi
@TonyTheLion Really? I mean — what did the guy do before he had that role? The dishes?
 
hahaha
 
sbi
8:58 AM
@R.MartinhoFernandes I dunno. Wanna check? Cinestar Potsdamer Platz had all the English ones.
 

« first day (780 days earlier)      last day (4183 days later) »