In IP and Compilers, we use Moscow ML, however, having worked with it for a bit, it seems to lack a lot of libraries that come with other implementations.

Which of the major implementations are better for further development in SML, and why?

asked 22 Jan '12, 16:32

Sebastian%20Paaske%20T%C3%B8rholm's gravatar image

Sebastian Pa... ♦♦
86531133
accept rate: 41%


SML/NJ used to be the "big" SML implementation. My group used it for our first year project (a web crawler), and it was pretty good. MLTon, however, seems to be the highest-quality implementation these days.

link

answered 22 Jan '12, 20:55

Troels%20Henriksen's gravatar image

Troels Henri... ♦
5521110
accept rate: 66%

Moscow ML is not a Standard ML compliant interpreter of Standard ML. Its main problem is that it regards floats as eqtypes and they are not. Furthermore, it does not implement the 2002 basis library. In addition to Troels suggestions, there is an often overlooked little gem, namely Poly/ML

link

answered 23 Jan '12, 19:27

jlouis's gravatar image

jlouis
6163
accept rate: 50%

When you project grows beyond one file you will need some kind of build system. The standard format is MLB (1 chapter 15, 2). As far as I know, it is only used by the ML Kit compiler and MLTon. Those does not have a REPL. If you want that, I would say SML/NJ is your best bet. But then you're stuck with the Compilation Manager (3).

One dirty trick I sometimes use is having a very plain MLB-file, then auto generate a file from it which just includes everything using some preprocessor (PreML (4) or CC for example). I then use this file directly in SML/NJ. This also overcomes one of the big drawbacks of CM: you can't bind anything at top-level. For a "library" kind of thing for SML/NJ I use SMLofNJ.exportML "mylib"; (5) from inside the interpreter. Then start SML/NJ with sml @SMLload=mylib.x86-linux (or something similar). It works reasonably well if you just want all your homebrew wrapped up in one place, to make scripting with SML easier.

Anyway, for "real" programs I strongly recommend MLTon and MLB. MLTon creates really fast executables but it takes its time to do it; There's a mode for Emacs which starts a new compilation of your project whenever you change a file (6). Stephen Weeks has also written some Elisp for parsing MLTon error messages (7).

--

Morten

link

answered 20 May '12, 13:40

br0ns's gravatar image

br0ns
1012
accept rate: 66%

edited 20 May '12, 13:42

In addition, Morten has made some slides, which explain the pros and cons of the different implementations. These can be found here.

(20 May '12, 14:32) Sebastian Pa... ♦♦ Sebastian%20Paaske%20T%C3%B8rholm's gravatar image

Another minor minus regarding Moscow ML is that it depends on the program "camlrunm" which does not allow commercial redistribution to take place.

In a perhaps far out scenario, this might pose practical difficulties for DIKU students.

A more direct problem/annoyance is that several popular GNU/Linux distributions do not include MosML in their repos of easy-to-install programs and libraries because of the no-commercial-redistribution clause. For example, Debian have chosen not to include MosML because it does not fulfill the requirements of the Debian Free Software Guidelines. This forces (lazy) students to manually download MosML from the internet through a web browser and waste valuable seconds figuring out how to follow the non-standard install instructions of MosML.

link

answered 27 Jan '12, 18:04

ngws's gravatar image

ngws ♦♦
2892613
accept rate: 43%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×122
×9
×7

Asked: 22 Jan '12, 16:32

Seen: 1,666 times

Last updated: 20 May '12, 14:32

powered by OSQA