I’m sure these things are obvious to seasoned Solaris developers, but here are a few things I’ve learned today:

  • gcc 3.4.3 does not support threads on Solaris. The “-pthread” option doesn’t exist for Solaris except in later versions, so upgrade your compiler or use the Sun compiler (where you’ll use “-mt” to request threaded code).
  • scons on Solaris assumes you are using a Sun compiler and applies flags as such, even when you’re using gcc. Yes, even if it detects and uses gcc. See the note about “-KPIC” in the scons changelog.
  • boost doesn’t really compile on Solaris with Sun C++ 5.8, but you can hack stuff to make it sorta work.
    This relates to boost 1.40.0. There are two main issues:
    • int64_t and friends don’t get defined. You’ll have to patch cstdint.hpp. Here’s my hacked replacement.
    • The Sun compiler doesn’t do return object optimization, which means that code like:

      class Foo {
      private:
      Foo(Foo& f);
      public:
      explicit Foo(int i);
      };

      Foo bar(int x) {
      return Foo(x);
      }

      doesn’t work. The call to Foo(x) works fine, but the compiler thinks you need to copy the resulting Foo object in the act of returning it to the caller, which is commonly optimized out these days. Here’s a replacement for the affected boost/thread/detail/thread.hpp. Of course boost 1.41 doesn’t have the same problem since the return type for the affected function is different.

For reference, a couple of illustrative error messages:

  • int64_t problem:

    "/home/daniel/boost_1_40_0/boostdir/include/boost/date_time/time_duration.hpp", line 264: Error: int64_t is not a member of boost.
    "/home/daniel/boost_1_40_0/boostdir/include/boost/date_time/time_resolution_traits.hpp", line 48: Error: int64_t is not a member of boost.
  • Return value optimization problem:

    "/home/daniel/boost_1_40_0/boostdir/include/boost/thread/detail/thread.hpp", line 344: Error: boost::thread::thread(boost::thread&) is not accessible from boost::move(boost::detail::thread_move_t).

I’m sure that most of my audience will find this incomprehensible, but I have high hopes that Google will index this properly and find it for a poor head-scratching soul with similar frustrations.

Have a nice day!

There’s a market for everything, isn’t there? Especially for Dedicated Link Cables. I never knew I needed one. But of course! When I crimp those RJ45s onto CAT5, I am just making an ethernet cable, but the Denon AKDL1 Dedicated Link Cable is capable of time-travel. It even extends the digital signal beyond 1’s and 0’s to *2*! Of course, this only works if you connect it in the right direction, otherwise you will add -1 instead, and we all know negative is bad.

Maybe I’ll save up for the used one on sale for $2,499.98. I don’t have the proper equipment to perform “burn-in,” so it might be worth paying the extra $1,999.98.

Check out the reviews. Who knew that reviews could be so much fun to read. ;-D One reviewer talks about how the cable solved global warming, but I don’t think that’s possible unless he had it professionally installed in triplets.

I was very, very annoyed that the 0.10 release of nautilus-open-terminal changed the accelerator from “t” to “e”, meaning that I could no longer right-click on my gnome desktop and press “t”.

Rather than unlearn years of muscle memory and learn to press “e” instead, I built my own version that reverts the change.

Here’s the fixed SRPM and RPM for Fedora 11 i586:
source: nautilus-open-terminal-0.13-2ac.fc11.src.rpm
binary: nautilus-open-terminal-0.13-2ac.fc11.i586.rpm

I know, the accelerator got changed to fix some bug that was filed against Ubuntu, but I don’t use “New Tab” (nor can I find it anywhere in nautilus). So I achieved victory by getting the source, changing a few lines, and rebuilding, since this is open source. Hooray!

Have a nice day.

(footnote: The problematic change was noted as: ‘Change “Open in Terminal” accelerator to “e”, for not conflicting with “New Tab”‘)

Update:
Versions for Fedora 12 (beta right now):
RPM: nautilus-open-terminal-0.17-4ac.fc12.i686.rpm
SRPM: nautilus-open-terminal-0.17-4ac.fc12.src.rpm

I didn’t know sexagesimal was a word until today.  Indeed, I think that most spell checkers will flag it as a misspelling.  Yet it is real.  And you can probably guess what it means: base-60 numeric.

It didn’t occur to me that anyone would formalize it as a number system, but apparently it did to the Babylonians and Sumerians.

Apparently it’s common in astronomy.

I think I just saw a shooting star!  I went outside to check out the Perseid meteor shower, which was supposed to peak last night, and saw a very bright point trace itself across the sky.  It left a trail about 15-20 degrees long in my field of view, which stayed lit for about a quarter second. The last time I thought I saw one, it was very faint, but this time, it was very bright.

I suppose it could’ve been a satellite in low earth orbit which happened to light itself for that short arc across my vision, or fragment from some fireworks, but the former seems unlikely, and the latter should’ve been accompanied by some sound and other light trails.

Wow.  I’ve never seen one so bright and so obvious.  It definitely helped to fire up Stellarium, and locate the Perseus constellation.  But what helped more was to get the RA and DEC (right ascension and declination) for the shower (RA 03h 04m Dec +58°), and to see the real location in the sky in relation to the other constellations (turn on azimuthal grid and equatorial grid).  Stellarium tells you where to look in the sky, depending on where you are and what time it is.  You can even advance/backtrack in time so you know when it’s above the horizon and when it’s close/far from the moon.

Infinite Summer is now underway, and I’m pleased to see that a book I’m reading has spawned its own internet book club for the duration of this summer.

