lederhosen: (Default)
This is my journal. It has an info page. You're welcome to friend me, but please drop me a line (here or wherever). Otherwise I will look at the friends list, see a nick I don't recognise, and assume you're a close friend whose nick I have completely failed to recognise, and die of shame on the spot. Or something.

All comments on this post (only) are screened by default and will remain invisible to other users unless you specifically request otherwise. If you need to get in touch with me for one reason or another, you're welcome to do so here.
lederhosen: (Default)
So after yesterday's post I thought I'd extend it a little and test my code on a full-sized problem: casting Hamlet.

This helpful site lists the characters present in each scene, although you have to be a little careful - Claudius is also listed as "King", and Gertrude as "Queen". In some cases it just lists groups ("Assistants", "Clowns", etc.); for this work I've just assumed there are two of each, though you'd want to check that. This results in 39 parts.

I entered that data, along with some made-up numbers for how many lines each part has; the exact values don't matter too much, as long as there's enough info to distinguish between major and minor parts. I also tweaked it so that minor characters are assumed to have 5 lines each unless specified otherwise, which saves on data entry.

Unfortunately the demo license for AMPL doesn't allow me quite enough variables to solve this problem. (I could probably reformulate it to reduce it to one variable per part, plus a few extra, but that would be a bit messier.)

Not to fear, there's another option: NEOS. NEOS is a web service that allows anybody to submit optimisation jobs for free, without a size limitation... and it accepts AMPL format. Having tested and debugged my code on a smaller problem, I can then add the full Hamlet data and submit it to NEOS at this page.

I upload three files:

castingmodel.mod )

hamlet.dat )

Last, a commands file to tell NEOS what output I want:


display Casting;

I then enter my email address and click "submit". In a minute or two, NEOS shows me the results, which you can view for yourself, and also emails me a copy. (A result of "infeasible" would indicate that it's impossible to satisfy the problem as specified, either because of some inconsistency within the constraints or because there aren't enough actors.)

The output shows some information about the solution process, and at the bottom it gives the final casting:

Art: Guildenstern
Bea: Barnardo, Clown 2, English Ambassador, Player Queen, Reynaldo
Chris: Hamlet
Derek: Horatio, Player Lucianus
Eve: Doctor of Divinity, Fortinbras, Laertes Follower 2, Player King
Frank: Ophelia
Greg: Polonius
Hugh: Gertrude
Irene: Francisco, Gentleman, Lord2, Osric, Voltemand
Jo: Claudius
Kate: Clown 1, Rosencrantz
Luke: Laertes, Player Prologue
Meg: Captain, Cornelius, Laertes Follower 1, Lord 1, Sailor 2
Ned: Attendant 2, Ghost, Lucianus
Oli: Attendant 1, Guard, Marcellus, Messenger, Sailor 1

This looks pretty sensible overall: most actors either get one big part, or a bunch of small parts, and our choices for Hamlet and Laertes satisfy the fight training requirement.
lederhosen: (Default)
Now and then Rey and I do play readings with friends. Usually there are rather more roles than there are readers, so "one man in his time plays many parts", which works fine until you end up playing two roles in the same scene and having to have an extended conversation with yourself.

So you want to cast roles in a way that avoids that kind of overlap, and you probably also want to make sure the different readers each get a decent share of the lines. You could do this by hand, but since I'm currently teaching myself AMPL, I thought it'd be a fun challenge to program a solution.

AMPL (A Mathematical Programming Language) is similar to MiniZinc, which I posted about a while back: it's designed for specifying optimisation/constraint problems and then passing them to a solver of one's choice.

It's very much a declarative language: instead of giving the computer a set of steps to follow, you give it a set of requirements and then let it figure out how to satisfy those requirements. (This still feels like magic to me.)

AMPL and other optimisation languages usually take input in two parts: a "model" which is a generic description of the problem and requirements, and "data" which defines a specific instance of the problem.

So, here's some AMPL code:

The model )
The data: )

