20050724

Capitaine Flam and the death of scientific optimism

This Friday, I was goofing off at work, mostly because I was just waiting for the rain to stop. I had used my bike in the morning and didn't fancy pedaling in the rather strong summer storm that was in progress. I eventually came across this site and begun quizzing a co-worker on which songs he remembered. Now I feel quite old, because he didn't remember any of them.

I surprised myself enjoying the Capitaine Flam (Captain Future in English and Japanese) theme song. It's disco! It's kitch! But it's also a blast from the past.

I had never followed that particular series that much (preferring Albator to a large extent--seeing reviews of the two series, I sort of understand why). However, there's a particular episode that's still in my mind.

The good Captain finds himself stranded on a planet, his ship stuck somewhere in orbit. Together with other strandees, he builds a small ship from raw metal (how in the world can he do that? No machine shop, nothing... Anyway...). Unfortunately, the thrust system in the ship requires calcium to work, and there's no source on the planet. The Captain tries to sacrifice himself, but another strandee is quicker and walks into the power plant, letting his dead bones fuel the ship. All others escape, but rather gloomily.

Now, my recall of this episode may not be complete. Also, as I found out by checking out a few sample clips to refresh my memory, the animation was awful, the Captain was a stereotypical macho scientist-soldier with a density level approaching that of a neutron star, and overall, it felt very different from regular anime, plot-wise. But this particular story remains; it was a rather heavy-handed way to teach a kid that bones contained calcium, but it stuck in my juvenile mind. So, this is why I wanted to find out a bit more.

It turns out the series is based off an old pulp serial written by Edmond Hamilton in the 50's. Apparently, it got imported in Japan in the late 70's, and the Japanese really ate it up, despite all sorts of stupid plot devices, really weird concepts (one of the crew members was the brain of a dead scientist enclosed in a levitating cube filled with nutritive fluid--in the anime, it's a saucer-like device instead, but they kept the overall concept), a solar system with life on every planet (the anime places the action in different solar systems to make it a bit more plausible), a satellite around the sun, and a lot of other silliness. Curtis Newton, aka Captain Future, is the least plausible thing in the series, gifted with nearly superhuman brain power and reflexes. There's also a lot of silly stuff, like time travel, interdimensional travel, various human subtypes on every planet of the solar system, etc. etc. etc. And the total unconcern for safety around nuclear devices that filled pulps from that period.

It doesn't mean the series had no redeeming points. Newton is strong, fast, a perfect shooter, but still wins most fights through cunning and his superior scientific knowledge. Maybe unrealistic, but it did value brains over brawn, and although it was definitely meant to be wish-fulfillment for the target audience, it still made the pulp more clever than, say, plain superheroes. The text had some scientific explanations in them; some were completely bunk, but they were existing theories at the time. Keep in mind that before we sent probes all over the solar system, the fact that it was devoid of life was unobvious; we had only one planet as an example, and it's literally teeming with life of all kinds. But I think the main redeeming point is the sense of adventure, the optimism towards science, the sense that justice would prevail. Modern fiction is definitely more complex and mature for not being so optimistic, but it's also somewhat depressing, especially in the light of the events of the last few days.

So, what have I learned from this trip down memory lane? First, I've found out why the anime felt different from other anime at the time; it was actually an American story, which explained why it felt somewhat "average" in some ways. Still, I think it's an important anime, because it's one of the few that did adapt Western concepts; even if they were somewhat juvenile concepts, they are still part of our culture.

Second, I learned that I'm still very nostalgic about such series. I wish they were more easily available. People in France have better access to those; we in Canada are too small a market to matter much, unless the US cares. And the US doesn't care about most old anime series, because they were horribly dubbed and sometimes hacked to pieces and turned into some sort of composite anime.

Third, I feel that although the way pulps looked at the world were very naive, they served a purpose. I doubt the grunge movement would have come to exist if kids had been reading that kind of stuff instead of hanging out in bleak suburban malls. But nowadays, there seems to be three kinds of media that younger people consume. Squeaky clean, mind-numbingly dull shows like Barney the dinosaur, which, frankly, insult kids' intelligence (compare those to intelligent shows like Passe Partout if you have the chance, and you'll understand). Violent or disgusting cartoons, who are all pretty much the same and are really cookie-cutter shows to sell toys and such. And the things they aren't supposed to watch, and are usually depressing, trash/destroy music videos or series. Hardly uplifting material. Combine with news media that scream "fear! fear! fear!" all the time, hardcore porn that treat women like things, and wonder why you shake your head at the decline of social mores. Even adults aren't immune to such treatment, and kids are like sponges.

