Jul 26, 2017
@davorg
Jul 26, 2017
@davorg
Updated for July 2017 tech meeting
1 commit with 6 additions and 0 deletions

Dave Cross posted a photo:

In a meeting room called "The Greenhouse"

via Instagram ift.tt/2vFh8A8

Jul 24, 2017
@davorg
  • @davorg cb78fd3
    Changed Changes.md in the MANIFEST.
Jul 24, 2017
@davorg
Jul 24, 2017
@davorg
  • @davorg 374a51d
    Better docs. Bump version for release.
All the Birds in the Sky
author: Charlie Jane Anders
name: David
average rating: 3.54
book published: 2016
rating: 0
read at:
date added: 2017/07/24
shelves: currently-reading
review:

For a thing (that you may hear more about at some point in the future) I needed diagrams of traffic lights. But Google Image Search didn’t really have what I was looking for. Everything was either too realistic or not CC-licensed so I could use the images how I wanted.

So I decided to do it myself. But I’m not exactly artistic. I far prefer it when I can get computers to draw images for me. I’ve dabbled with SVG before and it seemed like the perfect tool for the job. And there’s a module from CPAN that makes it simple to create SVG images from Perl.

It only took an hour or so before I was drawing images like the one above – which was exactly what I was looking for.

Initially, I shared my code as a Gist, but since then I’ve extracted the useful bits into a module which I’ve uploaded to CPAN as SVG::TrafficLight. I’ve tried to make it as configurable as possible, so you should be able to use it for all your traffic light drawing needs as well.

Starting to use it is pretty simple.

use SVG::TrafficLight;

my $tl = SVG::TrafficLight->new; # default image
print $some_file_handle $tl->xmlify;

The default sequence of lights shows the UK’s standard traffic light sequence (green,  amber, red, red and amber, green) but it’s simple enough to produce a different sequence (even one that you would never see on the roads).

my $tl2 = SVG::TrafficLight->new({
  sequence => [
    { red => 1, amber => 1, green => 1 }, # all lights on
    { red => 0, amber => 0, green => 0 }, # all lights off
  ],
});

If you read the documentation, you’ll see how you can customise pretty much anything in the diagram – the size of the lights, the padding between them, even the colours used.

Let me know if you find it all at useful. SVG is fun. I’ll think I’ll investigate it some more.

 

The post Drawing Traffic Lights With Perl appeared first on Perl Hacks.

Dave Cross posted a photo:

Balconies and palms. Our 16th century Granada hotel

via Instagram ift.tt/2ty7htJ

Dave Cross posted a photo:

Exhibition of the Inquisition

via Instagram ift.tt/2uzTPdZ

Dave Cross posted a photo:

Graffiti

via Instagram ift.tt/2v6iYtI

Dave Cross posted a photo:

Graffiti

via Instagram ift.tt/2unIFIE

In just a few weeks, HBO will start to broadcast the seventh series of Game of Thrones. The show has a large cast, so I thought it would be useful to take a look at who’s still alive, where they are and what they are doing.

To start, I’ve looked at all of the forty-two actors who have appeared in the main credits for the show. Twelve of these characters had died before the start of series six, so let’s get started with those.

(In case it’s not obvious, this article assumes you have seen all six previous series of Game of Thrones – so there will be spoilers for the first six series. I should also point out that I’m only considering the TV show here – I won’t be talking about the books at all.)

Viserys Targaryen

Viserys has the honour of being the first major character to be killed off in  the show. In episode six of the first series, he was killed by Khal Drogo by having molten gold poured over his head.

Robert Baratheon

In the very next episode, Robert died after being gored by a boar while on a hunt. It was his death that lead directly to the War of the Five Kings.

Eddard Stark

Ned Stark was beheaded at the order of King Joffery in the ninth episode of the first series. Things started to go very badly for the Starks from that point.

Jeor Mormont

The next major character death wasn’t until episode four of the third series. Jeor Mormont got involved in a fight with wildlings at Craster’s Keep and it didn’t end well for him.

Robb Stark, Catelyn Stark & Talisa Maegyr

The Red Wedding took place in episode nine of series three. The Freys and the Boltons plotted together and killed Robb Stark (along with his mother and his wife). That’s what you get for breaking a promise, I suppose.

Joffery Baratheon

Of all the major character deaths in the show, this probably got the biggest cheers (certainly in my house). Joffery has poisoned at the feast following his wedding to Margaery Tyrell. This was in series four episode two.

Ygritte

The wildlings were attacking Castle Black. Jon Snow knew nothing, but Olly took the shot and killed Ygritte in the ninth episode of series four.

