Please visit my new campsite listing site

Archive for March, 2009

Citizen’s band by SFA

Monday, March 30th, 2009

Just a quick post to keep on providing an mp3 download of Citizen’s Band, that rare hidden Super Furry Animals song that’s almost impossible to rip from the Guerrilla CD. The old link from my old blog doesn’t work any more, so it’s shifting to here, where I can host it myself.

Here’s the track. Go ahead – knock yourself out, kiddo.

On the other hand, if you’ve never heard it, have  a listen:

Audio clip: Adobe Flash Player (version 9 or above) is required to play this audio clip. Download the latest version here. You also need to have JavaScript enabled in your browser.

Front paged on Google…

Monday, March 30th, 2009

for “Where’s the maths”


Also somebody got here, probably on a serious search, looking for an analytical function for xor gate.

Finally, this is an unrelated rant, but I just found out from a guy I was hoping to sublet from has had to turn me down as the girls he lives with wanted another girl. This despite the fact that they hadn’t met me, and he told me the only girl to view the room seemed a bit weird, and he would recommend the girls plump for me.

Well screw them* – I hope they get a bunny-boiler.

* I’ve been watching rather a lot of South Park lately. For free. online. legitimately. What nice people.

A nerdy CSS question

Monday, March 30th, 2009

This blog has taken a ridiculously nerdy turn of late, and the nerdiness continues right here.

It’s a simple, though nerdy question:

I write cascading stylesheets, for which CSS is an acronym. What is the language I use in these cascading stylesheets? Surely not CSS, for that is the name of the document. For example in PHP, you write a PHP script, you don’t write a PHP – there’s a subtle but important difference in the names. Even in the one programming language that could somehow bridge the gap, Javascript, you still write a javascript script.

It gets nerdier

Quoting from the W3 site:

This short tutorial is meant for people who want to start using CSS and have never written a CSS style sheet before.

In it’s un-acronymed form:

This short tutorial is meant for people who want to start using cascading stylesheets  and have never written a cascading stylesheets style sheet before.

This would indicate that a cascading stylesheets style sheet is a type of style sheet. But a novel is a kind of book, though it isn’t written in ‘Novel’, so it doesn’t enable us to deduce that the name of the language of style sheets is, somewhat clumsily, Cascading stylesheets.

I’m not seriously suggesting that CSS does of the utmost importance need a proper name, but I think the web design community could easily adopt a three word name with the same acronym.

I say easily, but I’ve failed to think of one. I think it shoudl have selectors in it though.

Logic 2.1.1

Tuesday, March 24th, 2009

Further discussion on the logic functions with my good friend Matt, specifically regarding what they could mean, has landed on the idea that a value of, say, 2 or 3 for the truth of a statement X could equate to “X is sooooo true”.

Bearing this in mind, Matt wasn’t happy with the shape of the graph of =>, and further thought has led to the following necessary conditions for a function =>(x,y) (I’ll call it f from now on for ease of typing) which works well with the notion that something can be soooo true:

  • f(x,1) –> 0.5 as x –> infinityx (so if something very true implies something else is true to a normal level, this means the implication is less a preserver of truth: more a diluter (though I set the asymptote as 0.5 as we thought it shouldn’t get closer to falsity than to truth)
  • f(x,0) < 0 for all x > 1 (if x gets more true but y is still not true, then teh implication is, again, less of a truth preserver, though this is debatable. Maybe eqality with zero would be more appropriate.)
  • f(1,y) –> infinity as y –> infinty (similar to the case where x varies and y = 1,  if 1 is immensely true despite x only being a little bit true then the implication is very strongly true)
  • f(0,y) = 1/y for all y > 1 (the thinking here being that if y contiinues to get more and more true, despite no change in x, then the link between y and x should accordingly be weakened)

Toolbarize incompatible with wordpress 2.7

Monday, March 23rd, 2009

I’ve just spent a  little time adding some useful sounding plug-ins (initially prompted by wanting an effective backlinking plug-in), one of which was the WordPress Automatic Upgrade plug-in. So, with that installed I finally got around to upgrading wordpress and, to both my delight and dismay, wordpress has changed its admin screens layout since the last version I had (2.3 I think). It’s a much better design, but it does break toolbarize. In fact, it renders it unneccessary as the layout is much more user friendly and screen-space efficient, with scrolling not being no nearly so disruptive to the postying process.

However, it has inspired me to write a plug-in which makes perfect use of screen space by hiding things I very rarely use… or putting them in the footer. I could even make it so users can customise which screen elements are hidden.

logic 2.1

Monday, March 23rd, 2009

I have, as promised, found a better form for XOR:

  • XOR(x,y) = x + y -2xy

As I sit here chomping on a chicken wing, I can’t help but feel a touch of disappointment alongside the inevitable satisfaction at completing my mission. The previous solution – XOR(x.y) = (1-xy)(x + y) – was, I feel, more elegabt; the fact we were dealing with x/y symmetry, and that x and y could take only the values 1 and 0, seemed to almost leap out.

Talking of symmetry – I’ve just realised that I didn’t cover x => y, the only asymmetric elemental* logical operator.

So here, deduced by trial and error is the formula:

  • =>(x,y) = xy + 1 – x

I lied though. Because, of course, => is not as elemental as one would hope, so:

x => y <–> NOT (x AND NOT(y)) = NOT(x AND (1-y)) = NOT(x(1-y)) = 1-(x-xy) = xy +1 -x

Thus demonstrating the usefulness of being able to represent logical operators analytically.

Apple: user friendly? Pah!

Monday, March 23rd, 2009

Just a quick post to say how annoying I find it that in iTunes it will still only let you backup to DVD or CD – not external hard drive, despite these being commonplace nowadays. iTunes is, in my humble opinion, way ahead of the competition in most aspects, but this is one feature that really needs an update…

…like picassa did recently. You can back up to anywhere. And it’s not even all that important with picassa as a) it’s not a hodge podge of proprietary document management files; and b) it stores its metadta files piecemeal, alongside the files, so that as long as you move them folder by folder, you can back up your photos effectively just using ordinary copy and paste.

