Posted on 27 Feb 2003
I always have enjoyed comments and criticisms from Jamie Zawinski. His insight into this industry, and the communities of this industry are unique, and combined with his sense of humor, it makes for some of the best comments you are likely to read.
Recently Jamie wrote some comments about how those of us in the open source world, and in particular gnome likes to rewrite software gratuitously. I happen to agree with him
Today I upgraded my gnome installation to gnome 2.2. The application I use the most is the terminal. For a long time I had been using happily gnome-terminal which used Michael Zucchi's fast Zvt widget. The UI code was written mostly by me. This terminal had the advantage of being easy to customize and was fast (both at input and output. Keep this in mind). It supported dingus clicking, as well as mouse input, was an international terminal and I was happy.
With Gnome 2, an effort was made to improve the user interface. The "terminal class" concept from gnome-terminal 1.0 was considered too complicated, so a new effort to rebuild gnome terminal from scratch was started and completed by Havoc. This terminal became the new gnome-terminal for gnome 2.0. During the rewriting process a number of features that people had requested were dropped (flags to control the behavior of "logging" the presence of the user: update utmp, wtmp, lastlog) so I promptly filed bug reports for it. Those bug reports were promptly closed, and marked as duplicate because more information was needed (the xterm man page had this). Eventually all this information got logged into another bug and I guess someday it will be implemented.
Anyways, am a grown up man, and I can live with the defaults. If I need to tweak something, I figured `I have the source code'
Today I upgraded to Gnome 2.2. This new version of Gnome includes a new gnome-terminal that drops support for Zvt and instead uses a new terminal widget called Vte. Vte is different from Zvt in that it uses more of the traditional Gimp/Gtk coding style and apparently will be easier to maintain. But the main difference is that Vte is not an xterm emulator, instead it is a terminal emulator that will emulate any terminal, given a terminfo definition for it. This is an interesting academic excercise, no doubt about this. I had my reservations about whether Vte's academic background was good enough as a terminal solution. As I still depend heavily on my terminal, and I still use Midnight Commander as my file manager a good terminal is important.
You could arge argue that terminfo is not a complete definition of a terminal, but only the subset that was used for terminfo/curses, but lets not get these facts get in the way of innovation.
Anyways, my first attempt at using vte with the mouse failed. Apparently events are sent for up to some number of columns, but not all. So it is useless if you want to click on the right pane of mc.
To be fair, Vte lets you use any font on the system, and not only those that were monospaced fonts, which is nice.
Later, I was faced with the slowness of the terminal. I have a P4 running at 1.8ghz. I turned off anti-aliasing (everyone told me to). But it still was slow, for instance if you have a window on top of it, and you drag it around, the widget takes a *long time* to repaint. I mean, significantly longer than OpenOffice or Mozilla take to repaint.
Haven given up on coffee and Sawfish I figured I could also give up dragging windows around. There is really no need to drag windows around see note . But it was still slow, very slow. Someone reported:
fejj: lets put it this way fejj: nautilus 1.0 can render my home directory faster than vte can render the output from `ls` fejj: in my home directory
For those of you non-Gnomites, Nautilus is the Gnome File Manager, and a few years ago, it had a reputation for being slow.
It is also annoying that a compile will take 50% of the time on gcc, and the other 50% by your terminal process as it scrolls the window.
I did not want to spend all day fixing gnome-terminal, so I ran `xterm'. There is enough a man can do and still get something done in the day.
Well, turns out that the default xterm colors are the most annoying ever put together for an application. They hurt my aged eyes.
Next stop: Konsole. As much as it pained me, I installed KDE to run Konsole. I just wanted to get my work done, and I had heard good things about it. Konsole has a complex configuration menu, a lot harder to use than the clean gnome-terminal, but nothing that would require a PhD, as I figured it out in the time it took for the menu to popup. Ugly, crowded, but functional.
I was partially happy. Konsole performed decently speed wise, but it consumed too much memory. I guess it is designed to run on rendering farms. I have enough memory, so I did not particularly care about the 12 megs used at startup. But unlike gnome-terminal which uses a single process to render multiple windows (a nice memory saver), every time you start konsole, a whole process is launched. I could survive, thanks to my loyal 512 meg on-board simm chip. But when I was editing a file, and holding the cursor key down, I noticed an unbearable lag. Konsole was good for text output, and re-rendering of its window, but it is just unbearable for text input.
Me, being the savvy `configure; make; make install' kind of user, decided to build my own gnome-terminal with Zvt. Well, surprise. There is no more support for Zvt in gnome-terminal in the main branch on CVS. Time to use my cvs skills to check out a version of Gnome Terminal that used Zvt. I did so, but the new Zvt has been hacked to use Pango, and it is just as slow as Zvt. I can understand why they dropped support for Zvt: it is now as slow as Vte and I guess if you want to emulate a Wyse-66 it will do it.
I rapidly added to my to-do list `Get an old Zvt, get an old gnome-terminal package', but for now, I wanted to get some work done.
I tried rxvt. That terminal emulator is still as bad as it was five years ago. Next.
Am back at using xterm. The UI leaves a lot to be desired, but it took me only 5 minutes to find the decent colors from gnome-terminal and paste them into the .Xdefaults file, load the resources database into the server, and another 5 minutes to add that to my session startup. I look forward to reincarnate Zvt and Gnome Terminal from its ashes one day.
Five years after Gnome, and am back with the hated xterm. Jamie's post on the `cascade of attention-deficit teenagers' development model resonated in my head.Update: I got Zvt 2.0 and GnomeTerminal 2.0 packages running on my machine (thanks to Duncan). This is very good news. Xterm was driving me crazy (it is actually *slower* than Zvt) and I had forgotten how to set a massive scrollback. Happiness in MiggyLand.
 Btw, there is a fabulous demo about a window manager that tries to always give the best space for a window in a multi-window desktop. Sadly, I lack any interest on it, as I like to run all my apps full-screen, and just keep an app per-desktop.
