Entries from June 1, 2010 - June 30, 2010

Wednesday
Jun302010

Ephydrid Fly

An Ephydrid fly, possibly Notiphila riparia (Diptera: Ephydridae) based on this comment by 'Cranefly' at diptera.info.  It was standing on an aphid-infested burdock plant (Arctium sp.) that was growing on the dam at the lower end of the large lake.

Photos taken in Whiteknights Park, Reading University grounds, Reading, UK, on 2010-06-27.

Tuesday
Jun292010

Damselfly

A female blue-tailed damselfly, Ischnura elegans (Odonata: Coenagrionidae).  The females of this species come in five different colour forms.  This pink form is known as rufescens.

Photo taken in Whiteknights Park, Reading University grounds, Reading, UK, on 2010-06-20.

Tuesday
Jun292010

Another Reason to Learn Haskell

From Real World Haskell (O'Sullivan, Goerzen and Stewart, O'Reilly, 2009, page 38):

In "Function Types and Purity" on page 27 we talked about figuring out the behaviour of a function based on its type signature.  We can apply the same kind of reasoning to polymorphic functions.  Let's look again at fst:

  ghci :type fst
fst :: (a, b) -> a

First of all, notice that its argument contains two type variables, a and b, signifying that the elements of the tuple can be of different types.

The result type of fst is a.  We've already mentioned that parameteric polymorphism makes the real type inaccessible.  fst doesn't have enough information to construct a value of type a, nor can it turn an a into a b.  So the only possible valid behaviour (omitting infinite loops or crashes) it can have is to return the first element of the pair.

...

There is a deep mathematical sense in which any nonpathological function of type (a,b) -> a must do exactly what fst does.  ...

If this doesn't surpise you when you first come across it, then you haven't been paying attention.

Monday
Jun282010

Robber Fly

A female robber fly, probably Dioctria linearis (Diptera: Asilidae).

Photo taken in Whiteknights Park, Reading University grounds, Reading, UK, on 2010-06-25.

Sunday
Jun272010

Hoverflies

A female hoverfly, Volucella pellucens (Diptera: Syrphidae).  In this species the scutellum apparently varies from brown to black; see here for some photos of a brown-scutellum specimen.

This is male (the eyes are in contact on top of the head):

Photo taken in Whiteknights Park, Reading University grounds, Reading, UK, on 2010-06-23 (the female) and 2010-06-20 (the male).