6 September 2010, 1:40 pm
You really don’t appreciate the build-up to the weekend without the sense of calm relaxation that descends afterwards. Sure there have been simple tasks to achieve like returning suits and doing the washing. However there is no longer a list of things to be done related to the wedding preparations. Even if some of the things didn’t get ticked off the list I don’t think anyone noticed.
It was so nice to see so many friends and family coming together celebrate our nuptials. I did have a slight narcissistic moment standing up in the gazebo while everyone watched us say our vows. I even remember most of the day. The faces are still a bit of a blur though. People looked as though they where having fun and we certainly enjoyed the whole day.
It’s been fun going through the pictures from the evening. At some point I might try to collate a selection from all the various sources into an “official” crowd-sourced album. I suspect the lack of obvious ways to pull stuff from various external sources will require me to write a tool of some sort. Unless anyone has any suggestions?
4 September 2010, 7:23 am
Well that’s the legal bit done. It all passed in a bit of a blur but Fliss was wonderful and we’ve been enjoying calling each other Husband and Wife. We knew it was real when we changed our Facebook status*. We also crashed quite early and slept like logs. I have no idea how we are going to make 11 tonight for the repeat performance (never fear, new material is being introduced!). Looking forward to seeing everyone this afternoon, especially the new Mrs Bennee
* This is a joke, I think
31 August 2010, 10:12 pm
Today has involved physical introduction of remaining in-laws to actual parents. This was by way of a wandering cycle through town via the odd pub or two. Tomorrow is a fairly light day where I have to achieve a) a hair cut b) get some keys cut. The rest of the day can be put aside to ale quaffing with both fathers (and assorted Cambridge types). The heavy logistics kick in on Thursday, suits and ales all needing to be in their pre-allocated places. Friday I hand the metaphorical keys over to my best men and ride the wave in.
I have secured a 30-45 minute slot for back to back rocking out. I have the beginnings of an over populated play list which needs honing but any suggestions for classic rock material will get a passing notice from me. Hopefully.
27 August 2010, 6:14 am
It’s very rare programs are ever complete, let alone perfect. I pulled a fairly late session night to push a release out at work. Hopefully testing have a chance to raise any major clangers before I go on holiday for the next month. However the combination of late night coding plus fretting meant I didn’t really sleep well. While I may have technically entered REM sleep dreaming about code and architectural deficiencies in your code isn’t the most refreshing way to let your brain unwind. I eventually gave up and got up. It’s been a while since I heard Farming Today.
23 August 2010, 11:41 am
While Fliss was away for the weekend on her extended crochet and knitting course I was handed a list of tasks to do in her absence. My Dad came around to help me* replace the light fittings and we then cycled into town for the most enjoyable task from the list.
We will be having a couple of barrels of local beer at the wedding. The brewery had given me a list of beers that would be ready by wedding day so together with CW (enjoying a rare break from the family) we set about tasting our way through the list. We only needed to go to two pubs in the process. The fist the St Radegund is a big fan of Milton brewery and also a regular haunt of the brewers themselves. We started with the Nero (me foolishly starting with a pint) and then the Tiki. After that we had to head down to the Devonshire Arms which stocks around 5 lines of Milton ales in their extensive range. The food was nice, especially the rather cool Chocolate Ale Cake which was made with the previously mentioned Nero. We ended the tasting on Nero’s “bigger brother” Marcus Aurelius which was a wonderful winter stout but certainly not a session beer. People shall have to wait until the wedding to find out the final selection but hopefully they will both be popular.
After my Dad headed home we retired to the Cambridge Blue, CW keen to take advantage of the rare visit into town. We didn’t stay up too late although it was dark by the time my beer wheels (bike, off-road) took me home. Job Done
Or I helped him, as is often the way of such things
20 August 2010, 1:26 pm
I spent this morning at Cambridge Crown Court to see the sentencing of the guy that burgled us last month. This was a novelty for me as this is the first time I’ve been burgled and the perpetrator was caught. I did see him briefly when his name was called out by the defence counsel for a consultation before the court sat. He came out of the consultation room quite fast and as it turned out later in court was under the misapprehension he was there for a pre-sentencing session. This explains that when dully appointed hour rolled around and the case called there were just the clerks and a few bemused counsels waiting for him to turn up. The court didn’t seem particularly concerned and had already postponed one trial hearing as the defendants couldn’t be found.
I did hang around for one sentencing of someone who had plead guilty an assault occasioning actual bodily harm. The prosecution and defence counsels summarised the facts of what was essentially a pub fight that one person had decided to continue after having been kicked out of the pub. The victim had ended up with a few cuts and bruises (“out of luck more than anything else”) and there was some discussion about whether the cheek bone had actually been fractured. The defendant did have a previous history of assault although as he’d just turned 18 this was his first time in front of the crown court. While the judge did say the case had passed the threshold for custody she in the end awarded a two year community supervision order, 80 hours of community service and an order to attend an anger management course. She seemed persuaded not to award custody on the basis the defendant had been looking for work and had a supportive family (who were in the public gallery). Hopefully this near miss of jail time will be enough to put the guy on a more positive track.
As for “our” guy I did briefly ask the counsel what was likely to happen. It seemed unlikely having left the court he would come back for sentencing today. There will most likely be a warrant put out for his arrest and the mater will get picked up later. One can hope he won’t just walk out before the next hearing. I don’t know if not turning up will attract extra punishment but the signs on the walls made it clear you could get up to 2 years in custody just for taking photos in court, one would assume missing your appearance attracts more?
19 August 2010, 11:10 am
After a relatively quiet period a number of patches have flowed my way so I thought it was worth pushing out a new version. Perhaps the most “important” feature is the edit box flashing and fading from yellow after being updated (like It’s All Text). It wasn’t that hard to do given jQuery and the colour animation plugin do all the heavy lifting.
We’ve added a new hook to the edit-server for pre-edit customisation. If anyone has some nice examples of using the various hooks it would great if you could add examples at the emacs wiki.
As ever the extension can be found at the Chrome Extensions site. Development versions are hosted at github.
Full Change Log
v1.8
Extension
* Added option to enable/disable visual edit boxes
* Improved feedback as editable elements come in and out of focus
* Updated text box will now fade from yellow after an update
edit-server.el
* Added edit-server-start-hook for additional customisation when edit starts
16 August 2010, 11:24 am
We went to the new PD LRP fest game Odyssey this weekend. Although we didn’t stay for Saturday evening as we had wedding planning to do we did get a good feel for the game. Instead of Maelstrom’s Play-by-(e)mail game of Civ Odyssey is very much rooted in the events of the weekend. The generals get to plan their stratagems, assign limited resources (Warbands) to defending and taking lands decided by battles in the Arena. Going as a grunt it was nice to have the certainty of 2 battles a day where the results were meaningful to the game. The battles tended to be of the order of 10-30 people per side depending on the forces at the disposition of the commander. This neatly solves the large scale balancing act the Gathering had to do to ensure the mass battles weren’t too skewed. There was plenty of name calling and taunting going on (our response to “All the way to Rome” was “in chains!”). The atmosphere was very much of competing nations unlikely to “degenerate” into a nice civilised political consensus. It was fun
I didn’t get much of a feel for the other roles although the priests were by far the most visible playing a part in the preamble to each battle. They also had the unenviable job of keeping the capricious and cruel Gods in check.
I didn’t get a chance to do one of the many linear adventures but heard generally good things about them. Certainly the game provides a great change of pace to the relative civilisation of the Maelstrom setting (which I still enjoy BTW). I shall be trying to persuade some of my more sword jockeying friends to join us next year when we hopefully return for the whole event.
10 August 2010, 9:04 am
Loops are a fairly important part of any programming language and fairly fundamental to a language that is purported to be all about manipulating lists. However it’s not something I use that often in my .emacs code so I thought it might be useful to discuss the various options with some examples.
Problem: I run emacs on a number of machines, each with a different set of sound sets. I want to set up set up a valid sound for erc but I don’t want an overly verbose set of cases depending on what machine I’m on. Instead a given a list of sound files I want a function that will return the first one that actually exists.
This problem can be easily generalised into return the first valid path from a list of paths.
First version: pure emacs lisp
; the 'elisp' way
(defun find-valid-file-elisp-way (list-of-files)
"Go though a list of files and return the first one that is present"
(let (r '())
(mapc '(lambda (f)
(if (file-exists-p f) (add-to-list 'r f)))
list-of-files)
(car r)))
First impressions aren’t good. The lisp parenthesis do seem to get in the way of making what is happening clear. However it’s using one of common mapping functions you see a lot of in lisp. A mapping function essentially takes a list, applies a function to each element of the list and eventually returns a result. The most common of the mapping functions is mapcar which returns a modified list as a result. In this case that isn’t what we want so we use mapc where the only value that is built up is the result r as we identify each valid file. The final return value is just the first entry in that list. This does mean we have processed the whole list of alternatives which is sub-optimal.
Second version: Common Lisp Version
(defun find-valid-file-clisp-way (list-of-files)
"Go though a list of files and return the first one that is present"
(loop for path in list-of-files
until (file-exists-p path)
finally return path))
This version probably is the easiest to read for people familiar with other programming languages. The intention of the code jumps out at you. However the actual implementation is done with a macro. If you look at the help for loop you’ll see it can take a number of different forms – follow that to the code and you’ll see a fairly complex elisp implementation. However to my mind still easier to follow than the pure elisp version with mapc.
Third Version: Using the dolist macro
; using 'cl-macs
(defun find-valid-file-dolist-way (list-of-files)
"Go though a list of files and return the first one that is present"
(dolist (f list-of-files)
(if (file-exists-p f)
(return f))))
This is yet another version using an LISP macro but this one has considerably less potential forms to cause confusion. It’s fairly comprehensible what is going on and even follows the traditional parenthesis happy form. It also takes advantage of the common LISP return to early return from the loop when we detect a valid file. If it makes it to the end of the list it evaluates the 3rd optional form to calculate the result which in this case will be ‘nil.
So what do you think? What version do you prefer? Where does the balance lie between writing code is LISPy ways and for code comprehension? Are there any other ways to solve this particular problem? I’ll be looking forward to your comments.
9 August 2010, 5:50 pm
My first impressions of Oxford where that it’s even less car friendly than Cambridge. I was visiting for James’ stag and had elected to stay at the Oxford Social Club. Having booked it through a third party site I was under the impression there was parking. As it turned out the street parking was limited to 3 hours between 8 in the morning and 6 in the evening which meant I was up early to feed the local pay and display machine. After enough of the fug of Friday had cleared I then had to shuffle my car to St Giles where it could sit for a further two hours before we left for our afternoon excursion. As it involved guns it seemed best not involve the obligatory drinking. Luckily the parking restrictions where lifted on Sunday so I did have a little longer to lie in. However I did discover some twat had decided to kick/swipe my passenger side wing mirror off which requiring a Sunday morning excursion to find some gaffa tape.
Car troubles aside the actual celebrations were fun. We were almost all various types of software geeks, some with more academic bents than others. As a result there where many fascinating (to us!) discussions about relative merits of language features, the point of lambda functions and even a friendly mini vi/emacs flame war. As stag does go probably not the hardest on my liver* but entertaining non the less.
* Brief aside: Oxford CAMRA need to sort their act out as to making a list of recommended pubs easier to find.