[racket] Offtopic: Favorite resources for mastering SML?

140 views
Skip to first unread message

Grant Rettke

unread,
Jul 4, 2013, 10:36:19 AM7/4/13
to Racket mailing list
Hi,

One of my current projects is to master as functional and statically
typed programming language. Having discussed and debated it years ago
(partially on list here, too) the conclusion was reached that SML
would be a nicer place to start than Haskell or Clean. Fifteen years
after its release, there seems to be a lot of knowledge but not a ton
of resources exactly. There are a lot of dead links and books out of
print (working off the SML/NJ resource list). I'm wondering of ACM's
digital library is a good place to start.

Last week I worked through _ML for the Working Programmers_ which was
great but didn't get into the details in a way that I would have
expected (went from 10mph to 100mph instead). Up next is _The Little
MLer_ and Harpers _Programming in Standard ML_.

This list's members have a breadth and depth far beyond most, so I'm
wondering if I could get your help here and learn about your favorite
learning SML resources.

Best wishes,

--
Grant Rettke | ACM, AMA, COG, IEEE
gre...@acm.org | http://www.wisdomandwonder.com/
“Wisdom begins in wonder.” --Socrates
((λ (x) (x x)) (λ (x) (x x)))
“Life has become immeasurably better since I have been forced to stop
taking it seriously.” --Thompson

____________________
Racket Users list:
http://lists.racket-lang.org/users

Matthias Felleisen

unread,
Jul 4, 2013, 10:57:36 AM7/4/13
to Grant Rettke, Racket mailing list

You should have skipped SML for Working Programmers.

The Little MLer is an introduction to the idea of typed
programming not an introduction to SML. But at least it
avoids the basic mistakes of 'Working'.

Harper's book is definitive. Once you're thru, you are
done.

Start over with OCaml then. It's maintained, has a large
user community, and a ton of resources. The switch won't
be difficult.

Geoffrey S. Knauth

unread,
Jul 4, 2013, 11:05:53 AM7/4/13
to Matthias Felleisen, Racket mailing list
There's a new OCaml book out:


Real World OCaml
Functional programming for the masses
Publisher: O'Reilly Media
Released: June 2013
Pages: 450

Geoff

Phil Bewig

unread,
Jul 4, 2013, 11:13:47 AM7/4/13
to Grant Rettke, Racket mailing list
Sorry, I meant this for the list, not just Grant.

After I wrote it, I looked again at my bookshelf and found Elements of Functional Programming by Chris Reade, which reminds me in a small way of SICP. It belongs in the intermediate/advanced category.


On Thu, Jul 4, 2013 at 10:04 AM, Phil Bewig <pbe...@gmail.com> wrote:
Jeff Ullman's book Elements of ML Programming got me started on both SML and functional languages in general. I still remember the feeling I had about halfway through the book: this is the way programming should be done. Harper's book Programming in Standard ML is equally good (Did he ever finish it?).

For beginners, Ryan Stansifer's ML Primer and Ake Wikstrom's Functional Programming Using Standard ML are both quite basic. You can read Stansifer in an evening; there's not much there. Wikstrom is a good introduction to the language.

For intermediate programmers, Programming with Standard ML by Colin Myers, Chris Clack and Ellen Poon is good. Rachel Harrison's book Abstract Data Types in Standard ML is poorly written, but some of the code is good.

For advanced programmers, Larry Paulson's book ML for the Working Programmer is excellent, as you noted; I don't know what Matthias objects to. So is Chris Okasaki's book Purely Functional Data Structures. S. Sokolowski's book Applicative High Order Programming gives a very mathematical treatment.

There's lots of conference proceedings if you go looking for them. And of course you will want to read both the Standard and the Commentary.

Matthias Felleisen

unread,
Jul 4, 2013, 11:31:18 AM7/4/13
to Phil Bewig, Racket mailing list
On Jul 4, 2013, at 11:13 AM, Phil Bewig wrote:

