Category: Computing

Getting the best out of pkgsrc (by )

pkgsrc, the software package installation system that comes with NetBSD, is a lovely and powerful thing, but the default out-of-the-box setup is pretty basic. There's a lot you can do to bring the power of it out that's either hidden in the pkgsrc manual or in extension packages.

So here's my quick guide to getting the best out of pkgsrc.

Read more »

Geek exhilaration (by )

Recently, a feeling has started to appear in my life that's been missing for many years...

When I was a kid, I often felt geek exhilaration. All I had to do was sit with a notepad and think for a while and I'd come up with a design for something cool. Now, the kind of thing that interests me is infrastructure - I've always been more interested in designing, say, a game engine than in writing an actual game. So I'd sit down and pluck a random problem from the air and design an infrastructure for solving it. And then I'd feel excited about the lovely potential of this infrastructure.

Alas, this happened at a much higher rate than I could ever implement these things, so I had a sources directory laden with unfinished projects. But it was still fun.

Anyway, with age and responsibility and work and bills and stress this happened less and less; I still got to invent infrastructures, since it's part of my job, but I'd only get to design one every month or so at best. Five minutes of fun, then a month of implementation. And the problems I was trying to solve were relatively boring, and the solutions required often constrained to just solve the immediate needs of the users for the next year or so, rather than a sparkling generic platform upon which anything could be built for ever more.

But recently, for some reason, it's started returning.

Read more »

Database upgrades (by )

I've just finished upgrading the database services on love, my hosting server cluster... Phew. I started at 11pm, and it's now 2:30am. Much time spend shepharding the upgrade process. But we now have nice recent mysql and postgresql installations!

System V IPC on Mac OS X is a bit funny (by )

Well, at long last, I'm finally getting paid to mess around with the kinds of things I find REALLY interesting - a task which, at the moment, involves setting up shared memory and semaphores between processes for some high-speed shared cache action. Sort of like PostgreSQL does.

Anyway, I've found a few quirks of Mac OS X's System V IPC setup that I thought I'd best share.

  1. ipcs should be setuid or setgid or something. It grovels in kernel memory to find out what IPC objects exist and their state, but when run as a normal user, it doesn't have permissions to do so and fails silently; ipcs always returns that nothing's allocated, while ipcs -T reports garbage values.

  2. Talking of ipcs -T, the IPC system limits are (as usual) set via sysctls. But if you try and change them, they refuse to alter. It turns out that you can set them, but only once - the first time this set of sysctls is written to the kernel, it sets up its internal data structures and considers the sysctls read-only thereafter until the next boot.

You have been warned.

I'm reporting the former at least to Apple as a bug...

A Home Wiki (by )

Since I've been getting our home network a bit better organised lately, the home server is now actually accessible from both the wired and wireless networks (and could be accessible from the outside, too, once I've sorted out suitable security measures), so it's high time I started making use of it.

The first thing I've done has been to set up a home Wiki. There's various bits of information that Sarah and I share, but that one or the other of us is 'in charge of' depending on whose computer it lives, so rather than putting a bunch of text files on the shared file server area, it seems logical to do it with a Wiki.

I'd been wanting to research the current state of the art in Wiki software anywhere; the only other Wiki I run, the ARMuC Wiki, runs on UseMod, which I've never grown to love properly.

Anyway, my researches led me to PmWiki, and I'm quite sold on it - it's written in PHP so doesn't require CGIs, and it has a software design philosophy that I agree with; a simple core with modular extensibility.

So we now have a Sutton's Mill Intranet for our domestic odds and ends. And with a little bit of simple plugin writing, the home page lists the status of important household sensors - currently just the incoming mains voltage and frequency (we get a lot of mains power problems out here!) and the battery backup system status, but hopefully soon to include external temperatures too.

We're using the Wiki to store our monthly budget, our goals for each month (chosen at the New Year), our template shopping list of things we need to check we have sufficient stocks of, and our list of favourite recipies (since we have a habit of forgetting them, then one day going "Blimey! I've not cooked that lovely Thai turmeric rice in months!"), and we'll shove more stuff in as we come up with it - basically, from now on, whenever one of us has to go and look something up for the other, we'll Wiki it for posterity.

WordPress Themes

Creative Commons Attribution-NonCommercial-ShareAlike 2.0 UK: England & Wales
Creative Commons Attribution-NonCommercial-ShareAlike 2.0 UK: England & Wales