Saturday, 7 January 2017

Words that no longer mean anything.

Hipster: A young or old person who dresses in a mode or style, possibly incorporating facial hair (or not), possibly having tattoos (or not), who might like niche products including photographic film, vinyl records, higher quality beer/wine/meat, and bicycles with minimalist drive-trains (but not niche products like exotic sports cars or watches). They might listen to some new niche music (like young people have always done), or old niche music, or old popular music, and attend events with people with similar interests. This term is only useful because it indicates that its speaker is insecure and has psychological problems with how other people dress, what they eat, or their hobbies.

Liberal (US only)/Lefty: one who believes that one or more of the following are desirable: universally accessible education, public health-care, the rule of law and its consistent proportional application, racial equality, leadership accountability, the veracity of information sources, scientific method, separation of church and state, evidence driven policy and risk management, international communication and compromise. This term would be commonly applied to Ronald Reagan if he appeared today instead of the 1970s/1980s. It is only useful because it indicates that its speaker values tribalism and mindless acquiesence to raw power (which they believe will be used in their favour) over fair dealing and honesty.

Cultural Marxist: An educated Liberal (see above) in a public position such as academia, the media, or public policy, who writes and speaks in favour of any of the ideas listed under Liberal. This term is only useful in that it indicates that its speaker is a conspiracy theorist with an "us vs them" mentality, who is absolutely unable to judge any particular policy on its merits.

Patriot: A term generally used by flag-wavers about themselves or those they support to infer that they are righteous by association with a country's flag, and therefore all of their ideas are also right, even when directly at odds with that country's constitution. The term is useful because it identifies the speaker is a nativist who believes their national group to be superior to, and more deserving than others. Such a person can never be expected to engage in fair dealing with those they recognise as foreign.

Freedom: A term frequently used to justify rash behaviour without any balancing consideration of responsibility. The term is only useful in that it indicates its speaker desires great lattitude to engage in their preferred practices, but cares little about the right of others to do the same. Often used in conjunction with Patriot, because the combination allows nativists to grant themselves broad lattitude, while placing severe restrictions on foreigners because of 'national security' or attempts to prevent change or simply exclude foreigners.

National Security: A term used to justify rash behaviour by the powerful, irrespective of the long-term effects on a nation's peace, prosperity, and viability.

Friday, 26 August 2016

Windows 10 Anniversary Update (1607), Disk Freezes, and the Lenovo x230.

Microsoft recently released Windows 10 Anniversary Update (build 1607). It causes disk freezes on Lenovo X230 laptops (and possible data corruption).

Solution: install the Intel Rapid Storage Technology drivers from Lenovo's support site. You'll need to to this manually, because Lenovo's System Update tool won't recommend them.

WARNING: running the driver installer isn't sufficient. It just dumps the drivers into c:\Drivers. You then need to manually apply them by updating the AHCI driver in Device Manager (the readme files for the drivers explains how to do this).

Link for the 64 bit Windows 10 compatible Intel Rapid Storage Technology Drivers:

And the all important README file, whose steps must be followed if you want this to actually work:

Oh, and don't sell your AAPL stock yet, because Microsoft and the PC OEMs clearly still have quite a way to go to catch up.

Saturday, 7 November 2015

Using a VPN for online gaming when behind NAT

When to use this guide:

This guide applies if you're unable to play online games, and are unfortunate enough to have an internet connection trapped behind a NAT layer. This frequently happens in apartment buildings and on university campuses.

In my case, I was trying to play Splatoon and Mario Kart 8 on the Wii U , but they raised the dreaded 118-0516 error when trying to find/join games.

The easiest way to check if you're behind a NAT layer is to go to your router's status page and look at your WAN IP address. If it is of any of the following formats, you're stuck behind NAT:
  • 192.168.X.X
  • 172.16.X.X to 172.31.X.X
  • 10.X.X.X
These are 'private' IP address ranges that are not accessible from the public internet.

Why does NAT break online games?

Many online games need to be able to accept incoming connections from the public internet (or route incoming UDP packets, which can only be routed to a public IP address). If you're behind NAT, then the IP address issued to your router is a private address, which cannot be accessed from the public internet.

What do I do if my IP address is not a private address?

Good news everyone! In that case, your router has been assigned a public IP address. You can simply setup port forwarding or UPnP on your router to forward the necessary ports from your router to your console. The ports that you will need to forward vary by game or console. The fewer ports you can forward, the better.

