Having owned a ZX Spectrum and being part of a generation that got into computers as a result (along with owners of the BBC Micro, the Commodore 64 and the like), my attention was drawn to this ZX Spectrum Laptop (via Endgadget.) In an ideal world – a world unencumbered by constraints – the OS would have been the Spectrum OS. I wonder what other retro inspired hardware mashups are out there or being built right now.

Over the last couple of days I’ve got nspectre working under Mono. I hope to be able to release a patched version later this month. Here’s how I got it to work. I installed NAnt 0.85 on Ubuntu 6.10 (which I run in Parallels.) I found this link via Cory Foy that shows how simple it is to install NAnt on Mono.

UPDATE: At this point I built TemplateEngine. I used MonoDevelop to build it – no issues to report.

With Nant up and running, I created a build script for NSpectre. To get started, the build script only builds NSpectre.Core, NSpectreExample and NSpectreExample.Entities. Once I had these compiled (on my set up, the csc task in NAnt targets gmcs by default – very impressed), I ran them.

And ran into problem number 1. It appears that Mono implements Assembly.Load differently to .NET. See here for further detail. As a short term fix, I modified ResourceLocator by adding a type initialiser to load all assemblies in the bin directory. I’ll take another look at this, there may be a better way of doing it, but for now it works.

Problem number 2. I set NAnt to use dynamic prefixing for the resources. The namespaces it uses are different to those that VS .NET would use – VS .NET would use the project namespace as the root namespace, whereas Nant uses the name of the folder that contains the project (for subfolders the behaviour is the same.) Pretty easy to fix – modified references in code and config files to use the NAnt generated namespaces.

Problem number 3. One hardcoded (a constant) backslash (used in Engine.) Oops. Modified to a forward slash for the purposes of getting it to work.

Problem number 4. NSpectreExample uses Win32 API calls to change the foreground colour of the console (.NET 2.0 supports this in managed code, so this won’t be a problem in the future.) Unsurprisingly, Win 32 API calls don’t work in Linux. So, I commented these lines out for now.

And that’s it. OK, so there were a few more issues along the way. But the other issues were about getting the build script “right” – in this case getting the csc tasks to build nspectre as closely to the way VS .NET does as possible.

So, a little more investigation, some minor modifications, some clean up of the build script and I’ll be able to release a Mono’ed version of nspectre.

Between World Cup matches, I stumbled across news of the Dell XPS M2010. It's a sort of desktop / laptop hybrid with a 20" widescreen monitor and a detachable bluetooth keyboard. It's also expensive. But for those of us who would rather not have a big hunk of purest beige in whatever room houses your PC, this is an innovation to be welcomed – even more so if you'd like to be able to move your PC now and then (and given its weight, you're not going to want to carry it too far.) Hopefully, the creative juices of other PC manufacturers will start to flow.