如何在 Mac 上安装标准 ML 的工作版本?

ord*_*ary 6 functional-programming sml smlnj

我使用的是 Mac OSX 10.7.5,但似乎无法下载可用 REPL 的标准 ML 编译器。这应该有那么难吗?有没有我应该下载的最好的机器学习。我试过 SML/NJ 和 Mlton 都无济于事。

Tai*_*Tai 7

Mac 用户也可以使用

$ brew install smlnj
Run Code Online (Sandbox Code Playgroud)

添加类似于/usr/local/Cellar/smlnj/110.82/libexec/bin您的 .bash_profile 的路径。

$ source ~/.bash_profile
Run Code Online (Sandbox Code Playgroud)

有关更多信息,请参阅此文章

  • 对于 SML/NJ,今天应该首选这个答案。 (4认同)

Kri*_*hna 5

我做了以下事情:

--从http://www.smlnj.org/dist/working/110.75/下载合适的(适用于您的操作系统).dmg 文件

--在你的 ~/.bash_profile: export PATH="$PATH:/usr/local/smlnj-110.75/bin"

--通过执行 source .bash_profile 运行你的 bash_profile

--转到终端并输入sml。

我个人对 emacs 使用 sml 模式。将以下内容添加到您的 .emacs 文件中,并确保从 M-list-packages 在您的 emacs 中安装了 sml 模式。

(setenv "PATH" (concat "/usr/local/smlnj-110.75/bin:" (getenv "PATH")))

(setq exec-path (cons "/usr/local/smlnj-110.75/bin" exec-path))

您可以通过执行 Cc Cs 在 emacs 中启动 sml REPL。


use*_*008 5

我从http://www.smlnj.org/dist/working/110.76/index.html下载了 SML/NJ 110.76 for Mac OS X 包

然后安装它,并访问它 /usr/local/smlnj/bin/sml