When you take great pleasure in indulging in the act of telling someone they are a nerd, that is technically a compliment because 'nerd' is usually defined as someone who is very smart or good at technological achievement, so unless you want to call yourself a nerd as well, 'nerd' is a compliment. Otherwise, no sense is made.