*Coder Blog

Life, Technology, and Meteorology

Month: September 2004

Linksys NSLU2

In case you haven’t heard, Linksys recently released a “network storage link” called the NSLU2. Basically it’s a box that you can plug in up to two external USB 2.0 drives and it serves them out NAS style. The box is running a stripped down version of Linux, which gives hackers interesting opportunities to customize the NAS to do other things such as acting as a CVS server, a print server, or an iTunes music server for Airport Express devices.

I already have a file server here at the home office, but if I didn’t, this product looks pretty cool. $80 for an embedded Linux box is pretty cheap, and it has a reasonable 32Mb of RAM to work with. If you’re interested in reading more about hacking it, check out the 4 part series of Hacking the Linksys NSLU2 over on Toms Hardware. Also, check out the page Jim Buzbee (the author of the articles) dedicated to his hacking attempts here. He has some interesting dmesg and /proc listings displayed.

Traverse City

This past weekend, Katrina had a conference up in Traverse City and I decided to tag along since I have been wanting to see more of Michigan. We had a great time up there. It’s a very beautiful part of the state, especially now that it is autumn. They have a few wineries up there, but the area is famous for its cherries. They even combine the two with many wineries selling cherry wine. We bought a bottle but haven’t had a chance to try it yet. We also couldn’t leave without buying some cherry jam and of course some chocolate covered cherries. 🙂

On Sunday, we went to the Sleepy Bear Dunes. We went on a pretty good hike, and it was nice to feel some real sand beneath our feet again. It was almost like being back in Santa Barbara. There are about 4 square miles of dunes, which is nowhere near the size of the dunes in Oceano, CA, but they were still fairly large. The contrast of Michigan forest next to the dunes was pretty amazing, and the National Forest Service set up a nice scenic drive through the forest area bordering the dunes.

Anyway, if you are ever in the area, check out both the dunes and Traverse City. Later this fall, we are hoping to drive up to the Upper Peninsula as everyone has been telling us that the colors are amazing.

5 hours of my life…

Well, I just wasted about 5 hours of my life trying to figure out a problem I was having with frameworks, bundles, and my new app. There is a nice way to embed frameworks into an application, as shown in an excellent video tutorial by Jonathan “Wolf” Rentzsch. The problem comes when embedding a framework into a plug-in bundle. I went through the tutorial, except embedding the framework code into my bundle. Things compiled fine, but when I went to run my app, it choked and complained that it could not find a method in a class within the framework.

Unfortunately the debugger was kind of flaking out on me…it was stepping at blank lines without any code and returning out of functions early. This led me to believe that maybe the debugger wasn’t looking at the right code. I couldn’t for the life of me figure out what was going on though. I tried doing a clean build of everything, making sure the frameworks were being included in the bundle, and that the bundle was in the Plugins directory of the app. Everything checked out fine. So if the structure was set up fine, why wasn’t the correct code being executed? I ended up finding the problem was two-fold.

First, I had an old version of the framework I was trying to embed in my ~/Library/Frameworks directory. The old version contained the class I was trying to use, but the class didn’t have the method I was calling yet. I removed that file, and tried running the app again only to find that it couldn’t find the Framework it was looking for. Aha! That explains why the debugger was acting funky….but why isn’t it finding the framework that is included in the bundle?

After poking around a bit more, I came to the point where I set the installation path to “@executable_path/../Frameworks”. Apparently, when embedding a bundle, the @executable_path is set to the application path and not the bundle path. I suppose this makes sense, after all the bundle isn’t the primary executable…it’s just a dynamically loaded library. However, there is no linker definition for @bundle_path or something similar, so unless the bundle is always at a hard-coded path, there is no way to embed a framework into a bundle.

The work-around I ended up doing was just to embed all the frameworks I need directly into the application. This bothers me though, because I know some of the frameworks will only be used in a single bundle, so it doesn’t make sense for them to be embedded in the app and not the bundle.

Anyway, I’m posting this here in the hopes that I can save someone else hours of confusion. 🙂 If anyone knows of another way to embed frameworks into a bundle without hard-coded paths, send me an email.

A few belated updates…

I just wanted to point out a couple of apps that were updated in the past week or two. Both of these I use quite a bit, and get my highest recommendations.

The first is DesktopSweeper by Philippe Martin. I’ve been using this haxie since the first beta versions, and it’s definitely helped keep my desktop cleaner. Basically, it’s main function is to hide all of the icons on your desktop when you aren’t specifically in the Finder. When the Finder is your frontmost application, all of your icons are there, but when you switch away to do something else, DesktopSweeper will hide all the icons so they aren’t still cluttering your screen. It’s also nice because you can set a delay for how long to wait before hiding the icons. This makes it easy to be in the Finder, switch to another app to start a drag operation and drop it before the icons are hidden again. Version 1.1 was posted last week, so check it out.

The next app that I happen to be using right now is Blapp by Michael McCracken. Blapp is an app for all those bloggers out there using Blosxom. Editing is done in a nice split window where you can edit the source of the blog entry and see it rendered in HTML in real time on the other side of the window. Everything is made very robust, and setting up the configuration to sync with your blog is easy. Here is a link to the official Blapp page, but there isn’t an updated link to the version 7 download, so I included the link above where you can download the latest.

© 2017 *Coder Blog

Theme by Anders NorenUp ↑