Dreamland

When midnight mists are creeping,
    And all the land is sleeping,
Around me tread the mighty dead,
    And slowly pass away.

    Lo, warriors, saints, and sages,
    From out the vanished ages,
With solemn pace and reverend face
    Appear and pass away.

    The blaze of noonday splendour,
    The twilight soft and tender,
May charm the eye: yet they shall die,
    Shall die and pass away.

    But here, in Dreamland's centre,
    No spoiler's hand may enter,
These visions fair, this radiance rare,
    Shall never pass away.

    I see the shadows falling,
    The forms of old recalling;
Around me tread the mighty dead,
    And slowly pass away.

              by Lewis Carroll

Calling PHP Functions from XSL

Craig, a colleague of mine who newly joined our development team at Talis showed me this neat little trick. Many things are far easier to do in PHP than they are in XSL, and some things simply can’t be done in pure XSL. A solution is to call PHP functions directly from within your XSL.

1) In your xsl stylesheet add:

   namespace xmlns:php="http://php.net/xsl"
   exclude-result-prefixes="php"

2) To call the php function and access the result use:

  1.  
  2.   <!– for string use this –>
  3.   <xsl:value-of select="php:functionString(‘phpFunctionName’, /xpath)"/>
  4.  
  5.   <!– for DOM Nodes use this –>
  6.   <xsl:copy-of select="php:function(‘phpFunctionName’, /xpath)"/>
  7.  

You can pass as many parameters as you want to either php:function or php:functionString – the latter merely converts output to a string and otherwise they are identical.

3) you must register them with the XSL Transformer:

  1. span class=”co1″>// This is the important call for this functionality

4) In your php function, access parameters passed in as strings as if they are a php string. If you pass a dom structure as a parameter then you need to access it along the lines of:

  1. span class=”st0″>’namespace’, ‘element-name’

$DomList will include the root element of the XPath used to call the PHP function

If you want to dump what you pass to PHP as a string you need to do:

  1. span class=”co1″>// note this function isn’t yet documented in the PHP manual !
  2.  }
  3.  

It’s a very useful feature … good luck with it.

Harry Potter, St. Augustine and the Confrontation with Evil

I was intrigued when I came across this talk by Jean Bethke Elshtain. Right at the beginning of the talk she argues that the language of evil, sin, horror and the like have been banished from the vocabulary of many elites in the west and particularly amongst the clergy. She goes on to suggest that its easier to talk about syndromes than about sin, or easier to talk about maladjustments than about evil, because evil seems archaic and elemental and too judgemental. Whilst some might find these assertions provocative they certainly piqued my interest.

During her talk Jean refers often to the works of Andrew Delbanco, and in particular to his book “The Death of Satan:How Americans have lost the sense of evil“. I haven’t read the book yet but from her talk it’s certainly one that I want to read. Jean states that Delbanco makes the assertion that:

Without evil we will abandon any notion of the sacred of that which should not be violated. Without evil it is difficult to articulate what is good … the repertoire of evil has never been richer but never have our responses been so weak. We have no language for connecting our inner lives with the horrors that pass before our eyes in the outer world.

We have no language for connecting our inner lives with the horrors that pass before our eyes … that’s quite profound and it’s a statement I’ve been pondering since first listening to this talk. Jean’s premise, if I’m interpreting it correctly, is that as a society or even culturally we are no longer able to talk about evil. It’s something that she maintains even children’s literature has shied away from, that it is perhaps too frightening for the young, or too judgemental. Evil, though, plays a central role in the Harry Potter books; it’s given a name, personified and confronted – I wonder if she considers this to be a more traditional view? She certainly uses the Harry Potter books as a vehicle to illustrate her points, and she does it very well. Now, whilst I have read the books and seen the movies, that isn’t the reason I found this talk so captivating. I found it interesting because of the theological questions and cultural issues she touches on. Of them all this is the most interesting …

If a good God created the earth, then how did evil enter into it.

It’s a question that theologians and philosophers have been fretting over since the likes of Irenaeus and St Augustine presented their theodicies on the subject. Theodicy is a specific branch of theology and philosophy that attempts to reconcile the existence of evil or suffering in the world with the assumption of a benevolent God. To try and understand the nature of the problem Augustine in his Confessions expressed the dilemma as such:

Either God cannot abolish evil, or he will not. If he cannot then he is not all-powerful. If he will not then he is not all-good

