Find your next scenic drive!

June 24, 2006

Installing SuSE Linux 10.1...

SuSE Linux 10.1 has been recently released and it is freely available via OpenSuSE. I opted for purchasing the DVD's, though, and I just received them earlier this week.

The only part that I really dislike about Fedora and SuSE's installation procedure is that you have to shutdown the machine for anywhere between 30 minutes and 2 hours depending on how much you are paying attention to the installation process; because of this, you'll probably see this site down an hour sometime in the upcoming couple of weeks.

Last night, I decided to upgrade one of my workstations from 10.0 to 10.1, and the process went very smoothly... until the end. At the end, it wanted to configure the on-line update and to do this, it opened up Mozilla so I could go through the registration form. After filling out the form, it said that it was successful and that was it; it did not feel very well integrated, since it did not tell me what the next step was. I assumed that it was to close the window, however, the setup program just kept on insisting to open up Mozilla and have me repeat the process, until I eventually just gave up configuring the on-line updater and clicked Cancel. This ended up being the final step, and then I logged into my machine.

I then proceeded to attempt to update my machine, however, the YaST Online Update (YOU) was quite insistent that there were no updates, to which I was a little surprised since in each SuSE release that I have installed thus far, there have always been some updates afterwards. So I decided to start playing with my machine and to figure that out later, and this is when I started noticing my problem: when I started up Thunderbird and Firefox, I got a segmentation fault, but I tend not to use the SuSE default Firefox and Thunderbird, so I initially thought it was a problem with those, so then I tried the SuSE default Firefox, only to get the same results:

  • eyt@zaterdag 1$ firefox
  • /usr/bin/firefox: line 159: 11151 Segmentation fault $AOSS $MOZ_PROGRAM $@

After searching, I found that there were updates, and that this was probably one of them. Installing the BASH one really did not help any, so I then shifted my efforts to getting the Online Update to work properly.

After many failed attempts, I fell onto this which led me to resolving my problem. The deal is that with previous versions of YOU, you used to only use one source for updates, but with the new version, it works closer to how Cygwin's installer works, in that you can get put in multiple update sites for different applications. This is pretty cool, however, it is unfortunate that it does not make adding the default SuSE sites easier to set up. As such, here is what you have to do:

  1. Start yast2, under Software, select Installation Source.
  2. Once initialized, select Add, HTTP and enter these sites:
    Server NameDirectory on ServerNotes
    suse.cs.utah.edususe/update/10.1/Or another mirror
  3. Once those are added, make sure that Status and Refresh are on for these sites. If they are not, select them, and then click the appropriate button in the lower right-hand corner.
  4. Next click Finish. This will take several minutes to complete, or at least it does the first time

Once that was done, the Software Updater icon turned into an orange exclamation mark, so I proceeded to tell it to update everything. After a few moments, it errored out with:

  • Establishing script:libzypp-patch-zmdrestart.sh-2-1533-1.noarch[20060624-115231]
  • This would invalidate script:libzypp-patch-zmdrestart.sh-2-1533-1.noarch[20060624-115231].
  • Marking this resolution attempt as invalid.

Because I had manually installed a few packages in prior to this, I thought that I would try selecting packages around this problem, but to no avail. As a final attempt, I went into YaST2, and selected Online Update from Software, and after it initialized, it downloaded a bunch of patches, one of which included some updated YOU. This required YOU to be restarted, and then it continued to download a bunch of packages.

And after all that, I am now able to start Mozilla Thunderbird and Mozilla Firefox without any segmentation faults. And besides that experience, I am so far very pleased with the changes in SuSE Linux 10.1, particularly with the look and feel, but I've only been using it for a couple hours now.

June 10, 2006

.NET and loading assemblies for other platforms...

If you are working with .NET, and you see the following exception:

TypeLoadException: Method 'Dispose' in type 'eSQL.SqlConnection' from assembly 'eSQLNet, Version=2.9.2056.14469, Culture=neutral, PublicKeyToken=null' does not have an implementation

Make sure that the .NET assembly you are referencing (eSQL in this case) is for your current platform.

In the case depicted above, I had accidentally selected the ARM version of the eSQL DLL instead of the x86 version. Unfortunately, however, the exception message above does not exactly say that. It would have been nicer to have gotten a message that would have said something about the assembly not being compiled for the current platform...

June 7, 2006

