RSS | Comments RSS | Atom


jhcore.com

A source for news, reviews, guides, and tools for technology by John Paulett.

Guides03 Feb 2008 05:28 pm

I always forget how to build Python packages, such as psyco and simplejson that require C/C++ code to be compiled. The usual error I get from running “python setup.py install” is:

error: Python was built with Visual Studio 2003;
extensions must be built with a compiler than can generate compatible binaries. Visual Studio 2003 was not found on this system. If you have Cygwin installed, you can try compiling with MingW32, by passing “-c mingw32″ to setup.py.

Now, I do not have Visual Studio 2003, but I do have mingw32. (Grab cygwin and when selecting packages, make sure than mingw-runtime and gcc are selected.)

Now, back with our setup.py file, execute:

python setup.py build_ext --compiler=mingw32 install

Hopefully that should solve any issues.

Guides02 Feb 2008 02:56 pm

To use Perl’s CPAN on Windows with cygwin, you need to install some additional programs in cygwin. Run cygwin’s setup.exe (I like clicking the “View” button to change the listing to Full, so I get an alphabetical list of the packages).

Make sure that you install the following packages:

  • perl (just in case you do not have it)
  • gzip
  • tar
  • unzip
  • make
  • lynx
  • wget
  • ncftp
  • gnupg

Open the Cygwin bash shell and enter:

perl -MCPAN -e shell

Accept the defaults, and you are good to go.

Once in the CPAN shell, you can install modules with commands like:

install Date::Parse
Guides & Ubuntu24 Dec 2007 01:51 am

I have eagerly been waiting to try out CouchDB. I find the concept of document storage, instead of strict relational storage, to be very interesting. Plus, Erlang seems to be gaining mindshare.


I documented the process that I took to install CouchDB 0.7.2 on Ubuntu 7.10 (it is basically straight from with the CouchDB wiki, but with some small modifications to get it to work).

wget http://couchdb.googlecode.com/files/couchdb-0.7.2.tar.gz
tar -xzvf couchdb-0.7.2.tar.gz
cd couchdb-0.7.2/
sudo apt-get install automake autoconf libtool subversion-tools help2man build-essential erlang libicu36 libicu36-dev libreadline5-dev checkinstall
./configure
make
sudo checkinstall

Everything should be looking good.

We need to add a user and give that user permission to some directories.

sudo adduser couchdb
sudo mkdir -p /usr/local/var/lib/couchdb
sudo chown -R couchdb /usr/local/var/lib/couchdb
sudo mkdir -p /usr/local/var/log/couchdb
sudo chown -R couchdb /usr/local/var/log/couchdb
sudo mkdir -p /usr/local/var/run
sudo chown -R couchdb /usr/local/var/run

You can run in a shell:

sudo -u couchdb couchdb

Or you can start the daemon:

sudo /usr/local/etc/init.d/couchdb start

To access to web view of the database, assuming you are running locally, go to:
http://localhost:5984/_utils/index.html

Stay tuned for some CouchDB programming…

Ubuntu29 Jun 2007 12:29 am

After reading a post on Planet Ubuntu Users, I grew envious that I didn’t have the latest and greatest of Ubuntu–so I decide to take the plunge.

First I tried the sudo update-manager -c -d, which error’ed out. So I hacked away at the /usr/lib/python2.5/site-packages/UpdateManager/DistUpgradeFetcher.py file by adding import os. Everything started going fine, except my connection was crawling (almost dial-up speeds)–there was no way that I was going to wait.

So I grabbed the latest ISO, picking the alternate install just to avoid the hassle of booting up into the live cd. Everything worked nicely–except I got a little worried when the install hung for ten minutes when installing Tomboy. But with a little patience, everything installed properly.

I’m currently updating the system and looking into the new Dual Monitor tool.

I am looking forward to exploring this new toy!

Ubuntu26 Jun 2007 12:40 am

I like looking at numbers. So when I saw an interesting gif on a friend’s webpage saying that a certain piece of software had so many thousands of lines of code and cost so much money, I was naturally intrigued. After clicking on the link, I was directed to ohloh.net. This site analyzes public version control repositories and provides some interesting statistics about the project–including the lines of code and estimated cost to develop the software from scratch. I decided to try for myself and registered RadLex. I would have registered my VCSFrenzy branch, but currently only Subversion, CVS, and GIT are supported.

After a little digging, it seems like ohloh uses David Wheeler’s SLOCCount program. With an easy

sudo apt-get install sloccount

I was using SLOCCount to find out more stats about various other programs I was working on. I was happy to see that my afternoon of hacking on some Festival Python bindings is estimated to have cost $3,480. Now if only SLOCCount deposited that money in my bank account….

I was wondering what your favorite tracking/code stat programs are–let me know? I’ve been using CIA.vc, but are there any other must have code stat programs?

Next Page »