How about Charlie Stross' "Laundry Files" novels, in which magic is mathematics and software is a way of executing your magic quickly (and automating it). You can also do it inside your own head, but since it attracts the attention of Cthuluesque beings, there's a risk attached.