Older blog entries for ncm (starting at number 133)

9 Oct 2005 (updated 12 Oct 2005 at 20:58 UTC) »

I almost wish I had some use for a word processor program, so I could defiantly use Abiword in place of OpenOffice, or worse.

raph: Advogato seems to be under googlebomb attack, involving at least the following ids:

AndyPopescu MaryJ Mattas McGillavry Mrdizzy PJman SomeW Sunset Tamilk Zproject accord albi aplphaeric ashleyc avalon badgun bekool benzaiten bestway bextor bfg bluewave coolermax cooliz creol cult cyberninja dbit deepline dino favo ferum2 flo format freedj fullday gangsta gauss geekb globe goahead golem goodwin greenj grro gummie hcp henryb imo indiewire jasoninfo jenn jerrysim jesgre jetpac jezz jmors jo2 johnvk jols kelmo kingjl koolbe kooler kri kyh lecooper lenny lisag liz lizz loiseip lucky mar megalor ministrel mmo morechance morepow morningstar mrpink mrslg natone newbieq newm nhr nikki nikkij odinv otomoto oyster pipos portm richym robbymk santafe sarahu scifi simonez sixtyk smb styler sunrise talex tigerr tommyb triYann typhooon ugh vansic weblucky whiteangel wilson yakamot yanko yellowrose yoba
and, presumably, any others that certify them.

cdfrey: what redi said, but more concisely. :-) C++'s mythical "template bloat" problem is only resurrected by people who haven't used Standard C++. (Yes, that includes Miguel.) It just doesn't come up in real programs. Likewise, bi's suggestion that virtual function calls are too slow does not withstand scrutiny. (On most CPUs, much of the time spent on the call is spent refilling the instruction pipeline, as for a mispredicted branch; modern caches make reasoning about per-instruction costs impossible.) Their proper role is like a kernel driver's system-call implementations -- open, read, write, close -- that in C you would do with tables of function pointers; or to clear out (what would be) nests of switch statements. In either case what they're replacing does very similar operations. (Any program that starts up slower because of them has way too many!) Mozilla string types most likely suffer from having bolted on what should remain separate components applicable to ordinary strings.

Regarding Monotone (now at 0.23), I like its lightweight portability, its efficiency (actual and potential), the serious industrial attitude of its designers, the cleanliness of its code (when last I checked), and its future prospects. I'm planning to like its rigorously specified, Codeville-derived merge algorithm when it's released. Its 40-digit hex revision names should fade to the background sometime soon; in the meantime, the monotone-viz GUI program has proved indispensable, although an equivalent with lighter dependencies would be nice.

By contrast, svn is both complicated and archaic; arch development seems too fragmented; hg is immature, and as it grows will become increasingly hard to maintain; and darcs, like codeville, seems too experimental. But I might change my mind.

Oh, and here's my cranky Mars picture of the week. Those holes are about 500 ft wide, widening to 1000 ft at upper left. Collapsed lava tube, or lightning-bolt excavations? Your guess is as good as theirs, maybe better.

1 Oct 2005 (updated 1 Oct 2005 at 09:16 UTC) »

I've taken the plunge, using Monotone 0.22 in daily work. I maintain two directory trees, one for CVS updates, and another for my own work. Whenever I update from CVS in the one, I commit the changes to that branch, "propagate" them from there to the head of my working branch (merging as needed), and then update my working tree from that. I only need to do that (1) to produce a patch to send or to check into CVS, to make sure I haven't broken somebody else's stuff, or (2) when I want to use what somebody else wrote recently. In the meantime I check in my own stuff whenever the mood strikes, generally at mealtimes.

Another good picture, and a rhetorical question: for those of you with metalwork experience, does that look to you more like a sloppy welding job, or geography (ok, areography)? I found it interesting that the amount of energy released in an ordinary terrestrial lightning bolt, if not mostly-consumed heating air and rain on the way down ("boom!") would suffice to excavate an 85-foot crater. Of course ad-hoc crater-excavation techniques might not be very efficient; but even at 1%, to find hilltops and fields perforated with dozens of 8-foot craters after each thunderstorm would be spooky. (Thank you, air.)

I was surprised to find that the only persuasive evidence I'd encountered that the cosmic red-shift really is recessional (supernova type 1a decay curves) turns out to be cooked: it only implies recession if you start by assuming it implies recession.

wingo: We must be at an exceedingly refined stage of Free Software development when the software developer's itch derives from embarrassment over his housemates' impressions of Free consumer-appliance emulations.

