follow me on Twitter

    Latest Gallery Images

    El Médano from the top of Montaña Roja
    Off for the first hike in Zion
    My broken tooth Sarah, the mountain goat
    Blue tailed lizardy thing.
    PHP Women
    LinuxChix
    Blogs By Women
    Creative Commons Licence

    Archive for the ‘Geek’ Category

    Capturing still images from video devices in PHP using Framegrab

    Sunday, February 28th, 2010

    I found I had a need to capture and process still video images from video devices using PHP so I wrote the Framegrab PECL extension. This post introduces the basics of Framegrab.
    (more…)

    Serial IO in PHP using the DIO extension

    Monday, February 15th, 2010

    DIO is the Direct IO extension for PHP. I recently took over maintaining this extension and have implemented comprehensive stream support for both POSIX and Windows systems. To demonstrate the use of DIO this post will describe a PHP script that sends an SMS using a USB 3G modem.
    (more…)

    PHP DIO Extension: Looking for beta testers

    Tuesday, February 2nd, 2010

    A few months ago I had a need to do some serial IO from PHP. After asking around I found out there was a PHP extension for this but it was unmaintained, unowned and out of date. To cut a long story short I ended up as the maintainer of said extension and since them I have been fixing and extending it.

    The original DIO API is very basic and POSIX oriented. Serial support is not very configurable and doesn’t work at all on Window platforms. So I have been working on implementing PHP stream extensions that allow you to do raw and serial IO via streams. Anyway its ready for testing by people other than me on POSIX (Linux, OS X etc) and Windows platforms so I’m looking for beta testers.

    (more…)

    Manchester Geek Girl Afternoon Tea

    Monday, January 11th, 2010

    While I’m announcing appearances I am excited to announce that I am presenting an Arduino workshop at Manchester Geek Girl Afternoon Tea this month at Madlab, Manchester’s Hackspace in the Northern Quarter.

    I will be bringing a long several Arduino-a-likes together with a variety of components and CDs of the IDE so that we can get together in groups, code and play.

    Newcastle Maker Faire 2010

    Monday, January 11th, 2010

    I am delighted to announce that I have been selected to exhibit at Newcastle Maker Faire. The theme of my display will be crafty geekery.

    I am intending to take along items which are a mix of traditional crafts such as knitting and jewellery making combined with tech. For example programmable earrings, a temperature sensing hat and a bag that has a proximity detector and RFID tag so it can detect its owner.

    I am also going to show off a couple of my other projects like an ethernet adapter for a BBC microcomputer and a “Mood Wall” (It analyses twitter tweets for the mood of the content displaying patterns and colours which reflect the prevailing mood).

    Hopefully I will see you there!

    T’info about Dash

    Thursday, December 24th, 2009

    Once upon a time there was the Bourne command shell. sh as it is known is core at the heart of any UNIXy type operating system and others too. However for some it didn’t do enough so the Bourne Again shell, bash, was written and nearly every system ships with that. These shells are not the same. The have similar syntax but do not behave similarly.

    There are other shells which have a completely different syntax and other scripting languages such as Perl and PHP so when writing a shell script you can indicate the correct interpreter using the ‘hash bang bin bash’ comment to indicate you are using bash. I.e.

    #!/bin/bash
    

    Some lazy programmers don’t indicate the exact shell they require and use

    #!/bin/sh
    

    to mean bash when it means sh.

    Ubuntu, in their wisdom, have decided to go for dash as their shell. It is an evolution of the Almquist shell and is smaller and lighter weight than bash however they install bash anyway. dash and bash have the common subset of sh commands but are different. So if you find you have a problem building or similar on Ubuntu it may be that the wrong shell is being used. Ubuntu has a symlink as follows:

    lrwxrwxrwx 1 root root       4 Mar 29  2009 sh -> dash
    

    You may need to change this to point to dash as follows:

    $ cd /bin
    $ sudo rm sh
    $ sudo ln -s bash sh
    

    While we’re handling Ubuntu oddities building against NCurses, the terminal output library, can also be problematical. A little while ago NCurses was split in to two libraries, libncurses.so and libtinfo.so. Some badly written software will try and link explicitly with libtinfo.so directly rather than trying libncurses.so first. Ubuntu does not split these two libraries but provides just the one libncurses.so library so if you have an issue with a missing libtinfo.so you will need to add symlinks in to your library directory as follows:

    $ cd /usr/lib
    $ ln -s libncurses.so.5 libtinfo.so.5
    $ ln -s libtinfo.so.5 libtinfo.so
    

    Building PHP C extensions on Ubuntu 9.10

    Tuesday, December 1st, 2009

    I have just taken over maintenance of the PECL Direct IO extension as it has been unmaintained for a while. Naturally the first thing I did before writing any new code was to check out the extension from SVN and try and build it. Building the source was fine but when I tried make test it failed producing output like the following:

    PHP Warning:  PHP Startup: Unable to load dynamic library 'modules/gd.so' -
    modules/gd.so: cannot open shared object file: No such file or
    directory in Unknown on line 0
    
    Warning: PHP Startup: Unable to load dynamic library 'modules/gd.so' -
    modules/gd.so: cannot open shared object file: No such file or
    directory in Unknown on line 0
    

    The default PHP package on Ubuntu 9.10 is fairly minimalist. Most extensions are provided as separate packages which include an INI file and a dynamic library. The dynamic library is stored in:

    /usr/lib/php5/20060613+lfs
    

    And the INI file for each extension is in:

    /etc/php5/conf.d.
    

    The make tests rule in the generated Makefile in the extension you are compiling modifies the path that PHP searches for extensions by to point to the modules directory within the extension source. So PHP, which is used to run the tests, cannot find the extensions.

    I’ve found the easiest way (if slightly hacky) to fix the make test failure is just to copy the .so files from the PHP5 extension directory in to the modules directory within the extension source.

    Installing eclipse for multiple programming languages

    Friday, November 20th, 2009

    I can do almost everything I need to do in OS X but just occasionally I need Linux. So I recently installed a VirtualBox VM running Ubuntu 9.10. I use Eclipse as my favoured IDE since I can run it on all three of the major OSes and it has good support for C, C++ and Java which is what I use mostly for work. So the next thing for me was to install Eclipse. This is where things became interesting.
    (more…)

    First scarf finished!

    Monday, November 16th, 2009

    I finished my first knitting project in a long long while. Its a simple knit scarf of 24 knit stitches per row in Rico Design “Roxy” yarn (73% acrylic/27% new wool – 50gm/60m – Colour violet 007). It took four balls to get a decent length using 8mm needles.

    Finished Scarf (and Yours Truly)

    Finishing it off turned out to be problematic. I didn’t realise how much yarn I would need to bind off and ran out half way through. This meant I had to undo the bind off which wasn’t easy and I dropped at least one stitch doing it. I then had to unknit a few rows to give me the length needed and to be able to correct the dropped stitch. Whilst doing this the yarn broke. I ended up having to lay the piece flat, take it off the needle, pull off several rows and then carefully rethread the needle. I succeeded though and here it is.

    Announcing LinuxChix North

    Wednesday, November 4th, 2009

    robotux.png

    LinuxChix is a global community of women (and their supporters) who are fans of, users, or just interested in Linux and Open Source Software. LinuxChix has various chapters around the world. Currently there is only one in the UK, based in London, but I am proud to announce the LinuxChix northern chapter, LinuxChixNorth.

    LinuxChixNorth is a chapter for LinuxChix members, or potential members, based in and around the M62 corridor in the north of England. This covers the cities of Bradford, Leeds, Manchester, Sheffield and York. It is intend the first meetings will be held in Leeds and Manchester but there is no reason why members shouldn’t organise meetings in other cities. The first meeting will be in Leeds at the beginning of December. I am finalising arrangements for a venue and will announce the date as soon as I know it.

    Apart from the website we are on twitter as @linuxchixnorth if you want to follow us. You can also e-mail the current organisers at uberchix at linuxchixnorth dot org dot uk.