When it comes to random complements it's really me projecting my anti-social tendency while at the gym. I'm there for one reason and it's to work out. I put headphones and generally don't talk or interact with anyone the entire time I'm there. I guess if the opportunity presents itself I'll try and offer a complement in a non-creep way :)
In lower middle class neighborhoods of Jersey City (JSQ), you can talk to others. Ask for a spot or advice on form, tell them "bad form, watch out", whatever. In Manhattan gyms (at least the 2 or 3 I've used), no one talks to anyone else. Ever.
My new gym is a big box gym. It's super nice, and I keep telling a friend of mine that really it's too nice. The people aren't very friendly, but I think that's because there are so many more people working out here that you rarely see the same person enough times to form any relationship. Plus, many people are there to just hang out and act like they are working out. One time I actually overheard a guy ask another guy for a spot and the guy told him no and then walked over to another bench and just sat down. I was stunned and in all my years of working out had never seen someone not help another when asked.
Even in their most competitive days I couldn't imagine Arnold telling Lou no if he needed a spot.
As for the complements to a stranger, I did have a couple of random people at the gym say 'you've been working your ass off' or 'you've lost a lot of weight' in a non-creepy way when I was in line at the juice bar and I definitely appreciated it. But everyone's different.