Sunday, October 4, 2009

Technical Challenge: SML

Success! I finally got SMLNJ and the MLton optimizing compiler to work with Windows. I am very happy about this, as I had been trying for quite a while and ran into various annoying compilation and DLL problems. (Really mlton was the difficult one.) Here's how I did it.:
  • Download Sun's VirtualBox VM software.
  • Install Ubuntu.
  • Use apt-get to install smlnj and mlton.
Seriously. I really think this is the way to do it and I am perfectly happy to launch Linux every time I want to program, it's just so much easier in Linux land. I like cygwin generally, but I have found that if you want to install some software and there's not already a distribution for it, it can make your life miserable. Ubuntu, on the other hand, has like 9 million packages, and even includes obscure stuff like sml. Problem solved!


  1. cygwin blows

  2. I actually get way more mileage out of putty + sshing into a unix box than I ever did out of cygwin.

  3. I'm not sure this counts as "working in Windows." :)

    I still can't get my SML/NJ code to compile with mlton. Very frustrating.

  4. Welcome to the light side! I just had an assignment for this vision class where they gave us a Visual Studio skeleton to fill in. I unzipped it, typed 'rm */*.vcproj*', and never looked back. The class message board is quickly filling up with posts like "Halp! DLL linking problems!"


  5. ;-)

    Well this post was partly a joke (because it's a little ridiculous that this is the only way I can get it to work in Windows) and partly serious (because I really am completely content with this solution).

    Really, I would give the VM solution a try. Overall it only took about 30 minutes to get mlton up & running with this approach, and that INCLUDES the download of Ubuntu, although granted that was from CMU with a fast Internet pipe.

    The one caveat is, if I actually wanted a Windows EXE, so that I could say give it to other people who use Windows, I would not be able to do it. If I had that need, I would beg and plead Tom VII to tell me how to do it.


  6. Lol... that's pretty funny.

    Yes, DLLs are like the final CS frontier and I am afraid I will never fully understand how they work. I think that Java has spoiled me in this way, since jars more or less work.