Logic 2.0

Saturday, March 21st, 2009

Now, somebody has probably already done this, but I’ll throw in my twopenneth anyway.

Yesterday morning I woke feeling strangely alert, so decided to do some maths. Namely, finding analytical functions of the real numbers taht agree with the logical operators NOT, AND, OR and XOR on the values of 0 and 1, and here they are:

  • NOT(x) = 1-x
  • AND(x,y) = xy
  • OR(x,y) = 1-(x-1)(y-1)
  • XOR(x,y) = (1-xy)(x+y)

Now, the above begs a few questions

  1. Are they any use? Well, I think so. They can be combined and recombined to form an polynomial function LP: {1,0}^n —> {1,0} to represent any logical proposition, where n is the number of elementary propositions. So given the truth or falsity of all these propositions the truth or falsity of the compound statement can easily be deduced
  2. Are these the simplest analytical functions that agree with the logical operators on 1 and 0? Probably NOT, OR and AND are; they’re all quadratic or less. But XOR is a cubic expression, which is unexpected. I can’t help thinking a hyberbolic parabola – quadratic – with the relevant constants shoudl work. Will have a think. *edit – success!
  3. Can they be extended over the reals? Well, yes – they’re analytical! But a good question is ‘What is the real world interpretation of a function like this?’ Extending the factorial function over the reals has proved useful, but would extending logic to things being doubly true, trebly true, negatively true, make any sense? Search me. The functions above could withstand the insertion of a few square/cube roots here and there, thus making the graphs more linear, and maybe they would be more likely to lend themselves to a real world interpretation. But the shapes of the graphs for the non-rooted functions (and probably ones with roots taken) (see below) defy interpretation I think.
  4. What do these functions look like?

jNice styled forms fix for select change event

Saturday, March 21st, 2009

I’m working so can’t be bothered writing out in full, but in case anyone else spends hours trying to work out why their fancy looking jQuery select boxes don’t seem to have a change event, add this line near the end of the selectUpdate function, just before return false;


Toolbarize WordPress Plug-in

Saturday, March 7th, 2009

Well – here it is. As promised earlier, my first ever software release into the open source world is an adaption of Eric Meyer’s MW adminize plug-in to give the wordpress admin interface a fixed toolbar along the top of the screen and so that the publish post box is always visible on the right. Scrolling up while posting to your blog can finally be consigned to the past.

The plug-in works on all modern browsers, (Safari, Opera, Firefox, Internet Explorer 7, and almost certainly all others with good CSS support). It will however leave everything unchanged in ie6 as it has poor support for position:fixed.

Here is the download:

Simply unzip it into your plugins folder – no additional setup required.

Visually, I’d like to rehash how the publish box appears – it doesn’t sit well either where it is now or lower down, so a redesign may be in order. Also, I need to work out how to add some javascript to better resize the upload media screen (at present the close button is hidden, but you can just click off the screen to make it disappear.

Please let me know if you have any suggested improvements