From: "Shot (Piotr Szotkowski)" Date: 2009-11-14T23:27:17+09:00 Subject: Re: Ruby Inline over two times slower under 1.9 than under 1.8? --1UWUbFP1cBYEclgG Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable First, thanks a lot to you and Ryan Davis for all your great help! I feel really ungrateful, using your work and not being able to repay you in any way, only coming up with problems instead. I hope some day to be much more on the giving end of the community. Roger Pack: > Shot (Piotr Szotkowski) wrote: >> =E2=80=A6and who can=E2=80=99t, for some reason, get the canonical examp= le >> from http://zenspider.com/ZSS/Products/RubyInline/ to work. > here's a working example (well worked once upon a time). > http://betterlogic.com/roger/?p=3D1849 $ gem which ruby_to_ruby_c (checking gem RubyToC-1.0.0.5 for ruby_to_ruby_c) /home/shot/opt/ruby-1.8.7-svn/lib/ruby/gems/1.8/gems/RubyToC-1.0.0.5/lib/ru= by_to_ruby_c.rb Fortunately, I noticed the 1.0.0.5 version not matching 1.0.0.7 in the example and cd-ed to /home/shot/opt/ruby-1.8.7-svn/lib/ruby/gems/1.8/gems/ruby2c-1.0.0.7 instead. Still, with RubyToC being higher on the gem searchpath (?): >> RubyParser.new.parse(File.read 'hello.rb') NoMethodError: undefined method `clear' for nil:NilClass from /home/shot/opt/ruby-1.8.7-svn/lib/ruby/gems/1.8/gems/ruby_parser-2.0= =2E4/lib/ruby_parser_extras.rb:938:in `reset' from /home/shot/opt/ruby-1.8.7-svn/lib/ruby/gems/1.8/gems/ruby_parser-2.0= =2E4/lib/ruby_parser_extras.rb:766:in `reset' from /home/shot/opt/ruby-1.8.7-svn/lib/ruby/gems/1.8/gems/ruby_parser-2.0= =2E4/lib/ruby_parser_extras.rb:345:in `initialize' from (irb):5:in `new' from (irb):5 After uninstalling RubyToC (and, I assume, ruby_parser falling back to ruby2c) the above blog example works, both in 1.8.7-p202+r22308 and 1.9.1-p243+r22308. Is there a =E2=80=98conflicts=E2=80=99 flag for gems= , so that ruby_parser can specify that it (as far as I understand) works with ruby2c 1.0.0.7 but not with RubyToC 1.0.0.5? > The disadvantage to ruby2c seems to be that it only works > for methods that "appear" to take floats and int [?] I haven=E2=80=99t yet checked this, but I=E2=80=99ll check and report once/= if I end up going down this road. After experimenting a bit with all these nice automagic approaches I think I=E2=80=99ll end up with either a good old D extension or hand-coded inline C, as I=E2=80=99d really prefer something = that =E2=80=98just works=E2=80=99 in 1.9 MRI (and JRuby is not there yet with 1.= 9 support, unfortunately =E2=80=93 although I=E2=80=99ll give it one more chance). :) >> Checked it and it does seem to work under my hand-compiled >> 1.8.7-p202+r22308, but an attempt to install it under >> 1.9.1-p243+r22308 first ended in it trying to look for > Wow you're the first to ever even try it out > besides myself. Yeah not 1.9 compat yet [sorry]. Ah, ok. The readme does say =E2=80=98note: not 1.9 compat=E2=80=99, but I m= isread http://github.com/rdp/crystalizer/blob/master/results as sporting 1.9 results *with* Crystalizer, so na=C3=AFvely thought that maybe the README is outdated. :) =E2=80=94 Shot --=20 I don=E2=80=99t suffer from insanity; I enjoy every minute of it. [Lieven Marchand, asr] --1UWUbFP1cBYEclgG Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkr+vjoACgkQi/mCfdEo8UpXDACaA4X1ivTASpsk5CBPLn1ggTMV 7hsAoLcjb7DSYNRHXtjowRQHS/c7pgCk =J2WR -----END PGP SIGNATURE----- --1UWUbFP1cBYEclgG--