Lua Gtk Engine
I’ve been working on a Lua based scripting engine for Gtk themes. Right now it isn’t really useful without example themes and documentation, so I will write more about it later. If you want to try it anyway, get gtk-engines from CVS and configure with –enable-lua. It still needs some work, many widgets aren’t supported yet.
For the API I’ve tried to find a middleground between flexibility and simplicity. It is based on simple drawing functions with parameters, for example: rectangle {x=0, y=0, width=200, height=200, radius=3, filled=true, color={1, 0, 0}}. Most parameters are optional. It is possible to specify both colours and gradients (linear and radial) with arbitrary colour stops. The nice thing about passing parameters like this is that you can store and modify them in a Lua table, for example:
myrect = { x=0, y=0, width=200, height=200 }
myrect.color = {1, 0, 0}
rectangle (myrect)
There is also a shape () function which takes an arbitrary number of normal and bezier points to create any shape you want. A screenshot that shows most of the current widget coverage:
Writing themes like this is a lot more fun, especially since you don’t need a recompile and restart anymore before you can try your changes. But most importantly users will be able to install Lua themes like any other theme via drag and drop, instead of having to install a new engine, just because they prefer their Clearlooks to have square corners… Performance seems to be completely acceptable so far. The difference is measurable, but almost neglectable compared to the actual drawing times. Lua is a scripting language that was developed with speed and size in mind, so it adds minimal overhead.
Chessmonk
For chessmonk, I decided to split up the chess board part into a separate package. Not just the display but also any chess logic will be contained in this package, so it will become easier to create different board window types. I got this idea when reading about a software called Chess Position Trainer, which is based on a similar chess board widget. This still needs a lot of work and isn’t functional yet, but if you are curious you can find it in the gtkboardview branch of the Subversion repository.
Chess Tournament
I didn’t dare blog about this before, because I assumed it must bring bad luck. 😉 I recently played a seven round swiss tournament in Krefeld and surprisingly was able to reach fourth place with a performance of over 2100 (Final Standings).
In the last round I had white against the third seed of the tournament (2060 DWZ). I didn’t really expect to win this game and reach the price ranks, but then it even became a nice miniature after my opponent made a mistake soon after the opening moves:
1.d4 g6 2.c4 Bg7 3.Nc3 d6 4.e4 Nf6 5.Nf3 O-O 6.Be2 e5 7.O-O Nc6 8.d5 Ne7 9.a4 a5 10.b3 Nd7 11.Ba3 h6 12.Ne1 f5 13.f3 b6 14.Nd3 Nf6 15.b4 axb4 16.Bxb4 Nh5 17.a5 c5 18.dxc6 bxa5? 19.Nb5 Be6? 20.c7 Qd7 21.Bxd6 Bxc4 22.Nxe5 1-0



