Older blog entries for ncm (starting at number 167)

18 Feb 2007 (updated 21 Feb 2007 at 01:27 UTC) »

MS Windows (stupidly) lacks a socketpair() function. All the re-implementations I found on the net faked it with pipes, which are (also stupidly) not selectable. It's trivial to code a selectable win32 socketpair, making it doubly stupid that it's not there in the first place, and triply stupid that all the other implementations posted are useless.

p.s. it's impossible to write "doubly", any more, without thinking about Spinal Tap and smiling.

[Update: the erstwhile predominance of useless win32 socketpair implementations might be seen as a manifestation of Bram's Law. I don't know what it means for Bram's Law that a useful one has now been posted. Bram, are you there?]

17 Feb 2007 (updated 17 Feb 2007 at 23:19 UTC) »
Omnifarious: No, don't track down who at Wells Fargo to write to about their putrid policies. They are more likely to try to have you arrested than improve their policies. Switch banks, refinance. Telling them why you closed your accounts just might reach the right person. Wells Fargo, like most banks, really doesn't care what you think or what you want; their valued customers are businesses. It's better to bank with people who have some reason to care, such as a credit union.
16 Feb 2007 (updated 14 Mar 2007 at 04:48 UTC) »

The bcm43xx driver in my Dell appeared to stop working. I thought about it, and realized that at the time when it did work, I had first loaded and then unloaded the bcm43xx_d80211 driver, which is from an alternative development line. Sure enough, that seems to be what it takes. Evidently the alternative driver initializes something the regular driver misses. Or something.

Anything written by Michael Pollan is certain to be well worth reading. Books include "The Omnivore's Dilemma" and "The Botany of Desire". (The latter reveals that what Johnny Appleseed of history and legend promoted was not apples for eating, but rather apples to juice for hard cider: a sort of American Dionysus.) A recent article in NYT Magazine, "Unhappy Meals", gets more interesting with each page.

I made my first edit to Wikipedia yesterday. Thus far it's escaped the attention of vandals, many of whom seem obsessed with that entry.

You may take my word for this: it is always a mistake to write a program named "stupid". The number of ways in which it will turn out to have been a mistake is unlimited. First, you code it. Normally, an omitted #include is no big deal, but now you feel stupid about it. Likewise any bugs (which you really ought not to have in such a little program -- right?). When you give the program to someone else (say, your boss), can they ask you how to run it? What if it doesn't work right? Who, precisely, in each instance, is being called, or thinks he might have been called, or is made to feel, stupid?

Every soon-to-graduate Computer Science student should be assigned to write that program. The truly smart ones will refuse, but how many of those are there? Give an automatic "A" to anybody who does; that's somebody who really understands software.

8 Feb 2007 (updated 28 Jul 2007 at 00:35 UTC) »
fxn: Five titbits you probably don't know about me?

1. I am generally of the opinion that any solution to a problem in personal transportation would be better if it employed a catapult, somewhere. The Crosstown Express sequence in the movie Robots gave me a warm feeling.

2. While in high school I read back issues of Communications of the ACM at the University of Hawaii library. That is where I first encountered Unix, in Thompson & Ritchie's 1973 paper, probably in '77 or '78. I was fascinated, but didn't get to see a real shell prompt until 1982. (I first compiled a program on Windows last week. :-P)

3. I met my wife for the first time on my second day in Jakarta. She was living in Bali, and was on her way through to Singapore to renew her visa. I got her address, she left the next day, and I dropped in when I got to Bali six weeks later.

4. I find mild electric shocks more invigorating than painful. This fact led ultimately to my obtaining a degree in Electrical Engineering.

5. I would like to see capital punishment applied only to public officials and officers of public corporations convicted of abusing the public trust. (Bumper sticker: "See Dick Fry!")

Contributing to the exponential explosion, I a-nominate slamb, mjg59, Ankh, redi, and, oh, robertc.

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.

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