23 March 2002

Made new development releases of pygtk and gnome-python
recently. The previous ones didn’t work with the gtk 2.0
release (trivial to fix up). Since the release, I have done
some clean ups to its code generator. I have refactored it
so that the 4 code paths used to generate wrappers for
GObject, GInterface, GBoxed and GPointer type classes are
now merged into one code path. This shortened the file by
500 lines, and should make it easier to add new features.
The previous layout was getting pretty hard to manage.

I have started using Spam Assassin
to tag incomming spam. As we have a mildly unusual mail
setup (postfix with Cyrus IMAP), I ended up writing my own
script to perform the spam checking. The result was a
script that could be called as a “deliver” script by postfix
for local delivery. The script would then pass the message
off to the spamd daemon for spam checking, then
pass the message on to the IMAP server via LMTP. The script
is probably useful for use with other mail servers
supporting LMTP. The script is attached to the following
bug report:

http://bugzilla.spamassassin.org/show_bug.cgi?id=112

This has the benefit of only checking incomming mail, and
allowing postfix to handle outgoing and transit mail at full
speed as before. Next thing to try is adding spam checking
support to Mailman (as the local delivery program doesn’t
get called for messages sent to mailman). It should be
possible to set it up to reject messages above a certain
threshold, and hold messages at a lower threshold.

I wish I started looking at these tools earlier. Spam
volume has gone up sharply in the last 6 months, and shows
no sign of flattening out.

1 March 2002

linux.conf.au

Got asked to go on the paper review committee for next
year’s linux.conf.au. This should be interesting. For
people living in Europe, it should cut off about 5 hours
flying time compared to the eastern states, so hopefully we
will get some cool European hackers submitting papers.
Conversely, flights from the US will most likely be longer.

If you have never been to Perth, it is a great
opportunity to come (it is a great place). If you live in
Perth, it will be a great opportunity to meet many
interesting people without > 4 hours flight 🙂.

Also, check out the video on the website if you haven’t yet.

GNOME 2.0

The GNOME release is looking pretty good. Things have
been shaping up quite well. The new stable GTK+ release is
scheduled for Monday. There have been significant speed
improvements to Nautilus (some due to improvements to the UI
handler code in bonobo). Libglade is shaping up well. Guadec is about a month
away as well.

Python

The development pygtk branch
is going well. Most of the infrastructure is in place, and
it is pretty usable (except threading, which is still a
little broken).

I my first patch into python recently. It allows use of
non string types as the __doc__ attribute of new style
classes (eg. unicode strings, or arbitrary descriptors
(which is what I wanted)). It should be going in both the
2.3 and 2.2.1 releases. The gettext module in the standard
library is also partially based on my code (along with the
other gettext wrappers that were around at the time), but
that is really Barry’s work. I should look at the bug about
building libpython as a shared library, as it would be
required to implement a full gnome-vfs wrapper.

raph: hopefully pygtk 2.0 should
be a pretty good choice when it is ready. GTK+ 2.0 should
work on win32, and I have gotten rid of the file naming
issues and global variable referencing issues (MSVC doesn’t
allow referencing variables from other DLLs in global
variable definitions. However, the C++ compiler does. It
is a bit weird) people were having with the stable pygtk.
Also, the Redmond95 windows lookalike theme has been
improved a fair bit.

Mozilla