In the unlikely event that anybody other than me actually wants to use this, you can download a free demo from AMPL (unlimited duration, restricts to about 300 variables i.e. number of actors x number of parts should be less than 300).

The demo comes bundled with a selection of top-notch and open-source commercial solvers, all free to use subject to that size restriction. By default it uses the MINOS solver, which is nice for generic nonlinear problems but doesn't handle integer constraints; since those are important here you'll want to use "options solver gurobi" (or cplex or xpress).


Jun. 2nd, 2016 10:42 pm
lederhosen: (Default)
I know, four posts in one week!

I got together with some of my fellow gamers last weekend and we spent a couple of afternoons painting up our Pathfinder figures. It's been a while since I did any painting, so I'm a bit rusty; we had to throw out a lot of paints/glues/etc. Some pics of mine:

This is Nura, freshly undercoated. You can read more of her adventures here. In-game Nura has just hit level 3 and is pretty much broke, having blown most of her money buying spells from kobolds, but this version has a bigger wardrobe budget.

I picked this figure mostly because the clothes were a bit more interesting than what I normally see on female caster figures, which is either "generic robes" or "as little as possible". Perhaps not the most practical for tromping around dungeons, but Nura has magical cleaning spells and strong friends to do the heavy lifting.

Figure cleaned up and undercoated:


Base colours on:


(Looking back at the photo on the Reaper catalogue, apart from being consumed with envy for anybody who can paint that sort of detail on a 30mm figure, I note that I've interpreted her clothes a bit differently, as far as which bits are outer vs under layers etc. Oh well.)

Just after inking her skin:


seriously, the main thing I have learned in my time painting figures is INK ALL THE THINGS THEN INK THEM SOME MORE. I have no patience for painstaking highlighting; the right ink can really bring out details very quickly. At least, as long as the sculptor has done a good job in the first place; if the shape is bad, ink will emphasise that too.

Nura's dress, after highlighting/drybrushing:


...okay, so I'm not completely against highlighting, there's a time and a place for it, and the drape-y dress was a big part of why I bought this figure in the first place so it makes sense to put in some effort here.

The violet-magenta contrast is a bit stronger than I'd normally do for highlighting, but in this case I figure she's wearing something like shot silk. I realised halfway through painting that I didn't have any light blues to highlight the blue portion, so instead I mixed one of the darker ones with yellow for the green highlight you can see here; again, call it shot silk or mageweave or whatever.

Front-on, mostly finished:

And after doing the eyes. Usually I'd ink, then paint the sclera white, then dot the pupils with a felt-tip; this is really fiddly and often requires doing over and over. This time around, the ink gave enough contrast between her eyes and the shaded surrounds that I was able to skip the middle step and go straight to the dotting.


There are a few bits I want to touch up before I varnish, but I'm pretty pleased with how it's coming along so far.
lederhosen: (Default)
Tweeted about this earlier, but this is a better medium for the length...

Lately I've been hearing the term "virtue signalling" used as a cheap put-down, mostly against leftie-type folk expressing leftie-type views. (James Bartholomew claims to have coined the phrase.)

Bartholomew's explanation:

I coined the phrase in an article here in The Spectator (18 April) in which I described the way in which many people say or write things to indicate that they are virtuous. Sometimes it is quite subtle. By saying that they hate the Daily Mail or Ukip, they are really telling you that they are admirably non-racist, left-wing or open-minded. One of the crucial aspects of virtue signalling is that it does not require actually doing anything virtuous. It does not involve delivering lunches to elderly neighbours or staying together with a spouse for the sake of the children. It takes no effort or sacrifice at all.

I'm surprised that Bartholomew doesn't mention visible displays of patriotism such as flying one's national flag or telling a soldier "thank you for your service"; as far as I can see this is one of the most widespread forms of "virtue signalling" per Bartholomew's definition, but I've never heard it described as such.

Part of why I dislike the term is that in practice, it almost always seems to involve equivocation. Bartholomew's explanation describes it as a form of deception, giving the impression of virtue without having to sacrifice for it - perhaps "feigning virtue" would be a more precise word for the concept as he explains it.

However, almost anywhere that I see somebody accused of "virtue signalling", it's coming from somebody who has no way of knowing (or hasn't bothered to find out) whether that accusation of deception is true; it's simply assumed that target's apparent virtue is feigned.

