Monday, February 26, 2007

First Post!

Hi, my name is Al Tobey. For now, go to http://www.tobert.org to learn the grossly-out-of-date details.

I'm investigating whether or not I want to move http://www.tobert.org to Blogger. I'm doing it to save time/money and to take advantage of integration between the various Google tools, where it exists. I've also often considered posting more often, which I avoid because my current setup is still a PITA.

The main snag I'm working on right now is how to post code examples. So far, it looks like nobody is really doing it well. Most of the "solutions" I've found involve stuff like sed 's/ /\ /g', which isn't very elegant when HTML has tags specifically for this kind of thing.

Previously, I defaulted to using the <pre> tag for code examples. So far, I've tried <blockquote> and <p style="white-space: pre;"> (which I learned about at http://www.htmldog.com/ptg/archives/000077.php)

Anyways, I'm going to keep editing this post adding copies of the below code until it works.

Using <pre>:


#!/bin/ksh

for file in *.html
do
# this should be indented by 4 spaces
sed 's/ /\&nbsp;/g' < "$file" > "$file.new"
mv "$file.new" "$file"
done


Problem solved:: It appears that <pre> is ignored in the preview you get in the edit posts view, but not on the published page.

Wednesday, October 12, 2005

64-bit perl on HP-UX (PARISC or Itanium)

Here's something that took me a few hours to get dialed in. This is all set for linking DBD::Oracle and DBD::Sybase to their respective 64-bit client libraries without hassle. I'm assuming the HP ANSI C compiler is installed. I never even tried with gcc due to some custom extensions that require the HP compiler.


CC=/opt/ansic/bin/cc \
CXX=/opt/aCC/bin/aCC \
CFLAGS="+DD64 +Z -I/opt/perl-5.8/local/include" \
CXXFLAGS=$CFLAGS \
LDFLAGS="-L/opt/perl-5.8/local/lib -L/usr/lib/hpux64" \
PATH=/opt/ansic/bin:/usr/ccs/bin:/opt/perl-5.8/local/bin:/opt/perl-5.8/bin:/usr/bin:/usr/local/bin:/bin:/sbin \
PERL=/opt/perl-5.8/bin/perl \
MAKE=/usr/local/bin/gmake \
./Configure -der \
-A prepend:libswanted='cl pthread ' \
-Dprefix=/opt/perl-5.8 \
-Dinstallprefix=/opt/perl-5.8 \
-Duselargefiles \
-Dusethreads \
-Duse64bitall \
-Dyacc='/usr/local/bin/bison -y' \
-Uusemallocwrap \
-Dcf_by="Al Tobey" \
-Dperladmin='tobert@gmail.com' \
-Dcf_email='tobert@gmail.com'

make
make test
make install

(cd /usr/include; /opt/perl-5.8/bin/h2ph -r -l .)