Older blog entries for ncm (starting at number 106)

12 May 2004 (updated 12 May 2004 at 03:28 UTC) »

Running linux-2.6.6-mm1. Works fine on my laptop. I added a line "vm.swappiness = 0" to /etc/sysctl.conf, and now my programs don't all run really, really slow in the morning after "locate" has updated its database, because it hasn't summarily swapped them all out. Really the system ought to figure this out for itself.

About graydon's idea for enforcing good resource management, remember that we don't need to make errors impossible, we only need to make them hard to make accidentally. A function to turn a non-owning pointer into an owning pointer doesn't compromise safety, because nobody would call it accidentally.

On a related note, I just realized that in the last four years of writing C++ code, I have not written a single delete statement. To me they're like goto statements, now; there might be a good reason for one, but they suggest sloppy thinking, and demand explanation. [Addendum for Nafai77: delete statements get run, and frequently; I just don't write 'em. They get run in std::autoptr<>'s destructor and in various counted pointers', and in std::list<>::~list() and std::map<>::remove(). Garbage collection, of course, suggests way more sloppiness than a mere delete statement.]

I just saw an interview in which Miguel says Evolution 2 will depend on Mono. Looks like it's time to fork.

No crashes lately, except Metacity.

Orkut: "Lisp" membership 494, "I hate Java" 531. Some bozo created at least six dozen artificial people personalities just to bulk up apparent membership in his communities, and make them look more popular than the "competition". Real people are marking them "friends" left and right, making themselves look very stupid. When I posted a list of them, with links, in a "Real or fake" community, people are all "where's your proof?", without even poking the damn links. Also stupid.

26 Apr 2004 (updated 26 Apr 2004 at 20:19 UTC) »
Page 23, sentence 5
"Finally another well-lubricated man in leather underpants performed the same series of movements and ended up standing next to Yevgeny in the same pose: this was a very dark-skinned Negro, not as tall as Yevgeny, but heavier." -- "The Confusion" by Neal Stephenson. I'm at page 286 of 815. Gripping. (This one has more dull bits than Quicksilver, but they're a lot shorter.)

The times when metacity 2.6.5 crashes appear to be when I close a Galeon window I have opened recently. Now that I'm paying attention, I see all the windows in one screen while metacity starts back up. Afterwards, I have to move my xterms up again. ("Window Systems Achieve Gravitation." Alternatively, "Gravitation Explained As Periodic Universal Cellular Automata Crash.") It appears that GVim under Evolution (via Bonobo) crashed again, this time when I poked the close box, 'cause I didn't get a "Discard changes / Cancel / Save" dialog box even though I had entered text.

"Lisp" membership, 462; "I hate Java", 486. Gap widening again.

clarkbw's 5th sentence of 23rd page: "'I lost the ring', he said." Tim Powers, "The Stress of Her Regard". (Actually page 24; 23 has only two sentences.) The protagonist's name, incidentally, is MichaelCrawford. I just read this again after almost 20 years. It was even better this time around; I stayed up until dawn reading it, because I couldn't stop. Speaking of compelling reading, the Boston Public Library has my reserved copy of Stephenson's "The Confusion" waiting for me.

I just deleted what I think were the last of the GNOME 1.4 library packages from my machines.

My Olympus D-490 digital camera is on the fritz: it gets exposure all wrong when taking pics outdoors, and seems to have burnt out two SmartMedia cards in two weeks. It's only three years old. Looking at another Olympus, a C720. Olympus was known for low power consumption back then; I don't know how it is now, but no longer have time to indulge in careful product research.

It turns out the metacity bug I mentioned in my last diary entry (where my windows drift downward) is really an X bug with an interesting history, according to GNOME Bugzilla entry 110377. What it appears to mean, though, is that metacity is dying at random intervals, and being restarted automatically, and the only way to tell is that the windows drift.

Orkut: "Lisp", 458; "I hate Java", 480. Readers are requested please to join "Libertarians Make Me Laugh", and maybe post something funny.

21 Apr 2004 (updated 22 Apr 2004 at 18:34 UTC) »
Virus load
When the volume of e-mail viruses I get in a day topped 2000, or 75MB, I decided I had to do something, kids or no kids. (It's hard to do anything geeky, lately, that takes more than 15 minutes. Upgrading to linux kernel 2.6 on Debian unstable, remarkably, qualified under that rule.) Google identified a procmail script called nkvir-rc, or "YAVR", that seems to do what I want, along with a bunch of other stuff (identify 419 and porn spam) that I turned off. I had been reluctant to depend on procmail (because I've seen the source!) but enough is enough.

