I have seen, usually in Internet meme jokes, the term "herp derp" being used in a derogatory sense, but I don't know what it means exactly — apart from the fact that it seems to be related to dumbness or irrelevant statements.

What does it mean exactly? Is it some kind of slang? What are its origins and meaning?

@Kris Know Your Meme is not listed in the list of commonly-available references maintained on this site's meta (meta.english.stackexchange.com/questions/2573/…). Yes, it's possible for a user to look the answer up there, but it's not a resource everyone knows about in the same way that a dictionary or Wikipedia is, and a user who's unfamiliar with it could be excused for assuming that a site on the "Cheezburger Network" isn't a reliable reference.
–
user867Jan 31 '14 at 2:16