Archive for the ‘Java’ Category

java readline for OS X post updated

Tuesday, May 17th, 2005

I’ve updated my post on getting java readline working with OS X. Some derivation of readline now seems to be included with Tiger (10.4), and that makes it important to put /opt/local/lib before /usr/lib in the library path.

Updated Java bundle for TextMate

Sunday, January 2nd, 2005

I spent some time today integrating contributions to my Java bundle from a fellow TextMate user. I added a new template for Java interfaces and a number of snippets and commands for code generation.

I continue to love the powerful simplicity of TM.

Cool Tools: XPE

Thursday, September 16th, 2004
I recently discovered the joy of XPath, thanks to a talk at one of the IndyJUG meetings a couple of months ago. Once I got the most basic of grasps on XPath queries, I was able to start churning out some pretty slick scraped RSS feeds for things like Pollstar artist and city searches, eBay searches, Iconfactory and Konfabulator recent updates, and a bunch of others. Actually, that little project’s a good showcase of a couple of my favorite tools, Henplus and Tagsoup. Anyway, one of the biggest difficulties I ran into was visualizing the results of XPath queries without having to dump the results with an XSL stylesheet, which was a less-than-elegant solution. After a bit of Googling, I came up with a tool called XPE. It's the only "free" (for any definition of free) tool I’ve found so far that allows me to evalue XPath statements and see their affect on a document. XPE isn't terribly fancy in the interface department, and can be a little sluggish at times, but it is extremely effective. The default view on startup is a graphical tree representation of the nodes in the loaded XML document. When you evaluate an XPath, XPE highlights the matched elements (but not text nodes) and expands the short-format to it's fully-qualified (and durn ugly, I might add) form.
All in all, a very nice Open Sourced tool (BSD license).

Prepare to walk the plank!

Wednesday, September 1st, 2004

In my copious free time ™, I worked up a quick Blojsom plugin filter based on Dougal’s text filter suite for WordPress, which happens to include a Talk Like a Pirate filter. It’s a fairly simple concept, but, as usual, I went a little overboard. In order to avoid unintentionally piratizing links and other non-text elements in an entry, I used tagsoup and some XPath queries (thanks to Xalan ) to iterate over the text nodes. This took me a few hours to whack out, but I’m sure it would have taken a few more to come up with regular expressions to match non-tags.

There’re both binary and source tarballs available. The binary contains three JARs that you drop in Blojsom’s WEB-INF/lib directory (tlap.jar, tagsoup.jar, and xalan.jar). Do the usual enable-plugin jig (arrr=org.bravo5.tlap.TLAPFilter in plugin.properties) and add “arrr” to the plugin chain for your favorite flavor (vanilla! yummy!).

Please be aware that this is walk-the-plank-ware. That means if you try to come back at me when it makes your computer go kablooie, I don’t want to hear it. I know it’s alpha (at best), and frankly, it compiled and ran the first time (mostly), so you just know something’s broken… I’ll update this entry as progress … er … progresses.

Some people, when confronted with a problem, think “I know, I’ll use regular expressions.” Now they have two problems.—jwz

update

The source is now in my Subversion repository