I experience this with RockBand and Starcraft, but has anyone had this experience with math?
During exam time I'd often experience hallucinations of equations, but even crazier were the dreams: sometimes I couldn't wake up unless I performed a mathematical operation on some regular object, ie. "what's the Laplace Transform of this blue chesterfield?"
Yes, and also computing. Among other things, I've had a dream where I was trying to open files and had to win a race against someone who was replacing them with evil symlinks; several dreams about copy-on-write B+Trees; and a dream where I was a mutex and was trying to keep threads straight except that I got confused when I was locked recursively.
There was a period where I was first learning haskell and trying to solve toy algorithmic problems right before bed. I would imagine I came up with a brilliant solution... and then on waking up a bit realize my solution involved frying eggs, or the way my pillow felt, or something else non-sensical.
It's cool to see that this is a pretty common thing.
When I was a kid I would lay half awake in bed, looking at my alarm clock, interpreting the time as an algebraic expression (mentally filling in the variables) and factoring it. This is when I was in a crazy Japanese math program where I had to factor algebraic expressions every day. Seriously, to this day I can beat physics grad students at factoring. (It was a long time before I learned that factoring was not as useful a skill as I assumed.)
This is the number one way I really grasp some new technique or area in programming.
During awake time, when I'm actively studying/using a new technique, things can get mixed up. I might be absorbing information, but not necesarily using it very efficiently. I just plow on, trying things out, playing around. (Perhaps because most of what I do is self-directed studying, so getting unstuck is left up to myself.)
After days like this, when I sleep, it's fitful. I'll dream of people tormenting me until I can do something in O(n) time, garbage collectors chasing me, whatever. But oddly, often times when I wake up, I have a calm and a better unstanding of whatever it was I was studying. And sometimes, I'll wake up with a start, with a clear solution to a particular problem in mind.
Oh, God, yes. I was working on learning sysadmin tasks in MVS, if I recall correctly, when I experienced a weird mental inversion on the freeway and saw the trucks as data structures for a short time. Pointers and all.
This happens with me for maths. I even sleep talk about solving maths problem. They say I sound like a professor when I'm solving problems in my sleep.
During exam time I'd often experience hallucinations of equations, but even crazier were the dreams: sometimes I couldn't wake up unless I performed a mathematical operation on some regular object, ie. "what's the Laplace Transform of this blue chesterfield?"