LunarML – Standard ML compiler that produces Lua/JavaScript

  • I've always loved Standard ML and feel it's never gotten the love that it deserved.

    It was my introduction to typed FP concepts via this course (Part A) https://www.coursera.org/learn/programming-languages

  • Blog post announcing it: https://minoki.github.io/posts/2023-12-17-lunarml-release.ht...

  • If you haven't taken a plunge into Standard ML or OCaml and are interested, I can't suggest this playlist enough https://youtu.be/MUcka_SvhLw?si=rc4ele_0WcjwLFR3

    It's such a lovely introduction to Ocaml and programming in general and has a free online textbook. It's a lot of videos but each one is 5-10 minutes so it's very easy to hop in and out.

  • This is a very cool project.

    There is also MLKit's SMLtoJs which compiles to Javascript, but not to Lua.

    https://github.com/melsman/mlkit/blob/master/README_SMLTOJS....

  • On work laptop (Windows) at the moment. Will get to it in the weekend, but can some kind soul tell me: is the lua and js generated code readable?

    (Standard for readable for me is ReScript)

  • I've had a great time discovering Fable, which compiles F# to JS or TS.

    The cost of moving from VSCode to neovim has always put me off, but if I could write the config in F# it would tempt me more.

    How far is standard ML from F#?

    Is there any existing compiler for F# => Lua?

  • I got tricked up by the acronym. This compiles the programming language "Standard ML [Meta Language]" to the programming languages Lua or JavaScript. It's not a machine learning compiler.