Apollo: Ground Control to Major Tom

I’ve just got in from work, poured my self a glass of red wine, put The Misfits on and then turned my stereo up.

So it could be the wine talking… or the punk rock… but am I the only person who isn’t excited by Apollo? ‘Cos based on my RSS feed reader, I’m kinda thinking I am.

Tomorrow I will down load the preview realise and see what I’m missing… but until then I choose to remain bemused by the attraction of web developers making desktop apps.

I’ve just got this image of all regard to taste and usability being replaced with a 10 pixel by 10 pixel dancing banana.


[EDIT: I’ve just watched a video demo and get it now… It’s Adobe stopping copying Sun’s Java and start leap frogging it. I get why people are so excited now, I think my scepticism was based around the fact that web applications don’t function like desktop applications but this is a tool for making desktop applications not repurposing existing web apps. I’m still worried about that dancing banana though, but who isn’t.]

An evening at lfpug

Last night I went to a meet-up of the London Flash Platform User Group with my boss in an effort to try and recruit a couple of flash developers.

I had a very interesting evening. I saw the latest build of papervision3d which is an open source 3D engine for Flash written purely in ActionScript, and I’m here to say that it rocks! A few years ago, back when I was screwing around with Flash, I got this distinctly doggy cloud of text to spin around using trigonometry and I thought that was pretty impressive but now we’re talking Quake II models and importing stuff from 3D Studio Max and Maya at run time! Amazing stuff…

The other thing that stuck me was how far, Flex aside, Flash has come in terms of a development platform as opposed to an animation tool. With a little Java experience I was easily following along with the talk on how to make your own SWCs (reusable components) and extending stuff in Flex.

The more I look into this technology the more I am impressed.

Installing swfmill on Red Hat Enterprise Linux

Today I had to compile and install swfmill from source on Red Hat Enterprise Server and all did not go according to plan!

I was getting this error:


checking for XSLT_LIBS...
Package libexslt was not found in the pkg-config search path.
Perhaps you should add the directory containing `libexslt.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libexslt' found
configure: error: Package requirements (libexslt) were not met.
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively you may set the XSLT_CFLAGS and XSLT_LIBS environment
variables to avoid the need to call pkg-config. See the pkg-config
man page for more details.

The missing library (’libexslt.pc’) proved allusive, neither locate or find would tell me where it was, so I started a game of Google the RPM.

Needless to say I ended up having to download the source code and compile it my self. You can get it from ftp://xmlsoft.org the tar file you need (at the time of writing) is called libxslt-1.1.19.tar.gz and is dependant on libxml2-2.6.27.tar.gz being installed. Compiling them is very straight forward:


tar -xzf libxml2-2.6.27.tar.gz
cd libxml2-2.6.27
./configure
make
make install

cd ..
tar -xzf libxslt-1.1.19.tar.gz
cd libxslt-1.1.19
./configure
make
make install

Then a quick updatedb and another locate libexslt.pc should tell you that our missing file is in /usr/local/lib/pkgconfig/, so before you try and recompile swfmill you need to set an environment variable to tell the configure script where the missing file is (obviously put in your own path if it is different):


PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
export PKG_CONFIG_PATH

After that it’s as easy as:


cd swfmill-0.2.11
./configure
make
make install

And your done.

DoggyChat: Flash Communications with a Perl Socket Server.

In an effort to keep our software projects relatively free of proprietary filth, we’ve been discussing writing a socket communications server in Perl as a more flexible (and less filthy) alternative to Macromedia/Adobe’s Flash Communication Server.

While there are plenty of Open Source projects to do this (and more), I wanted to get down and dirty with the code to see what the deal was… Google found me this example, which details how to write a chat server that uses a Flash front end and a Java servlet to handle the communications. Now this is all good, but loving a challenge more than Java, I decided to write (or rather modify some ’sourced’ material) the equivalent in Perl. And here is what I came up with:


#!/usr/bin/perl
$port=9999;
$linelength=1000;

require 5.002;
use IO::Socket;
use IO::Select;

&initialize;

while(@ready = $select->can_read) {
	for $socket (@ready) {
		if($socket == $listen) {
				&connection;
			} else {
				$socket->recv($line,$linelength);
			if ($line eq "") {
				&disconnection;
			} else {
				&broadcast($line);
			}
		}
	}
}

sub initialize {
	$ARGV[0] ? $port=$ARGV[0] : $port=$port;
	$nullstring="\000";
	$listen = IO::Socket::INET->new(Proto => "tcp",
					LocalPort => $port,
					Listen => 1,
					Reuse => 1)
				or die $!;

	$select = IO::Select->new($listen);
	print "******************************\\n";
	print "* Starting Doggy Chat Server *\\n";
	print "******************************\\n\\n";
}

sub connection {
	$new = $listen->accept;
	$new->send('Welcome to Doggy Chat!
‘);
	$select->add($new);
	print $new->fileno . “: connected\\n”;
	&numclients;
}

sub disconnection {
	print $socket->fileno . “: disconnected\\n”;
	&broadcast(’Doggy ‘ . $socket->fileno . ” disconnected. “);
	$select->remove($socket);
	$socket->close;
	&numclients;
}

sub numclients {
	$numofclients=$select->count()-1;
	if ($numofclients > 1) {
		$clientstext=”There are now $numofclients doggies
“;
	} else {
		$clientstext=”There’s only one doggy!
“;
	}
	&broadcast($clientstext.$nullstring);
}

sub broadcast {
	for $eachsocket ($select->handles) {
		if ($eachsocket==$listen) {
			next;
		} else {
			print “Sending “.$_[0].” to client “.$eachsocket->fileno.”\\n”;
			$eachsocket->send($_[0]) or do {
				&disconnection;
			}
		}
	}
}

So the above Perl and the Flash front end from this example will have you chatting in no time… Hopefully this might point the way, and it isn’t the proprietary way!