Adding the comment URL to bBlog's RSS 2.0 Feeds...

The default bBlog RSS 2.0 feed template does not present the user with a link to the comments page. Although this is easily derived, some RSS readers can do some funky stuff with this information. It turns out that adding this is extremely easy. Simply do the following:

  1. Change the current directory to your bBlog directory
  2. Edit bblog/inc/admin_templates/rss20.html.
  3. Search for the guid tag, and you should see something like:
    • ...
    • <guid isPermaLink="true">{$post.permalink}</guid>
    • <title>{$post.title|htmlspecialchars}</title>
    • <link>{$post.permalink}</link>
    • <comments>{$post.permalink}#comments</comments>
    • {if strlen($post.author.email) > 0}
    • ...
  4. The line in bold above is the one you should add in.
  5. Save, and enjoy!

Or just take a short cut to all this and snag mine. Let me know if there's anything.

June 4, 2006

Introducing ReallySimpleSnagger Version 0.1beta...

After a few months of development and testing, I am pleased to introduce ReallySimpleSnagger version 0.1beta.

ReallySimpleSnagger is an off-line Atom, OPML, and RSS reader. What most feed readers do is only read the information in the feed itself, and unfortunately, most feeds only contain a small snippet of the actual article, and they only gather images if you are actually on-line.

ReallySimpleSnagger, on the other hand, downloads the the feed and all the referenced content in the feed, including the articles, images, and everything required to make your off-line experience almost indistinguishable from your on-line experience.

Once that ReallySimpleSnagger has downloaded this content, you can simply either use the content directly or copy the content onto a device, such as a Palm or Pocket PC/Windows Mobile device and use a standard web browsers to view the content.

If you are using a Pocket PC/Windows Mobile device, ReallySimpleSnagger comes with a service that uses ActiveSync to synchronize the content between your desktop and mobile device. But even if you do not have a Pocket PC or Windows Mobile device, our documentation will walk you through how to manage your content effectively.

This version is a stable beta version that is provided free of charge (this may change in the future). I am particularly interested in hearing about any bugs that you may find and what you think would make it a better product.

June 1, 2006

C++ and finally

Almost two months ago, Danny Kalev wrote a piece regarding adding finally to C++. Unlike Danny, however, I think this is a great addition to C++.

Danny has a good point that part of the reason that finally exists in garbage collected languages is that they lack a destruction mechanism that allows for cleaning up. For example, a common use of finally in Java is with files, sockets, and other such resources to ensure that the resource is guaranteed to be released (since the finalizer is not guaranteed to be ran). In C#, this could be done via the using keyword and hopefully in a future release on Java, a similar mechanism will exist that would allow the same behaviour.

But I think that there is a certain amount of value to adding such a feature to the language. For example, if you wanted to have a code segment display a log message at the end of a method, you would need to do something like:

  • class Trace {
  • public:
  •  Trace() {
  •     // ... maybe display something or grab a statistics
  • }
  •  ~Trace() {
  •     // ... log something or accumulate
  • }
  • void myFunc() {
  •   try {
  •     Trace t;
  •     // ... do something
  •   } catch ( ... ) {
  •     // ... handle it
  •   }
  • }

For a general purpose tracing class, this would be, by far, the best approach. But for a specific operation that is done for one specific method, I think that the code above is not as readable as the same code written using a finally, even in the case where the statements in the finally explicitly call a function.

Said another way, the for keyword is equally redundant, since the 1998 C++ ISO Standard states in section 6.5.3 that the statement for ( for-init-statement ; condition ; expression ) statement is equivalent to:

  • {
  •   for-init-statement
  •   while ( condition ) {
  •     statement
  •     expression ;
  •   }
  • }

But while the latter is equivalent to the former, there is a certain readability value that comes with the for statement that it is a welcomed keyword.

I feel that the addition of the finally keyword would have the same benefits. It is easily implemented in terms of existing infrastructure quite similar to the for example above is. It has adds increased readability, particularly for cases where the creation of a class would consume many more lines than a line or two in a finally block. Lastly, I think that there is a huge benefit to people using C++ that are accustomed to using other languages; the familiarity with this feature would permit such developers to concentrate on other, more important C++ features instead of trying to figure out how to get around the perceived lack of this feature. I think these benefits outweigh the cons of adding a new keyword, and I welcome the change.