Saturday, November 28, 2009

Newegg versus Tigerdirect

Is it just me, or do Newegg and Tigerdirect deliberately not stock the same products at the same time?

Wednesday, October 7, 2009

OpenCL

Ryan Smith discusses the state of OpenCL support at Anandtech. Surprisingly some of the comments to his post are actually useful too.

Thursday, October 1, 2009

Ardipithecus ramidus: 15 or 4,400,000 years late.


Carl Zimmer (at The Loom) and Matthew Cobb (at Why Evolution is True) have nice short write-ups (with links) on Ardipithecus ramidus, our 4.4 million year old cousin.

Update: John Hawks' weblog has the most detailed runthrough and independent analysis of the Ardipithecus papers I've seen (starting here). If your interested in Ardi, this is the place to go.

Wednesday, September 16, 2009

Ayn Rand didn't like physics?

I've been very busy with work and other functional duties, but this is worth a link.

Jonathan Chait has an excellent essay on Ayn Rand and the irrational beliefs of her followers on the political right. There is much worthy of discussion, from her bizarre upbringing and even more outlandish cult-like cliques through to her and modern conservatism's absurdly anti-factual beliefs regarding worth, work and taxation, but I'd love to follow up on this snippet of information:
(she considered the entire field of physics "corrupt")
Maybe the library will get the biographies referred to in the essay, but I doubt I'll have the time to follow up on Rand's physics hatred. After all, some of us have real work to do.

Thursday, August 20, 2009

"Unix is the best screwdriver ever built"

Unix is now 40 years old, if measured from August 1969 when Ken Thompson decided to spend a month while his wife was away by writing the core of what became Unix.

The BBC has a nice article by Mark Ward on Unix's history, ending with a quote
"Unix is the best screwdriver ever built," said Dr Salus.
that echoes the theme of Neal Stephenson's "In the Beginning was the Command Line" that compared Unix to a Hole Hawg drill.

Tuesday, August 11, 2009

Amazon MP3 downloads from Linux: clamz

Amazon.com offers quite competitively priced full album DRM-free mp3 downloads. You can purchase and download individual mp3 songs without requiring additional software. But they do require you to install and use their Amazon MP3 Downloader software in order to purchase and download the albums, which are of course better value for money as long as you want most or all of the album.

To their credit they provide their software not only for MS Windows (XP and Vista) and Mac OSX (10.4 and higher), but also for Linux (Debian 4, Ubuntu 8.10, Fedora 9, OpenSUSE 11.0).

Sadly if you're using a version of Linux other than those supported you may have trouble: the Fedora 9 amazonmp3.rpm will not install under Fedora 11 (although vwbusguy provides a work-around for Fedora 10).

Luckily there is another option: a command line tool called clamz (vwbusguy has produced Fedora 11 RPMs of clamz). Attempt to purchase the mp3 album from amazon as normal and once it offers you the chance to open or save the .amz file choose "save to disk" instead. Then run clamz on the .amz file, e.g.
clamz -d ./ AmazonMP3-*.amz
If you don't use the official amazon downloader you do have to jump through some hoops to get the *.amz file that clamz uses:
  • Select the album you wish to purchase and click the "Buy MP3 album with 1-Click" button.
  • A page appears asking you to install the Amazon MP3 Downloader application, presenting links to Windows, OSX and Linux versions. At the bottom of this page is a small link saying that if you've already installed the application you need to enable it in your browser and offering a link to do so. Click that link.
  • You are redirected back to the web page for the album.
  • Click the "Buy MP3 album with 1-Click"button again.
  • A new window appears asking if you really want to purchase this album. Click OK.
  • A dialog window will appear offering options to "Open with" and "Save as". Save the *.amz file its offering you.
  • Go to the command line and run clamz on the amz file.
  • Note that you can only run clamz ONCE on any *.amz file.
One thing that is slightly worrying about this is what happens if the download fails? If Amazon thinks you've downloaded the album they wont let you download the files again.

[Updated 10/20/09.]

Tuesday, July 28, 2009

Coyne reviews Robert Wright's "The Evolution of God"

Jerry Coyne (author of "Why Evolution is True") has a lengthy review of Robert Wright's latest book "The Evolution of God" (Amazon link).

In short: Wright cherry picks examples in an attempt to demonstrate "moral" progress mediated by historical (supposedly evolutionary) changes in (monotheistic) religions, as his previous books attempted to show progress in biological evolution towards greater complexity (and hence mankind). In short this is a classic religious attempt to ascribe purpose and direction to the Universe.

Nevertheless Coyne's review itself is worth reading.

Sunday, July 26, 2009

Gemmel, Quist and Polar Shifts

Fans of British fantasy novels will no doubt remember David Gemmell as being one of the biggest names in fantasy writing between the mid-1980's and his untimely death from heart disease in 2006.

Gemmell's books were a breath of fresh air in the late 80's, washing away the stale Tolkien-imitation that seemed to dominate the field and replacing it with gritty tales of flawed heros, often hopeless odds, and major characters often dying. Sadly, the more books Gemmel wrote the more formulaic this style became.

One re-occurring theme Gemmell used to tie together the different series of his earlier books was of periodic catastrophes that shifted the Earth's rotation, drowning continents and emptying seas. At the time I read his books I assumed these ideas (absurd, but good fodder for fantasy) were Gemmell's own adaptation of Velikovsky's catastrophism, but most of the Polar Shift concepts used in Gemmell's work appear directly taken from Charles Hapgood's "Maps of the Ancient Sea Kings: Evidence of Advanced Civilization in the Ice Age."

The reason I now know this is John McKay's excellent post on Allan Quist's hilarious attempt to disprove global climate change by claiming that ancient maps show an ice-free Antarctica based on Hapgood's work.

