Tuesday, December 30, 2008

two useful commands

which whatever - lets you know where something is
file /path/to/whatever - gives useful info on the thing, including what architecture (386 vs. 64) it's good with.

Compiling mysqldb for python on Leopard 64 bit architecture

now there's a problem when compiling the mysqldb module for python

fourspaces describes most of what goes wrong, he also gets the emotional tenor just right.

and the guy who wrote the python module tells us what the final solution is. Check in the comments on the bottom of his page.

So, in essence, you must download and compile python for a 64bit architecture, or set up mysql and apache to work as 32-bit processes.

The easier way is to go the 32 bit route. Download mysql community edition 32-bit, then thin out the apache server so it only uses the i386 arch. The instructions to "thin out" are here, scroll down to the section where it says "Thinning the Apache Executable". Note that at the bottom, they give an alternate way to get the same thing done.

Another painful consideration in favor of the 32-bit route is that if you go 64, then you will have to recompile every single thing that interacts with python, mysql and apache to work as a 64 bit arch program. This is a lot tougher than it sounds since everything by default is set to go 32. The latest bit of torment I had to deal with was getting libxml2 to work. But you decide what's best for you. Below I have instructions on going the 64 bit route.

Compiling Python 2.6.1 for x64:

This is actually harder than simply doing a ./compile & make the thing is that there are four different possible architectures for any program on an intel mac running leopard. There are two basic chip sets, power pc and intel. There are also two different modes (?) to use the system bus (?) in - 32 bit and 64 bit. So you have:
  1. ppc - 32 bit power pc
  2. ppc64 - 64 bit power pc
  3. i386 - 32 bit intel
  4. x86_64 - 64 bit intel
So why not just compile to whatever your chipset can do fastest (that is, ppc64 or x86_64)? Dunno. But the result is, you generally want anything you compile to hit everything possible. So generally, what you do before you compile anything is:
export ARCHFLAGS='-arch i386 -arch ppc -arch ppc64 -arch x86_64'
In this case however, you have to do something else. First off, I recommend going to the python.org community lists and browsing through the archives if you want to find information. Just googling is next to useless because the noise to signal ratio is terrible. In any case, I found this gem on the python community lists which I'm going to describe.

While you should read the above link to compiling python 2.6, I'm going to copy some of the instructions, but with my own modifications. I'm also putting in some links to commands which I think deserve explanation:
  1. do an svn checkout or unzip a tar package
  2. $ cd Python2.6 (or whatever the directory it uninstalls to is)
  3. $ mkdir build
  4. $ cd build
  5. $ ../configure --with-framework-name=Python64 --with-universal-archs=all --enable-framework ---enable-universalsdk=/
some notes:

  • if any of the commands make no sense, you can always try piping it through grep, for example: ./configure --help | grep "universal-sdk" gave me
  • The Python frameworks that come with your computer are stored in /System/Library/Frameworks/Python.framework. Because we set --enable-universalsdk to "/", it stores everything in /Library/Frameworks/Python64.framework this is to make it easier to get rid of.
  • if we had set --with-framework-name=Blah then presumably we would have gotten /Library/Frameworks/Blah.framework eheh.

  • MACOSX_DEPLOYMENT_TARGET=10.5 lets the compiler know we're using Leopard. You can find it in issue 1358. If you don't do this you might get the following error
    ./Modules/posixmodule.c:3592: error: too few arguments to function ‘setpgrp’
Now you have to set your path so that it's looking for your new python build. Please make certain you've done this step. And then test it out when it's done.

Why do I insist on this? Because mod_python is not a miniature python interpreter, it checks to make sure that the build it compiled against is what's available to apache. And if apache doesn't know where to look, it's going to stick with the default python interpreter, which means an interpreter built to a 32-bit architecture (i386 arch). And then it will crap out. And then you will go insane trying to figure out went wrong.

So MAKE SURE python2.6 is in your path!

There are two ways to do this
  1. modify bashrc
  2. muck about with path_helper
I used #2, but I'm going to explain the first version because it's easiest.

Path fixing Method #1 - bashrc:

Modify ~/.bashrc to look something like:
If you followed to above steps to compile python 2.6, then /usr/local/bin is where the python executables will be symlinked to.

