[plt-scheme] How to use Eval for a MUD

From: Synx (plt at synx.us.to)
Date: Wed Jan 27 14:16:38 EST 2010

Robby Findler wrote:
> Also, do consider making your own language for mud programs, behind
> which you can hide these kinds of details and let the users just use
> identifiers in their programs that refer to the various room, object,
> etc state, without having to knowif there is zero namespaces, one
> namespace, or a stack of them.

Oh don't worry I'm definitely doing that. You might have advised me
about that already in fact. Whoever it was that told me said that if you
make a procedure to change the user's input into normalized
s-expressions (a "language"), then evaluation at that point is always
possible. Separating "watcher" procedures that try to find patterns in
user input like "pick up red ball" with procedures like (define (pick-up
color thing) ...) is very important to making the input both flexible
and user-friendly.

Plus if you separate them then you can make a "client" application that
does nothing but translate user-input and a "server" application that
evaluates the s-expressions. Or make the server application do both,
allowing the client to use just plain telnet, or some combination of
both. It's a really neat way to design!

Posted on the users mailing list.