ML game and more MLTon hacking :)

ANOQ of the Sun anoq@hardcoreprocessing.com
Sat, 13 May 2000 14:13:43 +0200


"Stephen Weeks" wrote:
> I don't understand why you need the temp type at all.  Why won't
> normal ML variables of type const or const ref do?  Then you don't
> need any of the add, ..., subi operations.  Further, then you could
> define a peek and poke via the the FFI mechanism.  Something like:
> 
> val peek = _PRIM "PEEK": word -> word;
> val poke = _PRIM "POKE": word * word -> unit;
> 
> #define PEEK(w) *(uint*)w
> #define POKE(w1,w2) *(uint*)w1 = w2

Ahh! I didn't know that #define would work for this :)
This is really cool :)
This is similar to what I did, except that I used
functions. I will definately try this! And then
you're right that the rest of the ASM stuff is
not necessary :)
#define's could also be used to access hardware
acceleration I think, meaning again that the
ASM stuff is not needed at all.

> Cool.  Other work on MLton is slow, but ongoing.  I have a an internal
> version with a new basis library that is more complete and less buggy,
> and also has some better support for signals and threads.  There is
> also a student who will be writing an x86 native backend this summer.

Sounds great :) But then won't the FFI to C be slower? How are the
plans at this point? Also I hope that you will keep the C-backend,
so that it will still be easy to port to Mac and PSX2 :)


Cheers
-- 
http://www.HardcoreProcessing.com