jds: That was the most poignant and funny posting I've read since whytheluckystiff's guide to Ruby.

robsta: Mozilla is a poster child for misuse of C++. As a rule, three levels of inheritance suggests chaos; five levels, exposed, proves it definitively. A little inheritance goes a long way. Most of what people use all that "O-O gook" (as Stepanov calls it) for is more cleanly, safely, and less intrusively done with templates. That the Mozilla people are still afraid of them says way more about them than about the language. (That goes double for exceptions, BTW, but only in C++. Without destructors, exceptions make the problem worse.)

wlach: Automatically-generated usage messages stink. Any program worth writing at all is worth a thoughtfully organized and presented usage message.

robocoder: Danger! Danger! Linksys routers absolutely stink if you need connections to last more than ~12 hours. The only exceptions are the ones you can reflash with third-party Linux (WRT54Gx, for various x), and then only after you do.

14 Sep 2005 (updated 1 Oct 2005 at 08:13 UTC) »
chalst and slamb: Welcome back! You've been missed.

rmathew: How to use "-fno-implicit-templates"? Build first without, run nm output through a filter to generate source for the explicit instantiations you need. That said, it would be awfully helpful for the compiler to omit defaulted template arguments in its error output. In this case, though, it's the linker, and it would have a harder time doing that than the compiler would. Too, it would be nice if the compiler had a mode to generate explicit-instantiations source by itself.

The whole family's now sleeping in the train car on a regular basis. I'm still trying to get caught up at work, since the move, and sleep time is the main casualty.

Bought a copy of "Sky Captain and the World of Tomorrow" on DVD. I love that film (which is not to say that I get to see movies any more). The critics panned it. It's not really meant as a movie at all; it's an illustrated novel in the style of golden-age comic books, done in live-action animation. Every frame is a painting, and they're gorgeous. Of course the plot is throwaway and the dialog (gloriously) cheesy; without those it wouldn't be a comic book at all!

For any of you with kids, or nieces and nephews: while in Cambridge we checked out easily 1500 kids' books from the library. Of them all, while Jan Brett's and Rosemary Wells's oeuvres mustn't be missed, the best was one called "Zen Shorts" by Jon Muth, with Colin Thompson's "Atlantis" and "How to Live Forever" close behind. Tim Myers's "Basho and the River Stones" and "Basho and the Fox" were strong contenders, as was "Slow Loris" by Alexis Deacon.

That new Nano iPod is nice hardware. A pity the software stinks (no copying direct from one iPod to another; no Ogg). Here's hoping the Linux port is ready soon; wish I could afford to help. Actually it would be much better hardware with minimal on-board flash, and a CF slot. Wouldn't need USB, then.

The best planetary picture on TPOD, for sheer mystery, has to be the curly trenches on Mars.

27 Aug 2005 (updated 7 Sep 2005 at 18:20 UTC) »

Running Ubuntu on my "new" Dell C640 2GHz P4M sessile-laptop with 21 inch 1600x1200 LCD. It was a bitch upgrading Xorg to Breezy's, 'cause Ubuntu split the fonts and input drivers out of the X server package without providing a transition package. (Hey, it's beta; waddayawant?) Too, it was loading the vesafb module at startup (which isn't beta), making the switch to an external monitor a flaky process. Now it's booting a native kernel without initrd, with X using Free nv and kernel using Free nvidiafb, for Xv support, and all is fine. (What would I do with DRI? Please.)

I've learned a lot about CPU throttling, because this beast runs hot -- never less than 50 C, and the fan runs half the time. It turns out it really has only two speeds: 2 and 1.2GHz. The ACPI "throttling" modes run at one of those speeds, but just turn it off during enough time slices make it crawl. They don't seem to make it run any cooler, though. When running 2GHz, the temperature won't go below 63 C.

It's quite a surprise to find that there might not actually be any fusion going on in stars, that all that heat and light (and EM turmoil) you can see might just possibly be the whole deal.

I've mostly given up on VoIP. The audio quality is just too flaky. Since cell traffic is really VoIP underneath, we can blame the bulk carriers for sabotaging VoIP for the benefit of their cell businesses.

zeenix: Sure, the Pakistan gov't is bad, but they got nukes. As Mark O'Donnell wrote in 1979, "If money talks, an atomic bomb sings opera." Remember, in Frank Herbert's Dune, the Atreides "family atomics"? The U.S. has this figured out too: who needs an actual nation -- you know, civil society, legitimacy -- when you got nukes? Citizens, feh.

