The Hobbit Hole

In a hole there lived a hobbit. Not a nasty, dirty, wet hole, filled with the ends of worms and an oozy smell, nor yet a dry, bare, sandy hole with nothing in it to sit down on or to eat: it was a hobbit-hole, and that means comfort.

11/22/2006

360 vs PS3

Filed under: Programming — bilbo @ 12:41 pm

Wow! This article is a very detailed comparison of the two systems. It covers 3 main topics, the CPUs, the OSs, and the GPUs.

Though the author doesn’t offer a definitive conclusion of one system over the other, it seems to me that the 360 is the winner. Floating point (FP) performance on the PS3 is outstanding, but it’s very difficult to program for. The FP performance on the 360 is nothing to snicker about either, and with its much easier and general purpose computing model, it seems like games would be better on the 360, being able to take advantage of more AI.

The comparison of the GPUs is what blows me away. The 360, despite being a year older, seems to have quite a bit better GPU. And here’s the kicker:

  1. The GPU uses a unified architecture, meaning that there is no difference between vertex, pixel, or texture shaders, so it’s much more general purpose
  2. The GPU reads (and writes) from the same memory as the CPU, meaning that you can run physics code on the GPU and have it write back the results for the CPU to access. I will admit I don’t think this overcomes the capacity of 6 SPEs (the PS3 has 7, with one reserved for the OS), but it helps offset the FP difference between the 3 VTX and the 6 SPEs.

Very detailed and thorough article. I liked it a lot. I think I’m going to pick up a 360. Especially if my brother comes through and solves the Wii problem for us. :)

11/12/2006

Inflections and SBCL

Filed under: Programming — bilbo @ 5:59 pm

It’s been too long since I’ve written here, but the last couple of weeks have been busy, as is usual for this time of year. Halloween is the gateway into the hectic holiday season, and spare time seems more fleeting than usual. The kids have fun though, and that’s what it’s all about, n’est-ce pas? Think of the children.

I’ve had some time so I decided to work on a little project that would mesh well with the game and some future plans I have to make a web framework for Lisp that I could use to power my own websites — an inflector.

What’s an inflector? It’s a piece of code that changes inflections for words. You hand it “person”, and it hands you back “people”, and vice versa. It also contains a number of routines to handle conversions for contexts, such as human readable to lisp readable.

Rails uses an inflector to hook a class named in its singular form to a database named it its plural form, e.g. “Person” -> “people”. I’m not going to do a “Rails for Lisp”, though such a thing is quite possible, and probably even tried and done. I’m thinking something more like Camping, very small but usable. I would probably use LML2 and ParenScript for the views, CLSQL for the models, and something cobbled together for the controllers. If you have any suggestions, I’d welcome them.

The other interest has been SBCL. I’m still using Corman mostly, but as I’ve explored the option of getting a Mac Powerbook Pro, I’ve been interested in Lisps that would work with both Windows and Mac. SBCL seems to fit the bill nicely. The Windows support for SBCL has been good too, if incomplete. In some ways, it’s the opposite of Corman. It has very good ANSI compliance, but it’s Windows support is lacking. I don’t need much Windows support, just a good FFI, as I can write C that hooks into Windows to do what I need for the game just fine.

It also has a number of other desirable features. Like Corman, SBCL comes with source code and can build itself, a must if I’m to fix things that crop up. I managed to build it with MSYS. SBCL can use SLIME, the premier development environment for Lisp. It also does native code generation, and it scores well compared to other dynamic languages in the computer language shootout. Despite that though, the unit tests for the inflector are 2-3x slower than Corman Lisp 3.0. Hardly a thorough evaluation, but a surprise nonetheless.