[Ironruby-core] Newbie questions regardingIronRuby in Silverlight...

Tomas Matousek Tomas.Matousek at microsoft.com
Mon Oct 12 19:16:05 EDT 2009


If you want to give it a try anyways you can also pass -ET LOAD_COMPILED command line options to ir.exe to see what files are being loaded. For example:

D:\M3\Merlin\Main\Languages\Ruby>rbx -ET LOAD_COMPILED D:\M3\Merlin\Main\Languages\Ruby\Scripts\bin\iirb
LOAD_COMPILED: 1: D:/M3/Merlin/External.LCA_RESTRICTED/Languages/Ruby/redist-libs/ruby/1.8/irb.rb
LOAD_COMPILED: 2: D:/M3/Merlin/External.LCA_RESTRICTED/Languages/Ruby/redist-libs/ruby/1.8/e2mmap.rb
LOAD_COMPILED: 3: D:/M3/Merlin/External.LCA_RESTRICTED/Languages/Ruby/redist-libs/ruby/1.8/irb/init.rb
LOAD_COMPILED: 4: D:/M3/Merlin/External.LCA_RESTRICTED/Languages/Ruby/redist-libs/ruby/1.8/irb/context.rb
LOAD_COMPILED: 5: D:/M3/Merlin/External.LCA_RESTRICTED/Languages/Ruby/redist-libs/ruby/1.8/irb/workspace.rb
LOAD_COMPILED: 6: D:/M3/Merlin/External.LCA_RESTRICTED/Languages/Ruby/redist-libs/ruby/1.8/irb/extend-command.rb
LOAD_COMPILED: 7: D:/M3/Merlin/External.LCA_RESTRICTED/Languages/Ruby/redist-libs/ruby/1.8/irb/ruby-lex.rb
LOAD_COMPILED: 8: D:/M3/Merlin/External.LCA_RESTRICTED/Languages/Ruby/redist-libs/ruby/1.8/irb/slex.rb
LOAD_COMPILED: 9: D:/M3/Merlin/External.LCA_RESTRICTED/Languages/Ruby/redist-libs/ruby/1.8/irb/notifier.rb
LOAD_COMPILED: 10: D:/M3/Merlin/External.LCA_RESTRICTED/Languages/Ruby/redist-libs/ruby/1.8/irb/output-method.rb
LOAD_COMPILED: 11: D:/M3/Merlin/External.LCA_RESTRICTED/Languages/Ruby/redist-libs/ruby/1.8/irb/ruby-token.rb
LOAD_COMPILED: 12: D:/M3/Merlin/External.LCA_RESTRICTED/Languages/Ruby/redist-libs/ruby/1.8/irb/input-method.rb
LOAD_COMPILED: 13: D:/M3/Merlin/External.LCA_RESTRICTED/Languages/Ruby/redist-libs/ruby/site_ruby/1.8/readline.rb
LOAD_COMPILED: 14: D:/M3/Merlin/External.LCA_RESTRICTED/Languages/Ruby/redist-libs/ruby/site_ruby/1.8/rbreadline.rb
LOAD_COMPILED: 15: D:/M3/Merlin/Main/Languages/Ruby/libs/etc.rb
LOAD_COMPILED: 16: D:/M3/Merlin/Main/Languages/Ruby/libs/Win32API.rb
LOAD_COMPILED: 17: D:/M3/Merlin/External.LCA_RESTRICTED/Languages/Ruby/redist-libs/ruby/1.8/irb/locale.rb
irb(main):001:0>

Tomas


-----Original Message-----
From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek
Sent: Monday, October 12, 2009 4:11 PM
To: ironruby-core at rubyforge.org
Subject: Re: [Ironruby-core] Newbie questions regardingIronRuby in Silverlight...

It is not possible to completely and reliably automate such task in general. You could run your application and see what files are being required. You can monkey-patch Kernel#require and load so that they log the files being required. However you would need to exercise all code paths that might possibly load a file to get the full list.

Tomas

-----Original Message-----
From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Nathan Stults
Sent: Monday, October 12, 2009 3:58 PM
To: ironruby-core at rubyforge.org
Subject: Re: [Ironruby-core] Newbie questions regardingIronRuby in Silverlight...

Is anyone aware of a tool that can recursively detect (and possibly
extract) ruby dependencies given a top level .rb, or set of .rb files? I could see it being a tedious process to discover manually what components of the standard library were used by any given application.

-----Original Message-----
From: ironruby-core-bounces at rubyforge.org
[mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jimmy Schementi
Sent: Monday, October 12, 2009 3:49 PM
To: <ironruby-core at rubyforge.org>
Cc: ironruby-core at rubyforge.org
Subject: Re: [Ironruby-core] Newbie questions regardingIronRuby in Silverlight...

There are not two copies, one is ruby stdlib, and one is IronRuby's own lib. The ruby stdlib contains pieces implemented in ruby, as well as C. In IronRuby we ported all the C stuff to C# (that's what IronRuby.Libraries.dll is), and redistribute the ruby code. So both directories are all part of the standard library.

For Silverlight, I would suggest you only deploy the files that you use; the entire stdlib is fairly large.

~Jimmy
Sent from my phone

On Oct 12, 2009, at 3:26 PM, "Zoltan Toth" <lists at ruby-forum.com> wrote:

> Once again thanks, we were able to get things working.  Please note 
> that we have offline requirements that require us to deploy the 
> portions of the ruby standard library that we require, within our 
> Silverlight application.
>
> My only other question is why does IronRuby ship with what appears to 
> be two versions of the Ruby standard library?  There appears to be a 
> standard implementation (i.e. \lib\ruby\1.8 for IronRuby 0.9.1) that 
> uses ruby scripts and there also appears to be an implementation that 
> calls into the CLR (i.e. \lib\IronRuby) in order to do its stuf.  Do 
> we have a choice of which to use or do we need to deploy both?
>
> Many thanks for your help.
>
> Zoltan.
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Ironruby-core mailing list
> Ironruby-core at rubyforge.org
> http://rubyforge.org/mailman/listinfo/ironruby-core
>
_______________________________________________
Ironruby-core mailing list
Ironruby-core at rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core
_______________________________________________
Ironruby-core mailing list
Ironruby-core at rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core

_______________________________________________
Ironruby-core mailing list
Ironruby-core at rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core



More information about the Ironruby-core mailing list