CSE-321 Programming Languages - Resources

[ Home | Schedule | Assignments | Software | Resources ] gla@postech Sungwoo Park

Standard ML style guide

  • Your code should strictly follow the Standard ML style guide.

Standard ML/NJ Guide

  • SML/NJ FAQ answers common questions on the SML language and the SML/NJ system.
    1. To avoid abbreviations # in the output in SML/NJ 110.58, change the following variable:
           Control.Print.printDepth (for data structures)
           Control.Print.printLength (for lists)
           Control.Print.stringDepth (for strings)
      For example:
           - Control.Print.printDepth := 1000;
           val it = () : unit
    2. To turn off garbage collection messages, change the following variable:
           SMLofNJ.Internals.GC.messages false;
    3. To turn on the lazy mode, change the following variable;
           Control.lazysml := true;
    4. There are a few changes in SML/NJ 110.58 from SML/NJ '97 specification:
      SML97: Vector.appi : ((int * 'a) -> unit) -> ('a vector * int * int option) -> unit
      SMLNJ: Vector.appi : ((int * 'a) -> unit) -> 'a vector -> unit
      SML97: Vector.mapi : ((int * 'a) -> 'b) -> ('a vector * int * int option) -> 'b vector
      SMLNJ: Vector.mapi : ((int * 'a) -> 'b) -> 'a vector -> 'b vector
      SML97: TextIO.inputLine : instream -> string
      SMLNJ: TextIO.inputLine : instream -> string option
      SML97: Timer.checkCPUTimer : cpu_timer -> {usr : Time.time, sys : Time.time, gc : Time.time}
      SMLNJ: Timer.checkCPUTimer : cpu_timer -> {usr : Time.time, sys : Time.time} * {usr : Time.time, sys : Time.time} (* nongc * gc *)
      SML97: Array.appi : ((int * 'a) -> unit) -> ('a array * int * int option) -> unit
      SMLNJ: Array.appi : ((int * 'a) -> unit) -> 'a array -> unit
  • Using the SML/NJ System Read to learn how to run/quit the SML interpreter and load files.
  • SML/NJ Basis Library Use these library functions -- never rewrite them!
  • SML/NJ Library Manual Always check this page to see if the library provides an implementation of any data structure you need.
  • SML/NJ error messages Check this page if you cannot understand any SML/NJ error message.
  • SML/NJ User's Guile A comprehensive list of links to various resources.
  • Comp.Lang.ML FAQ Read if you are interested in how many different implementations of ML are available ;-)


  • Emacs tutorial You can also read this tutorial on the Emacs info system (which you can enter with C-h i).
  • Tutorial on Emacs SML mode You can also read this tutorial on the Emacs info system after installing the configuration files for the SML mode.

Latex links

There are hundreds of webpages about Latex on the internet. The best way to learn Latex is actually by looking at a few well-written Tex source files and their results. I do not particulary recommend the following webpages, but I visit them frequently to quickly find commands in Latex.

A Critical Look at Programming Languages by Tim Sweeney of Epic Games

[ Home | Schedule | Assignments | Software | Resources ] gla@postech Sungwoo Park