On Thu, Nov 09, 2006 at 10:47:40AM +0900, Pe?a, Botp wrote:
> :fr Mauricio Julio Fern?ndez Pradier
> # FastRI 0.1.0: faster, smarter RI docs for Ruby, DRb-enabled 
> btw, Mauricio, i installed using tar setup.rb in windows and it can't find
> fastri-server and fri. I had to rename both files by appending the .rb
> extension.

I'll try to fix that in one of setup.rb's hooks, I'm always bumping into it :)

> btw, how do i time it windows? use ruby and benchmark perhaps like,
> 
> time_start = Time.now
> system ARGV.join(" ")
> puts "#{Time.now - time_start} seconds"
> 

What about something like this:

$ cat runner.rb 
#!/usr/bin/env ruby

program = ARGV.shift

unless program
  puts <<E
ruby runner.rb <progname> [arguments]
E
  exit
end

found = false
t0    = Time.new

at_exit do
  tms = Process.times
  $stderr.puts <<EOF

real    #{Time.new - t0}
user    #{tms.cutime}
sys     #{tms.cstime}
EOF
end

system("ruby", "-S", program, *ARGV)

__END__


I don't know if cutime and cstime are meaningful on win32, though.

> feature request: i hope fri remove the case sensitivity.
> eg,
> 
> C:\Documents and Settings\pe?aijm>fri string.split
> nil

Seems convenient, I'll implement it.

-- 
Mauricio Fernandez  -   http://eigenclass.org   -  singular Ruby