timing some variations on a theme

I thought I’d test the speed of some comparison variations in PHP. Here are the results:

testing (!(6|5)) 99999 times: 0.40472507476807
testing (!(6||5)) 99999 times: 0.36446118354797
testing (!6 && !5) 99999 times: 0.37069892883301
testing (6==0 && 5==0) 99999 times: 0.44164681434631
testing (6||5)!=0 99999 times: 0.39538788795471

Numbers were hard-coded. Language is PHP 4.3

morning thoughts

Dive Into Mark has a funny, but eerily true account of the nature of developers.

Topic of the moment at #linux: Nargler 's brain has quit (Read error: Need Coffee)

I get up at 6:30am to rush preparation for leaving home at 7am, so I can read a book (Raymond E Feist: Shadow Of A Dark Queen) while walking to work through the rain. I arrive after forty minutes and four miles so I can have an early start without distractions, then I read blogs, news, and tutorials for an hour or so.

wordpress from console

Let me just tell you – this is not easy! I lost the action of one of the axes of my mouse earlier, and rather than struggle with a half-functional tool, I decided to revert to console. I’m not sure which is better… Lynx in text mode is not very good with the ol’ textarea.

Note to self: look into how wordpress handles pointy brackets.

Note to self: If you can smell anything from the kitchen; it’s burning!

Note to self: do not piss of GF, as she is on several mailing lists, and may threaten bars of soap.

Note to self: Aliens Vs Predator sucked, but it may be watchable once or twice before it settles into unwatchability.

atheism and spirituality

I was out doing a job for a few friends of mine (Linux-based ISDN router), and got a lift back with one of them.

We chatted on the way back to Monaghan about our differences in belief. One thing that struck me was how people think that atheists do not have a sense of spirituality – perhaps because atheists do not believe in spirits.

I think of myself as a very spiritual person. When Marcus put me on the spot by asking what spirituality meant to an atheist, it took a few moments to gather my thoughts on how i felt about it.

In my opinion, a “spiritual” person is one who feels an empathy with his/her surroundings. The surroundings could be people, nature, or just thoughts.

With that in mind, there is little difference between a pagan shaman (or witch or whatever) and myself. I feel “at one” with my surroundings, wherever I am, even though I do not subscribe to theist viewpoints.

Marcus then posed another – what will I do when I die but have not “turned off”? We had a bit of a chuckle when I said that I’d probably feel a bit embarassed at being wrong.


Note the capitals: Lord Of The Rings – Return Of The King – EE.

I remember sitting in my ostracised computer room at home in Clones, Monaghan watching the Fellowship Of The Ring extended version many times, with different commentaries, then watching The Two Towers EE in my ostracised computer room in Coranny, Monaghan when it came out.

This year, I’m looking forward to watching Return Of The King EE on my computer. This time, no longer ostracised, because Herself has become a computer junkie.

physical exercise

As a web developer, my physical exercise is constricted to the walk into and from work, which, while it is four miles either way, is not enough for me to feel healthy.

I am thinking of devoting two hours each day to keeping healthy – I miss those days only a few years back, when I could get up out of a seat, and easily run a mile.

I am considering freestyle skateboarding and a martial art.

The skateboarding style that most people are familiar is street, which is a very aggressive style based on jumps and slides. Freestyle is more of a flowing style kind of like dancing – more spins and flips, and less running around.

The martial art I would like to do is Ninjutsu, in particular Bujinkan Taijutsu. However, the nearest teachers to me are about 200 miles away. Second and third choices would have to be aikido and tai-chi, however the same distance problem exists here. As much as it disgusts me to contemplate, I will have to do Karate.

I hate blunt martial arts, but if it keeps me healthy, then I’ll have to do it! Besides, with the effort of progression, I may come to enjoy it.

weeds and gardens

I am not a very good gardener. This has been pointed out to me a few times by Herself, and is blatantly obvious to me when I look at how much difference there is between the garden as it is right now, and the garden after I’ve spent two years on it.

Very little

I know there are onions and tomatoes and potatoes, etc, in there, because I planted them and tended them as they grew. But, then I went to my sister Tarynn’s wedding in Dublin for a week, and left the garden untended for a few weeks after that – oh, and a cow trampled the place as well.

When I next looked, I could only see my vegetables after pushing aside the nettles, ivy, thistles and brambles that had appeared out of no-where.

There is a huge amount of work to do now to bring it back to the state it was in.

Sometimes, I think it would be easier to turn the whole place into a grass garden, and mow it every week. I am tempted to give in to that thought.

hardware acceleration on ATI 9000

this is an old article from a previous blog – it’s useful though, so here it is.

