Older blog entries for ncm (starting at number 116)

16 Mar 2005 (updated 23 Mar 2005 at 20:09 UTC) »

I seem to be about to get a new job at Codesourcery. I'll be writing a non-object-oriented C++ library to do automatically vectorized and -parallelized, embeddable signal processing, to be paid for by the USAF but useful for the rest of us, and licensed under the GPL, with workplace and hours of my own choosing. Now I need a place to park a desk in Cambridge. Working alone in a silent, bare office is tough. I expect to be working in cafes until I find something.

Optics
I've been trying to find an optical engineer/physicist to chat with. When quasars seemed impossibly bright and far away (according to their red-shift), Emil Wolf suggested a mechanism by which correlated photons passing through certain varying magnetic fields could be artificially red-shifted, and Daniel FV James showed how such fields might arise naturally. I'm interested in engineering applications of the Wolf effect. My question is, how hard is it to get thermal photons to "correlate"? (I understand that a collection of similar photons moving together tend to adopt a common state, but not precisely how or under what conditions.)

Need an example of an engineering use? Gather sunlight and run it through a diffraction grating, persuade resulting slices of more-or-less monochromatic light to self-correlate, and then pipe it through just the right EM field. When the light gets red-shifted, the energy must be going into the field. We already know how to extract energy from slowly-varying EM fields.

Could the nearly-monochromatic light efficiently pump a laser? Would garden-variety coherent light suffice to provoke the Wolf effect? Can the Wolf effect operate usefully over less than astronomical distances at reasonable field strengths? (Consider that the conversion efficiency of the competitors for solar energy conversion is a low target.)