14 Aug 2005 (updated 28 Aug 2005 at 23:30 UTC) »

I'm growing very fond of these Plasma Cosmology folks. What else could make practically anything said by any quotable astrophysicist sound stupidly occultist? "Dark Matter" ... "Dark Energy" ... "billion-solar-mass black hole" ... "magnetic field reconnection" ... "blazar 'gas' jet". Why are they astonished at every new detail revealed by observations? When the JPL guys noticed the "volcanoes" on Jupiter's moon Io were drifting around the planetoid surface like rubber duckies in the bath, did they send out a press release? Aren't their theories supposed to predict something, sometime? What exactly are we paying those people for?

rmathew: Don't bother with LISP. If you've already coded ML, you know everything you need to know; but they don't.

3 Aug 2005 (updated 4 Aug 2005 at 06:34 UTC) »

The advent of Xen and its like is exciting not least because it frees experimental OSes from a need to write and maintain infinitely many device drivers. Running Plan 9 under Linux seems to give us the best of all possible worlds. Hurd on Linux, anyone? Every part of Linux not needed for support of Xen might be trimmed away, leaving... IBM VM?

Folks, avriettea isn't a hypocrite. Hypocrisy is a recent innovation, evolutionarily. Technically, he's a toady. Toadyism, as a genetic trait, has been strongly selected-for as long as there have been bullies. The male inclination toward rape and the female soft spot for silver-tongued transients are similarly unfortunate inheritances we all share. All three are still selected for. (The latter two are in eclipse, for the moment; but let's see who replaces Sandra Day O'Connor!) Some of us consciously choose not to express those traits. Others run with them. It's just a matter of what you can stomach. I don't doubt there are some things even Alex wouldn't do (unless told to).

Thanks to mchirico for Linux Tips. Some of that turns out to be useful to have all in once place.

kjw: You say, "I've managed to create code that works great on FreeBSD/x86, but breaks on Linux/x86 and Mac OS X/PPC.", but you mean, "I have brokenness in my code that FreeBSD/x86 fails to reveal. Both Linux and Macosix detect the problem immediately."

Besides lending reliability to Galeon, Gnome 2.10, it turns out, took away more features. This time, weather forecasts, the Debian menu (got back by installing some new packages gnome-menus was not so forthcoming as to suggest), and the ability to keep the panel permanently at the bottom of the screen. (Every time gnome-panel crashes, it restarts back at the top.) Oh, and gnome-panel crashes more. I had to purge Evince to get anything even to offer to use Xpdf any more. Updating Xpdf and adding Evince back again, things seem OK now.

The Debian X.org packages are working well: mach64 XVideo support is welcome, whatever it is that it's good for. (Who has time to see movies?)

Linux kernel support for cpufreq, the variable-frequency CPU-clock driver and the virtual file system that controls it, on Intel P3 (Coppermine SMI) turns out to be much iffier than anybody says. Throttling via ACPI works fine, but not the ACPI cpufreq driver, and not the native Coppermine SMI cpufreq driver. I wonder if they ever will.

I had to add a USB sound gadget to get a quiet mike jack to use for VoIP. Its mixer stinks, the default volume is too low, and its volume-control buttons don't work on Linux, so I'm still plugging headphones into Compaq's noisy built-in audio output. Are most people forced to a software mixer because they have no usable hardware mixer? Maybe JWZ had a point. Of course I should just run Asterisk, and plug my trusty Western Electric phone into my Sipura 3000 PSTN/VoIP adapter. But would that really be easier?

I just built and installed the third-party equalizer module for XMMS, and now Oggs play equalized. (The built-in one only works with mp3s.) My hearing has the very common "4K dip", a narrow bandstop at -- in my case -- 3.8 KHz. With a big boost at 4 KHz, everything sounds much, much better.

Does anybody know how to persuade Mozilla/CUPS to print in a typeface bigger than 6 points? My mother-in-law's eyesight is not what it was, and the print keeps getting smaller for no reason I can find.

22 Jul 2005 (updated 22 Jul 2005 at 05:59 UTC) »

Lots has happened. Living in California now. (Still recommending Penske truck rental despite engine trouble: a fully loaded 26-ft truck towing a car trailer is not, in fact, supposed to be slowed down by ordinary freeway grades.) I was surprised to find good IP connectivity at every little podunk motel. David Sedaris on CDs made western Nebraska a much funnier place than it probably is, though the forty "No Parking" signs at each rest stop would have seemed odd anyhow. Iowa gets no points for touting WiFi access at their rest stops, teasing with DHCP, but not actually moving any packets.

