r/sml • • Nov 21 '21

Getting started with Standard ML

53 Upvotes

General Setup

https://thebreakfastpost.com/2015/06/10/standard-ml-and-how-im-compiling-it/

http://mlton.org/Installation

https://polyml.org/download.html

Online Environments

https://sosml.org/ (SOSML)

https://diku-dk.github.io/sml-ide/ (MLKit)

https://www.tutorialspoint.com/execute_smlnj_online.php (SML/NJ)

Language Tours

https://cs.lmu.edu/~ray/notes/introml/

https://saityi.github.io/sml-tour/tour/welcome

Courses

https://courses.cs.washington.edu/courses/cse341/19sp/#lectures

Books

Standard ML for the Working Programmer

A bit dated concept of "working programmer" but still freely available online.

Programming in Standard ML

http://www.cs.cmu.edu/~rwh/isml/book.pdf

SML/NJ Literature Page

Not a book itself but lists a number of historic Standard ML books and resources: https://www.smlnj.org/doc/literature.html.

Editor Setup

Emacs

  • http://mlton.org/Emacs

  • (Or just google "emacs standard ml" and there are a ridiculous number of quality results)

Vim

Visual Studio Code

Atom

Libraries

There is not a well-established package manager or centralized library system. Using libraries in Standard ML is somewhat similar to using libraries in C. The simplest way may just be to "vendor" in all library files and write your own include scripts for the Standard ML implementation you use. MLton and SML/NJ support MLB basis files but Poly/ML has its own system for including files.

In general there are existing libraries for web servers or JSON or database connections but you'll need to google "standard ml <type of library>" to find ones and you'll need to evaluate if they will work with your implementation and to your standards.

Community

StackOverflow

StackOverflow has a pretty steady flow of questions and answers about Standard ML.

https://stackoverflow.com/questions/tagged/sml

/r/sml

Here! We try to be friendly and helpful.

Mailing Lists/Issue Trackers

The developer mailing lists for Poly/ML and MLton are active and the maintainers are very friendly. The MLKit Github issues are active. Help needed for SML/NJ.

Make this post better

Suggestions to add or remove? Leave a comment to help make this getting started guide better.


r/sml • • Aug 18 '22

Millet, a language server for Standard ML

Thumbnail
azdavis.net
43 Upvotes

r/sml • • Oct 26 '20

Standard ML in 2020

Thumbnail notes.eatonphil.com
27 Upvotes

r/sml • • Jan 08 '20

A Standard ML Compiler written in Rust

Thumbnail
github.com
26 Upvotes

r/sml • • Dec 27 '25

A command-line parser for Standard ML

Thumbnail
github.com
25 Upvotes

r/sml • • Jul 16 '21

In the Interest of Building an SML Language Server

24 Upvotes

Within the last couple years, I've become fascinated by the ML family of languages. First I learned OCaml, and recently began SML/NJ, but there's a notable lack of decent tooling for them, mostly the latter. I intend for the culmination of my time exploring ML to be the implementation of a compiler for an ML dialect I will design for writing compilers, probably inspired by Andreas Rossberg's 1ML, but before I reach a point where I feel prepared to start such a project, likely in a couple more years, I'd like to further familiarize myself with these languages and help rectify the tooling problem by writing an LSP implementation for SML. I'm going to be writing this in F#, a very well-tooled language and the only major ML I haven't touched on OCaml, probably.

In light of all this, I have a couple questions for you:

  1. I've never actually written a language server before, but I imagine it goes something like this: write a lexer, parser, and semantic-analyzer, then take the output of that last stage as input to a collection of functions exposed to a programmer via the editor interface to the LSP API. I have the LSP spec to reference, so I'm sure I can figure this last part out. Does this all sound reasonable?

  2. I think the first two "compiler" stages should be mostly trivial with a lexer/parser generator and the SML '97 spec on hand. That just leaves the semantic-analysis, which is the hardest part anyway. Do you have any tips or resources for someone implementing SML semantic analysis?

  3. Finally, any general advice about ML languages, ideas for the SML LS, or something else? I'd love to hear it.

Thanks!


r/sml • • Feb 07 '18

MLton 20180207 has been released

Thumbnail mlton.org
24 Upvotes

r/sml • • Jul 07 '22

SML/NJ moving from SVN to Git(hub)

Thumbnail
github.com
23 Upvotes

r/sml • • Jan 02 '22

SML/NJ 2021.1 released

23 Upvotes

This is the first SML/NJ version to use LLVM for code generation. This is a beta release.

I wonder why the release date is "December 32, 2021".


r/sml • • May 14 '20

The History of Standard ML

Thumbnail smlfamily.github.io
23 Upvotes

r/sml • • Dec 29 '25

A testing framework for Standard ML

Thumbnail
github.com
22 Upvotes

r/sml • • May 21 '18

Learn Standard ML, an ebook

22 Upvotes

Hey /r/sml! I've been meaning to put in writing some more accessible guides (e.g. not PDFs) on Standard ML, the language, and I finally got around to it. The first three chapters of this "ebook" are available at ponyo.org/guides. I started meaningfully 1-2 weeks ago and I've been writing at least one chapter a week.

There's definitely a lot that could be missing, confusing, or just wrong. But there's now just enough content that it feels worth letting people outside my Twitter followers know. :)

Whether you're interested in learning more about Standard ML or critiquing my writing, I'd love your feedback!


r/sml • • Dec 17 '23

Initial release of LunarML: The SML compiler that targets Lua/JavaScript

Thumbnail minoki.github.io
21 Upvotes

r/sml • • Mar 07 '22

CakeML: A Verified Implementation of ML

Thumbnail
cakeml.org
21 Upvotes

r/sml • • Jan 10 '23

smlfmt v1.0.0: a custom parser and code formatter for Standard ML

Thumbnail
github.com
20 Upvotes

r/sml • • Jan 27 '22

On being a PhD student of Robert Harper

Thumbnail
cambridge.org
20 Upvotes

r/sml • • Apr 07 '21

SML# 4.0.0 released - SML# Project

Thumbnail smlsharp.github.io
20 Upvotes

r/sml • • Jan 18 '21

MLton Release 20210117

Thumbnail mlton.org
20 Upvotes

r/sml • • Aug 17 '20

MLton Release 20200817

Thumbnail mlton.org
20 Upvotes

r/sml • • Oct 05 '22

Memories: Edinburgh ML to Standard ML

Thumbnail lawrencecpaulson.github.io
19 Upvotes

r/sml • • May 05 '22

Exploring Standard ML's robustness to time and interoperability

Thumbnail len.falken.directory
19 Upvotes

r/sml • • May 10 '21

PolyML 5.8.2

19 Upvotes

PolyML 5.8.2 Release: FFI is very fast now. Faster 4 - 16 times.


r/sml • • Mar 22 '21

FoxNet: A TCP/IP implementation in Standard ML

Thumbnail cs.cmu.edu
19 Upvotes

r/sml • • Nov 03 '20

A gentle introduction to ML

Thumbnail ftp.utcluj.ro
19 Upvotes

r/sml • • Dec 04 '24

ML Basis for Poly/ML

Thumbnail
github.com
18 Upvotes