Looks like the patch to fix font handling for PS printing
(#37685)
is going in to mozilla 0.9.9. This should make printing on
unix mozilla much better. Finally, preformatted text should
finally be displayed in a monospace font. Previously, the
generic font types (sans serif, serif and monospace) were
all being printed as Times.

14 February 2002

linux.conf.au

Went to linux.conf.au
in Brisbane last week, which was a lot of fun. I went a few
days early to see what was going on at the debian mini
conference, and got roped into giving a small demonstration
of gnome 2.0 stuff at about 30 seconds notice. I am not
very good at doing presentations with no preparation 🙁

Met up with gman, who was at the
conference as part of his holiday over here. The talks were
very interesting. Sounds like Samba 3.0 will rock (does
win2k domain client RPCs), and it may not take long after
that to become a win2k PDC.

On the last day, among other things, I went to the
Portable.NET work in process talk. The guy giving it seemed
really bitter about Mono. He didn’t seem to be giving any
real reasons for it, but didn’t give any real reasons for it.

Looks like the next linux.conf.au is going to be in
Perth, so I hope everyone is going to turn up 🙂.
Part of what got us the conference was the video
some of the PLUG guys did. They showed the video at the end
of the conference, and it was very good.

Gnome 2.0

While at l.c.a, I put out another release of devel
libglade. This one just stripped out some of the unused
functions from the module API (which isn’t used by any
applications). I also went through and updated a lot of the
docs. The tutorial section has been updated a lot, and so
has the API reference section. I started filling out a
third section of the manual on the actual file format, but
that isn’t finished.

Gnome in the Past

While talking about the difference between the old gnome
window hints and the newer window manager spec
(collaborative effort with KDE and many window manager
authors). One thing that came up was the colour reactive
GUI crack in the old spec. I pulled up a few related links
from the bowels of time:

On one hand, the new API got in a lot quicker than it
would these days. On the other, it would have taken a lot
longer to get rid of this kind of crach these days
(deprecating it for the duration of a major release, etc).
Maybe I should resurrect GnomeLamp as a bonobo control
example for gnome-python 🙂

27 January 2002

Skyshow

Went to the Australia Day fireworks on Saturday night. I
cycled into the city to see them, which was worth it (didn’t
get stuck in a traffic jam — just had to dodge pedestrians
on the way home). The fireworks looked so much better in
the city (I went just a little past the narrows bridge).
There were fireworks being let off the tops of the buildings
in the city, off the narrows bridge, and off the barges in
the middle of the river. At one stage, some small
tough-ducks were driving past about 50 metres away and
letting off some smaller fireworks. One of the embers from
these smaller fireworks landed about 2 metres away from me!
(on the esky belonging to someone sitting nearby).

Sony NEWS

I have been looking at reviving an old Sony NEWS NWS-1580
workstation. This is from a line of 68030 based unix
workstations made by sony in the early 90’s. It had been
left off for about 5 years, so wouldn’t boot at all.
Apparently the problem was with the battery on the NVRAM
chip, so I will try and get a replacement for it (its an
MK48T02B-25 chip, which was also used in a number of Sun
boxes). While I had the system open, I decided to take a
few photos of its insides:

http://www.jamesh.id.au/images/nws-1580/

While searching for information, I ran accross the NetBSD/news68k
FAQ
, which gave a button combo to press to boot a system
with a discharged NVRAM battery, or new NVRAM chip. Using
that combo, I was able to get the system to boot NEWS-OS 3.3
(a BSD-4.3 derivative).

Once the system is running nicely, I might look at
transfering the OS off the 180MB disk onto a spare 2GB SCSI
disk I have (provided I can find the installation tape). I
could probably fit two 3.5″ disks into the space the current
5.25″ disk takes up, which would mean I could put NetBSD on
it too. I can also fit in another 8MB of RAM, which should
be helpful (it takes standard 8 or 9 chip 30pin SIMMs). I
will also look for a AUI -> 10Base-T tranceiver, so I can
hook the machine up to the network (6 COMM ports can only
get you so far …).

Python

On the PyGTK development side, we now have bonobo
bindings in CVS, using jdahlin‘s
orbit-python bindings for ORBit2. We now have support for
libbonobo, libbonoboui, bonobo-activation, nautilus views
and panel applets (most of this work is thanks to jdahlin).

I have also been looking at doing some automatic
signal/property documentation for GObject wrappers. Rather
than calculating all this documentation up front, I decided
to use the cool new descriptor support in Python 2.2. This
is essentially a generalisation of the rule that maps
functions in a class dictionary to methods on instances.
Rather than this being a special case in 2.2, functions
implement a tp_descr_get() function, which gets called
asking the function object to return itself in the context
of the instance. This generalisation has made it trivial
for support for static methods, class methods and properties
(objects with setter/getter functions) to be added to the
language. I used this for my automatic documentation hack.
I set __doc__ in the class dictionary to a special object,
which implements the tp_descr_get() slot. The
tp_descr_get() slot looks up the information when
instance.__doc__ or class.__doc__ is requested and returns
it.

This worked great for the instance.__doc__ case, but
class.__doc__ was always returning None. On further
investigation, I found out that this was caused by the
type.__doc__ property descriptor (“type” is now a new style
class, rather than just a function for getting the type of
an object. It serves as the standard metaclass), which took
precedence. I have a patch for python now that gets rid of
the property and makes __doc__ on new style classes work
more like old style classes (and lets you have unicode doc
strings as well).

The upshoot of this is that typing help(‘gtk.Widget’)
lists all the signals and properties of gtk.Widget (provided
my patch is applied).

linux.conf.au

I am going to l.c.a
next week, which should be a lot of fun. Looking forward to
meeting everyone there (including gman and
malcolm). Looks like I will be fixing up
my grandmother’s Windows XP box while I am over there as
well.

GUAD3C

I submitted a talk proposal for GUADEC 3, so it looks like
I will have to write up the paper. The talk will be on
writing GTK 2.0 and GNOME 2.0 applications with Python.
Looking forward to a free trip to Spain 🙂.

23 December 2001

More investigation of the slow processing speed for my
document. It seems like the slowdown is somewhere in
libxslt’s chunking code.

With chunking turned on, xsltproc took 4 minutes to
process the document, while without chunking (ie. producing
one large file), it only took 1:30 minutes (less than half
the processing time).

In comparison, using Jade to process the document took
about 2 minutes with chunking turned on. With chunking
turned off, it took 4 minutes.

I wonder if this means that xsltproc’s performance with
chunking turned on can be improved to be faster than its
nochunks performance? Either that, or the DSSSL stylesheets
for Jade can be optimised for the non chunked case 🙂