Monday, July 6, 2009

numpy/scipy

The more I use numpy and scipy the more I like them. Matplotlib has some quirks, but all in all its easy to quickly write something powerful that just works.

Update (09 July 2009): That said, I am surprised at how simplistic the fitting routines (aka optimization, minimization, etc) are in scipy, and the lack of good generalized fitting packages in python. Its all very well if you want to use the routines provided in scipy.optimize and uncertainties in your data aren't a big issue but that's not at all the realm of data I experience daily.

It may be that scipy.optimize's routines can handle data uncertainties properly through some more complicated interface, but all the examples I've seen don't seem to suggest that as they all totally ignore data errors. Nor do they mention even simple fitting concepts like chi squared (I'd survive with chi squared, I don't need log likelihood all the time).

Update (10 July 2009): OK, you can handle data uncertainties using the scipy.optimize routines, you just make sure the function you want to minimize calculates chi squared or log likelihood, and you effectively have chi^2 fitting or Cash statistic fitting. I haven't yet worked out how to calculate the uncertainties on the fit parameters using scipy.optimize -- the most naive way is to use the covariance matrix (not robust, I know).

Space Telescope's stsci_python provides pytools.nmpfit (a numpy version of python mpfit, itself a version of IDL mpfit). This does Levenberg-Marquardt fitting and does provide estimates of the best-fit parameter uncertainties (using the covariance matrix). After giving it a spin I find it works just as well as scipy.optimize, although at the cost of having to install the entire stsci_python package. More interestingly (n)mpfit has a well developed interface for fixing (and unfixing) fit parameters as well as handling limits on the fit parameters. I ended up using this for the HST ACS data analysis routines I'm writing. Still, none of these approach the sophistication of xspec or sherpa. If it weren't for the huge size of these packages I'd try to link to these behemoths (well, sherpa anyway, as it has a python interface), but I'm trying to (a) use more generalized packages, (b) wean myself away from relying on the same software I've used for years and learn something new...

Sunday, July 5, 2009

This Cat is Awesome!

Pet Jungle Cat (NSFW).

[Original "Cat... is Awesome" from Zooillogix]

Monday, June 29, 2009

Fedora 11: Why force beta versions of Firefox and Thunderbird on users?

Another thing I really dislike about Fedora 11 is the decision to replace the stable versions of Firefox 3 and Thunderbird 2 present in Fedora 10 with beta versions of Firefox 3.5 and Thunderbird 3 in Fedora 11. I'm certainly not the only one who doesn't like it.