This is something that took me years to finish working out. I’ve been running Linux since the last century, and only just last week finally got hardware acceleration working on my computer.

If you have the ability, do all this from source instead of with binaries. You will end up with a cleaner and faster product, and will spot errors easier.

  1. Install XFree86. Or x.org – your choice. I installed 4.4 for this. 4.3 would have been fine as well (see the next bit).
  2. Install DRI. This compiles its modules and writes them over the native XFree86 ones. They claim to be compiled for XFree86 4.3.99, so it doesn’t matter if your XFree86 is 4.3, and I have no problems with my 4.4.
  3. Install the latest kernel. I’m presently using 2.6.6. The important modules are outlined below. These are the minimum modules needed for Direct Rendering in the ATI 9000 on a VIA chipset motherboard.
    • Device Drivers
      • Character Devices
        • /dev/agpgart M this controls the high speed connection between the video card and motherboard.
          • Via chipset M my motherboard uses a VIA chipset for agpgart. see “cat /proc/pci” for yours.
        • DRM Y controls the direct interaction between the video hardware and the X server.
          • ATI RADEON M my video card is the ATI Radeon 9000. see “cat /proc/pci” for yours.
      • Graphics Support
        • Console Display Driver Support
          • VGA Text Console Y useful!!!!! Never reboot without it.
  4. Comment out your existing Device section in /etc/X11/XF86Config, and replace it with this (adapted as necessary):
    Section "Device"
        Identifier  "radeon"
        Driver      "radeon"
        VideoRam    65536
        BusID       "PCI:1:0:0"
        Option      "AGPMode" "4"
        Option      "EnablePageFlip" "ON"
  5. Reboot and restart X11. If all is well, your GUI should come up.
  6. Open a console in it, and type glxinfo | grep "direct rendering". If everything is correct, the word “Yes” should be shown.
  7. Play Enemy Territory.

how to bring up your child

When Jareth was born, Bronwyn’s mother was horrified to find out that we did not want to have him christened. She truly did not understand our objections to it. To sum them up:

  • We are not christian. I am an atheist, and Bronwyn is pagan. To have Jareth baptised into christianity would be hypocrisy.
  • Part of baptism involves the parents promising to bring up the child as a good christian. I most certainly will not bring my child up to believe in one thing and discard all others – especially when it is not something I believe in – it would be like pointing at the sky every day and saying “repeat after me: the sky is purple”.
  • Baptism is an empty ritual for most people in Ireland. People do it because they are expected to. That, I believe, is stupid. For us, it would be more than empty – it would be an outright denial of our own faiths – I have faith that there is no god, so baptism would be a damning lie.

Anyway – that’s not really what I wanted to talk about.

A few days ago, we were shopping, and met a neighbour and her aunt. She must have spent some time worrying about something, because she almost-immediately asked if Jareth was still “not on the beef”.

I was surprised at the question. I have been vegetarian over half my life. Bronwyn has been vegetarian for seven years. Why would we feed Jareth murdered animals?

Her objection was that we were somehow denying him a choice.

I do not understand this. Bronwyn’s mother also used that line as an explanation as to why we should have Jareth baptised – “just in case he turns out christian”, she said.

We are not denying him any choice. If we shoved meat down his throat, would we not be denying him the choice to live as a vegetarian?

If he wants to eat meat, he is welcome to go, get a job, and buy a burger somewhere. If he wants to become a christian, or a buddhist, or hindu, or satanist for that matter, he is welcome to go through whatever rituals he needs to.

My point is that I will not push anything on him. For now, he lives like we do because that is how we live, and he is not old enough to make choices yet (he’s a baby, for fuck’s sake!).

When he is old enough to decide to eat meat, drink alcohol, smoke his lungs out, have sex with whoever, believe what the hell he wants, I will let him. I may not like it, but I will let him.

But, not in my house.

Think of it – if you were a non-smoker, wouldn’t it be reasonable to allow people to destroy their health, but ask that they do not smoke in your house? Personally, I believe that is very reasonable.

It is the same with meat. I do not eat it, and will not have anyone cook it in my house. It is a matter of politeness – when in rome, do as the romans do. When in my house, do as I do.

Of course, if she had looked a little deeper into how we live, she would have seen that we are not the crazed hippie tree-huggers that she thinks we are. I have a leather wallet, and my dogs and cat eat meat. I do not try to deny that animals die to feed “society”. I merely try to moderate what impact I have on the total amount of murder occuring in the world.

I have a choice of whether I want to be vegetarian or not. So does Jareth. So does everyone. I do not believe anyone should ram meat down my throat, or my son’s, claiming that it is in the name of “choice”.