[Update: the energy that comes out of the red-shifted photons doesn't go into the field, it goes into blue-shifting some of the other photons. Furthermore, the red-shifted photons come out at angles, so within a fiber they would mush together and you would just end up with frequency dispersion. Bummer.]

chalst: Thanks for the welcome. Apologies for having taken so long to post.

msevior: It's not a mistake to talk to a Microsoft program manager. It's a huge mistake to hope for any substantive help from one. What he says about MS's process is completely unsurprising, and in fact explains why their products suck and why they need to illegally enforce a monopoly to make everyone keep paying for them. (E.g. consider that bug fixes have practically zero revenue potential.) Their only real opportunities to grow revenue are making people upgrade more, porting to new languages, and getting people with bootlegged copies to pay for them. It's almost surprising that they have any coding staff on it at all. The less you know about MS Word, the better off you'll be.

Sour Grapes
Recent postings -- an interview with Alan Kay, and a complaint about "object-oriented" languages on Lambda the Ultimate -- expose the most unattractive feature of academic-language communities: sour grapes. Kay actually repeats the old myths about early C++ being just a macro processor on C, despite that just about every new language since has been implemented first in exactly the same way; and about Bell Labs aggressively promoting it (with its $3000 budget?). Lisp people still try to criticize C++ by criticizing the notion of an object-oriented language, despite that C++ isn't. (Most of the language is to support what has come to be called generic programming.)

Lisp and Smalltalk have had every chance to take over the world. They haven't caught on, and for very practical reasons. Not least among those has been ideology. I don't know of any successful language founded on ideology. If your pet language isn't taking the world by storm, you should figure out what keeps people from being able to use it in their projects, and fix that. GC is a usual culprit.

Orkut
"Lisp", 708; "I resent LISP", 63; 708/63=11. "C++", 9325; "I hate C++, 129: 72. "Java", 13274; "I hate Java", 744; 18. "Perl", 3745; "I hate Perl", 309: 12. "Python", 2490; "Python sucks", 32: 78. More people still hate Java than like Lisp. Perl and LISP are duking it out for most hated (or resented) language. Java is in eclipse (or vice versa?) but still making a respectable showing.

Bram: C02 produced by respiration doesn't count, because whatever you exhale was absorbed recently by what you just ate, and will be re-absorbed again. What counts is the CO2 released from ancient carbon stores that had been out of circulation. Similarly, the CO2 exhaled by cows doesn't count, but the methane (hydrocarbons) they, er, expel does, because it is not re-metabolized like the CO2, but just hangs around until it oxidizes.

Recent discoveries suggest that the mysterious carbon sink (by which the CO2 levels in the atmosphere haven't grown as fast as all the well-known sources and sinks would imply) is actually dissolution in the oceans, producing carbonic acid -- which seems (also) to account for the coral bleaching. A problem perhaps more worrisome than acidified oceans, and no more coral reefs (!), is that as the upper ocean gets saturated, it stops absorbing so much CO2, and then the atmospheric concentration shoots up. There's some evidence to suggest that this is already happening.

BTW, if you're serious about improving bittorrent, how about a way for the recipient of a bad block to tell the sender, so the sender can re-hash its own copy and see if it's been corrupted, and maybe get it again from some other participant? I just got several hundred copies of the same bad block, over the course of four hours. Failing that, how about the client not asking that particular sender for that particular block any more?

Ankh: As I noted in the original article, a solution even in C is trivial if you use somebody else's library, such as the ISO C standard library. The point is not to solve the problem by reference to somebody else's work, but to use the many tiny difficulties inherent in the problem as a hard surface to use to chip off your mental inflexibilities. Cheating doesn't teach you much.

yeupou: Since you can run any ordinary x86 kernel, of whatever stripe, on an amd64, it is inherently as well supported by OSes as Intel chips. The difference is that it can also run 64-bit OSes and binaries, and run substantially faster because of its extra registers, faster memory pathway, superior instruction decoding, and non-crippled cache and ALUs. A 2GHz amd64 can usually outrun a 3.2GHz P4 -- as can, often, an old P3. I installed Ubuntu Linux on mine. I suppose it will run 32-bit binaries under the 64-bit kernel and user-space, through some kind of "mount MS_BIND" ldso trick, although I haven't yet encountered any reason to try it.

9 Nov 2004 (updated 9 Nov 2004 at 06:52 UTC) »

I finally posted my solutions to last week's Coding Challenge. I'm hoping somebody (e.g. you) can do better. The point of the challenge was that a problem that looks trivial but messy can absorb (and reward, sort of) an astonishing amount of care. If you can do well on one of these, please tell me.

miah: I can't imagine why anybody would buy a P4 these days, instead of an amd64. Can you still return it all?

5 Nov 2004 (updated 5 Nov 2004 at 06:18 UTC) »

You know how they say that half the population is below average? America proved it on the 2nd. (The extra 1% was your garden-variety election fraud, familiar stuff by now.) Remarkably, three quarters of those who voted for him still believed that Iraq had WMD, and had something to do with 9/11, and that most of the world actually thought we should re-elect him. I don't know who are worse, the dupes who believed him, or the ones who voted for him anyway. Both, I suspect. Will we even have elections in 2008, or will they be found a nuisance, and abolished? I wonder how soon Americans will be sneaking into Canada to take menial jobs and send money home.

chalst: Thank you for the kind words. You inspire me to try to excel. On that note...

It makes me laugh to see people like ingvar agonize about what language to write fast code in. Hint: with a powerful standard library, you don't have to code your own data structures any more, or trade off speed for convenience. It makes me laugh to see people (even raph and davidw!) agonizing about "manual" memory management, vs. garbage collection. It has been years since I wrote a delete statement, in C++. Let me repeat that: years. What possible benefit could GC offer, in exchange for its enormous costs? (No, I don't need to hear how cheap GC is. Tell that to the suckers underbidding one another for Java jobs.)

Speaking of performance, I just wrote a network program that processes 600MB, in and out, in 3 CPU seconds on a 1.4GHz P3. You can tell I didn't write it in Java or CL, right?

Funny, nobody has proposed using the Mozilla execution environment to deliver cross-platform GUI applications. It seems to work pretty well for Firefox and Thunderbird.

pcolijn: The half-life of a laptop drive is a year. This machine I'm typing on has gone through four of them already. It's a commodity replaceable, like your battery, and like your car's headlights and tires. Budget for a scheduled replacement, and replace it before it actually dies. Then the old drive can serve as a back-up, in case you never do them otherwise. (Is somebody about to tell me you can't replace the drive in an Apple by yourself?!)

Remember when itamar had lamented that coding jobs compatible with Free Software development were scarce? You don't hear him complaining any more. There's a new puzzle up, as promised, involving strawberries. Mmmm, strawberries.

My employer is finally upgrading from libxml2 version 2.4.23. DV, time to pull some receipts together and send them along.

Like everybody else, I just installed Ubuntu on my shiny (well, matte black) new dual Opteron box. It seems to work, except I can't seem to purge the pcmcia package.

orkut: "Lisp", 662; "I hate Java", 714. "C++", 6378; "I hate C++", 113 -> 56. "Perl", 3537;"I hate Perl", 300 -> 12. "Java", 10082 -> 14. Perl has overtaken Java as the most hated language. (Or has it? "I resent LISP", 59 -> 11. Is LISP the most resented language, now?) The most amazing thing about Orkut (besides that it's a Google service that is down more than it's up; what an embarrassment!) is that 2/3 of users are Brazilians, outnumbering U.S. members by a factor of 5! Who knew they even had computers? Maybe Americans will soon be sneaking into Brazil, instead.