This statement (in bold) features prominently in the Thunderbird 3 Beta 2 release notes:
Please do not use Thunderbird 3 Beta 2 in a production environment.
Yet the FESCo went ahead and approved putting the beta in the full release (this is not Rawhide we're talking about).

I haven't had any trouble (yet) with Thunderbird 3b2, but I'm already frustrated after only two days experience with Firefox 3.5 beta 4: page loading will occasionally randomly hang for no obvious reason, in a few cases so badly that I've even been forced to kill -9 the browser. And its only been two days!

Of course, criticism of the decision to put betas in the official distribution generates snarky comments from some people (the full thread is worth reading):
2009/5/11 Stephen Gallagher :
> OK, first off, why in $DEITY's name are we including Firefox 3.5b4 and
> Thunderbird 3.0b2 in Fedora 11?

These were planned features waaaaay back.

http://fedoraproject.org/wiki/Features/Thunderbird_3
http://fedoraproject.org/wiki/Features/Firefox_3.1

I don't recall you raising your objection at the time. Both have had
considerable review by FESCO and others so please don't complain about
this so late in the day.

--
Christopher Brown
There are some people think that being cutting edge is synonymous with including beta beta versions of software in official OS releases (e.g. see the /bin/bash blog's overly glowing preview of Fedora 11 written before its official release), but I am not one of them.

Betas are fine in rawhide versions, but only if there is a real possibility of the full non-beta version being available in time for the full Fedora release, and the ability to revert to a older stable version if the beta is still beta - yet these are the contingency plans presented to and accepted by the Fedora FESCo:

Thunderbird 3:
Contingency Plan
There is no turning back.

Firefox 3.5:
Contingency Plan
There is no turning back.

Ah well, I'm sure its just as bad over in Ubuntu or Gentoo land...

Friday, June 26, 2009

Fedora 10 -> Fedora 11 upgrade problems

After the last debacle [1, 2] associated with trying a yum upgrade from Fedora 9 to Fedora 10 on my x86_64 Opteron workstation I was sure that this time would be different. I dutifully downloaded and burned a x86_64 installation disk for my Opteron and a i686 for my old home PC.

Neither upgrade worked properly.

I had not run yum update on my home Fedora 10 machine since Fedora 11 was released on June 9 2009. I attempted the DVD upgrade on June 19, left it happily (if slowly) updating the ~1200 packages it wanted to update, only the return to a fatal error message regarding an unhandled exception. On reboot a single Fedora 11 kernel was available which started booting but failed when trying to go to runlevel 5. Reading the Common F11 bugs page indicated that my nvidia AGP card might be the problem, so modifying the kernel boot options as suggested allowed me to boot successfully. A large "yum update" (1.2 GB) was then necessary, but I finally had a working system.

For the Opteron I made sure my Fedora 10 installation was fully updated on the morning of 23rd June, and just before leaving working in the evening I stuck the DVD in the drive, hit the upgrade option when it appeared and left it running overnight. When I returned the upgrade claimed to have completed itself successfully and told me to reboot.

On rebooting grub went straight to a empty command line, without the usual boot menu. Clearly the grub-install that is run every time you update the kernel had not run successfully. As I know /boot is the first partition on my first hard drive I can still find the kernel and boot by doing the following on the grub command line:

root (hd0,0)
kernel /vmlin[hit tab] [select appropriate file] [return]
initrd /initrd[hit tab] [select appropriate file] [return]
boot

I did not use the standard Fedora kernel options "rhgb quiet" as I wanted to watch the services start up to see if there were any problems. Indeed, once the kernel started booting I saw that a variety of services where failing to start, complaining of shared library problems. A classic sign of a incomplete upgrade. Great!

In fact the boot process stalled completely, so I resorted to using the Fedora 11 disk in rescue mode. chrooting into the system once it had booted.

I checked that /boot/grub/grub.conf looked sensible, ran "grub-install /dev/sda" fix the grub problem, and then attempted "yum list updates", only to find that yum wouldn't run as python complained that it could not find the yum module.

"rpm -qa | grep yum" revealed that yum was still a Fedora 10 version, version 3.23. Mounting the Fedora 11 disk (mount -t iso9660 /dev/scd0 /media) revealed that the yum version on the Fedora 11 install disk is 3.22, so clearly the upgrade had failed to update yum because the recently updated Fedora 10 version had a higher version number than the Fedora 11 disk created only a few weeks before! In fact a large number of packages had not been updated to Fedora 11. Luckily rpm had been updated (if rpm was not working I'd have been forced to do a full system restore). Running

rpm -Uvh /media/Packages/yum* --oldpackage

successfully updated yum to the Fedora 11 version, at which point I could run "yum update" and start the process of getting a truly upgrading system underway.

With hindsight my mistake was updating my Fedora 10 system after Fedora 11 had been released. When doing yum upgrades it is a good idea to have your system as closely matching the new version of Fedora as possible, but this appears not to be the case for a DVD-based upgrade.

I'm still surprised that the DVD-based Fedora upgrade doesn't think to correct for version mismatches - you'd think it'd be logical for any f11 package to automatically obsolete a f10 package, even if the version numbers of the f10 package are higher. Or the upgrade could simple run rpm with the "--oldpackage" command line option.

Overall I have little satisfaction with the upgrading process under recent versions of Fedora. Web-based yum upgrades used to work very well, at least between versions ~6 and 8, but with Fedora 9 -> 10 and now with Fedora 10 -> 11 neither web-based or disk based upgrades has worked without significant problems.

Admittedly I've also experienced occasional severe problems with upgrades between different versions of Ubuntu when I was experimenting with it, so this is not a problem unique to Fedora.

The alternative - moving to a long-lifespan distribution such as RHEL or a free clone of it like Scientific Linux - simply replaces upgrade problems with equally severe out-of-date software problems (a friend who relies of the department's sysadmins to maintain his Scientific Linux distribution has had terrible problems with being stuck with old buggy versions of important software that require major version changes to fix, which the standard updates in RHEL/SL don't often do).

The only pro-active solution I can see is to become more involved with testing process on Fedora, and to have a dedicated test machine that I can easily revert to its original state when upgrade tests fail badly.

Missing printers with Firefox 3 and linux.

The Problem: All printing options except "Print to File" have disappeared from the print dialog box in Firefox 3 under Linux. Yet inspection of the print configuration options in about:config reveals no obvious changes and furthermore values related to the expected printers are present.

Crude Fix: Add the following line in /etc/gtk-2.0/gtkrc

gtk-print-backends = "lpr,file"

This will give access to very minimals command line interface to lpr, which means you must know the printer names and options you wish to invoke. Another fine example of of newer Linux software sacrificing core functionality for superficial improvements in other areas.

[From my "Random Unix and Linux tips and tricks" page]

Friday, June 19, 2009

Friday, June 12, 2009

Who knew that echidnas were so interesting?


The NYT has a nice article by Natalie Angier on the long-beaked echidna, Zaglossus bartoni.

You may be forgiven for considering one of the three remaining groups of egg-laying mammals as "primitive", yet they're anything but.
  • They lay eggs but feed the babies ("puggles") with an iron-enriched pinkish milk that emerges from chest glands rather than teats.
  • They have multiple sex chromosomes, not just the X and Y chromosomes found in placental mammals.
  • They have a bird/reptile-like cloaca through which excretion, sex and egg-laying is performed...
  • ...and male echidnas extrude their four-headed penis through this cloacal opening.
  • They have long lifespans of up to 45 years in the wild.



Sadly these fascinating and poorly-understood animals are endangered.

More long-beaked echidna information can be found at animalinfo.org. (I'm note sure why the Latin name of the species seems to be different on the Animal Info website.)

Thursday, June 4, 2009

Leon Kass

If the name Leon Kass means anything to you, and you can master your repugnance, then read these articles:

Tough Love for the Humanities, by Serena Golden, 2009, Inside Higher Ed (News).

Kass Backwards, by Scott McLemee, 2009, Inside Higher Ed (Views).

Which amusing prompts various right-leaning crotchety academics to come out complaining how nasty, left-wing, and authoritarian academia is, and also to demonstrate how little they understand when they claim people have not understood Kass's "Wisdom Of Repugnance".

Reason as Our Guide, Elizabeth Blackburn & Janet Rowley, 2004, PLoS Biology 2(4): e116. doi:10.1371/journal.pbio.0020116.

Clarifying The President's Council's Clarification of the Obama Stem Cell Policy, Insoo Hyun, Bioethics Forum (thehastingscenter.org), 2009.

Wednesday, June 3, 2009

Calling C++ from Fortran 90

Calling Fortran 90 from C++: not too terribly difficult although character strings are a pain.

Calling C++ from Fortran 90: Rather more complicated if you're not going to use pre-written interface-generating software. Best summary of the information you'll need I've found so far is this conference proceeding by Wang et al (2005), see also their ppt presentation.

Yang Wang, Raghurama Reddy, Roberto Gomez, Junwoo Lim, Sergiu Sanielevici, Jaideep Ray, James Sutherland5and Jackie Chen, 2005, "A General Approach to Creating Fortran Interface for C++ Application Libraries", in Current Trends in High Performance Computing and Its Applications, (Springer Berlin Heidelberg), 145-154, DOI 10.1007/3-540-27912-1_14

Wednesday, May 6, 2009

Tortured analogy

Embattled Conservatives Look To Star Wars For Guidance [io9.com].

Thursday, April 30, 2009

Items of note

I've been busy starting up a new research project that I intend to present results from at the end of May, so I haven't had time to blog much, but here are a variety of small things that attracted my attention.

I was pleasantly surprised to find that the awesome doxygen source code documentation tool is now even more awesome: starting from version 1.5.5 it can now be used with Fortran! WRITE(6,'(A)') 'Praise the Parser!'

Speaking of programming: Intelligent Design Sort - it never gets old - praise the Sorter!

Pascal Boyer admits he has a problem: he is really interested in crackpots. Admittedly crackpots are a fascinating, if understudied, from a sociological point, but Boyer attempts to remedy this with his analysis of the group. He reproduces the well-known finding that a large fraction of crackpots have engineering backgrounds, but he does make some valid points (that appear obvious in hindsight, as all good analyses should), in particular: "the crackpot alternative is, almost universally, less mathematically challenging than the standard account" and "The crackpot theory is based on textbooks" with no exposure or understanding of actual research literature.

While we're on the subject of cranks, I must admit that I view most flavors of libertarianism with scorn, so I have a soft spot for those uncivil bloggers who ridicule it: Gavin M. over at Sadly, No! dissects Glenn Reynolds's libertarian conservatism and finds feudalism.

Still on the subject of cranks, PFAW dissect Orson Scott Card's absurdist bigotry using the scalpel of sarcasm.
http://www.rightwingwatch.org/content/does-national-organization-marriage-want-overthrow-government
I still do not understand why people think "Ender's Game" was great.

Finally dispensing with the crank theme, and moving onto more serious stuff (although with a Speculative Fiction flavor), I could not agree more with the following argument (hat tip io9):
"But the one—the most absolutely key, the rock star green technology—that I champion over all others is birth control: vasectomies, IUDs, the pill, condoms. I don't care which kind you or your family prefers or finds most appropriate, I love them all. Any technology that reduces the absolute number of consumers (and particularly Americans and Europeans who consume the most) now that's a TECHNOLOGY!" — Pump Six And Other Stories author Paolo Bacigalupi, interviewed at EcoGeek.org.
If you, like me, had not previously heard of this Stanley Fish guy the NYT has added to their Opinion section, this (rather old) Slate article "The Indefensible Stanley Fish" by Judith Shulevitz will provide you with some useful background information. (Note clever segue from Speculative Fiction to tedious postmodernist analysis of Fiction.)

Finally some science! Evidence of forethought in Chimpanzees: Ed Yong at Not Exactly Rocket Science nicely summarizes the story of Santino the Chimp's premeditated ammunition collection for later attacks on Zoo visitors.

Sunday, April 5, 2009

NPR

This article at Daily Kos sums up many of the reasons why I haven't bothered listening to NPR since 2004 - their excessive reliance on talking heads from (mainly right wing) Think Tanks, and their credulous acceptance of whatever the pundits say.

Tuesday, March 31, 2009

Game AI


The guys at Penny Arcade were referring to Wanted: Weapons of Fate when they created this comic, but it sadly applies to most game AIs.

My favourite example of this (and I don't mean that in a sarcastic way) are the mercenaries in Far Cry 2 who camp out by the gas (petrol) stations. One shot at a pump, and Oh the humanity!

Fedora upgrade problems solved?

Just to follow up from last week's post on my problems upgrading my x86_64 workstation to Fedora 10, I think I now have everything fully functional once again.

The booting/grub problems were definitely related to grub's attempted probing for a floppy drive (/var/log/messages will show kernel I/O errors associated with fd0), even though I've never had a floppy drive in the system and it had never caused a problem before. It appears this is not an uncommon problem, see e.g. here and here, but its not obvious why I'd only experience this now with Fedora 9 an 10.

The command line workaround (install grub to the MBR using the grub shell with "grub --no-floppy," setup (hd0,0), etc, instead of using grub-install) is not ideal as it appears that any kernel update (e.g. when updating the system after a DVD upgrade) will run grub-install itself and fall foul of the problem.

In the end I had to switch off floppy support completely in the BIOS (even though no floppy drive or any associated cabels were present in my system) to solve this problem.

Upgrading from Fedora 8 -> Fedora 9, and then Fedora 9 -> Fedora 10 using the x86_64 DVD install/upgrade disks ultimately worked, in a fashion, but displayed some annoying features that reminded me why I switched to the yum upgrade method before.

The problem is that after "upgrading" and rebooting I found many packages (indeed, the majority) had not been updated to Fedora 9. I presume the reason is that a fully up-to-date Federa 8 system has packages that are more recent, with higher version numbers, than the original Fedora 9 DVD distribution, and that the DVD upgrade process then does not replace the fc8 packages with the fc9 packages.

I had to run "yum update" at least twice (why twice? I don't know why it didn't pick up all the packages that needed updating the first time) before the older Fedora 8 packages were replaced with normal fc9 packages. Even with a fast internet connection updating > 1000 packages takes a full day or so. I then had the same problem with Fedora 9 -> Fedora 10, where the situation was so bad that after the basic DVD upgrade firefox and konqueror simply didn't work at all. Then yet another day waiting for "yum update" to complete.

I did discover some useful yum tips here, in particular how to force yum-fastestmirror to retest the mirror speeds without doing "yum clean all." (Important if you've just spent several hours downloading hundreds of packages, but they haven't yet been installed before the transaction check found a problem, and you need to download more but the once-fast mirror you were downloading from is now incredibly slow.)

The update process was exacerbated by some odd changes the DVD upgrade made to my networking setup that basically messed up /etc/resolv.conf and my DNS configuration. It took me a while to work out that the "Error: Cannot find a valid baseurl for repo: fedora" was basically a DNS/dhclient problem. I don't remember DVD upgrades messing with network settings before, so I'm not sure how or why this happened.

To add insult to injury my rsync backup scripts then no longer worked because the newly installed Gvfs (specificaly ~/.gvfs) breaks rsync. The work-around is to add .gvfs to the rsync excludefile, but what a pain!

All in all a very tiring upgrade process, and all the more annoying because the exact same upgrades for i386/i686 work fine on my other machines. I presume part of the problem, in particular with the DVD upgrade, was leaving the upgrade so late after Fedora 9 and Fedora 10 had come out, so I may upgrade the x86_64 workstation to Fedora 11 relatively soon after it comes out. But on the other hand I don't like to upgrade to a new Fedora version before some of the kinks in the new version are worked out...

Friday, March 27, 2009

Fedora upgrade problems

I've been having a lot of trouble with my main workstation this week, brought on by an attempted yum upgrade from Fedora 8 x86_64 to Fedora 10 x86_64, but probably complicated by hardware problems associated with the floppy drive (or lack of it, to be more precise) that then messed up (and continue to mess up) the grub bootloader.

I had to do a full system restore yesterday from my incremental rsync backups (which worked wonderfully), but I'm still struggling with the system and was forced to do a rpm database rebuild this morning. The DVD-based Fedora 9 upgrade I set running last night, although supposedly successful, in truth failed thanks to grub-install's (which seems to be run whenever you install a new kernel) insistence on probing for a floppy drive even when there isn't one present and even when the device.map correctly excludes fd0 (note that recent versions of grub-install do not have or honor a --no-floppy command line option, despite what people on the Internet seem to think). Attempts to run grub-install from the command line simply hang, and /var/log/messages starts showing kernel I/O errors associated with fd0 (which I'm pretty sure I dont have!).

The messed up Fedora 9 install also seem to have messed up rpm, as on booting I found that even simple rpm queries would hang and /var/lib/rpm/ had the classic __db* files.

Still, looking on the bright side it has been a good test of my linux sysadmin knowledge.

My rsync backup method (based on Mike Rubel's incremental rsync backup with hard links method described here, see also Kevin Korb's page on rsync backups) works well and restore's easily. Note that the method's Rubel and Korb describe don't quite work on my system as rsync can't handle the number of files of my system in one go - I basically run the method by script separately on each of /boot /bin /etc /home /var etc etc).

I still remember how to use the grub command line to find files and boot, even if grub.conf is totally messed up, and I've learnt (the hard way) that grub-install can't quite be trusted and that its better to use the grub shell to install grub to the MBR (Remember to use "grub --no-floppy" to prevent probing for a floppy, even if you dont have on).

The annoying rpm stale locks and corrupted rpm database thing can be fixed ... "rpm -vv -rebuilddb" worked, thankfully.

I'm still surprised that the basic yum upgrade failed, as I've done yum upgrades from Fedora 8 directly to Fedora 10 successfully before, although only with i686 systems and not an x86_64 system. Based on the error messages I experienced it seems that /usr/lib64/libc.so.6 is the problem child in the jump from Fedora 8 to Fedora 10. I really should have done Fedora 8 -> Fedora 9 -> Fedora 10, or burnt myself an upgrade DVD and done a DVD-based upgrade.

That the DVD upgrade from my recovered Fedora 8 system to Fedora 9 also failed (because of the grub/fd0 problem) does suggest that a classic DVD upgrade, and not doing a yum upgrade would not have prevented me from experiencing problems (although it might have saved me a full days work). However I do find it hard to believe two separate problems, one software and one hardware related, would appear simultaneously.

I'm still waiting for the Fedora 9 yum update to finish before I shutdown and go poking inside the machine to see if I can find out what is causing my floppy drive problems. Without solving that issue there is no point attempting to upgrade to Fedora 10...

Anyway, time will tell whether I can get the system safely upgraded to Fedora 10.

Thursday, March 26, 2009

Dyson


The NYT magazine covers Freeman Dyson in a multi-page article by Nicholas Dawidoff: "The Civil Heretic." Sadly the elderly Dyson is now more famous for his current climate change contrarianism than his more interesting earlier work, or even the fun but speculative stuff like Dyson Spheres or Project Orion.

This prompted Andrew Revkin to produce a somewhat more nuanced discussion of Dyson on his Dot Earth blog: "Some Inconvenient Thinkers", although it annoyingly stops short of actually discussing why Dyson is wrong, and instead pretty falls into modern journalism's classic statement of false objectivity: "He might be right, he might be wrong. What do you think?"

Climate Progress (who really seem to dislike Revkin despite the fact he's generally does a decent job of covering science and climate change - he's certainly infinitely better than Tierney) then produced a rather uncivil blog article pointing out how Dyson has been far from civil when discussing actual qualified climate scientists. Although uncivil, it at least has some discussion of why Dyson's beliefs are simply absurd, and links to Only In It For The Gold's calmer explanation of Dyson's mistakes.

Ultimately I think Dyson's contrarianism is not as harmful as many of the other climate change contrarians, largely because Dyson's rejection of climate change are not driven by political or economic biases, but rather a mistaken belief in his scientific ability. Its somewhat sad to see once great scientists go off the deep end when they get old. Some, like Fred Hoyle, go off the deep end even before they get old.

Non-Tweetle Beetle Battle


Nicholas Wade at the NYT has a nice article about the often extravagant results of sexual selection, which as accompanied by a beautiful slide show of beetle horns. Worth a look!

Why am I reading the NYT science section during work hours? Because I have to do something educational while I wait for my full system restore on my workstation to complete (recovering from a tragically failed upgrade to Fedora 10 x86_64 from Fedora 8).

Thursday, March 19, 2009

Cephalopods, Old and New

PZ Myers at Pharyngula discusses some spectacularly preserved 95 million year old fossil octupuses from Lebanon. Although superficially similar to modern octopuses in external appearance (8 tentacles and all that stuff) the structure of the their gladius (the remnant of the molluscan shell) is intermediate between older cephalopods and modern octopuses.


Ed Yong at Not Exactly Rocket Science discusses what the stomach contents of Sperm Whales can tell us about large deep-sea squid (including Giant Squid) and octupuses. 13C to 12C isotope ratios in the undigested squid/octopus beaks tell you about the depth at which the animals live, while 15N to 14N ratios tell you its position on the food chain.

[Image of scientists examining whale stomach contents from a whale that stranded itself come from Karen Evans's web page.]

Tuesday, March 17, 2009

Why subsidizing Solar power makes sense

George Musser defends himself against claims that he is a "freeloader" for installing state-subsidized Solar panels on his home over at SciAm.

I wonder if the reader who accused him of being a freeloader also calls farmers, or the coal and oil industry, freeloaders as they are also very heavily subsidized by the taxpayer?

Tuesday, March 10, 2009

Sustainability


SciAm has a short but interesting article by Michael Lemonick on the "Top 10 Myths about Sustainability":
  • Myth 1: Nobody knows what sustainability really means.
  • Myth 2: Sustainability is all about the environment.
  • Myth 3: “Sustainable” is a synonym for “green.”
  • Myth 4: It’s all about recycling.
  • Myth 5: Sustainability is too expensive.
  • Myth 6: Sustainability means lowering our standard of living.
  • Myth 7: Consumer choices and grassroots activism, not government intervention, offer the fastest, most efficient routes to sustainability.
  • Myth 8: New technology is always the answer.
  • Myth 9: Sustainability is ultimately a population problem.
  • Myth 10: Once you understand the concept, living sustainably is a breeze to figure out.
[Trash image from: http://farm1.static.flickr.com/129/319298351_724779cb39_b.jpg]

Saturday, March 7, 2009

Please go Galt.

Hilzoy at Obsidian Wings urges conservatives to do what they've started threatening to do: go Galt. I wish they would.

Hilzoy expresses (mock) puzzlement that none of them seem to have acted on the beliefs they're so eager insist are correct, rational and "objective". Its pretty obvious why they only threaten to go Galt, but never do so.

If they all did go Galt society would continue as well if not better than before, so the glorious social experiment would only serve to demolish the sophomoric fantasy they use to justify their greed and lack of compassion.

Friday, March 6, 2009

OSX Leopard: What is the /home directory for?

What is the /home directory in OSX 10.5 for? It appears to be:
  1. Empty.
  2. Created or last modified when the machine last booted up, with user.group of root.wheel (this differs from /Users which is root.admin).
  3. Impossible to copy to, even as root. You just get "Input/output error".

I was trying to change the default user home directory location on my Macbook from /Users/<username> to /home/<username>, so as match Linux and simply rsyncing between my linux boxes and the macbook, using one of the following methods described on macosxhints (1 , 2 ). (They were not trying to use /home but move the home directories to a separate volume.)

I can't find any mention of "/home" and OSX anywhere on the web, and leaving off the / just gives articles talking about /Users/. BSD seems to use /home (just like a sensible *nix), so I doubt its a BSD versus Linux thing.

Macports?

I see scipy is available under Macports. Doubt is setting in. Maybe I shouldn't have gone with fink.

Tuesday, February 24, 2009

I wish I had a transparent skull...


...just like the barreleyes fish (Macropinna microstoma).

Not sure what I'd do with such an arrangement, but it'd still be pretty cool.

Full reference: Robison BH, Reisenbichler KR (2008) Macropinna microstoma and the Paradox of Its Tubular Eyes. Copeia 2008(4):780-784.

Friday, February 20, 2009

Unprecedented investment opportunity!

I met with my financial advisor yesterday for the first time in about three months. He looked tired, as he'd probably been dealing every client asking him the same question I did: "Tell me why I shouldn't take all my investments out and hide it in my mattress before it loses another 35% of its value..."

He did a reasonable job of explaining that the current value of the shares is not what is important if you're planning on using the money for retirement in 25 years, that buying cheap and continuing to buy cheap should in the long run pay off as those shares regain their value at some point in the future. That getting out now and then trying to get back in when things appear to get better would also directly translate into a significant loss, worse than staying in and not messing with them.

All well and good. "Think of it as an unprecendented investment opportunity." he said. "When are you ever going to be able to buy shares this cheaply?" I certainly appreciated the valiant attempt at optimism, even if I didn't quite feel it myself.

"The market is going to come back, eventually... The only way it won't increase beyond its former levels is if you think the World's already achieved maximum productivity and maximum growth." A decent enough point, although I immediately thought "Oh oh. Peak Oil. Global Climate Change."

So how long is it going to take? The wall of his conference room had a log-linear graph of the return on $1 invested in 1920 in various different ways, stock market, federal bonds, bank savings account (maybe). The Great Depression was visible as an order of magnitude drop in value that took about a decade to recover to its former value (and that only really associated with the economic growth associated with the US's waging of WWII). Paul Krugman had an editorial yesterday (2/19/09) that again argues that demand will ultimately drive recovery, but not before 2011 and maybe in 5 to 10 years.

Rational reasons to believe it will ultimately get better eventually are perhaps all we ask for now.

pdffonts, updmap, epstopdf and ps2pdf

The occasion of the U.S. National Academy of Sciences "Astro2010" Decadal Survey of Astronomy and Astrophysics has forced me to (re)confront the issue of font embedding in PDF documents produced with LaTeX.

The last time I did this was about five years ago for various NASA ROSES proposals (ATP, the now defunct LTSA, etc) and it was something of a messy process. Which font package to use, what dvips command line options to use to make the postscript file, and then what ps2pdf command line options to use, etc etc.

Nowadays its much easier to produce high quality PDFs from latex source, thanks to pdflatex, and I'd assumed all fonts ended up being embedded properly automatically now. But in writing my Astro2010 White Paper I ended up discovering the very useful pdffonts tool, which in turn informed me that all my fonts where not being embedded. In the process of solving that I got to learn about updmap (not actually the source of the problem, as its correctly set up in Fedora 8 and 10) before realizing the problem was with my figures.

I still produce and include EPS figures, relying on the latex epstopdf package to automatically convert the figures to PDF for pdflatex. Turns out epstopdf (the command line tool used by the epstopdf latex package) does not correctly embed the fonts when coverting the EPS files, so thats where the problem was. The command line ps2pdf tool does embed the fonts, but only when you use the -dPDFX command line option (-dEmbedAllFonts does not work!).

Anyway, all this is now documented on my Unix tips and tricks site.

Tuesday, February 3, 2009

Things fall apart (latex2html, tth, webalizer)

Things fall apart; the centre cannot hold;
Mere anarchy is loosed upon the world,
Yeats -- The Second Coming

Much too busy to spend much time posting except on this (now cold) coffee break, but this line from Yeats summarizes my current feelings about software.

I have recently had sudden need to covert a LaTeX document to HTML, only to discover that the old standard latex2html hasn't been maintained or updated for many years. It used to work well... but my current pdflatex-friendly documents cause latex2html to fail spectacularly. It seems to reserve special hate for \newcommand (which I now use a lot in place of the older \def). Even removing all the \newcommands results in half of the equations being totally mangled.

A desperate search for a equation-friendly replacement did yield a fully acceptable solution either. The best of the bunch seems to be TtH, but even that doesn't handle my document's fairely pedestrian equations properly, nor does it handle images properly given that I'm using the epstopdf package. Argh!

After hours of pulling my hair out over the weekend I decided to forget about HTML completely and just post a link to a PDF. In the process of doing that I discovered that my Apache was not playing nice with webalizer anymore (I want to easily see who accesses the document, you see), despite the configs supposedly allowing me to view the webalizer output. It used to work... Sigh. No time to hunt down and fix the problem either.

Wednesday, January 28, 2009

XFCE4 impresses, Amarok 2 fails.

Still in the process of switching to XFCE4 as the window manager of every Linux machine I own (six machines, counting both work and personal machines), but I'm getting the process of customizing it quickly to my liking down to an art. The more I use it the more I like it, or the more I can make it look and act like KDE 3.5 (only seemingly more responsive).

I also worked out how to get ssh-add to start when the XFCE desktop comes up, slightly different from autostarting processes on KDE.

I only just realized Amarok has changed as well, as we now have Amarok 2 on Fedora 10. As with other KDE4 rewrites of well established KDE tools this is sadly another great step backwards in terms of functionality, despite the standard claims of "significant improvements". Not only has the iTunes-like playlist interface totally disappeared but the customization options are severly restricted compared to the old KDE 3.5 Amarok (just go to Settings -> Configure Amarok and take a look at the barren emptiness). You can right-click to add KDE4's totally awesome Plasmoids, but none of the ones available on Fedora 10's version of Amarok 2 add back the basic playlist/tracklist functionality we've lost.

I do not appear to be the only naysayer either. Add to that the fact that it can't resume playback if you pause playing, and you can appreciate why I'm less than impressed. I may have to switch music players completely.

I hate acting like the Grinch, continually criticizing KDE4 and its developer's ernest belief that their hard effort was producing an improved product. Yet too much of KDE4 has basic functionality missing (despite the fact that they clearly had the time to add new and unnecessary eye-candy) for me to continue with it.

I may have said this before, but I'll say it again. I can understand the motivation for a complete rewrite of some code when the existing code becomes too difficult to extend or add to. There are strong pragmatic reasons to embark upon such a project. But with KDE4, as with Gnome 2 years ago, you end up getting the impression that the developers were more interesting in add fancy new things (Plasmoids) than in recapturing the basic functionality of the older versions. If your new application can't recapture the core of the old application then it'd be better to call it something completely different, rather than adverstise it as "a new and improved" version of the old application.

Its a year since KDE 4 came out, and while KDE 4.1 fixed some of the most annoyingly trivial oversights (like a clock panel application that couldn't shown seconds), many other things I consider to be important (more important than eye candy) still haven't been fixed. I presume they've been redefined as features or expected behavior now.

I get the (possibly mistaken) impression that many of its developers lack a certain attention to detail, or a view of the big picture. Did they sit down before starting to write new code and consider what is essential functionality, what parts of our existing application work best, which part are used most, for example? The KDE4 page on wikipedia makes everything sound semi professional (although with a worrying emphasis on style, icons, multimedia API, desktop effects etc), but something must have gone wrong to end up with a product that radicalizes long term KDE fans (e.g. see here, here or even here).

Of course, KDE4 does have fans too (I suspect they don't use it the same way I do). Ryan Paul at Ars Technica defends KDE4 here. I am not at all convinced by his arguments, and tend to agree with Steven Vaughan-Nichols criticisms:

My real problems with KDE 4.1 is far more fundamental. The developers believe that they have a better way of handling the desktop. For them, I’m sure they do. For users, this user anyway, the new desktop fails at a desktop’s main job: enabling the user to get their work done as easily as possible.

[...]
I could go on, but I’m not going to bother. KDE 4.1 is full of visual improvements that dont’ improve anything. You can see KDE 4’s Plasma interface for yourself. Maybe it will work for you. It certainly doesn’t work for me.

KDE 4 developers, lead by Aaron Seigo, wanted to make a radical change to the desktop. They have. However, in so doing, I don’t think that they have made that classic engineering mistake of making something that’s great for them, but not for users.

Seigo assures me that he can explain what KDE developers are doing to me. I’m sure he sincerely believes that. Unfortunately, in so doing, he’s making my point for me. Desktops shouldn’t need explanations They should just let you do your work. KDE 4.1 gets in the way of my doing work.

Is it because I’m an old foggie? Maybe.
I'm not the only one who has no love for KDE 4. As Linus 'Mr. Linux' Torvalds recently said, "I used to be a KDE user. I thought KDE 4.0 was such a disaster I switched to GNOME. I hate the fact that my right button doesn't do what I want it to do. But the whole 'break everything' model is painful for users and they can choose to use something else."
This last paragraph is from another Vaughan-Nichols article, this time on KDE4.2.

Anyway, enough on KDE. Until the XFCE4 folks do something similar (I'm sure it'll happen eventually) KDE is dead to me. Long live XFCE!

Tomshardware has a Macbook / OSX review from a long time Windows user. All pretty standard stuff given that worldview, but it does inspire me to formalize my impressions of Apples OS from the perspective of a long term *nix power user. Just need to find the time.

Sunday, January 25, 2009

i810 problems on Fedora 10

I just got back from a relaxing holiday on Grand Cayman, only to waste time fiddling around with the Intel i810 driver problems on Fedora 10.

A rough and ready work-around is to remove your xorg.conf completely and let Xorg automatically detect the settings to use... X has certainly come a long way in the last 10 years, especially since the Xorg/XFree86 split. The only problem with this is that it ends up using the "intel" driver instead of the "i810" driver, and i810 used to be both faster and allow the cloned screen operation I used to use for giving presentations...

Thursday, January 15, 2009

Far Cry 2 mini-review


Far Cry 2 is the best FPS game of 2008, IMHO. Enjoying it a lot. It is a slightly slow and very repetitive sand-box of a game (running in guns blazing is not a good idea in Far Cry 2), and requires patience, so the ADHD crowd won't be able to understand it.

Technically its amazing. It has the best simulation of fire I've seen in any game, and the destructable aspects of the environment are also handled incredibly well (I've spent a fair bit of time shooting individual fronds off palm-like trees, and even more time watching fire spread through the grass, bush and trees).

Graphically quite impressive, although I suspect the graphics on the Xbox 360 are inferior to those on a high-end PC. The wide range of environments: lush jungle, savanna/veld, and semi-desert, are all rendered beautifully. The mixed grass/bush veld-like environments really captured my memories of South African veld incredibly well, even down to the shape and placement of rocks and streams. The South African and British accents and phrases of a lot of the mercs were also a nice touch. Eh my china?


The game's story does a good job of showing the moral vacuity of warring groups, the mercenaries and arms dealers that serve them, and the mixed complicity and indifference of the wider world. Ostensibly you are a mercenary yourself tasked (by whom?) to kill the mysterious Jackal, an arms dealer involved in providing the weapons for any number of conflicts around the world. Obvious evil bad guy eh? But the game manages to rise above such a simplistic one dimensional caricature.


Thats not to say its without flaws. The worst is that is easy to sick of all the damn roadblocks staffed by endlessly respawning mercenaries, especially when quests seem to deliberately send you the exact opposite side of the country as you're in when you get the job to bump some one off.

Far Cry 2 has little to do with the original semi-scifi Far Cry, apart from also being a sand-box like FPS set in a tropical environment that avoid traditional linear FPS game play. Its not even made by Crytek, but instead by Ubisoft Montreal (who did also-excellent Assassin's Creed, I believe). I really liked the original Far Cry, but have to say I think Far Cry 2 is a better game.

[Update 01/28/09. I've just finished Far Cry 2. Can't say I'm particularly pleased with the way it ended, as the various characters actions seemed unrealistic given their prior actions and stated motivations. But weak endings are hardly unusual for games. Still, overall a great game from my perspective, and I'm looking forward to replaying it in the future.]

Consider the Snowclone

Language Log discusses snowclones, which I hadn't previously realized "Consider the X" were examples of, but with hindsight it makes perfect sense.

Here is wikipedia's definition of snowclone.
A snowclone is a type of cliché and phrasal template originally defined as "a multi-use, customizable, instantly recognizable, time-worn, quoted or misquoted phrase or sentence that can be used in an entirely open array of different jokey variants by lazy journalists and writers."
I must admit that the first time I heard the term snowclone was in reference to lolcats.

Wednesday, January 7, 2009

Least favorite weather condition: freezing rain

My least favorite form of weather: freezing rain. Least favorite thing to do during or after episodes of freezing rain: the rush hour commute to or from work.