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.
#mentalhealth #cs #fp #haskell #standardml #datastructures #functional #purely #elm
Most #IT practitioners today cannot comprehend #LISP macros and #StandardML functors, I suppose it is the sign of the times, but it is unfortunate because it is a lost knowledge—like knowing how to use the slide rule.
I am a connoisseur of #programming languages. And like a #wine connoisseur who does not own 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 has it have anything to do with the IT industry's darling of the day—machine learning "ML".
#standardml #wine #programming
It's my pleasure to announce that #Alice has been #updated . 😊 😄
Alice 1.4 has been released!
https://www.ps.uni-saarland.de/alice/
A #Tour to #Wonderland
https://www.ps.uni-saarland.de/alice/manual/tour.html
#alice #updated #tour #wonderland #programminglanguage #aliceml #standardml
It's my pleasure to announce that #Alice has been updated. 😊 😄
Alice 1.4 has been released!
https://www.ps.uni-saarland.de/alice/
A Tour to Wonderland
https://www.ps.uni-saarland.de/alice/manual/tour.html
#alice #programminglanguage #aliceml #standardml
And furthermore in #StandardML ---
https://rosettacode.org/wiki/Euler_method#Standard_ML
#standardml #sml #functionalprogramming
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.
#rosettacode #continuedfractions #mercury #standardml #scheme #python #lazylists
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.)
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 ...
#ats #standardml #ats2 #atslang #sml
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
#standardml #sml #rosettacode #continuedfractions
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.
I have done the #StandardML now:
https://rosettacode.org/wiki/Continued_fraction/Arithmetic/G(matrix_ng,_continued_fraction_n)#Standard_ML
I am about ~70% certain we can construct rules for equational reasoning for a suitably large fragment of #StandardML from its 1997 definition; almost certainly this fragment includes Core ML - {exceptions, references} + (some suitably nice wrapper functions around primitive functions in the Standard Basis which use option types instead of throwing exceptions).
This might be worth something in #functionalprogramming
#functionalprogramming #standardml
I've written a blog post about my simple JSON parser in #cplusplus, #rust, #ocaml, #standardml
https://dev.to/serpent7776/simple-json-parser-in-c-rust-ocaml-standard-ml-4l8d
#cplusplus #rust #ocaml #standardml
My favourite #StandardML functional #programming texts:
• ML for the Working Programmer, Paulson
• Elements of ML Prog, ML97 Edition, Ullman
• Essentials of Standard ML Modules, Tofte
• Purely Functional Data Structures, Okasaki
• Unix System Prog with Standard ML, Shipman
• Modern Compiler Implementation in ML, Appel
• The Standard ML Basis Library, Gansner
• The Definition of Standard ML, Milner
• Commentary on Standard ML, Milner
• How ML Evolved, Milner
• The History of Standard ML, MacQueen
My favourite #StandardML functional #programming texts:
• ML for the Working Programmer, Paulson
• Elements of ML Programming, ML97 Edition, Ullman
• Essentials of Standard ML Modules, Tofte
• Purely Functional Data Structures, Okasaki
• Unix System Programming with Standard ML, Shipman
• The Standard ML Basis Library, Gansner
• The Definition of Standard ML, Milner
• Commentary on Standard ML, Milner
• How ML Evolved, Milner
• The History of Standard ML, MacQueen
Right, so I had a tête-a-tête with #ChatGPT today about #programming in #StandardML modules, functors, and sharing constraints. The descriptions are accurate but imprecise. Still, I'm impressed. #AI may well replace us programmers, soon.
https://beta.openai.com/docs/introduction
#ai #standardml #programming #chatgpt
Learning FP concepts using OO-FP hybrid languages (Swift, Kotlin, Scala, etc.) from practice-oriented books focused on enterprise-scale line-of-business software development is a fool's errand. Instead, learn FP using #StandardML or #Haskell from one of the many well-written CS textbooks.
The history of #StandardML #programming language by Prof #MacQueen
https://youtu.be/NVEgyJCTee4
#macqueen #programming #standardml