Subject: Re: scheme-based mud client
From: (Rob Warnock)
Date: 1998/12/08
Newsgroups: comp.lang.scheme
Message-ID: <74io2l$>
Craig Johnston <> wrote:
| Currently, what I am looking at is basically just doing a select loop
| in c and calling scheme procedures with output from the mud socket(s).  
| ... One big question is what scheme implementation to use.  Since
| the whole thing is basically going to be driven by a select loop,
| I want to call scheme as a library from c...

You can do that. On the other hand, MzScheme has built-in "threads"
and internally provides a "select()"-based scheduler, so that if you
want to make life easy for yourself you could just spawn a MzScheme
thread for each MUD socket, whereupon the completion of a "blocking"[*]
read would automatically wake up the appropriate thread.

Just a thought...


[*] From the point of view of the thread, not the whole MzScheme process.
MzScheme takes "blocking" Scheme reads ["(read-char)", "(read)", etc.] and
turns them into non-blocking Unix reads, and then sleeps on a select() when
no thread is runnable. See:


Rob Warnock, 8L-855
Applied Networking
Silicon Graphics, Inc.		Phone: 650-933-1673
2011 N. Shoreline Blvd.		FAX: 650-964-0811
Mountain View, CA  94043	PP-ASEL-IA