The first beta version of the PECL/Cairo extension has just been released. This version includes support for loading arbitrary fonts via Freetype, cloning matrices, and has a rather large set of bug fixes. If you've been using 0.1.0 for anything at all I'd really recommend an upgrade. Windows builds will appear soon over at perisama.net for all the major PHP variants courtesy of Elizabeth M. Smith. Many thanks to Mark Skilbeck for helping get this release working on Windows!
I've got 3 posts or so queued up in my mind to write out, but some of them rather depend on doing other things first, so this will just be a quick note to say I have an article in the most recent php|architect magazine on the subject of "Vector Graphics with Cairo". This is a basic introduction to the PECL/Cairo extension which I've been helping out on for a while now. Thanks to Keith Casey for his input, to the folks at php|architect for letting me do it, and the long-suffering Elizabeth Marie Smith for putting up with all my stupid questions while working on this and other extensions!
Now, back to my regularly scheduled coding...
Last weekend I spent a couple of days on the yacht Hebridean as part of an RYA sail cruising day skipper course. This was the second half, as we were aboard before last month but had to cancel due to the weather. This time, we combined the course with delivering the yacht to Oban Marina on Kerrera where it will spend the winter. I'm happy to say I passed, so theoretically at least I could be able to charter a yacht for a trip at some stage. I might investigate that for one summer, but I'll want a bit more mileage and experience first. I also noticed that the local college were running a Coastal Skipper theory course, so I'm on that now too.
I'm considering going to FOSDEM in Belgium in February. I missed LugRadio Live this year so I'm thinking of it as a sort of substitute. Also considering PHP London, but we'll see.
I saw this article on the BBC, where a man who bought a packet of cigarettes from a petrol station in the US ended up being charged $23,148,855,308,184,500 instead. Wow. I was a little curious as to how this could have happened, though the number didn't look familar - I know roughly what 2^32, 2^32 / 2, 2^64, 2^64 / 2 look like, and this didn't appear to be any of those. A swift Google though led me to Stack Overflow, which is a fantastic site. Therein lies a quite plausible explanation:
Add the cents to the number and you get 2314885530818450000, which in hexadecimal is 2020 2020 2020 1250.
Do you see the pattern? The first six bytes has been overwritten by spaces (hex 20, dec 32).
Ingenious! I can imagine spending quite a while trying to come up with that...
The first alpha of the PECL Cairo extension I've been helping out with has been released. Please download it, play with it, try and break it, and file bugs if you do! There isn't an official manual yet (for licencing-related reasons which I'm hoping to sort out soon), but I'll update this post when there is one. For now, there is a lot of stuff in the examples/ directory in the source which can be used as inspiration.