Now in ~/.bash_profile add the following line:
source ~/.bashrc
This will tell the terminal to take a gander at what you wrote in ~/.bashrc

On the command line also type in
$ source ~/.bashrc
so that the terminal you are working in will know what's going on.

Look further on for the Testing of the Path.

Path fixing Method #2 - path_helper:

I found a great link at softec.st which what the path_helper is and how to use it better than I could. In any case, I'm just going to list what I did.
  • put /usr/local/bin at the top line of the /etc/paths file
  • as per Denis' article, modify the /etc/profile like so:
    if [ -x /usr/libexec/path_helper ]; then
    eval `/usr/libexec/path_helper -s`
I'm not sure if you have to restart the system. I did, just to be safe. But if someone knows better, feel free to drop me a line in the comments. Now go on to the Testing of the Path, and make sure to do what's there.

the Testing of the Path:

note: please read the highlighted link on using backticks - shell expansion in bash. It will help make what I do with the file command a little more clear.

carry out these commands from the prompt:
  1. $ which python - this will spit out:
  2. $ file `which python` - this will spit out:
    /usr/local/bin/python: symbolic link to /Library/Frameworks/Python64.framework/Versions/2.6/bin/python
  3. $ file -L `which python` - this follows the symbolic link to the file we want and gives us:
    /usr/local/bin/python: Mach-O universal binary with 4 architectures
    /usr/local/bin/python (for architecture i386): Mach-O executable i386
    /usr/local/bin/python (for architecture ppc7400): Mach-O executable ppc
    /usr/local/bin/python (for architecture ppc64): Mach-O 64-bit executable ppc64
    /usr/local/bin/python (for architecture x86_64): Mach-O 64-bit executable x86_64

Recompile mod_python:

There have been a ton of posts on problems compiling mod_python in Leopard. Graham Dumpleton seems to be one of the guys working on mod_python, and he's posted a lot of stuff on it. In particular are the following two links which are worth reading:

In an earlier post I mentioned two helpful blogs on compiling mod_python. One was from blog.amber.org and the other from matterkilla. However do not use what matterkilla says. If you go through the steps I've outlined, his stuff not only won't help, it will break it down. I'm only keeping him here in case nothing is working and you're desperate.

I mentioned up above in this post that you generally should use the command
export ARCHFLAGS='-arch i386 -arch ppc -arch ppc64 -arch x86_64'
to compile it for all architectures. Again, I'm not sure why you it should be this way, but it helps explain some of what matterkilla was getting at.
  1. First things first. Get a checkout of mod_python
    $ svn co http://svn.apache.org/repos/asf/quetzalcoatl/mod_python/trunk mod_python-trunk
  2. change directory to mod_python-trunk and configure
    $ ./configure --with-apxs=/usr/sbin/apxs --with-python=/usr/local/bin/python
  3. $ make
  4. $ sudo make install
  5. $ cd /etc/apache2
  6. $ sudo cp httpd.conf httpd.conf.orig (in case you mess up)
  7. $ sudo vi /etc/apache2/httpd.conf
  8. add this line:
    LoadModule python_module /usr/libexec/apache2/mod_python.so
  9. $ sudo apachectrl restart
  10. $ sudo pray-to-God-it-works

Testing it out:

the mod_python site explains how to test it out. But before you do anything, open up a new terminal window and type in
$ tail -f /var/log/apache2/error_log
this will open up apache's error log file and print out the end of it as more errors get sent to the file.

Now after you've made all the changes that the mod_python site tells you to, restart apache with
$ sudo apachectl restart
switch to the terminal you have tail running in, and watch the error messages scrolling in the error log. If you see ANYTHING that looks like
[error] python_init: Python version mismatch
then you have a real problem. Make sure that the python version you compiled mod_python with is on the path. I wrote above how to test that out using the file and which commands. If that fails, leave a comment. I probably won't be able to help, but who knows?

Now recompile mysqldb and you're all set.

HAHA - just kidding. Of course, that's the 800 lb. gorilla in the room.

Here are a few useful links I'm going to use on how I got it set up:

Geert lists some good fixes for _mysql.c
fourspaces has a post with the perfect heading for this problem
and Red Elephants lists a problem that may or may not crop up

But one problem that will crop up, is that setuptools 0.6c9 will not download automagically. setuptools is used by the MySQLdb installer to both build and install, in other words, you need it.

