This is a cool functional programming language. Here's my tips for gettings set up.
Visit the official website for Standard ML and go to the current release.
- For Windows it's as simple as downloading and running the MSI they list
- For Apple computers, do yourself a huge favor now and go first install Brew
- Then you can simply run
brew install smlnj
and bam! you've got it.
- Then you can simply run
You can use SML in both mac/windows by simply running sml
in the command prompt or terminal (you may need to reopen the terminal after installing before it'll be in your PATH)
- Get VSCode (no editor wars here... it's just simple and good. Use vim if you want)
- Install the extension it suggests when opening a
*.sml
file or get it Here if you aren't sure. - Open VSCode settings from Preferences > Settings or something, and add this to your settings file if you dont want the sml.json warnings:
{
"sml.ignoreMissingSmlDotJson": true
}
Add the following to the end of your *.sml
scripts:
val _ = OS.Process.exit(OS.Process.success);
And also consider setting the CM_VERBOSE
flag when running sml
to avoid all the extra output if you don't need it.
# Mac/Linux
CM_VERBOSE=false sml example.sml
# Windows
set CM_VERBOSE=false & sml example.sml