Richard Jones' Log

Sun, 31 Dec 2006
Progress in pyglet

pyglet is finally getting some more attention from me. Intermittently over the last week or so Alex and I have managed to write up a little spec for the 2d scene component. Mostly this will handle tile maps and sprites (and animated images as an aside). Yesterday I found myself with some free time and starting translating that spec into actual code. The result as of just now is the data model for the rect / hex tile maps being checked in and there's also some tests and a debug display (which can also double as a handy tool for creating tile set templates). Next up will be sprites. Then I'll need to figure a tile map file format. Then onto a GUI for tile map and sprite editing...

On the GUI front (kinda) Alex has been having a lot of success in his XHTML / CSS rendering efforts. One of my real "woah" moments (amongst many) was trying out an "example of a custom replaced element" as he described it. In essence, he defined a new tag, <cube> which may be included as an inline element in an XHTML page and renders a spinning cube. Being a box element it may be styled with CSS (background, border, sizes). Sweet. That's going to make for cool tutorials :) We're not really sure which way the GUI will go, but XUL is probably going to have some influence. None of that Javascript though, of course. There's a lot of thinking and coding still to be done...

category: Python | permanent link
Sat, 23 Dec 2006
pyglet - another turning-point

"incidentally, did you try releasing the context before destroying it?" was the fateful message from Alex that eventually resolved the problems Anthony was having with his older Linux ATI drivers and pyglet's tests.

A recap: when running even the simplest code, Anthony was getting X11 crashes when we attempted to use the GLX API call glXDestroyContext(). A Google search of the symptoms and so forth resulted in a general consensus that there was a bug in the older ATI drivers meaning that glXDestroyContext() just couldn't be called there.

Today over jabber Anthony (in "test monkey" mode) and I spent some time trying to debug the problems he's been having. We resolved quite a few of them, resulting in him being able to run the example programs and start running the test suite. Unfortunately we still hit a big hurdle in the test suite as soon as it tried to open up windows in successive tests.

We narrowed the problem down some more, but weren't really having much luck until Alex happened to log into jabber and sent the message above. Very quickly we had a correct clearing and releasing of the context before window close and suddenly everything's working, including glXDestroyContext!

So here's the (Python) code, if anyone stumbles on this post while searching for the answer I was trying to find...

glFlush()
glXMakeCurrent(display, 0, 0)
XDestroyWindow(display, window)
glXDestroyContext(display, context)

Oh, and regarding my comment yesterday about implementing extension checking pre-GLX-1.1 -- er, there were no extensions in GLX 1.0, so there's no way to query for them :)

Thu, 21 Dec 2006
pyglet has glx v1.0 support

I've implemented support for GLX < 1.3 in pyglet (all the way back to 1.0). This means ATI Linux users should be OK now. I've only tested this support using my GLX 1.4-capable system, so I'm not 100% certain it's OK. Testers needed :)

I was a little slack and haven't implemented extension querying for GLX 1.0. I don't believe there's any drivers out there not implementing at least 1.2. Maybe I'll fill in that gap when I'm bored some day - it won't be hard. This really only impacts the output of tools/info.py (our cross-platform variant of glxinfo).

category: Python | permanent link
Wed, 20 Dec 2006
Please, lazyweb...

I need a Selenium variant that just finds all form input boxes and submit buttons on a page and randomly enters values / clicks buttons and if it gets a "site error" as a result it should be considered a failure.

Pyglet has a website

The pyglet project that Alex and I are working on (and that I demoed at OSDC) now has a website.

The website's purpose is to inform people about where we're at and how they might contribute if they're keen. There is no download and probably won't be for a while.

My next task is to sort out GLX compatibility for ATI drivers under Linux 'cos they only speak GLX v1.2 and our code currently only speaks GLX 1.3 :)

category: Python | permanent link
Tue, 12 Dec 2006
Bouncy for the masses

Bouncy the Hungry Rabbit is apparently on the coverdisk of the latest Linux Format. Mark Rees sent me this:

Just in case you do not know. Flew to KL today and purchased a selection of mags to read on the plane. While reading the Christmas 2006 copy of Linux Format, it was great to see your PyGame Bouncy is on their DVD.

"For a bit of fun, checkout our games section - Bouncy is an ideal games for kids, involving the escapades of a rabbit eating a farmers veggies"

A nice screenshot as well.

Cool :)

(Bit of a shame they couldn't let me know they'd used it though)

category: Python | permanent link
Sun, 10 Dec 2006
Cool game release
Galcon is an awesome high paced galactic action-strategy game. You send swarms of ships from planet to planet to take over the galaxy.

