A: 

You should check out OCaml. You can find it at http://caml.inria.fr/

nbathum
Thanks, but I'm deeply familiar with OCaml, and I'm looking for an implementation of **Standard ML**.
Norman Ramsey
+4  A: 

Poly/ML seems to be a little faster than SML/NJ. For example, compiling HaMLet (approx. 25850 lines of commented SML) with Poly/ML, SML/NJ, and MLton, I get the following:

[mtf@fenrir hamlet-1.3.1.polyml]$ /usr/bin/time make with-poly
...
        2.92 real         2.31 user         0.55 sys
[mtf@fenrir hamlet-1.3.1.smlnj]$ /usr/bin/time make with-smlnj
...
       11.98 real        11.08 user         0.78 sys
[mtf@fenrir hamlet-1.3.1.mlton]$ /usr/bin/time make with-mlton
...
       24.51 real        21.04 user         3.05 sys

The difference between Poly/ML and SML/NJ isn't quite as pronounced when compiling MLton (approx. 175779 lines of commented SML):

[mtf@fenrir mlton.polyml]$ /usr/bin/time make polyml-mlton
...
      117.67 real       112.12 user         4.87 sys
[mtf@fenrir mlton.smlnj]$ /usr/bin/time make smlnj-mlton
...
      123.31 real       116.24 user         6.38 sys
[mtf@fenrir mlton.mlton]$ /usr/bin/time make mlton-compile
...
      238.44 real       232.01 user         5.49 sys

As REPLs, Poly/ML and SML/NJ are nearly equivalent. I find the error messages from SML/NJ to be a little bit better; they tend to have more specific source locations. Of course, when used as a REPL, SML/NJ's source locations are in terms of stdIn, for which line numbers aren't terribly helpful.

If your students are only ever going to use the REPL or compile single-file programs, then I would imagine that either Poly/ML or SML/NJ would serve your purposes. Both provide the SML use function. Multi-file programs are probably best served by SML/NJ's Compilation Manager or MLton's ML Basis System; Poly/ML provides yet another compilation system (PolyML.make), but I've never used it.

What difficulties do you have with compiling Poly/ML? Since version 5.0, Poly/ML has supported a simple ./configure ; make ; make install build. Using Poly/ML 5.X to compile a standalone executable requires using PolyML.export and invoking a C compiler, but is fairly well described in the version 5.0 release notes.

Matthew Fluet
I've had no difficulties compiling Poly/ML; I just installed the Debian package. It's the "yet another compilation system" that I'm having trouble figuring out.I very much want the students to be able to use a model they're familiar with---compile source to get an executable binary---but with something a little faster than MLton. Perhaps I should download HaMLet and see how the Makefile is set up. +1
Norman Ramsey
Both HaMLet and MLton (and Isabelle AFAICT) drive Poly/ML via the `use` function. I don't know of any project (besides Poly/ML itself) that uses the PolyML.make facility. You could ask for pointers on the Poly/ML mailing list; its low traffic, but responsive.
Matthew Fluet
A: 

There's an LLVM port of Moscow ML. I don't know if it's usable for all purposes yet, but with regard to speed it should be better than the old camlrunm.

Maybe it's worth the time for you to port the feature which you think is differs from the code in the documentation. I'm sure the Moscow ML maintainers will appreciate it.

I didn't find a difference in the documentation which comes with Moscow ML and the actual implementation, but I didn't do any big projects in Standard ML. I think it would be helpful if you could give an example where the Moscow ML documentation differs from the implementation. This would also interest me.

ott
Library modules `TextIO`, `Array`, and `Vector` don't conform to the standard. I have been after the Moscow ML people about this for *years*, and they basically don't care. If they don't care about improving their software, why should I?On another note, maybe my question wasn't clear, but I care about **fast compile times**. Any plausible run time is just fine with me.
Norman Ramsey
I will see what I can do about the standard conformance of the standard libraries. It seems to be a useful job.I think the main problem with Moscow ML is that it seems to be abandoned by its original maintainers. With the LLVM port it gained a bit of momentum when two Danish students began touching it after nearly a decade, but this also seems to have stalled.I think Standard ML lost a lot of (potential) users and researchers to Haskell. Maybe this is why nobody cares that much anymore.
ott
I actually gave the wrong link to the exsml repository. I corrected it.
ott
Can you look at http://github.com/jlouis/exsml/tree/master/exsmllib/ and see whether the problems with the standard conformance were solved?
ott