Move things to unit tests with smaller compilation units (so I can compile foo.cpp and a handful of other dependencies, but not the full system) so, other than for deployment or integration testing, my feedback loop is much shorter.
Or if it can't be made shorter, work on another project or read something (presently non-practical/actionable, Weapons of Math Destruction, but typically more practically technically oriented).
In the meantime I do small and very easy coding exercises.
I spend no time waiting for compilation to happen (ruby). I used to spend a lot in my previous job (C#), where the time was utilised (wasted) in going through blogs/articles.
While long compilation times are incredibly annoying, compilation offers a first pass test on code: Is this code syntactically correct? Do (at least some of) the semantics make sense?
With an interpreted language, you may be able to test for syntactic correctness with a simple scan over the language, but you're approaching compilation at that point. More likely, syntactic correctness is verified by a test suite that's sufficient to provide 100% code coverage (which can be hard to build and maintain).
It's also harder to know if a reference to foo is valid at any point, until it's executed. Which is where the semantic validity and verification of compilation comes in handy. A tool which can do this for your interpreted language is most of the way to being a compiler, it's simply lacking the translation step.
The nice thing with interpreted languages is that you could put off a lot of this verification/validation, similar to the distinction between dynamic and static typing, until you actually need it. The debate is when you need it and how much value is added by putting it at the start. But languages like go and incremental compilation being adopted by more compiler/toolchain developers is at least cutting down on the time to reduce the time spent idling (as a developer) in the feedback loop.
Just for fun, try compile with csc directly one day, it's an order of magnitude (at least) faster than with msbuild.
My code gets offloaded to a build agent, so I don't have to worry about it.
Even better, just have a CI that will run it not on your environment.
So, i dunno. Stare at the screen?
Usually, though, I do that thing where you open your mouth in different shapes and smack the sides of your face to make noises. I'm trying to play "The Entertainer".