Text this: Smith-Purcell effect as resonant diffraction radiation