Skip to content

{ Author Archives }

Reading News in the future!

Today the RSS feed reader I use called Liferea displayed something very strange. I’ve included a screenshot for you all to see.Yay for numbers wrapping around!


Liferea Bug

Summer of Code Woo!

As everyone should know by now, Thousand Parsec got accepted as a Google Summer of Code.

It’s been very hectic, but a load of fun. This graph shows how much extra traffic the SoC has produced. Our IRC channel which normally has about 9 people on it has had around 20.

I’ve been really busy commenting on applications and introducing the newbies. It’s really been a lot of work but I think it will be worth it in the end. The amount of progress which could be made in the 3 months SoC runs for is really huge. A $US 4500 payment is also a good incentive to actually finish what you said you would too.

We have 9 application so far, of which 8 are of very high quality. I would really like to see 30 applications in total, however being realistic we will probably only get around 20.

I want a Cool Desktop!

I upgraded my laptop to Feisty this weekend to see if there was anything good. One thing I have been hoping for is to get Beryl running on this laptop.

I tried a couple of times to get it working, however it starts of fine and then goes down hill. It just seems that my graphics card which is an evil Intel Extreme 855 just isn’t fast enough.

There are two main reasons I want Beryl,

  • The Scale Effect, this is where you put your mouse up in the top corner and all your windows are laid out so you can easily select the one you want.
  • Task Bar window previews, this is where you mouse over a task bar item and a little preview of the item appears. This again makes it easy to switch tasks.

There are also two “bugs” which prevent me from using beryl even if it worked.

  • I have an auto hide gnome panel on the right hand side of my desktop. I use it to display “status” about my computer and my notification area is also there. This panel doesn’t pop-up when Beryl is running, it appears to be caused by the edge switcher which allows you to rotate the cube.
  • I also use the Deskbar Applet a huge amount. It’s really handy to type Ctrl-F3 and get a box you can use to do all sorts of things. (I use it mainly as a glorified run box).

I have to wonder however, these features shouldn’t really need a 3d desktop. For live preview they would, but I don’t really care about seeing my Video’s or 3d applications running while I’m just trying to find them. I guess it’s comes down to, 3d hardware is cheap, programmer time is not, hence it’ll only be done in 3d.

On a side note, I do like a bunch of new features in Feisty,

  • Suspend is fast again! It takes less then 3 seconds to get back to my desktop when coming our of Suspend to Ram. Previously it would take up to a minute!
  • New gaim is cool. A lot of the small annoyances I had with the gaim in Edgy have been fixed.
  • It boots faster. Not that I reboot often, with Suspend to Ram I hardly ever reboot.
  • Automatic Codec downloads. Totem will now ask me to install the correct plugin packages to play media it can’t play.
  • Cleaner default theme. The default theme for gnome is that little bit nicer and cleaner.
  • Newer Liferea.
  • Ephiphany has Titles in the URL drop down.

Overall, it’s not a major change, just a continually progress towards perfection.

eagle2geda Symbol Converter

Well, after the last post I thought I would give the Eagle to gEDA converter a try. At first I thought about reverse engineering the Eagle format and then output the result. This would have the advantage that you wouldn’t need to run Eagle to do this. I decided that this would be too much work and was about to give up, but then I remembered that Eagle has quite a good scripting language called ULP. About 2 hours later I have this script which converts “symbols” in an Eagle library to a gEDA symbol. As this seems so easy I may continue and see if I can make a converter for a complete Schematic and PCB. I’ve attached a picture of a symbol in both gschem and Eagle at the same time.Hope other people find this useful too. Component in Eagle and gschem

Eagle for PCB

PCB Board for my Honors Project

For the last 3 days I have been working on routing the Honours project. For the design I use CadSoft Eagle. However, it’s been annoying me quite a bit.Here is just a shortlist of things,

  • You can’t change pads unless you modify a library. At my Uni they use a rivet system for doing plated through holes, these means that the holes and pads have to be a certain size as you have to solder the rivets to the pads. This means that you often want to change a hole and pad for a particular instance of an IC so that it can have a rivet put in it.
  • Polygon Pours can not be put in “outline” mode. This makes it quite annoying, as you want to put in the GND plane first so it removes all the GND airwires, but then you are constantly using the “rip-up” command so you can see where you are putting signals.

I’m thinking of moving to gEDA because it’s free software, I would no longer be restricted with what I do. However, it’s quite hard to use and doesn’t come with the extensive libraries that Eagle has.

I’m thinking that I’m going to write a ULP script which converts EAGLE stuff to the format used by gEDA. We’ll see what happens.

