Can't access wp-admin on my blog

Aargh! I don’t seem to be able to get past the wp-login.php page. It keeps redirecting to there.

I am logged in, and using the correct password, but I can’t get through to the admin pages.

I can post entries via ecto, too!

Update: ck has a fix:

Prolog v Java

One program I tend to get around to writing in any new language I learn is a Sudoku solver. I originally wrote one in python, that solved every puzzle I could throw at it (although it had to guess and backtrack on failure in some cases).

Recently, I wrote one in Java. It was three classes plus a Driver/Main class. It took hours to write (at least the whole length of Phar Lap), and eventually it worked. I spent quite a while fixing up all of the syntactic errors I make in Java after programming in better languages again.

I then wrote one in Prolog. It was amazingly simple - it just defines a sudoku puzzle as a list of lists (each of which is 9 elements long), states that each element in each of the lists must be unique, and that each element in the first position of each list (columns) must be unique. Next, it states that each 3x3 grid must be unique, and that each element must be an integer of range 1-9.

That’s it. Solved.

My unique/1 predicate takes a list of items, and succeeds only if each item in the list is unique. This is simple:

  1. An empty list is unique.
  2. A list of one item is unique.
  3. A list of the form [A,B|X] is unique if A and B are different, and [A|X] and [B|X] are also unique-lists.

I also use a predicate that indicates a variable should be of the value 1-9, it’s possible to use advanced techniques and something called “Domains”, but I couldn’t get this figured out.

The only trick then is in the definitions. The simplest to understand, but messiest is to define the elements in the sudoku puzzle as each having unique names ([[A1,A2,...,A9],[B1,...]] and so on), and then passing some lists to unique, ie all ‘Ax’ elements, all ‘X1’ elements, and so on.

The coolest thing about Prolog is that you don’t need to say how things will happen, but just what the desired outcomes are. This can be dangerous - it’s rather easy to write something that will be executed in a ridiculous amount of time, so you often need to think about how to narrow the search space as quickly as possible. In Java, I needed to have methods that would remove elements from a possibles list, and then check to see if there was only one element, in which case it’s the actual value that belongs there, and so on. This is all error-prone code, wheras Prolog’s backtracking does all of this for you.

The biggest benefit is that in a puzzle that is fiendishly hard, Prolog will still come up with a solution, wheras some other languages, using the algorithm I defined above may not. And, in Prolog, you will automatically get multiple solutions to a problem if they exist.

Can you tell I love Prolog?

Using Photographs to Enhance Video

Using Photographs to Enhance Videos of a Static Scene.


Via Daring Fireball.

Navicat now does Oracle.

According to an item that just popped into my feed, there is now a version of Navicat that connects to Oracle DBs.

Cool. I like Navicat.

Panasonic, your logic is full of fail.

Heard on a TV ad just now:

Because the Olympics are filmed using Panasonic video technology, then it makes sense that you watch them on a Panasonic Plasma or LCD TV.

Clearly, someone at Panasonic can’t figure out that tricky logic stuff.

“Because you shit food out of your arse, it only makes sense that to eat it you should shove it up there too!”

Idiots surround me.

I’m currently sitting in a café in King William Road, trying to get some coding done. I’m not achieving much, and there’s one simple reason.

There are a pair of absolute fuckwits sitting next to me, and they haven’t stopped talking for about an hour.

The guy, very gay, seems to be a drama teacher. If you are Australian, think of that show “Summer Heights High” - it’s Mr G. all over. I mean seriously.

The woman apparently has something to do with the arts - I haven’t been able to figure out exactly what skills she has, as whilst she’s been yapping non stop she hasn’t really said much of substance.

The last straw was when they were talking about some drama awards night, and she called it “wanky”. I was about to lean over and explain to her about irony - she hasn’t stopped wanking for about an hour!

Pretentious idiots annoy me. I’ll put up with snobbiness or aloofness in people who have real skills or talent. But these people are driving me nuts. I nearly bought my headphones, I so wish I had.

Aha! She’s a drama teacher too!

“It’s just like Pulteney Grammar all over again!”

I’ve never wanted Jaq to hurry up and pick me up from the café so much!