Entries from March 1, 2010 - March 31, 2010

Sunday
Mar142010

Babar the Freedom-Fighting French Elephant

Last night I listened to a radio program about the BBC during the Second World War (The Friend in the Corner, episode 2 of 6, broadcast on BBC Radio 7 at 7:30pm Saturday 13th March 2010), and the above phrase in it caught my attention.  It occurred in the following context:

A letter arrived from a man in Italy: "If you could only see us in the evening", he wrote, "sitting around the corner where the wireless is, listening to your words, you would think we were sick people inhaling oxygen".  That man, and many like him, have been inspired by Colonel Stevens of the Italian service, Frau Wernicke of the German service, Bob of Radio Orange, and, of course, by Babar the freedom-fighting French elephant.

This was followed by a man singing a French song, presumably from one of the Babar broadcasts (my French is a bit too rusty to make out what it was about).

To me it seemed slighty surreal to think of Babar the Elephant, a fictional figure fondly remember from distant childhood, being used to encourage French resistance to the Nazis (it sounds like something from 'Allo 'Allo!), and I wanted to know more. A little Googling revealed that the Director of BBC European Intelligence during World War Two was a Jonathan Griffin (1906-1990), a poet, translator and diplomat, who actually translated Babar the Elephant into English, though it wasn't his translation that was used in the classic 1930's English edition - that was done by Merle Haas.  It is not clear from what I have found, whether Griffin did his translation before or after his work for the BBC during the war, nor is it clear that he was involved in the Babar broadcasts, but it would seem a strange coincidence if he wasn't.

[Incidentally, Radio Orange was broadcast to the Netherlands by the Dutch government in exile. I have no idea who 'Bob' was, but I did find references out on the web to Colonel Stevens and Frau Wernicke in relation to BBC broadcasts to occupied Europe during the war]

Sunday
Mar142010

Orange Fungus

An orange fungus, probably Stereum hirsutum, growing on a decaying log.  Presumably called hirsutum because of the hairs on its upper surface.

Photos taken in Whiteknights Park, Reading University grounds, Reading, UK, on 2010-01-30.

Saturday
Mar132010

Cucumber Spider

From last spring: a cucumber spider, Araniella curcurbitana (class Arachnidae, Araneae: Aranieidae).

Photo taken in Whiteknights Park, Reading University grounds, Reading, UK, on 2009-05-22.

Friday
Mar122010

Puffball Fungus

A decaying puffball fungus, probably Morganella pyriformis (= Lycoperdon pyriforme).

Photos taken in the Wilderness, Whiteknights Park, Reading University grounds, Reading, UK, on 2010-02-11.

Thursday
Mar112010

Monads as Overloadable Semicolons

A comment by Heinrich Apfelmus on a post by Eric Raymond:

"A simpler way to think about monads is as a hack to turn function composition into a way of forcing the sequencing of function calls, or the functional-programming equivalent of a shell pipeline."

This is probably a good first mental approximation of the IO monad, but it’s not a good way to think about monads in general. They are best understood as imperative mini-languages where you can program your own semicolon “;“. The selection of possible side-effects is huge: state, logging, exceptions, non-determinism, coroutines, … . In particular, non-determinism does not fit the “ensure evaluation order” picture.

The equivalent of a shell pipeline is plain function composition (.) coupled with lazy evaluation, at least if the shell commands are essentially side-effect free.

And a comment by Paul Johnson on the same post:

Its important to distinguish between the definition of a monad (roughly, its a type with a couple of operators defined) and the several ways that monads are used in Haskell.

*One* of those ways is to sequence several operations in some context, and one of those contexts is “IO”. This is indeed a neat hack, but the big news is that monads are not just a way to force IO semantics into a pure language, they are a way to introduce any kind of sequencing semantics you might want. Its a bit like having an overloadable semicolon; what do you want “{x;y;z}” to mean?

For instance, for one application I wrote a threaded discrete event simulation framework in Haskell using a combination of continuation and state monads with IO (because a suspended thread is actually just a continuation). This let me write application-level code with multiple threads where “delay (hour 1)” only delayed the thread long enough for the next hours-worth of simulated events to happen in other threads, rather than 1 hour of wall-clock time.

This is important because requirements are often expressed in terms of the form “do this, then do that”, where “then” has a domain-specific meaning. If you can capture that meaning in a monad then suddenly you have code that can be read and understood by a domain expert, which greatly reduces the opportunities for error.

Page 1 ... 3 4 5 6 7 ... 8 Next 5 Entries »