#firstworldproblems

So I have a fantastic laptop, right? Asus K42JC, it's a brilliant bit of kit. The touchpad has multitouch enabled, which means that sliding down with two fingers acts like a scroll wheel, and sliding sideways acts like arrow keys.

It's awesome, I know. But here's the thing. It's pretty much impossible to move your fingers in a perfectly vertical line down a touchpad. So that means if I'm browsing a website that does things like change to the next page when you use the arrow keys, the multitouch makes me fucking flick back and forth between pages like a madman. And I've grown so used to the immensely convenient multitouch interface that I can't stop using it now.

Basically this means that if I'm trawling imgur or smbc or any website built on the gawker media template I have to have more of my attention on moving my fingers in a perfectly straight line than on reading whatever it is that I'm reading.

So, yeah, obviously I turned off the horizontal scrolling setting on the touchpad but sometimes that is useful as well, given the small size of the laptop screen.

Surely I can't be the only one who gets pissy about this.

Posted
 

Maths talk

I'm about halfway through my Honours year at present (although it doesn't feel like it), doing my dissertation in Mathematics. In the process of writing some code in the R scripting language, I came upon an annoying problem.

I have two matrices:

and 1

and what I want is to create a third matrix:

2

Now it is easy to code something that will create this matrix one element at a time. Now, since X and Y will likely have at least 600 rows each, meaning we'll have a loop with 6002, or 360000 iterations. And since each of those iterations involves 3p floating-point operations, that means K is created in 1,080,000p flops. But this is in fact a lower bound; if we do each cell individually, then it will take much more than that, since R is notoriously inefficient when it comes to one-at-a-time operations.

Where R shines is in operating on entire vectors at once. Toy example: let's say I have a vector of numbers, x, and I want to increase each number by its position within the vector. So the first number increases by 1, the second by 2 and so on. Ask a computer science student, and they'll tell you to make a loop that increments each element one at a time and uses the loop index to keep track of where it's up to. Ask someone who uses R (i.e. not a computer scientist but a mathematician) and they'll say to add the vector to another, dynamically-defined one. In code:

z <- x + 1:length(x)

1:n creates a new vector, where the first element is 1 and it increments the elements by 1 until it gets to the same length as x, and then stops. So this is useful; it means I can create K one column at a time.

But one column at a time is still kind of inefficient; that's still a loop and R is not well-optimised for loops. So I spent a couple of weeks niggling at this problem, trying to find a way to do it without loop structures at all. Then a friend of mine at work, discussing something unrelated, reminded me of the dist() function, which is almost exactly what I needed!

dist() does the following: pass it a matrix, X, and it returns a lower triangular matrix3 where the element at row i-1 and column j is ||xj-xi||. But, this requires you to pass it a single matrix, not two. So what I can do is tack the matrix Y on the bottom of X and pass the result to dist()! The output matrix will therefore have a bunch of stuff I don't need - I don't care about the distance between elements in X and other elements in X - so when I create it I can then pull out the quadrant which contains the distances between the Y values and X values and ditch the rest.

The question remains whether this will actually turn out to be less processor cycles. dist() is pretty well optimised whereas calling one set of vectors at a time is not; however, using dist() means that I'll be creating a whole bunch of distances I don't care about. So the next step will be benchmarking using some test data I have from last year.

This is what an applied mathematician does.

1 For clarity, what this means is that X is a matrix with n rows and p columns, and Y is a matrix with m rows and p columns, and the values in these matrices are all real numbers.

2 This is notational shorthand; what, for example, is meant by ||y1-x1||2 is: take the first row in the matrix Y; subtract the first row in the matrix X; then square all the elements in the resulting vector and add them up. Important note: ||y1-x1|| is the square root of this. Further important note: this value is called the Euclidean distance between two vectors.

3Lower triangular matrix means that 1) the matrix is square and 2) all the elements in the top right above the diagonal are zero.

 

Posted
 

Dennis

About a year ago, Mrs Ski and I were up late watching short films on SBS on a Saturday night. Of the films, the one that stuck with me the most was Dennis. A short film from Denmark; it's about a professional bodybuilder, the eponymous Dennis, a giant of a man, but, one gets the impression, immensely gentle. He's also somewhat immature; in a codependent relationship with his mother, a correspondingly tiny woman, who controls his every action with a quiet phrase or a hard look.