20 Aug 2004 (updated 21 Aug 2004 at 15:40 UTC) »
lukeg: First, 10M cells is 80MB. Second, that article is from years ago. Things are very different now, but it still can't afford to CONS wildly. It would take a long time just to touch 10M words (and it burns way more than 80MB these days!), so a GC sweep is out of the question. Generation scavenging helps not at all, because there is nothing to go into slower generations. Now there are various cons caches, many of which contain ready-linked trees (handy for post-mortem analysis too), but anything involving (e.g.) floating point calls out via FFI to a big C++ library (~7MB text) to avoid boxing. Likewise for anything involving mmap, or xml parsing or xslt transforms. (Thanks again to DV for saving us from the horror that is Xerces/Xalan.) Finally, the value of anything Paul Graham writes is in inverse proportion to its proximity to the subject of Lisp; if he actually mentions Lisp, he hits zero. Fortunately he writes other things.

AlanHorkan: The best programming puzzles on the web are still at ITA Software's recruiting page. Up now is one involving "palindromic pangrams"; finding the minimal one is astonishingly hard. There's a new puzzle, fiendishly tricky, going up soon involving strawberries. (Please write to me if you do one.)

cactus: You have encountered what is called a "dependent name". In

template<typename T> struct Base {
  int member;
};

template<typename T> struct Derived: public Base<T> {
  int func() { return member; } // Error
};
...why can't it look up member in the base class? Because there's no guarantee that Base<T>, for that particular T, has such a member. It might be specialized, and have a completely different definition. When you say this->member, though, you're saying you know you want an inherited member and nothing else, the compiler should refuse to compile if there isn't one. (Since the expression depends on T, the compiler waits until instantiation time so it can check.) If this seems weird, consider the alternative: it would have to go looking for a global member instead, and if it finds one, no error message.