Graphical Programming?

I spent today at a “conference” called NI Days, which was really just a day long pitch by National Instruments about their LabView software. It was however quite interesting, the two parts which caught my attention where the “graphical programming” and the “dll importer”.

The graphical programming worked by creating graphical boxes (which represent functions) and then wiring input and output together. The system looked like a very good for doing parallel and concurrent systems.

The problem with our current programming languages, like Python is that it doesn’t scale well, both in performance and code development time, to multiple processor and concurrent systems. Things like stackless and greenlets are attempts to make this much easier.

The problem with these “solutions” is that when using their system is then very hard to visualise where data is going and what critical paths exist (IE Where the system will block waiting for data). Graphical Programming would have a real advantage in this area. In the world of human resource scheduling, visualisation processes have long been used in the form of Gantt charts (or Gnat chart as my brain keeps making me type).

Another problem with these systems is they are based around message passing. When you want to move around and process large blocks of continuous data (such as when you are doing Software Defined Radio – which would otherwise fit perfectly into the blocked based concurrent systems) this sucks. The main reason the systems are based around message passing is because it gets rid of the problem of locks. Locking is the cause of most headaches in concurrent systems and involves horrible corner cases like “thread a has lock alpha and wants lock beta but thread b has lock beta and wants lock alpha”. By having data “flow” out of one system into another via a queue like structure (probably a circular queue for most systems) means many of these locking problems go away (as a queue is inherently lock safe).

The other thing which caught my eye was the “dll importer” which look suspiciously like how the ctypes code generator works. The importer uses the C header file to figure out how to call C code in a DLL. It then “automagically” creates the graphical elements which you then places and wire like anything else in LabView.

I think you could easily build a basic graphical programming language very quickly using some type of existing canvas (maybe Dia, Inkscape or wxFloatCanvas). It’s then just a matter of doing a ctypes (which uses FFI and gcc-xml) like system to automatically generate the graphical elements for currently existing code. You would probably want to output run on something like the Erlang VM (Erlang is a cool language with a syntax designed by retarded monkeys) so you have access to microthreads. The result would be something which should be easy to use, scales well and already has a huge amount of code which can be used.

Actual implementation is left up to the reader as I just don’t have the time to do it :/. I need to concentrate on Thousand Parsec, I may come back to it at some later date, but I doubt it. If you do end up doing something – please send me a line.

darcs almost perfect.

Darcs is a really cool SCM system. We use it for Thousand Parsec and I really like all the way it works. However there are some very annoying bugs which keep pissing me off. So now I’m going to rant about what these problems are,

Using Massive amounts of memory with Binary files
Darcs is an absolute memory hog when you try and use it to manage even small binary files. I have seen it balloon to over 700mb on a little 7mb binary file. This keeps biting me in the arse because we are using darcs to manage our web repository. It’s starting to get so bad I’m thinking of switching that repository to subversion. We have already had to convert our media repository to subversion because of this problem :-/.
Not using good terminal interaction.
Darcs is design to be used interactively. However it crashes if you send it weird control characters or other strange stuff. It also doesn’t let you use the cursor keys to change long message title and such. Currently I have to use the “add long comment” if I want to fix anything in a patch title (which is very annoying for small patches).
Darcs being written in Haskel
By writing Darcs in Haskel I am unable to try and fix the above bugs. It is also the main reason using Darcs under “alternative” operating systems (such as Windows or Mac OS X) sucks so much (getting a working Haskell compiler is a real chore). Even when you do get it working it doesn’t quite fit properly (and the console IO is even more fragile). Mathematical correctness doesn’t mean you code doesn’t have any bugs. Being unusable is very much a huge bug.

It’s starting to get to the Stage that I’m considering other SCM tools such as Mercurial or maybe even monotone.

Using Tailor – Creating Subversion Repository for Thousand Parsec

To try and get our activity rating up on SourceForge I’m in the progress of trying to mirror our darcs repositories in SourceForge’s SVN repositories.

This would also be useful for things like oholh as JLP pointed out. It might make it easier for people to track the development version under Windows/Mac as they wouldn’t need to get a working darcs version.

To do this I need to use a program called Tailor which lets you convert between a wide range of different SCM systems. It took me a while to get a combination of tailor, darcs and svn which seems to work okay.

What I ended up with is the following Darcs to Subversion Conversion script.

Each time you run it, it rebuilds the svn repository from scratch. This was useful during testing so that I could get my comment formatting correct (and fiddle with the other settings).

