wow some people when they are quoting put actually the '>' in front of each single line!
i became very depressed when I did back in my first SO days. And became quite happy when i figured you only need one '>' before the first line of each paragraph.
@FredNurk There's no need to answer playfully since one can indeed generate graphics with plain standard C++. E.g. I mentioned SVG. I think my answer was the only constructive one for that question, and I think it's remarkable how many folks claim that something that is so well known and trivially easy to do, should be "impossible"
but SVG, given what info we do have from the other asker, doesn't look to be helpful either
@AlfPSteinbach I'm not trying to say you did anything wrong by mentioning options, but when someone asks the wrong questions or doesn't provide enough information, there's little you can do, and you can do even less on a site like SO
though "please describe the reason for your downvote so that others can see that it's silly" doesn't help anything
I don't see any info "other asker". but anyway, it's almost as illogical as tina apparently is right now, claiming on the chat that see can't see or use the chat
@AlfPSteinbach see "Based on the OP comments elsewhere in this thread, it sounds like he wants to do this by direct manipulation of the low-level instructions on the various pieces of hardware used for rendering images." in the accepted answer there
SVG will not help with that endeavor; mentioning SVG is a plausibly valid answer, just like "that elephant isn't purple" is a valid sentence – it's just not useful for this person
I wouldn't say SVG is a "plausibly valid" answer. It is a completely valid and correct answer to the question. Not including hidden in-comment later clarification of q.
no, I am not saying you did anything wrong; trying to answer that question is putting yourself in an impossibly hard spot in the first place, because there's no really right answer
I said plausibly because it is true that you didn't say anything false, yet it still doesn't help – answers are supposed to help the asker, right? not just make true statements?
"not useful" is very subjective. do you really mean that you downvote based on whether an answer is useful to you? like, ooh, can't ken this math, not useful, downvote!
@AlfPSteinbach you're looking at it too simply, but I feel like I can only go in circles trying to elaborate; I'll just leave it at "you didn't help the asker", regardless of whether you are "right" or "wrong"
@AlfPSteinbach read the tooltip for the downvote arrow
is Stack Overflow then about completely subjective question and answers? you're saying i should read up on tucked-away comment elaborating on subjective meaning of question. and you say downvote is for subjective usefulness.
people take voting way too seriously, often interpreting downvotes as malicious "I hate you!" (and this is a significant portion of why I won't downvote); yet the point of the system repeatedly is said to promote the best answers above all others, and downvote=unuseful fits that
said by Jeff and Joel, in the podcasts (which I listened to before beta) and on their blog posts – not herd mentality, but the stated purpose of the site's founders
@AlfPSteinbach I already said people downvote subjectively; are you surprised they upvote subjectively too? :)
looking through the top-voted questions (like "best features"), I realized how much crap was really on SO, and how much votes can, sometimes, not reflect much of anything
@alf: here's another example: (see my comment especially) stackoverflow.com/questions/4801524/… if the answer had just been "you could specialize std::less for your type", then even though it's perfectly 100% "correct", it would not be useful
@james: but you don't like the way it looks with pointers? or, rather, why don't you prefer the way it looks with pointers (to match your preference with non-pointers)?
the asker is confused here too, because the question starts out with a hypothetical (which the answer I linked addresses), then goes into a completely different concrete situation
@FredNurk You're saying my answer was correct but too vague to be useful. I don't understand that. It sounds illogical to me. Completely. No relation to reality.
@JamesMcNellis I met someone who had a very strong opinion that having iterators overload -> was fundamentally wrong and that you should always use (*it).. I shall try and dig out his reasoning.
@AlfPSteinbach It wasn't. There are other constructive answers. (Unless you count "no, there's no way to do this in plain C++" as non-constructive.)
Oh, and that's not only an example of bad down-voting (which it is, indeed), but also of bad reaction to it. The down-vote might have a legitimate reason and make you look silly, after all. It's just that, without the reason given, we don't know.
@sbi Yes, I think "no way" is non-constructive. :-) It could be constructive if "this" was clarified, because it's clearly a statement made under one quite specific interpretation of the question. It's useful to know that something specific isn't possible, but it's non-constructive to indicate that "whatever you mean, it's impossible"
@sbi I don't think the downvote could have a legitimate reason, but yes, an explanation might make me look silly. It's not difficult to make people look silly.
Well as I see it's not a POV. It's about not making assumptions. Very important. Like, WordPress assumes that any C++ tag is a "c" tag and assumes further that any "c" tag must be referring to C#, so hey, let's present that "C++" as "C#". I hope you can see both the invalid generalization, and the invalid specialization, there, yes?
@CharlesBailey having two ways to dereference is fundamentally confusing, and I can see a good argument it is wrong. however, in light of dealing with existing code and that C++ has always tried to be C-compatible, we must overload -> for iterators – and it's often nicer to type :)
@AlfPSteinbach If you don't make any assumptions, you cannot answer a single question. Some assumptions you always need to make. But IMO your answer was good because you didn't assume what others did (see results immediately on the screen) and I upvoted you for this.
@sbi by the same token, assuming a non-obvious interpretation of the question, such as he wants to generate a SVG data file rather actually display something now, is much more likely to confuse the asker and simply be an irrelevant answer. if you need clarification, ask for it.
@FredNurk Actually what is bad is that iterators do not overload operator->*(). Try to apply a member pointer to an object that's in a sequence where all you have is an iterator to.
(Well, I do admit that this is rarely ever needed. I ran into this once in almost years of C++.)
@FredNurk Your last sentence applies to the asker, too, though. If he's confused by some answer, he could just ask to have it clarified.
Couldn't someone make a good FAQ Q/A about using arrays in C++ (passing them around, creating multi-dimensional ones, etc.) so that we can point those to it who ask the daily dozen of always the same array questions?
there are lots of funny things which don't belong on SO, some of which even relate to actual programming instead of just TV shows talking about programming
it almost sounds like you have some other program generating them, perhaps accidentally; but you should rule out obvious possibilities, like unplugging that keyboard and trying one from a completely different manufacturer
you haven't said what api you're using, but I'd hope it would keep up/down messages in sync with the keystate it reports; so no, I don't see how checking the state would help
I don't know – don't really see anything you can definitely do until you figure out more about what's happening
Is there a way, using SFINAE, to detect whether a free function is overloaded for a given class?
Basically, I’ve got the following solution:
struct has_no_f { };
struct has_f { };
void f(has_f const& x) { }
template <typename T>
enable_if<has_function<T, f>::value, int>...
I’m not sure if that’s such a good idea here since the user supplies the f function along with his type, and having a dummy return value is kind of FUBAR in API design ;)
@Tony: well, about never having coded C++, I don’t find that very odd. C++ is just one out of many languages and if you don’t work in an area where it’s important, why learn it?
I hate that Java is used so pervasively to teach CS, but using C++ isn’t the only alternative
@Tony most courses don’t include programming at all, and those that do only have it as an exercises, don’t put focus on it, don’t teach it, in one word
(even if they use the words "software engineering")
@Tony the value on the resume is probably the most value from the degree itself (I wonder how true this is for most degrees), while what you do yourself is where you actually learn how to program
@Tony don't underestimate the value of listing it on a resume :) as the saying goes, "finishing high school shows you can finish what you start, getting a degree shows you can put up with other people's bullshit"
but that's not how it works, because a piece of code is an idea, and you can produce your own code and it can be good in other ways or perform functions that I never even thought of
I could look at your code and dump it in the bin because I'm narrow minded and set in existing practices and can't understand your code, and reject it as poor, even though it might be genius
effective comparison of ideas takes place completely ignorant of their originator
@Tony I haven't, but I've been to the UK a few times. People complain about the cost of college. In the UK, the simple cost of living (especially in or near London) is extremely high. They do have some very good schools though...
my flatmate gets the maximum loans and easily survives
hmm
I wouldn't worry about it too much
the university aims at the lowest common denominator- they will reject candidates with maths results that are too low and they will re-teach all necessary concepts from scratch
we did vectors, matrices, basic trig and stuff again in our first year
which is lucky, because I completely bombed my A-level results
you should have seen my score card, it was hilarious