From: intc_ctor@... (Phil Tomson) Date: 2004-01-29T02:59:54+09:00 Subject: Re: rjni Mauricio Fern�ndez wrote in message news:<20040127203721.GA1823@student.ei.uni-stuttgart.de>... > On Wed, Jan 28, 2004 at 03:09:56AM +0900, Phil Tomson wrote: > > Please _do_ release it. Perhaps you won't be having time to work on > > it in the future, but others may want to work on it. In fact if you > > don't think you'll be having time to work on it that's all the more > > I have to confess it's not a matter of time -- it's just that I'm facing > the need to rewrite it all in C (for performance) and frankly that's no > fun :-| Would it be premature optimization? In other words, do you have all the functionality you need with Ruby code yet? If you don't rewrite in C is the performance in Ruby acceptable? I think in most cases performance is probably acceptable. In cases like this, I (as a user) like having the option of using the pure Ruby implementation if possible because I'm not always in a position to compile the extension. So I would recommend that when you do the rewrite in C that you not actually replace the Ruby code, but offer it as an option. for example: begin require 'rjni.so' #try for the C implementation first rescue LoadError require 'rjni.rb' #if it's not available use the ruby implementation end Or, perhaps for the time being while you're implementing parts of it in C you could do something like: require 'rjni.rb' begin require 'rjni_speedup.so' rescue LoadError puts "no speed up available for now; going with pure Ruby implementation" end Where rjni_speedup.so contains the C implementations for various methods that could benefit from a C implementation. That way you don't have to think that you need to rewrite everything over in C before you can release, you can release small chunks of C implementation as you have time. > > I'll clean it a bit, add some docs and release it as another technology > preview. cool. Phil