nshepperd comments on Prisoner's Dilemma (with visible source code) Tournament - LessWrong

47 Post author: AlexMennen 07 June 2013 08:30AM

You are viewing a comment permalink. View the original post to see all comments and the full post content.

Comments (232)

You are viewing a single comment's thread. Show more comments above.

Comment author: nshepperd 01 July 2013 05:34:08PM *  1 point [-]

In both #lang racket and #lang scheme, (eval form) by itself apparently runs form in a basically empty namespace. I've personally been using the following incantation for evaluating anything in the "standard" namespace:

(define (ueval x) (define ns (make-base-namespace)) (eval x ns))

Then (ueval source-code) evaluates source-code in a clean namespace with all the normal builtins, including eval.