I am not advocating censorship in any form. All kinds of material have their place. But can't we get a breath of fresh air once in a while? That may explain why super-hero movies and Lord of the Rings are such resounding successes--they are breathes of fresh air. Unfortunately, they're also old material, and require suspension of disbelief. They also tend to be past-oriented, and I feel that future-orientation is one of the strong points of western society.

I guess I'm itching to see something like this corny, stodgy Capitaine Flam, but updated to modern standards. No need to make it violent or dark or anything; just remove the blatant macho elements, the rather dangerous use of atomic devices, make the science a bit more plausible (even if that means you have to introduce hyperspace, even though that's as implausible as everything else), and maybe we'll have something. It may not be that marketable nowadays, but dammit, I'm sick of wallowing in guilt over all the defects of my society, and I'm also sick the only optimists appear to be idiots (i.e., right-wingers) who are in denial over today's problems. Those problems are solvable, and we should be working at solving them instead of denying they exist or accepting them as the inevitable byproduct of modern civilisation.

Take the widening gap between the rich and poor in industrialized nations (or better yet, the gap between industrialized nations and non-industrialized nations). This is indeed a problem; it's returning us to a feudal-like system, with corporate employment replacing serfdom. Sure, it's not as many hours, not as physically demanding... But those are superficial differences; the work owns you, just like it owned the serf. The left likes to say this is the byproduct of a capitalist system; the right likes to say that everybody gets richer this way, even if the rich are much, much richer than the poor. Both attitudes are problematic, because they both perpetuate the problem. If the left wins, you just get a different clique with all the riches (remember the USSR?) If the right wins, as they are right now, it only gets worse. If you read older sci-fi novels, there's a huge contrast. The world is owned by the average majority. The heroes are sometimes richer than the average, but they show very little greed. Of course, they're also paternalists, and tend to patronize "the little folk", but despite that, the whole feel of stories of this era is much more hopeful than what I see these days. It seems, in fact, that those heroes wish for a day where they won't be needed anymore, and where everyday people will be able to live in peace.

There are other aspects of modern life that aren't being seen in the same way as they were in those novels. But this is starting to be quite long, so I won't go there.

If there was one thing those old stories did that isn't really done anymore, it was to teach elementary science concepts in the guise of a space adventure. In a crowded world like ours, "hard" science is losing relevance because the hard problem is becoming how to interact with all those other 6 billion people sharing the space with you. But in space, nature reclaims its place and survival comes from scientific thinking once more, just like it did on Earth before we started to tame it. The paternalist, gun-toting Captain Futures weren't the essence of such storytelling; the ability of humans to figure out who nature works and how to make the best of it was. I'm sure it would be possible to have good, entertaining stories with interesting characters without turning it into a dark, depressive mess many modern sci-fi stories end up becoming. And it would also be possible to have such heroic stories without resorting to super powers, or without wallowing in distortions of medieval history. If anyone knows of an author who does this, let me know.

