Thursday, October 30, 2008

Installing Player / Stage

Playing around with the Player / Stage project from source for a tad bit of research. A few install notes to help others headed in this direction.

Player

Pretty nice installer with (seemingly) clear output about what packages will not be built and why. Somehow I missed the fact that playerv would not be installed due to a number of missing packages in this output. Digging through some mail logs I found that I should also install the packages: libfltk1.1-dev libgtk2.0-dev libgdk-pixbuf-dev libgnomeui-dev Also, remember that rerunning configure does not force code to be rebuilt. A make clean solves that. Oops.

Stage

Just needed to install cmake.

Tuesday, October 28, 2008

Good DVI to PDF Conversion

Old school Latex user and want to produce clean PDF files without pdflatex? The following steps tend to work pretty well after you've generated a dvi using latex:
  • dvips -P cmz -t letter -o file.ps file.dvi
  • ps2pdf file.ps file.pdf
If the '-P cmz' option to dvips does not work, some folks have luck with '-P pdf'.

Wednesday, September 10, 2008

Lines Per-Page in LNCS Formatting

Typing with a text width of 72, I get about 60 lines or 550 words of text (with no formatting, sections, etc.) per page of LNCS formated LaTeX. An alternate way view of this is about one column of ACM 10pt text. Crazy!

Tuesday, September 9, 2008

Disabling Intellisense in Visual Studio

For one reason and another I've been needing to use MS Visual Studio 2005 on a big project at work. Unfortunately, running MSVS with a BIG project in a VM on an already resource limited machine can bring my system grinding to a halt. The key offender seems to be intellisense. The easy answer is to disable intellisense... Too bad that's not an option in MSVS! I finally found this tip from k_d on the Microsoft Forums:
The simplest way to disable Intellisense for a solution/project is to simply create a directory with the same name of the intellisense file in the directory where the file normally resides. In other words, if you have a Stuff solution, delete the Stuff.ncb file in the directory where Stuff.sln resides and create a directory named Stuff.ncb. Every time you load the solution a dialog panel will be displayed warning that intellisense will be disabled, but other than that everything seems to operate normally.
And it works!

Saturday, August 9, 2008

Poor Boy's Header Dependancy Graph

Spent a few days breaking up a nasty cluster of inter-header dependencies. The code base contained a large core of header files that each included lots other header files that were not needed. That kind of thing irks me like fingernails on a chalkboard. I decided to graph header includes to visually look for odd includes, connected clusters that can be merged into a single header file, and redundant includes. My solution simply generates a dot graph for easy visualization.

#!/bin/bash

# 'Cause bash bugs suck
set -o nounset
set -o errexit

BASEDIR=$1

echo "digraph depends_on {"

for file in `find $BASEDIR -name "*.[ch]" -print | grep -v "tools/"`
do 
    for include in `grep "#include" $file | tr \< \: | tr \> \: | tr \" \: | cut -f2 -d\:`
    do
        f=`basename $file`
        i=`basename $include`
        echo "    \"$f\" -> \"$i\";"
    done
done 

echo "}"

Monday, June 30, 2008

Cygwin Copy and Paste

Can't copy to and paste from the Cygwin window? I had the problem also until I enabled copy and pasting from the Cygwin window:
  1. Open Cygwin
  2. Right click on the Cygwin icon in upper left of window frame
  3. Check 'QuickEdit Mode' from the properties menu
Windows will prompt to see if this should be the default. You can say 'Ok' to make it the default. Now copy and paste to your hearts content!

Tuesday, June 10, 2008

Building Valgrind Without Root

Word on the street is that support for debugging Wine using Valgrind has continued to increase over the past year. I decided to give Valgrind another whirl and see what I can find. I'm currently working away from home on a computer that I don't have admin privileges on and that made the Valgrind build a little more exciting.

$ sh autogen.sh

aclocal: configure.in: 58: macro `AM_PROG_CC_C_O' not found in library

Bummer. Valgrind requires a recent version of autotools. The distribution that I'm running on uses a default of automake-1.4 and aclocal-1.4 as specified in /etc/alternatives. Fortunately, 1.9 versions of both tools are installed. Some quick symbolic links to a ~/local/bin and a redefine of my path cleared up those problems and I was good to go.