Dave Cross posted a photo:

The water runs off this statue in a rather unfortunate fashion

via Instagram ift.tt/2qL4rSE

davorg closed an issue in davorg/succession Apr 19, 2018
davorg commented on issue davorg/succession#9 Apr 19, 2018
davorg closed an issue in davorg/succession Apr 19, 2018
davorg closed an issue in davorg/succession Apr 19, 2018
Caching #57

Let's cache the crap out of this thing.

1 comment
davorg commented on issue davorg/succession#57 Apr 19, 2018

Dave Cross posted a photo:

Warm, sunny morning. Waking by the Thanes. Chcrches on my headphones. Life is good

via Instagram ift.tt/2EXf0af

Dave Cross posted a photo:

This meeting room is called The Bathroom

via Instagram ift.tt/2H6yijo

Dave Cross posted a photo:

Bollywood filming at Potter's Fields

via Instagram ift.tt/2H2Entd

Dave Cross posted a photo:

When public spaces aren't truly public

via Instagram ift.tt/2JR6FIO

There was a London Perl Mongers meeting at ZPG about ten days ago. I gave a short talk explaining why (and how) a republican like me came to be running a site about the Line of Succession to the British Throne. The meeting was great (as they always are) and I think my talk went well (I’m told the videos are imminent). The photo shows the final slide from my talk. I left it up so it was a backdrop for a number of announcements that various people gave just before the break.

In order to write my talk, I revisited the source code for my site and, in doing so, I realised that there were a couple of chunks of logic that I could (and should) carve out into separate distributions that I could put on CPAN. I’ve done that over the last couple of days and the modules are now available.


The first is called MooX::Role::JSON_LD. It’s a Moo role that you can add to your classes in order to make it easy to generate JSON-LD from your objects. What’s JSON-LD? I hear you ask. Well, it’s JavaScript Object Notation for Linked Data. The most popular use for it is to add structured data to web sites. Adding structured data to your web site makes it easy for Google (other search engines are available) to understand what your web site is about and that, in turn, will hopefully persuade Google to list your site higher than it otherwise would. You can see JSON-LD in action on a couple of my recent projects – https://lineofsuccession.co.uk/ and https://towerbridge.dave.org.uk/ (you’ll need to look at the source to see it).

I’ve written the module as a Moo role, which means it should be usable in Moose classes too. To add JSON-LD to your class, you need to do three things:

  • Add the role to your class
  • Define a method called json_ld_type() which defines the type of JSON-LD object that you want to generate (see Schema.Org for a list of types)
  • Define a method called json_ld_fields() which defines the fields that you want to include in your JSON-LD. There are a few ways to define that which allow you to do things like mapping an output field to a method of a different name. The details are in the documentation.

Your class inherits two methods from the role – json_ld_data() returns the data structure which will be encoded into JSON (it’s provided in case you want to massage the data before encoding it) and json_ld() which returns the actual encoded JSON in a format that’s suitable for embedding in a web page.


One of the most satisfying parts of the Line of Succession site to write was the code that shows the relationship between a person in the line and the current sovereign. Prince Charles (currently first in line) is the son of the sovereign and Tāne Lewis (currently thirtieth in line) is the first cousin twice removed of the sovereign.

That code might be useful to other people, so it’s now on CPAN as Genealogy::Relationship. To be honest, I’m not sure exactly how useful it will be. The Line of Succession is a rather specialised version of a family tree – because we’re tracing a bloodline, we’re only interested in one parent (which is unlike normal genealogy where we’d be interested in both). It also might be too closely tied to the data model I use on my site – but I have plans to fix that soon.

Currently, because of the requirements of my site, it only goes as far as third cousins (that’s people who share the same great, great grandparents). That’s five generations. But I have an idea to build a site which shows the relationship between any two English or British monarchs back to 1066. I think that’s around forty generations – so I’ll need to expand the coverage somewhat!

But anyway, it’s there and I’d be happy if you tried it and let me know whether it works for you. The documentation should explain all you need to know.

The Line of Succession site doesn’t get much traffic yet – I really need to do more marketing for it. So it’s satisfying to know that some of the code might, at least, be useful outside of the project.

The post Two New Modules appeared first on Perl Hacks.

A (not entirely serious) talk that I gave at the London Perl Mongers technical meeting in March 2018. It talks about how and why I build a web site listing the line of succession to the British throne back through history.

I’m a republican. No… wait… come back! That’s not what I mean.

I’m a long way from being a supporter of the Republican Party. I mean “republican” in its older meaning of “someone who thinks their country should be a republic. That is to say, I’m not a big fan of the British royal family.

But while I believe that the UK should get rid of the royal family, I’m also fascinated by them. In particular, I’m fascinated by the laws that determine the line of succession – that is the list of people in line to take over the throne.