Infinite Jest is a book about a many things.  It’s an epic saga.  It’s really, really long.  It’s by the late David Foster Wallace whose Consider the Lobster essay (commissioned by Gourmet magazine, hailed by PETA in their fight against lobster consumption) I found enlightening, well-written, and plain fun.  His writing is clever and engaging, and his mixing of SAT words with colloquialisms should feel gratifying to all who ever had vocabulary flash cards.
I’m told that Infinite Jest has been read by everyone in UCI’s English department.

In my case, I’ve not finished the book, though I’m around page 850 or so.  That’s about September in the Infinite Summer syllabus, which allows about 75 pages per week, not including footnotes.  You should know that some of the footnotes are short-story length.  Some footnotes have their own footnotes.

Many of the book’s ideas are literally ridiculous. Yet it treats a number of serious themes on life and humanity, so I usually end up feeling more human after reading its pages.

So, in summary, I think the book is great, and the whole Infinite Summer idea is great too (you will be part of a big effort with a bunch of other people, happening right now).   If you’re interested, check out his lobster essay first, because that’s article-length, rather than Bible-length.

It just occurred to me that if you play the guitar and touch-type, you have slightly conflicting demands of your fingertips.  For guitar, you want your left (fretting) hand fingertips to have thickly calloused skin so that you can play longer without worrying about bruising from the strings.  If you play classical or fingerstyle, you probably want to have longer fingernails on your right (plucking) hand so you can get a sharper, clearer tone.

Yet for touch typing, it helps me to feel the keyboard, so I can find the positioning bumps on the home row and feel when I’m hitting keys at their edges so I can reposition.  Good tactile feedback and sense helps me adjust to differently-sized keyboards faster too.  Calloused fingertips don’t feel the keyboard well, and fingernails might even prevent your fingertips from touching keys.

hmpf. :)

It’s easy to bash the American healthcare system and point out instances where it’s lacking.  To me, it seems to be more about billing systems than medicine.  A friend told me about his experience in France, where he, as a foreigner, was seen and treated by a doctor at his hotel, and upon trying to pay was dismissed: “You Americans, always wanting to pay for things.”  Yeah, they pay high taxes and don’t typically have single family homes, cars or enormous flatscreen TVs.  They also seem to generally believe in their government.  Whereas Americans like to euphemise imperfection as “good enough for government purposes.”

Anyway, if you care about the balance of costs versus quality of care, you should check out this article in the New Yorker about how a small town in Texas has one of the highest healthcare costs per person.  I found it a well-written article that’s chock-full of helpful tidbits for your next healthcare debate at a bar, cocktail party, cafe, or late-night dorm room philosophizing session.
Here’s one tidbit from the article:  “In 2006, Medicare spent fifteen thousand dollars per enrollee here, almost twice the national average. The income per capita is twelve thousand dollars.”

Another: ” Two economists working at Dartmouth, Katherine Baicker and Amitabh Chandra, found that the more money Medicare spent per person in a given state the lower that state’s quality ranking tended to be.”

Although dovecot comes with its own full-text indexed search, it doesn’t seem to be enabled by default, at least in Fedora 10.  This is a shame.  For me, it makes a search for body text take a few seconds rather than a couple minutes.

To fix, modify your /etc/dovecot.conf and restart dovecot.

  • Add fts and fts_squat to the mail_plugins line in your protocol section (protocol imap for me).
  • Specifically, look for:

    protocol imap {
    ...
    #mail_plugins =
    ...
    }

    and change it to look more like:

    protocol imap {
    ...
    mail_plugins = fts fts_squat
    ...
    }
  • Add fts = squat to the plugins section.
  • plugins {
    ...
    fts = squat
    ...
    }

Sadly, there was no Ubuntu help forum thread that made all this blindingly obvious, so I hope this post fills that need. This all worked on Fedora 10 with dovecot 1.1.10.

Have a nice day.

Recently I’ve needed to install a virtual machine on my spiffy RHEL 5.3 system, so I turned to VMWare, since its free Server software (1.0 series) worked fine on Ubuntu Dapper.  So I tried installing Server 2, because newer is better, right (you know where I’m going…)?

Server 2 does user-level authentication, so you need to specify the admin user at setup time.  That will be the only user (initially) that can touch the vmware instance.  This means that if you disable the root password, then you should not choose ‘root’ as that user.

So this is fine, except that I couldn’t login initially.  The trick is that VMWare does its own user authentication off of the normal /etc/{passwd,shadow} files, and I was authenticating with Kerberos as an AFS user.

Here’s how to fix things.  You need to modify /etc/vmware/pam.d/vmware-authd .  Upon installation, it contains:

#%PAM-1.0
auth   required   pam_unix.so   shadow nullok
account  required  pam_unix.so
You need to add a line so it looks like:

#%PAM-1.0
auth sufficient  pam_krb5.so use_first_pass  refresh_creds debug 
auth   required   pam_unix.so   shadow nullok
account   required  pam_unix.so
I used /etc/pam.d/system-auth as a reference. (I’m not sure the ‘debug’ part is needed.)

Since I couldn’t find anything online (this is one thing that google didn’t really know) that fixed things, I hope this is useful and saves a few hours or so for somebody somewhere.  The closest post I found didn’t seem to have a clear resolution and solution.

Update: If something gets borked and it says your user is unauthorized, you can set the admin user by editing the value in the <ACEDataUser> tag in /etc/vmware/hostd/authorization.xml .

Let me know if I’ve missed anything–all I can say is that this worked for me.