David T. Lewis
lewis at mail.msen.com
Fri Aug 13 00:33:20 UTC 1999
On Thu, Aug 12, 1999 at 02:44:35PM +0001, Bruce ONeel wrote:
> > It has to run without an UI in Linux, reading from stdin and writing
> > results to stdout. That's still unsupported. In last year's contest the
> > program was run once for every move in the game, see
> > http://www.ai.mit.edu/extra/icfp-contest/task.html
> > /bert
> Seems to be the pretty much the rules this year too. The UI the judges will use is the
> Linux command line. It doesn't seem to say you can't pop up a window, just that they won't
> use it. You do run the program once per move.
Well, I was going to suggest loading the OSProcess stuff I posted a while
back, but it seems to have disappeared from the swiki again. I can
repost if there is interest.
OSProcess supports reading and writing stdin/stdout/stderr, and can
fork a headless Squeak to run your program. For example, you could run
your program by doing "UnixProcess forkHeadlessSqueakAndDo: aBlock"
where your program would be aBlock. The ReadStream on stdin is
"OSProcess forThisOSProcess stdIn" and the WriteStream on stdout is
"OSProcess forThisOSProcess stdOut", both of which are accessible
from the headless Squeak.
More information about the Squeak-dev