Month: September 2009

Irrlicht 1.6 Released

Posted by – 2009/09/30

So, we finally released Irrlicht 1.6. This release has lots of bug fixes and plenty of new features for you to sink your teeth into!

I’m sure I’ve missed out lots of stuff, but here’s a summary of the most interesting new features…

More…

Killing copyleft for the good of the public domain

Posted by – 2009/09/26

Richard Stallman, GNU philosopher and father of the free software movement recently wrote an article about how the copyright reforms which by the Swedish Pirate Party want would damage free software. Stallman quite rightly argues that shortening the term of copyright to five years would cause copyleft protected source code to fall into the public domain, where it would be snapped up by proprietary software developers and embedded into non-free software, removing the freedoms which free software aims to protect.

The same wouldn’t apply the other way, companies could keep their source code a secret and unless leaked, it would never enter the public domain. rms proposes two solutions, firstly that the term of copyright be extended for free software. Piratpartiet don’t like this idea, for the obvious reason that it causes copyright to be extended for a special case, and I agree with them. His second solution is to put the source into an escrow, after copyright expires the source code is released. I don’t like this either, it means a separate government body for each country which looks after the source code, and if I submit obfuscated source then nobody will find out until five years later.

My solution is simpler. Copyright is supposed to be a short term monopoly given to authors, after which time the public reap the rewards in the form of new works in the public domain. This doesn’t apply to precompiled binaries, after 5 years binaries are out of date and next to worthless. Even if the term of copyright was 25 years from publication, binaries from the 8-bit days are only useful today if you want to play Chuckie Egg on your mobile phone.

So, I think we should remove copyright protection from any binaries which are released without source code. If authors want the privilege of a monopoly over the computer programs they publish, then they must also publish the source code.

Combined with a shorter copyright term this may kill copyleft, but granting more freedoms across the board is IMO better than restricting freedoms in order to protect them.

Songs in code

Posted by – 2009/09/15

I’m a bit late on commenting on this Twitter meme as it’s over a month old, like all memes it’s a variation of something as old as the Earth and just recently revived. The concept is simple, just write a song lyric or title as a code snippet, set it as your status and share with others by linking the #songsincode hashtag. That’s all.

Someone’s even made a database of all the posts where you can vote on the entries. Most are boring and just consist of lyrics padded out by punctuation, but there are some quite creative, non-obvious ones which use programming constructs to infer the lyrics. Here’s mine

(Hover over the links for spoilers)

class BillieJean : public girl
{ 
  int i; 
  relationship lover;
public: 
  BillieJean(relationship &me) 
  : lover(!me), i(1) {} 
};

spoil

body() { 
  print '<body>' . body() . '</body>'; 
} 
love() { 
  body();
}

spoil

/* mon = 255; tue=wed=0xaaaaaa; */ 
if (friday)
  love.insert(me);

spoil

GET /back.html HTTP/1.1
 
HTTP/1.1 301
Location: /you_once_belonged.html

spoil

Some of my favourites (with slight edits):

video$ kill -9 `ps -ef | grep radio*`

by brozow

int main() {
  return -1;
  get_Satisfaction();
}

by stevecooperorg

$live = ($you==true) ? false : false;

by o_Freud_o

$i = '<HTML><HEAD></HEAD></HTML>';

by whybird

class City : Rock, Roll {};

by alexmdac

try {
  get(WHAT_YOU_WANT);
} finally {
  get(WHAT_YOU_NEED);
}

by rickgrundy

/dev/null << shout();

by plikrg

PHP file list using mod_rewrite

Posted by – 2009/09/14

I’ve noticed that most of the traffic to this site is actually people visiting my permanent and temporary file dumps, which until today were literally a bunch of files dumped in a folder. DreamHost don’t keep my logs for over 30 days and I’d like to incorporate my file dumps into my Piwik stats, so I made a nice fancy file list in PHP. It has nice looking icons courtesy of famfamfam, though may move to stdicon in the future.

Some caveats:

  • The file list currently tracks directory views (via the template) but not yet file downloads, as that requires a Piwik plugin that isn’t final so I haven’t installed it, adding it should be trivial though.
  • As requests are passed through PHP using mod_rewrite it will result in long running scripts on your server, which may upset your shared web hosting provider.
  • Scripts are not yet excluded by rewrite rules! You won’t want to keep other scripts containing sensitive information in dirs under the path.
  • Access to files and folders beginning with “.” will be blocked.
  • It only works on Unices, not Windows servers as they don’t have the “file” command to get the MIME type.
  • You’ll obviously need an Apache installation with mod_rewrite.

To install it, just copy index.php, .htaccess and .filelist/ to the directory where you store your files. You can get the script (without icons) from SVN.

Lexx Season 4 on DVD

Posted by – 2009/09/12

I don’t buy many DVDs. I tend to focus on things of exceptional quality, which, let’s face it, most films and TV series are somewhere between mediocre and crap. However, I do like to buy cult classics which most people haven’t heard of so I can introduce friends to these rare gems. One fantastic example is Lexx, a strange and sleazy comic science fiction series which is camp to the point of being homo-erotic, it boasts terrible acting, outrageous plots and the most sadistic bad guys ever to grace television. I mean “grace television” in the broadest possible meaning, as it was originally broadcast on Channel 5 at 3 o’ clock in the morning. That’s how popular it is.

