Load a script dynamically

Hi - has anyone done any thinking about loading scripts dynamically via http (or otherwise). I realize the security implications and that this would be frowned on by apple, but I can think of a few interesting scenarios where it might be useful.

I was looking a bit at ‘require’ to see if it could be modified to accept code directly rather then loading files, but I was wondering if anyone else had any thoughts outside jacking scripts into eval.