Go programming highlighter for conTEXT editor

When on Windows I use the conTEXT editor for basic text editing and for small programming tasks (when loading a full IDE would be a tad excessive!). The conTEXT editor website lists syntax highlighters for all sorts of programming languages. However, when experimenting with the Go programming language today, I discovered there was no conTEXT highlighter for Go. So, I wrote my own.

Download

Download conTEXT highlighter for Go programming language (.chl)

This is based upon the Go programming language specification as of the 2011-02-15 release.

Installation

To install the highlighter, drop the Go.chl file into the Highlighters directory. By default this is:

Tagged with: , , , , ,
Posted in Go

Which Genetic Programming software? A comparison

This table is intended to be a comprehensive list of evolutionary algorithm software frameworks that support some flavour of genetic programming. Each entry lists the language the framework is written in, which program representations it supports and whether the software still appears to be being actively developed or not.

If you know of any other genetic programming software that has been omitted from this list, then please leave a comment with details.

Read more ›

FrameworkLicenseLangTreeGECFG-GPCGPGEPActive?
AForge.NETLGPL.NET
BeagleLGPLC++
DEAPLGPLPython
DGPFLGPLJava
DRPGPLRuby
DiscipulusCommercial
ECF?C++
ECJAFLJava
EOLGPLC++?????
EpochXLGPLJava
ep4jsApacheJScript
Eva2LGPLJava
Tagged with: , , , ,
Posted in Genetic Programming

Answers to Melanie Mitchell’s Thought Exercises

Melanie Mitchell‘s book An Introduction to Genetic Algorithms, contains a series of thought exercises for the reader. The book itself does not contain Melanie’s answers, but they were previously freely available on her website. Unfortunately, the website no longer seems to be available. However, I was able to find a copy of her answers online still using the Wayback Machine. For convenience, I’m posting a copy here:

Melanie Mitchell’s thought exercise answers

Note that this is entirely her work, and if her website reappears, then I’ll remove this copy. As mentioned, this document is already freely available online at the following location, but I don’t think it would be appropriate to thrash the Wayback Machine with the same query:

http://web.archive.org/web/20000918164730/http://www.santafe.edu/~mm/exercise-solutions.ps.gz

Tagged with: , ,
Posted in Genetic Algorithms

The Maverick Meerkat is loose!

Maverick Meerkat was released on 10-10-2010

It took me a while to get around to upgrading Ubuntu to version 10.10, nicknamed Maverick Meerkat. The update went without too many difficulties, the only irritation being that the mouse stopped functioning for much of the installation process which meant setup dialogs had to be navigated with the keyboard – but the mouse worked fine again upon the restart. There doesn’t seem to be too much difference in functionality, but the new Ubuntu Font Family are very likeable.

Encroaching Shadows

There was one major striking problem from the start though. For some reason all menus and windows seemed to be shrouded in shadows, as if they had a z-index which wrongly put the shadow on top of the panel instead of underneath. I couldn’t find any similar tales online, so perhaps this is unusual. It would have been completely impossible to work with it how it was, but fortunately I have managed to dispel the shadows. So, what was the solution? Well… I’m not too sure. For some reason, modifying my window buttons (as described in the post about Lucid Lynx), resulted in the shadows immediately disappearing. I have attempted to recreate the situation, but I have no idea what the problem was, nor what specifically was the solution. But, if you have the same problem, then maybe twiddling the window button layout will help for you too!

Tagged with: , , ,
Posted in Ubuntu

Evolution as a Blind Watchmaker

I stumbled across this video through a link on Stack Overflow. As well as providing a compelling argument for evolution against the old foe, intelligent design, it is also a great demonstration of the power of evolutionary algorithms. In the 9 minute video, he describes how evolution would approach the problem of reconstructing a smashed watch, and simulates it in Matlab. The result is an impressive progression from a collection of non-functioning components to a three or four handed timepiece. I am interested to know more about his implementation details, in particular the fitness function he uses. All his code is available, but as a non-Matlab programmer I haven’t invested the time to understand it yet.

Tagged with: , ,
Posted in Genetic Programming

Hooks and Stats, announcing EpochX 1.3

EpochX genetic programming software

EpochX is a Java framework for genetic programming

I have just released version 1.3 of EpochX, a Java based genetic programming framework built specifically for researchers working with genetic programming. Significant additions in version 1.3 include a hooks system which allows the dynamic modification of the population and programs mid-execution and an expanded set of statistics that can be obtained live while the run proceeds. There are a whole swathe of other improvements and bugfixes too.

The documentation for EpochX is also expanding as well. The first half of the Complete Guide documentation has now been published to the website.

Downloads and documentation are all available from www.epochx.org.

Tagged with: , , , ,
Posted in Genetic Programming

Beyond Tags: 7 things to take web design further

Puzzle graphic

Good web design is about putting the pieces together to create websites that are attractive, usable, fast and useful.

