
Unicode in SML - eatonphil
https://blogful.me/b/phileaton/unicode-in-sml#/share
======
BoysenberryPi
I used SML as part of the Programming Languages course taught by University of
Washington. It's easily one of my favorite languages and I wish there was more
library support for it.

~~~
rubiquity
I feel the same way. Maybe we can be the change in the world we want to see.
There's also OCaml which seems to have more libraries, a single compiler
(yay). The downside is OCaml has a ton of features whereas I find SML to be
small enough to hold in my head.

~~~
Drup
On the other hand, you don't need to know all of OCaml to be effective and
unknown features are not going to come and bite you while you don't use them.

Most people don't know the object system. Most advanced features are rarely
used and kept well hidden in libraries internals (first class modules,
extensible types, ...)

You will need to understand functors for some libraries, though, but I would
guess that it's true for SML as well. :)

~~~
agumonkey
The UoW course did emphasize the Module system quite a bit.

Random question, how hard would it be to port OCaml libraries to [s]ml ?

~~~
Drup
Frankly, this question doesn't make sense. OCaml's type system is much richer
than SML's.

The opposite is pretty trivial, though.

~~~
agumonkey
I got my answer somehow :)

------
z1mm32m4n
I noticed recently that there's an open PR for Homebrew to add a formula for
MLTon. There are still a few glitches to be ironed out, but I'm really hopeful
that they can resolve them. I've been using SML/NJ locally for schoolwork, but
it'd be really nice to have an easy-to-install, full-fledged SML compiler with
top-notch performance installable with just

    
    
        brew install mlton
    

[1]:
[https://github.com/Homebrew/homebrew/pull/48694](https://github.com/Homebrew/homebrew/pull/48694)

~~~
rubiquity
That would be nice! It would certainly help grow the language even if only for
the learning experience. A good install story can only help.

Getting the MLton compiler to install on OS X was pretty straight forward but
I've never been able to get Basis to load properly.

I also recently burned an afternoon trying to install MLKit on OS X. This one
seemed promising for its good docs, smltojs, and good FFI so I was bummed I
couldn't get it work.

SMLNJ installs pretty easily but holy cow do you have to murder your PATH.

Eventually I settled for MoscowML which is a VM rather than native code but it
has provided me the best ML on OS X experience so far. I also enjoy having the
REPL.

Yours truly,

ML compiler/VM collector

~~~
BruceM
Since you collect... be sure to check out the open sourced Harlequin MLWorks:
[https://www.ravenbrook.com/project/mlworks/](https://www.ravenbrook.com/project/mlworks/)
and
[https://github.com/Ravenbrook/mlworks](https://github.com/Ravenbrook/mlworks)

There are some branches on the repo with more recent work to get it to compile
on other platforms.

~~~
cm3
Doesn't build yet but it's great this didn't get lost like other code. It's a
shame licensing and ip management keeps some of our works under lock. Imagine
books and scientific papers being kept in vaults. It's another good reason to
start projects in the open without giving up ownership to a company or some
organization. The FSF or INRIA could pull an Oracle and branch off into a
closed code base, but that of course won't happen. Just illustrating the
dangers of giving copyright ownership to a single entity like FSF or Google
for that matter. Sorry for the rant, but INRIA's CLA rubs me the wrong way
because they license OCaml as LGPL with the option to relicense under a
liberal license exclusively to Caml Consortium members it seems:
[https://www.reddit.com/r/ocaml/comments/46fiox/ocaml_compile...](https://www.reddit.com/r/ocaml/comments/46fiox/ocaml_compiler_license_changed_from_qpl_to/)
They are in the right to do so and have valid reasons but it's not a great
idea for a project with not that many external contributors.

------
jonsterling
We are implementing the Red JonPRL proof assistant
([https://github.com/JonPRL/sml-red-jonprl](https://github.com/JonPRL/sml-red-
jonprl)) in SML (using MLton for builds and SML/NJ for development), and could
hardly be happier.

Dealing with unicode is a pain, but so far, we've been able to do what we
need.

------
cm3
I've always wondered why SML, a language with a proper spec and multiple
independent implementations and more coherent design, was overshadowed by
OCaml. Maybe it's the spread of developers across different implementations.

Been reading some SML while going through Okasaki's famous classic book.

Urweb is exceptionally great [https://air.mozilla.org/ur-web-a-simple-model-
for-programmin...](https://air.mozilla.org/ur-web-a-simple-model-for-
programming-the-web/)

~~~
jlarocco
> I've always wondered why SML, a language with a proper spec and multiple
> independent implementations and more coherent design, was overshadowed by
> OCaml.

IMO it's not much of a mystery. For ~15 years "object oriented" was the
biggest buzz word in computer science and OCaml was object oriented, while SML
was not. At least in the objects, inheritance, and polymorphic way people
wanted.

------
cm3
I really hope there's a resurgence of SML. MLton even has an LLVM backend. I
use Moscowml for the REPL and MLton for native binaries.

------
marktangotango
SML - the best language I've never gotten to use in anger.