When I was a child I believed that the line of succession was a big list that had every British person’s name on it and that it would only take a single catastrophic event to propel my name to the top of that list. Later on I discovered the Act of Settlement (1701), which is the law which actually defines the line of succession (modulo a few later tweaks). I was disappointed to find that there were only a few thousand people on the list (and that didn’t include me!) and also that a lot of the people on the list weren’t British (largely due to Queen Victoria’s children marrying royalty from all over Europe).

A few months ago, I started to think about building a web site that would allow people to explore the line of succession through time. And over the last few weeks, I have build the site. It’s at lineofsuccession.co.uk. On the main page, you will see the current line of succession. And in the navigation bar is a drop-down menu that allows you to move to a few interesting data (the days that the last four monarchs came to the throne) and a date picker allowing you to choose any random date.

The code is, of course, on Github. The web app is a pretty standard Dancer2 application which really doesn’t do anything clever. Most of the complexity in an application like this is in the data gathering.

Currently I have just over a hundred people in the database. That’s most of the descendants of Edward VII (there a few lines that I haven’t completely filled out yet), but eventually I want to go back to all include all of the descendants of Electress Sophia (the person who the crown was “settled on” in the Act of Settlement). I’ve heard estimates that she has somewhere between 5-6,000 descendants. So I have a bit of work to do there!

