The mal interface still isn't right (ignoring the bug that means it stops working when I tab away).
I've got a rough idea of what I want, which is clicking "Exec" takes a copy of the textarea and adds it to a history along with the result (either whatever result was printed, or the details of whatever error was thrown), and probably a "reload" button.
I'll mess about with it sooner or later.