August 30, 2003
Sonic Software challenges vendors to "Open Kimonos"
Now this is an interesting tactic. Sonic Software is claiming they're eliminating their license restrictions that prevented the publishing of benchmarks and are challenging others in the industry to do the same. I say, amen, these kinds of restrictions don't do anybody any good.
August 27, 2003
Java on Mac OS X
I mentioned in my rant about window proliferation on Mac OS X that I was looking at using JEdit as a solution. It turns out JEdit is almost a perfectly workable solution, through various plugins I was able to get it to do everything that I wanted and it felt close enough to a native app to not drive me crazy. Unfortunately, all is not well in this world.
The JDK on Mac OS X has some serious problems when running JEdit. With the 1.4 JDK the VM crashes far too often. This shouldn't be JEdit's fault as it's the VM that's crashing. Unless jEdit is running some native code a Java app should never be able to crash the VM. This wouldn't have been a huge deal as JEdit is really good about saving its current state, just restarting the app is a minor annoyance. However, the real problem is that sometimes when the VM crashes it takes the whole WindowServer process down with it. This results in instant termination of all your running apps and getting logged out of the system. To say that's a bit of a problem is an understatement.
When you install jEdit it recommends that you use the 1.3 VM. Unfortunately doing this also results in the loss of a number of functions (in particular mouse scroll wheel support) and substantially changes the display of the app (i.e. tab layouts). Also if you turn on the hardware acceleration it has problems with garbled text and incorrect positioning in text areas. Running without mouse scroll wheel support is extremely annoying.
I'm quite disappointed with the current situation of Java on Mac OS X for running GUI apps. I've had no problems with it running server apps, it seems most of the current problems can be traced to the things they're doing with Swing, i.e hardware acceleration and the switch to the Cocoa toolkit for GUIs in 1.4. This stuff will be great once it's fully stable, but I've heard nothing about progress in this area for some time.
I'm still trying to make do with jEdit running on the 1.3 VM with no hardware acceleration. However, I would definitely prefer to be able to take advantage of the 1.4 features, that scroll wheel thing can really spoil you.
Updated XQuery drafts
The W3C XML Query working group has released updates to five of the drafts that make up XQuery 1.0 and XPath 2.0.
- XML Path Language (XPath) 2.0
- XQuery 1.0: An XML Query Language
- XQuery 1.0 and XPath 2.0 Formal Semantics
- XML Query Use Cases
- XPath Requirements Version 2.0
If you're having trouble sleeping reading these should help you out.
Has Microsoft lost its marketing touch
A few years ago it was a common saying among geeks that Microsoft had horrible products, but great marketing. However, yesterday I was reading this post on Tabula PC about the marketing of OneNote and it occurred to me that it isn't just OneNote that is seeing marketing problems.
.Net is probably the most visible example of the problem. They screwed up the marketing on that so bad that hardly anyone could tell you what .Net really was. To go along with it you had disasters like Hailstorm where the marketing was vastly removed from what people would actually accept as a product and the backlash was strong enough to actually kill it in the womb. Other recent struggles include Smart Displays, Pocket PC Phone edition, WIndows XP media center, their DVR product(marketed so poorly I can't even remember its name) and most of all Tablet PC. You might also throw the XBox in there as well, but that one's probably OK given it's Microsoft 1.0 status. This is really surprising given all the pre-launch hype associated with just about all these products. The Tablet PC in particular received a lot of hype, but since they actually launched the product it seems marketing just ran off the rails. This was very clear when I went out to buy my Tablet PC. The only place that had any clue about Tablet PCs at all was the Franklin Covey store and that was obviously because the Tablet PC is the only computer that they sell.
It seems Microsoft can still pre-announce products with the best of them, but when it comes to actual shipping products they've lost the ability to effectively sell the products. Considering that most of the products I mentioned are consumer products that's not too encouraging for a marketing king like Microsoft. In fact, of all the products I listed, the only one that I believe might ultimately be considered a success is the XBox and even there I'm not too sure.
I believe, Microsoft, in their rush to be perceived as "innovative" is just throwing products against the wall to see what sticks. If that's the case, then that's an even better sign that they've lost their marketing touch. Pre-launch hype is probably a lot cheaper to create. At that point everyone has no choice but to accept what they say. However, once the product is actually shipping it's a different story. It seems to me that even though Microsoft has hoards of money, they're afraid of actually committing to what's really necessary to make the products successful.
August 26, 2003
SubEthaEdit 1.1.3
Well Hydra finally has a new name, SubEthaEdit and an absolutely horrible one it is too. Douglas Adams references aside. Oh well, I guess it's better then calling it #####.XSL-T to convert ISO8601 date to RFC 822 date
This is a partial implementation of an XSL-T template to covert from an ISO8601 date to an RFC 822 date. It isn't exactly correct, but it can serve as a starting point if you really need such a thing. I'm just posting it in case it might be useful to someone. I was going to use it to generate an RSS 2.0 feed, but decided to abandon it and just use Dublin Core dates that are already in ISO8601 format. This depends on the use of the EXSLT date functions.
<!-- Converts a date in ISO 8601 format into a date in RFC 822 format -->
<xsl:template name="rfc822Date">
<xsl:param name="isoDate"/>
<xsl:value-of select="date:day-abbreviation($isoDate)"/>, <xsl:value-of select="date:day-in-month($isoDate)"/><xsl:text> </xsl:text>
<xsl:value-of select="date:month-abbreviation($isoDate)"/><xsl:text> </xsl:text>
<xsl:value-of select="date:year($isoDate)"/><xsl:text> </xsl:text>
<!-- the timezone offset is currently hardcoded needs to be fixed -->
<xsl:value-of select="date:hour-in-day($isoDate)"/>:<xsl:value-of select="date:minute-in-hour($isoDate)"/>:<xsl:value-of select="date:second-in-minute($isoDate)"/> -0700
</xsl:template>
August 25, 2003
A new kind of eBook Reader
This is what I like to see, real thought given to the interaction model for new devices. I'd definitely like to see something like that included on a Tablet PC type device.
The Tablet PC is a very good eBook platform, although it's way too expensive to be used just for that purpose. What makes the Tablet PC such a good reader is that it's a general purpose system, this means that you can access eBooks in pretty much any format, including those like web pages that aren't really considered eBooks. Dedicated eBook readers are always limited to a small selection in proprietary formats and even if things like Open eBooks emerge there's still a lot of other things that you may want to be able to read in a portable fashion. The Tablet is quite good for that. There is hope for dedicated readers though, they just need to be vastly cheaper and have much better usability for the task then a more general purpose Tablet PC.
NetNewsWire 1.0.4
NetNewsWire 1.0.4 has been released. I've been using the beta and it's strange but I actually prefer the old broken renderer to the new Web Kit based renderer. Not sure why. I just started using it though so I'm sure I'll change my mind after a bit.
August 24, 2003
Desktop Pro Natural Keyboard
The last couple days I've been having some pain in my wrist and after examining how I was typing I decided it was time to switch back to a split keyboard. I had one of the original Microsoft Natural Keyboards several years ago, but ended up giving it to my girlfriend at the time. I liked it, but for some reason ended up preferring a regular keyboard again, don't remember why. Anyway, today I wanted to get another Natural Keyboard and it turns out Microsoft has really screwed up the product line. From what I can see they currently offer three different natural keyboards and all of them have compromises. Either they're PS2 only, have little tiny cursor keys, or are bundled with a mouse. I ended up with a Microsoft Optical Desktop Pro which is a combo keyboard mouse deal. I'm not too enthused about having to buy the mouse, but there was no option. I needed a USB keyboard with normal sized arrow keys and this is the only one Microsoft makes anymore. I also didn't want a wireless keyboard as batteries are just an extra expense for no real benefit. I never move the keyboard off the desk. Ugg, oh well. Anyway, the keyboard itself is pretty decent and the drivers for Mac OS X seem to work pretty well.
I spent about an hour remapping all the special keys on the keyboard and I think they make a great addition. You can pretty much program them to do whatever you want. With the media control center on the keyboard you also don't lose any of the functionality of the standard Apple Pro keyboard. Actually you pick up quite a bit like being able to hit play and having it launch iTunes and start playing automatically plus easily skip forward and backward. That's a great feature that I had previously been using PTHiTunesNotifier to provide via multikey hot keys. I'm actually a little surprised, but Microsoft did a great job of integrating the keyboard with Mac OS X.
The bad thing about this combo is that the mouse isn't all that great. It's designed to be usable in either hand and suffers a poorly designed shape because of this. My initial thought was that I would just keep using my Logitech Cordless MouseMan Optical and hook the Microsoft mouse to my Tablet PC, unfortunately, the mouse and keyboard share the same receiver so that's not possible. So I either end up ditching the Microsoft mouse and keep using the Logitech, or I use the Microsoft mouse and hook the Logitech to my tablet. I'd just as soon not have the mouse at all, it's very disappointing that they only sell this as a bundle.
Another small complaint about this is that the receiver is rather large and has an extra PS2 connector on the end. This isn't a huge deal really, it just conflicts with my desire for clean design.
Overall if you need a split keyboard for a Macintosh running OS X, the Optical Desktop Pro isn't a bad choice. It's just unfortunate that the price is inflated by the inclusion of an inferior quality mouse. Oh yeah, the whole point of buying this thing was to relax my wrists. They're definitely feeling much better now.
Is sourceforge melting
What is up with Sourceforge lately, it seems that everything that is hosted there just crawls now. It's particularly bad tonight, but I've been noticing this for a while, it's so slooooow.
libxslt Extension Functions in Python
This is just a note about writing extension functions for libxslt. The documentation on this is slim at best and the only example that comes with libxslt is minimal.
I'm working on a project where I wanted to run a piece of text through a textile processor and then insert the result into the result tree of the XSL document. I thought this would be pretty simple, but it turned out to be a bit more work then I expected. Here's the code that finally works.
Update: the original version of this code inserted the output directly into the tree. That's probably not what you want to really do, so I updated it to return the content.
def textile_process(ctx, content):
"""
An XSL-T extension function to process textile formatting included in a post.
"""
try:
node = libxml2.xmlNode(_obj=content[0])
parserContext = libxslt.xpathParserContext(_obj=ctx)
xpathContext = parserContext.context()
resultContext = xpathContext.transformContext()
source = "<div>" + textile.textile(node.content) + "</div>"
doc = libxml2.parseDoc(source)
root = doc.getRootElement()
root.unlinkNode()
# If you do this you insert the result directly into the output tree
# resultContext.insertNode().addChild(root)
return [root]
except Exception, err:
sys.stderr.write("Context error " + str(err))
return ""
The tricky parts about this code are converting all parameters into the right types and getting to the pieces of the documents that you need. The problem is that the parameters come in as raw PyCObject instances so you have to convert to the more specific object types manually.
For the way I was using this function the content parameter contains a list with one item and that item is an xmlNode. So the code.
node = libxml2.xmlNode(_obj=content[0])
converts the PyCObject into an xmlNode instance that you can then use as you usually would. You have to do similar things with the xpathParserContext that comes in as the first parameter. From the xpathParserContext you then have to get an xpathContext and from that you get the context for the result document. The xpathContext variable provides a reference into the source document and the resultContext variable provides access to the document being created.
Update: this paragraph applies to the commented out version of the original code. One confusing thing about the resultContext is the use of the insertNode() method. At first I thought that was inserting a new node into the result document, what it really is doing is requesting the node under which the result of the function will be inserted. It would probably have been clearer if the method was named getInsertionNode() or something like that.
Now that this is working it's pretty slick, but it sure took a while to figure out exactly what needed to happen.
August 21, 2003
SCO CEO says IBM behind open source attacks
This is the most bizarre thing I've ever read. If these comments are real then they are not the comments of a sane person. SCO shareholders need to be seriously questioning what in the world they're doing with this guy at the helm.
libxml2 2.5.10 and libxslt 1.0.32 released
Daniel Veillard has released new versions of libxml2 and libxslt, classifying the libxml2 release as a "major bugfix release", and writing that libxml2 2.5.9 and 2.5.10 "include a lot of bugfixes spanning the whole library; upgrading is strongly recommended." The libxslt 1.0.32 release is also significant in that it is the first to include Python bindings for extension elements. [xmlhack]
I've been using libxml2 in Python a lot lately. It's the first XML parser I actually like, mainly because of the very convenient XPath API.
August 20, 2003
Interview with a Developer of ##### (aka Hydra)
O'Reilly is running an interesting interview with one of the developers of the app formally known as Hydra. It's interesting to read about their motivations and it's completely discouraging to think again about the problems they're having with the name.
Review: Neil Young & Crazy Horse Greendale
For some reason I've never paid any attention to Neil Young. He's been around about forever and I'm sure I've heard many of his songs before but I sure couldn't name one. I listen to an incredible variety of music too, but there's a big hole around the country rock area, especially from artists that were big in the 70s. Neil Young definitely falls into that category, but a few days ago he showed up as the number one artist on Rhapsody. This piqued my curiosity, so I had to check it out. It turns out Rhapsody had released his new album Greendale a few days early.
At first listen I didn't care for this album at all. Neil Young's voice is well, let's just say it takes some getting used to. Coming into this album with no knowledge of prior work means it was all new to me. It turns out this is a concept album that tells the story of the Greens from a fictional town Greendale California. This makes the album a series of stories more then it does typical songs. This is clearly the country influence showing through. You could just as easily imagine Johnny Cash singing these songs as Neil Young. However, the music is different. It reminds me much more of modern delta blues then it does country. But that's more in feeling then it is in the actual notes that are played. This probably doesn't make much sense. Anyway, it's a dirty sound, driven forward by unrelenting drumming that constantly reminds me of people like R.L. Burnside and Junior Kimbrough. The guitar is particularly distinctive. I'm not too knowledgeable about guitar effects so I'm not sure if the effect is distortion or feedback or something else, but I really like the way it's used. I guess it's a common sound for Neil Young.
The production of this album is another thing that reminds me of people like Junior Kimbrough, meaning it's raw. For this album it shouldn't be any other way. This is music that's rough with a retro americana sound that blends blues, country and rock into a fascinating mix. I guess that describes most of Neil Young's output, so maybe this isn't much different. Particular standout tracks include Devil's Sidewalk, Double E and Sun Green.
In the end, even though I didn't care much for this at first, it's now moved into the top spot in my current rotation. I'm really surprised by this, but I absolutely love this album. If you check it out, just make sure you give it some time.
Now this brings up another one of the absolutely incredible features of Rhapsody. After starting to get into Greendale I decided I wanted to explore some of Neil Young's other work. In the past I would have had to go out and buy a bunch of CDs, now it's just a few mouse clicks to have access to virtually his entire recorded output. Rhapsody has 33 Neil Young solo recordings that can be explored to any depth. This is what I've wanted out of a music service, it's incredible. I can't even begin to recommend Rhapsody strongly enough. If you're a Macintosh user, just buy a cheap $100 used PC, slap Windows whatever on it, install the Microsoft Remote Desktop Client and follow my instructions for hooking up the sound. Rhapsody certainly can be improved, but as it stands right now it is absolutely worth the $9.99 per month.
August 19, 2003
OneNote Pricing Announced
Microsoft has finally announced the pricing for Microsoft OneNote. It's $199, but the article says there's a $100 rebate. Of course it won't actually be available until Oct. 21.
I've been using the OneNote beta on my Tablet PC and it's the first piece of Microsoft software that I've seen in a long time that I actually like. It's an excellent piece of software, however at $199 it's way over priced. Typical for something that's from the Office group at Microsoft. If there really is a $100 rebate without some stupid catch I'll probably buy it, but at $199 I may have to pass. That's really too bad as it's turning out that there are only two things I use my Tablet PC for, reading and taking notes in OneNote.
Java Programmers Unite: Say NO To Python
In his comparison of Java and Python productivity, Steve Ferg notes that: A programmer can be significantly more productive in... Via: Nu Cardboard
This is kind of funny, but I do agree with the assessment that Python is vastly more productive then Java. I spent several years working with Java and in retrospect it was astonishingly unproductive. This included a project where I converted a team development effort from Perl to Java for all the reasons that are commonly stated for making such moves. In retrospect that was a horrible decision. I did it under the belief that we would have a more scalable process, more stable code and ultimately faster development of new applications because of this. It never really worked out that way and this was with Perl. I really regret making that move even though Perl is a far worse language for team projects then Python is. Over the last few months I've been working more and more with Python and I'm pretty convinced that the difference in raw productivity makes up for any loss from static typing and a compilation phase. I believe the same applies to Perl, although not quite as much.
What's important to understand about running scripting languages in large projects is you have to have good tests. When we were using Perl we had lots of unit tests, however when we switched to Java the code itself took too much precedence and the creation of unit tests suffered. Sure it's nice to have a testing policy, but schedule pressure can have nasty ways of interfering, especially when the overhead of the language is slowing things down. In the end our system became even harder to change then when we started out. The problem of course is that just because a language is statically typed and compiled it does not remove the need to write tests. So you're now taking on the burden of a less productive language while not shedding the burden of writing comprehensive tests. In addition, because of the static typing, compilation phase and OO access protection features of languages like Java your tests have also become much harder to write.
Because of this, I'm really starting to believe that efforts to improve software quality by tightening up the language features through stronger typing and rigid language features are really the wrong approach. I tend to believe a more profitable future will be attained by making languages easier to use and building in mechanisms that improve the testability of code. My feeling is that it isn't really important that you pass the right type to the right method, what's important is that the code does what it is supposed to do. Passing the right type to the right method may be a precondition for this, however it is not sufficient to guarantee it, and that to me just makes it overhead. Tests are still required. If dealing with all the static typing and compilation phases makes test development suffer, then I tend to believe those features are counterproductive and just get in the way.
August 18, 2003
Still thinking about Blosxom
I'm still thinking about converting this site to running on a Blosxom derivative, in particular on Pyblosxom. I spent a fair amount of time over the last week getting everything working in a test setup and I've worked everything out, except I'm worried about the performance of it. Even running on my dual 1.25Ghz Powermac there's a noticeable delay when viewing a page. This concerns me as the server this site runs on is only a dual 266Mhz Pentium II. I haven't tested it on this machine yet. This really shouldn't be a major problem as this site doesn't get all that much traffic and the network is kind of slow anyway, but CGI scripts always bug me. This is the one good thing about MovableType, it's slow to post, but that's because it creates static pages for everything.
The Perl version of Blosxom can also be used to generate static pages, the Python version can't.
So far I've written four plugins for Pybosxom to make it as compatible with the current site as possible. I had to add RSS 1.0 support, Textile formatting support and a post body summarize function. Along with these I also created a new plugin that tracks referrers and hit counts on a per post basis. That one was more my experimenting with Berkeley DB XML then anything, but it's very useful.
Anyway, now I'm stuck trying to decide whether to go with Pyblosxom, go with the original Perl Blosxom or to punt on the whole thing and just stick with MovableType.
More on Naming
A couple days ago I was commenting on the naming woes being encountered by Hydra. Another project that's had naming woes has been the Pie/Echo/Atom/call it what you want effort to create a new weblog API and syndication format. The project is still looking for a name so I added one to the candidates. Synopen is both a nonsense name and can also stand for open syndication. Hopefully a final name will be chosen before too much longer.
August 15, 2003
PostrgreSQL and XML
I just came across another project to add some XML support to PostgreSQL, xpsql. It looks like it's pretty rough at this point, but development is ongoing. There's also an older post about some different support, but I don't know if the code was ever released. I'm kind of surprised this type of thing has been so slow in coming.
August 14, 2003
A peek at X#
Linked from this blog entry is a paper that gives some insight into Microsoft's XML programming language that has been called X# by some people. It looks like they're doing more then just integrating XML into the language, they're also integrating relational database access. The paper's a very interesting read.
Windows, windows everywhere
There's one thing that absolutely drives me crazy about Mac OS X and that's the proliferation of windows. I've been using Hydra (aka #####) as my editor of choice for the last few months and the number of windows I end up with is astonishing. I've been aggressive at closing stuff and right now I still have 18 windows open in Hydra alone. Back when my machine was having to reboot every day or so it wasn't a huge problem, but now that it's finally stable I can't take it anymore. I have never understood why people think having so many windows is a good thing, but all the major Mac OS X text editors are like this. The only exception is Project Builder, which unfortunately isn't all that great as a general purpose editor.
Today I finally broke down and downloaded jEdit again. This was my editor of choice back when I used Linux all the time. When I moved to Mac OS X I stopped using it because at that point in time Java was just too slow on Mac OS X. I've looked at jEdit off and on since then and have always been annoyed by it because it's just ugly and I really wanted to use a Cocoa application as an editor since I use TextExtras. Anyway, the thing I liked about jEdit is that everything is in one window and you can have your choice of ways to manage open documents. I prefer the tabbed approach and that was what I always used on Linux. It is so much more productive then trying to find a particular window in a whole mess of windows or even finding it in the list on the window menu.
What perplexes me is that people screamed like crazy for tabs in Safari and I see constant criticism (including my own) of Omniweb because it doesn't have tabs, yet every other Mac application has a gazillion windows. This doesn't make much sense to me. If tabs are good in Safari they should be good in a text editor or any other application too. Maybe I just don't understand this particular Macism.
At least to me it seems there's a real need for a solid Cocoa editor for Mac OS X that supports good syntax highlighting, has a good plugin architecture and doesn't open a new window for every file. Project Builder could actually be good if it had a better way to access files in the file system without adding them to a project. The way it works now is good for things like Cocoa applications where you have a bunch of files that make up the project, it just doesn't work very well for writing Python scripts and such. If it could just add a file system browser along with the project browser it would probably be workable.
One thing I am curious about, is if my opinion will change once Panther is out and I can use Expose. I've been seeing comments that people are starting to use tabs in Safari less often because of this. I hope that's the case, because the current window proliferation is really unproductive and in my opinion a fairly significant flaw with the Mac experience. I wonder if I'll even be able to read the windows in Expose, I must have 60 windows open right now.
Google Calculator
Google has a calculator. You just type an expression in the search field and it gives you the results. First thought ... how useless. Second thought, does it work from the search box in Safari, yes of course. Third thought, how very useful, it's actually faster then firing up calculator and clicking on the buttons (don't know why I always click instead of type the numbers, stupid me). Google: web services that actually work.
Latest Rhapsody Discoveries
Just wanted to point out some more great music I've discovered through listen.com Rhapsody. There's so much great stuff there. This time around I'm recommending Fischerspooner and Yerba Beuna.
Fischerspooner is a group I just shouldn't like, but do. They play 80s style new wave/techno pop complete with all the blips and bleeps that were so common in that music. I don't know what it is about them that makes it work, but it does. i guess there's just enough fusion of elements from other styles of music that it keeps the music from sounding like a bad 80s rehash. I shouldn't like them, but for some reason I love it.
Now explaining Yerba Beuna is tough, they're kind of a fusion between Santana, Beuna Vista Social Club, Nelly, Tito Peunte and maybe some Portishead. So I guess that makes them Latin Hip Hop Jazz Rock Trip Hop or something. I don't really know, but their sound has a really great vibe. The only thing that can be stated clearly is that they are latin music so if you don't like latin music you won't like this, also if you can't stand Hip Hop/Rap you probably won't like some of the songs either. Me? I think it's great.
10 Python Pitfalls
A good list of common problems in Python. I like Python, but I'm anything but an expert so I learned a thing or two from this.
Legal Troubles For Hydra
Hydra is in trouble over their name. This naming thing is starting to get really annoying. If you ever wondered why the Xindice project has such a weird name, here's your answer. When I came up with the Xindice name I spent a lot of time using the Babelfish translator and google searches to come up with something that was somewhat meaningful somewhere, yet didn't show up in Google results. Indice is Spanish and Italian (among others) for index, it's also used in english as a plural form of index. Xindice is a made up word of course, but at least now when you type it into a search engine you're pretty much sure you'll get information about the Xindice native XML database. It also means the probability of a naming conflict is small. Obviously Google isn't authoritative on global naming, but it's better then nothing when you can't afford a trademark lawyer. I like naming things using made up words.August 12, 2003
Weblog Link Series
Shelley Powers has published an excellent series of articles about linking in Weblogs.
- Part 1 -- The Impermanence of Permalinks
- Part 2 -- Re-weaving the Broken Web
- Part 3 -- Architectural Changes for Friendly Permalinking
- Part 4 -- Sweeping out the webs
Since I'm thinking about making a move with this site, Part 2 was particularly interesting. In my case though, I fortunately have the luxury of just leaving everything in place. The only thing that bugs me a little about that is that I'll need to keep a working MovableType system running to handle comments and such. I'd prefer to just be able to shut it down.
Ahh, sweet uptime
12:25AM up 7 days, 8:52, 2 users, load averages: 0.19, 0.24, 0.30
Seven days seems like such a small achievement, but it's been a real struggle to get there with my desktop PowerMac. This is the first time that machine has stayed up that long, ever! This is what Mac OS X is supposed to be like. Not a single application crash all week either. So let me redouble my recommendation that if you buy RAM for a PowerMac, buy it from Crucial.
August 11, 2003
eXist 0.9.2 Released
Wolfgang Meier just announced the release of eXist 0.9.2. Here's the text of the announcement.
I'm pleased to announce that release 0.9.2 is now available on sourceforge.
For those who have not been able to follow the discussions on this list,
here's a quick summary of changes:This is the first official release with support for XUpdate. Also, much effort
has been invested to ensure that other character encodings than Latin 1 are
correctly processed by the database as well as the query engine. This applies
in particular to East Asian languages and scripts. Further changes include:
important missing parts of the XPath spec have been implemented, more
synchronization and database corruption issues have been addressed,
interfaces improved, and dozens of bugs fixed.
Mac Keyboard Shortcuts
This is a must read/bookmark for any Mac user. A list of all the standard keyboard shortcuts.
158 New Products
Apparently HP has announced 158 new products, all at the same time! Seems their marketing department may have gotten a little carried away. Guess they wanted to get noticed for quantity if nothing else. It appears that despite the land slide of new products, a new Tablet PC wasn't among them.
August 10, 2003
Thinking about Blosxom
I'm thinking about moving this site to Blosxom from MovableType. I'm getting annoyed with a lot of things about MovableType, in particular how slow it is when publishing. Each time I add a post it gets a little slower and it's starting to really bug me. I'm also annoyed by how cumbersome it is to edit templates, especially since I have more then one blog and they all use the same templates. I also like the way NetNewsWire handles Blosxom blogs, it shows you the hierarchy and all posts you've made at all times. With MovableType you only get your recent posts and if you restart NetNewsWire you'll only get the last 10 or so posts you've made. This makes it really cumbersome to go back and edit your old posts. There are many other little things as well that are bugging me as I use this system more.
I really like the simple, simple file based mechanism that Blosxom uses. I've always considered MovableType's use of a database as massive overkill (even if it is just MySQL). I also like the idea of being able to build the whole thing locally and then just shove it up on the server with nothing major needing to be installed on the server.
After reading through the documentation it looks like the one problem area with Blosxom may be categories. I tend to add posts into several different categories, but it looks like Blosxom may only support one category for each post. I'll explore this a little more to find out for sure, but it can't be that hard to make it use symlinks or something to do it.
I found this site which has some pretty good information on making the move.
There's also a version written in Python that looks interesting. Hmm, that could actually be fun. Blosxom is written in Perl and even though I'm perfectly comfortable writing Perl code, it's not something I really enjoy anymore. Python, however I do like. Very, very tempting.
If I do make this move it will be the fourth time I've changed the software I use for this blog. Ugh! Sadly, it probably won't be the last either.
PyObjC gearing up for 1.0
This week Ronald Oussoren posted the following on the PyObjC mailing list: I think it is about time to do a 1.0 release. All bugs I know of have been fixed, and the end-user documentation is good enough. That doesn't... [Artima Python Buzz] Excellent! PyObjC is a very cool project. Especially since I like the XML support in Python so much better then what's available in Objective C.Namespace training wheels
The namespaces in XML debate just never dies, Jon Udell has a new take on his perspective at InfoWorld.com.
August 09, 2003
Installing Berkeley DB XML on Mac OS X with Python and Perl API support
I just wanted to post some notes about installing Sleepycat Berkeley DB XML on Mac OS X 10.2 with Perl and Python support. The builds are relatively straight forward and Sleepycat has posted a simple script to help build Berkeley DB XML it self. However, it isn't clear what is necessary to get Perl and Python working.
The most important thing, before you start compiling anything, make sure you have the latest GCC 3.3 from Apple. This is distributed as a patch to the December 2002 developer tools. This is critical, without it Python and Perl support will not work.
Next, unfortunately, you'll have to build a new Perl and Python. The Mac OS X 10.2 Python should be the right version, but I couldn't get it to work. Building a fresh Python 2.3 does work. For Perl, Mac OS X includes Perl 5.6 and Berkeley DB XML requires 5.6.1 so you have to build a new one. I used Perl 5.8.0 and it seems to work fine. So you have to build a new Python, a new Perl and the Berkeley DB XML distribution. These should all build using the standard instructions and for DB XML you can use their script.
Once you have all that built, you can then build the DB XML Perl and Python libraries.
For Python you first need to build and install bsddb3, once that's done you can build the python support for DB XML in the usual Python fashion. Make sure the python you're using is the one you built previously. Unless you specified otherwise, it's installed in /usr/local/bin/python.
cd dbxml-1.1.0/src/python
/usr/local/bin/python setup.py build
sudo /usr/local/bin/python setup.py install
There's an example Python program in dbxml-1.1.0/examples/python/examples.py that you can run to test the build.
For Perl you just build it in the usual Perl manner. Again, make sure you use the perl you compiled.
cd dbxml-1.1.0/src/perl
/usr/local/bin/perl Makefile.PL
make
sudo make install
There are some examples for the Perl API in dbxml-1.1.0/src/perl/examples.
XML Document Construction With Python and libxml2
The libxml Python API is very lightly documented, so this is an attempt to fill in some of the holes that exist.
Creating a new document
To create a new document using the libxml2 API you use a document constructor function that returns an empty document instance. This method takes one argument that repesents the XML version of the document being created.
import libxml2
doc = libxml2.newDoc("1.0")
Creating elements
Once you have a document instance you then need to add elements to it. First off you need to create the root element.
root = doc.newChild(None, "root-element", None)
The root node is created using the xmlDoc.newChild() method. This method takes three parameters.
- namespace - The namespace that the element should belong to or
Noneif no namespace. - node name - The name of the node with no namespace prefix.
- element content - The content for the element or
Noneif the element is empty.
In this particular case we're creating an empty element named root-element. If we were to print this out at this point it would look something like this.
<?xml version="1.0"?> <root-element/>
If we wanted to put the node into a namespace we would write this instead.
root = doc.newChild(None, "root-element", None)
namespace = root.newNs("http://example.com/sample", "sample")
root.setNs(namespace)
The resulting document then becomes.
<?xml version="1.0"?> <sample:root-element xmlns:sample="http://example.com/sample"/>
Now that we've created the root we can continue adding elements to the document. We can add a element child-node in the http://example.com/sample namespace by adding.
child = root.newChild(namespace, "child-node", None)
And our document now looks like
<?xml version="1.0"?>
<sample:root-element xmlns:sample="http://example.com/sample">
<sample:child-node/>
</sample:root-element>
If we had wanted to included some text within the added child it's as simple as just changing the third parameter to newChild.
child = root.newChild(namespace, "child-node", "Some sample text")
Which generates the document
<?xml version="1.0"?>
<sample:root-element xmlns:sample="http://example.com/sample">
<sample:child-node>Some sample text</sample:child-node>
</sample:root-element>
Adding an attribute to an element is also very easy.
child = root.newChild(namespace, "child-node", "Some sample text")
child.setProp("an-attribute", "with a value")
Which of course generates a document that looks like this.
<?xml version="1.0"?>
<sample:root-element xmlns:sample="http://example.com/sample">
<sample:child-node an-attribute="with a value">Some sample text</sample:child-node>
</sample:root-element>
If you wanted the attribute to be part of a namespace, you use setNsProp instead of setProp.
child = root.newChild(namespace, "child-node", "Some sample text") child.setNsProp(namespace, "an-attribute", "with a value")
And the result
<?xml version="1.0"?>
<sample:root-element xmlns:sample="http://example.com/sample">
<sample:child-node sample:an-attribute="with a value">Some sample text</sample:child-node>
</sample:root-element>
Beside simple elements and attributes libxml defines methods to create all the other common XML types. Here's a summary of the methods that are available.
xmlDoc.newDocComment(comment)- Creates a comment node.xmlDoc.newCDataBlock(content, length)- Create a CDATA section.xmlDoc.newDocText(content)- Creates a new text node.
These methods are all node construction methods that are called to create the instance of the required type. Once you have the instance you then need to add it into the document tree where ever you want it. There's also a function available to create processing instructions. This function differs in that it called on the libxml2 module, rather then an xmlDoc instance.
libxml2.newPI (name, content)- Creates a processing instruction
Since these functions require you to create the node and then add it to the document in two steps, libxml provides a number of methods to control where the node is placed in the document tree. These methods are available on any instance of an xmlNode.
xmlNode.addChild(node)- Appends the new node to the list of children for the node.xmlNode.addChildList(nodeList)- Appends a list of new nodes to the children for the node.xmlNode.addNextSibling(node)- Adds the new node as a sibling after the selected node.xmlNode.addPrevSibling(node)- Adds the new node as a sibling before the selected node.xmlNode.addSibling(node)- Adds the new node as a sibling after the selected node. (similar to addNextSibling)xmlNode.addContent(content)- Appends additional text content to an element.
Here's an example that puts everything together.
#!/usr/local/bin/python
import libxml2
doc = libxml2.newDoc("1.0")
root = doc.newChild(None, "root-element", None)
namespace = root.newNs("http://example.com/sample", "sample")
root.setNs(namespace)
child = root.newChild(namespace, "child-node", "Some sample text")
child.setNsProp(namespace, "an-attribute", "with a value")
comment = doc.newDocComment("Just commenting")
child.addPrevSibling(comment)
pi = libxml2.newPI("a-sample-pi", "with some useless content")
root.addPrevSibling(pi)
text = doc.newDocText(" This will be added to the existing text.")
child.addChild(text)
child.addContent(" This will also be added to the text")
print doc.serialize(None, 1)
And a final result.
<?xml version="1.0"?> <?a-sample-pi with some useless content?> <sample:root-element xmlns:sample="http://example.com/sample"> <!--Just commenting--> <sample:child-node sample:an-attribute="with a value">Some sample text This will be added to the existing text. This will also be added to the text</sample:child-node> </sample:root-element>
Another Reason to Like Rhapsody
A new reason to really like listen.com Rhapsody is they've started to add exclusive live sets from some really interesting jam bands. So far I've noticed several different bands and I've been listening to The Slip and Three Degrees of Freedom, both very cool for jam bands. If you don't know, a jam band thrives on live recordings, the Grateful Dead is probably the most well known and Phish has been fairly visible of late. I haven't really gotten into Phish (I've only heard studio work and they're supposedly best live), but I do like The Slip and Three Degrees of Freedom.
The Slip have one studio album which is probably worth a listen if you don't have a Rhapsody account. Rhapsody has nine live sets from the Slip and two from Three Degrees of Freedom. It doesn't look like Three Degrees of Freedom have released any CDs into wide distribution, but they do have a site with samples.
Bought Eclipse in Action
To check out the Manning eBooks process I went ahead and bought a copy of Eclipse in Action. It's a straight PDF, no stupid DRM. That makes it a very good value and means I'll probably be buying more eBooks from Manning in the future. I still have my eye on AspectJ in Action, but the Eclipse book is something I have more real use for. I've never bothered to sit down and learn how to use Eclipse, now I will.
Hopefully, with my Tablet PC, O'Reilly's Safari service and other sources of eBooks like Manning I'll never have to buy another 2" thick technical book again.
Manning Publishing eBooks
I just noticed that Manning is publishing their technical books in PDF format. It looks like the book is typically 50% off the cover price of the print edition. You buy them directly from the publisher. Even better, if you then decide to buy the print edition later they apply the purchase price of the eBook to the price of the printed edition.
I'm not positive, but it also looks like the books don't have any DRM to screw things up. If that's the case, this is another great step forward for eBooks in the technical field. Of course they have a license agreement that goes with the books, but it's basically what you'd expect. I'm tempted to pick up a copy of AspectJ in Action to try this out. If there's DRM I'll be pissed.
August 08, 2003
Another Omniweb feature
Just noticed that in Omniweb when you're viewing a web page it supports type down selection of links on the page. Just type the first few characters of the link and it will highlight the link and then you just hit enter to follow it. Pretty cool. Mozilla can sort of do this, but it doesn't seem to work as well. Safari, apparently, doesn't support it at all.
OmniWeb and eMusic
Unfortunately it looks like Omniweb has a bug that keeps it from working with eMusic. That's too bad, as Omniweb also has another feature that Safari lacks; the ability to control which files get automatically opened after download. This has always been annoying as it made downloading from eMusic a multistep process when using Safari. I just reported the bug, so hopefully it will get fixed soon.
OmniWeb 4.5 Final
OmniGroup has released the final release of OmniWeb 4.5. This is the first release of OmniWeb that uses the Safari rendering engine and it seems quite nice.
OmniWeb was the first browser I used regularly after getting annoyed with IE. It always rendered beautifully, but suffered from poor performance and weak standards support. With the new release both of those problems have been solved and it still renders beautifully. It's really interesting to compare how it looks to Safari. Even though they use the same engine, Omniweb still comes out looking better. For one thing, they use different default fonts and colors and I like OmniGroup's choices. It's actually really surprising how much of a difference there is.
It's great to see this release. A lot of people thought Safari would mean the death of Omniweb, but Omnigroup is smart and now we can get two different interpretations on the same basic rendering engine. I don't know how much I'll use Omniweb, but this release puts them back on the playing field and it's fun to check it out. Here's what I see so far that I really like.
- HTML source view with syntax checking and highlighting. This has been in Omniweb for a while, but it's a nice feature and much better then the very basic source view in Safari.
- Better looking fonts.
- Spell checking turned on by default. Safari supports spell checking but you have to turn it on for each text field, which is really pretty silly.
- Searchable history so that you can search sites you've visited yet can't quite remember where you saw something. Seems like a feature that could be quite useful. May have been in old Omniwebs, but I wasn't aware of it at the time if it was.
- Auto checking of bookmarks to tell you when they've been modified. This is a feature that I was actually thinking of firing up Omniweb to try out again. It might be enough to get me to use it more as I'm working on a project where I want to monitor a large number of sites for changes.
- Omniweb isn't overly aggressive when caching files like Safari. I had such a problem with this when editing my MovableType templates that I had to start using Mozilla to do all the edits.
- And the number one killer feature that no other browser has, zoomable text fields. This is an awesome feature that gets you out of the stupid fixed size text areas that are so annoying on web sites. When you use a text area Omniweb adds a little button above the scroll bar that zooms it out into a new window that is fully resizable. Outstanding! I'm going to play with this more, but this feature alone may be enough to get me to use Omniweb as my main browser. Like Safari's aggressive caching this has been a major problem in editing the MovableType templates as the text area is always too small.
Hmm, OK, I'm liking this thing more and more. I'm going to give it another day or two and then I'll probably spring for a license. The only thing missing is tabs, we'll see if I can live without them. I'd definitely say Omniweb is back and I'm really looking forward to seeing what comes in the future now that they can focus on value add rather then just rendering problems.
Walk Through Fog Screen
Now this is pretty cool. A projection screen made of fog that you can walk through. Could take grand entrances at football games to an all new level.
August 06, 2003
Saxon does XQuery
i just discovered that Saxon now includes support for XQuery. Probably old news for people in the XSL community, but news to me. I'm not much of a fan of XQuery, but it looks like Saxon will finally bring a usable implementation to play with. There's a discussion starting about using it to implement XQuery in Xindice. Unfortunately, it's under the Mozilla Public License which will probably kill that idea.
Rhapsody Discoveries
While browsing around on Rhapsody I came across Eden Atwood. She's a fairly unknown Jazz singer along the lines of Diana Krall. Overall quite enjoyable when you want something soothing that doesn't go over the edge into complete tripe. It's real music.
Also discovered the new Patricia Barber album.
I discovered Partricia Barber when I got into vinyl a few years ago. Her albums sound really incredible on audiophile vinyl played on a good turntable. She's another female jazz singer, but a little more progressive then a Diana Krall or Eden Atwood. Overall great stuff. I recommend both of these albums, Cafe Blue in particular.
Ooh, just noticed Amazon also has these on SACD. That's almost as good as the vinyl. Expensive though.
Is Redhat the Windows of Linux?
A friend of mine just launched his new blog, [Whitespur] and is discussing his switching from FreeBSD to Linux. What perplexes me though, he's a Macintosh user who runs Mac OS X on his Powerbook. Guess he's just talking about his desktop PC, so he's really a double switcher. You don't see many stories about people switching from FreeBSD to Linux. In fact I expect with the unfortunate FUD campaign underway by SCO, we're going to see more stories about going from Linux to FreeBSD.