Monday, November 11, 2002


Upgrading to 10.2.2 breaks Emacs package...

Ovidiu also mentioned that upgrading to 10.2.2 breaks Emacs for Mac OS X.

The problem has to do with the way that particular build of emacs is created. During the build, emacs effectively loads a whole bunch of modules into a trimmed down version of the interpreter and then dumps a 'fat' version of the interpreter as an executable that launches much faster.

Unfortunately, the resulting executable has very stringent dependencies on the exact set of dynamic libraries that were present when the executable was dumped.

If system update installs new versions of the dynamic libraries, the dumped executables symbol tables will mismatch and, as a result, the executable will cause a segmentation fault.

Not a very graceful failure, but that is the reason.

This is also the same reason why the Emacs application cannot be moved; the dumped executable ends up with absolute paths encoded within. At least, this used to be the case-- I know that there was some effort put into making sure the internal paths were relative, I'm not sure what ever happened or if it were completed.
11:48:25 PM    


Ovidiu: Python or Ruby?

Ovidiu Predescu writes in response to someone asking whether they should learn Python or Ruby:

Learn them both! Seriously, my take on languages is that once you know one, it's very easy to learn another one.

Absolutely! I could not agree with this more. The strongest programmers I have ever met are ones that know many languages-- more importantly, understand the advantages and disadvantages of the many different design patterns emphasized in the various programming languages. Each language has its strengths and weaknesses.

I find it incredibly sad to meet a developer who made it through a CS program with exposure to only one or two languages. Sadly, it seems that there is a growing community of developers that believe that PHP, Perl or-- comprising the largest group-- Java is the only language worth knowing.

How terribly sad!

If you are a developer relatively new to the field or a developer who has focused entirely on only a language or two, I strongly encourage you to learn a new language! Even if you never use the new language as anything more than a learning exercise, it will improve your abilities as a programmer!
11:38:14 PM    




A date has been set...

I'll be married on December 22nd.

Now-- those of you that know me probably did a double-take on that one as you know that I have been married a while. In particular, Dec 22nd will be one day before my 7th anniversary (and I have a 2 year old son).

I'm still happily married to my wife Christine and I'm not entering into a state of polygamy.

Christine's sister recently gave birth and wants Christine to be the godmother. The catholic church insists on at least one of the god parent's being a catholic in good standing. Given that the godfather is Jewish, it fell on Christine to fulfill that role.

The catholic church doesn't recognize our marriage as legitimate because we weren't married in "God's house". We were married on the beach [Grand Cayman] and, apparently, that isn't considered a part of "God's house". Maybe his backyard, maybe his porch, but not his house...

So, we have to be married in a church before Christine can be a godmother.

Fortunately, I don't have to be a catholic to get through all this.

I'm looking forward to the whole thing. It'll give us a chance to get a bunch of family together, renew our vows, and generally have a good time celebrating our union.
5:38:50 PM    


iSync

Over the weekend, I rebuilt my dual-proc 450 to act as my primary home LAN user workstation. That is, it serves up my iTunes library, acts as a secondary developer box, and as another beta test target for certain unmentionables.

(Of note, I actually built the box with a UFS filesystem and the primary user is does not have administrator access. I'm going to flame the hell out of any third party app that breaks in this environment unless there is a damned good reason. Stay tuned....)

As per David Nanian's suggestion, I wanted to use iSync to syncronize addresses and contacts to my iPod simply so its clock would be kept up to date.

Now, I also have a Titanium Powerbook upon which I use a BlueTooth adaptor to sync my cell phone. Obviously, syncing my address book and calendar information between the two computers would be useful, as well.

So, that is a total of two computers with one computer acting as a cradle :-) for an iPod and the other pairing with a bluetooth phone.

In other words, just about the ideal-- and most complex-- situation described in the marketing materials for iSync.

If it works. I'm not much of one for believing marketing hype, so that's a big if in my book.

Well, it does work. iSync flawlessly handled this situation. I simply registered the DP 450 with my .mac account, added the iPod as a device, and pressed 'sync now'.

Everything just worked flawlessly.

My only complaint is cosmetic; iSync asks 2 or 3 times during the sync process if various operations should take place and there wasn't an option to delete the default calendars in iCal (which it should have done given that I selected the "delete stuff on this computer and replace with contents of my .mac account" option).

The end result is that it no longer matters what device I happen to be using when I update or create a particular piece of information. One short 'sync now' later, it'll be propagated to all other devices. In the rare event that I update the same record on two devices, iSync's built in conflict resolver takes care of things nicely (though there is a cosmetic bug in that, as well -- just click 'cancel' if you end up in an endless UI loop. No data is actually lost, it just pushes off the sync'ing of the conflicted data to the next sync.)

That freakin' rocks!
5:25:43 PM    


Enabling PHP on OS X....

I've been looking at various ways to manage a big pile of web content w/all the fancy linking, etc, for the purposes of providing a developer support site.

In doing so, I came across the need to enable PHP on my development box so I could play around with the Fink site source.

Searching Google revealed a bunch of hints, but they mostly seemed out of date.

Here is the recipe I settled on. Works for me. I make no claim on being a PHP expert.

In the apache configuration file /etc/httpd/httpd.conf, uncomment the lines that load the PHP module...

...
LoadModule php4_module libexec/httpd/libphp4.so
...
...
AddModule mod_php4.c
...

... and add these three lines...

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
DirectoryIndex index.php index.shtml index.html

... to the <Directory "/Library/WebServer/Documents"> block. Mine looks like...

#
# This should be changed to whatever you set DocumentRoot to.
#


#
# This may also be "None", "All", or any combination of "Indexes",
# "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews".
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
Options Indexes FollowSymLinks MultiViews

#
# This controls which options the .htaccess files in directories can
# override. Can also be "All", or any combination of "Options", "FileInfo",
# "AuthConfig", and "Limit"
#
AllowOverride None

#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
DirectoryIndex index.php index.shtml index.html

Make sure you restart apache (toggle web sharing in the sharing preferences pane). You can check to make sure apache restarted correctly by looking at the end of the file /var/log/httpd/error_log. That file will also contain any error messages that may have been spewed if something is misconfigured.

To test, drop the string <?phpinfo()?> into the file foo.php in /Library/WebServer/Documents/ and then load http://localhost/foo.php. It should show you a big page of PHP configuration information. If it doesn't, something is broken.
12:17:07 PM