Archive for the ‘Ruby’ Category

Rails Studio - Chicago

Wednesday, January 18th, 2006

The fine Ruby loving gentlemen at the Pragmatic Studio have just announced a Chicago based studio for February 16-18th.

This is just a note that I am planning on attending this studio and look forward to meeting others in the Ruby community. While I feel pretty proficient in Rails already (our intranet is heavily dependent on a few internal Rails applications), some of the newer things that have emerged in the last few releases have slipped past me and I haven’t been able to keep up. Plus, why not spend a few days away from work on the company’s dime, ya know?

I also will be available to sign virtual PDF based autographs on your favorite QtRuby PDF book. :)

Gentoo Ruby updates

Monday, January 2nd, 2006

I added a hack to rubygems-0.8.11-r1 which added the RUBYOPT=”-rubygems” environment variable to a user’s profile. The reason for this is that when installing packages via gem (which more and more of our packages do), a normal Ruby ‘require’ doesn’t find it, unless you’ve loaded rubygems first. This hack helped remedy that.

Except it broke for people running Ruby 1.9, because rubygems wasn’t explicitly installed for them. And we can’t make it install for them, because it doesn’t install cleanly (at least for now).

So, instead I’ve tried out a new approach. I modified dev-ruby/ruby-config (to version 0.3.2) to allow for more characters in a configurable Ruby version, and added a rubygems-0.8.11-r3 which installs a /usr/bin/ruby18_with_gems, that does this:

RUBYOPT=”-rubygems” /usr/bin/ruby18 “$@”

After installing rubygems it prompts you to run ruby-config and set your new Ruby version to “ruby18_with_gems”. Doing so will automatically get rubygems loaded and you don’t have to worry about it when doing a ‘require’.

As always, feedback via bugs.gentoo.org is appreciated.

QtRuby update

Sunday, January 1st, 2006

I’ve uploaded a QtRuby 1.0.11 to RubyForge, which should bring the whole thing up to date with all of the changes that have taken place in the past few months. Since there seemed to be some issues with 1.0.10, I used 1.0.9 as a basis for the update - hence, there shouldn’t be any issues with it. Please let me know if there are. I’ll update korundum later as well, but I can’t get it checked out of the subversion tree right now for some reason.

For the OS X folks out there, Reuben Grinberg has put together his steps for getting it installed - in case that proves helpful.

Still not using QtRuby? You should make it your new year’s resolution to learn! I hear that the Prag Progs have a great tutorial on it.

TT: , , .

3 OO Languages, 2 duelings Bruces, and DHH in a pear tree

Monday, December 19th, 2005

So DHH has posted his thoughts into the mild back and forth going on between Bruce Tate and Bruce Eckel over Java and Ruby, with a little Perl/Python throw in the mix.

I won’t stand in their way, because I figure they know a lot more about what they’re talking about than I do. And healthy debate is a good thing.

But I will throw this in. Technical merits and whatnot and hoo-hah aside, I think there’s one aspect that’s being overlooked here - and that is how you feel after learning a bit of Ruby and writing your first program. It’s empowering. It’s like paying off a big loan early. It’s very satisfying.

Lots of people come to ruby-talk and say “wow, this is neat. I like this a lot. It makes me happy.”. I’ve never heard anyone say that of Java. Sure, after they’re done writing their program and get their paycheck and go to the bar for a drink they may think about being happy, but you sure don’t hear about the happiness during the process in Java like you do in Ruby.

And that’s at least 50% of what this is all about, right? Being happy at what you’re doing. It seems to me like the bickering over .getLast(size+1) vs .last is a bit trivial in its implementation form, and the whole “well if you had used a linkedlist instead of a non-linkedlist you would have found that the performance issue has been replaced from O(log(2n+theta)) to O(-2*pi*cos(phi)).

But I don’t care. It’s good that people out there in the world are debating naming schemes and design and what’s optimal. In the meantime, I’ll stick to writing programs that work, that look nice, and that make me happy while doing it.

Technorati Tags: ,

Ruby concerns

Sunday, December 18th, 2005

I previously wrote about my concerns of changes made between Ruby 1.8.2 and 1.8.3. Daniel Berger responded with some of his concerns as well.

Now, Ryan Davis and James Edward Gray have both spoken up about their concerns for similar changes. I except more to follow as well.

This kind of criticism is good and healthy. We want to see Ruby succeed and become an even better language. In particular, we don’t want to see mistakes being made that may have a negative effect on the perception of the language itself.

A lot of us now have a vested interest in how Ruby works. Aside from the masses of people now working on Rails, a lot of us use key pieces of Ruby code in our business ventures. My company, for one, thrives on Ruby code that I have written. In particular, one key workstation running some custom QtRuby code that I have created generates about $350US per hour in revenue. That is not an insignificant amount of money. And, unfortunately, it will continue running Ruby 1.8.2 for the foreseeable future, as I’m not willing to stake my reputation on a botched upgrade.

I personally think that the “fixes” we’ve seen in 1.8.3 and 1.8.4 are fixes, they’ve just been fixed in the wrong place. In my experience, people have an expectation that the progression of 1.8.1 -> 1.8.2 -> 1.8.3 -> … is for bug fixes only, but any existing code will continue to function exactly as it has before. Unfortunately this isn’t the case. The problems ARE fixable, by reverting back to their previous normal behavior for 1.8.4/5 and instead putting the “fixes” into another branch.

I just hope more people voice their opinions on the matter.

Technorati Tags: ,