[MLton-devel] Fwd: Mark Tuttle

Stephen Weeks MLton@mlton.org
Thu, 1 May 2003 13:09:36 -0700


Hi guys.

> My friends and I are looking for an implementation of sml with good
> performance, good profiling, and a good foreign function interface.
> I have been moderately disappointed with mosml and smlnj, and I am
> thinking about trying mlton.

You've come to the right place!  MLton has always had good performance
and a fast, simple ffi.  And we are especially eager to have people
try our latest release, 20030312, which has our new facility for
source-level time and allocation profiling, and a neat feature that
produces call graphs.

> 1. Use ml-lex and ml-yacc that come with smlnj to do my parsing,
> instead of using mllex and mlyacc with mlton, to avoid rewriting the
> .lex and .grm files for yet another lex/yacc tool.

Not to worry.  The mllex and mlyacc that come with MLton are taken
from an old SML/NJ and so should take the same input language.

> 2. Steal the HashTable implementation from smlnj.

That's fine.  There's also the hash table implementation that we use
in MLton that I'd be happy to package for you.  I'd be interested to
know how it compares performance-wise.

> 3.1.  BinIO is missing setPosOut, and BinIO.StreamIO is missing
> flushOut and getWriter, so I don't see a way to do random access on
> output.  
...
> 3.2.  TextIO is missing openString.  I could write the string to a
> disk file and open the disk file, but is there a better way?

We have support for all of these in our internal version.  In fact the
code is there in the released version -- it is turned off because we
weren't entirely happy with the performance.  It's not awful, just
sometimes slower than what we've always had.

In any case, I can package an experimental release of MLton for you
that includes these features.

> I just need to write a 4G file, then write a few characters
> to the head of the file.  Is there an easy solution more efficient
> than a massive disk file copy?

Unfortunately, files are limited to 2G right now for two reasons.

1. We don't use (O_LARGEFILE when opening a file
2. We use Int32 for file positions.

(1) should be easy to fix -- I am looking into it right now and will
get back to you.  Fixing (2) requires that we add support for 64 bit
integers, which is not rocket science, but neither is it just a few
hours.  Fortunately, if you are just doing sequential writes and then
seeks to positions in the first 2G, fixing (1) should be enough.

> 3.3.  mlton does not appear to support antiquoting.  I can define an
> 'a frag datatype, and use the QUOTE and ANTIQUOTE constructors
> explicitly, but is there a better way?  Will there ever be support for
> the quasi-quoting notation?

There isn't any support right now and we don't have plans to add
support for it, since it would cause portability problems with other
SML compilers.  I've not had to work around this particular SML/NJ
extension before, so I don't have an easy answer off hand for what to
do.  What do you do in mosml?


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
MLton-devel mailing list
MLton-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-devel