Older blog entries for ncm (starting at number 162)

robogato: What I'd like to see posted in articles is the knowledge of our more distinguished members. I'd welcome anything slamb, graydon, or mjg59 deigned to take a moment to explain. Good coding puzzles have been popular, too. The typical problem with the discussion threads attached is staying on-topic. Maybe a separate "reply off-topic" button, and associated thread, would help; and maybe allow the author to move replies from one to the other.

I found myself porting something to win32, for the first time ever. The linker was failing to see extern variables defined at the end of the C file; moving them to the top "fixed" it. In this day and age?!

5 Feb 2007 (updated 5 Feb 2007 at 21:12 UTC) »

O Happy Day! The wireless card in my Dell D620, which Dell calls a "1390", a mini-PCI-Express card with a Broadcom BCM4311 chip on it, works now. This card ships with lots of other laptops, Dell and otherwise. A patch, bcm43xx-2619.patch, (also for BCM4312) in the 2.6.20 changelog applies nicely to 2.6.19. (It appears you also need on-card firmware to be loaded from /lib/firmware, e.g. bcm43xx-firmware.tgz, to make it work.) Now maybe I can finally retire my orinoco cards. Now, too, maybe people will stop hustling ndiswrapper as some kind of holy grail. It was actually kind of hard to get this patch; the one in 2.6.20 mixed in other stuff, and the git web interface on kernel.org was borked. Copious thanks to Stefano Brivio and everybody else involved.

fejj: The way Bell Labs solved a similar problem (spell checking) on V7 UNIX was to hash each item several different ways, and set a bit for each result in a common bitmap. If hashes for the next URL find all those bits set, you've almost certainly seen it before. Extra credit for quantifying "almost certainly" according to bitmap size, number of hashes, and number of URLs.

23 Jan 2007 (updated 24 Jan 2007 at 20:49 UTC) »

[erstwhile spammers deleted]