Corinex makes a very handy, very small $100 gadget they call an "AV Phoneline-Ethernet Bridge". It puts up-to-125 MBits/s on up-to-2k feet of a phone wire-pair -- much cheaper than DSL back-to-back. (I'm getting 57 Mbits on 500 ft of very bad line.) It's much better at carrying traffic in one direction than both at once, so you'd be better off using four of 'em and two phone lines if you were trunking. (Flash new firmware before you plug them in, mine were at V0.0.1).

Before buying from Corinex I placed three Linksys WRT54G 802.11b/g routers, reflashed with sveasoft's replacement firmware, at 200 ft intervals. Total failure: uptime maybe 15%, and whenever they lost contact with one another, the head-end unit hammered the upstream router with thousands of ARPs per second, overwhelming it. A weedeater in earshot sufficed to take it out completely. Who said WiFi was going to take over the world?

Signed with Teliax for VoIP service, in addition to VOIPjet and NuFone, because mtr says its route has a lot less delay and jitter -- from here -- than NuFone's. ("host -l" is your friend when you're evaluating VoIP services!) VOIPjet only does IP->analog, NuFone only analog->IP, Teliax both. Teliax's marketing material doesn't reveal that the prepaid plan can be attached to an 800 number for $5/mo plus minutes used, or that they also provide voicemail and rollover. NuFone and VOIPjet cost only when you use them, and VOIPjet has the best rates: 1.3c/min (plus a tax for pre-paying less than $500 at a time!).

lkcl is right about asterisk, except (1) there's asteriskdocs.org now -- just the glossary helps enormously; (2) asterisk is supposed to be able to jimmy its SIP packets to sneak them through NAT, although Luke can hardly be blamed for not finding it! and (3) the IAX2 protocol doesn't have SIP's problems; I wonder why Luke doesn't use it.

Galeon hasn't crashed lately. This might have something to do with Gnome 2.8/2.10 or Mozilla being more stable.

I get a good laugh every time I read somebody announcing he won't buy anything with hardware DRM support. I get a bigger laugh every time I read somebody who insists that if there's any of that darn DRM in there, it had better be possible to turn it off.

Here's hint #1: They don't care if you buy it. Everybody else will. Here's hint #2: It doesn't matter if you "turn it off". The damage is done if not everybody else turns theirs off too. If there's a population that hasn't turned it off (i.e. everybody but you), vendors will market to them stuff that only works if DRM isn't turned off.

I've been working on an essay, "How to hijack a Free Software project". The short summary is, all it takes is money, and not even very much.

27 May 2005 (updated 29 May 2005 at 15:18 UTC) »
It would be hard to gauge how much damage John Lakos's book, "Large-Scale C++ Software Design" has done. When I reviewed the manuscript for A-W, lo those many years ago, I pointed out some of the problems; I didn't find any fixed when it came out. It was badly out of date then, moreso today. It might better be titled, "Build Enormous Hairballs with 1987 AT&T Cfront". There's a whole Antipattern devoted to this style of development. (The first bit of bad advice I recall was: Around each #include directive, put a #if/#endif to check if it has been included before, so the compiler doesn't have to read it again. Of course all normal headers already have that in them, and compilers have long since learned not to bother opening and re-reading those.)

He runs on about flattening and whatnot, but offers no hint that the language positively teems with facilities to make all that stuff moot. The manuscript I saw didn't mention "template", never mind "smart pointer" or "reference-counted value class", anywhere.

If you observe ordinary sound engineering principles, none of the problems he is trying to solve, using such desperate measures, even appear. Sound principles? Try splitting your enormous program up into separate, independently testable libraries. Try splitting your truly enormous system up into separate, independently testable programs communicating via pipes or sockets with stable, human-readable communication formats, or files (likewise), or even a database (gods help us). I could go on.

Got my Compaq Armada E500 laptop suspending to RAM via ACPI. It was a lot of work. I started out looking for a package called "pmtools" (not the Perl thing) which wasn't in any of the normal places (e.g. its page on sf.net). I found one, but not before building something I downloaded from Intel called "acpica". To build it I had to edit buggy source. It included a program to copy the ACPI "dsdt" table out of the BIOS, and to decompile it to ".dsl" source, and to compile that to a C array- initialization statement. It reported errors in the .dsl source (originating in Compaq's table), which I had to figure out and fix, first. I had to tell my kernel config that it should not be "STANDALONE", to use "CUSTOM_DSDT" C code and where to find it, to use ACPI, and to sleep etc., and to expose a /proc/acpi/sleep fake file system.