Unfortunately, Nintendo doesn't specify the precise ports to forward for Wii U games - you need to forward UDP ports 1 - 65535. Putting your console in your router's DMZ will also achieve the same result, but is not recommended as it will forward all TCP and UDP ports, which opens your console up to attacks from the public internet. Forwarding UDP ports is less risky than forwarding both TCP and UDP ports. For PC games, a quick web-search will often tell you which ports you should forward. I have provided instructions to setup port forwarding on a DD-WRT router in the next section.

So I have a public IP address and want to setup port forwarding. How?

In all cases, the first thing to do is setup port forwarding from your router to your console. I believe that there are some systems that implement UDP hole punching that can allow games to work (but I've never seen one). You'll need to setup port forwarding to your console/PC anyway, so you might as well give it a try, and if it works, great!

I have all UDP ports forwarded to my Wii U. In order to do this, I first setup my router to assign a static IP address to my Wii U that is outside of the range of addresses that my router's DHCP server assigns (which is to

Then I setup my router to forward the necessary ports to that IP address as shown.

At this point, try to connect to an online game. If it works, great! You're done! If it doesn't work, keep reading.

Using a VPN for Gaming.

If you've gotten to this point, your router is unfortunately not accessible from the public internet, so no games for you!

However, there is a way to get a public IP address for your router so that it can be accessed from the internet. That is to sign up with a VPN provider who offers dedicated IP addresses. I personally use PureVPN. Note that you need to ensure that you have a dedicated IP address assigned by your VPN provider, because otherwise your router will still not be addressable by the public internet.

You will need a router that supports connecting to a VPN service (i.e. has a VPN client); a lot of routers don't support this with the built in firmware. I was using a 3 year old Linksys e3200 which didn't support this (and whose 5GHz functionality is unsupported by DD-WRT and poorly supported by Tomato), so I bought a Netgear R7000 and installed DD-WRT on it.

Common VPN client types are PPTP and OpenVPN. PPTP is much easier to configure but less secure. I'm personally using PPTP because the traffic I care about is already encrypted, and it's more secure than my previous connection to my building's network anyway (if a nefarious person on my building network wanted to sniff my packets before, nothing was stopping them).

Any decent VPN provider has tutorials for configuring your router; once it's setup and connecting to a VPN with a dedicated IP address, then everything should just work.

Things that break with VPNs.

I've been using this for several weeks, working from home over it, and routing all my home network's traffic over it. Performance is indistinguishable from the old connection.

There is one thing that I've found that doesn't work, and that is Hulu Plus. That's because those goons are actively checking for connections from IP ranges known to be used by VPN providers, in order to prevent foreigners from daring to tunnel into the USA and pay them money for their service. Simple solution: go to the Hulu web-page, and shut down the account. I was giving them money, but not any more; how I configure my internet is none of their business, so good riddance.

Monday, 22 December 2014

Ripping encrypted DVDs with HandBrake and libdvdcss-2.dll on Windows

I am writing this post because most of the instructions out there on the web for doing this are now wrong because of changes in Handbrake.

These instructions are for Handbrake (64 bit) Windows.

First, install Handbrake. You can get it from .

Second, download libdvdcss-2.dll from (32 bit version) or (64 bit version). The version that you need depends on whether you installed the 32 or 64 bit version of handbrake.

Once it has downloaded, move the libdvdcss-2.dll into your Handbrake install directory (usually C:\Program Files\Handbrake\).

That's it! You should now be able to run handbrake and access encrypted DVD content.

So what's wrong with all the other instructions out there on the web?

First, their links to libdvdcss-2.dll are broken; they all have an extra 'pub' element in the URL that no longer exists.

Second, they tell you to rename libdvdcss-2.dll by removing the '-2' from the filename. This no longer works.

Wednesday, 1 January 2014

The Decline in US Coin Quality (with comparison photographs)

This is a post that only obsessive-compulsive folk like myself could care about, so bear with me. If you simply don't care about this kind of stuff (like normal people), escape to Walmart.

I have been in the US for over 2 years, and in that time I have noticed that coins minted before the mid 90's are of substantially higher quality than those minted subsequently. The old coins appear to be more '3 dimensional', and details are much finer. The difference is such that if you gave a person in the 1970's a recent coin but with a date from the 70's, I suspect it would be outed as counterfeit.

Conveniently, I have a decent camera with nice prime lens and manual focus, and can show a couple of examples.

First, let's compare a 1961 penny to a 2013 penny (by the way, I dislike pennies and think their continued production is exemplary of much that is wrong with the US government, but that's another issue).