Sorry, I meant this for the list, not just Grant.

After I wrote it, I looked again at my bookshelf and found Elements of Functional Programming by Chris Reade, which reminds me in a small way of SICP. It belongs in the intermediate/advanced category.


On Thu, Jul 4, 2013 at 10:04 AM, Phil Bewig <pbe...@gmail.com> wrote:
Jeff Ullman's book Elements of ML Programming got me started on both SML and functional languages in general. I still remember the feeling I had about halfway through the book: this is the way programming should be done


Strange. All i recall are fundamental mistakes in presenting ML. For example, let is presented as a temporary assignment to a variable. ARGH! 


For beginners, Ryan Stansifer's ML Primer and Ake Wikstrom's Functional Programming Using Standard ML are both quite basic. You can read Stansifer in an evening; there's not much there. Wikstrom is a good introduction to the language.

Agreed. 



For intermediate programmers, Programming with Standard ML by Colin Myers, Chris Clack and Ellen Poon is good. Rachel Harrison's book Abstract Data Types in Standard ML is poorly written, but some of the code is good.

For advanced programmers, Larry Paulson's book ML for the Working Programmer is excellent, as you noted; I don't know what Matthias objects to.


I think Harper's perspective on ML is vastly superior to Paulson's who comes from a TP background and if I have a certain budget of reading minutes I go to the place(s) that matter. 



So is Chris Okasaki's book Purely Functional Data Structures


Worth reading when you have programmed in ML for a year and want to understand how to get rid of assignments. 

Sean Kanaley

unread,
Jul 4, 2013, 11:44:01 AM7/4/13
to us...@racket-lang.org
I can't speak to ML vs. Haskell starter-friendliness but I can provide a
link to a free online Haskell book:

http://book.realworldhaskell.org/read/

It's the Haskell equivalent of "Practical Common Lisp".

If you end up liking Haskell, the book Haskell School of Expression is
very good. It takes you through the construction of DSLs for functional
reactive programming (FRP), an imperative language to control robots
(simulated on screen with simple graphics), and one to describe music in
the abstract and then convert it to a MIDI file. It's more heavily math
based, often asking for proofs as exercises, but if that's not what you
like it's not really necessary to do them anyway.

Note that I'm not attempting to persuade you from ML and the
recommendations already given, merely sharing what I personally know
better...though I will say that the Haskell type system to include its
classes, families, functional dependencies, transformers, GADTs, etc. is
probably the best one in existence, or at least in common use...

On 07/04/2013 10:36 AM, Grant Rettke wrote:
> Hi,
>
> One of my current projects is to master as functional and statically
> typed programming language. Having discussed and debated it years ago
> (partially on list here, too) the conclusion was reached that SML
> would be a nicer place to start than Haskell or Clean. Fifteen years
> after its release, there seems to be a lot of knowledge but not a ton
> of resources exactly. There are a lot of dead links and books out of
> print (working off the SML/NJ resource list). I'm wondering of ACM's
> digital library is a good place to start.
>
> Last week I worked through _ML for the Working Programmers_ which was
> great but didn't get into the details in a way that I would have
> expected (went from 10mph to 100mph instead). Up next is _The Little
> MLer_ and Harpers _Programming in Standard ML_.
>
> This list's members have a breadth and depth far beyond most, so I'm
> wondering if I could get your help here and learn about your favorite
> learning SML resources.
>
> Best wishes,
>

Todd O'Bryan

unread,
Jul 4, 2013, 11:50:29 AM7/4/13
to Sean Kanaley, users
I have to put in a plug for Learn You a Haskell for Great Good. It's
quite entertaining and several of my high school students have managed
to work their way through most of it.

http://www.learnyouahaskell.com

Todd

Stephan Houben

unread,
Jul 4, 2013, 1:58:24 PM7/4/13
to Todd O'Bryan, users