When I tried it, it blocked all the viruses, and most real mail, too; it shunted maybe a fifth of the expected number of viruses into a separate mailbox. When I turned it off, a flood of (evidently queued) viruses, and real mail, too, showed up. It turned out to have been diverting the viruses to "mbox" format files, with mbox-style locking. My mail directory is on an NFS server, which is not compatible with mbox locking, and is otherwise in Maildir format. I went through the script and stuck a "/" on the end of each virus mailbox name (it puts different viruses in different mailboxes) and now everything works. Since late last night it has shunted aside 40MB of virus mail (almost all of it identified as "Moodown", FWIW). The author seemed unfamiliar with the distinction in mailbox disciplines; let's see what his next release does.

Now I get just a few dozen "delivery failed" messages per day, instead. It appears that somebody has targetted Gcc developers with a DoS attack, because many of the return addresses on the virus messages are addresses from those mailing lists, in some cases very old addresses. Bruce Schneier says the virus storm is the result of a pissing contest between two virus-writing gangs.

According to teknofile's innergeek, I'm only 23% geek. (Not enough so to warrant reproducing the next six digits of precision it reported.)

I bumped into Chris Lahey, clahey, around lunchtime Monday, and found out that Ximian has crossed the river to Cambridge and moved into the Akamai building two minutes' walk from my office. (I had thought that albino guy who's always outside smoking when I go past, lately, looked familiar.) I always used to get Chris's name mixed up with Greg Lehey's, grog, of FreeBSD fame. No more.

C and C++
The next person who writes "C/C++" gets a knuckle sandwich. C and C++ are distinct languages. If you only know C, you don't know C++, and had better not claim it on any résumé I look at. (Hint: if you think "char *p" is a good way to declare a pointer in C++, you don't know C++.) If you can use C++ effectively, you can hardly bear to confine yourself to C. The only contexts where the expression "C/C++" makes any sense are when talking about (1) link compatibility or (2) speed. Figure out what you mean: "C and C++", "C or C++", or maybe just "C", really. (GNOME core libraries are C, period.)

Our own murrayc has made C++ a full citizen among GNOME application implementation languages. I defy the Mono crowd to come up with a GNOME app prettier, or quicker to write, than the same written with libgnomemm et al.

Congratulations to everybody who contributed to Gcc-3.4! This is the best release ever. Now that the C++ compiler and library both advertise a stable ABI, distributions should be sure to package versions of all their C++ libraries built with this release (even if their default compiler is 3.3) so they will (with a little luck) remain link-compatible with the next couple of years' releases.

