Archive for the “Programming” Category


If you haven’t tried Growl yet, I strongly encourage you to do so.

What is it, you ask? It’s an open-source centralized notification system for Mac OS X applications, allowing applications to have consistent, non-interfering notifications that are fully user-customizable with very little effort. And it supports a display plugin architecture which means that if one person creates a new display for Growl notifications, all applications can benefit. Only a small number of applications currently support Growl, but that number is growing.

One of the really nice things about Growl is the level of developer support it has. It’s possible to use Growl from Cocoa, Carbon, python, perl, tcl, and AppleScript, and there’s nothing to stop bindings for other languages from being created.

Anyway, if you want to see some docs or screenshots, just head on over to their web site

Comments No Comments »

Recently I’ve been trying to come up with an idea for a shareware Cocoa program that I could write. I can come up with some decent freeware ideas, but I want to make money for once. So this is a plea to the 2 or 3 readers I have: if you can think of a decent shareware idea, please contribute! I’ll put your name in the credits ;)

Comments No Comments »

I’ve just made another enhancement to Pythonica. It now supports lists and slices a la Mathematica.

This change was inspired by a conversation with Arteum Bochevarov, who is also working on expanding Pythonica. Hopefully we can merge our versions together.

Comments No Comments »

Joe Strout posted recent on the RB Network Users Group list about a cool project he did a while ago called Pythonica (in the context of symbolic evaluation). While Pythonica is a bit out of date (the page last updated in ’97), it’s still pretty nifty.

Pythonica is a symbolic evaluation program written in Python. It’s loosely based off of Mathematica and is a really good start. It’s missing a lot and it’s weak in other areas, but it’s still fun to play around with and can be extended.

Anyway, over the last couple of days I’ve been updating it a bit (replacing uses of the regex module with re, removing some deprecated uses of the string module, etc) and improving it. I’ve implemented some new functions (Sin/Cos/Tan/ASin/ACos/ATan/Rad2Deg/Deg2Rad), added a couple of default symbols (pi and e), and fixed some bugs (for example, Sin[pi/4] used to produce Sin[pi,4] instead of Sin[Divide[pi,4]]). At some point I’m probably going to start re-writing some of the internals to support some things Joe suggests on his page.

Anyway, Pythonica is pretty cool and a decent example of Python code. If you like Python, you should check it out.

I’m now maintaining Pythonica. Joe Strout doesn’t want to maintain it any longer ;) You can find my page at http://www.tildesoft.com/Pythonica.html

Comments No Comments »

There is a company called Freshly Squeezed Software. They have a few products available, and an upcoming one called PulpFiction. PulpFiction is a news aggregator that supports RSS and Atom. And I’ve been beta testing it. It’s a decent newsreader, but I’m not going to buy it, nor am I ever going to purchase anything from Freshly Squeezed Software. If you want to know why, continue reading.

(more…)

Comments No Comments »

It’s been a while since I’ve posted anything, I know. I really should start posting again. I just don’t have much to talk about. Here’s an update on my current status:

Colloquy

Colloquy is a Mac OS X IRC client. It’s not as powerful as some others, notably X-Chat Aqua, but it’s the only one that’s actually well-designed from a UI standpoint (it looks like an Aqua IRC client should look). Colloquy is also really nice from a code standpoint. For instance, the way it does Styles. It has several different styles, and they all look fairly different. The way it’s done is everything is rendered in a WebView using Safari’s WebKit. It translates the IRC traffic into an XML log and uses XSLT to translate the log into an XHTML document and renders that in the WebView. For new messages it uses JavaScript to append the message to the end of the document. This makes it really flexible and really powerful. Here’s a screenshot of my favorite style, called Meinzer:

(more…)

Comments No Comments »

Well, I’ve been busy lately. I finally re-installed CodeWarrior and I’ve spent the entire day working on plugins! I reorganized Norman Palardy’s GZip Plugin and re-wrote a good portion of it, as well as adding a bunch of stuff. That’s almost ready for release. And, in response to a request by Seth Willits, I’ve also created a plugin to fetch the icon for a given FolderItem. This one requires OS X, but that’s all Seth needs. Too bad he’s been offline all day, so I haven’t been able to give it to him!

I’ve also started reading up on the Speech Recognition Manager in the hopes that I can create a plugin to give access to that (since Will Cosgrove’s Speech Recognition Plugin doesn’t support RB v5.5). However, the documentation shows it to be fairly complex. Hopefully it won’t be too hard.

