Thousands of words on Ruby

I just finished a much-too-long series of essays on Ruby from a whole bunch of angles, some here might enjoy it: http://www.tbray.org/ongoing/When/200x/2006/08/17/JRuby

   -Tim

I found it interesting reading. It really felt like early explorations of the language. Here are some random thoughts I had while reading:

* There are multiple places to get XML escaping from the standard library, but since you are familiar with REXML I'll recommend: REXML::Text.normalize("Some & text < foo > \" bar")

* I really like that Ruby leaves the power to decide where to store code in our hands. Just to give random example of how this is cool, I purposefully keep my FasterCSV library in one long source file. When I'm working on some project and need to work with CSV, I drop the file in vendor/ and I'm all set.

* http://blog.grayproductions.net/articles/2006/06/13/do-i-need-these-parenthese

* A DSL is slightly more than method calls without parentheses. The idea is to adapt your language to the problem domain, so the solution is very naturally expressed in the language of the problem.

* For markup generation: have you tried Builder?

* The "helper methods" referred to in the quoted Markaby documentation are a Railsism. I suspect that's why you had trouble understanding the quote.

* I mean this in the nicest possible way, of course, but you're dead wrong about that IDE thing. :wink: I have a solution for each point you listed in TextMate and I would be shocked if you can't do similar things in emacs (the editor I believe you are using). I'm happy to post them, if there's interest.

* I'm looking forward to your Unicode talk. Just remember to start it with, "Ruby supports Unicode today." :wink: It really, really bugs me that everyone claims Ruby has no Unicode support. Don't be like them. As long as you get off to a good start like that, I'll be very interested in the rest of your talk and I won't lead the lynch mod your essay hints at.

James Edward Gray II

···

On Sep 6, 2006, at 4:40 PM, Tim Bray wrote:

I just finished a much-too-long series of essays on Ruby from a whole bunch of angles, some here might enjoy it: http://www.tbray.org/ongoing/When/200x/2006/08/17/JRuby

I would highly recommend autotest, which is part of ZenTest, to take
tdd to the next level. Autotest has your desired "one keystroke"
beat, as its zero keystrokes to run any test. It monitors your files
and automatically runs tests when it sees the tests or related files
changed.

I'm using it for rails work and its great. There are some minor
annoyances, such as not picking up integration tests or tests in /lib
correctly right now, but its not very hard to hack stuff into the
source.

- rob

···

On 9/6/06, Tim Bray <tbray@textuality.com> wrote:

I just finished a much-too-long series of essays on Ruby from a whole
bunch of angles, some here might enjoy it: http://www.tbray.org/
ongoing/When/200x/2006/08/17/JRuby

   -Tim

--
http://www.robsanheim.com


http://www.ajaxian.com

One more that came to me later:

* I like XPath, but some libraries do a neat job of allowing you to tree walk with Ruby. See Rubyful Soup and Hpricot for a couple of great examples.

James Edward Gray II

···

On Sep 7, 2006, at 9:22 AM, James Edward Gray II wrote:

Here are some random thoughts I had while reading: