Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; CBlacklist has a deprecated constructor in /home/saltybanana/www/blog/peel/scripts/sb_blacklist.php on line 6

Warning: session_start(): Cannot start session when headers already sent in /home/saltybanana/www/blog/peel/index.php on line 11

Warning: strpos(): needle is not a string or an integer in /home/saltybanana/www/blog/peel/index.php on line 31

Warning: strpos(): needle is not a string or an integer in /home/saltybanana/www/blog/peel/index.php on line 37

Warning: strpos(): needle is not a string or an integer in /home/saltybanana/www/blog/peel/index.php on line 43

Warning: strpos(): needle is not a string or an integer in /home/saltybanana/www/blog/peel/index.php on line 49
The Banana Peel
Upgrade 
Monday, January 3, 2005, 11:00 AM
The version of Simple PHP Blog I had been using had some significant problems, the worst of which is that it doesn't want to recognize entries since January of 2005.

I was glad to see, however, that the author had released a fix to the problem very quickly, so I've upgraded. One unfortunate side-effect to the upgrade is that all comments are lost. For now, I've kept an archived copy of the blog here.
  |  permalink   |   ( 3 / 635 )

Multi-grain Bread 
Sunday, January 2, 2005, 10:11 AM
One of the few things I like for breakfast is bread. So much so that I started making my own breads using a bread machine years ago.

I was recently encouraged to eat more healthily, so I've begun to make multi-grain breads. Here's a recipe that I like.

Ingredients
10 oz. of warm water
4 tbsp. of sugar
4 tbsp. of olive oil
1 tsp. of salt
2 cups of white bread flour
1 cup of whole wheat flour
1 cup of multi-grain (or ten-grain) cereal
3 tsp. of gluten
3 tsp. of yeast

Add ingredients to the machine in the order I've laid up above. Put the machine in a two-pound cycle.

You might need to experiment and adjust the quantities of the ingredients to get the desired results.
  |  permalink   |   ( 3 / 629 )

Hybrid Power 
Friday, December 24, 2004, 8:48 PM
After eight months of waiting, I finally got the phone call. There is a Prius due to arrive at a local dealership in town, the lady on the phone said, and my name floated to the top of the list.

From the research I did, a lot of people seem to go for the highest end option. For me, this will be a Monday through Friday, get me to and from work car. So things like DVD navigation, voice recognition, etc., are not important to me. As cool as these features may be, I am just not willing to fork out the extra money for them. The important things to me are comfort, safety, and fuel economy.

The car that will be mine has the middle-of-the-road package featuring the smart keyless entry, which is the one cool, convenient, and practical feature that I want. There is no anti-theft system, but the dealer will add one for me, at a cost. I wonder if it integrates well with the smart keyless entry system such that it won't be a nusance, or worse yet, negate the convenience of the smart keyless entry system. Perhaps more research is warranted.

If you know something about what I am talking about, feel free to enlighten me with a comment.
  |  permalink   |   ( 3 / 582 )

vi, jEdit, and Smultron 
Friday, December 24, 2004, 6:13 AM
Since my college days, my favorite default text editor has been vi. I even have a version of vi installed on my Windows machines because ... well, it's so much better than Notepad.

After I installed Mac OS X, I also began to use vi (vim) a lot. However, vi on Mac OS X is restricted to the confines of a Terminal session, and the default installation doens't have the two features on my most wanted list: syntax highlighting and ftp.

These days syntax highlighting really helps reading the code easier, and with everything so connected in the 21st century, I often find myself needing to edit files stored on remote servers.

So, I found jEdit a couple of years ago, and have been using it whenever vi doesn't quite fit the bill. In addition to syntax highlighting, jEdit also sports some cool features such as tag completion for markup languages and the ability to edit files on remote servers via its FTP plug-in.

However, being a Java application, it can be a bit quirky, and it runs at a barely acceptable level on my Mac. On top of that, I find that jEdit runs very snappy on my Windows machines. Apple needs to do something about this....

In any case, I recently discovered Smultron. In the developer's own words:
Smultron is an open-source text editor written in Cocoa for Mac OS X Panther with many of the features that you might need. It features easy selection of the opened documents, line numbers, support for syntax colouring for many different languages, support for text encodings, code snippets, a toolbar, a status bar, HTML preview, multi-document find and replace with regular expressions, possibility to show invisible characters, authenticated saves, command-line utility, .Mac synchronisation of preferences and many more features.

