old programs used to be batch: ran and quit then came interactive programs. these ran forever, which meant loop if you write gui app, the os has event loop you receive ui event, handle it, and return ...