One way to view this is that a good God would eliminate evil as far as it is possible. If he is omnipotent then all evil should be eliminated. However, evil exists. So, why does God allow evil to continue?

I debated the issue with Amanda I think they’re was a difference of opinion I wont put words in her mouth but I struggled with the notion of Original Sin and I’m going to leave it to her to offer her views on this topic. From my point of view if Evil entered this world it’s because of our free will. I think that for man to respond freely to God, he must be able to make his own decisions. This means that ultimately, a man may choose to do good or commit moral evil. The reality is that no one is entirely good or entirely evil. To take this logically further this means that God cannot intervene to stop suffering because this would jeopardise human freedom and take away the need for responsibility and development.

From my limited reading on Theodicies I get the impression that my standpoint is more in line with Irenaeus view – he argued that Evil was the result of our free will – which I believe is also the Islamic view ( taken from here ):

the angels protested to God against man’s creation, but lost in a competition of knowledge against Adam, who was taught the names of all things. The Qur`an declares man to be the finest of all creatures and he willingly bore the trust which the heavens and the earth refused to bear. All of creation was subjected to man, who by virtue of the rational faculty with which he was endowed, was enjoined to, and entrusted with, the development of civilization. In such endeavor he may be, either righteous or corrupt, a monotheist or an unbeliever. As the Qur`an affirms, there is no compulsion in faith and religion; in other words, faith belongs to the domain of individual freedom and choice. Moreover, life and existence were not created in vain, but were brought into being so that God is obeyed and worshipped. Thus, Islam is profoundly teleological while affirming theodicy in creation.

It must be noted that Islam views human nature as fallible and faltering- that man is oppressive and prone to ignorance- despite his lofty station in the universe. By contrast to angels who are instinctively obedient to God, man is inclined to error. Pride is the cardinal sin of man- a sin which detracts man from submission to a unique God, and which makes him ascribe partners to Him. In Islam, the most heinous of transgressions is shirk or polytheism

As such it is at odds with St Augustine’s view which was that God created the world and at that time it was Good, and that Evil is a “privation of good”, in other words it isn’t an entity in itself – like blindness could be viewed as a privation of sight … that seems to resonate with something Amanda was saying that Evil “was a lack of something”.

Anyway this whole discussion has given me something to think about … and I do enjoy these philosophical debates with Amanda.

Haiku, no?

Now steady friend
Welcome does remainder gleam
Earth's enemy long dead.

I’ve become fascinated by Haiku – a form of Japanese poetry with a clear picture designed to arouse a distinct emotion and suggest a spiritual insight. Haiku has one additional requirement that poems must only contain 17 syllables. This makes the poems very short ( three lines long ) and they can often seem very cryptic or impenetrable.

BBC Using PhotoSynth …

The BBC is performing a technical trial of the PhotoSynth technology as part of it’s How We Made Britain television series. You can find out more about the trial here, and you can view the synths at http://labs.live.com/photosynth/bbc/ , for a list of all the collections related to the TV series click here – This list contains Ely Cathedral, Burghley House, Royal Crescent in Bath, Blackpool Ballroom, Scottish Parliament Building and Trafalgar Square

The level of detail in all these Synth’s is amazing and the technology provides a wonderfully intuitive way of exploring these buildings and places. PhotoSynth continues to impress and I can’t wait to find out when MS intend to launch desktop versions of the tool that we can use at home with our own library of photo’s.

I also found this Synth of Gyeongbok Palace in Korea, it’s stunning!

Vampire Sestina

The first time I read this poem was in my teens, came across it again today as I was sorting through some of the books I left at my parents place. The poem was even the inspiration for a graphic arts project I did at college …

           Vampire Sestina 

I wait here at the boundaries of dream,
all shadow-wrapped. The dark air tastes of night,
so cold and crisp, and I wait for my love.
The moon has bleached the color from her stone.
She'll come, and then we'll stalk this pretty world
alive to darkness and the tang of blood.

It is a lonely game, the quest for blood,
but still, a body's got the right to dream
and I'd not give it up for all the world.
The moon has leeched the darkness from the night.
I stand in shadows, staring at her stone:
Undead, my lover . . . O, undead my love?

I dreamt you while I slept today and love
meant more to me than life -- meant more than blood.
The sunlight sought me, deep beneath my stone,
more dead than any corpse but still a-dream
until I woke as vapor into night
and sunset forced me out into the world.