Java and C#
It strikes me as really funny (RVM!) and pathetic (most else) that so much work by Free Software developers is going into those dead-end, ill-designed, proprietary languages. I know I shouldn't care -- people waste their time the way they choose -- but couldn't they have better taste? Certainly C++ could be improved upon. Why not invent something way better than C++, instead of struggling futilely to get somewhere close to as good? That next language should come from the Free Software community and be designed to serve its needs, not from some doomed corporation desperate to lock a few remaining developers in to a binary-distribution scheme. (No, Lisp ain't it.)

Since last report, Vim running as message editor under Evolution (via Bonobo) crashed once, without taking down Evo itself. Galeon has been crashing, too, but only when I try to delete eBay cookies (which I have to do because it won't let my wife log in, much of the time, otherwise). Metacity hasn't been crashing, but my xterm windows have taken to drifting southward so the prompt line is off-screen. I have to keep hitching them up like a loose pair of shorts. Gnome-panel "System Monitor" hasn't crashed, but it also can't seem to figure out how much swap space I'm using, any more. Oh, and of course Gaim 0.64 always crashes after a couple of days, even when left alone (although it's pretty nice, in the meantime, once you figure out how to get onto a channel).

Membership in the "Lisp" community surged to within five points of the "I hate Java" community, now at 473, but has stagnated again, around 455. I attribute the fluctuations to their new "related communities" feature, but why the time constants are different is a mystery. Social science remains a wide-open field.

Congratulations to all you GNOME 2.6ers, notably murrayc.

Anyone impressed by the Crack Book should also buy the Vandevoorde and Josuttis "C++ Templates: The Complete Guide". It came out after the other, and seems more useful for reference.

redi: that sequence "{ delete p; return p == 0; }" or equivalently, in C, "{ free(p); return p == 0; }"isn't just implementation-defined. It's formally undefined. That means any program that even looks at a freed pointer value is allowed to do anything, right up to erasing your disk and impregnating your sister. That's not just perverseness on the part of the standard committees (or myself). Rather, it's meant to offer latitude to implementers to trap such (mis)uses. The same, incidentally, applies to "{ int i; return i == 0; }".

Everything still works, mirabile dictu. Maybe we're not being ambitious enough any more. Orkut "I hate Java" membership is at 415, "Lisp" at 401. Evidently I was wrong to expect "Lisp" would catch up.

28 Mar 2004 (updated 28 Mar 2004 at 23:43 UTC) »

I was at the office with a colleague who has used Java in earnest on contract projects, when we saw the announcement that IBM had Freed their Jikes RVM. I started poking around to find out what it was, and when we finally uncovered the secret, we both laughed and laughed. You have to thankful for anything that yields such harmless mirth.

Lots of people code in Java, and probably lots more in Visual Basic. One can't sneer at the one without sneering at the other; they do get work done that they might otherwise bother me to do, so I have to be thankful for that, too. Hence, it does matter how easy it is to code for GNOME in languages like them. Mulling that over, I realized that the most effective way to make it easy to use GNOME in Java programs would be to change the Makefiles for core GNOME so that they are all compiled with G++. Then, just make sure all the callback sites (and sites those are called from, on up the line) are exception-safe.

After that, it only takes trivial (maybe automatically-generated) stub libraries to make the GNOME libraries safely callable from Java programs built with Gcj; the callbacks can throw exceptions right through GNOME back to the main program. Hack up a (minor) variation on Gcj to make it compile C# instead, and then C# integrates trivially, too, and offers an easy out once MS starts swinging the patent hammer. (Maybe Gcvb would follow, may-God-have-mercy.) My feeling, though, is that this all makes way too much sense ever to be embraced by the people who actually like those languages. Meanwhile, I suspect too many of the GNOME core people are too superstitious ever to use G++, for any reason.

Despite tromey's misgivings about Gcj-3.4, I think G++-3.4 will be the best release yet, and its iostreams will be faster than Glibc's stdio. (Thank Paolo Carlini, Petur Runolfsson, and Jerry Quinn for the latter.)

Tom, by the way, appears to be among those who wildly overestimate the value of the Java-1.5 "generics" feature. It's more akin to Ada's than to C++'s, which means that it adds only checking, but not expressive power.

In recent weeks I've been getting almost 1000 viruses a day in my e-mail, with improbably many of the forged "From:" addresses matching Gcc mailing list members. I'm beginning to suspect it's a deliberate DDOS attack. (Spam is nowhere near so heavy, for me, and although the viruses are easily filtered out, the bounce messages are less so.) Has there been any discussion of this elsewhere?

Linux-2.4.6, gnome-panel, Galeon, and Evolution are still working fine for me, mostly, except for the persnickety ALSA sound system. Orkut "I hate Java" membership is at 394, vs. "Lisp" at 389. "Lisp" will catch up, I'm confident. I should have kept a daily graph.

21 Mar 2004 (updated 21 Mar 2004 at 19:12 UTC) »

Who would have thought there was something new to say about discrete finite automata? Evidently until now only Boris Alexeev (scroll down just a bit).

Anybody can write a Scheme interpreter in Scheme, but that's no great trick: I can turn my car into a car without even a wrench. If you want to impress me, write a Haskell compiler, as a set of ".h" files, that runs in any C++ compiler's template evaluator, and toss in the entire Haskell standard library, and make it practical to use for writing real, almost pretty, programs. (Too late, it's done.) I am obliged to mslicker for drawing my attention to a wholly remarkable paper: Syntax Sugar for FC++: lambda, infix, monads, and more. Of course the library it describes is available under a liberal license.

Membership in Orkut "I hate Java" first caught up with "Lisp" at 284. Now they're both at 365, and still tracking. Amazing. Then again, there's Limecat, who is manifestly displeased, so who knows anything?.

Thank you and congratulations, bagder, on your 79th cURL release. Your work matters.

Everything is still working -- Galeon, Evolution, gnome-panel, linux-2.6. After I suspended my laptop to disk, though, and turned it back on, I had to reset the ALSA/ES1978 driver. Tsk.

17 Mar 2004 (updated 18 Mar 2004 at 03:54 UTC) »
Seagulls circling in a blizzard is not something I ever expected to see out my office window.

Wonderful news... It looks as if the Gcc project plans to commit, finally, to a compiler-and-library C++ ABI, coincident with the release of gcc-3.4 this month. That means code built with any g++-3.4.x (or 3.5.x, hopefully) compiler, and linked against the corresponding libstdc++.so, will be upward link-compatible, just as code linked against any Glibc-2.x can dynamic-link to any later Glibc. If it's not obvious to you why this is big news, think how much trouble it is to get a whole bunch of different libraries built with the same compiler dot-release as the program you hope to run that depends on them.

This ABI eliminates the biggest single impediment to a lively bazaar in C++ libraries. Writing powerful libraries is what C++ is really all about; the STL was just a first step. Now the trick will be to get all the GNU/Linux distributions to ship libraries built with that version, so that C++ binaries might be compatible across distros without needing to be static-linked. (Debian will need pushing, particularly.) Meanwhile, our own murrayc's GNOME C++ bindings are now mature enough to make C++ GNOME programs as compile-time-safe, and convenient, as with any native C++ GUI toolkit.

Bad news... First Miguel, then ESR, and now Havoc. Sigh. What is it about marketing scams promoting proprietary software deployment vehicles that they so easily take in Free Software spokesmen? Free Software has achieved all it has, exceeding by far every conventional expectation, without such dubious help. Suddenly, running on a slow, memory-hungry, buggy, untuneable "platform" capable of supporting only crabbed imitations of native languages is the modern, high-level way to do software development. C++ has somehow become indistinguishable from C, and incapable of high-level-itiveness, whatever they imagine that to be. Weird. At least Havoc isn't on his knees begging favors from Scott McNealy.

Good news... I upgraded my gnome-panel and metacity packages, and now the panel auto-hides correctly, again. Yay somebody! Linux-2.6.4 is still working fine. Evolution started crashing, but stopped when I upgraded to a binary built against the new GNOME libraries that came in with the panel upgrade. Galeon still isn't leaking zombie threads, despite my wife's assiduous eBayage. Another milestone: I have finally deleted all my old Netscape 4 binaries.

This is the funniest thing I've seen since Why's (Poignant) Guide to Ruby: Understanding Object Oriented Programming. This one's not intentionally funny, though, which makes it even more so. (Note: that the examples are Java is surely only incidental.)

Finally upgraded to linux-2.6.4, from 2.4.21-pre5-ac3. I think this was the longest I have ever used one kernel, eleven months. It all went surprisingly smoothly: the only hiccup was when the hotplug daemon startup script hung during boot (in the pci hotplug section -- nil, since I have a laptop) until I hit ctrl-C, and then startup resumed. Everything seems to work, and it swaps a lot less. I plugged in a USB mouse, to see what would happen, and it Just Worked.

lindsey and cactus: What C# calls "properties" are what most people call hints of bad design; that is, if you have enough of them in your code to benefit from automation, you probably have way too many. That said, I'm saving off cactus's example. (About Shakespeare: I would leave out the <speaker> element entirely, and just add an "id" attribute to the <speech> element instead. No point in repeating the speakers' written names throughout the document.)

Am I corrupted yet? I have used Gaim as an IRC client to talk with graydon and others about Monotone implementation details.

Membership in my "I hate Java" community on Orkut has tracked the "Lisp" community's, almost exactly, ever since it first caught up. Probably every member of each ought to be a member of the other too. It's a shame that the similar experiment here didn't, ultimately, work out -- Advogato article threads are too susceptible to trolling -- although it did evoke a few memorable lines.

Listening to Supersuckers, "Must've Been High" (I used to think I hated country music; so did they, I think) and Satan's Pilgrims.

Before I rebooted into 2.6.4, I upgraded to the latest mozilla library dpkgs, which made galeon and firefox not leak zombie children any more. Happy day! Nothing I run crashes or leaks too badly any more.

29 Feb 2004 (updated 3 Mar 2004 at 03:51 UTC) »

In the coming Source Code Control wars, with Subversion and Arch squaring off, the dark horse (if I may mix metaphors) looks to be Monotone, by our own graydon. Such beautiful code, such spare design. Why not pitch in and help by giving it a "blame" command, or perhaps a web view? Just to touch such code will exalt you.

A Proud Moment

As of this moment, the Orkut group "I hate Java" has 284 members, identically with the "Lisp" group. In other words, right now, and maybe never again, precisely as many people hate Java as like Lisp. Who knows what the future holds? Will the next year bring more Java haters or Lisp likers? Will Orkut survive that long? Will Java?

People posting are finally beginning to catch on to what these "I hate ..." groups are for, and it's starting to get fun. (What could be more dreary than somebody hyping their own favorite language?) It took longer than I expected, and for a while I thought the experiment had failed entirely. Score one for humanity.

Zombie Leaks

Debian unstable finally got Mozilla Firefox, so I installed it to see if it will spawn zombie processes like a parthenogenic rabbit (and like Galeon 1.3.1{1,2,3}, lately) when used to look at eBay.com. The answer is yes, which narrows the problem considerably: the fault is all Mozilla. Meanwhile, Evolution 1.4.5 (even with Bonoboized Vim as its editor!) hasn't crashed in many weeks.

97 older entries...

New Advogato Features

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!