For your viewing pleasure :)

Stephen Weeks MLton@research.nj.nec.com
Thu, 4 Nov 1999 16:42:20 -0800 (PST)


> The file Game is an executable compiled
> with MLTon :)

Very cool!  It seems to work on my machine (assuming there isn't
suposed to be user input yet).

BTW, you might be interested in a couple of switches that you can feed 
the executable to get information about the gc.  Try out
	Game @MLton gc-messages gc-summary --
This will print a message at every gc, as well as a summary of gc
information upon program termination.  When I ran it, it said 1% of
the time was spent in gc.

> And the sopen command in saveWorld: should it be
> append or create file?

create

> ... But the most serious problem right now is that
> I can't run mlton after having recompiled
> libmlton.a and libgmp.a
> so, do you have any ideas as to how one
> makes mlton run with one library version and link
> applications with another?

I am confused.  The MLton executable is statically linked with
libmlton.a and libgmp.a.  I don't understand how recompiling them
breaks MLton.  In any case you can control what flags mlton passes to
gcc (and hence what libraries apps are linked with) by editing the
bin/mlton script.

> Also for Windows applications, it should not link
> with -lm  so how can I change this?

The bin/mlton script has the default linker flags that are passed
along to gcc on line 18.  Just change that line to suit your needs.

BTW, when you are ready to start debugging the GC, I recommend
compiling sml programs with the -g and -DGC_EVERY_CHECK.  The former
will cause the gc to do a lot of consistency checking and the latter
will cause a gc to occur at every limit check point, which will slow
things down a lot, but will help find any bugs.

On a couple of procedural notes, there is no need to send mail to me
that you send to MLton, since I receive all mail sent to MLton.  Also,
for large email, if it's not too much trouble, I would prefer to
receive a pointer to an ftp/http site so I can download the files at
my leisure.  Thanks.