Comments No Comments »

Yesterday I finally got modpython working with the help of the friendly folks on the modpython mailing list. And then I started fooling around with a script I’m calling index.py. Eventually I’ll turn this into a template system for my new website (once I finally get off my butt and design myself one). But for now, I was just playing around, learning how to do stuff with this. So, to learn, I made myself a routine that duplicates the built-in FancyIndexing feature (you know, where you type in a directory that doesn’t have an index file and it displays a list of all the files, with icons and information). It duplicates everything except the Description column and sortable headers. Other than that, it looks identical to the real thing, even down to the spacing of elements and the icons (hell, I went to the trouble of parsing the server config for the AddIcon and AddIconByType and DefaultIcon directives just to get the icons right!). Later I’ll add the Description column and, hopefully, sortable headers. Then it will look exactly the same. The only way to tell the difference will be to look at the source, where you’ll see a much nicer-looking source than the built-in indexing feature.

The other facet of my script is anything accessed from inside that directory is funnelled through the script, i.e. the script is given the filename and it opens it and gets the content-type and outputs the contents of the file. The point of this, of course, is for the templating system, but for now it’s just for fun.

If you want to try it, just go here.

Please note that this address is only valid if my computer is plugged in at college. I’m going home Thursday, and at that point I’ll attempt to get a new URL for my computer
The URL is no longer valid

Comments No Comments »

Because I kept releasing updates to Rendezvous Browser, I wanted to make it really easy to update my DMG and upload it to the server. To that end, I created a shell script that does exactly that. However, it took a while to get it just right because there were a few problems.

The biggest problem was that every time I updated my DMG and converted it to compressed format, the size would change. It would end up anywhere from 200-600kb. I think the problem was the Disk Image framework doesn’t know anything about HFS+, so space marked as unused by HFS+ but not actually deleted was still being stored in the disk image. The only way to fix this was to create a brand new disk image every time.

The problem with creating a brand new disk image was I had icon placement and a background image that I wanted to keep. However, this wouldn’t work when just copying a folder since the view options of the folder are stored in the .DSStore of the parent folder. A real pain. The only solution I could find was to create a DMG that I used as the source folder, since a volume root stores its view options in its own DSStore. Then I had to scrub the resulting DMG of all the extraneous files and information pertaining to the HFS+ format, otherwise the DMG would break if I tried to open it without the source DMG present since it had information on it pertaining to the source DMG. Luckily, hdiutil has a -scrub option that does exactly that.

After getting it all perfect, my resulting DMG size is 128k. A huge drop from what I was previously offering. And my shell script works great! I compile the app, open the terminal, and type updateRB and it automatically creates the new DMG and uploads it to the server. Additionally, I can supply a different name to use than what it defaults to, in case I want to upload a pre-release version without replacing the previous release. And lastly, I can provide a switch which prevents it from uploading, in case I want to have the resulting DMG without putting it on the server (granted, this option isn’t so useful now that the DMG size isn’t fluctuating wildly with each update).

It’s also pretty easy to adapt to any other program, since I keep the names and paths of everything in variables at the top of the script. Anybody interested in using it for their own program? You can download it here.

Comments No Comments »

Recently I got an email from Ricardo Batista, the owner of MacShareware.net. He had a pre-release version of a new SDK for doing automatic updates on software sites. The only site to support this so far is MacShareware.net, but there’s hope that MacUpdate and VersionTracker will adopt this new format. Basically, it consists of a plist file with a specific set of keys and values, and these values are used for updating programs. The software site scans all known MacPAD files every few hours, and when it detects a change it updates its listing for that program. That way, you change the MacPAD file and in a few hours, the software sites have your update automatically. No more visiting each site and updating the listing there.

The other goal of the MacPAD file format is to give developers an easy way of adding version checking to their program. They can simply download the file and compare versions to see if there’s a new version. To this end, a PHP script was included that does the check, along with a snippet of C code that calls this script via the ‘php’ command-line process. Of course, this is a pretty ugly way to do this, but Ricardo just didn’t have the time yet to write up proper C code, and he already had the PHP. To this end, I have written REALbasic code to do the checking natively, and it works quite well. I sent the code to Ricardo (he knew I was writing it, as I offered to do so when he sent me the SDK). I sent the RB code to him and hopefully it will show up in the official release of the SDK tomorrow.

Perhaps next I should write some Cocoa code that does the same thing?

Comments No Comments »