23 Jan 2007 (updated 23 Jan 2007 at 22:21 UTC) »
chalst: (In reference to Tupper's Self-Referential Formula) Let's see if I understand this. It seems to be suggesting that, because an image can be represented as a sequence of bits, and so can a large number, by choosing a large number with just the right bits you can represent any image you like -- even a rendering of the mathematical formula you chose to implement the rendering.

Revolutionary.

Perhaps automated calculation can someday be used to compile tables of settings to enable accurate cannon targeting.

pjf: Powdered ginger is the "really strong sea-sickness medication" you're after. In double-blind tests it turned out to be twice as effective as dramamine. Even better, it works even when you take it after you already feel queasy.
12 Jan 2007 (updated 12 Jan 2007 at 21:35 UTC) »
I will not be buying an Apple iPhone. No one in my extended family will be buying an Apple iPhone. I am, however, carefully watching lkcl's progress in putting Free Software on slightly less proprietary gadgets.

It turns out (as I had expected) the idea of combining encipherment and secure hashing in one operation is familiar in the crypto industry. However, the approaches I see published look painfully crude. EAX and CCM, in particular, are no faster than enciphering normally and then hashing with SHA, so what's the point? Kerberos 4 used "propagating CBC" which has the weakness that if you swap two (at-the-time 8-byte) ciphertext blocks, the plaintext is garbled but the checksum is good. That should be fixable with (more-or-less-) simple whitening. E.g, here's 16 bytes of endian-agnostic whitening:


    #define MASK64 0x00ff00ff00ff00ffULL
    #define WASH64 0x005a005a005a005aULL
    sum_lo = ((((sum_lo &  MASK64) +  WASH64) 
                & MASK64)
            | (((sum_lo & ~MASK64) + (WASH64<<8))
                & ~MASK64));
    sum_hi = ((((sum_hi &  MASK64) +  WASH64)
                & MASK64)
            | (((sum_hi & ~MASK64) + (WASH64<<8))
                & ~MASK64));
I kind of prefer the CFB w/checksum approach:

  C(i) = sum(i-1) XOR P(i)
  sum(i) = W(sum(i-1)) XOR AES(C(i))
  sum(0) = AES(IV)
where W is whitening as above.

apenwarr: Automatic variable-type (and argument-type) deduction from initialization value is (1) well-known from Haskell and ML, (2) one of the important new features of C++09, and (3) coming this year or early next to a GNU G++ near you. C# could have had the feature any time, but MS didn't think of adding it until they saw C++ would have it. Of course it's particularly useful only when you have real templates.

titus: Got two helicopters. Shipping seemed a bit dear for UPS ground, but apparently because they were a couple of days late shipping, they sent it 2nd-day anyhow.

One more thing about the NEXBlack: every 10 minutes it pauses for a half-second. Next to try is to see if it will play Ogg/FLAC. I'm betting not. If they'd just release hardware specs to the Rockbox people it would have decent firmware in no time.

6 Jan 2007 (updated 7 Jan 2007 at 21:24 UTC) »

Bumper sticker: "Impeach Cheney First".

The serial number on my NEXBlack is 112. Evidently not quite everybody agrees yet that they represent the Holy Grail of MP3 players. Give it time, I say.

Relative power corrupts relatively.

1 Jan 2007 (updated 1 Jan 2007 at 17:59 UTC) »

My Frontier Labs "NEXBlack" Ogg player finally arrived from New York. (This is the one that runs 30+ hours (yes) on 2 NiMH AAs, and has no memory built in, but has a nice CF slot.) It's a substantial chunk of sturdy black plastic. I got a 2G CF card with it, now 87% full. The sound quality (of my 250kbps Vorbis files) is good. The earbuds are demonaically uncomfortable, and don't stay in, but they're loud. As noted by others, it freezes up (needs batteries popped just to turn it off) when it sees an .m3u file describing Ogg files. The UI is annoying, but I doubt other players are any better. The worst omission is that it won't sort by file date; it insists on alphabetizing, so I'll have to rename the files in album order with numeric prefixes. That, and when you turn it off and back on it doesn't remember where it was. I like it, but I'd like it better if Rockbox was on it.

I finally got my brother's laptop working OK for him under Ubuntu Edgy, but it wasn't pretty. I had to delete (ok, rename) the drivers for his Marvell ethernet so that the ipw2200 would have a stable interface name across boots and ACPI suspends. (Iftab is now completely useless, as is "mapping".) Wpa_supplicant wasn't too hard to get working: the suggested four-line /etc/wpa_supplicant.conf did the job. The dpkg really should install it by default. To keep Flash content from crashing firefox I had to add a line "export XLIB_SKIP_ARGB_VISUALS=1" to the /usr/bin/firefox script. Other firefox stuff was fixed by "dpkg --purge"-ing firefox and everything related, and re-installing them, but now it won't display PDFs in attachments from squirrelmail without an intermediate "save" step. The SD flash slot now has a driver, but still doesn't work.

To my complete surprise I have found myself obliged to design a cryptographic algorithm. Not a cipher, heaven forfend, but a feedback mode and envelope scheme. The idea is that when sending UDP-grams, without decent crypto anybody can disrupt your session from any cyber-cafe from here to Kamchatka. If you're encrypting anyway, it's wasteful to *also* compute a MAC, when you can use a chaining encryption mode to do both jobs at once at the cost of only an extra XOR.

By blacklisting ethernet, wireless, and audio driver modules, and also all the programs that hold them open (xmms, gamix, etc.), I got swsuspend2 waking my Dell D620 laptop up without bollixing audio and wireless networking. I also got the Dell driving a Pioneer plasma TV, but so far not without it cutting off half the image. Still no success with the Broadcom wireless card (which Dell calls a 1390), despite all lwfinger's efforts, but my orinoco card works OK now.

Last weekend I made a real egg nog for the first time: separate four eggs, whip the yolks to within an inch of their lives, add a half cup each of brandy and cream and four tbsp sugar, and whip some more. Whip the whites until stiff, and fold them in, and add some cinnamon and nutmeg. It makes a surprising amount of something unlike anything you can find in cartons.

Congratulations to njs & crew on releasing Monotone 0.32.

So, Happy New Year, everybody. Time for another donation to Darren Naish.

12 Dec 2006 (updated 13 Dec 2006 at 22:35 UTC) »

I dist-upgraded my brother's Toshiba laptop to Ubuntu Edgy, and now it can't find open wireless hubs any more. In particular, the waproamd daemon won't even run any more; libc insists it's passing the wrong number of arguments to some apparently undocumented system call. The web (but not the package system!) is plastered with warnings that waproamd is obsolete and buggy. However, waproamd always worked perfectly for my brother, where wpa_supplicant doesn't (yet?). Furthermore, iftab no longer works reliably across ACPI suspensions to give the wireless interface a stable name. This upgrade was a decided downgrade, for him; his computer is entirely unusable until I can get anonymous wireless networking going again. On the good side, the PCMCIA slot works now, as does DMA on the DVD drive.

I just fixed a problem in my mother-in-law's Firefox 2 on Ubuntu: the bodies of her Yahoo mail messages showed up blank. The NoScript plug-in turned out to be at fault, and the workaround turned out to be clicking the checkbox in its configuration that caused it to display all domain names, not just 2nd-level, allowing them to be turned on and off individually. I didn't actually need to turn any on or off; just displaying them sufficed. That was another downgrade; one wouldn't say 1.5 "worked fine" (*cough* memory leaks! *cough*) but...

Hibernating this Dell Latitude D620 with swsuspend2 seems to work OK except that the "snd_hda_intel" driver for the mixer (variously identified as a SigmaTel STAC9200, Intel ICH7 82801G, and Intel HDA) gets very confused, and ultimately unable to produce audio. I don't know who to tell about it, so here you-all get to hear about it.

Zaitcev: How curious that the chart omits G.W. Bush. I suppose it's not clear yet whether he will ultimately achieve placement in the 1M+ group. It seems worth noting that Hitler, unlike most others in the list, was legally elected. (Others: Ataturk? Mussolini?)

bi: I created the Orkut group "Libertarians Make Me Laugh" some years ago. Still the silliest thing posted there was a (real!) quote from Eric Raymond insisting that markets weren't invented, but were rather a natural phenomenon, spontaneously discovered: "the free market isn't a 'device' any more than love or gravity or sunshine are devices". Big-"L" Libertarianism is best understood not as a political philosophy, but rather as a religion, closely akin to Scientology and Marxism, and also, curiously, (under the name Objectivism) a sexual perversion. (I'll bet you thought those didn't exist any more!)

elanthis: Years ago I was driving behind a Dodge pickup truck that rear-ended a little Mazda Miata. The front of the Dodge truck was all stove in, a real mess. The Miata came away looking barely touched -- a couple of minor scratches on the bumper that might already have been there. My major professor used to boast of the number of Volvos he had totalled with the backside of his VW Rabbit. 28 years ago I stove in the front of a Rabbit, myself, on the back of a Datsun pickup with no bumper, also left undamaged.

[Update:] Zaitcev: Collars are both a Victorian fetish, and currently popular among cross-dressers to obscure their protruding Adam's-apple. (Cf. Tootsie) I don't know how those tie into anime, but fetishism seems inextricable with the genre. I just saw Nausicaa, and the protagonist's omission of a certain often-fetishized article of clothing must have been meant as a sly dig at genre fans.

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