Build, install, reboot. Install "hibernate". Experiment with uninstalling modules. Find a GNOME daemon has the sound driver open, unused. Debian bug tracking says that's fixed somewhere in capplet and/or gstreamer. Upgrade capplets, purge a lot of old 0.6 gstreamer stuff, upgrade the 0.8 stuff (which, on Debian, don't assert complete dependencies; so update all the libs, besides). Edit hibernate.conf, and while there add programs it should kill, such as mixer panels and VoIP phones, so it can unload the sound module. Add sound module (snd_es1968, which I don't trust) to blacklisted-modules so it will unload them first. Try it... it can't kill the VoIP program. Close that by hand. Now it works! Congratulations and thanks to everybody who made this stuff work at all.

My Gstreamer problems might be over too, now that all the libraries that the useful bits depend on match. Reluctant to try it, though... OK, upgrade Rhythmbox. Run it. It pops up a box "Have you run gst-register?". (Well, no. Why didn't dpkg run it?) Here's a "gst-register-0.8". Run that. Run Rhythmbox again. Poke a song to play. It says, "Could not create audio output element; check your settings." Hmm, nothing in "preferences", nothing in "properties". "Help" doesn't work. Nothing in Gnome Control Center.

Hmm, how about Totem? "Totem could not startup[sic]. No reason." (No kidding.) Stderr output says "libhal.c 2282 : Error sending msg: Service 'org.freedesktop.Hal' does not exist", whatever that is, and "No GConf default audio sink key and osssink doesn't work". OK, let's run gconf-editor, and look in, hmm, system/gstreamer/0.8/default. Aha, it thinks I have OSS. Fix that. Fix the default while I'm at it. Now Totem starts up, plays music: 4 seconds on, 2 seconds silent, 4 on again, etc. Turn off "visual effects"; no help. Hmm. Try Rhythmbox again. Hey, it mostly works now! That wasn't so hard, was it?

[Update: The Gnome control panel thing (under "Advanced") to choose where Rhythmbox will send its output is stashed away in a "gnome-media" package, which nothing installed admits to depending on. Also, Rhythmbox skips every minute or three, which xmms has never done.]

[Update 2: No, it still can't play the Firefox flash ad.]

Congratulations to everybody who worked so hard on that Nokia gadget. Maybe I'll have to get one.

24 May 2005 (updated 25 May 2005 at 16:25 UTC) »

That column by Joel Spolsky and Sean McGrath's response each gave me a big laugh. Thanks, titus, for posting that.

The funny thing about Joel Spolsky is that he's clearly an unusually smart guy, yet every piece of text he writes includes at least one remark that is fundamentally, laughably wrong. The more you think about them, the stranger they seem. Some of the columns actually depend on that wrong thing, and those are the truly comical ones. (He links to one of those from the column linked above.)

I approach each Spolsky column as a puzzle: spot the howler. You might think he puts them in on purpose, to see if you're paying attention, but no. Joel Spolsky has a big hole in his head. Whenever he gets too close, he falls in; but he can't see the hole, and he doesn't know when he's fallen in. Probably we all have one or more of those. The smarter you are, it seems, the more of them you have. (ESR has so many, and falls in so frequently, that it's not even fun spotting his howlers.)

What's wrong about this one? Well, plenty. For example, if he had used different enumerations for the different "kinds" of number in Excel, then the compiler would do the job he's promoting uglifying your code to do. The real howler in this one, though, is when he gets to exceptions, and he displays this bit of code:

When you have code that says
your eyes tell you, what's wrong with that? ... The only way to know that cleanup() is definitely called is to investigate the entire call tree of dosomething() ...
Here's a hint, Joel: a cleanup function in C++ code is a red flag with klaxons on. You don't have to look at dosomething() to know if cleanup() is "definitely called"; it isn't. (Neither is the code after it.) Now what? Joel, that's what destructors are for. He tosses another couple of howlers into the same paragraph, one about a "finally" clause -- as if that could make his code any better -- and another about checked exceptions, as if they actually worked, but enough. He's not telling us how to write exception-safe code, he's telling us exceptions are bad because he can't be bothered to write exception-safe code. (In C# or Java, he can't, really; but that's another essay.)

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