Do not forget to call your senator today: Move On's Virtual March on Washington
Blair faces a revolt, not everyone on the parliment believes a case for war has been made.
Australian legal experts warn that Attack on Iraq could end in International Court.
Posted on 26 Feb 2003
Paolo reports that a SIGSEGV takes a whole second to be handled in MacOS X on a high-end G4. Not even my PC/AT was so slow. (this is a null pointer dereference).
Posted on 21 Feb 2003
I am a simple programmer that learned perl out of the necessity to parse Unix formatted files and crunch some data. Just like everyone else.
Typically a crunching data script is born by visually inspecting the look of the file to be parsed, guessing how to parse it, write a perl loop and using the appropriate split or regular expression. Then you move on and do something useful with it.
Of course a quick glance at a file fails to reveal the underlying representation, or the rules used on it to handle corner cases. For example, parsing a comma-separated line is fine as long as there are no escape characters, or not quote-grouping, which is not always obvious during visual inspection. These special rules will appear unexpectedly in a production system, most likely because you only looked at a sample of the file, and not at all the possible combinations. God forbid you actually read the documentation for the file (and in an open source system, the challenge is to find documentation that actually matches the file format, but that is a separate story)
Recently I have been using XPath in .NET to parse, pull and extract information out of XML files. Before XPath I used to be one of those `find the node, now call a function to search the matching children node, repeat until found'-kind of person. XPath has made me a happier man. I realized that part of the pain in dealing with simple text files can be easily addressed with XPath and XML: There is a single format that you can use (and a set of tools that produce and consume valid XML) and a simple way of fetching nicely structured data (as opposed to files like /etc/inittab, /etc/fstab, /etc/termcap or the terminfo database.
Don't get me wrong. Termcap is a great file format if you have a single implementation of the beast, the only API call you know about is strtok(2) and you just learned how to test for end-of-string marker in C.
I know the above sounds completely obvious to everyone. But I liked my little realization this week. I think I might be on the path to XML Zen.
I used this tutorial to learn XPath. First match in Google.
Duncan saw a talk at Stanford by Todd Proebsting. In his talk he mentioned that it would be nice to have extensions to handle XML from your favorite programming language as XML was becoming ubiquitous. XPath gets close to this, but its typically implemented as a library routine. Then Don Box went to a conference and pushed for the same idea. Wild speculation about what Microsoft could be doing begun.
The above gave Duncan an idea: he wanted to be able to use XPath-like expressions within C# to address nodes
It ocurred to me that we could hack our C# compiler to implement Duncan's idea with relatively ease. The idea would be to flag XmlNode with a special attribute (say, [Dynamic]) and then have the compiler resolve "Member Access" expressions with dynamic code instead of using static code.
At compile time the compiler will figure out what "This.String.Method" means. One interpretation could well be `In namespace "This", pick class "String" and lookup the member "Method"'. This in turn becomes "Fetch from class-id XXXX the field YYYY". We could use the [Dynamic] flag to let the compiler know that after resolving the meaning of a particular element in a member access expression, it should not try to statically resolve the meaning of it, but do it dynamically and generate code accordingl.
So given: "XmlNode n = GetNode ();" and the expression "j = n.Types .Dingus" would become:
XmlNode temp1 = n.SelectNodes ("Types"); XmlNode temp2 = temp1 ; // Gets the fifth node XmlNode temp3 = temp2.SelectNodes ("Dingus"); j = temp3;
If you can annotate the node with the XML Schema, the compiler could do strong type checking as well:
[Schema ("Dingus")] XmlNode n = GetNode ();
There are issues to be addressed here, like how would C# cope with identifiers like "my-element-name".
Posted on 13 Feb 2003
I had never thought of the markets in this way. The beauty of this visualization tool is the novel way in which data which would otherwise be hard to correlate can be easily digested with the visual cortex.
Posted on 11 Feb 2003
Nat sent me this chilling account of what is going on in Bagdhad
Posted on 06 Feb 2003
Robert Fisk came to do a talk at MIT after attending this morning Powell's presentation at the Security Council. His presentation today is one of a true journalist, I was delighted to read this interview with him a few days ago.
Robert Fisk is a reporter for the UK Independent magazine, and has been reporting on the Middle East for twenty seven years. One of the few journalists that interviewed Bin Laden.
Duncan and myself took the opportunity to have our picture taken with him:
Posted on 05 Feb 2003
A beautiful article from John Pilger. The first half you can skip, the second half gets graphic.
Cool pictures from the ECMA meeting coming as soon as possible.
Posted on 30 Jan 2003
41 American Nobel Laureates oppose war.
In Redmond this week, for the ECMA meeting.
Ariel Sharon got re-elected in Israel, a dark day for human rights.
Nat said "`Best Ari and I' ever". `Ari and I' is a series of articles with prime quotes from Ari, the White House spokesperson.
Reading Chomsky's Fateful Triangle. Published in 1983, has an enormous amount of information relevant to the current situation in Iraq. Surprisingly that all this information had been published for so long and I just ran into it.
Posted on 29 Jan 2003
Posted on 26 Jan 2003