Live data from Hacker News

Poly/ML – A Standard ML Implementation

github.com

11–20 of 28 posts

Re: Poly/ML – A Standard ML Implementation

#11

"Standard ML is a functional programming language, in the sense that the full power of mathematical functions is present." From a Pdf linked on the repo (I didn't know what Standard ML was, I was hoping for a mark up language)

See SGML for a markup language.

Re: Poly/ML – A Standard ML Implementation

#12
post #8

I've always felt that ML hit the sweet spot between functional and imperative programming. It affords conveniences such as algebraic data types and first-class functions, but unlike Haskell, it doesn't require monadic programming to use IO or mutable references. ML also has an interesting module system, which achieves similar goals as object-oriented programming, but in a very different way. While mainstream "class-b…

[flagged]

Re: Poly/ML – A Standard ML Implementation

#13
post #10
post #8

I've always felt that ML hit the sweet spot between functional and imperative programming. It affords conveniences such as algebraic data types and first-class functions, but unlike Haskell, it doesn't require monadic programming to use IO or mutable references. ML also has an interesting module system, which achieves similar goals as object-oriented programming, but in a very different way. While mainstream "class-b…

and you get concurrentML. People get all wet in the pants by the actor model and CSP, but my god CML is much nicer in every way. I had a weird introduction to programming. I spent my first half year doing php, and them went all in on scheme and sml. Which is nice in many ways, but I do have a hard time accepting many of the completely braindead (subjective opinion, of course) choices of most of the popular languages.…

Could you share more about what makes CML so awesome?

Re: Poly/ML – A Standard ML Implementation

#14
post #8

I've always felt that ML hit the sweet spot between functional and imperative programming. It affords conveniences such as algebraic data types and first-class functions, but unlike Haskell, it doesn't require monadic programming to use IO or mutable references. ML also has an interesting module system, which achieves similar goals as object-oriented programming, but in a very different way. While mainstream "class-b…

Isabelle is still a very active LCF proof assistant, and it's still written in Poly/ML. It's pretty aggressively concurrent under the bonnet, and leverages Poly/ML well for that. There's still HOL4, which predates Isabelle and is still going, and it also recommends using Poly/ML.

I mostly worked with HOL Light which started as a CAML project and now runs on OCaml.

Re: Poly/ML – A Standard ML Implementation

#15
post #7
post #6

Earlier quoted context omitted.

> Standard ML of New Jersey (smlnj) is another interesting one although it tends to be more of a research vehicle than polyml or mlton. This is interesting! My impression was that SML/NJ was the de facto "standard" Standard ML implementation (maybe analogous to SBCL in the Lisp world), and (FWIW) Gemini agrees, describing it as "the oldest and most widely used". So I'm surprised to see someone stick it in the rear be…

I think mlton is the one to reach for if you want strict conformance to the SML'97 definition [1]. There's a page on the MLton site that describes where SMLNJ deviates from SML'97 [2]. I'm surprised Gemini says SML/NJ its the most widely used. I've been an active Standard ML user for close to 30 years, and while that was certainly true for the first half of that time, I found most projects around me drifted to defaul…

I understood that MLton was mostly about performance. It does whole program optimisation and is prepared (or does?) monomorphise just about everything, and applies all of your functors at compile time, so that you've got something more like C++ templates but well-typed.

> SML/NJ's heap2exec was a bit clunky compared to the others.

Unlike the others, SML/NJ implements call/cc, so it's going to need to do something funkier.

   SMLofNJ.Cont.callcc

   > val it = fn : ('a ?.Cont.cont -> 'a) -> 'a

Re: Poly/ML – A Standard ML Implementation

#16
post #8

I've always felt that ML hit the sweet spot between functional and imperative programming. It affords conveniences such as algebraic data types and first-class functions, but unlike Haskell, it doesn't require monadic programming to use IO or mutable references. ML also has an interesting module system, which achieves similar goals as object-oriented programming, but in a very different way. While mainstream "class-b…

If only Microsoft had more love for F# instead of slowly copying its features into C#.

At least it is still officially developed getting new features, unlike C++/CLI and VB that only get bug fixes and updates to keep running on top of recent .NET versions.

Re: Poly/ML – A Standard ML Implementation

#17
post #16
post #8

I've always felt that ML hit the sweet spot between functional and imperative programming. It affords conveniences such as algebraic data types and first-class functions, but unlike Haskell, it doesn't require monadic programming to use IO or mutable references. ML also has an interesting module system, which achieves similar goals as object-oriented programming, but in a very different way. While mainstream "class-b…

If only Microsoft had more love for F# instead of slowly copying its features into C#. At least it is still officially developed getting new features, unlike C++/CLI and VB that only get bug fixes and updates to keep running on top of recent .NET versions.

This rests entirely on the same same sort of conservative attitude towards new experiences that holds the other half of the development world back. The Java world. People generally do not want to learn new things, they want "faster horses", which incidentally is what C# and Java is these days.

This is why we can't have nice things.

Java with Streams and "functions" is a lot better than what I left behind 15 years ago. But it is still extremely primitive compared to what F#, Rust and Scala offers. And I know this because I have spent 10+ years EACH using all of these in anger. So 20+ years.

Re: Poly/ML – A Standard ML Implementation

#18
post #17
post #16

Earlier quoted context omitted.

If only Microsoft had more love for F# instead of slowly copying its features into C#. At least it is still officially developed getting new features, unlike C++/CLI and VB that only get bug fixes and updates to keep running on top of recent .NET versions.

This rests entirely on the same same sort of conservative attitude towards new experiences that holds the other half of the development world back. The Java world. People generally do not want to learn new things, they want "faster horses", which incidentally is what C# and Java is these days. This is why we can't have nice things. Java with Streams and "functions" is a lot better than what I left behind 15 years ago…

Agreed it is the "We were not out to win over the Lisp programmers; we were after the C++ programmers. We managed to drag a lot of them about halfway to Lisp." approach.

Thing is, for 99% of corporate software, it hardly makes a difference, even more so with AI generated stuff going forward.

So yeah, we can't have nice things, especially when money and profit are part of it.

Re: Poly/ML – A Standard ML Implementation

#19
post #4

For those interested in the Standard ML compilers, Mlton is another one worth checking out. Standard ML of New Jersey (smlnj) is another interesting one although it tends to be more of a research vehicle than polyml or mlton. If you are inclined toward verification, the cakeml project is quite cool as well. For those unfamiliar with standard ML, if you’ve heard of ocaml or F#, they’re relatives in the ML language fam…

There is also MLKit which is pretty interesting in how it handles memory, it is region based with some fallback to garbage collection.

https://elsman.com/mlkit/

Re: Poly/ML – A Standard ML Implementation

#20
post #18
post #17

Earlier quoted context omitted.

This rests entirely on the same same sort of conservative attitude towards new experiences that holds the other half of the development world back. The Java world. People generally do not want to learn new things, they want "faster horses", which incidentally is what C# and Java is these days. This is why we can't have nice things. Java with Streams and "functions" is a lot better than what I left behind 15 years ago…

Agreed it is the "We were not out to win over the Lisp programmers; we were after the C++ programmers. We managed to drag a lot of them about halfway to Lisp." approach. Thing is, for 99% of corporate software, it hardly makes a difference, even more so with AI generated stuff going forward. So yeah, we can't have nice things, especially when money and profit are part of it.

This is just not true, the last bit you say. That is the same old trope about F#, Rust or Scala being niche, things people that don't have to earn money or feed children can do. I worked 100% in those languages from 2012 through 2023.

But sure, with AI, maybe this will matter less because people don't care about the code anymore.

Post reply on HN