The 1961 penny pictured below was received as change. It has been in circulation some 52 years and has bits of black crud stuck to it. It's an alloy of 95% copper, 5% tin and zinc. Observe the depth of the writing, and the very clear depth of the Lincoln bust.

Now let's look at a 2013 penny (below). It's a 99.2% zinc + 0.8% copper alloy blank, plated with 100% copper, resulting in a final composition of 97.5% zinc + 2.5% copper.

Comparing the two, I might think "Did I mess this photo up?" Apparently not, as you can see the very very tiny shadows cast by Lincoln's almost completely insubstantial bust, and that the bottom half of the coin is clearly in focus.

OK, so we all know that pennies are worthless, and that modern ones are basically copper plated chum. Perhaps the mint is cheaping-out on them, knowing that most of them are immediately thrown away.

How about Kennedy half-dollars? Below is an image of a 1971 Kennedy half-dollar. Note the pleasing depth of the US Great Seal.

To compare, below is a 2000 Kennedy half-dollar.

Yuck... What... Is... That? Yes, I know the 2000 coin is more worn because the milling is worn down, but the strike never had any depth to begin with. I also have a 1983 coin that resembles the 1971 coin.

It's not just these coins either. Quarters, nickels, and dimes also consistently show the same features. I don't have any to hand, but this effect can be very frequently seen, especially in quarters.

So why the apparent decrease in the quality of US coins? If anyone who knows how the US mint operates can comment, it would be nice to know what actually happened. Is this a cost cutting measure? Was it a design fad?

P.S. If anyone wants to know why I care about these things, it's because my parents gave me one of these:

It's not really worth anything beyond its silver bullion value, but it's a beautifully designed and made coin.

Friday, 27 December 2013

An Interactive Lambda Calculus Interpreter

Here's an interactive Lambda Calculus interpreter that I wrote back in 1997 while at Adelaide University.

It was written as a teaching tool, and allows you to reduce lambda expressions one step at a time. It can automatically choose a reduction and explain it to you, or you can manually choose the reduction to apply and the subexpression to which to apply it (by selecting with the mouse).

It's written in the latest and greatest technology for the time: a Java 1.1 application. I just gave it a shot on OpenJDK 1.7, and it (mostly) works, although it does crash occasionally. The write-up is available in PDF form at LambdaThesis.pdf. It's overlong, but provides a reasonable overview of Lambda Calculus for anyone who is interested.

Running the Interpreter

In order to run it, download and unzip it (this stuff is so old that compressed JAR files weren't well supported at the time). In order to run it, install Java and execute:

java -cp LambdaTeacher.jar LambdaTeacher

(Note that the switch is -cp, not -jar ; JAR manifests didn't exist at the time). After executing it, you can use the file menu to open defines.jar to load all the bindings.

How It Works

(Note: this section is copied verbatim from a 13 year old web-page, so you can chuckle at historical details)
This interpreter uses string (as opposed to graph) reduction, and as such is very slow. On my Pentium 233, fibonacci two takes about 20 seconds to evaluate (2013 note: it's instantaneous on my 6 core Xeon with 32GB RAM ☺). It does this so the user can reduce one step at a time, and get a feel for different reduction orders.


  • Name capture detection. When a name clash is detected, it will prompt the user to type in a new name.
  • Any reduction order can be attempted. It has buttons for normal and applicative order. Other sub-expressions for reduction can be selected using a sub-expression selection dialog, where the expression to be reduced is clicked on.
  • All reductions are explained in explanation dialog boxes as they are performed.
  • Names can be bound to Lambda expressions, using let <name> = <expression>. Names aren't removed during a reduction unless the expression they refer to is modified in any way. Users can select names for removal at any time.
  • Files with definitions (name - expression bindings using the let syntax) can be read in.
  • Error messages for invalid expressions - it attempts to tell you (kind of) where the expression went wrong. If you are reading in a file, it tells you what line the problem occured on.

Non Features:

  • Single threaded. This means that while interpreting, you can't interact with the current application. If you give the interpreter a large or non-terminating expression, you'll have to kill it (Control C on the Java console should do the trick). I know this isn't user friendly, but if you're learning lambda calculus, you should be able to kill a looping process. 


The syntax is:
<Prog> ::= <Expr> | let <Variable> = <Expr>

<Expr> ::= <Variable>
         | <Number>
         | \ <Variable> . <Expr>
         | ( <Expr> )
         | <Expr1> <Expr2>
         | +
         | -
         | *
         | /

<Variable> ::= Any string of letters.

<Number> ::= Any integer.

Source Code Availability

It's available here. The GNU Public License V2 applies. See for the GPL V2.