REXML dabblings

Finally started doing some Ruby coding today. I’m writing a pedigree parser that takes an XML pedigree and outputs it to HTML, and so the natural first step was to see what Ruby’s XML capabilities are. REXML is cool. I’ve done a fair amount of XML work in .NET at my job, and in spite of the differences, I was able to figure the basics out in a very short amount of time. That’s more a statement about how good Ruby and REXML are than it is one about my skill as a coder. :) Anyway, I seem to have heard about other XML libraries in Ruby (which makes me wonder if REXML has hidden deficiencies that I’m unaware of), but I won’t worry about those until I reach REXML’s limits.

And Ruby’s a delight to code in. I think I’ve grokked the block concept (myarray.each { |e| print e }, for example) and iterators and stuff like that. Now it’s just a matter of taking all those ingredients in my head and baking them into some real code. Then the mastery will start to come, and that’s when the real fun starts. I want to start coding DSLs (domain-specific languages) in Ruby, by the way… Mmm.

Can I just say that I love TextMate? Being able to run Ruby code straight from the editor (both via ⌘-R for the separate results window and through Control-Shift-E right in the editor window) is amazingly nice. Sure, other IDEs have that as well, but TextMate is delicious and fun to use.

No comments yet

Leave a Reply