Textbooks and Other Resources
There is no textbook to buy for this course. However, I will assign outside reading from the following sources, which are both available online for free. The outside reading complements the lectures and is often able to go into more depth than we have time for in class.
I use the letters M, H, and S on the schedule to indicate reading assignments from these three sources.
M: Math Primer by Andrzej Wąsowski – A very clean and concise refresher on math that is relevant to this course.
H: Introduction to Haskell by Brent Yorgey – An excellent, concise introduction to Haskell. If you’re new to Haskell, don’t skip this reading!
S: Denotational Semantics: A Methodology for Language Development by David Schmidt – A freely available book on denotational semantics, domain theory, and language design. This reading is a bit heavier than the others.
P: Practical Foundations for Programming Languages by Robert Harper – A satisfyingly rigorous treatment of programming languages. Unfortunately uses some non-standard terminology, which I’ll clarify in class. The chapters I’ll assign are all available in the free preview.
Programming languages is one of the more theoretical disciplines within computer science. As such, this class requires a fluency in discrete mathematics. The most important for this class will probably be (ranked very roughly by importance):
- Set theory – Essential!
- Formal languages – Essential!
- Proof methods – The most important “sophisticated” proof technique is structural induction.
- First-order logic
Fluency with a few mathematical notations is also important:
- Context-free grammars in BNF – Used for defining syntax.
- Inference rules – Used to define operational semantics, type systems, and many other kinds of relations on syntactic terms.
Throughout the course, we will use the functional programming language Haskell. In particular, we will use Haskell as a metalanguage for describing programming language concepts. It is therefore absolutely essential that you develop your Haskell programming skills!
I recommend that you consult multiple Haskell tutorials/manuals and write Haskell programs outside of class. The following resources should provide several options.
Running Haskell Code
Haskell Platform – The easiest way to start using Haskell. I will assume you have this installed.
Hackage – The central package archive for the Haskell community. There are lots of useful libraries here. Install them using the
cabaltool, which comes with the Haskell Platform. First, run the following command to download the list of packages on Hackage.
Then you can install new packages by running the following command.
cabal install [package-name]
How to cabal install – A longer tutorial about installing packages from Hackage, in case you run into problems.
Doctest – A useful tool for running examples in comments as unit tests. We’ll use this occasionally in Homework assignments. You can install
cabal install doctest, as described above.
You will probably also need to add the installation directory to your
$PATH. Here are my best guesses as to where that will be:
Other Haskell Tutorials and Reference Manuals
Haskell: The Confusing Parts – An FAQ especially for folks coming to Haskell from a C/Java background, which I guess is many of the people in this class.
A Gentle Introduction to Haskell – Famous for being not-so-gentle, but a really great and concise resource for refining your understanding of Haskell, once you get the basics down.
Real World Haskell – O’Reilly’s book-length introduction to Haskell focusing on practical applications. Available for free online.
Learn You a Haskell for Great Good! – A tutorial written in a casual style that starts from the very beginning. Some offensive humor.
For low-level questions of layout, I like the pragmatic advice in Johan Tibell’s Haskell style guide.