Shae & Tywin Lannister

In the last episode of series four, Tyrion goes on a bit of a killing spree. Having found his lover, Shae, in his father’s bed, he strangles her and then shoots his father with a crossbow.

Stannis Baratheon

By any reasonable criteria, Stannis was Robert Baratheon’s true heir. But instead of being crowned king, he got involved in a bloody and pointless war and eventually got himself killed by Brienne of Tarth after his army failed to take Winterfell

 

So that was all the major character deaths up to the end of series five. Series six took it all up a notch.

Roose Bolton

Roose legitimised his bastard son, Ramsay back in series four. But that did stop Ramsay being very suspicious when his stepmother gave birth to another potential Bolton heir. Ramsay’s solution, in episode two, was to kill his father, his step-mother and his half-brother.

Ramsey Bolton

But Ramsay didn’t last long as Lord Bolton. When Jon Snow’s army, with help from the Lords of the Vale, took Winterfell in episode nine, Ramsay must have realised that his life expectancy was rather short. But it still rather took him by surprise when his wife, Sansa, fed him to his own hounds in revenge for the way he had treated her.

Margaery Tyrell & The High Sparrow

The number of casualties from the Red Wedding took some beating, but Cersei Lannister managed it in episode ten when she blew up the Sept of Baelor when it was full of people waiting for her trial. Pretty much anyone who was anyone in King’s Landing was there. And they all died.

Tommen Baratheon

One of the few named characters in King’s Landing who wasn’t blown up in the Sept of Baelor was King Tommen. But he was watching from his room and when he saw what had happened, he was so appalled that he killed himself by jumping out of the window.

Other Series Six Deaths

But it wasn’t just major characters who died in series six. Many other characters died too. This is a list of the other named characters who died during the series.

In episode one we have a clean-up of Dornish characters. Elleria and Tyene Sand kill Doran Martell along with his guard Areo Hotah and Obara and Nymeria Sand kill Doran’s son, Trystane .

In episode four, the wildling Osha attempts to kill Ramsay Bolton while seducing him. He sees through this and kills her instead.

In episode five, one of the saddest deaths so far was Hodor’s. He died holding a door so that Bran and Meera could escape. We also saw that the reason he could only say “Hodor” was that while this was going on in the present, Bran was watching him in the past and the shouted instructions to “hold the door” somehow leaked through time and affected his brain.

In episode eight, Lady the Crane (the actress who Arya has befriended) is killed by the Waif. Arya responds by kill the Waif.

In episode nine, Rickon Stark is killed by Ramsay Bolton just before the Battle of the Bastards. And the giant, Wun Wun, is killed breaking down the doors to Winterfell.

In episode ten,  Plenty more people die in the explosion at the Sept of Baelor. These include Mace Tyrell and his son, Loras, and Kevan Lannister with his son, Lancel. Qyburn has Pycelle killed and in the Twins, Arya kills Walder frey.

So, all in all, that’s quite a clearing of the board. Who’s still around? And what are they doing?

Daenerys Targaryen

After six series of shilly-shallying around on Essos, Daenerys has finally got a fleet together and is sailing towards Westeros to claim her crown. On the ship with her, we see Tyrion, Missandei and Varys. Theon Greyjoy (with his sister, Yara) are on another ship.

Jon Snow

Jon had an interesting series six. He came back from the dead, was reunited with his half-sister Sansa (the first time two members of the Stark family have been together since the Red Wedding),  gave up his command of the Night’s Watch and took back Winterfell from the Boltons. The series ends with him in Winterfell, being proclaimed King in the North. The other main characters we see at the proclamation are Sansa Stark, Davos Seaworth, Peter Baelish and Tormund Giantsbane.

Oh, and we’ve just found out that Jon isn’t Ned Stark’s bastard son at all. He’s the son of Ned’s sister, Lyanna, and Rhaegar Targaryen. He doesn’t know this yet.

Cersei Lannister

Having destroyed the Sept of Baelor and killed all of her rivals, Cersei has been crowned Queen of the Seven Kingdoms. Her brother Jaime (who returned, with Bronn, from the Siege of Riverrun in time to see the aftermath of the explosion in  the Sept) watches from the side of the room.

Samwell Tarly and Gilly

Sam and Gilly have arrived at the Citadel where Sam hopes to be trained as a Maester. He has been invited explore the library. Gilly (as a woman) had to wait outside.

Bran Stark

Bran Stark is just about to go back south through the wall with Meera Reed. He has become the “One-Eyed Raven” and is having lots of visions that explain the back-story of the show.

Arya Stark