For many centuries I've walked the world
dispensing something that resembled love --
a stolen kiss, then back into the night
contented by the life and by the blood.
And come the morning I was just a dream,
cold body chilling underneath a stone.

I said I would not hurt you. Am I stone
to leave you prey to time and to the world?
I offered you a truth beyond your dreams
while all you had to offer was your love.
I told you not to worry and that blood
tastes sweeter on the wing and late at night.

Sometimes my lovers rise to walk the night . . .
Sometimes they lie, cold corpse beneath a stone,
and never know the joys of bed and blood,
of walking through the shadows of the world;
instead they rot to maggots. O my love
they whispered you had risen, in my dream.

I've waited by your stone for half the night
but you won't leave your dream to hunt for blood.
Good night, my love. I offered you the world.

                         by Neil Gaiman

 

Amazon attempting to patent S3

The US Patent and Trademark Office has disclosed Amazon’s latest patent application for a “Distributed storage system with web services client interface” here’s an extract from the abstract:

A distributed, web-services based storage system. A system may include a web services interface configured to receive, according to a web services protocol, a given client request for access to a given data object, the request including a key value corresponding to the object. The system may also include storage nodes configured to store replicas of the objects, where each replica is accessible via a respective unique locator value, and a keymap instance configured to store a respective keymap entry for each object. For the given object, the respective keymap entry includes the key value and each locator value corresponding to replicas of the object. A coordinator may receive the given client request from the web services interface, responsively access the keymap instance to identify locator values corresponding to the key value and, for a particular locator value, retrieve a corresponding replica from a corresponding storage node.

I’m guessing that in light of a recent supreme court ruling this application would not be granted under the strengthened obviousness test as such a patent for a distributed storage system with a web services client interface is about as obvious as you can get. It wasn’t too long ago Amazon failed in their attempt to patent one-click technology which again should have been rejected on the basis of the obviousness test but wasn’t largely because Amazon has a history of bullying the Patent Office … Tim O’Reilly summed up why in this excellent little article.

The more we move towards a Web 2.0 world with applications delivered as SaaS by its very definition were dealing with applications that require distributed storage which is accessible through web services. I’m not knocking S3, its excellent service and Amazon deserve our plaudits for creating such a successful service. S3 isn’t a unique invention it’s simply the putting together of a bunch of technologies already available, and Amazon aren’t unique there are other platform’s available similar to Amazon’s S3 .. Tim might have written the following in reference to the One-Click patent but I believe its equally applicable to this one…

Patents like this are also incredibly short-sighted! The web has exploded because it was an open platform that sparked countless innovations by users. Fence in that platform, and who knows what opportunities will never come to light?

I’m not sure whether Amazon would ever try to enforce this patent and I’m no expert on patent law, it just strikes me as a worrying development.

Are we still evolving … biologically?

Had a rather impassioned debate with Amanda this evening on the subject of whether we, humans as a species, are still evolving biologically. Or even whether or not we need to. I was arguing that the human race might very well be stagnating or reaching ( or have even reached ) an evolutionary impasse due to the fact that we aren’t being forced to adapt to our environment anymore. Humans are unique as a species in that we are able to change the environment around us (even destroy it) … critically though we are no longer forced, at a biological level, to adapt to it. I was also suggesting that we are evolving culturally and technologically and that we can see that certain pockets of humanity suffer more than others because of the rate at which they can absorb or adapt to cultural and especially technological advances. 

Amanda was making the point that the advent of agriculture, arguably our first and most important technological advancement, might very well have been the point at which we no longer needed to adapt to survive in our environment. I’m no anthropologist but it certainly sounds reasonable. I said I was going to read a bit around the topic and try and rationalise my thoughts into a blog posting … as part of that I came cross this short piece by Marc West. I’m probably biased because, as Amanda will no doubt suggest, Marc makes almost exactly the same points I was except he does it much better than I did – even the notion that our biological evolution may very well be defined by some convergence between our biological bodies and technological enhancements – or as I put it to Amanda … the cyberisation of the human species

It’s well worth reading Marc’s posting and the podcast and panel discussion he links to … it’s amusing because some of the ideas do seem far fetched but it’s still interesting and insightful.

The Winds of Fate

One ship drives east and another drives west
With the selfsame winds that blow.
Tis the set of the sails
And not the gales
Which tells us the way to go.

Like the winds of the seas are the ways of fate,
As we voyage along through the life:
Tis the set of a soul
That decides its goal,
And not the calm or the strife.


                        by Ella Wheeler Wilcox