It's not so bad. Good coding style these days says always use the "this->" notation when referring to members. It's clearer that way, and less subject to surprises if you make a typo. After a bit you will be annoyed reading code not written that way. Anyway, I am. (But I'm always annoyed reading other people's code, sometimes even graydon's.)

Galeon hasn't crashed in a long time. Has anybody else, though, noticed Slashdot taking 30 seconds to render at 100% CPU? I wonder if it's the 2.6 kernel, and some strange low-memory behavior.

Orkut: "Lisp", 611; "I hate Java", 669. Interestingly: "C++", 4588; "I hate C++", 113, or 4588/113=40. This ratio is approaching Python's 2171/46=47.19. Compare to Java's 7440/669=11 and Perl's 3269/295=11. See also "Lisp" vs. "I resent LISP", 611/56=11. Hmmm.

9 Jul 2004 (updated 9 Jul 2004 at 16:55 UTC) »
mwh: A disadvantage to hosting your own blog is that nobody will see it. Certainly I won't.

Gnome-panel release 2.6.2 has restored the old bug where the panel stays "unhidden" even though the pointer isn't on it any more. It's not so easy to make it happen deliberately, this time.

Orkut: "Lisp" 599, "I hate Java", 651.

6 Jul 2004 (updated 28 Aug 2004 at 14:50 UTC) »

I was really missing Advogato. I would go to great lengths to keep it on the air, now, including paying money. Where should the money go? We need a paypal button.

To all of you who have moved your diaries off of Advogato: I'll miss you. Why are the best ones the ones who leave? Can't you please mirror your (better) postings here, too? (Please don't leave us, mjg59!)

USENIX Boston came and went with nary a mention in any of the news media I frequent. In an hour there I spotted David Korn, Peter Salus, Dennis Ritchie, and Miguel. Peter Salus was wearing a penguin pin that he swore he didn't mean anything by.

fxn: Congratulations on becoming a father. Your work has just begun...

Congratulations to DV on another stellar release. You'll get it right eventually. ;-)

Bram: My employer assigns a tricky, performance-sensitive algorithm invention and coding task during the interview. It has worked well, and is hard to fake. In fact, it works so well that they hired itamar during Advogato's hiatus. He has since beaten the previous record of number of bugs fixed per day on the job.

rmathew: Actually to read Ian Joyner's diatribe is to invite brain damage, or if you're lucky just mental illness. Nathan Sidwell's essay is much less crazed, but it describes the language of ten years ago, long before it was standardized. Most of what he mentions is fixed in ISO C++98. Those of us using C++ these days consider "object-oriented" kind of quaint: virtual functions are handy where in C you would have been obliged to use function pointers and/or switches. A language that can only do OO can only be for laughs.

Brought my office machine up on linux-2.6.7-mm2. It rebooted spontaneously about once per day until I upgraded further to -mm5. I found that (still!) I have to run the ALSA sound drivers as modules, or no go.

Are the new Advogato members jrwrestling and stanfograd98 really spammers? "Search Engine Optimization" is the practice of tricking search engines into listing somebody more prominently than they would otherwise rate. Does that (or wrestling shoes) have anything to do with Free Software? And, what does it mean that jr was the last new member before the crash?

Since upgrading, all my GNOME problems have passed away. Metacity doesn't crash any more. The gnome-panel system status monitor has begun reporting swap space usage again. Galeon still crashes if I try to delete more than one cookie, but I'm assured that's been fixed in CVS. Now we just need for the file selector box to display an edit window, and all will be well, excepting of course Nautilus, but I don't use that.

Orkut: "Lisp", 593; "I hate Java", 644.

seb128: I just (apt-get) installed GNOME 2.6 on my laptop. Thanks! Thanks to lots of other people here, too.

There's that spiffy new file selector dialog. It all certainly feels snappier, somehow. Nautilus follies bother me not, because I have installed it not -- although I notice a "libnautilus" has sneaked in. The "swap" box in the panel system monitor still shows 0 all the time. Let's see if metacity 2.8.1 crashes less than 2.6.5 used to.

apenwarr: Your posting demonstrates you don't really understand what a corporation is. They are not just allowed to be immoral: they are legally obligated to act amorally (thus immorally). That they don't always maximize their immorality is an implementation flaw. The directors are supposed to replace any officer who demonstrates moral compunction, and are subject to shareholder lawsuits for failure to comply.

I just tried my wavelan card for the first time since last August, and now I get an immediate DHCP response. A neighbor must have added a wireless hub since last I checked. Should I drop my $60/mo Speakeasy DSL account now?

I finally got around to setting up automount for my USB camera cable, because my $5 PCMCIA Smartmedia adapter had taken to burning out memory cards. I had to change the line in /etc/auto.master to have "--timeout=2", because a space doesn't work there (in place of "=") in this version of autofs. I made a symbolic link, /camera -> /rmv/camera/dcim/100olymp/.

Orkut: "Lisp", 517; "I hate Java", 556. The corpse twitches.

23 May 2004 (updated 23 May 2004 at 18:42 UTC) »

It makes me sad to see people like murrayc stop posting their diary entries here. I won't see them wherever the hell they've gone. (I miss John Fleck's, too.) Can't you guys mirror your entries here?

Thanks to thomasvs for advogeto.py. I have a minor variation that retrieves datestamps along with the diary entries, and names retrieved files using them so the files sort correctly. More importantly, its download progress reports end with \r instead of \n. :-)

Seth Nickell's take on Mono risks was the most cogent I have read yet. Once Sun goes into receivership, or is otherwise obliged to dump its unprofitable Java properties, I expect to see the buyer engage in SCO-like actions over the various Java patents, too. Gcj is proof against most of them; a Gcc# would be a strategically advisable project for those who actually believe C# itself is a good idea. For those of us who can be bothered to do GUI work, a gnomemm version of (e.g.) muine would be a good project. It would be fun to deliver something faster, smaller, prettier, and more reliable in a legally-unencumbered language, and to make Miguel stammer and gape.

Galeon has crashed a couple of times. Metacity still crashes too.

Orkut: Lisp 512, "I hate Java", 553. Pulling ahead again. I notice that Orkut is a good place to try out ideas before posting them someplace that matters. You're guaranteed to get all the stupid reactions, which you can then head off in your real posting elsewhere.

19 May 2004 (updated 19 May 2004 at 19:58 UTC) »
This incredibly useful paragraph is repeated from the previous entry, in case advotroubles kept you from seeing it: Running linux-2.6.6-mm1 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 locatedb's cron job has run. (Really the system ought to figure this out for itself.)

No crashes lately, except Metacity.

Orkut: "Lisp" membership 507, "I hate Java" 541. It looks as if Orkut activity has not only peaked, but is already well out on the asymptote, and nearly dead. It was an interesting experiment, and its mummy may yet yield myriad fascinating insights(*). For example, we can tabulate membership in "Lang" vs. "I hate Lang" groups, and draw conclusions that had been entirely insupportable, before. Look: Java 3136/541=5.8; Perl 2651/288=9.2; Lisp, 507/50=10; C++ 1918/100=19; C# 934/22=42; Python 1791/40=45. From this we can conclude, for example, that Java takes the prize for most hated language, easily beating out Perl; that very few people actually know anything about C#; and that people generally feel Python's merits overwhelmingly compensate for its flaws.

(*) besides a use for five "y" words in a row

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