So before you do anything else, head over to http://pypi.python.org/pypi/setuptools and you'll be able to download the latest copy and follow the instructions for a Mac installation.

With that out of the way, now to the meat of the thing:
  1. open up the file _mysql.c (it should be at the top of the directory structure)
  2. (from geert):
    Extracted the tar, then edited _mysql.c. Commented lines 37 - 39:

    //#ifndef uint
    //#define uint unsigned int
  3. (more geert _mysql.c goodness):
    and changed this:
    uint port = MYSQL_PORT;
    uint client_flag = 0;

    to this:
    unsigned int port = MYSQL_PORT;
    unsigned int client_flag = 0;
  4. now in site.cfg, make sure to set Threadsafe=False - I read a post somewhere that it actually ended up being a problem. So be safe.
  5. $ python setup.py build
  6. $ sudo python setup.py install
  7. at the command prompt start up the python shell type in
    import MySQLdb
And now you should see something like the following:
Traceback (most recent call last):
File "", line 1, in
File "build/bdist.macosx-10.5-universal/egg/_mysql.py", line 7, in
File "build/bdist.macosx-10.5-universal/egg/_mysql.py", line 6, in __bootstrap__
ImportError: dynamic module does not define init function (init_mysql)
At this point, I imagine that anyone who has followed all the above steps is thinking to themselves "I'm going to hire someone to track down this bastard and ...". Ah ah ahhhh! Not so fast my friend. Put away your checkbook, and hold off from calling your local hitman.

Remember our good friends file (with the -L flag) and which ? Well, using the two we determine that all our python executables are indeed where they should be, that is,
cd to that and do ls -la and we get something like:
python -> python2.6-32
python-32 -> python2.6-32
python-64 -> python2.6-64
python-all -> python2.6-all
python-config -> python2.6-config
python2.6 -> python2.6-32
aha! python is linking to python2.6-32. So what do we do? Nothing actually. I mean, you can feel free to make a symlink to python-all if you like. But it isn't necessary. Apache will pick up the right version.

Whether you make a symlink or you just choose to run python-all from /Library/Frameworks/whatever ..., either way, run it, and NOW try import MySQLdb

You'll get:
/Library/Frameworks/Python64.framework/Versions/2.6/lib/python2.6/site-packages/MySQL_python-1.2.2-py2.6-macosx-10.5-universal.egg/MySQLdb/__init__.py:34: DeprecationWarning: the sets module is deprecated
Which is just a lot of monkey jabber for YOU WIN IT!

Well, you've been such a good audience, and this is has been such a long and different post to write, I think it's time for some well deserved Rush!

The Music of the Universe

Sunday, December 28, 2008

A classic

Reading this line on yahoo's ap article about the Israeli offensive:
A crowd of anti-Israel protesters in the northern Iraqi city of Mosul became a target for a suicide bomber on a bicycle.
Absolutely hilarious. The Jihadis are so screwed up they even attack their supporters. Clearly, G-d is on our side in this one.

some good sed regex

A fantastic tutorial on sed, worth checking out. I never used it before. I guess I was too intimidated to learn it. But the truth is, it's a LOT easier than trying to do search replacement in emacs or vim.

Anyway, here are some notes
  1. sed works on a line by line basis through the file you send it. If you want it to perform an action more than once on the same line, you have to pass in the /g parameter
  2. you must have the three separators no matter what.
    sed 's/one/two/'
  3. However, you can always change them.
    sed 's_one_two_'
  4. one of the things I didn't see as useful is the number flag. s///5 but what if you want to add a colon (:) after the 80th character on each line?
    sed 's/./&:/80' <file> new
  5. if you want to run sed as a shell script - #!/bin/sed at the top then a file followed with a separate command on each line. just run it by something.sed <old> new
  6. if you want to use a in the regex, you have to type Ctrl-V Ctrl-I I'm not sure if you have to do this when putting it into a script.
  7. by the way, that < oldfile > newfile thing is really just piping.
some sed regex I'm scraping from that tutorial follows. Another good link is this sed one liners page.

removing duplicate words:
  • note the /g - for global replacement
  • and the space inside the parenthesis, this separates the words
sed 's/\([a-z]* \)\1/\1/g' <old> new
to make a change on the first word of every line no matter what's inside it:
  • if you want it on every word in the line add a /g
