Archive for February 8th, 2006

Whatever … for Dummies

Some time ago, I used Ajax for Dummies as a post title. Not only that, I also reproduced, with some changes, the cover of a Wiley “For Dummies” book. Now I’m wondering: Will I get a slap on the wrist like Jason did?

Mr. Wiley, can I have my own little letter from your “Trademark Coordinator”, please? I will bitch and moan for a while on my weblog, just hoping to get some nice incoming links, then I will dutifully comply. I promise.

Ruby for Java Programmers, Part IV

In the previous installments of this series, I did some experiments trying to make Java and Ruby coexist by using two bridges: rjb and YAJB. This time, I’m going to try to solve the same problem using JRuby.

JRuby is not simply a bridge, it is a “1.8.2 compatible Ruby interpreter written in 100% pure Java”. As it is written in Java and consequently runs on the JVM, it should provide a much better integration. At the very least, it allows you to use some typical Ruby idioms when traversing Java collection classes, or accessing bean properties by name:

require 'java'

include_class 'Fetcher'

feed = Fetcher.fetch(ARGV[0])

feed.entries.each do | entry |
  p "#{entry.publishedDate} #{entry.title}"
end

Compare that to the sample I posted here.

You should be aware of a couple of limitations, though:

  • JRuby is not a complete implementation of Ruby. Some things are missing that, for instance, won’t allow you to run Rails on JRuby just yet. However, the development team seems to be progressing nicely along this road and supporting Rails is one of their foremost objectives.
  • Ruby extensions written in C will not be loaded. This is probably never going to change. If you need a particular C extension, you should try to find an alternative in pure Ruby or Java.

How to create a video podcast

A great tutorial on creating a video podcast … the French way. Might not be appropriate for a work environment, but then again who would want to work in a place where this is not appropriate? ;)

(Via Melablog.)