3 ms·
Since the repo and group are a little light on details, here is a paper by the group describing some of their work [0]. As always, if you are interested in lea
by eatonphil 10y ago
Since the repo and group are a little light on details, here is a paper by the group describing some of their work [0].
As always, if you are interested in learning OCaml or Haskell, try SML instead! You can find a defense of this thought here [0] (tldr; it's a simpler language that makes it easiest to learn the foreign concepts that OCaml/Haskell/Scala employ mercilessly). Of course, if you actually want to get something done I'd recommend Haskell or Scala.
If you're interested in SML, I recommend checking out the /r/sml wiki [2]. The Stack Overflow community is very helpful and personally I hang out on #sml on Freenode.
[0] http://sigbed.seas.upenn.edu/archives/2016-04/d1.pdf http://sigbed.seas.upenn.edu/archives/2016-04/d1.pdf
[1] http://ponyo.org/news/ponyo-for-standard-ml http://ponyo.org/news/ponyo-for-standard-ml
[2] https://www.reddit.com/r/sml/wiki/index https://www.reddit.com/r/sml/wiki/index
- cm3 10y agoAnd if you're working on web apps, look at Ur/Web[1] which also uses MLton. It is what Opa should have been and has a very nice model. [1] https://air.mozilla.org/ur-web-a-simple-model-for-programming-the-web/ https://air.mozilla.org/ur-web-a-simple-model-for-programmin... Edit: Ur/Web takes inspiration from Haskell, SML and OCaml, and is arguably an improved substrate of the good features of those. It's definitely the nicest tool I know of for writing web apps at the moment.
- eatonphil 10y agoYou can also compile Standard ML to Javascript using SMLtoJS [0] via MLKit [1]. melsman even has an online IDE [1] with which you can play around with his reactive web stuff. [0] http://www.smlserver.org/smltojs/ http://www.smlserver.org/smltojs/ [1] https://github.com/melsman/mlkit https://github.com/melsman/mlkit [2] https://smlserver.org/ide/ https://smlserver.org/ide/
- aseipp 10y agoI'd agree, but Ur/Web gets more difficult when you consider that it's extremely CRUD focused due to the way page handling and 'memory regions' in the implementation work, and how deeply ingrained this is with its transactional view of the world. It doesn't even have a garbage collector. Shoehorning anything 'non-transactional' into the `transaction` monad (like sending email, writing to disk or firing the nukes) can range from achievable to very difficult to "fuck it, just use the database for everything" or whatever. To be fair, "fuck it, just use the database" is a totally fine solution in many cases. And yes, I agree Ur/Web is amazing given what it does. The edges are very rough (I don't know if it's the nicest tool by every metric, but definitely several of them). But it's worth considering if you have a mature level of FP experience.
- gnud 10y agoI really like SML, but still havn't seen a good unicode solution here - which lets me use unicode in string constants in code, as well as convert data between encodings at run time. That's what's missing for me. So for now, F#.
- eatonphil 10y agoThat is an excellent point. There are a few notable shortcomings in Standard ML and I often wonder what the harm would be to create a language that diverges from the standard to support some very basic (but fundamental) features that one needs in 2016. But then I remember that's similar to how Haskell happened and I shy away.
- gnud 10y agoThe SML standard defines a WideChar and WideString, that are compatible with the String type. A SML implementation could just say 'WideChar' = UTF-32 and WideString is unicode, and all source files are utf-8. I think that would be within the standard.
- eatonphil 10y agoMy reading of the MLton page [0] on the subject suggests that the standard is in fact insufficient for full unicode support. [0] http://mlton.org/Unicode http://mlton.org/Unicode
- chubot 10y agoHave you considered converting everything to utf-8 up front? (either in SML or in another language if it's a batch process) You don't need 16- or 32-bit wide types to handle unicode. Instead of an array of chars, utf-8 can be used directly in its encoded representation -- i.e. "char*" -- which basically every language is compatible with. Almost every algorithm you need works fine in this manner. You rarely need O(1) access to a character like c=s[n]; usually you can just iterate forward, parsing the utf-8 stream (e.g. see Go's rune library). https://blog.golang.org/strings https://blog.golang.org/strings