If you want to go hardcore, you could consider

The Definition of Standard ML - Revised

Robin Milner (Author)Robert Harper (Author)David MacQueen(Author)Mads Tofte (Author)

Nice book, a bit dense though.

Stephan

Op donderdag 4 juli 2013 schreef Todd O'Bryan (toddo...@gmail.com) het volgende:

natxo cabre

unread,
Jul 5, 2013, 4:17:02 AM7/5/13
to users
I'm also interested in knowing your recommendation about which language is better for starters: SML or Haskell? and why?


2013/7/4 Stephan Houben <steph...@gmail.com>

Matthias Felleisen

unread,
Jul 5, 2013, 8:04:27 AM7/5/13
to natxo cabre, users

BSL ISL then ASL. From there, jump to Racket and Typed Racket. 

If you must, flip a coin and learn yourself OCaml or Haskell or F#. 

natxo cabre

unread,
Jul 5, 2013, 1:47:53 PM7/5/13
to Matthias Felleisen, users
Thanks Matthias,

I'm actually reading the "realm of racket" book and I'm really enjoying it. So, I was thinking what's the next step: probably I will start with Typed Racket as you suggested.
 


2013/7/5 Matthias Felleisen <matt...@ccs.neu.edu>

Nick Payne

unread,
Jul 5, 2013, 10:29:41 PM7/5/13
to us...@racket-lang.org
On 05/07/13 22:04, Matthias Felleisen wrote:
>
> BSL ISL then ASL. From there, jump to Racket and Typed Racket.
>

Is deafness a prerequisite?

BSL == British sign language
ISL == Gestuno
ASL == American sign language

Mark Engelberg

unread,
Jul 6, 2013, 1:13:30 AM7/6/13
to us...@racket-lang.org
While we're on the topic of exploring from Racket to alternative languages, what's the friendliest way to dip into Prolog coming from a Racket background?

Richard Lawrence

unread,
Jul 6, 2013, 3:49:45 PM7/6/13
to us...@racket-lang.org
Mark Engelberg <mark.en...@gmail.com>
writes:

> While we're on the topic of exploring from Racket to alternative languages,
> what's the friendliest way to dip into Prolog coming from a Racket
> background?

Well, there's the Racklog module:

http://docs.racket-lang.org/racklog/

There's also the Datalog language:

http://docs.racket-lang.org/datalog/

I have played around with Racklog a bit, and found it a nice way to try
out Prolog-style programming with easy fallback to Racket when desired.
But I'm a Prolog newbie myself, so I don't have any reading materials to
recommend, besides the Racklog docs.

HTH,
Richard

Dan Andersson

unread,
Jul 6, 2013, 4:38:42 AM7/6/13
to us...@racket-lang.org
Prolog proper or declarative logic programming? For the second I'd say miniKanren and 'The Reasoned Schemer'.


On Sat, Jul 6, 2013 at 7:13 AM, Mark Engelberg <mark.en...@gmail.com> wrote:
While we're on the topic of exploring from Racket to alternative languages, what's the friendliest way to dip into Prolog coming from a Racket background?

Jay McCarthy

unread,
Jul 6, 2013, 8:30:14 PM7/6/13
to Richard Lawrence, users
If you look at the papers referenced in the Datalog documentation, you
can get a good start on the theory of Datalog and some things related
to it.

Jay
--
Jay McCarthy <j...@cs.byu.edu>
Assistant Professor / Brigham Young University
http://faculty.cs.byu.edu/~jay

"The glory of God is Intelligence" - D&C 93

claire alvis

unread,
Jul 9, 2013, 12:08:09 PM7/9/13
to Jay McCarthy, Richard Lawrence, users
If you're interested in Rackety logic programming languages in general, you could take a look at miniKanren's Racket port and beginner's resources at http://minikanren.org

Claire
Reply all
Reply to author
Forward
0 new messages