I really couldn't put it better myself. I had a ball yesterday playing by myself against the very challenging computer player (the difficulty levels are very well done) and then I jumped online and played some individual and team games.

Phil — who I know as a supremo Python game coder from many game programming challenges — has done an excellent job polishing up this cool game. I'm just hanging out for the Linux release :)

category: Python | permanent link
Sun, 10 Dec 2006
Why there's few women in IT

The conference last week was educational for the committee in a way that was completely unexpected:

Observation 1: During one of the lightning talks a presenter put some porn up on the big screen. He was peripherally discussing a Perl module called Acme::Playmate (which basically looks up Playmate info on the playboy playmate directory).

We (the committee) had never thought it would be necessary to have to explicitly say that it's not OK to put up porn. Or that we'd have to actively discourage discussing a module that would clearly offend members of the audience.

Observation 2: I was amazed that Acme::Playmate exists in (and is blessed by) CPAN.

I spoke before the keynote the next day apologising to the attendees and our sponsors for what had happened.

Observation 3: Some attendees thought that we had overreacted by even saying anything.

There's my observations about why more women aren't in IT.

We will be passing on clear advice to the next committee about how to handle this.

Update: there's a fantastic HOWTO Encourage Women in Linux which I encourage all to read. Thanks Paul for the pointer.

Clarification: when I originally wrote this I guess I didn't realise that people would assume that I'm saying these are the only reasons for under-represenation of women in IT. I certainly didn't intend to say that, just that these are some observations of some potential reasons.

OSDC 2006 wrapup

OSDC 2006 is done, and it was good. Very good. As I already mentioned it was really well-attended and there was overwhelmingly positive feedback. Of course we've not read the feedback forms so I guess then we'll see what people reallythink :)

I did a lightning talk on the last day quickly demoing Selenium which went over well with the audience (even some "ooh"s :)

Alex and I had spent some time after my presentation trying to figure out why the projector crashed pyglet. We got it working, but I wasn't 100% sure so in the last minute of my lightning talk I got pyglet to open up a simple OpenGL scene that I'd used in my "Shiny" talk. I figured it had to crash since there was an audience. When it didn't crash, and opened up fine, obviously enough people in the audience recognised what we'd done and cheered :)

We had the final beer BOF after the conference close with about two dozen people in attendance. Lots of interesting discussions which I cleverly remembered to write down onto business cards -- people kept buying me beer :)

Thu, 07 Dec 2006
OSDC 2006 report so far

OSDC has been an amazing success so far. We've got about 15% more attendees over last year (about 180 or so). The talks have been really good and varied. On the down-side there's been technical, organisational and viral issues (I've had a nasty cold that developed the day before the conference and is still going strong) yet feedback from attendees has been overwhelmingly positive.

Andy Todd and others have taken a bunch of photos which are up on flickr, tagged osdc and osdcmelb2006.

My two talks are out of the way, which is nice. I was much more confident this year with almost no nerves even though my "Shiny" talk had the theatre packed (people were sitting in the aisles).

What's Old is New Again was pretty well-received and attended. It wasn't quite the talk I'd hoped, but I got across a number of important ideas so it was worth it. And I learnt a thing or two too :)

The highlight for me was presenting Shiny, Pretty Things. Even though there was a technical problem* I still managed to muddle on through and demonstrate everything I was hoping to demonstrate. And there seemed to be some real interest in pyglet too, which isn't hard to imagine given its potential. People wanted to download it, wanted to know how they can find out more. I just kept having to say that it's pre-pre-pre-alpha :)

*: pyglet got confused somehow when trying to open a window while the projector was plugged in. It works fine when plugged into an LCD or old CRT monitor, but for some reason the projector was special. We're still quite stumped by the error, but are confident we can sort it out. Of course the big problem is that we can only reproduce the problem whilst plugged into a projector at the conference ...

Fri, 01 Dec 2006
OSDC 2006 is just around the corner

Registrations for OSDC 2006 have been so good this year that we've had to stop offering dinner tickets. No sign of the proceedings yet - I'll be ringing the printer on Monday to find out where they're at.

The program is solid. My presentations are finally taking shape. I'm pretty sure I'll put a minimum number of people to sleep.

Anthony's working on his presentations too. He's also using Bruce and madly adding new extensions to it (support for spawning / controlling external processes, added flavour for existing page types, ...) When OSDC is over I'm going to refactor it completely and switch to using pyglet as the core technology. Then we'll be able to switch between window / fullscreen. And a bunch of other things too ;)