Know Your Meme credits the movie Baseketball.
The first known instance of the word “derp” comes from the 1998 comedy film Baseketball by South Park creators Trey Parker and Matt Stone. During a scene where they are caught smelling underwear taken from a woman’s private drawer, Matt runs out of the room and says “Derp.”
palordrolap@fedia.io 7 months ago
It's the onomatopoeia associated with a stupid person trying to think with an emphasis generating -p suffix, in the manner of well → welp and no → nope, then modified further into an adjective with a further -y suffix. Der + -p + -y.
Wiktionary doesn't currently talk about the -p snap suffix at derp, but it does at welp. While I don't quite have the gall to edit it into derp myself, I'm convinced it's the same thing.
(One definition of "herp" is, of course, derived in the same way, doubly emphatic due to the unnecessary aspiration on a hesitation noise. h- + er + -p. Thus was born phrases like "herp-a-derp" for someone acting with a ridiculous lack of care.)
Also: https://www.urbandictionary.com/define.php?term=derp