5 ms·
Unicode in SML
- z1mm32m4n 11y agoI 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 11y agoThat 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
- doublec 11y agoAlice ML works on Mac OS X as well, although there was a build issue with "Resource temporary unavailable" that I had to work around. Build instructions are in the README: https://github.com/aliceml/aliceml https://github.com/aliceml/aliceml
- eatonphil 11y agoI didn't realize you were involved with Alice ML. Are you the only contributor? The original project page seems to be down. You've been there longer than I, but it's nice to see your involvement in /r/sml as well. Thank you!
- doublec 11y agoI hadn't noticed the original page had gone down. It was up a few days ago so hopefully it's only a temporary thing. I've used Alice ML on a couple of projects for a while and didn't want to see it die so I got permission from the original authors to host a mirror on github and keep the bitrot away. I forked from work that Gareth Smith did on bitbucket a few years back (with his permission) that fixed some issues and added features. I'm the only one working on it at the moment but hopefully others join in. It's survived this long! It's great to see you keeping /r/sml active!
- BruceM 11y agoSince 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 11y agoDoesn'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_compiler_license_changed_from_qpl_to/ https://www.reddit.com/r/ocaml/comments/46fiox/ocaml_compile... 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.
- BoysenberryPi 11y agoI 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 11y agoI 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 11y agoOn 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 11y agoThe UoW course did emphasize the Module system quite a bit. Random question, how hard would it be to port OCaml libraries to [s]ml ?
- marktangotango 11y agoSML - the best language I've never gotten to use in anger.
- jonsterling 11y agoWe 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 11y agoI'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-programming-the-web/ https://air.mozilla.org/ur-web-a-simple-model-for-programmin...
- pjmlp 11y agoFor me it was familiarity. I learned ML via Caml Light, so when their designers rolled out OCaml, that was the only one I was following for a while until F# became a thing. SML always seemed something that American universities were using. My only contact with it was reading the book "ML for the working programmer".
- cm3 11y agoIn Europe it's taught at Diku in Copenhagen.
- pjmlp 11y agoInteresting, do they use it a lot? Back when I was in the university, our languages group department was very found of Caml Light, and used it for quite a few classes related to programming languages and compiler design.
- cm3 11y agoTo be clear I base my assumption on the fact that there's Standard ML work coming from Diku. So I should say "I believe they teach it at Diku". DIKU Introduction to Programming organization on github has "ML Picture Library (for teaching purposes)" (https://github.com/DIKU-IP/InstagraML https://github.com/DIKU-IP/InstagraML) MoscowML credits some authors from Diku http://studies.ku.dk/masters/it-and-cognition/profile-and-career/staff/?pure=en%2Fpublications%2Fhosting-a-standard-ml-compiler-in-a-web-browser%28aa3cd796-eb8f-4620-a3c4-559961ecbfc0%29%2Fexport.html http://studies.ku.dk/masters/it-and-cognition/profile-and-ca... http://diku.dk/english/calendar2011/using_llvm_to_implement_a_standard_ml_jit_compiler_kopi/ http://diku.dk/english/calendar2011/using_llvm_to_implement_... https://en.wikipedia.org/wiki/Mads_Tofte https://en.wikipedia.org/wiki/Mads_Tofte I cannot find a link to an SML course taught there but you'd expect one.
- cm3 11y agoI 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.