I bought the first 3 seasons many years ago after downloading them via Morpheus, but the final season never got a UK release. However, I just found season 4 on unencrypted (region 0) DVD at cd-wow for £15!  This is only for hard-core fans, the show declined after the second season. If you’re going to watch it, get the first season and the Mantrid plot of season 2.

Anyway, thanks to this unencrypted worldwide release, not only will the publishers finally get paid, but the complete set will now proudly sit in my small but refined DVD collection.

Some fugatives may try to trick you

Remove junk words from Samsung predictive text dictionary

Posted by – 2009/09/11

I couldn’t find anything on the web about this, so I’m posting it here:

Say you’ve accidentally added a junk word to your Samsung phone’s T9 dictionary, and you want to remove it, this can’t be done without resetting the phone to factory settings. Nobody wants this.

However, if you repeatedly type the same word over and over again and select the correct one, it will eventually adjust the priority. New words start with a priority of 5 more than the other words in that word group, so just select the word over and over again and don’t type the new one.

Gay;Icy;Hay;Haw;Gaz,
Gay;Icy;Hay;Haw;Gaz,
Gay;Icy;Hay;Haw;Gaz,
Gay;Icy;Hay;Haw;Gaz,
Gay;Icy;Hay;Haw;Gaz…

I’m respectable again!

Why I won’t be joining the Pirate Party UK

Posted by – 2009/09/11

When I discovered The Pirate Party UK a couple of months ago, I thought it was going to be exciting and revolutionary new party for the people of the Internet. I completely agree with their goals, to drastically shorten the term of copyright, add fair use clauses to UK copyright law for personal copying, reform the patent system, abolish Crown Copyright, put an end to the evergreening of medical patents, prevent excessive monitoring and surveillance by companies and government and to promote freedom of speech and expression.

However, it turns out they’re just like the other parties. Here’s why I won’t be joining the PPUK any time soon:

After a Telegraph blogger made a reference to some childish remarks posted about Peter Mandelson which could be criticised as homophobic, PPUK’s leader Andrew Robertson performed a typical knee-jerk-reaction and posted an article stating that homophobia will not be tolerated in (the) party. This upset me, if I want to poke fun at Mandy for being gay then that’s my business, fascists. I can understand that the higher echelons of the party should be held to standards of political correctness, but to force ordinary members to adhere to standards of political correctness while not representing the party, when freedom of speech is a core value of the party, just stinks of hypocrisy. Whatever happened to I disapprove of what you say, but I will defend to the death your right to say it?

Another freedom of speech issue is that prominent members support the Obscene Publications Act and the new ban on cartoon pornography. If perverts want to write stories of sexual mutilation and murder, even if they include sex acts on babies, then this should be none of my business. I’d like to draw a lesbian stick-girl orgy set in a college, but these oppressive laws prevent me from exercising this freedom.

You'd better clear your cache just in case!

Finally, and this is the worst problem with PPUK, they have removed all political discussion from the public section of the forums, which means you have to pay your membership fee to express an opinion on policies. This is a step too far, it is a thinly disguised money grabbing policy which only alienates the public and stifles political debate. So much for a new, revolutionary, Internet based party for the people.

I seriously hope that someone forms a new and inclusive party, which actually practices the policies it preaches. Until that time I guess I’ll be voting Liberal Democrats.

This [e107] page has moved permanently [to gallery2]

Posted by – 2009/09/06

If you do a Google search for some of my really old code, like my Python T9 Dictionary or XBMC IRC MP3 downloader, you’ll notice that my pagerank has been carried over to SVN and the gallery. This is because Google and other search engines take note of HTTP 301 response codes and update their links accordingly.

When I migrated from e107 to WordPress and Gallery2, I replaced download.php with a redirect script which redirects to the gallery, svn or file dumps. The script looks like this:

<?php
// lots excluded
$table['4']='http://svn.bitplane.net/misc/trunk/py/py9/readme.txt';
$address = 'http://bitplane.net/';
 
foreach ($_GET as $i => $value)
{
  $index = explode('_', $i);
  if ( isset($index[1]) && isset( $table[ $index[1] ]) )
  {
    $address = $table[ $index[1] ];
  }
}
 
// send 301 (permanent redirect)
header("HTTP/1.1 301 Moved Permanently");
header("Location: " . $address );
?>
<html><head></head><body>
This file has permanently moved <a href="<? echo $address; ?>">here</a>
</body></html>

So when you try to view PY9, you’re redirected to the new location. There’s no excuse for 404 errors when you move your site around, if you care about keeping the web up-to-date then please use a redirect script!

PISG is up again

Posted by – 2009/09/04

Now that I have a reliable shell, #irrlicht once again has an eggdrop bot, which will be useful because we haven’t had any way to add new operators for at least two years. The bot is logging and there’s a cron job to upload PISG output to the stats page. So anything you do say will be taken down and may be used in evidence against you…

bitplane also makes sailors blush, 0.3% of the time.

Oh, shiiii…