Arya finished her training as a Faceless Man in the House of Black and White, but she turned her back on their mission and took back her identity. It appears she has gone back to working her way through her list as she was last seen killing Walder Frey at the Twins.

Others

Melisandre was exiled from Winterfell by Jon Snow. She left on a horse, but we don’t know where she is going.

Brienne of Tarth was last seen escaping from  the Siege of Riverrun on a boat with Podrick Payne.

Jorah Mormant was sent off by Daenerys to find a cure for his greyscale.

Elleria Sand was last seen plotting with Olenna Tyrell and Varys and agreeing to support Daenerys’ invasion of Westeros.

Daario Naharis was left behind in Meereen by Daenerys. He has be told to keep the peace in Slaver’s Bay.

Sandor Clegane is wandering around the Riverlands with the Brotherhood Without Banners.

Jaqen H’ghar was last seen in the House of Black and White.

And then there’s Gendry. Gendry was last seen back in series three when Davos helped him escape from Dragonstone by putting him on a boat to King’s Landing. Who knows if he got there of if we’ll ever see him again.

 

So that’s where we’ve got to. Now read on…

The post Previously on Game of Thrones appeared first on Davblog.

A few little bits and pieces, none of which justify a blog post to themselves.

blogs.perl.org

Some of you will have seen that Evozon’s grant to replace blogs.perl.org was cancelled a couple of months ago. This made me sad as I (along with the rest of the blogs.perl.org team) really want to see the current, fragile, set-up replaced as soon as possible.

I’m happy to see that a new grant proposal has been received from a team at Booking.com. They want to take Evozon’s work, along with some other improvements that they’ve made in house, and complete the project.

I’d really like to see this grant approved and the project completed. Please feel free to add your comment to the proposal.

Perl News

Who remembers use.perl.org? For many years it was the best place to go for both Perl news and Perl blogs. The idea behind blogs.perl.org was to replace the blogging part of that site and a few years ago, Leo Lapworth and I built perlnews.org to replace the other part of the equation.

Unfortunately, neither of us really had the time to invest in the site and it never really took off. These days there are plenty of other places to get your Perl news, so we’ve taken the decision to close the site down. The existing stories will remain online and I might replace the current WordPress installation with a static site at some point in the future.

The Perl Conference in Amsterdam

A couple of my recent blog posts have been about deciding what training course to run alongside The Perl Conference (The Conference Formerly Known As YAPC Europe) in Amsterdam.

Unfortunately, my plans had a big collision with Real Life and I’ve realised that it’s just unrealistic for me to have enough time to prepare for the conference. So, sadly, I’ve made the decision that I won’t be in Amsterdam this August.

I’m sure it’ll be a great conference though and I wish the organisers the best of luck with it.

Web Application Development in Perl 6

Gabor asked me to give him a quotation explaining why I had backed his Indiegogo campaign to write a book on web development with Perl 6. This is what I sent him:

I’ve been largely ignoring Perl 6 development since the project started in 2000. I figured that I would have plenty of chance to catch up with it before clients started expecting me to know it. The official release of Perl 6 eighteen months ago means that the time is now right for me to start taking an interest. A lot of the code I write drives web sites, so I want to get up to speed with web development in Perl 6 quickly. That’s why I supported this crowdfunding campaign – I want to read this book and I think that Gabor is the right person to write it.

I think this will be a very useful book. You might consider backing it too.

CPAN Badges

I’m a big fan of the badges from shields.io. I use their CPAN badge on my dashboard. Unfortunately, this badge has stopped working – it just says “cpan | invalid”.

I did some investigation and discovered this was because they use the MetaCPAN v0 API – which has now been switched off. It was simple enough to patch the code to use the v1 API. I’ve sent them a pull request, but it hasn’t been accepted yet.

The post Several Small Bits of News appeared first on Perl Hacks.

Ok, yes, I’ve been writing Perl for over twenty years. But Perl 5.26 was released this week and for the first time, my name is mentioned in the release notes. Because I have not one, but two fixes in this release of Perl.

The first is this commit which fixes a piece of documentation to make it clear that grep() returns a list, not an array.

The second is this commit which fixes some sample code so that it runs without warnings under use strict.

It’s a small start, I admit, but I have a taste for it now. In a years time, I hope to report that I have more than two commits in Perl 5.28.

And you can help too. Instructions on how to contribute are in the perlhack manual page. There is more information in perlhacktips and perlhacktut.

The people working on Perl all do a great job. But it’s a hard job and it might just get a little easier if more of us helped out.

The post I Wrote Some Perl appeared first on Perl Hacks.

Dave Cross / Wednesday 26 July 2017 20:03