Friday, July 31, 2015

Farleigh Castle, Bradford on Avon and some other stuff

Sun and calm tempted us out today, a forty minute drive to Bradford on Avon by way of Farleigh Castle.

Clare at Farleigh Castle

Farleigh Castle

Clare in St. Thomas Moore Catholic Church, Bradford on Avon

The bridge over the Avon in the centre of town

St. Margaret's Stairs featuring the author, distracted

The author at the footbridge over the Avon
You knew that Avon comes from the Welsh Afon, meaning river, didn't you? Those early Anglo-Saxons, so easily befuddled when conquering the local Celts.

What did we do in Bradford on Afon? After parking at the railway station we meandered into town, walked the fifty yards of The Shambles (the old medieval market) and ended up next door in the Dandy Lion (think about it) pub.

The Dandy Lion pub

We then crossed the road and saw the Catholic Church, the former Town Hall, and stepped inside. Next we ambled on down to the river where we crossed at the footbridge and considered what to do next: walk by the riverside or visit the museum? We decided on the latter and strolled the few hundred yards to its probable location where we failed to find it. We popped into the library to ask and were told it was actually upstairs. Sadly, due to a shortage of volunteers it was closed.

Back across the road and we were at the tea house next to the Tourist Information shed (yes, it was no more than a shed). Two Americanos, a relax in the sun and it was back to the car - just under two hours.

--

Did you run SETI@home on your computer in the old days? Made a very nice screen-saver as well as doing good, back when we believed in aliens beaming out radio signals. Then they moved it onto BOINC, a general purpose platform, and it got really hard to install and manage, so I abandoned. The years went by.

Today I decided: why not? Do some good: not with SETI@home but with some of the other volunteer-computing projects, you know, protein-folding, analyzing CERN-LHC results and that kind of stuff. So I got myself into the process and found that these days it's not just BOINC you download but a virtual machine box as well (I won't bore you with why).

I did all those things - took a while - and finally I was in the BOINC/BAM project management website environment and had opened an account. And again, it's as hard to manage as ever. I have no idea what all those projects actually do (there are quite a few now) and it doesn't seem at all easy to subscribe to them. Let's just say I tried but nothing much seemed to happen.

I'm sure if I invested a day of my time I could get on top of the offerings and figure out how to download and run the projects of my choice, but .. why is the entry bar so very high? Most people will just back off and bin this whole thing in the 'too difficult' bag.

So many potentially useful sites are ruined by completely neglecting user-interface design and the nature of the user experience. It's a kind of design-autism.

Update: (Aug 2nd): Just to add insult to injury, the Oracle VirtualBox download stopped my Epson printer working. It's now been uninstalled, along with BOINC. Shame.

---

Yesterday I completed lecture 6 of Professor Susskind's General Relativity course. He was talking about photon orbits around a Schwarzschild black hole and the experience of a falling into a black hole past the event horizon: the infaller gives a very different account to that of an observer remote from the event horizon.



This is an advanced undergraduate class at Stanford University so the mathematics Susskind deployed included generalized coordinates, the Lagrangian formulation of classical mechanics, multivariate calculus and he already covered the basics of differential geometry and tensors. Yet every mountain you climb in physics is just a foothill to a higher range of apparently inaccessible peaks. Susskind gave an incredibly hand-wavy account of the maths underpinning the two observers' very differing observations (one infalling, the other stationary but remote) by looking at hyperbolic coordinates and a transform into the curved spacetime of the Schwarzschild metric.

We haven't got anywhere near the field equations yet.

Thursday, July 30, 2015

The Once and Future Kevin

Few things that Kevin did were unplanned. He thought he was the anchor to his flighty wife Suzanne, the person who smoothed the way, anticipated all of life’s little difficulties. But Kevin was aware that one day he would die. What would Suzanne do without his helpful guidance?

He had heard of email systems which would send a missive at a future date of your own choice. Why not send a note from beyond the grave, perhaps every year, on her birthday? Kevin immediately fired up Word and began to draft. But what could he write? Being dead, he would know nothing of the news, or Suzanne’s predicaments. Perhaps he should compose nostalgic text, recalling their life and times together?

Honestly, he couldn’t summon up the energy.

