function skewer() {
    $.get("/skewer/get", function (code) {
        $.post("/skewer/post", eval(code).toString(), skewer);
    }, "script");
}

$("document").ready(skewer);

function skewer() {
    $.get("/skewer/get", function (code) {
        var result = eval(code) || "undefined";
        $.post("/skewer/post", result.toString(), skewer);
    }, "script");
}

$("document").ready(skewer);

Handle undefined results.