This is bad for obvious reasons (making unnecessary assumptions about a stranger's motivations is a bad thing) but it's also bad for subtler reasons. The equivocation and imprecise terminology gives the impression that signalling virtue (in the everyday meaning of those words) is a Bad Thing, and this is simply bullshit.

Certainly, people can signal virtue (real or feigned) for bad reasons. I'm sure everybody's met the holier-than-thou activist who's noisily embraced a cause because it gives them an excuse to be a dick, or to get laid.

But signalling virtue can also be a positive act. Couple of examples from my own experience:

#1: Back in November 2014, my work was running a White Ribbon Day event. I have very mixed feelings about WRD but at that stage my attitude was still "maybe it can be salvaged". This was not long after the murder of Mayang Prasetyo and close to Trans Day of Remembrance, so I asked the organisers if I could do a bit for TDOR as part of the WRD event and they said yes, so I did.

A few months later, somebody from my office came to ask me for advice about a scary mental health issue. I didn't know her well at all; the only direct interaction we had was occasionally saying hi at afternoon trivia or in the break room. But of everybody in that building, she'd decided that I seemed like a safe and possibly helpful person to ask about this stuff.

I'm still not sure how she decided that. Possibly my TDOR talk gave her the idea that I might be a good person to ask, possibly something else entirely that I don't remember. But either way, she needed to talk to somebody with a particular virtue and she'd picked up some kind of signal that suggested that might be me.

(I like to think that she made a good choice there. I wasn't able to fix everything for her, but I was able to help her find confidence to talk to other folk who could help.)

#2: Last week, somebody on a mailing list for stats professionals made a throwaway joke that involved deadnaming a famous trans person. I responded to the effect of "hey, as a point of etiquette, deadnaming trans people is impolite, I would like trans people to feel safe and welcome in our profession, so please let's not do this".

Usually when I have an issue with somebody's behaviour, the chances of resolving that are better if it's handled in private. Telling people off in public usually encourages them to get defensive rather than reconsider their behaviour. In this case, though, I felt that my reply needed to be public, and a lot of that boiled down to "virtue signalling": I wanted any trans people on that list to know that somebody had their back.

And it worked. I already knew of one person on the list who would appreciate that gesture, but almost immediately I got a thank-you from a stranger whose colleagues don't yet know that she's transitioning, but who trusted me enough to sign her email with a different name to the one that appears in the headers.

So if "virtue signalling" is what it takes to show a vulnerable person that someone's on their side (and perhaps to influence bystanders in the same direction), I refuse to be shamed for signalling.

If I fail to live up to those assurances, then by all means, shame away.
lederhosen: (Default)
Contains major spoilers for Pandemic: Legacy, March-May

Journal of Dr. Verde Green (USAMRIID, quarantine specialist), March-May 2016.

March 1: as expected, have been seconded to CDC. Cousin Rosalba in Atlanta tells me that between dealing with outbreaks of Alzuraq, largepox, scarlet fever, and of course COdA ("Black Monk"), they're flat out at the moment. We've been asked to facilitate military/civilian cooperation accordingly.

Read more... )
lederhosen: (Default)
May contain spoilers for Pandemic: Legacy

Skye's journal

January 3rd 2016

Started work at CDC today. Met some co-workers. Bianca [[personal profile] jesusandrew] runs the sequencing lab, Rosalba [[personal profile] 17catherines] is one of the field doctors, and Jamala [[personal profile] reynardo] knows how to use PubMed and the surveillance reports.

Rosalba asked me if I was interested in field work. Wasn't sure how to answer - I mean, what sort of sucker wants to go meet Ebola up close, seriously? Well, apparently, Rosalba. But Emily from admin tells me it's pretty safe, most of the time it's just sipping cocktails on the beach in Phuket and taking a few temperatures here and there. So I said sure, yeah, why not? Rosalba's going to help me with the paperwork.

Read more... )

