[MLton] writing a book?

Ray rracine at adelphia.net
Tue Nov 14 17:44:51 PST 2006


I wget mirrored the entire site.  I still have it for the interested.

For those recent to the World of SML, when I stared poking into SML the
Shipman book was far and away the most "practical" source of material.
Even then it started its habit if vanishing like a Cheshire cat.  Only
to reappear somewhere else.  Finally I mirrored it and I think I may
have used Google Cache to fill in a blank or two.

If your looking for code snippets on opening and creating server
sockets, client sockets, text file manipulation, examples of CML,
threading, etc  Its worth looking into.  An SML cookbook.

The book actually leads you step by step in the creation of fairly
competent HTTP server written with the intent of giving Apache a run for
its money.

The server was called Swerve.  Some time after CML was ported to MLton I
ported Swerve to compile under MLton.  The code was put up on the MLton
wiki 1-2 years ago. (time flies)

The only knock on Mr. Shipman's effort was his unique SML idiom or
style.  For example, he gratuitous use of "and" etc.  You'll know what I
mean when you look at the code.  During the port, if I was in some
section of code, which required more than a quick fix, I tried to clean
things up a bit, create separate signature files, modularize the code
etc... 

Recently, I heard that the MLton implementation of the IFCP '06 VM was
only 13% slower then the C implementation (MLton with bounds checking
off).  Now I wonder how slow MLton's compilation of Swerve would fair
head-to-head with Apache.

I digress.  In summary, for the newer SMLer's out there, Shipman's book
is worth a look, and if one feels the itch, Swerve, the focus of the
book is already available from the Wiki.

Caveat Emptor on the code.  My machete was blunt and some things, as I
recall, were rather brutally exercised, but the core survived to the
point that it compiles, runs and serve a page.

Ray



On Tue, 2006-11-14 at 17:40 -0600, Henry Cejtin wrote:
> Re the Shipman book, which I agree was a good start, I managed to find a copy
> some where on the web after it vanished from its original site.  If you want,
> I could put it some where on the MLton site.  From the copyright notice on
> page 3, it looks like that would be legal:
> 
>         Unix System Programming with Standard ML
>         Copyright 2001 by Anthony L. Shipman
>         Version: 0.1, Mar 2002
>         Permission  is granted for you to make copies of this version
>         of this book for educational purposes but the copies may  not
>         be  sold  or  otherwise used for direct commercial advantage.
>         This permission is granted provided that this  copyright  and
>         permission  notice  is  preserved  on  all copies.  All other
>         rights are reserved.  While every precaution has  been  taken
>         in  the  preparation  of  this  book,  the  author assumes no
>         responsibility  for  errors  or  omissions,  or  for  damages
>         resulting from the use of the information contained herein
> 
> _______________________________________________
> MLton mailing list
> MLton at mlton.org
> http://mlton.org/mailman/listinfo/mlton




More information about the MLton mailing list