His father is gone; whether dead or left, we're unsure, but it's clear that the mother did not think much of him and draws parallels between him and Dennis when she wants Den to pull his head in.

Prodded by a friend from the gym, and very much against his mother's wishes, Dennis goes out to dinner and then back to the apartment of a girl who very much likes bodybuilders. She invites some friends, but it does not go the way Dennis would have hoped - although it's not clear that he hopes anything at all; it's more like he goes along because she told him to.

I felt immensely sad after watching it - and remembering it now - both for Dennis and for his mother. I was about to call them two very broken people, but that's a) a cliche and b) not, strictly speaking, true. Dennis is not broken, just a simple guy who has something that drives him to the deficiency of all else. I don't think he's stupid, more that his brain is the one muscle he's neglected. Nor is his mother broken, not really. She's just discovered that the threat of withdrawal of love - however conditional and troubled, she and Dennis do love one another - is what will always work with her son; and each time one uses a tool like that, the next time becomes easier, until it becomes the norm.

There's apparently a sequel out now, in which Dennis, inspired by his uncle, goes to Thailand in search of women more likely to want to go out with bodybuilders of his stature (the man is without hyperbole gigantic; one imagines that his size would, for some [many? help me out here, ladies] be more frightening than enticing) and apparently ends up, unsurprisingly, out of his depth. I'm trying to source a copy at present.

Dennis is an excellent film, well worth watching, and it's only about 15 minutes long. Go check it out.

PS: I'm not kidding, the dude's fucking huge, check out the poster, and yes that is a normal-sized wall telephone he is holding:

 

 

Posted
 

Karlski's grog reviews!

Today: Monkey Shoulder.

It's a blended scotch; triple malt, so the label says, but the label is also one of those faux-old-timey-bullshit ones thrown together to give the bottle something of an air of class, an air that is immediately done away with by the fact that there are three cheap-looking metal monkeys hot glue gun'd to the bottle.

It's also about a dollar more expensive than Ballantine's, which my mental great-aunt used to drink like a fish for reasons that escape me, considering that it is awful.

So, I wasn't expecting much. What I got was surprising! It's a very smooth whiskey, with almost no peaty flavour (a plus, to my uncultured disgusting tastebuds) and a pleasantly sweet aftertaste. It's almost like there's a tiny dash of honey in there somewhere.

Goes great with soda water, naturally, but also eminently drinkable straight. Also, the hangover is fairly mild, which is important, given the outright murderous nature of my usual hangovers.

Monkey Shoulder gets four and a half Karlskis out of five.

Posted
 

oh god

So related to the previous post I figured I should do some cardio workouts as well if I want to actually be less of a fatty rather than just a fatty who is flexible, so I tried taking a BodyPump class last night, apparently that is a fairly universal thing?

Anyway, ow, I think I may die. Had to bow out a few times in the final ten minutes for fear I was going to spew, which, apparently, fairly common.

That class is vicious.

I mean, I'll probably go again, no pain no gain and all that, but still.

ow

Posted
 

OMG you guys

So I got a new job a few months ago, as a statistician. They've allowed me to go part-time while I do my Honours this year, which is great.

Anyway, so this means I've stopped having regular physical exercise 3-4 times a week, so I've gained ... some kilos. So, I've been thinking about fitness. Mrs Ski got me onto this Nerd Fitness thing, which has been going well-ish, although like any self-paced fitness regiment it is difficult sometimes to keep up momentum.

I say all this so that there is context to me stating that I've recently joined the gym at university at a very nice student discount. I went to my first fitness class today; I was going to a Yoga class which, it turns out, had been cancelled, and Pilates was on instead. The woman at the reception desk suggested I give that a try, so I did.

Holy crap, ladies. I am going to go to that shit regularly, that is amazing.

So much work on the core muscle groups and flexibility. It's basically non-stop stretches and flexibility work with some serious abdominals/laterals work involved. You spend about half of it in one form or another of the plank.

No wonder Pilates gets recommended so often. The part that baffles me is why more guys don't do it. Strongly recommend!

Posted
 

A quotation

This comment tickled my fancy.