In memoriam

Dec. 6th, 2015 10:13 am
lederhosen: (Default)
Ten years today since I last spoke with my mother. Neither of us had any idea it was going to be the last time. G and I were planning to drive down to Canberra three days later on a Friday and do family Christmas stuff with my parents. Instead we ended up driving down very fast on the Thursday; she was still alive when I got there but I don't know if she knew I was there, and a few hours later she was gone.

Afterwards, one of her closest friends told me "I loved her, but she was mad, you know". In some ways that was the most helpful thing anybody said to me about her. Because she was in some ways irrational, exasperating, difficult to deal with, and I saw much more of that side than the other friends and co-workers.

But she was also immensely kind and caring, with a strong sense of justice. She'd always been there for me (even when I might've wished otherwise...) and I heard countless stories about her kindness to others.

Ten years is a long time. Her sister's widower remarried - she'd have been pleased for him - and then abruptly died. Her mother died, having outlived two of her daughters, and that seems to have triggered healing between the survivors. She has two grandchildren, who she might have foreseen but never got to meet. My father has remarried (she'd have been happy to hear it) and I have a new brother (no idea WHAT she'd think about that!)

G and I have both changed careers. Dog-Or has gone; she never knew Basil. A couple of people who were close to me then have passed out of my life; others are still here.