Other than more people, I have a few other things I’d like to add to the site:

  • More names and titles People on the line of succession tend to have many titles during their lives. The data model already supports the concept of a name that is only valid on a range of dates (see the current queen described as Princess Elizabeth of York on the day before her father became king,  Princess Elizabeth when he was king, Duchess of Edinburgh when she got married and, finally, Queen Elizabeth II when she became queen. But tracking down and adding all that data is hard work.
  • Excluded people Catholics are excluded from the line of succession. And people who married Catholics were also excluded until recently. Oh, and obviously children born out of wedlock (that’s more common than you might expect in some of the more obscure branches of the modern Windsor family). Of course, people can convert to (and from) Catholicism at any time, so supporting that in the app would mean implementing some kind of “exclusions” data. But it would be good to show these people, perhaps in a dimmer font.
  • Tree views Today I added text to each person showing their relationship to the monarch. That can help a reader to visualise the family tree, but I’d like to make it more explicit. Nested lists could make it easy to see the relationships. And, later, perhaps show the whole tree using SVG.
  • Position changes Sometimes the line of succession feels a bit like the pop charts. Take Prince Harry, for example. He entered the chart at position 3 and stayed there until Prince George bumped him down to number 4 and Princess Charlotte pushed him down to 5. He’s only likely to fall further in the coming years. The same thing happened to Princess Anne, who was number 3 when she was born, but currently languishes down at number 12. I think it would be interesting to plot those changes over time.
  • Make it prettier Bootstrap does the job. It allows design dunces like me to get a reasonable-looking site up and running in no time. But it’s not very regal.

Anyway, there’s my current itch scratched. And, as in so many cases, it’s just given me more itches. But please let me know if you find the site at all interesting or useful.

The post Line of Succession appeared first on Perl Hacks.

New Year’s Eve seems about the best date for my review of the gigs I saw this year (I know I’m not seeing another today).

I saw 41 gigs in2017. That’s two more than in 2016 and a lot less than my average number (which is more like the high forties).

Let’s get the disappointments out of the way first.  Tanita Tikaram was just dull, as was Natalie Imbruglia (I waited to hear “Torn” and then left). Normally, Amanda Palmer gets an instant pass to the top ten list, but the album she recorded with Edward Ka-Spel wasn’t my cup of tea at all and the gig they played together promoting it was terrible. She played a few other shows in London over the year, but they were all on nights when I couldn’t be there. The Stone Roses at Wembley was all you’d expect it to be – overpriced and uninteresting. And I left the Magnetic Fields show at the interval. Oh, and for the first time ever, I did the same at an Icicle Works gig.

And here, in chronological order, are my favourite shows of the year.

  • Laura Marling at the Roundhouse. I see Laura Marling play whenever I can. She’s always just stunning. The Semper Femina tour wasn’t quite as impressive as the one for Short Movie. But it was still one of my best nights out this year.
  • HAIM at Islington Assembly Hall was a large-minute, fans-only, free gig which was filmed for a documentary to promote their new album. It was full of the false starts and repetition that nights like that often suffer from. But it had been years since I’d seen them and they are still as great as they ever were.
  • Belle and Sebastian at the Royal Hospital, Chelsea. Belle and Sebastian always put on a great show and this was no exception. I was particularly happy that they played “Lazy Line Painter Jane” – which I’d never seen them do before. And the support, Honeyblood, are a band I’ll be looking out for in the future.
  • Kraftwerk at the Royal Albert Hall. It had been 25 years since I last saw Kraftwerk (on their The Mix tour). In the meantime, technology has really caught up with their vision of what a performance should be. This run of gigs probably had more of my friends in attendance than any other tour this year. All my gig-going friends seemed to go to one of the shows.
  • Kate Nash at the Shepherds Bush Empire. I saw Kate Nash twice this year. This was the second show I saw and it was only better than the Village Underground show because she was celebrating the tenth anniversary of the release of Made of Bricks and played the whole album.
  • Lorde at Alexandra Palace. Incredible to believe that Lorde is still only twenty-one. She’s like a force of nature. Melodrama was such an advance on Pure Heroine.  And this show was so much better than her previous tour (which was also great).
  • Radiophonic Workshop at the British Library. Something a bit different. A group of geriatrics playing the most futuristic music you’ll ever hear. They don’t play often, but try to catch them when you can.
  • Midge Ure at the Shepherds Bush Empire. This was basically Midge Ure playing Ultravox’s greatest hits. Which is enough to make me happy. And when you add Altered Images as support, it becomes an awesome night. Even the boorish Christians as the second support couldn’t spoil the evening.
  • Bananarama at the Hammersmith Apollo. This was a bit left field. And stupidly expensive. But it was worth every penny for the grin that was fixed to my face for the following three days. This was, hands-down, the most enjoyable gig I saw all year.
  • Wolf Alice at Alexandra Palace. I was late to appreciate Wolf Alice. I just failed to get a ticket for their previous tour where they played somewhere like The Forum. Ally Pally isn’t my favourite venue, but the band were on top form and having Sunflower Bean at support helped make this a great night.

And a few that fell just outside of the top ten.

I’ve seen and been very disappointed by the official current Yes line-up a couple of times, so it was good to see the “less-official” Yes featuring Jon Anderson, Trevor Rabin and Rick Wakeman who were great. And who proved to me that if you’re singing Yes material, you need Jon Anderson as lead singer.

Sigur Rós at the Royal Festival Hall were great. And very loud.

The fact that St. Vincent didn’t make the top ten is a mark of how great this year’s gigs. Masseduction is a great album and the tour was fabulous.

Wildwood Kin are a band to look out for. Two sisters and their cousins playing modernist folk. One day (soon) it will seem astonishing that I got to see them somewhere as intimate as the Borderline.

I can’t believe that I haven’t mentioned Tegan & Sara, Adam Ant, St. Etienne, Amy Macdonald, Suzanne Vega, Dweezil Zappa, Billy Bragg, Penguin Cafe, The Unthanks or Kate Rusby – all of which put on great nights that sent me home smiling (and humming).

What am I already looking forward to in 2018? Beth Orton, Superorganism, members of the Art of Noise recreating In Visible Silence, Belle and Sebastian, Arcade Fire, Sunflower Bean, Tears for Fears, The The and King Crimson. It’s already looking like a great year for gigs. Perhaps I’ll see you at one.

What about you? What gigs did you enjoy in 2017?





The post 2017 in Gigs appeared first on Davblog.

About five years ago I ran a few training courses under the Perl School brand. The idea was simple – if you price training courses cheaply and run them at the weekend then you eliminate the most common reasons why people don’t keep their Perl knowledge up to date.

Of course, it’s not quite that simple. And I think I ran six courses before running out of attendees.

But there are still people who would benefit from getting some more up to date information about how Perl works. So I’ve decided to resurrect the Perl School brand in a new attempt to spread the Modern Perl knowledge beyond the echo chamber. I announced my plans during my lightning talk at last month’s London Perl Workshop.

This time I’m going to do it by publishing cheap books. You might remember that time I promised to write a guide to modern web development with Perl and how badly that ended up. But in the process, I learned a lot about publishing ebooks to Amazon. I even gave a talk where I suggested that Perl book publishing could become a cottage industry. And that’s what I’m currently aiming at.

I’ve made a start already. just before the LPW I published a book called Perl Taster which aims to take people through their first two hours of learning Perl. It’s cheap enough (and small enough) that people can give Perl a try without investing too much money or time.

But my plans don’t stop there. I have ideas for half a dozen other books that I can publish over the next few months. Basically, if you’ve one of my training courses over the last five years then you can expect a (short!) book based on that course to appear at some point during 2018. Currently my plans include books on:

  • Moose
  • DBIx::Class
  • Modern Core Perl
  • Dancer2
  • Testing

Obviously, there are plenty of other books that could be written this way. And I don’t want to have to write them all myself. Which is where you come in. Is there a Perl-related subject that you’re an expert on? Would you be interested in writing a book about it?

I’m offering to help people publish Perl books. If you can write a book using Markdown, then let me take care of the complicated bits of turning your text into an e-book and getting it published on Amazon (and, perhaps later, other e-book platforms).

So, over to you. What do you want to write a book about.

p,s. At some point I should probably finish the e-book I was writing about publishing e-books.

The post Regenerating Perl School appeared first on Perl Hacks.

Dave Cross / Friday 20 April 2018 08:03