Instead, he downloaded the ‘Eliza’ program, renamed it ‘Kevin’, and began to improve it. After some months, ‘Kevin’, running on a Google server, could: - access Google News; apply Kevin’s unique take on the world (Kevin had coded himself into the rules engine); and could potentially send emails to Suzanne and even somewhat understand any replies (which was roughly Kevin’s own level of personal competence).

To be on the safe side, ‘Kevin’ sent monthly emails to Kevin, and if Kevin were to miss two replies in a row, ‘Kevin’ would presume him dead and immediately switch to sending timely and relevant messages to his grieving widow.

To his great surprise, Kevin died.

Suzanne was initially quite discombobulated by her husband’s demise. Freed from his smothering routines, she now had to think for herself. After a few weeks she pulled herself together and joined the local tennis club. There she met the handsome and charismatic coach with whom she rapidly developed a warm and affectionate relationship. Coincidentally, he was also called Kevin.

Suzanne never did look at her old email account, sharing her new partner’s instead. She had never got on with computers anyway. All is change in the world of the Internet and ‘Kevin’ was soon off-line in one of Google’s periodic efficiency drives, dumped into archival storage.

But Kevin had one consolation: at least Google never truly forgot him.

---

(c) Nigel Seel, 2015.


Eliza

Eliza Doolittle
Just loaded the Prolog implementation of the famous 'Eliza' from the Internet (here, heroically coded by Viren Patel back in 1992). Amazingly it runs without problems on my SWI-Prolog system. Here's a test dialogue .. just a moment ago.

Hello. I am ELIZA. How can I help you?
> I am sick.

I am sorry to hear you are sick.
> Ask me why I am sick

Do you think coming here will help you not to be sick?
> I'd like to think so.

I am not sure I understand you fully.
> Are you ever sick?

Why are you interested in whether I am ever sick or not?
> You interest me.

Why do you think I interest you?
> Because you're tantalising.

Is that the real reason?
> Yes, you interest me.

You seem quite positive.
> I am, very positive.

Is it because you are very positive that you came to me?
>
This is the point where the content-less nature of the dialogue begins to pall. Still, I think Eliza is fixable: insert a knowledge-base and reasoning system between the input and output processing and 'Eliza' suddenly becomes a lot less vacuous.

I feel digital immortality coming upon me by stealth ..

Wednesday, July 29, 2015

Avoiding left recursion

/*
A reminder of why I had (and still have) some qualms about Prolog, elegant though it is. We're told that Prolog programs are to be read declaratively, as specifications - don't think about the execution model! So pretty much my first SWI-Prolog program is this simple statement of likes below. To make it more interesting, I (counterfactually) state that 'likes' is transitive. So this is the program you get.

Program (wrong)

likes(puss-puss, voles).
likes(adrian, football).
likes(adrian, puss-puss).
likes(alex, jokes).
likes(alex, adrian).

likes(X, Z) :- likes(X, Y), likes(Y, Z).   %  transitivity of 'likes'

And this is what you see when you run the program with the query likes(alex,Y) where the intention is to list all the things Alex likes.

Result 

?- likes(alex, X).
X = jokes ;
X = adrian ;
ERROR: Out of local stack

What has happened is that the two facts:

likes(alex, jokes).
likes(alex, adrian).

were matched, then the 'transitivity' clause was invoked, which unfortunately matched itself repeatedly in an infinite loop, until the interpreter ran out of stack space. No problem with the program declaratively, but operationally it loops.

Here's the correct program with the results.

Program (correct)
*/

likes1(puss-puss, voles).
likes1(adrian, football).
likes1(adrian, puss-puss).
likes1(alex, jokes).
likes1(alex, adrian).

likes(X,Y) :- likes1(X,Y).
likes(X, Z) :- likes1(X, Y), likes(Y, Z).   % to stop left recursion, likes1 is first.
/*

Result when executed

?- likes(alex,X).
X = jokes ;
X = adrian ;
X = football ;
X = puss-puss ;
X = voles ;
false.

Even this simple program has a small capacity to surprise: how did it figure out that Alex likes voles?

---

Note: this post is executable by pasting into your favourite interpreter such as here (click on 'create a new program' once you closed the annoying 'Limited Edition!' window).

When copying from here don't forget the top slash-asterisk and the bottom asterisk-slash sign below, plus the full stop after the query likes(alex, X). For extra credit, try likes(Y, voles).  to illustrate Prolog running backwards.
*/

