Those are the things I miss the most.
One of Robin Williams' greatest strengths was his ability to improvise. Even in a heavy movie like Good Will Hunting, one of the most memorable moments of the film is due to Williams' improvisation.
According to Matt Damon's commentary on the DVD, Robin Williams improvised the line about his character's wife farting in bed. The comment caught everyone so off guard that you can see the camera shaking from laughter during the scene.
"People call those things imperfections, but they're not. That's the good stuff."
(by Myka Fox)
Sources: h/t reddit