From here:

"The Wartime British! The bravest, noblest flower of 20th-century humanity. Modest, courageous, steadfast, undaunted, enduring the most horrible horrors with a sad, dashing half-smile and a quiet "bad show, old man." Keep Calm and Carry On. And of course, they really did. All that is true. But the thing we never seem to get is that the citizens of Britain didn't know they were like that, not at the time. They were just as pissed off and furious and depressed and disaffected as we are, what with their incompetent politicians and their blasted propaganda and their starvation-ration coupons. The stories told afterward are bound to be very different from what was going on at the time.

It gives me a little hope for our own situation."

 

Posted
 

Ouch.

So the smart fellas over in Melbourne came up with a flash new thing for displaying our various laser-powered measuring tools in the store; unfortunately they designed it for their shelving which, it turns out, is ten cm deeper than the shelving in WA, so there's this lovely vicious metal overhang from my shelves after it's fitted.

Which I have proceeded to bash my shoulder against. Incident report: filed. They've only rolled it out to five stores so far, so this means the rollout will probably be completely canned until a redesign/workaround is done. Really, ten minutes with an angle grinder would do it, but of course we're not allowed to do that in the store.

Between this and hurting my back pulling heavy stuff down from overhead and the dumpster closing on my head and shovels falling on my head &c. &c. it's basically like I'm the beta tester for the OH&S rules in our store D:

Posted
 

More work?

The worst thing about my shitty retail job is not the procession of managers. It's not the self-contradictory diktats issued down from upper management. It's not the occasional shower of arseholes - and don't they just love to come in packs.

 

It's that it turns my brain to mush.

 

I like mathematics. I like to do mathematics. I'm studying to be a mathematician. Right now I'm on break between semesters, and I'm trying to finish my answers to a mathematics competition. This is some serious mental heavy lifting here, and when I get home from work I want to get back into it and have some fun, but I can't. I can't think straight after a shift there. After eight hours of the phone ringing and people asking questions and noise and dashing around to sort out three problems at once and cutting keys I just can't think straight, I end up staring at the page for half an hour trying to do the same thing five times and expecting a different result each time. That's the worst part. It makes me unable to do what I love doing, and since the only reason I have this shitty job is so that I can continue to eat while doing what I love to do I get a bit upset.

 

It's not so bad, though. Honours next year, then I graduate and I can go and get a grown-up job. You know, one that doesn't supply you with a uniform.

 

(I realise as I type the above that a lot of grown up jobs supply their people with uniforms, viz. mining, engineering, armed forces, pilots, emergency services and so on but you know what I mean. I mean retail uniforms, not proper uniforms.)

Posted
 

Anticipation, anxiety

Since the last post I have had an interview with the Bureau of Statistics about the cadetship; I think it went fairly well, although me being me I am nonetheless convinced that I flubbed it terribly. At one point they asked a question that was basically straight from the initial application; despite having spent two hours that very morning re-reading my responses to the application and rehearsing paraphrases of them, my mind went completely blank and I had to throw something together on the fly. Still, I think I pulled it off fairly well. Guess we'll see.

I've also finished my exams for the semester; one was OK, one was easy, one was hard but I was up to the challenge. I'm fairly confident - chances are above 1/2 - that I've managed to get 100% for what every maths student at my university has described as the hardest unit they've had to do. If I managed that feat I am going to be insufferably smug for, like, three days, before I ride the curve down into a small pit of bleakness as I reconvince myself of my innate inferiority.

Kinda wish I could stop doing that. Still, said pits get a little smaller each time.

------------------

My weekly gaming group have been playing Legend of the Five Rings which is pretty cool, and we are also beta-testing an adaptation of the Deep Blue Sea ruleset to the Infinity universe, which has been really awesome. The Infinity campaign is basically a cyberpunk game with no cyberware but even more neon and a skootch more optimism.

Anyway the point is that both of those systems involve flinging a bunch of d10s around, and I've become kind of sick of seeing the same dice over and over, so I bought some more on the internet; namely, six d10s made of brushed stainless steel! Given that Mrs Ski has bought a bunch of dice from the same shop, we expect them to arrive by next Friday, at which point pics and a review.

I don't think I've ever been this excited by dice before.

Posted