Live data from Hacker News

Programming in Standard ML (2011) [pdf]

cs.cmu.edu

1–10 of 32 posts

Re: Programming in Standard ML (2011) [pdf]

#3

Whenever I see a Standard ML article/paper, it always reminds me that I still need to learn OCaml. Not that one is better than the other, just that I've not gotten around to learning OCaml yet.

Regardless, I would prioritize learning OCaml. The only thing SML has going for it is nicer syntax, and less stapled-on OOP stuff. OCaml's better in almost every way for day-to-day programming.

Re: Programming in Standard ML (2011) [pdf]

#5

Whenever I see a Standard ML article/paper, it always reminds me that I still need to learn OCaml. Not that one is better than the other, just that I've not gotten around to learning OCaml yet.

Regardless, I would prioritize learning OCaml. The only thing SML has going for it is nicer syntax, and less stapled-on OOP stuff. OCaml's better in almost every way for day-to-day programming.

Though I know far more about SML than OCaml, I would approximate that the former is to C as the latter is to C++.

Which one you learn should depend on what you plan to use it for! I'm partial to SML. Then again, I've only written a handful of real-world programs with it.

Re: Programming in Standard ML (2011) [pdf]

#6
This is both a comprehensive guide, and an excellent reference! I use it often when writing SML for side projects.

For those interested in parallel, functional programming, I recommend taking a look at Futhark, which leverages data parallelism to make very fast parallel programs. It is based on SML, and has similar syntax, but can automatically build programs that (among other targets) run on the GPU using CUDA or OpenCL. It is also worth checking out MPL, which extends the (already awesome) whole-program optimizing compiler MLton to add support for nested, fork-join parallelism.

https://github.com/diku-dk/futhark

https://github.com/MPLLang/mpl

Re: Programming in Standard ML (2011) [pdf]

#7

Whenever I see a Standard ML article/paper, it always reminds me that I still need to learn OCaml. Not that one is better than the other, just that I've not gotten around to learning OCaml yet.

Regardless, I would prioritize learning OCaml. The only thing SML has going for it is nicer syntax, and less stapled-on OOP stuff. OCaml's better in almost every way for day-to-day programming.

I feel like ... SML is the better language but OCaml is the better runtime/community. Sad.

Re: Programming in Standard ML (2011) [pdf]

#8
For those running Debian or Ubuntu and interested to try the Standard ML of New Jersey,

  $ sudo apt install smlnj
  $ sml
  Standard ML of New Jersey v110.79 [built: Sat Oct 26 12:27:04 2019]
  - 
and you can hit the ground running.

Re: Programming in Standard ML (2011) [pdf]

#10
post #8

For those running Debian or Ubuntu and interested to try the Standard ML of New Jersey, $ sudo apt install smlnj $ sml Standard ML of New Jersey v110.79 [built: Sat Oct 26 12:27:04 2019] - and you can hit the ground running.

You should be aware of this:

$ file /usr/lib/smlnj/bin/.run/run.x86-linux /usr/lib/smlnj/bin/.run/run.x86-linux: ELF 32-bit LSB pie executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, BuildID[sha1]=b5e686ed7f390da7dfe58f0227cec46fd0e4fb95, for GNU/Linux 3.2.0, stripped

Debian hasn't packaged the 64-bit port of smlnj yet (in 110.94 and later). Both polyml and mlton have amd64 support, though.

Post reply on HN