A ran into another problem however, to use Tailor and get nice author and actual commit date you need the special hook installed. This hook is just an empty pre-revprop-change. However, SourceForge in all their wisdom don’t have support for this yet, there is a pending change request but it hasn’t been touched in about 3 months. Here is hoping they figure out something in the near future. There have been about 20 requests if you do a search for pre-revprop-change.

Thousand Parsec Protocol Overview

I’ve been planning to try and get tp04 into draft stage for a while now. However the AI competition and RL has kept me really busy so I haven’t got time to do the draft yet. I am going to however go over some highlights of the new tp04 protocol.

Firstly, what does tp03 currently have?

Dynamic Orders
Thousand Parsec servers can define new orders and clients can automatically discover these orders and show the user quite a bit of detail about what arguments should be given to the order.
Comprehensive Design Support with tpcl
Designing things is a very important part of most empire building games. tp03 includes support for building designs out of “components”, these components dynamical describe their properties and requirements. They can be either calculated on the server or calculated on the client. It is quite possible to have components which require other components, forbid other components via either specific exclusion or by using property values.
Dynamic Resources
Resources which are used for doing things are dynamical described by the server.
Message and Board system
Support for a wide variety of messages including referencing objects related to a message (IE This message came from this object). Servers can also have both private and public boards.
Partial Design Discover
Although no server currently implements a system where as you can only discover partial information about enemy designs, this option is total supported.

The next version of the tp protocol tp04 will have a bunch of new features. It is going to be built in an incremental way based on tp03. All the highlights of tp03 will still exist in tp04.

Some of the new highlights include.

Full XML protocol specification
The protocol will be completely specified in an XML document. This will allow more dynamic languages (such as Python, Ruby and PHP) to read in the protocol document and dynamical create the correct data. This doesn’t mean our good documentation is going away (for those people who want to implement it the “hard way”), instead it will be more accurate and contain better linking, lot more useful tables and even an index. The documentation will all be generated using XSLT from the protocol XML document so it will also always be current.
Meta Protocol definition
A definition on how to talk the “meta protocol”, IE talking to the metaserver and find local games will be specified. It will be almost identical to the current protocol specified separately.
Filter Support
The protocol will support filters such as encryption and compression (or even a 32bit aligned strings filter), there will be a way to negotiate which filters to use.
Difference Support
The protocol will include (and servers will be required to support) a proper method for downloading “what has changed” lists. This will be extended from the current “get id sequence” stuff but made so it doesn’t require downloading every single ID in the universe to find out the differences.
Dynamic Objects
Like how servers can define new a interesting order types, with tp04 servers will also be able to do the same for objects. A wide variety of object properties types will exist, from Graph like properties to just plain strings. This will rapidly allow many more advanced rulesets to exist.
Old Data support
As a side effect of Dynamic Objects, object properties will be able to be “aged”. This means that if you could detect/determine the value in the past, but can’t determine the value now, the client will be able to understand this.
Multiple Instruction queue support
As another side effect of Dynamic Objects, objects will be able to have multiple instruction queues. These will allow for things like “standing battle orders” and “research queues” (and probably plenty of other things I can’t think of at this very moment).
Media support
The current “media support” is just a hack in tpclient-pywx. The dynamic objects will allow proper specification of what media should be used for objects and such.
Research support
The protocol will include support for figuring out which “Research options” are available. It will support a wide range of research methods too (from researching for a specific object, to researching in a general area).
EOT Support
There will be support for things like saying “I’m Done” and “Please end the turn now.”. This will mean we are no longer just stuck with the EOT at a certain time problem like in tpserver-cpp (or when admin runs a special program like in tpserver-py).
Frame Type Versions
Support for changing frames (in a backward compatible way) separately. This will allow better updates of the protocol without having to do a complete new version.

tp05 will very much be another incremental version on top of tp04, the following is a list of what is planned for tp05 (and will not be included in tp04).

History Support
Servers should start worrying about storing history as it will definitely be added in tp05.
Trading or Diplomacy
Diplomacy will still be able to be done via sending messages to each other, however the server will not support guaranteed diplomacy and trading. (IE If a person says they won’t attack you, the server will have no knowledge of this and they could still attack you.)
Player / Race Separation
There will be no specific support for a player controlling multiple races or a race having multiple players until tp05.
Other stuff?
Probably plenty of other stuff which I have forgotten.

Compiling tpserver-cpp under windows – Part 3

Well here is a binary, I have tested under Windows 2000 and Windows XP. It should also run under Windows Vista too, but I don’t have a copy of it to test with.

It currently only supports the modules it has been linked against. This means that it will only support MiniSec and no persistence modules.

You can download it using the following link Windows Binary of tpserver-cpp.