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.
Read the rest of this entry »
Tags: DIO, PECL, PHP
Posted in C, PHP, Programming | No Comments »
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.
Tags: LinkedIn, mggd, mggt
Posted in Electronics, Geek, Open Source, Programming, Women In Technology | 1 Comment »
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!
Tags: 2010, LinkedIn, Makerfaire, Newcastle
Posted in Crafty, Electronics, Geek | 2 Comments »
January 2nd, 2010
So its a new year and a significant year, 2010, so I’ve decided to start two projects which are somewhat related. My first project is “101 goals in 1001 days”. Basically I am setting myself 101 personal goals to achieve 1001 days i.e. by the end of 27 September 2012. This can be anything from cycling to work, knitting a jumper to carrying out a solo sky dive.
In order to record my achievements or otherwise I have created a new blog at http://www.cyberspice.org.uk/101in1001/. And my (growing) list of goals with links to pages that describe each goal is here.
The first goal is “A photo a day for at least 365 days”. Basically I have set myself the task of taking, and posting to a blog, a photo each day for at least a year. So I’ve created a new blog for that too at http://www.cyberspice.org.uk/oneaday/. Below is my photo for Jan 1, 2010.
Posted in Getting Things Done, Photography | No Comments »
December 24th, 2009
For those who want to know, this is how the ribbed scarf turned out!
I have given it to one of my my sister’s as a gift. For the other sister I made her some beaded jewelery.
Tags: Beads, Knitting
Posted in Crafty | No Comments »
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
Tags: bash, dash, libncurses, libtinfo, sh, Ubuntu
Posted in Linux, Open Source | 1 Comment »
December 1st, 2009
A short while ago I went down with the ‘flu’. Usually in these cases the best thing for me to do is rest and sleep. But eventually I get bored so I have to find something to do. So this time I sat in a recliner, watching a movie, whilst teaching myself to Purl. I wanted a project I could finish in an evening to use my new found skill so I modified the “Cricket’s Cell Phone Cozy” design and learnt to do stockinette stitch and add and remove stitches in rows. Below is the result.
It has a couple of things I could improve on. I put the cutout for the headphone cable on the wrong side and you have to take it out to charge. The next one will have a button hole type slot in the bottom for the charging cable.
Knowing Purl has meant I can do ribbing so I’ve started knitting a ribbed scarf out of some great multicolour yarn.
Tags: Knitting
Posted in Crafty | No Comments »
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.
Tags: PECL, Ubuntu
Posted in Geek, Linux, PHP | No Comments »
November 29th, 2009
The chill room at Sunrise in the West Indian Centre Leeds.
Tags: Psy-Trance
Posted in MobBlog | No Comments »
November 28th, 2009
Everything I hate about late Autumn and Winter in the UK; Grey, damp and never drying out!
Tags: Leeds
Posted in MobBlog | 1 Comment »