Isn't that what llvm does? Or GCC? Or a JIT?
> Possibly it would be better to send small programs written in a "better" language (something like Lua) to the server?
I'd certainly like something better than SQL, but going for an imperative, Turing complete language seems like the opposite direction of where things should be going in this scenario.