« first day (852 days earlier)      last day (4082 days later) » 

12:00 AM
maybe the downvoter was upset that you didn't propose a monotonically increasing time source?
 
I don't know
 
0
Q: Check for same instance of object using this pointer?

Edward BirdI have a std::vector which contains some objects. How can I use memory addresses (do I want to use the this pointer for this purpose?) to check whether I am doing something with the same object? For example: void particle::calcFrc(std::vector<particle>& particles) { vector3d tRel;...

More passive "what u mean no book?!" from me. Very effective.
 
probably a mis-click lol
 
This answer should be dead and buried long time ago
It's not even a difficult issue
 
@LightnessRacesinOrbit that's not bad code for a self-proclaimed "rookie"
 
@doug65536 This depends heavily on the driver. In the US, the estimates from the EPA (i.e., essentially the only mileage numbers anybody can quote) seem to be heavily biased toward automatic transmissions. My car (with a manual) has an EPA estimate of 22 MPG -- but I've never (not even once) gotten less than 30 MPG, and normally average around 35 MPG in normal driving, and close to 40 on road trips.
 
@JerryCoffin yes, a good driver can get excellent mileage. With a manual, the driver has a lot of opportunity to be great or horrible. AFAIK the EPA test is slightly uphill the whole time, with relatively quick acceleration.
my car has a 3.8L V6 and I get about 30 highway - on level ground. a slight hill hurts it quite a bit
the best thing for economy is a real-time display in the instruments. it's very cool to be able to see what a huge effect hard acceleration has on economy
if I hold it to the floor, my car is up to 12 mpg by 60mph
 
Wow, I just found the worst answer ever
-1
A: Java Shifting Array Elements Down

OldCurmudgeonYou should be using System.arrayCopy().

 
12:30 AM
@Doorknob far from teh worst though
 
@Doorknob if that's terrible, you haven't seen much
 
links? :P
 
@Doorknob I can't find any now, but there's been some that were clearly spam
 
Well I've seen those
like just a website url
 
Does someone here know how to sniff a webpage using firebug?
 
12:32 AM
@MooingDuck Or, php answers to a haskell question. Or, just bad advice alltogether
 
I remember a question that said the OP wanted "to do stuff" :P
 
That's NP hard
 
And one that said he wanted to buy Stack Overflow
 
Iterate all possible GUIDs (that was for a webscraping tool, interestingly. goes with the territory, I guess)
 
@Doorknob this guy's java course forces the students to do things wrong?
 
12:34 AM
Lol
@doug ?
 
@doug65536 Of course.
 
Like course forcing people to do things wrong was new
 
@Doorknob You definitely haven't seen much
 
@sehe Well, I've only been on SO for a little over 3 months :P
 
12:37 AM
Well, keep rep whoring. You will understand the sheer gamma of misguidedness that keeps repeating itself.
 
ok :P
oh, and has everyone seen this one? :P
-37
Q: Is there a way to buy SO reputation?

vikas devdeIs there a feature by which we can buy reputation on SO (e.g 100 rep for $1)?, or a bot by which we can hack and increase our reputation?

 
@Doorknob I totlloywould!!!
 
@Doorknob Favorited!
 
Lol
 
user1357851
I saw on a website you can buy reputation.
 
user1357851
12:44 AM
10 for $5
 
user1357851
I used twitter to whine & people gave me some :x ... I wonder whether they were from C++ lounge lol. Or maybe my rl friends, or maybe my online buddies
 
Link
Or didn happn
 
2
Q: Where's the proper Rule of Zero? Is it already done?

chicoHere's a article that talks about an idiom named Rule of Zero. Here's an excerpt: class module { public: explicit module(std::wstring const& name) : handle { ::LoadLibrary(name.c_str()), &::FreeLibrary } {} // other module related functions go here private: using modul...

 
1
Q: Can we have click-to-close back, please?

Lightness Races in OrbitThe new pop-up message style is pretty, I guess, if you like making text smaller and smaller, but I don't find its "close" mechanism very functional. Previously, this notification would go away when clicking anywhere on it; now with this smaller version, I have to move to an even smaller littl...

 
You failed to name a situation in which the idiom was not usable. And yeah, this "rule" is "already done". It's called modern C++ style — sehe 9 secs ago
 
12:58 AM
Huh?
> They can. Where is it written that std::unique_ptr can only deal with pointers?
@sehe How can you store a non-pointer?
 
hello all
 
Hello friend
 
@Pubby By replacing the deleter
 
Ell
Yeah like change it to a c style deleter function
 
I've been wondering, aren't all programming languages essentially the same? If they are turring compatible, then can't you do anything in any language?
 
1:01 AM
@Nathvi More or less
 
@CatPlusPlus But that doesn't change the type stored, right? It's still storing a T*.
 
Turing completeness is a necessity for a language to be useful, but doesn't say anything about the exact level of usefulness
 
@Nathvi With varying levels of everything, though.
 
Ell
You can do anything a Turing machine could do, but who on earth would rather programme assembly than PHP? ...okay bad example ;)
 
@Pubby We don't talk about what unique_ptr "stores". It's not a container, and its implementation on some platform is irrelevant
 
1:02 AM
indeed. but essentially it's just specialized functions for a task domain.
 
Brainfuck is Turing-complete and completely useless
 
@Pubby More interesting is for what object it handles ownership. That's a T.
@Nathvi of course
 
@CatPlusPlus, indeed.
 
@CatPlusPlus precisely
 
@LightnessRacesinOrbit Except the constructor takes a pointer....
 
1:03 AM
@Pubby So?
 
but nobody really uses that for industry...
it was created as a joke
 
@LightnessRacesinOrbit So how do you store an int handle in it?
std::unique_ptr<int, deleter>(get_handle()); // obviously incorrect
 
@Pubby I've made my wording a bit less loose. I was a bit quick on the typing
 
@Pubby What are you talking about?
@Pubby unique_ptr is not a container for arbitrary pointers
 
Ell
don't you use 'value_ptr<>' for that or something
 
1:04 AM
@Pubby it's not a container at all
 
@LightnessRacesinOrbit if I have a typedef int handle type, how can I make it a unique resource?
 
@Pubby you give it a pointer to a T and then it owns that T. that's it.
 
Ell
It's for raii, but an int doesn't do raii :3
 
@Pubby The way you do for absolutely any other type
 
Ell
Why would you need an int in a unique ptr
 
1:05 AM
@LightnessRacesinOrbit and that is...?
 
@Ell +1
 
@Pubby Do you actually mean to ask about making the thing the handle handles a unique resource?
 
unique_ptr is bad for general concept of handles though yes
 
@Pubby You seem to worry about owning values
 
@Pubby Because you're trying to combine two ownership semantics.
 
1:05 AM
What
 
Anybody know any good free OSX flowchart software? (I've looked on google already, which is why I'm asking people here, so don't give me "Google is your friend BS)
 
You can't have a handle defined by an int, and then turn around and ask how to make the thing that handle handles now managed by a unique_ptr at the same time
 
friend
lol
 
@Nathvi Google is your friend, and any answer provided here would simply come straight from there.
 
@LightnessRacesinOrbit Yes you can, it's called interop with C
 
1:06 AM
@CatPlusPlus I forgot you know best
 
@LightnessRacesinOrbit but you guys just told me you could! :S
 
@CatPlusPlus Go ahead, all yours
@Pubby You forgot to read one of my messages.
> Do you actually mean to ask about
 
@LightnessRacesinOrbit, thank you. I was looking for that response.
 
context change
 
Eh, do I really have to explain this
handle_t handle = foo_create_something();
foo_do_something(handle);
foo_destroy_something(handle);
 
1:07 AM
@LightnessRacesinOrbit probably
 
Guess the ownership
Hint: it's unique~
 
Uhoh. Someone is serial upvoting me. I think. Edge case.
 
Ell
Oooh pick me!
 
@CatPlusPlus No. The documentation will tell me. I shall not "guess".
 
OKAY ASSUME jesus
Documentation says it's unique
 
1:08 AM
@CatPlusPlus I will never assume Jesus.
 
RAIIfy this
 
XD
Jesus will assume you
 
And then look at the result and compare it with unique_ptr
 
in soviet russia, bugger right off
Serious lack of coherent words coming from you people
I'm offski
 
Ell
unique_ptr<handle_t, foo_destroy_something>(foo_create_handle(), &foo_destroy_something)
 
1:09 AM
Does value_ptr exist? Google shows nothing.
 
Ell
Idk I never got the hang of it xD
 
@Pubby There's a proposal, Robot has an implementation, Luc has an implementation
value_ptr is deep-copying unique_ptr though
So not what you need here
 
Ell
@pubby sorry about me mentioning that, I didn't know what I was talking about
 
Well, unless the resource is copyable I guess
 
Ell
I thought auto_ptr was copying?
 
1:10 AM
No
But then you hit the wall of "this is a pointer not a generic handle thing" anyway
 
Does anything like unique_handle exist? Like unique_handle<foo*> is essentially unique_ptr<foo>?
 
Unlikely
Handles are more often than not pointers
 
Ell
Just write an alias for that
 
(Even if they're not used as pointers)
@Ell Alias for what
 
Ell
The unique handle thing
 
1:12 AM
@Ell you can't
 
Ell
Why not?
Anyone got a date for valentines?
 
You can't alias a general case to a special case
 
Ell
Coldnt you do handle<T> = handle<decltype(*T)>?
 
No
(Whatever that would mean)
 
Ell
heh, I know what I mean :L
 
1:23 AM
@Ell Do wives count?
 
Ell
Wives do count
 
How in the world was this accepted?!?! stackoverflow.com/review/suggested-edits/1517067
 
@Pubby I have one, and boost has one too
 
@Ell Oh great. Yeah I have a date. In fact, it already started at 0:00am
 
@Ell auto_ptr moves when you think it copies.
 
1:28 AM
@ell You mean template<typename T> using unique_handle = std::unique_ptr<T>;
 
auto_ptr<thing> a = new data;
auto_ptr<thing> b = a;
//wait, a is null now? WTF?
 
Ell
Woah I just read the handle thing I just wrote, I must be very tired :P
And a being null there isn't that crazy I don't think
 
auto_ptr sucks badly
 
auto_ptr was as good as it could be
Trying to do what it wanted to do
 
those two things are not mutually exclusive
 
1:32 AM
Well it's C++
 
yeah, old C++ compilers copied so much you would think the C meant Copy
which meant people didnt do that and used hacks like containers of pointers
 
Ell
I'm gonna catch some zs, night all
 
@JohnTinio Tell us something interesting. Hell, just poste that wretched screenshot if you really cannot describe it. (But remember, we're not a code writing service) — sehe 19 secs ago
 
Sometimes I'm not sure if I am using C++ or just C+1
35 isn't a girl
Anybody got an good C++ jokes?
i wasn't ready
C > C++;
 
user1357851
1:53 AM
C++: Where your friends have access to your private members
 
@Mikhail Actually, C == C++.
 
C++: Where you make friends to touch their private parts
 
Question about lambda capturing.
 
Shoot
 
What is captured, exactly? The variable, or what it refers to (when capturing a pointer, for instance).
I'm asking because I got a function pointer as a function argument, and I wonder if I can capture it into a lambda without it going apeshit if I call said lambda after leaving the function.
 
2:02 AM
I believe it's the latter, it's capturing what its referring to.
Though you can specify.. Something like [&foo] rather than [&]
 
The variable is captured, what else
 
@CatPlusPlus So, it'll store the pointer and not, like, a reference to said pointer?
 
@EtiennedeMartel You can capture by reference or by value
[&x]() { ... } is equivalent to struct l { T& x; l(T& x) : x(x); void operator()() { ... } }; roughly
[x]() { ... } to struct l { T x; l(T x) : x(x); ... }
Not correct syntax whatever
You get the gist
Also capturing by reference does not affect the lifetime
So calling the result of std::function<int()> void make_lambda(int x) { return [&x]() { return x; } } involves using dangling reference
And it's bad
 
Yeah, in my case I'll capture by value, since it's a function pointer I'm capturing.
 
rlc
2:22 AM
hello all
 
hi
 
Look, Mikhail is online.
@Mikhail :)
 
I don't see him
 
@Mikhail I added a comment in this answer: stackoverflow.com/a/14865984/176769
 
rlc
just wondering: does anyone here think templates can be too generic?
 
2:26 AM
lol
@karlphillip thanks for the help. This thing has been haunting me for the last week. I wrote the back-end for a new kind of microscope, but the GUI is killing me.
 
user1357851
that is the point of templates
 
templates are generic in java
 
@Mikhail I see. It would be interesting to see the result you get after implementing the 2 modifications I suggested in that last comment.
 
user1357851
besides depends on how you implement the template it can be fairly specific
 
@karlphillip I'm waiting for qt to build then I will check it out!
 
2:28 AM
@rlc: concepts!
 
@Mikhail Alright, I'll hang around here for a couple of minutes. We can create a private chat to discuss that problem.
 
rlc
@Telkitty indeed. I'm just wondering if I'm about to go off the deep end...
@rici concepts are great - I love 'em. Too bad they didn't make it into the standard..
 
@rlc: yeah. Without concepts, I think templates can be "too generic", in the sense that concepts would let you contain the genericity
however, i can't be bothered to do it boost-style.
 
user1357851
@rlc Been there done that, wasted a day ... and I am afriad I did not reach the deep deep end.
 
rlc
@rici can't really do boost style where I am
 
2:30 AM
no sfinae?
 
user1357851
Recompile changed template header always takes forever if you work on a large system that use the template extensively
 
rlc
@rici I can do SFINAE - I can't used the Boost concept-check library
 
@rlc, condolences, I guess. personally, i'd rather have them in the language, anyway.
oh, well.
 
rlc
@rici me too, but some of the code I write has to compile with eVC4
so even if concepts were part of the language, it'll take at least another decade before I can use them in all my (new) code...
not the problem I'm having right now though (no eVC4 - or even VC6 - there)
 
rlc
2:49 AM
OK related question: does anyone here have a solution to having to explain simple constructs over and over?
@ScottW that doesn't work well in real life
or on white boards
 
Is there an LD_LIBRARY_PATH for include files?
 
rlc
you mean something like what -I does, but in an environment variable?
(and presumably at compile-time)
 
CPATH, if you're using gcc
 
rlc
CPLUS_INCLUDE_PATH for C++-only
C_INCLUDE_PATH for C-only
 
Thanks, CPATH did the trick
So I just used 12 compute nodes each with 32 cores to build a copy of Qt5 and Boost. It took about 15 minutes to build the Boost library...
 
rlc
3:06 AM
how long did it take to build Qt?
 
didn't do a time, but I would guess about 30 minutes with webkit
 
Yay, got my gold C++ :)
Looking at the recently awarded to list, I'm the second lowest rep on there lol.
 
@chris Congratulations!
 
@chris congrates!!
 
Thanks :)
 
3:18 AM
@chris Tends to work that way -- people keep accumulating rep unless they're among the few who quit.
 
user1357851
@JerryCoffin or like me, I intend to be the lowest rep person in this room for 12 consective months
 
Grats.
 
I'm surprised only 156 people have the gold C++ badge tbh.
I thought there'd be many more by now.
 
@Telkitty I'm impressed by your high aspiration.
 
It looks like C++ isn't that popular language
 
3:22 AM
All the cool kids are doing scala. Funking hipsters.
 
C# has 197. It's pretty popular.
 
user1357851
@JerryCoffin Some people try to be different, I am born that way :x
 
I wonder how many javascript gold badges
 
hmm, only 107
 
3:25 AM
@billz C++ is the seventh most-used tag on SO. Like most languages, it has far fewer experts than users -- but in the case of C++, I'd guess the percentage of experts (or even close to it) is even lower than in most other cases.
 
That reminds me of the Careers measurement, somehow I'm "top 10% in the C++ tag" and "top 20% in the C++11 tag", which is odd to me
 
@JerryCoffin yeah, totally agree
 
> The guys were then asked to explain why they chose that girl. The vast majority of guys didn’t notice the switch
 
There is this theory that sexual attractiveness in humans also comes from the kind of immunities we have (which is transported via smell, etc). So face isn't everything.
 
3:28 AM
@Rapptz Hmmm. I'm Top 10% in ~65 tags... lol Considerably fewer tags for 20%/30%
 
@sehe I'm top 30% for only 3 tags. I'm afraid I'm too lazy to count for top 10% though. Maybe if they listed top 1% or .1% it'd be more interesting...
 
user1357851
@JerryCoffin .1 percent would be one person
 
@Telkitty So your theory is that SO has only a thousand users?
 
user1357851
@JerryCoffin depends on the tag
 
user1357851
they could do top 10 reps for popular tags
 
3:43 AM
@Telkitty I think they're computing the percentages among all users of SO, not just those who've posted something in a particular tag.
@Telkitty They already do that (though separately, not on the Careers profile).
 
user1357851
Reminds me sometimes I could get things so wrong :D
 
@JerryCoffin are there many C++ jobs in US?
I feel there aren't may ppl using C++ in Asia, during the day, SO is always quiet in C++ catagory
 
@billz How many is "many"? Careers seems to be listing a couple hundred or so at the moment, and Dice.com, Monster.com, etc., list a lot more than that.
 
I mean the job percentage compare to Java or C# etc.
 
I think C++ pays more than C#?
 
3:48 AM
I found on seek.com.au, java jobs are 10 times more than C++, C# jobs are 3 times more than C++. SAD
 
Do you believe that somebody knowing C++ will have a hard time finding a job?
 
@Mikhail No (assuming they know it pretty well).
 
Top guys always don't worry about jobs
 
I recall I had a few interviews for C++ positions (backend) and I was never asked to write a template, so I don't think they need to know it pretty well. Instead opted for graduate school..
 
A quick check on dice.com: searching for "c++" gives 17383 hits, Java 17155 hits and C# 8942 hits. That's a long ways from definitive, but as an extremely rough guide probably better than nothing.
 
4:07 AM
@JerryCoffin that's pretty good result. and I see pay of C++ jobs are good in US
 
user1357851
Nowadays I don't know whether someone's being playful with me or is the person serious.
 
user1357851
They probably don't know whether me being playful or serious to start with >_<
 
4:34 AM
8*8=64. 64 combinations of "animance" in the google doodle.
Oh. I'm wrong.
 
user1357851
4:47 AM
@ScottW I don't mind people being playful ... as long as I win in the end >_<
 
user1357851
Here is an email I received just now:
 
@Mysticial Good or bad you think? I'm trying to push interesting questions pretty hard in a publicist experiment. I'm limiting the experiment to question/answer combos that I find very interesting.
 
user1357851
title was :
Yi, be our Valentine at XXXXX NYC 2013 - gift expires at 11:59PM 2/14/13
 
Hey all.
 
user1357851
I clicked on the link, it asked me to pay nearly a grand for some event
 
user1357851
4:55 AM
and it was 33% off
 
I have a question that I would like to post SO proper, but I am not sure if I am asking the right question.
Just wondering if anyone knows about partial template specialization...
or why: template<typename VertexTemplateType>
template<typename VertexType>
VertexType * Mesh<VertexTemplateType>::GetVertices<VertexType>() {} is considered partial template specialization ...
Isigh
 
user1357851
I wonder how did the person find out my email address.
 
phishing?
usually the way it works.
 

« first day (852 days earlier)      last day (4082 days later) »