Hi, I am still working on the implementation of Chess in Scheme that I mentioned before.
For now, the most important part is to provide a language to describe rules of board games. Until recently, the descriptions were all pattern-based, which was a rather natural approach, but it turned out that it was limited too, because it didn't allow me to specify e.g. that neither a king nor a rook was allowed to move before castling, or that the captured pawn's move must have been made in a previous turn in case of the en-passent capture. So I decided provide an environment where some arbitrary Scheme code (specified in the ruleset) could be executed, and where certain functions would reside that could be called by that code. And now I have a decision to make. One option would be to create my own, restricted meta-circular evaluator for a minimalistic subset of Scheme (or use one that is already available). But I think that it would be reinventing the wheel which is already present in Guile Scheme, and is called "eval" (or perhaps even "compile"). And hence my question: is there any way to restrict the execution environment of eval, e.g. to specify which symbols should be available? (For security reasons, I wouldn't want functions like "system" or "exit" to be present in that environment) Or perhaps there's some better way to do that? Regards, M.
