American Guinea Pig: Sacrifice

I want to describe myself as someone who likes to torture himself by learning something really difficult and not very useful. I know there's such a word for describing someone who likes to be tortured sexually. But it's not what I'm looking for.