From Orion.Edwards at gallagher.co Sun Sep 2 20:36:46 2012 From: Orion.Edwards at gallagher.co (Orion Edwards) Date: Mon, 3 Sep 2012 08:36:46 +1200 Subject: [Ironruby-core] using external library (REXML) is extremely slow when running my app in debug mode In-Reply-To: References: Message-ID: Without trying to reproduce the issue, perhaps it is related to the debugger tracing information or exceptions from inside IronRuby caused by REXML You could try enabling visual studio's "Just My Code" debugger option - it's purpose is to filter out external stuff like this. It's on the Tools\Options dialog on the "Debugging" section ______________________________________________________ Orion Edwards | Technical Leader PHONE +64 7 838 9800 | FAX +64 7 838 9801 | EMAIL orion.edwards at gallagher.co | WEB www.gallagher.co From: Anton Firsov To: ironruby-core at rubyforge.org Date: 01/09/2012 04:49 a.m. Subject: [Ironruby-core] using external library (REXML) is extremely slow when running my app in debug mode Sent by: ironruby-core-bounces at rubyforge.org Hi All, I'm using IronRuby as scripting environment inside my app. I use scriptEngine.SetSearchPaths() to "include" the REXML files. The problem: when I execute my app with F5 (debugger attached), my scripts run extremely slow if I use REXML classes. If I use CTRL+F5 (no debugger), everything is fine. Any tips how to workaround this issue? Is it possible, that a debugger is hooked inside my ScriptEngine, when it executes .rb files? If yes, how can I eliminate it? I do not enable any debugging options in my engine, and I unistalled the IronRuby VS2010 extension. Thanks, Anton_______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/gif Size: 3465 bytes Desc: not available URL: From antonfir at gmail.com Wed Sep 5 19:12:22 2012 From: antonfir at gmail.com (Anton Firsov) Date: Wed, 5 Sep 2012 21:12:22 +0200 Subject: [Ironruby-core] using external library (REXML) is extremely slow when running my app in debug mode In-Reply-To: References: Message-ID: I tried it now, but everything is the same. Have to use .NET xml api. Thanks for your answer, Anton 2012/9/2 Orion Edwards > Without trying to reproduce the issue, perhaps it is related to the > debugger tracing information or exceptions from inside IronRuby caused by > REXML > > You could try enabling visual studio's "Just My Code" debugger option - > it's purpose is to filter out external stuff like this. > > It's on the Tools\Options dialog on the "Debugging" section > > * > ______________________________________________________** > > Orion Edwards **|** Technical Leader * > PHONE +64 7 838 9800 *|* FAX +64 7 838 9801 *|* > EMAIL orion.edwards at gallagher.co *|* WEB *www.gallagher.co* > > > > > From: Anton Firsov > To: ironruby-core at rubyforge.org > Date: 01/09/2012 04:49 a.m. > Subject: [Ironruby-core] using external library (REXML) is > extremely slow when running my app in debug mode > Sent by: ironruby-core-bounces at rubyforge.org > ------------------------------ > > > > Hi All, > > I'm using IronRuby as scripting environment inside my app. I use > scriptEngine.SetSearchPaths() to "include" the REXML files. The problem: > when I execute my app with F5 (debugger attached), my scripts run extremely > slow if I use REXML classes. If I use CTRL+F5 (no debugger), everything is > fine. > > Any tips how to workaround this issue? > > Is it possible, that a debugger is hooked inside my ScriptEngine, when it > executes .rb files? If yes, how can I eliminate it? I do not enable any > debugging options in my engine, and I unistalled the IronRuby VS2010 > extension. > > Thanks, > Anton_______________________________________________ > 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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/gif Size: 3465 bytes Desc: not available URL: From mike.dalessio at gmail.com Wed Sep 5 19:26:15 2012 From: mike.dalessio at gmail.com (Mike Dalessio) Date: Wed, 5 Sep 2012 15:26:15 -0400 Subject: [Ironruby-core] using external library (REXML) is extremely slow when running my app in debug mode In-Reply-To: References: Message-ID: On Wed, Sep 5, 2012 at 3:12 PM, Anton Firsov wrote: > I tried it now, but everything is the same. > Have to use .NET xml api. > Has the ruby FFI library been ported to Ironruby? If so, It might be worth trying Nokogiri 1.4.x, which uses FFI to talk to libxml2. In fact, as the maintainer of Nokogiri and contributor to ruby-ffi, I'd be interested to know if that works, and if not why not. > > Thanks for your answer, > Anton > > > 2012/9/2 Orion Edwards > >> Without trying to reproduce the issue, perhaps it is related to the >> debugger tracing information or exceptions from inside IronRuby caused by >> REXML >> >> You could try enabling visual studio's "Just My Code" debugger option - >> it's purpose is to filter out external stuff like this. >> >> It's on the Tools\Options dialog on the "Debugging" section >> >> * >> ______________________________________________________** >> >> Orion Edwards **|** Technical Leader * >> PHONE +64 7 838 9800 *|* FAX +64 7 838 9801 *|* >> EMAIL orion.edwards at gallagher.co *|* WEB *www.gallagher.co* >> >> >> >> >> From: Anton Firsov >> To: ironruby-core at rubyforge.org >> Date: 01/09/2012 04:49 a.m. >> Subject: [Ironruby-core] using external library (REXML) is >> extremely slow when running my app in debug mode >> Sent by: ironruby-core-bounces at rubyforge.org >> ------------------------------ >> >> >> >> Hi All, >> >> I'm using IronRuby as scripting environment inside my app. I use >> scriptEngine.SetSearchPaths() to "include" the REXML files. The problem: >> when I execute my app with F5 (debugger attached), my scripts run extremely >> slow if I use REXML classes. If I use CTRL+F5 (no debugger), everything is >> fine. >> >> Any tips how to workaround this issue? >> >> Is it possible, that a debugger is hooked inside my ScriptEngine, when it >> executes .rb files? If yes, how can I eliminate it? I do not enable any >> debugging options in my engine, and I unistalled the IronRuby VS2010 >> extension. >> >> Thanks, >> Anton_______________________________________________ >> 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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/gif Size: 3465 bytes Desc: not available URL: From lists at ruby-forum.com Tue Sep 18 09:13:09 2012 From: lists at ruby-forum.com (Sophia Joachim) Date: Tue, 18 Sep 2012 11:13:09 +0200 Subject: [Ironruby-core] No such file to load -- gem_prelude.rb (LoadError) Message-ID: <451f292ce6aeb9434c3e4dfc1b2c4111@ruby-forum.com> Hi, I am new to IronRuby. I have installed IronRuby1.1. When I execute my IronRuby script I get an error: unknown: no such file to load -- gem_prelude.rb (LoadError) Can someone tell me why this error is occuring??? I am trying to automate using Bewildr. This is my script: require 'rubygems' require 'bewildr' puts "hello" @app = Bewildr::Application.start('C:/Documents and Settings/Desktop/ExpenseItStandalone.exe') Thanks in advance, Sophia Attachments: http://www.ruby-forum.com/attachment/7746/ironruby.JPG -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Mon Sep 24 08:21:25 2012 From: lists at ruby-forum.com (Alexander Ranger) Date: Mon, 24 Sep 2012 10:21:25 +0200 Subject: [Ironruby-core] Getting property list from both Ruby and .Net objects Message-ID: <24e7365d3eb8e2eec9d2395cb4ada05c@ruby-forum.com> Hello. I need some tools to get property names of both Ruby objects and .Net objects. First I thought that there'll be no problem with it. I tried to do it like: def GetPropertyList(obj) return obj.instance_variables end But it turned out that when "obj" is a .Net object obj.instance_variables returns nothing. Well, it returns an array but array is empty. For example: require "Foo" include FooModule foo = Foo.new foo.NetVal1 = "Hello" foo.NetVal2 = 100 puts foo.class # => FooModule::Foo puts foo.NetVal1 # => Hello puts doo.NetVal2 # => 100 puts foo.instance_variables # => #it's blank here puts foo.instance_variables.class # => Array Well, then I thought that I can use reflection to get property list for .Net objects: def GetPropertyList(obj) array = Array.new obj.GetType().GetProperties.each do |prop| array.push prop.name end array end But it didn't work for a ruby object. I tried to somehow find out weather object is from ruby or .Net and depending on it parse objects, but I couldn't think of any working solution. So my question is: Give me a hint on how I can parse both ruby and .net objects using one algorithm. Thanks in advance, Alex. -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Thu Sep 27 18:12:12 2012 From: lists at ruby-forum.com (Eduardo Blumenfeld) Date: Thu, 27 Sep 2012 20:12:12 +0200 Subject: [Ironruby-core] Getting property list from both Ruby and .Net objects In-Reply-To: <24e7365d3eb8e2eec9d2395cb4ada05c@ruby-forum.com> References: <24e7365d3eb8e2eec9d2395cb4ada05c@ruby-forum.com> Message-ID: Hi Alex: Try: obj.methods obj.public_methods obj.private_methods it will give you the list of all the methods available (From the point of view of IronRuby, a .net object shows the methods you would find two methods for, one for set another for get of a variable, for example, saying that you have a propety of the object called "name" obj.name (would return the actual setting for the variable (get) ) obj.name = "test".to_clr_string (would set the name in the .net object) Note: .to_clr_string is important to convert the ruby string object to the corresponding clr object (System::String) Regards, Eduardo -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Thu Sep 27 18:17:54 2012 From: lists at ruby-forum.com (Eduardo Blumenfeld) Date: Thu, 27 Sep 2012 20:17:54 +0200 Subject: [Ironruby-core] Getting property list from both Ruby and .Net objects In-Reply-To: <24e7365d3eb8e2eec9d2395cb4ada05c@ruby-forum.com> References: <24e7365d3eb8e2eec9d2395cb4ada05c@ruby-forum.com> Message-ID: Alex: A quick way of finding all the properties that you can set of a .net object would be: obj.methods.grep(/=/) (filter by all the properties that you can set) -- Posted via http://www.ruby-forum.com/.