Lecture 14: Concurrency in Java

26 February 2009

Concurrency: motivations for concurrent code; Amdahl’s law and the opportunity for language design. Challenges with concurrent code, including liveness, fairness, scalability. Threads and processes. Java Thread basics. The need for mutual exclusion and serialisation. Monitors in Java: locks and synchronize, condition variables with wait() and notify().

You should read Sun’s tutorial on concurrency to get an introduction to the concurrency facilities provided in Java. Experimentation is essential: try some of the examples inside Netbeans or Eclipse and investigate the facilities for debugging concurrent code.


APL13: Guest Lecture

21 February 2009

Database Programming without Tiers

Sam Lindley

Laboratory for Foundations of Computer Science
School of Informatics
The University of Edinburgh

9am Monday 23 February 2009

Read the rest of this entry »


Lecture 12: Heterogeneous Metaprogramming in F#

19 February 2009

Metaprogramming, code that manipulates code.  Examples: macros, templates, eval; quotation, quasiquotation, antiquotation; staged computation; run-time code generation, self-modifying code; MetaOCaml, homogeneous vs. heterogeneous metaprogramming, offshoring code.  The F# programming language; background, motivation; mixture of ML and .NET; interlanguage working.  Metaprogramming with LINQ: expressions in C#; quotations in F#, strongly typed expression data; using LINQ to map F# source to SQL queries; lightweight runtime code generation; Conway’s Game of Life in F#, outsourced to run on a GPU.

Advertisements for Martín Escardo’s seminar this afternoon, and Sam Lindley’s talk on Database Programming Without Tiers as an APL guest lecture on Monday.

Links for background material now available below. Read the rest of this entry »


LFCS Seminar

18 February 2009

There’s an APL-relevant seminar in the Forum this Thursday afternoon.

A Monad for Exhaustively Searching
Infinite Sets in Finite Time

Martín Escardo

University of Birmingham

4pm Thursday, 19th of February, 2009
Room 4.31/4.33, Informatics Forum

Links: Seminar abstract; LFCS Seminar series

This talk will show how to use monads in Haskell to structure and execute exhaustive search over (certain) infinite sets.  Martín is a great speaker, and has also done fascinating work on exact real computation.  He’s interested in having APL students along to the talk, and it should be accessible to those interested in programming languages and mathematics.

You’ll need to sign in to enter the Forum, but just state that you are attending a research seminar, following item 3 of the Forum access policy.


Lecture 11: Bridging Query and Programming Languages

16 February 2009

LINQ: Language Integrated Query for .NET. Overview of Microsoft’s .NET framework. Application management. Support for multiple programming languages. Common intermediate language, types, runtime. Accessing SQL from Java and from C#. Aim of closer query/programming language integration. LINQ example using SQL-style syntax; its expansion into method calls. Programming language features added to C# in support of this: lambda expressions, extension methods, structural datatypes, anonymous datatypes, type inference, expression trees and metaprogramming.

More references and some of the background to LINQ below the fold. The next lecture is on F#: I’m looking for online guides to LINQ or F#, so if you find any that you think useful, then please put them in the comments. Thanks.

Read the rest of this entry »