These are public posts tagged with #StandardML. You can interact with them if you have an account anywhere in the fediverse.
A little gem of an opening salvo from the "Learning #StandardML", #Tufts U Comp 105 course handout:
————
For someone with a background in COMP 11 and COMP 15, the fastest and easiest way to learn Standard ML is to buy Ullman’s book and work through chapters 2, 3, 5, and 6. But many students choose not to buy Ullman—a move that saves money but costs time. You can recover some of the time by reading this guide; it enumerates the most important concepts, and it tells you where to find key information, not just in Ullman, but also in three other sources:
• Jeff Ullman’s "Elements of ML Programming" (ML’97 edition)
• Norman Ramsey’s "Programming Languages: Build, Prove, and Compare"
• Mads Tofte’s “Tips for Computer Scientists on Standard ML" (Revised)
• Bob Harper’s draft "Programming in Standard ML"
Know your sources! Mads Tofte and Bob Harper both worked with Robin Milner on the design of Standard ML, and they helped write the Definition of Standard ML. They know what they’re talking about, and they have good taste—though Tofte’s use of the ML modules is considered idiosyncratic. Norman Ramsey at least knows some functional programming. Jeff Ullman, by contrast, got his start in the theory of formal languages and parsing, then switched to databases. He may like ML, but he doesn’t understand it the way the others do.
————
I don't know any professors who teach at Tufts, but the word on the Web is that Ramsey is the author of this handout. Cheeky blighter!
Four Lectures on Standard ML (1989) [pdf]
https://www.cs.tufts.edu/~nr/cs257/archive/mads-tofte/four-lectures.pdf
#HackerNews #FourLecturesOnStandardML #StandardML #1989 #PDF #ComputerScience #TuftsUniversity
Looking for a crash course in Standard ML/NJ for someone who has never done functional programming. Got about a week. #functionalprogramming #standardml
I wish I had a minimal statically-typed functional programming language which was eager, had type classes, and ML-like modules.
Oh, and supported Unicode support for input and Unicode strings.
Basically:
My dream language = Standard ML + type classes + (100% unicode support) - equality types.
The #DEC #VAX-11/780 was the top-of-the-line 32-bit minicomputer, when I entered #CS. It occupied a large, climate-controlled room. The one I used had 256 KB of RAM. It was in continuous service from the late 1970s to the early 2000s, so it belongs in the pantheon of "great computers".
#StandardML is universally accepted as the mother of all modern #functional #programming languages, including #OCaml and #Haskell. The earliest ML implementation I used was Cardelli's VAX ML.
Today, we have $0.99 32-bit microcontrollers, which are the size of a thumbnail, but can run rings round the VAX-11 in all aspects of performance and capability. There ought to be bare metal implementations of ML, OCaml, Haskell, etc., for the MCUs.
I'd say this "introduction" to #StandardML is the most trenchant I've ever read. And I can't find fault in its concise and incisive, if cutting at times, description of both the language and its luminaries. It was written for the COMP105 course at #Tufts, and it suits its purpose. But I don't recommend it for self-study novices unfamiliar with SML.
• Tofte’s use of the ML modules is considered idiosyncratic. p.1
• Jeff Ullman got his start in the theory of formal languages and parsing, then switched to databases. He may like ML, but he doesn’t understand it. p.1
• For reasons best known to Robin Milner, Standard ML does not use the unary minus sign used in every other known language. Instead, Standard ML uses the ~ as a minus. p.2
• Jeff Ullman doesn’t understand how to program with tuples. His section 2.4.2 should be torn out of your book and shredded. p.3
And so on....
My favourite simply-typed #functional #programming language was, is, and will always be ML—#StandardML '97, nowadays.
To my knowledge, SML is the only modern #FP language that has a defined standard with a mathematically sound semantics, due to Milner et al.
In the 1980s and the 1990s, when the #CS and the #IT world were dizzy with #OO, the stewards of SML exercised their judgement with considerable vigour and valour to shun all pretences of OO. This makes the languages simpler and lighter, compared to FP-OO hybrid languages like OCaml, F#, and the like.
While SML is by no means a simple language compared to say, C or Python or JavaScript, it is arguably the simplest among the modern descendants of ML, especially compared to modern Haskell. By "simple" I mean not only to use but also to teach the undergrad #CS students. ML's immense collection of textbooks and academic papers dating back to the early 1970s unburdens the teacher, too.
Yet, I usually recommend #OCaml to my clients who want to transition to FP, especially those clients whose "business" is creating large, robust, adaptable, maintainable software in science and engineering. My reasons are manifold, but the main one is that SML'97 is "dated", whereas OCaml is "modern" in all the admirable senses of that word.
Programming language standardisation is a double-edge blade with a stiletto point. Without standardisation, the semantics of the language is squishy: programmer are tempted to chase the "latest" updates, which may or may not be beneficial. With standardisation, the language development ceases, unless the standard is kept up to date—like OCaml and JavaScript.
I feel like a traitor to my bloodline.
Dear #LazyWeb, it seems a lot of the cool things I like about Rust come originally from a programming language called "Standard ML". The sensible choice would be to look into languages one or two steps before Rust, like Haskell and OCaml, but I'd like to play with the original. And there seems to be half a dozen Standard ML compilers to play with!
But as befits a somewhat niche and academic language dating back to 1983, all the compilers are maintained on a best-effort basis by very small teams, and they all seem to have their own quirks and shortcomings.
As somebody who'd like to learn about the language, and therefore somebody who doesn't care much about performance but would like hard-to-misuse tools, which would you recommend?
Anyone else getting tired of #Rust getting the credit for (G)ADTs?
No? Just me?
#ocaml, #haskell, #StandardML, and #scala among others had this long before Rust and without the complexity of the borrow checker or lifetimes. Rust moves this concept of type system as bug prevention system forward for systems programming, but there is a long history of good compilers (targeting application development, not systems) that did this already (and in a few cases - better!). I am tiring of the narrative that Rust is the ”*only* memory safe language"...
I just published "PDF: purely functional data structures in #Elm" on GitHub.
These are Elm reimplementations of the data structures presented in the book "#Purely #Functional #DataStructures" (1999) by Prof. Okasaki. It is the only one of its kid that I am aware. It is a tour de force of functional thinking. The book includes #StandardML and #Haskell implementations.
Okasaki is a descendant of the ML tradition. His PhD advisor at CMU during the mid 1990s was Prof. Harper who wrote "Programming in Standard ML" (2011), contributed to the definition of the language, and was a member of the ML posse, alongside Milner, Tofte, Reppy, MacQueen, et al.
I chose #Elm for the following reasons:
• Elm is a purely functional language
• Elm does not yet have a comprehensive library of data structures
• Elm evolves at a deliberate pace, with subsuming to the modern CI/CD pipeline pressure
• Elm is one of the simplest #FP languages
• Elm is sane
• These properties make Elm a good candidate for use in #CS education, for teaching FP, for teaching data structures, and for teaching disciplined web programming, and a comprehensive collection of data structures could be of use in undergraduate education
An unstated, but no less important, reason for my choosing Elm is Python fatigue. I currently use Python at work, and I am also expanding my "CLRS algorithms in Jupyter notebooks" project. I like Python, but many hours of Python a day is deleterious to my #MentalHealth. Elm is both the prophylactic and the cure.
Please note that both PDF and CLRS are my solo projects, and they are works in progress that grow incrementally. Both projects aim to help #CS undergraduate students.
This project reimplements in Elm the data structures…
github.comMost #IT practitioners today cannot comprehend #LISP macros, #StandardML functors, and #assembly, I suppose it is the sign of the times, but it is unfortunate because those were knowledge lost—like knowing how to use an RPN calculator or a slide rule.
I am a connoisseur of #programming languages. And like a #wine connoisseur who does not own and operate a vineyard but appreciates the drink, I do not make languages, but I enjoy them all the same.
Even the most jaded wine critic has his favourite wine. I, too, have my favourite language. It is #StandardML, a language that has never been (nor will it ever be) an IT industry "standard" nor did it have anything to do with the IT industry's darling of the day—machine learning "ML".
@alecui@yqoto.org I am also interested in a functional language for microcontrollers and am looking into Modern Compiler Implementation in ML by Andrew Appel https://www.cs.princeton.edu/~appel/modern/ml/ #standardml #compiler #ocaml
mlkit, the Standard ML compiler is now in #freebsd ports tree.
#sml #standardml
https://cgit.freebsd.org/ports/commit/?id=ebc62e34c69afc2a45e052599af60def8cb192ba
Rosetta Code
And furthermore in #StandardML ---
https://rosettacode.org/wiki/Euler_method#Standard_ML
Rosetta Code
An implementation of the #RosettaCode #ContinuedFractions arithmetic draft task, in #Mercury, based very loosely on the #StandardML (that is based on the #Scheme and the #Python:
Continued fraction/Arithmetic/G(matrix ng, continued fraction n1, continued fraction n2) - Rosetta Code https://rosettacode.org/wiki/Continued_fraction/Arithmetic/G(matrix_ng,_continued_fraction_n1,_continued_fraction_n2)#Mercury
The implementation uses #LazyLists to represent continued fractions.
Rosetta Code
I ported the #StandardML yesterday to #ATS, and today to #OCaml --
Continued fraction/Arithmetic/G(matrix ng, continued fraction n1, continued fraction n2) - Rosetta Code https://rosettacode.org/wiki/Continued_fraction/Arithmetic/G(matrix_ng,_continued_fraction_n1,_continued_fraction_n2)#OCaml
(I hashtag OCaml reluctantly, because my experience is it has advocates who will fight with you when you say something absolutely true about the language--which its developers no doubt would concede--such as that you cannot count on the compiler to compile old programs.)
Rosetta Code
I have added a second #ATS implementation--this one based closely on the #StandardML, to aid people in comparing the two languages:
Continued fraction/Arithmetic/G(matrix ng, continued fraction n1, continued fraction n2) - Rosetta Code https://rosettacode.org/wiki/Continued_fraction/Arithmetic/G(matrix_ng,_continued_fraction_n1,_continued_fraction_n2)#Using_multiple_precision_numbers
I also demonstrate having the program broken into multiple files. Some things, which you might not expect to, have to be done "manually" in #ATS2 ...
Rosetta Code
The #StandardML was a particular pleasure to write:
Continued fraction/Arithmetic/G(matrix ng, continued fraction n1, continued fraction n2) - Rosetta Code https://rosettacode.org/wiki/Continued_fraction/Arithmetic/G(matrix_ng,_continued_fraction_n1,_continued_fraction_n2)#Standard_ML
Computer programming
Look, sanity from the #StandardML folk:
‘It is useful to have a module providing bit-wise operations on an unbounded domain. Such a module can serve as the basis for implementing sets or bit-vectors. These operations seemed to naturally fit into the specification of the IntInf module, rather than require an additional WordInf structure. ’
By ‘sanity’ I mean not multiplying entities, when INTEGERS can represent nearly every dang thing.
Now please make booleans be ints mod 2.