I still have long hair (she'd disapprove) if not quite as much of it. She would undoubtedly have HATED my tattoo, but then if she was still here I wouldn't have it.

And we know what killed her - thanks in no small part to her and my late aunt - and we have some options for defending against it. So, there's that.

No profound insights here. It's complicated, probably always will be, until the last person who remembers her is gone too. Just feelings.


Nov. 28th, 2015 05:34 pm
lederhosen: (Default)
Think I might've just broken off a long-standing and much-valued friendship. Dammit. And not even for anything they said or did to me - this is somebody who's always been good to me, who's given me a great deal of fun and kindness over the years.

But there are things I can't overlook, not even in my friends, ESPECIALLY not in my friends. And knowingly signal-boosting refugee-hating white supremacists and anti-PP propaganda is definitely in that list, because that shit gets people killed.

NB: I'm not saying we have to be in perfect agreement on those issues. I'm talking about basic honesty (if you share material that turns out to be a fabrication, maybe correct the record?) and, um, not relying on sources that would be right at home on the Daily Stormer. I don't think that's an extreme position.

Gah. This is not a friendship that I would cast aside lightly. But I have to draw a line somewhere. If they change their behaviour I'd gladly welcome them back, but I doubt either of us is going to shift on this one :-(

NB: The person in question has access to this post - not sure if they still read LJ/DW, but they're welcome to read this if they see it. I have no desire to see people trashing them in comments; I'm feeling sad enough about this situation as it is.
lederhosen: (Default)
I've been doing a course using MiniZinc, which is a specialised language for constraint/optimisation problems. It's a bit different to what I'm used to: it aims to separate the specification of the problem from the solution of the problem. Once you've told it the problem you want it to solve, it translates that into instructions to a solver.

As an example, here's one I wrote on the plane last Friday, to solve the in-flight magazine Sudoku:

include "globals.mzn";
int: box_size=3; % Side length of one of the constraint boxes in a grid
int: grid_size=box_size*box_size; % Total side length of the grid e.g. 3x3=9
set of int: Rows = 1..grid_size; % i.e. rows have index values 1 through grid_size
set of int: Cols = 1..grid_size;
array[Rows,Cols] of var 1..grid_size: grid_solved; % This is the solution we're trying to find
array[Rows,Cols] of 0..grid_size: grid_start; % Clues, with 0 = blank

% Set the standard constraints:
constraint forall(i in Rows)(alldifferent([grid_solved[i,j]|j in Cols]));
constraint forall(j in Cols)(alldifferent([grid_solved[i,j]|i in Rows]));
constraint forall(k,l in 0..box_size-1)(alldifferent([grid_solved[i+k*box_size,j+l*box_size]|i,j in 1..box_size]));
% Require that the solution matches clues
constraint forall(i in Rows, j in Cols)(grid_start[i,j]>0->grid_solved[i,j]=grid_start[i,j]);
% Tell MiniZinc that we just want a solution that satisfies these
% requirements (i.e. we're not trying to optimise anything)
solve satisfy;

% Define the clues - picked this one from
% http://www.telegraph.co.uk/news/science/science-news/9359579/Worlds-hardest-sudoku-can-you-crack-it.html

% And output the solution.
[ show(grid_solved[i,j])++
if j == grid_size then "\n" else " " endif
| i in Rows, j in Cols ]

Using the default solver that came bundled with MiniZinc (Gecode), this finds a solution in about 30-50 milliseconds.

Note that I didn't tell it how to solve the puzzle; I just told it the rules that a successful solution must obey, and MiniZinc/Gecode worked out the rest on their own. I'm sure this is old hat to some of you, but for me this is pretty impressive.

For some more complex problems, it is necessary to give the solver a bit of guidance on what strategy to use, but even there it keeps the focus on defining what the problem is, and it lets me switch from one solver to another without changing my code. I can see this being useful.
lederhosen: (Default)
Sent today:

Hi, my wife and I have been coming to Dracula's [cabaret restaurant] for 15 years, often bringing friends and family with us. Last night (Retro Vampt in Melbourne) was our fifth time.

As always the food was great and parts of the show were great. But the repeated anti-trans jokes left a bad taste in my mouth. (I counted at least three, including one about Caitlyn Jenner that must have been added in the last couple of weeks - if you're going to be topical, I'd much rather have had something about Christopher Lee.)

My wife and I have several transgender friends, we know the sort of crap they have to deal with in life, and it's just not enjoyable for us to deal with that on what's supposed to be a relaxing night out. The previous time we came, we took one of our trans friends and they had a great time - I'm very glad they weren't at last night's act.

I know gender-bending Rocky Horror humour is Dracula's thing, and I enjoy that, but there are ways to do it that don't come across as "ew nothing worse than a transgender woman, amirite?" If I wanted that, I'd watch the Footy Show. (Not too keen on the homophobic parts of the act, either.)

It's your show, you get to decide what sort of comedy you want to perform. All I can do is let you know that if anti-trans jokes are going to be part of the act then I'll have to look elsewhere for a fun night out, and I'd be sad to do that. I've had a lot of fun at Drac's over the years.

(Tattoo progress: itchy.)
lederhosen: (Default)
Back when I did my St. John First Aid course, the instructor told us "if you don't have the right equipment, don't be afraid to improvise".

...so it turns out, gas stations don't sell useful-sized ice packs per se, but they DO sell frozen pre-mixed margarita packs that are just the thing for a frozen ankle when applied externally: freezy-cold, but because of the alcohol content, smooshy enough to fit nicely around said ankle.

(Rey twisted her non-driving ankle coming out of the aforementioned gas station. Should be okay with a bit of strapping and a few days to heal.)

Gaming fun

Jan. 17th, 2015 01:16 am
lederhosen: (Default)
Started running a new Pathfinder game tonight. Currently the group only has 3 players and no healer, but they managed to pick Lawful Evil, Chaotic Neutral, and Neutral Good, so at least we have the alignments covered.

Tonight's session involved: detective work, arm-wrestling, impenetrable nautical jargon, and providing relationship advice to a teenage tengu. "Don't commit petty theft for just anybody, save it for someone special!"

Now to plot the next one...
lederhosen: (Default)
My paper has been accepted for NTTS in Brussels for March, so I'll be overseas in ARGH ONLY TWO MONTHS AWAY BETTER RENEW PASSPORTS! and travelling on via Iceland, UK, and USA as part of Rey's 50th-birthday holiday trip.

We saw "The Imitation Game" yesterday. I had mixed feelings about it...Read more... )
lederhosen: (Default)
I do like a good mashup, and this is an excellent mashup: "Maiden Goes To Hollywood" with bonus Sir Ian.

Bonus points if you already knew the link between Iron Maiden's "Rime of the Ancient Mariner" and Frankie's "Welcome To The Pleasuredome".

More where that came from.
lederhosen: (Default)
It's not quite six months since we were a two-dog household, and now they're both gone. We took Basil to the vet just last Thursday and he was surprised by how well Basil was looking, but warned us that it probably wouldn't last.

Read more... )

