Category Archives: Geeky

Technical stuff about Perl, Linux and computing & technology in general.

yaourt for Arch Linux

Found yaourt this evening – excellent tool for Arch Linux users, a wrapper around pacman (the standard Arch package manager) which also supports finding packages in the AUR (Arch User Repository) and installing from there.

Excellent tool.

Playing with Ohloh

I’ve been having a quick play with Ohloh, and it seems pretty good. It’s “a website which provides a web services suite and online community platform that aims to map the landscape of open source software development.”

I figured it was worth getting my Perl modules listed, if only to boost the amount of Perl code listed there – I don’t think enough people sing Perl’s praises as they’re busy doing real work with it, so it appears to some to be going “the way of the dinosaurs”.

Ohloh seems impressive so far, with features to hook in to your source control system (Subversion in my case) to see contributors, change history etc. The only drawback is that it does not like re-organisation of the repo, and I re-organised mine to get all the code I’m willing to publically expose under a certain path in the repo, so I can point svnserve at that path, whilst some other code sits at another level. This means that, as far as Ohloh can see, there’s only ever been one commit to my projects. It’s a known problem (according to this forum post).

So far I’ve added SMS::AQL and HTML::Table::FromDatabase – other projects to follow.

xmkmf missing – install imake

I was installing a fairly old piece of software on Arch Linux, and it was failing because I didn’t have xmkmf installed. After some longer Googling than would be expected, I found that xmkmf is part of imake (which was distributed with XFree86, but is no longer used by XOrg).

So, for the benefit of anyone Googling for, say, “xmkmf: command not found” on an Arch Linux system, install the imake package (pacman -S imake) and all will be well.

KDE 4.1 – very nice

KDE 4.1 was released today, and is already in Arch Linux‘s repos, so I decided to update and give it a try.

First impressions – pretty slick indeed, especially after turning on proper compositing support for various funky effects including see-thru windows, “wobbly windows” etc – lots of which is fairly pointless but very nice at the same time :)

So far it seems very polished, it looks like the KDE team have put in a whole lot of work here!

Screenshots/videos may follow, if I get a chance (although I’m sure there’s enough out there already).

Even with the extra eye-candy enabled, the system feels at least as responsive as it did under KDE 3.5, and I think even more responsive actually.

Book Review: “Catalyst (Accelerating Perl Web Application Development)” by Johnathan Rockway

Catalyst is a web framework for Perl, which claims to "make web development something you had never expected it to be: Fun, rewarding and quick&quot.

I’m a professional Perl developer, but hadn’t tried Catalyst – it was one of the things I really wanted to try out but didn’t get round to it. Recently I obtained a copy of Johnathan Rockway’s book, Catalyst (Accelerating Perl Web Application Development) from PACKT publishing, so here’s a review of the book.

Johnathan is a member of the core Catalyst development team and certainly knows his stuff, so that lends credence to this book.

My first impression was that the book is somewhat thin at 187 pages for its £24.99 ($39.99 USD) cover price.

However, reading through the book, it covers Catalyst and some of the modules commonly used with Catalyst in just the right amount of detail – if you have some experience with Perl already, this book will give you just what you need to get using Catalyst with the minimum of fuss. The also covers various related tasks you’ll want to do when developing web apps with Catalyst, including:

  • using Template::Toolkit to generate output
  • object-relational mapping with DBIx::Class
  • generating forms automatically with FormBuilder
  • authentication and authorisation
  • session management
  • adding REST APIs, AJAX interactivity and RSS feeds

So, overall, I’d say it’s a quite good book, a perfect introduction to developing maintainable web applications using Catalyst, and using current best practices including MVC designs and ORM database access. However, one thing I felt wasn’t covered very well was Perl’s attributes which are used in many code examples – that’s one area of Perl that I haven’t really made any use of up until now. (The perldoc page does warn that "attribute declarations for variables are still evoving. The semantics and interfaces of such declarations could change in future versions. They are present for purposes of experimentation with what the semantics ought to be. Do not rely on the current implementation of this feature."). The book fails to really describe attributes at all (which I suspect is something a fair number of Perl developers won’t be familiar with). It also doesn’t explain the principles behind MVC design; I guess it’s a reasonable assumption that anyone planning to use Catalyst will probably already be fairly familiar with MVC principles, but a better introduction (perhaps with pointers to external reading for those needing to learn more first) wouldn’t have hurt.

Also, unfortunately the book is marred by several typos – it exudes a feel of perhaps being rushed out a little, without enough time being spent on editing. I don’t feel it detracts badly from the book, but is a little shoddy.

Despite the flaws, I still feel it’s a useful book to help get to grips with Catalyst.

Grab yourself a copy from Amazon (price at time of writing: £23.74), or buy it direct from Packt for £22.49.

Boeing 787 vulnerable to in-flight hackers?

Surely this can’t be right – the FAA claims that the 787’s passenger compartment network is connected to the plane’s control systems!

From the Wired story:

The computer network in the Dreamliner’s passenger compartment, designed to give passengers in-flight internet access, is connected to the plane’s control, navigation and communication systems, an FAA report reveals.

The revelation is causing concern in security circles because the physical connection of the networks makes the plane’s control systems vulnerable to hackers. A more secure design would physically separate the two computer networks. Boeing said it’s aware of the issue and has designed a solution it will test shortly.

I find it hard to believe that the network to which passengers are granted access would have any link to the plane’s private control/navigation systems, but, if it is, whoever thought that was a sensible idea needs shooting!

X failures with ATI driver & Xinerama after upgrade

Arse – I updated my Arch Linux install last night, and X will no longer start using my previous config. I can start X using the vesa driver, so X itself isn’t broken, but when I try to start up with my multiple monitor setup (3 screens on 3 seperate ATI Radeon 7000 PCI cards) I get a crash, with the following backtrace:


Backtrace:
0: X(xf86SigHandler+0x7e) [0x80d9d5e]
1: [0xb7ef4420]
2: X(xf86RandR12SetRotations+0x6b) [0x80f58ab]
3: X(xf86CrtcScreenInit+0x9e) [0x80f173e]
4: /usr/lib/xorg/modules/drivers//radeon_drv.so(RADEONScreenInit+0x17fa) [0xb7adfcaa]
5: X(AddScreen+0x1fc) [0x80733dc]
6: X(InitOutput+0x21e) [0x80a769e]
7: X(main+0x296) [0x8073b66]
8: /lib/libc.so.6(__libc_start_main+0xe0) [0xb7cb9390]
9: X(FontFileCompleteXLFD+0x201) [0x80730d1]

How annoying.

I think the issue is down to changes in the X server for Xinerama (used to spread your display across multiple screens) to use RandR, which doesn’t seem to play well.

I’ll post updates here as/when I find a fix.

Using rankmirrors script for faster Arch Linux package downloads

If you use Arch Linux I’d strongly suggest using the snippet of code below to use rankmirrors to sort your pacman repository mirrors into an optimal order, to use the fastest servers first.


cd /etc/pacman.d
for repo in *; do
echo "Processing $repo..."
mv $repo $repo.b4.rankmirrors
rankmirrors -v $repo.b4.rankmirrors > $repo
done

I was getting an average of about 300-400K/sec; after doing this, I was reaching 10M/sec!