TIL that SIM cards are self-contained computers featuring their own 30mhz cpu, 64kb of RAM, and some storage space. They are designed to run applets written in a stripped down form of Java. Back when I was in high school those specs would rock.
What’s also really interesting is that there’s actually very little documentation on this. Why? I’ll leave that to your imagination. Anyway, here’s a cool video of a project by Defcon 21 on the secret life of SIM cards.