graphical diff

Every few years I seem to have a burning need for a graphical diff program.

The last time I really needed one, I used fldiff.  I really like the color highlighting of it, but I don’t think I could get it working under Mac OS back then, so I ran it under Solaris (our desk computers here are usually Solaris). Below is a screenshot of fldiff running over ssh.

fldiff screenshot

 

fldiff is pretty handy, but I don’t have a desk computer in my new lab.  So I did another search and came to FileMerge, a tool on Mac OS that’s in the developer tools (xcode) bundle.  If you want to start it from the command line, it’s called opendiff.

The interface of FileMerge is really interesting – as you scroll, it adjusts the alignment so that the center of the screen is aligned.  In contrast, fldiff has these huge areas of vertical whitesapce.

FileMerge screenshot

The only downside is that it comes with the developer tools, which aren’t installed by default.  On the other hand, if you’re in computer science, you might need gcc from developer tools to install some library for another language anyway.

Snow Leopard upgrade + Perl

I updated my MacBook to Snow Leopard sometime last summer, and apparently it blew away my old version of Perl.  This also blew away any modules I had installed, notably Text::BibTeX, which I use to parse BibTeX files to generate a webpage of papers.  Today, I wanted to compare my BibTeX to the bbl file for my dissertation and see what things I forgot to cite.

Installation via CPAN failed (perl -MCPAN -e”install Text::BibTeX”), so I downloaded manually and the Makefile.PL failed because I don’t have a C compiler… because Snow Leopard blew away my previous install of Xcode I guess.  So now I’m engaged in an (estimated) 20-minute install of Xcode from DVD to get gcc or equivalent to install manually.

After installing Xcode, I decided to try installing again via CPAN module, but it failed. In contrast, the manual install worked fine.