February 20 2008
The Problem I find Ruby's current warning system, if you can call it that, lacking. Warnings are controlled by the -W flag on the command line, and are generated via the Kernel#warn method within code. There are a host of... read moreJanuary 27 2008
With the addition of Java Native Access (JNA) to JRuby, systems programmers using JRuby now have greater flexibility in terms of interfacing with underlying operating system. Some Ruby users are familiar with the 'Win32API' library that ships as part of... read moreJanuary 25 2008
With the addition of Java Native Access (JNA) to JRuby, systems programmers using JRuby now have greater flexibility in terms of interfacing with underlying operating system. Some Ruby users are familiar with the ‘Win32API’ library that ships as part of the Ruby standard library. That library lets you interface with… read moreNovember 22 2007
Got a favorite gem you want to tell the world about? Or one you want to warn other people about? You can do both with Gemtacular! Gemtacular (http://www.gemtacular.com) is a place to rate and review Ruby gems. It’s a great place to not only find opinions on various gems, but also… read moreNovember 01 2007
Did you know you can do this with Ruby out of the box? # A real lambda λ { puts ‘Hello’ }.call => ‘Hello’ # Sigma - sum of all elements ∑(1,2,3) => 6 # Square root √ 49 => 7.0 How difficult was this to implement? Keep reading! # Be sure to run with the "-Ku"… read moreOctober 31 2007
Did you know you can do this with Ruby out of the box? # A real lambda λ { puts ‘Hello’ }.call => ‘Hello’ # Sigma - sum of all elements ∑ [1,2,3] => 6 # Square root √ 49 => 7.0 How difficult was this to implement? Keep reading! # Be sure to run with the… read moreSeptember 26 2007
This is a short followup to my last post where I compared library RubyForge statistics against CPAN. This week I compare RubyForge against…the Ruby Application Archive! Yes, I know, the RAA is just a listing service and RubyForge is not. That’s not the point. Please read on. In the last post I… read moreSeptember 26 2007
It’s often been said that Perl’s greatest strength is CPAN, Perl’s vast collection of free libraries contributed by developers from around the world. Recently I started to wonder about RubyForge and how RubyForge stacks up against CPAN in general.1 First, length of service. CPAN has been around for 12 years (October… read moreSeptember 19 2007
It’s often been said that Perl’s greatest strength is CPAN, Perl’s vast collection of free libraries contributed by developers from around the world. Recently I started to wonder about RubyForge and how RubyForge stacks up against CPAN in general.1 First, length of service. CPAN has been around for 12 years (October… read moreMay 23 2007
At RailsConf 2007 DHH mentioned that Rails 2.0 would support query caching on the client side in order to speed up AR. I immediately thought to myself, “Huh? Why do it on the client side when the database server will handle that?”. The answer is that ActiveRecord (AR) doesn’t support bind… read moreRuby code that will swallow your soul!
April 11 2007
There is Ruby code no mortal being is meant to see, let alone use, for it is pure evil. If you wish to save your immortal soul, then read no further! *SIGH* - Don’t say I didn’t warn you. Since your soul is doomed anyway, I’ll let you in on some of… read moreC extension authors: use rb_scan_args(); don't count argc
April 04 2007
If you’re writing a C extension for Ruby, and you’ve got method that has optional arguments, be sure to use rb_scan_args(). Do not count argc. Read on if you want to know why. First, let’s start with an example of bad code: /* Example 1 */ static VALUE my_func(int argc, VALUE* argv,… read moreGoodbye Document-class! (And other RDoc improvements)
March 28 2007
Over the last couple of Ruby releases I’ve made some improvements (with Eric Hodel’s help and blessing) to RDoc for C extensions that I thought I would share with you. If you write C extensions with Ruby then keep reading. If you don’t do C and/or don’t care that much… read more