login
v2
v1

jmoiron.net

White Striped XML

posted May28th, 2003 @ 12:05:06

- tags: python

- comments: 0

While thinking over what to include as features for the Jonas Text Editor Experiment, XML struck my fancy as a way of creating a simple properties interface that was as extensible as it was clean and easy to parse. And then XML took my fancy and beat the ever living shit out of it.

Working with the glade interface designer as much as I have in the past week or so has left me really loving the ".glade" XML based doctype. Perusing through the file makes it extremely, extremely easy to determine what attributes belong to what widgets, and not only that but how to change the attributes. Both of these are important, and the more experience I get with true XML (not really the subset of xhtml), the more I think of it as important not only for the future of computing but for the future of open source.

Softpanorama has quite a few intelligent things to offer the random computer science student: and the 3 big C's (continuations, closures, and coroutines) might seem a bit off-kilter towards the norm in CS, I'm sure that even you can appreciate one of the hallmarks of truth I have garnered from this site. To paraphrase:

The real importance and innovation in Open Source software lies not with kernel hacking, but with scripting languages. The main thing that Open Source offers over commercial software is not the freedom of a license, but the freedom to manipulate the software. But as systems grow more complex, it takes an increasing ammount of time spent with the developers to grow familiar with the system in order to change it. In this way, Scripting languages, not low level hacking, offer the greatest advantages, in that the source is easily understanded and easily modifiable.

It could perhaps be said that the gentlemen at softpanorama have never tried to read perl code, but for those of us who use Python, those of us basically meaning myself in this context, the story could not be truer! And now my experience with XML leads me to believe that it is the next step; hopefully over the next few years the large tracts of (land) flat files that infect linux/unix will be cleaned up with neat, common format (common DTD) XML files.

But have you ever tried to read an XML DTD? They can be fucking complicated! Past the first line, it starts to lose me, which just goes to show that I need to really brush up on things. I realize that its defining its own tags, but its still quite complicated, and if I'm going to make my own (relatively simple and perhaps even ludicrously trivial) DTD for an XML file to save Jonas Text Editor configurations, then that's going to require quite a bit of time delving into XML. In fact, it looks like version 0.3 and 0.4 (0.2 was finished tonight; the next few days will be spent catching up the yet unstarted accompanying tutorial to where I am now) will rely heavily on the XML; hopefully it doesn't take me more than a week to pound that format out.

In other adventures in python syntax land, I decided to finaly formally induct myself into classes and object oriented flava, and realized that the language was even better than I had originally thought. After using C++'s awful syntax and being lost in the jungles of Java, Python once again has come to the rescue by making sense. Want to inherit A properties for your B class? class B(A): Operator overloading? add(self, rhs): It doesn't get much simpler or refreshing than that. And now that I know all of these things, I can't really explain why GTK is C and not C++; its set up to be absolutely perfect for multiple inheritence; but everything is coded manually. Oh wait, nevermind; they didn't want it to suck ass.

comments