Entries by Tristram Brelstaff (3025)

Tuesday
Nov282006

Mark Chu-Carrol on Haskell

Over at Good Math, Bad Math, Mark Chu-Carroll is doing a series of articles aimed at teaching the functional programming language Haskell.  I will be keeping a watch to see how this develops because MCC is a bright bloke and usually has interesting things to say about whatever subject he writes on.  The first few articles are already up:

Sunday
Nov262006

"Here is a List of Incorrect Things..."

This video of Wings by the Fall brought back memories for me, even though I had not seen the video nor heard the song before.  It is classic early Fall: a rambling gothic tale backed by a driving beat. Great stuff!

Friday
Nov242006

Answers To Questions

A 'meme' transmitted via Snail's Tales:

  • Explain what ended your last relationship.  Nothing: it is still on-going.
  • When was the last time you shaved?  1981.
  • What were you doing this morning at 8AM?  Looking out over Bagshot from the window of the train on my way to work.
  • What were you doing 15 minutes ago?  Watching The Simpsons with my daughter, Zoe.
  • Are you any good at math?  I'm better than most, but there is still a lot that is beyond me.
  • Your prom night, what do you remember about it?  If I had one, I've forgotten all about it.
  • Do you have any famous ancestors?  King Edward I, Hammer of the Scots (but then a large proportion of the British population have royal ancestors if you go back that far).
  • How many different beverages have you had today?  Coffee (caffeinated and decaff) and a sip of cocoa when I made some for Zoe half an hour ago.
  • Do you re-use towels after you shower?  I put towels to wash if they smell when they are damp.  (If you wash them after a single use then you might as well be using paper towels.)
  • Some things you are excited about?  Finding, or reading about, new ways of understanding familiar things. 
  • Do you sleep with the door to your room open or closed?  I work in an open-plan office.
  • Who did you lose your CONCERT virginity to?  See here.
  • Last thing received in the mail?  A letter from my bank offering me a loan of 16,000 pounds.  I shredded it and put it in the recycling bin.
  • Do you like what the ocean does to your hair?  I see to it that the ocean doesn't get anywhere near my hair.
  • Have you ever received one of those big tins of 3 different popcorns?  No.  If I did I would shred it and recycle it.
  • Have you ever been to a planetarium?  Yes, I went with my wife to the London Planetarium about 10 years ago.  As soon as the lights went out my wife closed her eyes and slept through the whole show.
  • What's the most painful dental procedure you've had?  Probably a filling, but I haven't had any of them since the early 1970's.
  • What is out your back door?  A concrete path and a lawn with an S-shaped mushroom 'ring' on it.
  • Any plans for Friday night?  Sleep.
  • Do you ever leave messages on people's answering machine?  Occasionally.
  • Do you draw your name in the sand when you go to the beach?  No, I draw my daughters name (and she runs around  after me rubbing it out).
  • Have you had to take a loan out for school.  Never.
  • Do you know the words to the song on your MySpace profile?  MySpace is for kiddies.
  • What is your favorite flavor of JELL-O?  Jell-o is for kiddies..
  • Describe your keychain(s).  My work key-tag is a triangular plastic warning sign saying "Danger 415 volts!".
  • Where do you keep your change?  A small leather purse.  When I was young I used to use small plastic bags (the sort banks use to put coins in), but a girl friend took pity on me and bought me one of these purses for Christmas.  I have used them ever since.
  • When was the last time you spoke in front of a large group of people?  1994, in a variable star meeting at the Institute of Astronomy at Cambridge.
  • What kind of winter coat do you own?  None.  I get by with an umbrella and a light-weight 'kag-in-a-bag' to keep me dry, and multiple pullovers to keep me warm.
  • What was the weather like on your graduation day?  Don't know.  I was on holiday abroad in late July 1979, when my graduation ceremony took place.
Wednesday
Nov222006

Why Alloy has no in-built Notion of State

A few years ago Daniel Jackson took the rather surprising step of actually removing in-built support for states from the Alloy specification language. Here he explains why:

the main advantage of the old scheme was that, with the notion of pre and post built in, certain mutability constraints could be built in too. when you declared a state component, you could say how it changed.

but it turns out that priming as an operator is much more complicated than you would imagine. it made for all kinds of kludges in the implementation, which was a sure sign that the semantics was too complicated. and sure enough, if you take a look at the semantics of sequential composition in the Z standard, you'll see that it's full of subtle details and is really quite ad hoc.

the main reason we dropped it, tho, was that we wanted to be able to handle dynamic behaviour with more flexible idioms. with that priming convention, you're really tied to a rather narrow way of writing models. having got rid of it, we can do more ambitious things -- talking about sequences of more than a pair of states, for example.

(From the alloy-discuss group.)

One of the reasons that I became disillusioned with Z and its object-oriented extensions was that they had become bogged down in a state-based view of specification. This seemed to me to be so limiting. It was as if the developers of Z were satisfied with just aping programs. They didn't seem to be interested in going any further. I wanted more, and I am glad to see that Daniel Jackson does too.

Tuesday
Nov212006

Windows Programming

Over the years, I have always had a subconscious aversion to 'Windows programming'.  Now I know why:

In a sense, the whole history of new programming languages and class libraries for Windows has involved the struggle to reduce the windows hello-world program down to something small, sleek, and elegant. -- Petzold, Programming Microsoft Windows with C#, Microsoft Press, 2002, p. 47 (via Lambda the Ultimate).

If doing the simple things is difficult, then doing complex things must be well-nigh impossible!