Zope 3 sprint
I spent most of a week in Melbourne for the 2nd Australian Zope Sprint. I've been lurking on the zope3-dev mailing list for a long time, but never really spent any effort to get familiar with Zope 3, let alone get involved. It's been on the infamous mental TODO list...
The first three days of the event were a tutorial on Zope 3 by Jim Fulton, with regular "hands-on" sessions. Probably the pace could've been a little faster, but I thought the tutorial was very good, and Jim is (unsurprisingly) very familiar with the material, and makes a good teacher. As someone who currently earns money developing on Zope 2, Zope 3 looks really really nice. Trading multiple inheritance madness for interfaces and adapters looks like it's paid off really well.
The next three days were the sprint. I volunteered to work on object location events with Mike, but that quickly turned into working on adding "subscription" adapters to Zope's component system, because it turned out to be a necessary prerequisite. Jim had planned to implement partial adapters for some time, and thought that was what we needed, but after some discussion it became clear that there were two different behaviours, and we decided to call the one we needed "subscription adapters". Partial adapters can wait until another day, but hopefully some of our work can be reused for that.
We got to the point where we had largely implemented the ability to use subscription multiadapters to replace the IAddNotifiable interface — so that code can register an interest in, say, "object moved" events for a specific instance, or maybe all objects of a certain type, by registering a subscription adapter from (SomeObjectType, IObjectMovedEvent) to ISubscription. The previous scheme required that an object implemented IAddNotifiable, which doesn't help much if a third-party object, like a catalog, wants to know about events on an object. Unfortunately, we didn't get as far as converting any existing uses to the new infrastructure. I hope to get around to finishing that soon.
Every night we went out for dinner at a cafe or restaurant somewhere. Usually we'd go to somewhere on or near Lygon St, which was packed with Italian restaurants and was the closest place. Eating out with people is always enjoyable; it's a pity I can't really afford to do it all the time. It suits lazy people that enjoy eating (like me) very well :) It's also a very pleasant way to spend some time with interesting people you meet at conferences like these. I find pubs and bars tend to be too noisy to allow groups of more than 3 or 4 to talk meaningfully. Thinking of people, it's good to have finally met Anthony, who is a fellow Australian Twisted hacker... if you're going to PyCon, make sure you see his talk on shtoom titled "Scripting Language My Arse".
Post Linux.conf.au, I was nicely energised for random projects. I mucked about with glade a bit (with no actual results — yet), and played with D-BUS's python bindings, which are written in Pyrex, so I got an excuse to learn that, too. Unfortunately, starting lots of cool mini-projects isn't the same as finishing them. I need to find some motivation to sit down and do that at some point. Wanting to port small(ish) projects like pyDHCPd and archd to Twisted [Memo to the universe: Python probably doesn't need yet another networking framework. Please look around before writing your own] gives me more things to start, rather than more time to finish what I've already started. Hopefully I'll manage to finish a few things soon.
Blah. The current situation is pretty demotivating, but it should all be resolved, one way or another, soon. Life goes on.
bigbuba mentions an IDE with support for no overlapping windows:
Just like tab support in the window manager, this might be tough to implement. Anybody take that as a challenge?
It's already been done; I've used it for ages. It's called ion. The development version is very slick -- you can have PWM-style (i.e. normal floating, overlapping windows) workspaces as well as ion's normal no-overlapping windows workspaces at the same time.
In other news, Twisted just keeps on getting better and better... Woven is now one of the best documented parts of Twisted, rather than one of the worst. Also, I started reading and posting to comp.lang.python several months ago so I could point people to Twisted when appropriate -- and mostly, I don't need to. The comp.lang.python regulars are cheerily recommending it already.
Seems like I need to have a look at a reasonable documentation system that will let me generate man pages, info files, HTML and pdf docs all from one source.
I recommend Twisted's Lore package, which will be part of the imminent 1.0.1. Lore can output HTML and LaTeX (and thus ps and pdf) from XHTML source. Actually, it's a subset of XHTML, and it uses the class attribute alot to provide semantic rather than presentational markup, e.g:
... will return a <code class="API" base="twisted.internet.defer">Deferred</code>.
You can footnote<span class="footnote">This is a footnote.</span> text.
It's currently geared towards Python docs, i.e. it can pretty-print python code and automatically link API references to epydoc's output, but is easily extensible. Docbook output is in the works (which in turn provides for info pages), and we have a man2lore utility, which is simple but sufficient for Twisted's manpages.
It does nice things like turn relative links to other HTML files into LaTeX cross-references, and so forth. It automatically creates a table of contents for the HTML output based on your H1, H2, etc tags. And a nice side-effect of using XHTML as source means that the unprocessed source document is directly viewable (although occasionally ugly, such as with footnotes (but stylesheets can help)), which is handy.
It's also quite small; there's only about 600 lines of source that does all this, and it includes a lint utility! So, it shouldn't be too scary to work with, even if you don't know Python. Feel free to ask about it on #twisted (on freenode) or the mailing list if you're interested, we'd be happy to help.
I was going to talk about the fun I've been having working on Lore, but I think I've probably covered that quite well already for this entry :)
You're missing the point. It's "HOWTO Encourage Women In Linux". Not "HOWTO Make Linux a Feminist Battleground" or "HOWTO Use Linux to Overthrow the Patriarchy". Val's HOWTO isn't there because Linux is meant to be about gender issues. It's there because there's less women involved in Linux than there could be. Don't misrepresent the message or intent of the HOWTO -- that wouldn't be truth, would it?
And you've got it backwards, anyway. The problem isn't a HOWTO that you fear will "Make Linux about gender." Of course gender should be irrelevant to Linux -- so why does the HOWTO exist?
It's because some people in the Linux, unwittingly or not, do make gender an issue. They treat women differently, make them feel uncomfortable, unwelcomed or even threatened. That, I think, is why Val wrote the HOWTO: to point out this problem and give ideas on how to correct it, so that gender isn't an issue for Linux. I think you, me and Val all agree that this is the way it should be.
Twisted 1.0 has been out for a while and no show-stoppers have been found... in fact the response has been quite positive. It's great to see the mailing-list become more active -- we're obviously getting more users.
1.0.1 is slowly arriving, with lots of nice little bits and pieces: the UDP API is better and will probably be marked stable soon, and the documentation is much better, in quantity, quality and presentation. It's been fun working with moshez on the doc generation stuff (which will be in the twisted.lore package of 1.0.1).
Oh! -- and z3p's ssh implementation, twisted.conch, is rocking. The client works beautifully -- running terminal programs, or doing CVS checkouts, or whatever. I still find it to be amazingly cool.
What do you do, on an open source project, where the author takes in any patches that you submit, uses them, but fails to credit you in any way?
Submit a patch to update the CREDITS file, of course ;)
I'm starting to feel comfortable at my new job, although I'm still discovering new things about Zope...
1.0 is taking a little longer to happen than originally planned, but is very close now.
Recently I wrote an inetd(8) replacement for Twisted, mainly as a practical example of how to write a superserver that spawns child processes. It was liked enough that it was given its own subpackage, rather than being buried in the doc/examples directory. I'm happy that it's a fairly short and mostly functional implementation of inetd.
I was disappointed that I had to resort to writing a C extension module for part of setting up Sun-RPC services (for the pmap_set(3) function), and they still don't quite work properly. I'm not sure where to find documentation on how an inetd implementation should run rpc services, although I'm sure it's out there (yes, I've looked at the inetd(8) source in Debian, but not know the first thing about Sun-RPC, it didn't really help).
Starting new job tomorrow. Scary and exciting.
So Twisted 0.19.0 is out. I'm finally starting to feel happy about the FTP client code, after figuring out that I needed to extend DeferredList a little. It's so obvious in retrospect. I'm amazed at how enthusiastic all the Twisted developers are -- myself included. There's a strong feeling of "we need more people so we can do more cool stuff" -- it's a very friendly and welcoming project. Bug reports are welcomed and thanked, documentation contributions are particularly appreciated... Twisted is getting to the stage where I could say it is well-documented and keep a straight face.
It's amazing how much difference a positive development community makes, at least to me, a potential developer. Before I started playing with Twisted, I contributed a few patches to another project (which shall remain nameless). While I've no doubt that the people behind it are nice people, you quickly get discouraged when your posts to the mailing-list get completely ignored (except by a couple of other users). While I'm not so arrogant as to think my work was flawless, some acknowledgement from the developers would have been appreciated. Some criticism explaining why my patches were not included would've been even better. Anyway, about a year later, that particular feature is still on the "todo" list for that project, and I spend my time working on other, more rewarding, things. It took very little effort to become involved in Twisted, thanks to their active encouragement of potential developers.
Twisted is slowly accumulating random fun bits on its way to 1.0 (which isn't looking so far away anymore). There's an implementation of the "MouseMan" serial mouse protocol in 0.19.0. There's also signs of an ssh implementation coming soon...
I see that they've extended the deadline for abstracts by 2 weeks. That means I get to sleep a bit longer tonight, and worry about it later...
Physiotherapy is great, but expensive when you have it several times a week. I think my shoulders are slowly improving without needing physio anymore, so I probably won't be making any further appointments. It'd be good to be able to stop consciously thinking about my shoulders and wrists, though.
19:21 <adiabatic> get a flower and say to yourself "how can one screw up sending a filelisting via passive FTP? let me count the ways..." and then start plucking petals
0.18.0 was released a while back, and seems to be solid. Unfortunately some of the FTP unit tests are failing again, and there seems to be really nasty timing issues involved -- adding a blank print statement to a single-threaded program should not make a test pass. Similarly adding a time.sleep(0.1) call somewhere else shouldn't make another test fail.
The FTP server code is sufficiently ugly that I think I'll simply rewrite most of it, and see if the bug goes away. It needs a rewrite for other reasons anyway, it should be using stuff like twisted.cred. I suspect this is simply a different manifestation of the same bug that causes the bulk of the FTP tests to fail on Win32. At least I'm reasonably certain the bug is in the server and not the client code, which means it's not my fault ;)
I had an opportunity to muck around a little with PyGTK this afternoon, helping a housemate plot a wave to a pixmap in a window. It turned out to be surprisingly difficult, mainly due to us making various incorrect assumptions. I stupidly assumed that the colormap's alloc method took 8-bit RGB values (I'm too used to HTML), whereas it took 16-bit, meaning that I everything I did seemed to come out black. The other big problem was that the pixmap persisted between invocations of the python script! That meant that making a change and trying that, then undoing the change and trying again would not give the same results as the previous time until we explicitly cleared the pixmap with a draw_rectangle call. GUI programming is painful.
A small problem that I occasionally bump into: sometimes you want to iterate over every 2nd item of a sequence (or more generally, every n'th item). I'm yet to find a satisfying solution to it, as it doesn't map cleanly onto a for loop, and slices don't support skipping n elements like that. You could do it with a generator that keeps a counter internally, or perhaps subseq = [seq[x] for x in range(0, len(seq), 2)]. Actually, that list comprehension isn't so bad, that didn't occur to me before. I guess I'm just feeling spoilt by Python's tuple unpacking that allows stuff like for a,(b,c) in [(1,(2,3)), (4,(5,6))]: ...
New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.
Keep up with the latest Advogato features by reading the Advogato status blog.
If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!