Now a question: have you thought about just running code blocks on the client? It would have limitations, but I guess most tasks could be accomplished, and the backend running costs would be enormously smaller.
There's also the problem of executing other people's code in your visitors machines, but maybe that isn't so bad -- or could be solved by running a better language than raw Javascript.
I know this sounds like a silly idea, but what do you think?