I have been trying it out, and am liking it thus far. In fact, I used it to compose my last entry about compiling Freeciv. Smultron has syntax highlighting support and runs fast (relative to jEdit). While tag completion would be nice, the only thing I really want at the moment is built-in FTP support. If and when that feature is added, I will have to see about deprecating jEdit in favor of Smultron.

  |  permalink   |   ( 3 / 594 )

Compiling Freeciv for Mac OS X Panther 
Thursday, December 23, 2004, 5:35 PM
For those wondering how I built my Freeciv packages and how you might do the same, here's a quick write-up on how I compiled it from source. The contents below are written for someone with a development background. If this applies to you, or if you are simply curious, read on.

Requirements
  • Mac OS X Panther
  • BSD subsystem (installed by default)
  • X11
  • X11 SDK
  • Xcode (version 1.2 or 1.5)
  • DarwinPorts
  • Know your way around the command-line interface

Steps
  1. Make sure all Panther components are installed (the first five items in previous list)

  2. Install DarwinPorts. This will get you the port command, related documentation (man pages), and the port files. The DarwinPorts site has excellent documentation on installation, so I won't repeat them here.

    Alternatively, you can compile the Xaw client, which is supported by Apple's X11 installation. I used to build this client, but it is quirky and not Mac-like. If you want to go this route, skip this step and the step about installing components needed by the game client. Additionally, the bit about /opt/local/lib (near the end) doesn't apply as well.

  3. Download Freeciv 2.0.0 Beta 5 source code. I had trouble with the .tar.gz archive, so I used the .tar.bz2 one instead.

  4. Extract the archive, and read the INSTALL file at the top-levle directory of the archive. You can glean some information about how to build Freeciv for Mac OS X here.

  5. To build the Gtk+ 1.2 game client, we need to install the components, or ports, needed. Assuming you have DarwinPorts set up properly, you need to issue these port commands in the order provided:

    % sudo port install glib1
    % sudo port install gtk1
    % sudo port install imlib


    Freeciv requires these components in order to compile. These components in turn require other components, which will be automatically downloaded, compiled, and installed when you execute the above commands.

  6. Now, we are ready to configure the source tree for compilation. Using Terminal.app, navigate to the top-level directory of the source you've extracted from the archive, and type the following command (this is one long command). Note that the command is for C shell (csh or tcsh). You'll have to modify it appropriately if you are using another shell:

    % env CC="gcc -no-cpp-precomp" CFLAGS="-O3" \
    ./autogen.sh --with-included-gettext --disable-nls \
    --enable-client=gtk \
    --prefix=/Users/your_user_name/freeciv-2.0.0-beta5

  7. Now, we aredy to compile Freeciv. Issue the following command:

    % make

  8. If the make command terminated without any errors, issue the following command to install the executables and data files:

    % make install
If all went well, you should have a working installation of Freeciv in your home directory. You can launch the client by double-clicking on

/Users/your_user_name/freeciv-2.0.0-beta5/bin/civclient

from the Finder.

To run the server, you can do so from Terminal.app using this command:

% ~/freeciv-2.0.0-beta5/bin/civserver

Now, the installation you've just made has some limitations:
  • Location specific.

    This means if you rename the freeciv-2.0.0-beta-5 folder or move it to another place, it will fail to run. However, this can be overcome by setting the FREECIV_PATH environment variable to point to the share/freeciv subdirectory of wherever your installation is. My package, in fact, does this.

  • Hard-coded library paths.

    The required components you installed from DarwinPorts consist, among other things, dynamic libraries that are loaded at run-time. By default, they are installed in /opt/local/lib. This means when you run the game client, it is expecting to find the libraries it needs in that directory. This, too, can be overcome. But I will save this one for another day.

  • Uncertain multi-lingual suppport.

    I am not at all familiar on how to support languages other than English. You might want to leave out the --disable-nls option during the configuration step to see how that works out for you.
Hope this helps.
  |  permalink   |   ( 3 / 707 )


Back Next