Tuesday, July 28, 2015

A garden in summer

A trip to Wroughton, near Swindon today to visit my mother (with Elaine, pictured below). The hospice is next door to where she's staying and the gardens (and coffee shop) seemed a nice place to visit. A little video follows the picture. The word 'summer' is being used here in a purely calendric way as the mode of dress suggests.

The public garden at the Prospect Hospice, Wroughton



Not much posting here this past week. My excuse? Family visits trash the serenity needed to compose; the Tour was on and we spent hours trying to figure out whether Contador and/or Nibali were suffering post-juice burn-outs; plus not much new was really happening in the world worth commenting on.

Still, all that stuff is behind us now. I was about to install SWI-Prolog and then got diverted with backing up my data (to numerous hard disks and scattered USB drives - you can't have too much security!). Turns out that when your datasets are in the tens of Gigabytes and you need to encrypt (security!) this takes a while - like a day. So that was Monday and I'm finishing off things this afternoon. Prolog tomorrow?

---

OK, we cracked: I put the central heating back on this evening.

Wednesday, July 22, 2015

Those that, at a distance, resemble flies

This blogroll classification amused me:
  • Those that belong to the emperor 
  • Embalmed ones 
  • Those that are trained 
  • Suckling pigs 
  • Mermaids (or Sirens) 
  • Fabulous ones 
  • Stray dogs 
  • Those that are included in this classification 
  • Those that tremble as if they were mad 
  • Innumerable ones 
  • Those drawn with a very fine camel hair brush
  • Those that have just broken the flower vase 
  • Those that, at a distance, resemble flies
Taken from 'Celestial Emporium of Benevolent Knowledge' (Spanish: Emporio celestial de conocimientos benévolos), a fictitious taxonomy of animals described by the writer Jorge Luis Borges in his 1942 essay "The Analytical Language of John Wilkins" (El idioma analítico de John Wilkins).

Tuesday, July 21, 2015

The story of our new path

Alex has been put to work this week on his 'staycation' with us: project 'pathfinder'.

The laying of the edging



The excavation of the rubble

The caching of the surplus aggregate (as dug up)

The gravel awaiting (one ton!)

The finished product

The mission pathfinder complete!

Those that, at a distance, resemble flies

The worker refuels
We have a path!

Goodbye Marissal Road

We moved into our council house in Henbury, Bristol in 1954 when I was three. The three children grew up in it and one by one we all left. My mother was the last to vacate the property, after more than fifty years, and so today the house was cleared. I was there before 8 am this morning and took this video tour while waiting for the house clearance team from the British Heart Foundation.




The BHF team were efficient and were done by lunchtime. On my return to lock up, I took these final pictures.



The master bedroom

The back bedroom - most of us occupied it one time or another

The 'box' room - mine while at secondary school

The hall and front door

The kitchen leading to back garden

The living room, looking to the back garden

The living room at the front
It all looks rather forlorn. Pathos turned to bathos when I turned up at the Lawrence Weston 'Citizen Service Point' to hand in the keys. The council employee checked the address on the computer and could unearth no evidence that Bristol Council was aware the property had been vacated. Yes, they had lost my 'notice to quit' letter of three weeks ago.

I am wise in the Kafkaesque ways of public bureaucracies. Calm, calm, calm. Under instruction I wrote a lengthy, handwritten letter outlining all the facts of the case with dates and events, and ended by pleading with the anonymous council recipient to please accept the original termination date despite the absence of said 'quit notice' in their filing system.

We shall see whether such grovelling saves some gratuitous rent payments.

A late birthday present

I went to see my mother today (with Elaine) in Wroughton while the BHF team were house-clearing. We visited the park, fed the homicidal seagulls and watched kids trying to fend off dinghy collisions on the lake. At the end there was a late birthday present for Clare.



We were baffled as to what the heavy cylinder was. I speculated variously on pickled onions and manuka honey. The reality was considerably more wonderful.

A scented candle

It's currently brightening up the hall in olfactory mode - it almost feels wrong to light it.

The English summer and its sunbather

Clare sunbathing in the West Country summer

That jet stream has a lot of explaining to do!