He was so very different from Dog-Or. Dog-Or was an uncomplicated dog who loved everybody and assumed they loved him back (mostly correctly). Basil had a lot of defensive behaviours, he bit all of us at least once, and he was cautious about us - he would give my hand a very polite little lick when he was feeling friendly. When you called him, he'd stop to think about whether he really wanted to come. (Baths: no thank you.) But it was clear he liked being around us, and not just at mealtimes; when Rey was out he'd camp by the door waiting for her to come home.

I wish I knew where he came from before the Lost Dog's Home, whether there's somebody out there wondering whatever became of their little black-and-white borglie. We only got the last quarter of the story, but we did what we could with it.


May. 25th, 2014 08:19 am
lederhosen: (Default)
Today we were almost trampled to death by a small black-and-white dog who wanted us to know that it's Feeding Basil Time.

I can see subtle hints of illness; the vet told us "could be as quick as three weeks" and it's already been almost two. But for the time being he's happy and getting a lot of love.


May. 23rd, 2014 09:42 pm
lederhosen: (Default)
Committing these things to memory:

A white-tipped tail, quite out of proportion to its owner, standing high above his head when happy, waving as if he's trying to hail a taxi.

Pointed ears, one straight, one folded, twitching at the mention of his name.

The rituals of Wanting Something. The plaintive eyes, head slightly cocked, showing off those ears to best advantage. The small polite lick on my hand, like a gentleman offering his card. The offered paw, a preamble to the rollover and the belly. The frantic circles at feeding time and the leap-thump-leap-thump as he overcompensates for the shortness of his legs.

The appetite, gulping down food unchewed before it can be taken away.

The shedding. So much fur, finding its way into everything.

The mind, too sharp by half, that always knows what we're up to.

The fears. Alarm at loud noises, the tail tucked down between his legs as cars drive by. The jealousy over food and the reflexive snarl when suddenly woken - and the apology afterwards. The dog who crept into a dark cupboard on his first day with us and sat there so quietly that we looked there twice and missed him; the dog who sneaks under our bed at night like a little ninja.

The sore spots that we never understood but eventually learned to avoid.

The delight every day when we come home, sniffing our legs to find out where we've been and who we've seen, tail lashing hard enough to hit himself in the face.

And now, counting cans and wondering if the dogfood will outlast the dog. Oh, little fellow, I wish you were staying with us.


May. 13th, 2014 03:04 pm
lederhosen: (Default)
This morning the vet diagnosed Basil with advanced lymphoma. This was quite a shock to us; he's not a young dog (somewhere around 11-12) and he's had a few health problems, but we certainly weren't expecting this.

We might be able to get him a year or so with chemo; from what I can make out, chemo doesn't knock dogs about as badly as humans, but I think quite likely it'd still be very stressful for him. He's a nervous dog who's afraid of a lot of things, including the vet's office, and I can't imagine he'd deal well with having a drip inserted regularly.

Otherwise it's palliative treatment, and probably only a couple of months.

Poor guy. At least with Dog-Or we knew he'd had a long and happy life with us. Basil's a rescue dog; we'll never know his story before he came to us, but I don't think it was a happy one. He's always been defensive, the sort of dog who'd bite you if you touched him in his sleep (and then apologise afterwards) but he's mellowed out a lot in the time he's been with us; there are still behavioural issues but he clearly likes us and wants to please us. I really did hope we'd have a bit longer to enjoy one another's company.


lederhosen: (Default)

October 2016



RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Oct. 27th, 2016 02:40 pm
Powered by Dreamwidth Studios