Shakesyear tracks the Bard's toilet humor:
I think that when today’s stand-ups call fart jokes “hack,” they mean that they’re an easy, lazy laugh. You’re a hack if you resort to them because it means you can’t be bothered to write better material. And “better material” means verbal material. Stand-up comedy is fundamentally about language. …
I suggest [Shakespeare] has a stand-up’s sensibility; he’s not afraid to be juvenile, but he won’t do hack. South Park’s Terrance and Phillip are juvenile, but they are also hack: when they want a laugh, they give us the sound—the raspberry—and pretty much all you can do with the sound is express contempt, provoke embarrassment, or punctuate. The Bronx cheer is nonverbal by its very nature, and nobody in world culture is more all about words than Shakespeare. As far as I can tell, there’s only one passage in which Shakespeare may be calling for the raspberry. Naturally, it’s in Hamlet.
Part Two delves into the real details.