Lecture 6: Types, Classes, Haskell

8 October 2010

The three lectures today and next week are arranged around some features of the Haskell type system. They aren’t just specific to Haskell, though: several appear in other languages too, and they all address general programming issues. Haskell does make a good setting to examine them, as the language development has had a strong connection to programming language research, and it is sufficiently popular that there is a wide array of commentary out there on how well that works for users.

This lecture covered some background on type systems in programming languages and the different things languages do with them.
Read the rest of this entry »


Haskell Resources

6 October 2010

Lectures 6–8 will address some interesting uses of types in programming, with examples specifically from the Haskell language.

If you haven’t programmed in Haskell before — or you have, but Informatics 1 seems but a distant memory — then over the next week you should learn some basics of the language. The rest of this post suggests some resources, updating last year’s list with new material from students.
Read the rest of this entry »


Lecture 5: Concurrency in Other Languages

5 October 2010

A brief look at some alternative concurrency mechanisms in other languages. Mentioned mechanisms: locks and conditions, message passing, and lock-free algorithms or transactional memory. Drawbacks of locks, including language-critical point about lack of compositionality. Specific examples of concurrency in other languages: Actors in Scala (asynchronous message passing) and Software Transactional Memory using atomic blocks, retry and orElse.

This was a dense lecture, especially with the new 9am start time (please be on time!) and the recap of control abstractions from last week’s lecture. You will need to study the examples (and background reading) and do the homework exercises.

Link: Slides.

Homework

  • Try out (and complete) the example code from the lecture in Scala and Haskell, or an alternative STM library in a language of your choice. Be sure to write a good test harness for queue processing, which uses multiple threads to insert and remove elements and has a way of reporting progress so you can compare implementations.
  • Prepare for next lecture block: revise (or investigate afresh) Haskell. Useful links: haskell resources blog entry and Learn You a Haskell For Great Good beginners guide.

Change: New time, new place

4 October 2010

To avoid the clash with Probabilistic Modelling and Reasoning, we are changing the APL lecture times; which then also requires changing location. Starting tomorrow, 5 October, lectures will be as follows:

  • 9am Tuesday: William Robertson Building G.11
  • 9am Friday: William Robertson Building G.02

That is, one hour earlier, with Tuesday lectures being in a new place and Friday lectures in an old place.

G.11 is at the other end of the William Robertson Building from G.02, but on the same floor.

Links: Map; Room G.02; Room G.11; Building information.


Microsoft Software licences available

3 October 2010

The School of Informatics has a subscription to the Microsoft Developer Network Academic Alliance (MSDN AA). This means that we can offer licensed copies of a range of Microsoft packages. These are for “development” rather than “productivity” tools: Windows 7 and Visual Studio rather than Word and Excel. You can make arbitrary non-commercial use of these while studying here.

In particular, if your chosen coursework topic requires setting up one or more virtual machines running Windows, this can help.

If you would like an MSDN account to download the software and licence keys, send me an email.

Links: Microsoft Developer Network Academic Alliance; Student Use Agreement.