1. A party to celebrate Mrs S's impending 30th birthday.

    1978 party

    Lots of fun. Lots of great costumes. The standard of costume was high, people really made an effort. Even Andy wore a vaguely 70s T-shirt.

    I took plenty of photographs, but my tiny little Canon IXUS is tragically poor at indoor and low light photography. Here’s most of the ones that are worth sharing.

    posted by cms on
    tagged as
  2. Jeremy Corbyn fails to win backing of other UB40

    Satire possibly dead.

    A pro-Corbyn Labour source insisted they were unworried by the 50% endorsement. "We have the backing of the more popular and successful UB40" they said. "Proof that splitters don't prosper".

    They actually tried to make #UB4Corbyn a thing.

    blinks

    posted by cms on
    tagged as
  3. Ever wanted to combine multiple individual PDF files into a single PDF document? Say you were scanning a paper document, a page at a time, and wanted to collate the digital pages back into a single document. Or collect together a number of similar PDFs you'd generated
    via 'Print to PDF', perhaps to send via email.

    You can do this incredibly simply in Leopard, without resorting to any additional software. PDF is such a fundamental component of Mac OS X, you can script operations like this using a very simple Automator workflow.

    Just build the following sequence of actions.

    1. Files & Folders: - Get Selected Finder Items
    2. PDFs: - Combine PDF Pages
    3. Files & Folders: - Open Finder Items

    Select all the individual pages in a Finder window, and then run the workflow. After a short wait, while the actions are run, a multi-page PDF will open in Preview. Choose 'Save As', to create a new file. Notice the optional Quartz Filter operations you can apply to the new document when you save.

    posted by cms on
    tagged as
  4. No you've had a haircut

    looming

    posted by cms on
    tagged as
  5. Another kind of iteration you often want to do when constructing programs, is to count things. Quartz composer provides the counter patch, which increments a running total when one of it's inputs switches from false to true. Similarly, it decrements the total whenever the signal to it's other input changes from false to true.

    By generating a regular true/false alternating value, and connecting this up to the increment line, you could generate a regular count. This composition demonstrates one way to do this. Using the Patch Time patch, a count of time in seconds is passed through a modulo 2 operator to generate a regular sequence of alternate 1s and 0s. This is connected up to the increment line of the counter, which then counts upward in integers.
    quartz composer counter generating stripe width

    The counter value is used to govern the stripe width of a vertical stripe pattern. As the patch runs, the stripe width increases every other second. This is a very simple display, but the bit generator and accumulator demonstrated are useful in a variety of ways. You can download a copy of this patch here .

    posted by cms on
    tagged as
  6. And just like that we're back. What happened cms?

    It was never entirely my intention to go offline for such an extended hiatus. Even though the web is intrinsically brittle and ephemeral, I like to do my bit to keep my little backwater serving 200 OK s to the half-dozen people who stop by to check in regularly, and the couple of dozen who linked to something I put up at some point. It's basic web-citizenship as far as I'm concerned.

    Before we went fully dark, I'd not posted for a long time already . And before that I'd slowed my posting down to something of a crawl. I think there's a few reasons for that. It's easy to get bored with blogging for the sake of blogging, especially in our current age where everyone shares profligately across many social platforms . It's fairly common to see blogs that have fallen into a recursion of no posts for months, then a post apologising about that, and then further disuse. I don't think this is one of those, but the proof is in the posting I suppose.

    There's certainly been less time in real life for auxilliary pursuits like online rambling, and that's a big part of the reason. No time for any proper content posts, concomitant with a surge of alternative social platforms to play around with, meant it often seemed a bit redundant to post arrays of short-links , when I could just throw them up on twitter / adn / diaspora* / flickr / ello / imzy /whatever, with a bigger audience, and more interaction.

    I was also feeling a bit self-conscious about standing up in public. After leaving last.fm (fairly amicably, as these things go, fwiw, albeit with a slightly battered heart), which felt like a fairly visible shift sideways, I was quite deliberately courting more obscure, maybe more unexpected job roles, and I remember feeling like I really didn't want to bare my thoughts to the internet judgement machine whilst I wasn't even entirely sure what I was doing myself a good deal of the time. Also busy! Young family plus startups really left little time for anything much else.

    I also was really feeling the pain of Wordpress . I never quite managed to find an authoring approach to use with it that didn't make writing anything seem like far harder work than it ought to be, also because I always insist on self-hosting, the sheer weight of it for maintainence and security updates, and backups, and DBA -ing, and having to write PHP or perhaps even plugins to do the inevitable customisations someone like myself inevitably finds themselves suckered into doing. So Wordpress was a drag, which was feeding my reluctance to contribute much of substance. So I decided to pause on updating whilst, in true wannabe-hacker style, I whipped together some kind of alternative content publishing system.

    I'll just take a paragraph out to stress that I actually admire WordPress a great deal. It's a very sophisticated and flexible web platform, and a great choice for site management, in either managed or self-hosted configuration. It kept this site ticking along for years. It just isn't a particularly good fit for my requirements, which are extremely simple

    I thought about using another off-the-shelf blogging system, which would have been the sensible route, but I figured that would just lead to a similar frustrated stalemate. So I started to sketch out an application that would allow me to quickly fling out tagged and dated content without much overhead of hosting or writing. And I carried on intermittantly piecing this app together, often on trains, for a couple of years. As an exercise in procrastination, it worked out better than I expected, and I carried on posting short content to twitter and others, reasonably happy to continue to defer the responsibility.

    But then the site went dark. I was hosting it all on a linode instance. I've been a very enthusiastic linode user for perhaps ten or more years, I think they have an excellent product, offering well-provisioned VPS instances , inexpensively, with an easy to use management site. Generally I've been very happy with them to date.

    This changed somewhat last year, and my confidence deflated a little. There was an extended outage of service across linode in December 2015 , apparently as a result of a targetted DDOS . This lasted for many days, and the communications about it from linode were muted and suspiciously vague. This isn't really what I expect from a first-tier ISP. I came away with the impressions that there were some significant architectural problems with their infrastructure, probably from acrued technical debt , and potentially some exploitable vulnerabilities in their public facing application software . I decided it was time for a change.

    I did some reasearch and rented a couple of new hosts. This time I've gone for low end, physical servers. This represented another procrastination opportunity, because when I originally set up the beatworm.co.uk linodes, almost ten years ago, I just hand configured everything by remote shell. Now I like to use the ansible configuration management system to set up hosts, and I took this opportunity to port my public infrastructure across to use repeatable playbooks. This turned into another major yak-shave , because there was slightly more to it than just a WordPress deployment, I was hosting mail, calendars, media streaming, IM, DNS, the works. After getting lost in this tarpit for a couple of months, I decided to move the application tier over to use the playbooks from the sovereign project , which covers much of the same ground, but is already written, and uses more modern components. Of course it wasn't entirely straightforward to integrate these plays over my existing base provisioning, and I ran into a couple of glitches and gotchas with some of the choices they'd made for configuration, but it only took a couple of weekends worth of fiddling to get it all running in a fairly acceptable shape. I moved the DNS across, at which point the wordpress site was left behind, and everything went dark.

    I was surprised at how much this bothered me.

    I like an outlet for sharing things. I enjoy the idea of having a stable internet identity . I don't like the way the modern web has folded these ideas into a handful of consumer products run by just a couple of corporate gatekeepers. That's not the web I grew up with, and it's not the web I want to see either. A very loosely federated ecosystem of ad-hoc resources, all mixed together as hypermedia, aggregated and accessed via an assorted bag of user-agents. That's how it works best . I like to write, because I like the practice and discipline of working toward articulating my thoughts for a general reader.

    I like being able to curate an archive, and keep control over how that information persists and is presented. This is hard enough to do when you have primary jurisdiction over the medium and material (there is plenty of bitrot on view in my archive, particularly in the really old material, which has been migrated across multiple publishing platforms now), and basically impossible if you're relying on a third party service, which periodically re-invents itself to better serve it's own objectives, which are only ever to be tangentally aligned with your own, at best.

    I don't like the sense of obligation I get from formal social media platforms. There's a subliminal sense of pressure to perform, to update, to observe the conventions, to consider and measure the implied audience. I'm not a joiner by nature. I just end up gently resenting the throng. I like to feel like I have a voice, but I don't want, or even expect to reach, an automatically provided audience.

    So, I picked back up my now-neglected website platform experiment, and knocked it together enough to get an MVP out of the door. It serves HTML over HTTP. It has a relatively minimal set of style rules that should allow it to work gracefully across various screen dimensions. It has rudimentary support for RSS ( not that many people use newsreaders any more ). It's simple to run in a staging environment, and I can write posts in plain text in emacs , and edit and post them without much extra grief. It's only got about 22% of the functionality I had originally planned, but I feel the urge to ship it, use it, and hopefully I'll refine it in production.

    There's a couple of interesting quirks to this new hosting setup. It's an ARM -based micro-blade, hosted on a scaleways C1 . The blogging software is semi-static , in as much as it serves generated content from the filesystem. It's written in common lisp , and deployed in a different lisp to the one it's developed on There's no frameworks (aside from using zurb foundation classes to base the CSS). There's no database. There's no comments, because I haven't yet decided on a productive way to support them.

    posted by cms on
    tagged as
  7. Apple Vs GPL : Apple's attitude to GPLv3 is making OS X an increasingly shonky UNIX developer system

    posted by cms on
    tagged as
  8. LambdaPi : A bare metal scheme based lispOS for the rPi

    posted by cms on
    tagged as
  9. Quartz composer is a visual programming tool from Apple that ships as part of the Developer tools with Mac OS X 10.4 or later. It presents a visual object-oriented programming metaphor around Quartz and Core Graphics that allows you to simply compose graphical effects by connecting inputs and outputs of different objects together, graphically.

    You can use QC to build pipelines that respond to a variety of inputs, local or via peripheral interfaces to construct visualisers for a variety of source signals, such as MIDI, audio from the built in mic, video signals from an iSight camera, or even networked events from computers on your internet or LAN. It also can be used to procedurally generate graphics, which you can use to build fancy displays or screen savers. Some of the system screen savers that ship with OS X, like the 'word of the day' or the 'rss visualiser', are actually simple Quartz Composer scripts.

    It's an impressive tool, and ships with documentation and some examples of what you can do. You can achieve nice effects quite quickly, but there is still a learning curve to climb. As an example, a common thing you might want to do when constructing simple animating displays, is loop over a set of possible outcomes. Iterators are a common piece of the vocabulary of programming languages, but it took me a little while to figure out how to achieve this with the 'box and string' interface of this tool.

    Here is a simplistic solution solution I came up with. This sample patch demonstrates cycling over a fixed set by rendering live video from an iSight onto the surfaces of a 3d spinning cube, applying a cycle of realtime video filter effects to the image.

    quartz-composer patch editor

    You can follow the patch from left to right. The brains of the procedure is the multiplexer , which is a patch that selects one out of a set of possible numbered inputs, depending on the value fed into it's Source Index field. In order to generate a periodic iteration over the right integers, I'm employing a linear interpolator, with a range of 0 - 3 , over a duration of 20 seconds. Because this is generating floats, I'm plugging it through a Round patch, that grossly rounds it to the nearest integer, before feeding it to the multiplexer. To get an even rounded cycle, tweak the interpolater range down a step, -0.5 to 2.5. The rest of the sequence is simple - the video input is split through three filters, one of these paths is selected via the looping mechanism, and that output is connected to the Image property of the built-in cube patch.

    Here is the 7.1Kb .qtz file . It's not a terribly pretty end result, but it is quite impressive considering that it's such a tiny source file. The looping construct it illustrates is very simple, but could be used to build up any sort of repeated cycle over a set of different input paths, such as image files, or colour tones that you could connect to other patches to build cyclic displays.

    posted by cms on
    tagged as
  10. I already mentioned in passing, St. Vincent , the band-shaped solo project brand thing of the super-engaging Annie Clark, was by far the best act I saw at Primavera Sound 2014. It was also the act I was most looking forward to seeing going in, it’s always nice when those line up.


    I guess I’m a super-fan. I first spotted Annie playing with Sufjan Stevens ' touring band. I next encountered her playing solo support for the National , touring her first St. Vincent release , upon which occasion I bolted out of the auditorium by the third song, in order to make sure I got a copy of the CD she was plugging from the merch stall before she packed away. I saw another couple of shows in Bristol, with the full band, and bought all the records, including an interesting collaboration with David Byrne .


    Last weekend, while idly browsing the Glastonbury live blog, I noticed that they’d just updated their description of the current iPlayer feeds to include St. Vincent streaming on the iPlayer from the park stage. I’d been avoiding the Glastonbury video feeds due to a combination of not being in the mood, and the dullness of the tv schedules, but I wasn’t going to miss out on this, so I whacked it on the TV. True to form, it was a great set, live, risky, and peppered with amusing crowd-surfing and hat theft . Even with a bit of sound problem, and some streaming glitches I enjoyed myself, and was amused to see my enthusiastic tweeting duly included in the Guardian live feed on the next page refresh.


    That was a really good set ”, I thought to myself, afterwards, “ but it wasn’t nearly as exciting as the Barcelona one. True, that lacked crowd invasions, and nobody lost a hat, but the lighting, and the sound, and the staging, and the lack of daylight, and the crowd being really into it…A pity there’s no TV-broadcast quality stream of that night archived away somewhere ”. 


    Yes, I do really talk to myself like that sometimes. Especially when I’m pretending to transcribe my inner voice for a blog.


    And then, I ran into this on Youtube.


     


    Full set, multiple cameras, properly mixed sound, pretty good video quality. I have not yet watched it enough times to see if I can see myself ( front of house, stage left, VIP pen ) in the crowd, but I expect I will. 

    posted by cms on
    tagged as
  11. NomadKey : keychain wearable USB charging key

    posted by cms on
    tagged as
  12. Fish Eating Spiders : Collated observational evidence identifies as many as five families of spiders that regularly hunt and consume fish.

    posted by cms on
    tagged as
  13. XCode has a nifty integrated debugger which is really a pretty wrapper around gdb . It lets you point and click, and drill down on things within the gui with ease, but still preserves access to the underlying raw gdb console and output. You can create breakpoints and watches, both literal and dynamic, step through your application as it runs, all the usual stuff.

    I'm not the world's greatest user of debuggers. I'm more likely to trace through things until they make sense using some combination of logging, print statements, paper and pencil, or my absolute favourite, just explaining your mystery problem out loud to a nearby third party, embarrassing yourself by spotting the obvious bug mid-flow. That last one sometimes even works with the dog. Sometimes though, you're stumped, and you want to set some watchpoints, step through your program as it executes, or just generally prod things mid-run, and poke around under digital rocks.

    Something I've been trying to practice recently is Test Driven Development . XCode 3 ships with support for the OCUnit testing framework built in. You can add a Testing target to your XCode project, and build up test case classes that use this framework, and the build tools know how to run these through the test harness. And so you progress, write a test for a feature, run the test harness, write code to pass the test harness, repeat. It's a great way of not only catching certain classes of bug before they happen, but perhaps more interestingly imposing a more minimal design focus on your application as you build it; you're automatically casting yourself more in the mind of a consumer of your application services, something I find really helps avoid over-design.

    At some point though you are likely to run into some kind of hard to understand failure case within a unit test, and find yourself reaching for the debugger. And then finding that the debugger doesn't work. This is because the runtime of your unit testing target is actually the separate test harness framework, and not your application target. The test harness is a regular application that's dynamically loading your test classes and running them. In order to be able to use the IDE to debug your unit tests, you just need to do a little extra configuration within your XCode project, as follows.



    The tool that runs the tests is called otest . You need to add this to your XCode Unit Test target as the executable. You can do this with the command ' New Custom Executable ' in the Project menu. Add /Developer/Tools/otest .

    Once it is added, set it as the active executable for the Unit Testing target, using Set active executable , in the Project menu. A green tick badge appears over the active exectuable in the xcode source list.

    otest as active executable

    The otest tool expects to be run with a certain environment, and arguments. There's a man page that describes them. You could run gdb against the otest executable from a shell in this fashion, but it means switching away from XCode. Alternatively, you can set up XCode to provide these when it runs your target by double clicking the otest executable in the source list to bring up it's inspector. The runtime settings you need to set are all on the Arguments tab.

    Add two arguments -SenTest Self and the name of your Unit test bundle, which will be the name of the Unit Test target with a '.octest' suffix e.g. "My Unit Tests.octest" . The quotes are important, if you have whitespace in your bundle name. Make sure that the order in the inspector list has '-SenTest Self' as the first element, and the bundle name the second, so that when they are concatenated to a command line, the switches come before the bundle name.

    otest executable arguments pane


    You also need to set two environment variables, in the lower pane of the arguments inspector, so that the dynamic linker can resolve your test components. The lower pane of the Arguments tab covers variables. Add two items to this list, DYLDLIBRARYPATH and DYLDFRAMEWORKPATH . Set both of these to be $(BUILTPRODUCTSDIR) which is the variable xcode build will populate with the correct destination of your compiled test cases object code.

    otest exectuabel environment variables pane


    With all of this set, you can just use the debugger within XCode. Click to set break points within the editor as you write your test cases, and the debugger will spring into action appropriately, whenever you build and run the test target.

    posted by cms on
    tagged as
  14. Once upon a time, I used to earn a living using awk to do neat things it shouldn't be used for. I never came up with anything as sexy as this though . These days, awk mostly stays in the toolbox, and I just use perl.

    posted by cms on
    tagged as
  15. Imagine the fun you could have sneaking round your local technology emporium and judiciously applying one of these labels to anything you think deserves it.

    posted by cms on
    tagged as
  16. It shows how infrequently I use it these days, but I yesterday found myself using a remote X client on my Macbook, and to put it bluntly, the X11.app as shipped with leopard is fucked. When I was working for IMDb, this would have scuppered my world. I can't decide if I even need it enough now to make it worth trying to fix.

    Update:


    Of course I had to try! Installing the latest community developed packages seems to fix most of the immediate problems, giving a useable X11. And the new code base, and launchd integration bring real improvements over Tiger. Now quartz-wm is open source, X11 on the Macintosh can be synchronised with X.org. It would be even better if Apple folded some of these fixes into official updates.

    posted by cms on
    tagged as