A one week course on Scala and Domain-Specific Languages

Practicalities

All lectures except for Tuesday and Friday will be held in room 3364. Tuesday's and Friday's lectures will be in room FL71 (Physics).

David's email address is drc at (itu's domain).

Slides, example code and other resources will be linked to from this page throughout the week. Please check back regularly.

Each day, a group room is reserved. It will be advantageous if you can bring a laptop to this room so that we can work on the exercises together, taking up any issues as they arise.

Useful links

Preparation

Please make sure that you have access to a computer with a JVM and SBT installed. Installation instructions for SBT are available from the project's home page. Alternatively, you can simply install Typesafe Stack, which will also get you SBT.

Course plan

Monday, 3 December

Introduction to Scala (10:00 room 3364)

Tools and practicalities (13:15 room 3364)

Materials

Homework

Implement simply-typed call-by-name lambda-calculus.

Note: This exercise has been modified to reduce difficulty. The original version wanted you to generate the type-safe terms from the untyped terms, which is not feasible given the amount of Scala knowledge we expect. However, this can be done for simple arithmetic expressions.

Alternate assignment for those who haven't seen lambda calculus and GADTs before (from ITU course).

Group room 4128 is available all day Monday.

Tuesday, 4 December

Implicits (10:00 room FL71 (Physics))

Functional programming in Scala (Tuesday, 4 December 13.15 room FL71)

Materials

Homework

Group room 6128 is available all day Tuesday

Wednesday, 5 December

Scala API design (10:00 room 3364)

Embedding languages in Scala (13:15 room 3364)

Materials

Homework

Group room 4128 is available all day Wednesday

Thursday, 6 December

Polymorphic embedding of DSLs (10:00 room 3364)

Virtualized Scala (13:15 room 3364)

Version notes

Materials

Homework

Group room 4128 is available all day Thursday

Friday, 7 December

Lightweight modular staging (10:00 room FL71)

Discussion session (13.15-15.00 room FL71)

Group room 6128 is available all day Friday

Materials