So, you’ve completed an introductory web design course and now you’re starting to feel comfortable with HTML tags and perhaps you’ve even done a bit of PHP. The next step is mastering the art of putting it all together to make websites that are attractive, usable, fast and useful. This post will outline 7 of the most important technologies, concepts and approaches that will help you make the transition from theory to practice.

1. Get a project

A really good way to learn web design is to read web design books. But a better way, is to design websites. Doing is also more fun than reading. So, choose a project to work on and get stuck in. Here are some ideas to get you thinking:

  • A personal website, perhaps with details of any projects you’re working on and your CV.
  • A blog – about a hobby, interest or a challenge you’re going to be undertaking.
  • Family archive – with details about your family history, a family tree and old family photos.
  • Photography – show off your photo collection.

Read more ›

Posted in Web development

Create heat maps with JHeatChart 0.5

I’ve just released version 0.5 of JHeatChart, my little heat map Java API.

New in 0.5

  • Added support for both horizontal and vertical axis values for both x and y axis.
  • Changed chart dimensions to be calculated more reliably from individual cell dimensions.
  • Fixed issue where the title is not aligned centrally properly in certain circumstances.

Here’s a little example of a heat map chart that was generated with JHeatChart for a recent publication:

An example chart created with JHeatChart

An example heat map chart created with JHeatChart.

You can download the latest version from the JHeatChart project page. The source code, JavaDoc and example code is also available there.

Tagged with: , , , , , , , ,
Posted in Java

Lucid Lynx button positions

The new Ubuntu Lucid Lynx has been released, hurrah! My upgrade went smoothly and everything seems to be working nicely. There is however one minor thing that will strike you pretty quickly if you make the step. They’ve gone all Mac OS on us and by default the window buttons have been moved to the left of the title bar. I’m sure there are some very good reasons for this, but I’m not keen.

Thankfully it is quite simple to return it back to something sensible. Here’s what you do:

  1. Press Alt-F2 (or open a terminal window).
  2. Type ‘gconf-editor‘ and hit enter. The Configuration Editor will open.
  3. In the directory tree on the left, go to apps > metacity > general.
  4. Find the ‘button_layout‘ key, which will have a value of something like “close,minimize,maximize:
  5. Edit the key. To move the buttons to the right, you simply have to reposition the colon. However, you probably also want to move the close button to be the right-most button. So, replace the value with: “:minimize,maximize,close“. Or, I prefer to use “menu:minimize,maximize,close”, which puts a menu button on the left, with the rest of the buttons on the right.
  6. The buttons will update instantly.
  7. Close the Configuration Editor, using the close button now back on the right.
Tagged with: , , , ,
Posted in Ubuntu

Installing PHP’s intl extension on windows with PECL

Alternative title: Beware PHP’s intl extension.

I have spent far longer than I am prepared to admit trying to install PHP’s intl extension for internationalisation on an apache server running on windows. As a result of this adventure I have discovered many (largely unhelpful) things about the intl extension and PHP’s extensions in general. I share them here in the hope that it saves some other soul the hours of torment that I had languishing in my own ineptitude.

Your first attempt is likely to be something along the lines of running this command at your command prompt:

This will fail. The problem here is actually a general issue with PECL extensions. Currently there is very limited support for windows. You can install all the PEAR tools and feel very confident that everything is going swimmingly, only to then hit a cryptic error message such as “ERROR: The DSP intl.dsp does not exist.”. If you happen to come across this message, what it infact means is – windows hates you, and also that it does not have the right tools to compile your extension.

But there is a right way to install pecl extensions on windows. You are supposed to go to http://pecl4win.php.net/ and download the pre-compiled dll for the extension you’re after then just throw in an extension=intl.dll line in php.ini. But there’s a problem with this – that website has been discontinued and there is currently no replacement. At some point in the future the dll downloads are supposed to be appearing on the main pecl website I believe, but that’s no good for us here in the present. The dll for ‘some’ PECL extensions (not intl) are available from http://downloads.php.net/pierre/.

It was at about this stage in my quest that I discovered that PHP version 5.3 has intl included as a core extension. So solution #1: upgrade your version of PHP to 5.3+. This is a very valid solution, but it was no good for me because A) it is not backwards compatible so it broke my whole site, B) WebCrate‘s servers are stuck on 5.2 for the time being. One other thing you might think to try is to simply grab the intl.dll from a PHP 5.3 install. I had no luck with this, and resolved that the versions were incompatible.

So is there a happy ending? Not really. I gave up on intl and implemented my own very crude mechanism for localisation which controls the currency formatting on Devex-Templates.

But it’s not all doom and gloom about intl, so on the plus side:

  • Intl installed like a dream on my linux box. (solution #2: get yourself a copy of Ubuntu?)
  • It’s an excellent extension once you’ve got it running.
  • This will all be made irrelevant once version 5.3 is in wider use.
Tagged with: , , , ,
Posted in PHP