sed 's/[^ ]*/(&)/' <old>new
to send in a few files, count all the lines that don't begin with "#:", pipe it through grep looking for anything that isn't blank and then count the number of lines:
  • note the ".*" after "#:" this is the equivalent of saying "select EVERYTHING after the #:" - we then replace it with nothing
  • the f1 f2 and f3 are just names of files, presumably some of the lines in those files start with #:
  • grep -v means "the opposite" of whatever expression I pass it to look for
  • wc -l - just counts lines
sed 's/^#:.*//' f1 f2 f3 | grep -v '^$' | wc -l
to get rid of commeted lines:
  • first line takes out everything following (and including the #)
  • second command removes all the tabs and spaces
  • final command deletes each empty line
sed -e 's/#.*//' -e 's/[ ^I]*$//' -e '/^$/ d'
to double every line:
  • p simply duplicates whatever is printed
sed '/^$/ p'

Bob Dylan comes through

This is a really great song that I think summarizes the current situation in Israel.

I think it's ridiculous that Israel gets bombarded with rockets on a daily basis for months at a time, and when they finally strike back they get criticized.

There seem to be two criticisms. I'll try to be as honest in framing them as possible. (I do not want to be guilty of the straw man fallacy).
  1. Hamas rocket attacks did not kill enough Israeli civilians to justifiy carpet bombing Gaza
  2. Many innocent Gazans are being killed.
To answer the first one:

Well what should they do? Sit around and wait for the members of Hamas to develop skills at long distance murder? Screw that! Send them to Hell where they belong!

To the second:

Well who told the members of Hamas to entrench themselves among the civilian populace? By the way, I am not going to say that the Israelis are doing everything possible to avoid civilian casualties. No really, I'm not. Because I don't think that has any meaning. In a time of war, particularly when one side has provoked the conflict, the other side is entitled to do whatever is necessary to attack and destroy legitimate military targets no matter who is in the area.

See Article 28 of the Geneva convention dealing with civilians. To quote:

Article 28

The presence of a protected person may not be used to render certain points or areas immune from military operations.

(To be completely honest, I didn't find that article on my own, I saw a reference to it on zionism-israel.com, feel free to take a look)

The Jihadis make a practice of storing weaponry and fighters in their Mosques. They use ambulences carrying the Red Crescent logo to transfer ammunition. They torture prisoners and show no regard for the prisoners needs. They make a practice of targeting civilians and non military targets. In short, they pay no attention whatsoever to the Geneva convention.

Frankly, they can all collectively go to Hell.

Tuesday, December 23, 2008

Git it!

Well, before I go to the big Kahuna, that is, setting up mod_python and Django, I want to digress into Git.

I've toyed around with Git for a while, and I found it very easy to use. Now I want to set it up so I can use it with all my projects. I also found a nifty site where I can store my repositories for backup, or sharing, or whatever.

Well, you can download and read all about Git at their web site. And the public/private repository is called GitHub. You have to pay for private repositories. But I think the rates are fair.

Since I like pain, I downloaded a source package and compiled it. No sweat.

Simply cd into the directory from the command line
sudo make install

and you're good to go.

Well, I've been putting this off for long enough. Now it's time to get Django running.

Next up: Mod_Python and Django!

Finks, Meescuels, and whoo I'm tired

The thing about Mysql is that I might want to compile apps that use the mysql source.

If that crops up, then I'll uninstall the prepackaged binary and use the docs at DIYMacServer. However, right now, I just want to get the thing running.

So I'm just going to download the package from the MySQL site.

Make sure you got through the readme. It points out the following lines have to be added to your .bashrc file

alias mysql=/usr/local/mysql/bin/mysql
alias mysqladmin=/usr/local/mysql/bin/mysqladmin

Don't have a .bashrc file? No worries, this what you have to do:

  1. Create a .bash_profile in your home directory and insert this line:
    source ~/.bashrc
  2. Create a .bashrc file in your home directory and insert the above two lines:
    alias mysql=/usr/local/mysql/bin/mysql
    alias mysqladmin=/usr/local/mysql/bin/mysqladmin

All set! Now you can call mysql and mysqladmin from the command line.

Next, I install Fink and FinkCommander in case I need to compile libraries that just. won't. work. Be sure to read the documentation. Now read it again. And again.

I couldn't help but laugh at this line on the Fink Commander description:

Fink Commander is ... (blah blah blah) ... It provides an intuitive front-end to the Fink command-line tools


Be prepared for MUCH pain and suffering if you use this (which you will, because you need it).

Side note: I just discovered that I forgot to back up a significant library of code I wrote when I replaced the hard drive. After a few minutes of stunned panic, I remembered I still have the old drive. So I called up TekServe and asked if they can help me get the files back. It'll cost me, but I really really need those files. They represent a LOT of work. This teaches me not to back up twice.

Next up: Git it!


This post is actually out of sequence. Truth is, the first thing I did after I installed the speeddownload was to move over my music library. But here it is anyway.

Since I want my music to be available on both the Mac and Linux partitions, I decided to install it in opt. Specifically:

Nice and orderly. Sometimes I'm going to have music from other sources, e.g. Amazon, which like to have their own directory.

Well, first thing you have to do is let iTunes know which directory you're going to be storing your music in.

From the menu: iTunes::Preferences::Advanced::change music folder

To explain: Where it says "iTunes Music folder location" near the top of the tab, click on the "change" button. Then select, or create the directory, whereever you like, then hit the "open" button in the directory dialog.

Now click "OK" in the Preferences panel.

Very good. Now back in the menu: Advanced::Consolodate Library it'll ask if you're sure, say yes, and then it will move any music you had in the original iTunes folder, ie Music/iTunes/iTuns Music and it will move it to the new folder.

Next, remove the old iTunes Music folder I mentioned above, but leave the "iTunes Music Library.xml" file alone.

Next up, Mysql, and fink

The Editors

Now we're up to the editors.

There are three editors I tend to use on a mac. Two of which I tend to use everywhere.

In order of use (with Linux equivalents):
  1. MacVim / GVim
  2. AquaEmacs / Emacs
  3. Textmate
Textmate I'm going to hold off on for a while. I don't often use it, and I'm a bit overwhelmed as it is.

Now installing these editors is not so cut and dried. I need to also install additional files so they can handle the various file formats I use. For example, django templating, actionscript, etc.

On the Vim side, here are the files I can get:

actionscript 3.0 and MXML

Now to make it work with MacVim takes a bit of quakery.

First off, where's the $VIMRUNTIME directory? Well, here's the hackery:

I read a snippet some where that said:

 :e $VIMRUNTIME/vimrc_example.vim
:saveas ~/.vimrc
:e $VIMRUNTIME/gvimrc_example.vim
:saveas ~/.gvimrc
So I did the first part, and then I tried "save as" to see which directory it was in. Turns out it's in:



go there, then "cd syntax" and you're where the *.vim files have to get dumped.

next do that above snippet of code to create a .vimrc file in your home directory. Not sure if you need to do the same gvimrc, but what the hell.

Now for Aquaemacs

First thing, check out this page on emacs customization. It will save you much pain.

There is a great site called emacswiki, it has a lot of a good info, especially on files you might like to install. I tend to use ecmascript (what actionscript is based on).

Here's a link for general info actionscript in emacs.
And another link for info on django in emacs.

Great, so how do I install this stuff in AquaEmacs? Here's how.

First, you have to install the *.el files in a place where emacs can find it. This all about the "load-path" and I found a great tip on this tutorial:

Where to put your elisp files

If you get an elisp file from the Internet or from a friend, you will need to put it in a place Emacs can find. Emacs needs to know this in case you want to load such a file from your .emacs. This is therefore the first thing I have in my .emacs file:

;;; Paths and directories
(add-to-list 'load-path "~/elisp")

next, you go to the aquamacs preferences file, and edit it like so:

(autoload 'ecmascript-mode "ecmascript-mode.el"
"Major mode for editing ecmascript." t)

(autoload 'actionscript-mode "actionscript-mode.el"
"Major mode for editing AS3 files." t)

(autoload 'django-html-mode "django-html-mode.el"
"'Improved' mode for editing django html templates." t)

(autoload 'django-mode "django-mode.el"
"Major mode for editing django templates." t)

(add-to-list 'auto-mode-alist '("\\.as[123]?$" . ecmascript-mode))

;; set tabs only
(setq-default indent-tabs-mode nil);
(setq default-tab-width 4);

(you don't have to add the tab settings) And you're done.

Next up, setting up iTunes.

IDE's and making funky little icons for refit

Well, we've got Xcode being downloaded in the background, but why should that stop me from installing a few nifty things?

First up, the wallpaper - wallpaperlinux is pretty decent, you can get some good stuff there.

Now for an icon, I hate the icons that come with refit. Yeah they're OK I guess, but I want something cooler.

Something like this:

There are two problems here.

  1. refit uses the mac .icns file - so I need a converter
  2. refit wants the image to be 128x128 - so I have to resize the image I got.
Well, img2icns is a handy little utility that allows me to convert png to icns. There's a freeware version and a souped up commercial version. My needs, fortunately, are simple.

But first, I need to resize the sucker. Now's as good a time as any to install Adobe Web Design CS4. It has a ton of useful apps which I'll be wasting lots of time figuring out in the future.

It comes in a funky little case that has these odd little widgets that serve no purpose. Maybe in a later post, I'll get a camera and upload pics of it all, but for now just take my word.

It's LARGE. There is a LOT of info in it. So be prepared to take a nap or read a book (I did both).

But it's worth it. Flash CS4 is a lot more together than CS3.

(Yeah I know, that doesn't justify the upgrade price tag, but if the aesthetics are any indication, I am going to enjoy working with this. )

I load up photoshop, resize the image, drop it into img2icns, then rename it os_linux.icns, drop it in /efi/refit/icons (that's where it has to be), reboot the machine, and it looks quite pretty. (no screenshots of boot, sorry).


Next post, the Editors.

Browsers, browsers everywhere, but not a wireless to link!

To recap - I just partitioned my drive properly and installed the two operating systems I intend to use. Now it's time for some internetty goodness.

There are four main browsers available to me on a mac, three of which I intend to muck about with.

The first three I installed. Opera, well, I'll get to it later, when I'm bored.

Next up, I need to install my fast downloader for those hideously large files that tend to stop right in the middle.

Enter, SpeedDownload!

Here's a screeny:

First thing I do with it, I connect to some guy running on a dlink installation (this guy apparently doesn't believe in wpa protection - in manhattan) and I head over to the Apple Developer Connection to download XCode for Leopard. This is about a gig, and the connection is crappy, so it ends up taking 7 hours (I just set it and went to bed).

Well, not quite. I did other stuff, occasionally halting the download to reboot the system, install other stuff - you get the drill.

But for that, you have to read the Next Post

Had to start all over

Everything went kablooey. I was trying to reformat the opt partition to hfs+ format, and Disk Utility was hanging. Eventually I got sick of it and decided to do it all over again from scratch. So if anyone out there has ben following this misadventure, this post, right here, right now, right this bat second, is the place to start.

Now it turns out, for some mysterious reason, the 320 Gb hard drive only shows up as 298 Gb. what those other rascally 22 Gigs are doing I have no idea. But we work with what we've got. And frankly, I'll be pretty amazed if I use up all that space by the time I decide to get a new laptop.

Here's a pretty image of the partition:

osx is the main partition, it's 90 gigs, currently using 40

opt is 120 gigs, I'm currently using only 13.

Boy I'm going to feel stupid if my space requirements are in reverse.

DISKOS4 is the main linux partition. It's 84 gigs. I'm not sure at the moment how much is being used. But at worst, I've never gone over 30.

There's a fourth partion which isn't listed, and that's the Linux Swap partition. Just a measly 4 Gigs.

So to reformat everything, I booted into the linux cd. Used it's partition utility to erase all the partitions. The I started up the Leopard cd and made 3 partitions. osx, opt, and free space. opt was formatted to hfs+. Linux can read/write to hfs. but OSX breaks down when doing intense work with ext2 (and don't even bother with ext3). Some people mentions "Mac Free". But I used ext2fsx, something which has completely crashed on me in the past. I don't recommend using it for anything but cursory reading.

Now at this point, I have Leopard, two formatted partitions, and a lot of free space. So I downloaded refit and installed it.

Next, reboot into the Linux cd and install linux. I manually partitioned the free space into the normal mount point - / - and a Linux Swap partition, as I mentioned above.

Continued - Browsers

Monday, December 22, 2008

blogging like crazy

So it's time for the obligatory political post.

Like a lot of people I'm of two minds regarding President Bush. I don't know if what he did was a good idea, because the only way to know that is if it works, which will take another 8 years or so. Why? Because the whole concept behind the war was to prevent WWIII. If we find ourselves in WWIII, then that means he was wrong. If we don't, it means he was right.

But regardless, I think his intentions were good. So I found this post at American Thinker which brings up some kind news regarding him.

To sum up, apparently he took a great deal of time out to touch base with a lot of wounded and the families of dead soldiers. While that doesn't justify anything, it is a touching thing.

Back to the technical!

monday updates

Found a good link for setting up mod_python on leopard:


The blog itself is clever, but not my style of politics. Too MacTrendy for me.

Anyway, the info seems accurate.

Also, I'm going to reformat the linux side, make a bigger partition for opt. I checked out the amount of megs per gig, and it comes to 1024, which makes sense. so that's about 122880mb for 120gigs. Which in my mind sounds like "twelve-twenty eight-eighty".

Found a new and more interesting version of MacVim, which I intend to use.

The Xcode download is insanely large, about a gig. So I'm going to hold off on that for a bit.

I'm going to stick with flex3 trial instead of the full version. For all I know, by the time I'm ready to start using it, they'll have another version out, which will mean I'll have to pony up another $99 to upgrade to. Better wait until I'm ready to start working with it.

Python - to use 2.6 or 2.5? Do I use the default or the mucky version? I have to find a version of IDLE that doesn't look horrible. If Xcode has that, I'll stick with theirs.

got back the system

Sat night I got back my system. The guys at Tekserve did a great job. The system now has 4gb memory, and a 320gb hard drive, I think it's 7200 rpm, but it doesn't matter. The Tekserve guys did a standard check before they took it out and let me know that the old drive was failing. Which explains a lot of what was going wrong. I thought it was just some corrupted files. Turns out it was dying.

Anyway, I just partitioned it and installed linux.

What we currently have is:

100gb Mac partition on sda2
112gb ext2 partition (/opt) on sda3 (I meant to have it at 120gb, but I screwed up)
83.8gb ext2 partition (/) on sda4
and a 2gb partition for the swap

I'm really impressed with how everything just Plain WorksTM. Normally I had to download the madwifi drivers and make myself crazy trying to install all the various packages for compiling said drivers so I could connect to the net using ubuntu. Since I don't have a wire connection I need to rely on starbucks to get online.

Anyway, those days seem to be gone, thank G-d!

Now I want to see if it's possible to install something that will allow me to read from an ext2/ext3 filesystem. If it isn't 100% secure, then I'll reform /opt to hfs+

So here is a short list of some programs I'm going to need to download, or already have downloaded to get the mac side working:
  1. SpeedDownload (so I can break up huge files) - done
  2. Firefox - done
  3. iTerm - done
  4. AquaEmacs - done
  5. MacVim - done
  6. Something to use ext2 on Mac
  7. the latest version of Python
  8. finkcommander (update - needs fink) - done
  9. the megabig xcode package
  10. apache2 - I don't know if the apache of leopard is set up to use python, I might have to reinstall everything
  11. mysql
  12. adobe flex 3
  13. adobe flash 10 (and 9) debug version - which is the main reason why I started this. I needed a version of flash to debug and it wouldn't install.
  • some python xml libs
  • image libs (PIL)
  • django

Also, I have CS4 Web Premium from Adobe, and I intend to install it later tonight

Thursday, December 18, 2008

reformatting my hard drive

I have a 2.33Ghz Intel Core 2 Duo mack with 2gb memory.

Currently running Tiger 10.4.11

Now I'm sick of it.  Every couple of months firefox starts to go wonky, and then I have to hack through the system trying to get it to work.  Finally, I've had enough, I'm buying bigger, faster hard drive, I'm going to install leopard on it.  And then I'm going to put a linux partition and a windows partition (with xp).

This blog is going to detail everything I do to get my system back up and running.  I've always wanted to keep some kind of record of it, and with a newly formatted hard drive, this will be my chance.

So the first step was moving all my files to a backup drive, did that last night.

Tomorrow morning I'm going to drop this off at Tekserve and get the ball rolling, hopefully I'll get my computer back on Sunday.