As for myself, I intend to give it a shot--to see if I can pull such a thing. My own fanfics, although edging towards medieval/modern hybrids (and left unfinished, shame on me!), do try to have such an atmosphere. When I wrote them, it felt "natural;" so I don't think I'd have to force myself. The main problem will be to figure out an interesting plot with solid scientific basis (but not necessarily too solid--after all, the pulps weren't that solid about many things!), and come up with interesting characters.

Wish me luck!

20050718

Difference between Windows and UNIX programming cultures

This post on Slashdot links to an article on comparison between UNIX and Windows programming cultures. However, it mostly talks of how the problem of usability is approached. I'd like to take a different tack, in the difference between the API of the two systems.

  • Windows APIs are huge. In the Microsoft world, everything seems to end up being part of the core OS services somehow. This has the advantage that you don't need to expect people to have such-and-such library. Or does it? Changes to what is the "core" between OS versions make compatibility somewhat nightmarish; you're never quite sure what libraries are there or not. Writing installers is a mess. MSI helps, but not if there's no MSI package for the libraries. Another side-effect of this is that Windows programmers are always learning a zillion new things. Win32 services. COM. COM+. .NET. DNA. TAPI. The list goes on and on. Many of those APIs do the exact same thing, so learning the new one is only needed because the old one becomes obsolete. It's hard to stabilize such a huge API.
    In contrast, the core UNIX APIs have been mostly unchanging for 30 years. You can write most application-level code without touching the newer calls; newer calls are mostly there because they provide better performance, and are needed in more specialized situations. There are a lot of third-party libraries; however, they're not part of core UNIX, and it's reasonable for UNIX programmers (though maybe not from the users' point of view) to expect the needed libraries to be installed. Like core UNIX APIs, those libraries tend to use rather stable technologies.
  • Core Win32 APIs have no consistent reporting. OK, this drove me up the wall when I was coding on that platform. Does the MoveWindow() return NULL or INVALID_HANDLE on error? How about CreateFile()? And what's up with the ridiculous conventions for WaitForMultipleObjects()? Sure, GetLastError() is there, but so many APIs set this (including, say, MessageBox()) that many programs end up reporting an error as "The operation completed succesfully". UNIX APIs tend to return ints, -1 on error with errno set, a positive integer otherwise. Period.
  • The C library in Windows is a mess. It's getting better recently, but people still use old Win98 boxen that don't have a decent libc installed. This, plus the annoying mishap with memory allocation (there are too many ways to allocate memory: GlobalAlloc() (deprecated), LocalAlloc() (deprecated), VirtualAlloc(), CoTaskMemAlloc(), malloc() and operation new in C++--and they all use a different heap!), makes writing interoperable DLLs a real mess. Contrast with UNIX, which tends to ensure that malloc works the same across all libc versions, and where upgrading your libc pretty much upgrades your whole system, and you'll see why I was pulling my hair trying to fix installation problems with the C library. Of course, .NET will solve all this... Just like Java is supposed to solve similar problems on UNIX. Well, not everyone wants to install 100+ MB of runtime code just to run your application...
  • Windows SendMessage() is stupid. Granted, with MFC and such, you don't need to look at it as much. But what's the big idea of passing two parameters of a known bit-width for every message? Why not pass a void* pointing to a different struct for each message? The result: huge pain when porting from Win16 to Win32, and another huge pain that will occur when porting from Win32 to Win64. No wonder they want to move to .NET. Compare to X-Window, which uses the void* approach, and you have to admit that SendMessage() and the WindowProc() conventions are mis-designed.
  • Some Windows services are strangely tied to physical windows. For instance, many COM calls don't work if there's no window and no message loop. This is documented, but it's a pain in the ass for multithreaded programming. Ditto for timers; IIRC there's no way portable to Win98 that lets you have a timer callback without a message loop. Compare to UNIX setitimer(2).
  • UNIX threading is a mess. This has improved somewhat in recent years, but I still run into problems. Linux and glibc are the big culprits there. They have changed their threading strategies several time, and each time a glitch appears, we get a finger-pointing match between the kernel and glibc team. This is annoying to say the least. At least one widely-distributed Linux distro (RedHat 9) exhibits severe problems under load, due to bugs in the glibc that are partly made worse by the JDK. In my view, threading should be a kernel service (and I'm not completely alone in this view--it seems the Linux kernel is moving more and more towards that model) and it should remain stable, dammit. Sure, you could do similar things with fork(), but that's not a reasonable approach with a GC runtime. In contrast, Win32 threading has been rock-solid for years. You can bitch a lot about their synchronization privitives (events are extremely easy to mis-use, and their overlapped IO is one of the most convoluted APIs I've had the displeasure of using, full of corner cases and with no easy way to cancel without introducing a lot of extra code), but at least, threads switch properly, semaphorses are locked properly, and that part of the API has been very stable.
  • UNIX C++ integration sucks. UNIX people seem to prefer C. So, there's no integration between signals and C++ structured exceptions. C++ runtimes are not versioned as carefully as the libc. And so on and so forth. Annoying, this. C++ remains a second-class citizen in UNIX for rather stupid reasons. At least, in Windows, exceptions work somewhat right (you need to mess with _set_se_handler() IIRC to get it standard compliant, though), and the C++ runtime is versioned together with the C runtime (then again, the C runtime's versioning's already messy...).

I'm sure I could go on, but these are the main thing that strike me. I don't know if this is useful to somebody.

Credentials: I've worked in a Windows shop for four years, writing Windows applications first in raw C, then in raw C++. I've seen Win16 (the horror! the horror!), the passage to Win32, COM using raw C++ as well as ATL, lots of newfangled APIs (pen API, new serial port interface in Win32, WinINet, etc) and had lots of headaches getting the stuff to work all the way down to Windows 95. Lately, I've been mostly writing Java applications for UNIX, but I've had the opportunity to write some C code on POSIX systems once in a while. I like to think I know what I'm talking about on those two APIs.

Back from vacation

Came back from vacation 2 days ago. Spent time with my family in Hampton Beach, NH.

I've been to Hampton many times in the past. However, it was my first time doing it by bus (because I was joining the family in the middle of their vacation). There's a couple of weird things I noticed with my bus trip:

  • Those idiots at Station Centrale kept insisting the bus went to Manchester, NH first, then Concord, NH. I had picked Concord, NH as destination because I wasn't sure there would be a bus to Manchester (turns out there was, I'll know for next time). Manchester, NH is further south than Concord, NH, so starting from White River JCT, VT (where I had to transfer from the Montreal-Boston bus), it made more sense that it would stop at Concord first. Sure enough, it did. Went to Manchester anyhow because it saved some time otherwise. But if I had followed the tickets blindly, I would have been stuck waiting for the Concord bus at Manchester, which I would have just missed...
  • On the first leg, we had plenty of room; everything got packed at Burlington, VT. Namely, got a rather, ah, large person next to me with a bit of BO (don't blame him, though, it was really hot outside). Thankfully, unlike in a plane, I actually had room leftover.
  • All the cute women were in the trip from Montreal, when the bus was half-empty, so my plan of having a nice lady sitting next to me obviously didn't work. And I'd shownd up really early hoping that would happen. Bummer.

Besides that, not much to say about the vacation. It was mostly relaxing, no thanks to the idiots next door who partied until 5 AM every darn night. After four nights of this, several people complained (including us) and they got kicked out. The last two nights there were bliss compared to the previous nights. And before anybody says anything about me being an old fart and noise intolerant, I slept next to the A-15 in Montreal for four years, and I could sleep with the window open. A-15 is extremely noisy, so it's not about noise intolerance. Maybe I'm just incompatible with Rap music.

Then again, the owner told us those guys had made a foot-wide hole in the wall, and left shaving cream all over the place. I guess maybe they were just idiots.

Other things I noticed: property prices are insane down there. The only city with decent prices in NH was Manchester, which is odd, given that it's one of their largest cities. Coastal property is completely ridiculous, and rents are pretty bad as well. 4 1/2 start at 1000$ in most locations. Keep in mind those locations are suburbia at best; there is no bus service to speak of, commerces are only accessible by car, and so on. It gets worse in the Boston area (which, at least, does have some public transportation). I know taxes are low there, and mortgage interest is tax-deductible, but still.

Consumer good prices aren't that fantastic either. I bought two things: a nice pair of shoes (and I could've probably found those in Canada, now that I think back on it) and the Noir DVD set. I would have preferred getting the DVD set here, but it's out of stock everywhere. Even in NH, I only found it in Nashua. I saved a bit of money mostly because NH has no goods tax, but if it hadn't been for the out of stock thing, I would've gotten it here.

Who cares about consumer prices? Well, it used to be that going to the US, my family and I ended up close to the limit of goods we could bring back (there used to be a 300 CAD limit for a stay longer than 7 days). Now, although the limit is much higher, we weren't even close to the old limit. It's just not as attractive as it once was, even with the Canadian dollar so high and the lack of consumer tax in NH. I'm really wondering how USians make ends meet, despite lower income tax. I'm sure their salaries, just like ours, didn't move much since 2001; however, the prices are higher, real estate is insanely expensive, and even gas prices must be starting to hurt. You hear a lot of stuff on the radio about 0-down mortgages, getting a loan from the mortgage, etc. etc. etc.

This is happening in Canada as well, but I'm not that worried; prices are still somewhat reasonable, compared to theirs (it's still dang expensive, but looking at their real-estate classifieds sort of made me somewhat less sensitive to this). Taxes high, yes, but we don't have that medicare mess to contend with. The provinces are on the edge of deficit, but at least the federal government is not (and those who think state governments in US aren't in trouble; think again, they had to cut a lot of services from what I heard). And most people I talk to, even home owners, are extremely wary of taking loans from the mortgage. At least, in Quebec; don't know how it is in Ontario or BC. So, from what I can see, there's still room for price growth on real estate in Montreal (a good thing for me) without necessarily hurting everyone. I'd also expect that, if there is a speculative bubble in real-estate, it will hurt much less in Montreal than down south. There's definitely a huge bubble there; just look at Alan Greenspan's worries about the fact that raising interest rates does not raise mortgage rates. This is because banks expect to always be able to recoup their capital easily thanks to the speculative market which inflates prices way too fast. If prices crash, or even stabilize, some banks are likely to be in trouble.

Of course, I'm no economist. But seriously--300 000 USD for a 4 1/2 condo is insane, period, especially in suburbia. I'm getting annoyed at Laval prices which hover around 150 000 CAD for similar units--and you will get access to the metro in 2006-2007 at that price. But then again, maybe there's something I'm missing.

It's just that I didn't expect San Fransisco prices in the New England area. And I still think I had reasonable reasons not to expect that...

20050717

Cloud now running x.org

I just upgraded my main workstation, Cloud (named after the famed FF VII character with the big-ass sword) to use X.org.

Was a mostly painless upgrade. Didn't even follow existing instructions on the upgrade; I just noticed that a dist-upgrade grabbed a lot of xorg packages, so decided to take a look at xserver-xorg.

Initial problems: couldn't get OpenGL to work right. That didn't take too long to fix, though I'm not sure whether it's the refresh of the configuration I did or today's dist-upgrade that fixed it.

Second problem: it didn't really want to upgrade my XF86Config-4 file. Solution: nuke it, reconfiguration the package, and let debconf do the work.

There were a few other annoyances (mostly related to the dga and xv extensions that are never installed by debconf, for odd reasons), but it's been extremely painless. The main remaining annoyance is packages that still insist on linking on the original version of the OpenGL libs (such as xscreensaver-gl or doomlegacy); those won't install. But such is life on the unstable tree.

A lot of people reported better performance, but I haven't noticed anything. However, the radeon driver has always been very good even in XFree86, so that may explain it.

The main positive is that I'll finally be able to counter taunts from the Arch Linux fan at work. :-)

Enabled comments

OK, I decided to enable comments, mostly so I get an idea if anyone except Code Ronin reads this, or if I'm "pissing in a violin" as one of my French friends likes to put it.

Note, however, that you'll need to create a blogger user to be able to add a comment. This is in an effort to prevent too much spam. Maybe I'll move to a moderation-based system at some point in the future, but that would require migrating all of the blog. Right now, despite previous complaints, blogger is free, simple, and publishes to an FTP site, so I'll keep using this.