Note that the DLR's ScriptHost abilities allow you to redefine what the file system is, so instead of changing require, load, load_assembly, and any other code that might touch files, you can just write a Platform Abstraction Layer. The Silverlight support uses this heavily to allow require 'foo' to look up foo in the XAP.
JD -----Original Message----- From: ironruby-core-boun...@rubyforge.org [mailto:ironruby-core-boun...@rubyforge.org] On Behalf Of Martin Smith Sent: Wednesday, May 12, 2010 11:27 AM To: ironruby-core@rubyforge.org Subject: Re: [Ironruby-core] What's next? You guys have hit the nail on the head for me I actually want it for both reasons: to provide some loose protection for our code and to improve startup times. I was thinking about doing something around packaging like you guys were talking about, but i think then I'd have to redefine Kernel.require to make sure that all the require statements execute properly. For code protection, it only provided small benefits (a determined code stealer would easily circumvent the protections), but if it helped with startup times that would benefit us greatly. The issue is that we use IR for our UI layer so the first time they ask for any dialog it needs to compile quite a bit of code so the first time they load a dialog can take some time. I've thought of changing this so we do the compilation at startup but i'm not quite sure if that will work. I'd envision something like this: 1) set compilation threshold to 0 (compile immediately) 2) execute "require 'file'" for each ruby script 3)set compilation threshold to 1 so eval doesn't compile everything (we semi-extensively use eval) Would something like this be possible? Is the compilation threshold settable dynamically? Thanks in advance, Martin _______________________________________________ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core