Older blog entries for ncm (starting at number 103)

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.

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

Ximian
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.)

Crashing
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).

Orkut
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) »
Monotone

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.

18 Feb 2004 (updated 8 May 2006 at 19:55 UTC) »
whytheluckystiff's Ruby book (really, a long article) made me laugh more than anything I've seen in a long time. Chunky bacon!

The Open Source world (or, anyway, the Open Source Initiative, or maybe just ESR) is in pretty sad shape when it finds itself pleading with some rapacious corporation to free a stupidly-designed language created, in the first place, just to attack some other even-more rapacious corporation. Sun is free, and welcome, to make itself irrelevant to Free Software, and the world at large. It would already be forgotten if not for its multi-billion dollar bank account, which (incidentally) feeds OpenOffice and SCO alike. Java itself is already irrelevant to Free Software: Java needs Free Software, but Free Software doesn't need Java. As Sun fades from our minds, so will Java, and good riddance.

It makes me feel better to think that Free Software is not in similarly sad shape. Then I look at the Mono and dotGNU projects. They're not begging anybody, exactly. One might say, rather, that they're asking for it. I'm not sure which is worse. I guess this is what the mainstream is like: fools make themselves irrelevant, the rest of us (or "them", maybe) go about our business, and it all comes out OK, because we're not in the middle of an apocalyptic struggle any more.

Speaking of worse, I just finished the worst book I have read in years -- "Chindi" by Jack McDevitt. It's awful from the very first line: "The Benjamin ... was at the extreme limit of its survey territory". Each chapter is worse than the last, each deft touch reveals it as the more tawdry. Chapters start with quotes from great but dull works of the 23rd century. The ship captain is gorgeous but unfulfilled. Every character is bored with his or her life and life's work. Reading it was like watching a train wreck. Recommended, sort of.

Orkut has got quite boring. The only thing I'm watching for now is when the membership count of the "I hate Java" community passes that of the "[I like] Lisp" community. "I hate Perl" had been tracking "I hate Java" just twelve members behind, but has lately almost stagnated. Of course nobody hates Python, and probably won't until 3.0, when all the "list comprehensions" and Lispy doodads make Python programs incomprehensible. (Meanwhile, membership in "M-x viper-mode" and "I resent Lisp" creep obscurely upward. Ha ha, they have no idea what lies in store!)

Galeon 1.3.12 on my home machine is still leaking zombie processes like a parthogenetic rabbit. I have to shut it down daily when it hits the 206 mark and freezes. Oddly, that doesn't happen at the office, where I never look at eBay; evidently my wife's eBay usage triggers something nasty. Otherwise it's a great browser.

The real fun in Orkut.com is not in pestering people to be your friends. It's in creating what they call "Communities". Some seem to exist only as badges, so the icon shows up on peoples' summary page and helps to define what they're about. Others are a place to meet; e.g. there's one for my home town. I created the "I hate Java" and "I hate Perl" communities, which are both growing with gratifying rapidity, and the "M-x viper-mode" community, which remains (equally gratifyingly) obscure. (These in addition to Ogg and Advogato mentioned earlier.) It was fun constructing the icons. I couldn't see how to draw a diagonal straight line, in Gimp, so I selected and filled a horizontal rectangle and then rotated the whole thing.

Finally read Steve Martin's "Shopgirl". A real pleasure. Re-read Tom Robbins's "Half-Asleep in Frog Pajamas". (I had read it before, I think, but could hardly recall any of it. That and "Skinny Legs and All" are his best work.) Read Terry Pratchett's new "Monstrous Regiment"; not as good as "Wee Free Men", but astonishingly good nonetheless.

I'm seeing geese flying past the window, now, heading east... East?

The latest version of Galeon is out, 1.3.12. I have high, high hopes. It finally has the feature I had most wanted, Emacs edit key bindings: no more wiping out my whole Advogato diary entry with a careless ^W or ^A. With its independence from libbonobo, maybe it will not leak memory or child processes like 1.3.11a did. Evolution 1.4.5 hasn't crashed on me in a long time, gvim running under libbonobo notwithstanding.

I'll congratulate chalst again, because I doubt he was surfing Advogato the first time.

Got invited onto orkut.com, and created Ogg and Advogato interest groups before they shut down. I'm not sure what that sort of site is for, but anyway discovered that Marc Merlin works at Google. Now I know at least two people there. Coincidentally got invited onto linkedin.com, that looks almost the same in some ways, but is full of CEOs and consultants. Weird.

About layered UIs... every program of any complexity has a layered UI, regardless of its designer's intent. The subset of features that are immediately comprehensible to newbies is one. For experts, the top level UI is always hacking, whether via scripting, registry entries, or recompiling the damn program. Talk about layers is really just about adding more of them.

murrayc (and everybody else coding C++): When you mention an inherited member in a template function body, you have no choice but to prefix it with "this->", or the compiler might just go find some other object of the same name. The natural coding-style implication of this fact is that all uses of members should be prefixed with "this->". Besides making the code easier to follow, it makes for better error messages, and better error-checking. As a nice side effect, it makes it entirely unnecessary to put dumb prefixes on private member names. (Yes, it effectively adds six characters to each member name, which you might think would be a problem, but in practice it just doesn't cause any trouble.) C++98 really is a different language from pre-standard C++, and it calls for different coding practices.

94 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!