From ivan at flanders.co.nz Tue Dec 1 05:02:12 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Tue, 1 Dec 2009 11:02:12 +0100 Subject: [Ironruby-core] invoke member and dynamic binding isn't the same? In-Reply-To: <4B342496A3EFEB48839E10BB4BF5964C1826E28B@TK5EX14MBXC129.redmond.corp.microsoft.com> References: <4B342496A3EFEB48839E10BB4BF5964C1826BF7B@TK5EX14MBXC129.redmond.corp.microsoft.com> <4B342496A3EFEB48839E10BB4BF5964C1826E28B@TK5EX14MBXC129.redmond.corp.microsoft.com> Message-ID: d'oh Indeed after using the correct libraries things do work, imagine that... Thanks. --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Mon, Nov 30, 2009 at 8:20 PM, Tomas Matousek < Tomas.Matousek at microsoft.com> wrote: > It seems that you reference IronRuby binaries built against CLR 2.0. You > need to use CLR4 binaries: > http://ironruby.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=33305 > > > > Tomas > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Ivan Porto Carrero > *Sent:* Monday, November 30, 2009 1:08 AM > *To:* ironruby-core at rubyforge.org > *Subject:* Re: [Ironruby-core] invoke member and dynamic binding isn't the > same? > > > > I've included a C# project with all the files you need as attachment. > > > > http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=3213 > --- > Met vriendelijke groeten - Best regards - Salutations > Ivan Porto Carrero > Blog: http://flanders.co.nz > Google Wave: portocarrero.ivan at googlewave.com > Twitter: http://twitter.com/casualjim > Author of IronRuby in Action (http://manning.com/carrero) > > > On Wed, Nov 25, 2009 at 6:16 PM, Tomas Matousek < > Tomas.Matousek at microsoft.com> wrote: > > Can you send the entire source code that sets ?Something? and then the > entire C# method that accesses it, ideally a minimal repro? > > > > Tomas > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Ivan Porto Carrero > *Sent:* Wednesday, November 25, 2009 5:29 AM > *To:* ironruby-core > *Subject:* [Ironruby-core] invoke member and dynamic binding isn't the > same? > > > > Hi > > I have some ruby code, which through a process of instance_eval and other > meta programming tricks builds an object with a method assign defined on it. > > > > > > I have this code in C# > > > > *var scope = Engine.CreateScope();* > > *scope.SetVariable("ctxt", this);* > > *Engine.ExecuteFile("rubyfile.rb", scope);* > > > > This code correctly sets a something property on this (linked with ctxt) > > but when I then want to call a method on it that should exist > > > > *public dynamic Something { get; set; }* > > > > *Something.assign("ivan")* > > > > Unhandled Exception: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: > 'Iro > > nRuby.Builtins.RubyObject' does not contain a definition for 'assign' > > at CallSite.Target(Closure , CallSite , Object , String ) > > at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid2[T0,T1](CallSite > site, > > T0 arg0, T1 arg1) > > at BugTracker_40.Bug.Assign(String assignee) in > C:\dev\ironruby-in-action\Sam > > ples\BugTracker_40\BugTracker_40\Bug.cs:line 60 > > at BugTracker_40.Program.Main(String[] args) in > C:\dev\ironruby-in-action\Sam > > ples\BugTracker_40\BugTracker_40\Program.cs:line 13 > > > > > > However the same code with: > > > > var _rubyOperations = Engine.CreateOperations() > > public object Something { get; set; } > > _rubyOperations.InvokeMember(Something, "assign", "ivan") > > > > does work. > > > > The question is why? Is this the expected behavior? Am I missing an > assembly reference (it has Ironruby.*, Microsoft.Scripting, > Microsoft.Scripting.Core) > > --- > Met vriendelijke groeten - Best regards - Salutations > Ivan Porto Carrero > Blog: http://flanders.co.nz > Google Wave: portocarrero.ivan at googlewave.com > Twitter: http://twitter.com/casualjim > Author of IronRuby in Action (http://manning.com/carrero) > > > _______________________________________________ > 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: From ken1hasimoto at gmail.com Tue Dec 1 09:43:25 2009 From: ken1hasimoto at gmail.com (=?ISO-2022-JP?B?GyRCJE8kNyRiJEgkMSRzJCQkQRsoQg==?=) Date: Tue, 1 Dec 2009 23:43:25 +0900 Subject: [Ironruby-core] Could you please teach a canonical style for writing the IronRuby hosting code. In-Reply-To: <1926FFBE-BC83-452F-9980-6F2733519A6F@microsoft.com> References: <1926FFBE-BC83-452F-9980-6F2733519A6F@microsoft.com> Message-ID: Hello Jimmy-sann Thank you for your some advice about my code, and for giving me an information about the link to documentation of DLR-hosting. I understood your advices as below: 1. for creating the engine. If the program hosts the ONLY IronRuby, 'IronRuby.Ruby.CreateEngine()' is better than 'runtime.GetEngine("rb");'. If the program needs to host many dynamic languages, 'var engine = ScriptRuntime.CreateFromConfiguration().GetEngine("rb");' is better than 'IronRuby.Ruby.CreateEngine()'. 2. ScriptSource If the program evaluates same script and never execute same script, 'engine.Execute(string, ScriptScope)' is better than for creating the ScriptSource. Because, engine.Execute(string, ScriptScope) is simple code. If the program evaluates one script many times, for creating the ScriptSource is better than 'engine.Execute(string, ScriptScope)'. Because creating a ScriptSource compiles a ruby code ONLY once time and reduces . Of course, when creating a ScriptSource, I can change the mode for complie,execution. --------- Now, I have one more question about global variables. First, in my last mail, I used 'IronRuby.Ruby.GetExecutionContext(engine).DefineGlobalVariable' for defining global variable. Now I found the way to write 'runtime.Globals.SetVariable("xxx", 567);' to define global variable in the documentaion , but it seems NOT work. Is this a bug? Thank you. B.R. Kenichi HASHIMOTO 2009/11/30 Jimmy Schementi : > That looks good for hosting code that can switch between languages > easily. If you're just using Ruby, you can use > IronRuby.Ruby.CreateEngine() instead of getting the engine by string, > but I'd suggest staying with what you have; you can change to other > languages easily. > > For running code from strings, you don't necessarily need to create a > ScriptSource; you can use engine.Execute(string, ScriptScope) instead. > Creating a script source are for the cases where you want to compile > the code and store it before executing, or you want to change the mode > of source code execution (file, interactive, expressions, etc). > > There is a dlr hosting spec on dlr.codeplex.com that shows various > hosting scenarios and how the code should look. > > Let us know if you have any other questions about hosting. I showed > hosting at RubyConf this year, so keep an eye out for that blog post > (I'll send mail to this list when it's done). > > ~Jimmy > Sent from my phone > > On Nov 29, 2009, at 9:11 AM, "????????" > wrote: > >> Hello, I'm kenichi hashimoto. >> I'm a Japanese. I don't write english well. >> >> Now I have a question about a canonical style for writing the IronRuby >> hosting code. >> >> [BACKGROUND] >> Now, I'm tring to host the IronRuby 1.0RC on C#.NET (Visual Studio >> 2008). >> And, I have been trying to host it since IronRuby 0.5. >> However, I haven't understood about how to write code in right style >> yet. >> >> [QUESTION] >> Could you please teach a canonical style for writing the IronRuby >> hosting code. >> >> Now, I wrote below: >> >> static void Main(string[] args) >> { >> // create the IronRuby engine. >> ScriptRuntime runtime = IronRuby.Ruby.CreateRuntime(); >> var engine = runtime.GetEngine("rb"); >> >> // create the scope and set the local variable from C# >> var scope = engine.CreateScope(); >> scope.SetVariable("x", 123); >> >> // set the global variable from C# >> IronRuby.Ruby.GetExecutionContext(engine).DefineGlobalVariable >> ("xxx", >> 789); >> >> // execute the script with the scope >> var source = engine.CreateScriptSourceFromString(@"puts ""x is >> #{x}. $xxx is #{$xxx}."" "); >> source.Execute(scope); >> >> Console.ReadLine(); >> } >> >> Is it a canonical style? >> >> Thank you. >> B.R. Kenichi HASHIMOTO >> _______________________________________________ >> 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 > From Tomas.Matousek at microsoft.com Tue Dec 1 12:24:50 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 1 Dec 2009 17:24:50 +0000 Subject: [Ironruby-core] Could you please teach a canonical style for writing the IronRuby hosting code. In-Reply-To: References: <1926FFBE-BC83-452F-9980-6F2733519A6F@microsoft.com> Message-ID: <4B342496A3EFEB48839E10BB4BF5964C1826E645@TK5EX14MBXC129.redmond.corp.microsoft.com> Runtime.Globals.SetVariable('C', ...) sets a global constant C, not a Ruby global variable $C. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of ???????? Sent: Tuesday, December 01, 2009 6:43 AM To: ironruby-core Subject: Re: [Ironruby-core] Could you please teach a canonical style for writing the IronRuby hosting code. Hello Jimmy-sann Thank you for your some advice about my code, and for giving me an information about the link to documentation of DLR-hosting. I understood your advices as below: 1. for creating the engine. If the program hosts the ONLY IronRuby, 'IronRuby.Ruby.CreateEngine()' is better than 'runtime.GetEngine("rb");'. If the program needs to host many dynamic languages, 'var engine = ScriptRuntime.CreateFromConfiguration().GetEngine("rb");' is better than 'IronRuby.Ruby.CreateEngine()'. 2. ScriptSource If the program evaluates same script and never execute same script, 'engine.Execute(string, ScriptScope)' is better than for creating the ScriptSource. Because, engine.Execute(string, ScriptScope) is simple code. If the program evaluates one script many times, for creating the ScriptSource is better than 'engine.Execute(string, ScriptScope)'. Because creating a ScriptSource compiles a ruby code ONLY once time and reduces . Of course, when creating a ScriptSource, I can change the mode for complie,execution. --------- Now, I have one more question about global variables. First, in my last mail, I used 'IronRuby.Ruby.GetExecutionContext(engine).DefineGlobalVariable' for defining global variable. Now I found the way to write 'runtime.Globals.SetVariable("xxx", 567);' to define global variable in the documentaion , but it seems NOT work. Is this a bug? Thank you. B.R. Kenichi HASHIMOTO 2009/11/30 Jimmy Schementi : > That looks good for hosting code that can switch between languages > easily. If you're just using Ruby, you can use > IronRuby.Ruby.CreateEngine() instead of getting the engine by string, > but I'd suggest staying with what you have; you can change to other > languages easily. > > For running code from strings, you don't necessarily need to create a > ScriptSource; you can use engine.Execute(string, ScriptScope) instead. > Creating a script source are for the cases where you want to compile > the code and store it before executing, or you want to change the mode > of source code execution (file, interactive, expressions, etc). > > There is a dlr hosting spec on dlr.codeplex.com that shows various > hosting scenarios and how the code should look. > > Let us know if you have any other questions about hosting. I showed > hosting at RubyConf this year, so keep an eye out for that blog post > (I'll send mail to this list when it's done). > > ~Jimmy > Sent from my phone > > On Nov 29, 2009, at 9:11 AM, "????????" > wrote: > >> Hello, I'm kenichi hashimoto. >> I'm a Japanese. I don't write english well. >> >> Now I have a question about a canonical style for writing the >> IronRuby hosting code. >> >> [BACKGROUND] >> Now, I'm tring to host the IronRuby 1.0RC on C#.NET (Visual Studio >> 2008). >> And, I have been trying to host it since IronRuby 0.5. >> However, I haven't understood about how to write code in right style >> yet. >> >> [QUESTION] >> Could you please teach a canonical style for writing the IronRuby >> hosting code. >> >> Now, I wrote below: >> >> static void Main(string[] args) >> { >> // create the IronRuby engine. >> ScriptRuntime runtime = IronRuby.Ruby.CreateRuntime(); >> var engine = runtime.GetEngine("rb"); >> >> // create the scope and set the local variable from C# >> var scope = engine.CreateScope(); >> scope.SetVariable("x", 123); >> >> // set the global variable from C# >> IronRuby.Ruby.GetExecutionContext(engine).DefineGlobalVariable >> ("xxx", >> 789); >> >> // execute the script with the scope >> var source = engine.CreateScriptSourceFromString(@"puts ""x is >> #{x}. $xxx is #{$xxx}."" "); >> source.Execute(scope); >> >> Console.ReadLine(); >> } >> >> Is it a canonical style? >> >> Thank you. >> B.R. Kenichi HASHIMOTO >> _______________________________________________ >> 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 From Tomas.Matousek at microsoft.com Tue Dec 1 21:05:44 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Wed, 2 Dec 2009 02:05:44 +0000 Subject: [Ironruby-core] Code Review: NewSuper6 Message-ID: <4B342496A3EFEB48839E10BB4BF5964C1826EA24@TK5EX14MBXC129.redmond.corp.microsoft.com> tfpt review "/shelveset:NewSuper6;REDMOND\tomat" Comment : Implements missing super-call features (super with implicit arguments in eval), fixes bugs, improves super site caching and removes helpers with "out" parameters that were forcing the interpreter to compile the rules. Also removes "hacks.rb" and test directory from Libs since the workarounds implemented there are needed anymore. Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: NewSuper6.diff Type: application/octet-stream Size: 103738 bytes Desc: NewSuper6.diff URL: From lists at ruby-forum.com Fri Dec 4 18:42:48 2009 From: lists at ruby-forum.com (Philip Lee) Date: Sat, 5 Dec 2009 00:42:48 +0100 Subject: [Ironruby-core] IronRuby + ActiveRecord + MySql Message-ID: <460c2265b2d9efee7138bc74e48fc9e2@ruby-forum.com> Is there a MySql adapter available? -- Posted via http://www.ruby-forum.com/. From Jimmy.Schementi at microsoft.com Fri Dec 4 20:56:54 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Sat, 5 Dec 2009 01:56:54 +0000 Subject: [Ironruby-core] IronRuby + ActiveRecord + MySql In-Reply-To: <460c2265b2d9efee7138bc74e48fc9e2@ruby-forum.com> References: <460c2265b2d9efee7138bc74e48fc9e2@ruby-forum.com> Message-ID: <1B42307CD4AADD438CDDA2FE1121CC92056C5C@TK5EX14MBXC141.redmond.corp.microsoft.com> There is an ADO.NET driver for MySQL here: http://dev.mysql.com/downloads/connector/net/6.1.html, which should work with this activerecord adapter: http://github.com/jschementi/activerecord-mssql-adapter. However, I haven't tested it so I'm not sure what snags you'll run into. Has anyone else tried this out? > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Philip Lee > Sent: Friday, December 04, 2009 3:43 PM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] IronRuby + ActiveRecord + MySql > > Is there a MySql adapter available? > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From lists at ruby-forum.com Fri Dec 4 21:31:59 2009 From: lists at ruby-forum.com (James Leskovar) Date: Sat, 5 Dec 2009 03:31:59 +0100 Subject: [Ironruby-core] Leveraging StdLib.Win32API class In-Reply-To: <4B342496A3EFEB48839E10BB4BF5964C1826E25F@TK5EX14MBXC129.redmond.corp.microsoft.com> References: <28cf1677025dd82a1e654b9463677889@ruby-forum.com> <4B342496A3EFEB48839E10BB4BF5964C1826E25F@TK5EX14MBXC129.redmond.corp.microsoft.com> Message-ID: Hi Tomas, I've been playing around with DynamicMethod and generating IL at runtime, with varying levels of success. Currently I'm using DynamicMethod to generate the IL to load arguments, load function address, calli and ret. My script gets access to the DynamicMethod object, which gets passed onto a helper CLR method along with arguments for some basic marshalling, before being passed onto DynamicMethod.Invoke. I've noticed though that calling .Invoke() in this manner is a magnitude times slower than using the equivalant Win32API code. I figure I'm meant to use CreateDelegate instead of Invoke, though I'm not sure how this is meant to work since CreateDelegate expects a delegate type, whose signature isn't known until runtime. Regards, James Tomas Matousek wrote: > I wouldn't recommend using Win32API. It's not well designed interop > library. > > What you need is calli IL instruction. It takes a pointer to a function > and arguments and calls the function. C# doesn't support this so you > need some helpers. You can either emit them at run-time and call them > via delegates (that's what our implementation of Win32API does), or you > can write them in IL, if you know the signatures you need, compile them > to an assembly (ilasm ILHelpers.il /dll /out=ILHelpers.dll) and use the > assembly directly from Ruby (see attached file). > > Tomas -- Posted via http://www.ruby-forum.com/. From Tomas.Matousek at microsoft.com Fri Dec 4 22:09:55 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Sat, 5 Dec 2009 03:09:55 +0000 Subject: [Ironruby-core] Code Review: InspectAppendCompareTo Message-ID: <4B342496A3EFEB48839E10BB4BF5964C182913E6@TK5EX14MBXC129.redmond.corp.microsoft.com> tfpt review "/shelveset:InspectAppendCompareTo;REDMOND\tomat" Comment : Fixes handling of encoded strings in MutableString.Append, CompareTo and Inspect. Fixes http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=2892 Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: InspectAppendCompareTo.diff Type: application/octet-stream Size: 60083 bytes Desc: InspectAppendCompareTo.diff URL: From ivan at flanders.co.nz Sat Dec 5 03:00:29 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Sat, 5 Dec 2009 09:00:29 +0100 Subject: [Ironruby-core] IronRuby + ActiveRecord + MySql In-Reply-To: <1B42307CD4AADD438CDDA2FE1121CC92056C5C@TK5EX14MBXC141.redmond.corp.microsoft.com> References: <460c2265b2d9efee7138bc74e48fc9e2@ruby-forum.com> <1B42307CD4AADD438CDDA2FE1121CC92056C5C@TK5EX14MBXC141.redmond.corp.microsoft.com> Message-ID: That won't work.. they handle transactions differently, get schema info differently.... --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Sat, Dec 5, 2009 at 2:56 AM, Jimmy Schementi < Jimmy.Schementi at microsoft.com> wrote: > There is an ADO.NET driver for MySQL here: > http://dev.mysql.com/downloads/connector/net/6.1.html, which should work > with this activerecord adapter: > http://github.com/jschementi/activerecord-mssql-adapter. However, I > haven't tested it so I'm not sure what snags you'll run into. Has anyone > else tried this out? > > > -----Original Message----- > > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > > bounces at rubyforge.org] On Behalf Of Philip Lee > > Sent: Friday, December 04, 2009 3:43 PM > > To: ironruby-core at rubyforge.org > > Subject: [Ironruby-core] IronRuby + ActiveRecord + MySql > > > > Is there a MySql adapter available? > > -- > > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ruby-forum.com Sat Dec 5 04:16:06 2009 From: lists at ruby-forum.com (Philip Lee) Date: Sat, 5 Dec 2009 10:16:06 +0100 Subject: [Ironruby-core] IronRuby + ActiveRecord + MySql In-Reply-To: References: <460c2265b2d9efee7138bc74e48fc9e2@ruby-forum.com> <1B42307CD4AADD438CDDA2FE1121CC92056C5C@TK5EX14MBXC141.redmond.corp.microsoft.com> Message-ID: Modified the MSSql adapter to work with MySql. Hacked it up quickly but seems to work, feedback appreciated. Have to change require_mysqliron to load MySql.Data.DLL Attachments: http://www.ruby-forum.com/attachment/4305/mysqliron_adapter.rb -- Posted via http://www.ruby-forum.com/. From ryan.riley at panesofglass.org Sat Dec 5 13:52:29 2009 From: ryan.riley at panesofglass.org (Ryan Riley) Date: Sat, 5 Dec 2009 12:52:29 -0600 Subject: [Ironruby-core] amp Message-ID: I just saw the amp project on GitHuband thought that someone might be able to help get amp running on Windows. It appears they really only need help with file path issues, which I remember seeing earlier on with Windows vs. Mono builds. I don't remember the solution but am happy to go digging unless someone remembers how it was done or has the time to do it. If no one remembers this off the top of their heads, I'll dig in the mailing list archives to try to find it. For those who want the short and sweet, amp is a vcs written completely in Ruby that targets existing vcs repo formats, initially starting with hg but with plans to hit git, svn, cvs, darcs, etc. It's early yet, but with things like git-wiki, git-blog, etc. using Git as a data repo using Grit (which is *not* compatible with Windows), I'm really excited to see this thing work. Best, Ryan Riley Email: ryan.riley at panesofglass.org LinkedIn: http://www.linkedin.com/in/ryanriley Blog: http://wizardsofsmart.net/ Twitter: @panesofglass Website: http://panesofglass.org/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Sat Dec 5 16:55:02 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Sat, 5 Dec 2009 22:55:02 +0100 Subject: [Ironruby-core] amp In-Reply-To: References: Message-ID: on mono to get the case insensitive paths and \\ / sorted MONO_IOMAP=all but that doesn't fix anything on windows though, it's mono specific hook. --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Sat, Dec 5, 2009 at 7:52 PM, Ryan Riley wrote: > I just saw the amp project on GitHuband thought that someone might be able to help get amp running on Windows. > It appears they really only need help with file path issues, > which I remember seeing earlier on with Windows vs. Mono builds. I don't > remember the solution but am happy to go digging unless someone remembers > how it was done or has the time to do it. If no one remembers this off the > top of their heads, I'll dig in the mailing list archives to try to find it. > > For those who want the short and sweet, amp is a vcs written completely in > Ruby that targets existing vcs repo formats, initially starting with hg but > with plans to hit git, svn, cvs, darcs, etc. It's early yet, but with things > like git-wiki, git-blog, etc. using Git as a data repo using Grit (which is > *not* compatible with Windows), I'm really excited to see this thing work. > > Best, > > > Ryan Riley > > Email: ryan.riley at panesofglass.org > LinkedIn: http://www.linkedin.com/in/ryanriley > Blog: http://wizardsofsmart.net/ > Twitter: @panesofglass > Website: http://panesofglass.org/ > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdeville at microsoft.com Mon Dec 7 16:09:16 2009 From: jdeville at microsoft.com (Jim Deville) Date: Mon, 7 Dec 2009 21:09:16 +0000 Subject: [Ironruby-core] Git push Message-ID: I've pushed out a new TFS update. Sorry for the delay, but my computer's clock was off and I wasn't able to remote in. I know that there may be an issue with ActiveSupport tests in irtests, so I'll be investigating that. Enjoy JD PS: Would anyone be ready for a pull if I did one? -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdeville at microsoft.com Tue Dec 8 15:25:09 2009 From: jdeville at microsoft.com (Jim Deville) Date: Tue, 8 Dec 2009 20:25:09 +0000 Subject: [Ironruby-core] Code Review: utr Message-ID: I would like to get this reviewed by Dave or Shri before I submit if they can get to email. JD tfpt review "/shelveset:utr;REDMOND\jdeville" Comment : Unifies the test runner for Test::Unit. I've really just removed the duplication found in the various *Tests.rb files in Ruby\Tests\Scripts. I've adjusted all affected scripts: * irtests * generate_test-unit_tags.rb * rake.generictest * rubygems.generictest Usage of utr: utr testname will run the tests setup by the file testname_tests.rb, thus utr gem will run the Gem tests. Passing the -all flag will ignore the skipped tests and run all tests, this currently doesn't work for gems, but I will be removing our custom skips and going back to the monkeypatching model. Eventually, I will implement a -list flag to list all tests utr can see. -------------- next part -------------- A non-text attachment was scrubbed... Name: utr.diff Type: application/octet-stream Size: 106840 bytes Desc: utr.diff URL: From Tomas.Matousek at microsoft.com Tue Dec 8 20:21:42 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Wed, 9 Dec 2009 01:21:42 +0000 Subject: [Ironruby-core] Code Review: AstImprovements Message-ID: <4B342496A3EFEB48839E10BB4BF5964C18293503@TK5EX14MBXC129.redmond.corp.microsoft.com> tfpt review "/shelveset:AstImprovements;REDMOND\tomat" Comment : DLR: Adds ExpressionCollectionBuilder (moves the implementation from IronRuby). This allows to construct optimized expressions via C# initializer syntax. Adds a subclass BlockBuilder that can be used to build blocks like so: Expression result = new BlockBuilder { expression1, ... (condition) ? foo : null, anotherExpression }; If the expression used in the initializer is null it is skipped. If the expression is a sequence of expressions (IEnumerable) its content is included in the block. BlockBuilder defines an implicit conversion to Expression. Ruby: Tree transformation refactorings: - Replaces some AstFactory utility methods with AstUtils equivalents. - Creates Lambda explicitly to avoid calls to MakeGenericType. - Uses BlockBuilder for building complex blocks. Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: AstImprovements.diff Type: application/octet-stream Size: 84549 bytes Desc: AstImprovements.diff URL: From Nathan_Stults at HSIHealth.com Wed Dec 9 15:47:07 2009 From: Nathan_Stults at HSIHealth.com (Nathan Stults) Date: Wed, 9 Dec 2009 12:47:07 -0800 Subject: [Ironruby-core] Frozen .NET objects Message-ID: <790F1F63F5D2E44E91797E821B31FDBB02C21B9D@hsi-fs.HSIHealth.local> I've noticed calling .freeze on a native .NET class does not have any effect (other than making #frozen? Return true) Is this by design? Thanks, Nathan -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tomas.Matousek at microsoft.com Wed Dec 9 17:06:16 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Wed, 9 Dec 2009 22:06:16 +0000 Subject: [Ironruby-core] Frozen .NET objects In-Reply-To: <790F1F63F5D2E44E91797E821B31FDBB02C21B9D@hsi-fs.HSIHealth.local> References: <790F1F63F5D2E44E91797E821B31FDBB02C21B9D@hsi-fs.HSIHealth.local> Message-ID: <4B342496A3EFEB48839E10BB4BF5964C18294AD8@TK5EX14MBXC129.redmond.corp.microsoft.com> It has an effect: >>> System::Collections::ArrayList.freeze => System::Collections::ArrayList >>> class System::Collections::ArrayList ... def foo ... end ... end :0: can't modify frozen class (TypeError) Is there another effect you expect? Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Nathan Stults Sent: Wednesday, December 09, 2009 12:47 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Frozen .NET objects I've noticed calling .freeze on a native .NET class does not have any effect (other than making #frozen? Return true) Is this by design? Thanks, Nathan -------------- next part -------------- An HTML attachment was scrubbed... URL: From Nathan_Stults at HSIHealth.com Wed Dec 9 17:10:51 2009 From: Nathan_Stults at HSIHealth.com (Nathan Stults) Date: Wed, 9 Dec 2009 14:10:51 -0800 Subject: [Ironruby-core] Frozen .NET objects In-Reply-To: <4B342496A3EFEB48839E10BB4BF5964C18294AD8@TK5EX14MBXC129.redmond.corp.microsoft.com> References: <790F1F63F5D2E44E91797E821B31FDBB02C21B9D@hsi-fs.HSIHealth.local> <4B342496A3EFEB48839E10BB4BF5964C18294AD8@TK5EX14MBXC129.redmond.corp.microsoft.com> Message-ID: <790F1F63F5D2E44E91797E821B31FDBB02C21BCE@hsi-fs.HSIHealth.local> I was freezing a live instance of a custom .NET class and half expecting property setters to become immutable, but I can imagine that would be pretty hard to implement. I do have a related question though - I would like to provide a read-only copy of some custom .NET DTO's to a ruby script - my thinking was to inherit an adapter from DynamicObject and provide no-op implementation for all by TryGetMember - which is easy enough to do via reflection, but is there an easy way to tap into the DLR's capability of doing this in a name-mangling way - i.e. a way to implement TryGetMember that somehow re-uses what the DLR is doing behind the scenes when integrating with a native .NET object? From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek Sent: Wednesday, December 09, 2009 2:06 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Frozen .NET objects It has an effect: >>> System::Collections::ArrayList.freeze => System::Collections::ArrayList >>> class System::Collections::ArrayList ... def foo ... end ... end :0: can't modify frozen class (TypeError) Is there another effect you expect? Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Nathan Stults Sent: Wednesday, December 09, 2009 12:47 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Frozen .NET objects I've noticed calling .freeze on a native .NET class does not have any effect (other than making #frozen? Return true) Is this by design? Thanks, Nathan -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ruby-forum.com Wed Dec 9 20:45:22 2009 From: lists at ruby-forum.com (Roger Pack) Date: Thu, 10 Dec 2009 02:45:22 +0100 Subject: [Ironruby-core] undefined socket constants Message-ID: <48fec19c2c885e89b938ce10e11e3319@ruby-forum.com> appears from http://www.ruby-forum.com/topic/200353#new that a few constants are missing in IronRuby " Socket::IP_ADD_MEMBERSHIP = 12 must be done Socket::IP_MULTICAST_LOOP, Socket::IP_MULTICAST_TTL not known" however at least it works :) -r -- Posted via http://www.ruby-forum.com/. From ckponnappa at gmail.com Thu Dec 10 07:51:52 2009 From: ckponnappa at gmail.com (C. K. Ponnappa) Date: Thu, 10 Dec 2009 18:21:52 +0530 Subject: [Ironruby-core] Call for proposals - RubyConf India 2010 Message-ID: <4B20EEE8.4020908@gmail.com> Hello everyone, The Call for Proposals for talks at RubyConf India 2010 is now open. If there any Ruby communities that you are a member of, please do cross post this information to them. Here are the details, quoted from http://rubyconfindia.org > Participation Information > > We are now accepting proposals for talks for RubyConf India 2010. Please email us at proposals at rubyconfindia.org (plain text only, please) with the following information: > About you > > * Name > * Nationality > * Contact number > > About your talk > > * Title > * Detailed description (2 or 3 paragraphs) > * Target audience (newbies, advanced, etc.) > > The call for proposals will close on the 20th of January, 2010. > Accepted proposals will be announced as and when a decision is reached by the review panel, which consists of Ola Bini, Chad Fowler and Pratik Naik. Thanks! Sidu. -- Blag: http://blog.sidu.in Twitter: http://twitter.com/ponnappa From shay.friedman at gmail.com Tue Dec 15 03:17:51 2009 From: shay.friedman at gmail.com (Shay Friedman) Date: Tue, 15 Dec 2009 10:17:51 +0200 Subject: [Ironruby-core] How can IronRuby replace XML? Message-ID: Hi there, Jimmy wrote in one of his latests posts that Ruby can replace XML. I didn't understand this statement because XML files are static configuration files (and Ruby also has an equivalent - YAML)... How can Ruby code replace XML files? Thanks! Shay. -- -------------------------------------------------- Shay Friedman Author of IronRuby Unleashed http://www.IronShay.com Follow me: http://twitter.com/ironshay -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark.ryall at gmail.com Tue Dec 15 04:32:31 2009 From: mark.ryall at gmail.com (Mark Ryall) Date: Tue, 15 Dec 2009 20:32:31 +1100 Subject: [Ironruby-core] How can IronRuby replace XML? In-Reply-To: References: Message-ID: <43769a4a0912150132l1e233312v3ad2d66392ed22e6@mail.gmail.com> That aspect of the blog entry was a little unclear. I'm not a big fan of XML. XML has used for all sorts of different purposes - object serialisation, application configuration, etc. - although simpler alternatives exist, not all of these are completely evil. These applications could not really be described as using XML as dynamic language. YAML is just another markup language and isn't specifically associated with ruby - there are YAML parsers for every programming language. It can be used as a drop in replacement for these sorts of uses of XML (object serialisation and configuration). One application of XML that can be avoided by using ruby is msbuild. Build scripting needs to be quick and convenient so ant, nant and msbuild have this awkward xml based representation of tasks/targets. If you want to extend these tools, you need to compile some code and load it in to your build file. In this context I guess you could describe XML being used as a dynamic language. Instead of this ugly and awkward approach, you can use something like rake which is an internal DSL for creating builds. XAML is another attempt at creating a dynamic language with XML and ASP.NET is another. Both could be replaced with a more elegant and expressive ruby DSL. Is that the sort of thing you had in mind Jimmy? On Tue, Dec 15, 2009 at 7:17 PM, Shay Friedman wrote: > Hi there, > Jimmy wrote in one of his latests posts that Ruby can replace XML. I didn't > understand this statement because XML files are static configuration files > (and Ruby also has an equivalent - YAML)... > How can Ruby code replace XML files? > Thanks! > Shay. > -- > -------------------------------------------------- > Shay Friedman > Author of IronRuby Unleashed > http://www.IronShay.com > Follow me: http://twitter.com/ironshay > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > From ivan at flanders.co.nz Tue Dec 15 04:46:29 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Tue, 15 Dec 2009 10:46:29 +0100 Subject: [Ironruby-core] How can IronRuby replace XML? In-Reply-To: References: Message-ID: because XML is often used to simulate dynamic coding a great example of this is XAML right? XAML is excecutable code expressed as XML every self-respecting enterprise architect thinks XML is the second coming and will put loads of it in there. So instead of describing stuff in XML and giving your whole team carpal tunnel you can do the same thing by using Ruby to configure your application The argument is often yeah we did it in XML because then we didn't have to compile again to make a quick change. The news is :) You don't have to compile Ruby AND you can do more stuff with it than you can do with XML. Now if you were to ask me when should I use XML => when you need validation of data coming from an external source or when you need some form of namespacing when communicating with 3rd parties all other cases are YAGNI. --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Tue, Dec 15, 2009 at 9:17 AM, Shay Friedman wrote: > Hi there, > > Jimmy wrote in one of his latests posts that Ruby can replace XML. I didn't > understand this statement because XML files are static configuration files > (and Ruby also has an equivalent - YAML)... > > How can Ruby code replace XML files? > > Thanks! > Shay. > > -- > -------------------------------------------------- > Shay Friedman > Author of IronRuby Unleashed > http://www.IronShay.com > Follow me: http://twitter.com/ironshay > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jimmy.Schementi at microsoft.com Tue Dec 15 04:48:05 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Tue, 15 Dec 2009 09:48:05 +0000 Subject: [Ironruby-core] How can IronRuby replace XML? In-Reply-To: <43769a4a0912150132l1e233312v3ad2d66392ed22e6@mail.gmail.com> References: <43769a4a0912150132l1e233312v3ad2d66392ed22e6@mail.gmail.com> Message-ID: <1B42307CD4AADD438CDDA2FE1121CC9205C9A6@TK5EX14MBXC141.redmond.corp.microsoft.com> > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Mark Ryall > Sent: Tuesday, December 15, 2009 1:33 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] How can IronRuby replace XML? > > That aspect of the blog entry was a little unclear. Sorry! Hopefully our discussions here can clear up what I meant, so I can update the post accordingly. > I'm not a big fan of XML. XML has used for all sorts of different purposes - > object serialisation, application configuration, etc. - although simpler > alternatives exist, not all of these are completely evil. These applications > could not really be described as using XML as dynamic language. > > YAML is just another markup language and isn't specifically associated with > ruby - there are YAML parsers for every programming language. It can be used > as a drop in replacement for these sorts of uses of XML (object serialisation > and configuration). > > One application of XML that can be avoided by using ruby is msbuild. > Build scripting needs to be quick and convenient so ant, nant and msbuild > have this awkward xml based representation of tasks/targets. > If you want to extend these tools, you need to compile some code and load it > in to your build file. In this context I guess you could describe XML being > used as a dynamic language. Instead of this ugly and awkward approach, you > can use something like rake which is an internal DSL for creating builds. > > XAML is another attempt at creating a dynamic language with XML and ASP.NET > is another. Both could be replaced with a more elegant and expressive ruby > DSL. > > Is that the sort of thing you had in mind Jimmy? Yes. I say in the post that XML has been used over and over again to add dynamic feature to .NET and Java, and I proposed using Ruby as a much more elegant and expressive solution. Shay, while XML for configuration is a valid use (though, I'd argue Ruby would make a way better configuration language =)), XML tends to contain more than just key-value pairs that configuration is usually associated with. Mark brought up MSBuild as an example of XML which ends up describing a TON of behavior, which really makes it more of a domain-specific language. This tends to be one of the great abuses of XML which .NET developers are almost forced to use, since they don't have any "scripting" languages in their toolbox. ~js > On Tue, Dec 15, 2009 at 7:17 PM, Shay Friedman > wrote: > > Hi there, > > Jimmy wrote in one of his latests posts that Ruby can replace XML. I > > didn't understand this statement because XML files are static > > configuration files (and Ruby also has an equivalent - YAML)... > > How can Ruby code replace XML files? > > Thanks! > > Shay. > > -- > > -------------------------------------------------- > > Shay Friedman > > Author of IronRuby Unleashed > > http://www.IronShay.com > > Follow me: http://twitter.com/ironshay > > > > _______________________________________________ > > 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 From Jimmy.Schementi at microsoft.com Tue Dec 15 04:49:21 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Tue, 15 Dec 2009 09:49:21 +0000 Subject: [Ironruby-core] How can IronRuby replace XML? In-Reply-To: <1B42307CD4AADD438CDDA2FE1121CC9205C9A6@TK5EX14MBXC141.redmond.corp.microsoft.com> References: <43769a4a0912150132l1e233312v3ad2d66392ed22e6@mail.gmail.com> <1B42307CD4AADD438CDDA2FE1121CC9205C9A6@TK5EX14MBXC141.redmond.corp.microsoft.com> Message-ID: <1B42307CD4AADD438CDDA2FE1121CC9205C9B6@TK5EX14MBXC141.redmond.corp.microsoft.com> > That aspect of the blog entry was a little unclear. That's a very good point though. I really never give an example of something that uses XML, and show something similar in Ruby. I'll add that. ~Jimmy From thibaut.barrere at gmail.com Tue Dec 15 04:58:11 2009 From: thibaut.barrere at gmail.com (=?ISO-8859-1?Q?Thibaut_Barr=E8re?=) Date: Tue, 15 Dec 2009 10:58:11 +0100 Subject: [Ironruby-core] How can IronRuby replace XML? In-Reply-To: <1B42307CD4AADD438CDDA2FE1121CC9205C9B6@TK5EX14MBXC141.redmond.corp.microsoft.com> References: <43769a4a0912150132l1e233312v3ad2d66392ed22e6@mail.gmail.com> <1B42307CD4AADD438CDDA2FE1121CC9205C9A6@TK5EX14MBXC141.redmond.corp.microsoft.com> <1B42307CD4AADD438CDDA2FE1121CC9205C9B6@TK5EX14MBXC141.redmond.corp.microsoft.com> Message-ID: <4a68b8cf0912150158u45de3107x1cc994f810cef4b9@mail.gmail.com> > That's a very good point though. I really never give an example of something that uses XML, and show something similar in Ruby. I'll add that. Switching from NAnt/MSBuild to Rake is one example that comes to my mind :) Ruby is really helpful to add conditions, loops etc. Having these in XML is really quickly hard to maintain. -- Thibaut From thibaut.barrere at gmail.com Tue Dec 15 05:00:05 2009 From: thibaut.barrere at gmail.com (=?ISO-8859-1?Q?Thibaut_Barr=E8re?=) Date: Tue, 15 Dec 2009 11:00:05 +0100 Subject: [Ironruby-core] How can IronRuby replace XML? In-Reply-To: References: Message-ID: <4a68b8cf0912150200u4a8590f3v9630fc1a4dcb5b37@mail.gmail.com> > because XML is often used to simulate dynamic coding a great example of this > is XAML right? > XAML is excecutable code expressed as XML every self-respecting enterprise > architect thinks XML is the second coming and will put loads of it in there. > So instead of describing stuff in XML and giving your whole team carpal > tunnel you can do the same thing by using Ruby to configure your application > The argument is often yeah we did it in XML because then we didn't have to > compile again to make ?a quick change. Spot on :) Shay, here's a quick example of using Ruby instead of XAML: http://github.com/thbar/ironruby-labs/blob/master/silverlight/003_using_magic_instead_of_xaml/ruby/app.rb -- Thibaut From ckponnappa at gmail.com Tue Dec 15 05:13:27 2009 From: ckponnappa at gmail.com (C. K. Ponnappa) Date: Tue, 15 Dec 2009 15:43:27 +0530 Subject: [Ironruby-core] How can IronRuby replace XML? In-Reply-To: <4a68b8cf0912150158u45de3107x1cc994f810cef4b9@mail.gmail.com> References: <43769a4a0912150132l1e233312v3ad2d66392ed22e6@mail.gmail.com> <1B42307CD4AADD438CDDA2FE1121CC9205C9A6@TK5EX14MBXC141.redmond.corp.microsoft.com> <1B42307CD4AADD438CDDA2FE1121CC9205C9B6@TK5EX14MBXC141.redmond.corp.microsoft.com> <4a68b8cf0912150158u45de3107x1cc994f810cef4b9@mail.gmail.com> Message-ID: <4B276147.3060202@gmail.com> And after writing all that, I saw your post Thibaut. My apologies for repeating what you've already pointed out. -Sidu Thibaut Barr?re wrote: >> That's a very good point though. I really never give an example of something that uses XML, and show something similar in Ruby. I'll add that. >> > > Switching from NAnt/MSBuild to Rake is one example that comes to my mind :) > > Ruby is really helpful to add conditions, loops etc. Having these in > XML is really quickly hard to maintain. > > -- Thibaut > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > From ckponnappa at gmail.com Tue Dec 15 05:11:50 2009 From: ckponnappa at gmail.com (C. K. Ponnappa) Date: Tue, 15 Dec 2009 15:41:50 +0530 Subject: [Ironruby-core] How can IronRuby replace XML? In-Reply-To: References: Message-ID: <4B2760E6.3040300@gmail.com> Hello Shay, Typically XML gets to be a pain when it goes from being configuration to a mini language. The classic example is an Ant/Nant build. The build.xml looks real cute and readable as long as you're doing the standard compile -> unit-test -> functional-test -> package flow on a toy project. Once you're on real-world project with a large codebase of several thousand classes and multistage/pipelined builds, then that XML rapidly becomes brittle, hard to change and hard to maintain. If you examine the history of Ant/Nant, you'll notice that over time (due to popular demand) language constructs like branching have been added changing the build config from a configuration to a mini DSL. But this does not remove the basic problem - that one cannot trivially refactor a build config that contains logic (and is thus no longer a config) to extract abstractions and keep things civilized. The Ruby contrast to this is Rake (not YAML directly - YAML as pure configuration has no real advantage over XML that I've seen beyond being more human readable). Rake builds pwn. Seriously. I know I've said this before on this list, but I love Rake, so I'll say it again - all .Net and Java builds should be moved off Ant/Maven/Nant to Rake. It has none of the limitations of an xml based build config. You can reafctor it. You can even write tests for it, should you need to. I've seen it done, and it works really well. Is that fair example? Cheers, Sidu. http://blog.sidu.in http://twitter.com/ponnappa Shay Friedman wrote: > Hi there, > > Jimmy wrote in one of his latests posts that Ruby can replace XML. I > didn't understand this statement because XML files are static > configuration files (and Ruby also has an equivalent - YAML)... > > How can Ruby code replace XML files? > > Thanks! > Shay. > > -- > -------------------------------------------------- > Shay Friedman > Author of IronRuby Unleashed > http://www.IronShay.com > Follow me: http://twitter.com/ironshay > ------------------------------------------------------------------------ > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > From thibaut.barrere at gmail.com Tue Dec 15 05:19:07 2009 From: thibaut.barrere at gmail.com (=?ISO-8859-1?Q?Thibaut_Barr=E8re?=) Date: Tue, 15 Dec 2009 11:19:07 +0100 Subject: [Ironruby-core] How can IronRuby replace XML? In-Reply-To: <4B276147.3060202@gmail.com> References: <43769a4a0912150132l1e233312v3ad2d66392ed22e6@mail.gmail.com> <1B42307CD4AADD438CDDA2FE1121CC9205C9A6@TK5EX14MBXC141.redmond.corp.microsoft.com> <1B42307CD4AADD438CDDA2FE1121CC9205C9B6@TK5EX14MBXC141.redmond.corp.microsoft.com> <4a68b8cf0912150158u45de3107x1cc994f810cef4b9@mail.gmail.com> <4B276147.3060202@gmail.com> Message-ID: <4a68b8cf0912150219s52811a7cs97e20d08475e41c@mail.gmail.com> > And after writing all that, I saw your post Thibaut. My apologies for > repeating what you've already pointed out. no worries :) More feedback is actually useful here. -- Thibaut From Jimmy.Schementi at microsoft.com Tue Dec 15 21:20:16 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Wed, 16 Dec 2009 02:20:16 +0000 Subject: [Ironruby-core] [ANN] IronRuby 1.0 RC1 Message-ID: <1B42307CD4AADD438CDDA2FE1121CC9205D28E@TK5EX14MBXC141.redmond.corp.microsoft.com> RubyConf made a few things related to the 1.0-rc1 release fall through the cracks, including an announcement out to the mailing list ... my bad! Better late than never ... The IronRuby team is pleased to announce version 1.0 RC1! http://ironruby.net/download Direct download link: http://ironruby.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=35312#DownloadId=93832 This release was announced at RubyConf 2009. Read more about this IronRuby release here: http://blog.jimmy.schementi.com/2009/12/ironruby-rubyconf-2009-part-4-project.html As IronRuby approaches the final 1.0, these RCs will contain crucial bug fixes and enhancements that IronRuby requires to be a fast and compatible 1.0. This release contains 6 bug-fixes. See the release notes and changelog for more detailed information: http://rubyforge.org/frs/shownotes.php?release_id=41946 Though IronRuby is in the release-candidate stage, your feedback is even just as important. Please use these new binaries as much as you can and report any issues you find here: http://ironruby.codeplex.com/WorkItem/Create.aspx. From lists at ruby-forum.com Tue Dec 15 23:01:21 2009 From: lists at ruby-forum.com (Dylan McClung) Date: Wed, 16 Dec 2009 05:01:21 +0100 Subject: [Ironruby-core] =?utf-8?q?handling_ruby_types_and_CallSiteStorage?= =?utf-8?q?_in=09std=09library?= In-Reply-To: <4B342496A3EFEB48839E10BB4BF5964C1826C839@TK5EX14MBXC129.redmond.corp.microsoft.com> References: <4B342496A3EFEB48839E10BB4BF5964C1826C813@TK5EX14MBXC129.redmond.corp.microsoft.com> <4B342496A3EFEB48839E10BB4BF5964C1826C839@TK5EX14MBXC129.redmond.corp.microsoft.com> Message-ID: <0b7800adaecac852f57e2cb9b79eb663@ruby-forum.com> Writing it in Ruby worked well for me in this case, thanks Tomas. -- Posted via http://www.ruby-forum.com/. From pascal.normandin at convergentware.com Tue Dec 15 23:17:31 2009 From: pascal.normandin at convergentware.com (Pascal Normandin) Date: Tue, 15 Dec 2009 23:17:31 -0500 Subject: [Ironruby-core] Problem with Arrays In-Reply-To: <1B42307CD4AADD438CDDA2FE1121CC9205D28E@TK5EX14MBXC141.redmond.corp.microsoft.com> References: <1B42307CD4AADD438CDDA2FE1121CC9205D28E@TK5EX14MBXC141.redmond.corp.microsoft.com> Message-ID: <001101ca7e06$af7feae0$0e7fc0a0$@normandin@convergentware.com> Hello, I think I have found a problem with the Array delete_if method. If I do the following when a do the arr2 = Array.new arr I get a nil value >>> arr = ["asd", "qwe", "zxc"] => ["asd", "qwe", "zxc"] >>> arr.delete_if{|x| x == "qwe"} => ["asd", "zxc"] >>> arr2 = Array.new arr => [nil, "asd"] This is happening in 0.9.2 and in 1.0 RC1 Using Ruby I don't get that. What I expected. irb(main):008:0> arr = ["asd", "qwe", "zxc"] => ["asd", "qwe", "zxc"] irb(main):009:0> arr.delete_if{|x| x =="qwe"} => ["asd", "zxc"] irb(main):010:0> arr2 = Array.new arr => ["asd", "zxc"] Pascal From shay.friedman at gmail.com Wed Dec 16 04:22:01 2009 From: shay.friedman at gmail.com (Shay Friedman) Date: Wed, 16 Dec 2009 11:22:01 +0200 Subject: [Ironruby-core] How can IronRuby replace XML? In-Reply-To: <4a68b8cf0912150219s52811a7cs97e20d08475e41c@mail.gmail.com> References: <43769a4a0912150132l1e233312v3ad2d66392ed22e6@mail.gmail.com> <1B42307CD4AADD438CDDA2FE1121CC9205C9A6@TK5EX14MBXC141.redmond.corp.microsoft.com> <1B42307CD4AADD438CDDA2FE1121CC9205C9B6@TK5EX14MBXC141.redmond.corp.microsoft.com> <4a68b8cf0912150158u45de3107x1cc994f810cef4b9@mail.gmail.com> <4B276147.3060202@gmail.com> <4a68b8cf0912150219s52811a7cs97e20d08475e41c@mail.gmail.com> Message-ID: Thanks everybody for your replies! It now makes much more sense to me. I bet that it will also make more sense to .NET developers once they need to decide - learn an XML DSL or a Ruby DSL. Thanks! Shay. On Tue, Dec 15, 2009 at 12:19 PM, Thibaut Barr?re wrote: > > And after writing all that, I saw your post Thibaut. My apologies for > > repeating what you've already pointed out. > > no worries :) More feedback is actually useful here. > > -- Thibaut > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -- -------------------------------------------------- Shay Friedman Author of IronRuby Unleashed http://www.IronShay.com Follow me: http://twitter.com/ironshay -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Wed Dec 16 15:44:35 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Wed, 16 Dec 2009 21:44:35 +0100 Subject: [Ironruby-core] [IronPython] Chiron and Mono In-Reply-To: <4B29197B.1010901@voidspace.org.uk> References: <4B29197B.1010901@voidspace.org.uk> Message-ID: Michael it uses System.IO.Compression stuff and a class to create zip files. I'll submit the bug to mono no sweat. I was called away earlier. It happens with small xap files too. --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Wed, Dec 16, 2009 at 6:31 PM, Michael Foord wrote: > Hello all, > > Just a warning that Chiron is broken with Mono 2.4.3 and Mono 2.6. It may > only happen with large xap files (still to be confirmed) but for us the last > working version of Mono is 2.4.2.3. > > What compression API does Chiron use? I need to report back to the Mono > team so that they can fix this... > > Michael > > -- > http://www.ironpythoninaction.com/ > http://www.voidspace.org.uk/blog > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jimmy.Schementi at microsoft.com Wed Dec 16 20:56:05 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Thu, 17 Dec 2009 01:56:05 +0000 Subject: [Ironruby-core] Problem with Arrays In-Reply-To: <001101ca7e06$af7feae0$0e7fc0a0$@normandin@convergentware.com> References: <1B42307CD4AADD438CDDA2FE1121CC9205D28E@TK5EX14MBXC141.redmond.corp.microsoft.com> <001101ca7e06$af7feae0$0e7fc0a0$@normandin@convergentware.com> Message-ID: <1B42307CD4AADD438CDDA2FE1121CC9205E18A@TK5EX14MBXC141.redmond.corp.microsoft.com> Opened http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=3314. That's wacky! Doesn't happen if you remove the last or first item ... it's gonna be fun to track that down. =) > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Pascal Normandin > Sent: Tuesday, December 15, 2009 8:18 PM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] Problem with Arrays > > Hello, > > I think I have found a problem with the Array delete_if method. > > If I do the following when a do the arr2 = Array.new arr I get a nil value > > >>> arr = ["asd", "qwe", "zxc"] > => ["asd", "qwe", "zxc"] > >>> arr.delete_if{|x| x == "qwe"} > => ["asd", "zxc"] > >>> arr2 = Array.new arr > => [nil, "asd"] > > This is happening in 0.9.2 and in 1.0 RC1 > > > Using Ruby I don't get that. What I expected. > irb(main):008:0> arr = ["asd", "qwe", "zxc"] => ["asd", "qwe", "zxc"] > irb(main):009:0> arr.delete_if{|x| x =="qwe"} => ["asd", "zxc"] > irb(main):010:0> arr2 = Array.new arr => ["asd", "zxc"] > > Pascal > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From ryan.riley at panesofglass.org Thu Dec 17 11:59:46 2009 From: ryan.riley at panesofglass.org (Ryan Riley) Date: Thu, 17 Dec 2009 10:59:46 -0600 Subject: [Ironruby-core] Ruby Libraries ==> IronRuby Message-ID: Tomas's message below seems to reflect what I've been thinking lately. Does anyone else think that in many cases porting C libraries to Ruby or even reusing ports from the Rubinius project would be beneficial to getting more libraries running on IronRuby? I'm supposing that IR performance will continue to improve, and I like the idea of contributing to more than one project (or reusing someone else's work). Is that a good idea? Should we instead wait for FFI on IR? Or is all of this a case-by-case basis approach? I have nothing concrete in mind, atm, I'm just wondering "out loud." Cheers! Ryan Riley Email: ryan.riley at panesofglass.org LinkedIn: http://www.linkedin.com/in/ryanriley Blog: http://wizardsofsmart.net/ Twitter: @panesofglass Website: http://panesofglass.org/ On Fri, Nov 27, 2009 at 4:46 PM, Tomas Matousek < Tomas.Matousek at microsoft.com> wrote: > BTW: Since parts of the OpenSSL library are already written in Ruby (see > ruby-1.8.6p368\lib\ruby\1.8\openssl directory) it might be easier to write > the rest in Ruby as well. With calls to .NET implementation of the > cryptographic algorithms, of course. > If you chose to go that way you can add the scripts to > Merlin\Main\Languages\Ruby\Libs. > > Tomas > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek > Sent: Friday, November 27, 2009 2:38 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] handling ruby types and CallSiteStorage in std > library > > It depends whether the method is supposed to invoke Digest's methods > dynamically or not. Does pkcs5_keyivgen method accept any Ruby object that > implements the methods pkcs5_keyivgen calls? Or does it need to be an > instance of Digest class? > If the former is true than you need to use "object" as the parameter type > and use dynamic call sites to invoke those methods. An example of such > dynamic behavior would be MutableStringOps.Compare. If the latter is true > you can just type the parameter to Digest CLR type and call its methods > directly. > > Tomas > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] On Behalf Of Dylan McClung > Sent: Friday, November 27, 2009 9:34 AM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] handling ruby types and CallSiteStorage in std > library > > I'm working on adding code to the OpenSSL extension of the standard library > and I need to understand the design for invoking and typing Ruby code. I > read the 'Modifying the sources' github page and it mentions using > CallSiteStorage to call into Ruby code. > > Specifically, the Cipher ruby class has a dependency on the Digest ruby > classes for the pkcs5_keyivgen method. An optional parameter for this > method is an instance of the Ruby class Digest::Base. How would the type > look, maybe Digest.Digest.Base digest/*optional*/? Or would it be an object > and I'd also need to pass in CallSiteStorage to call methods on the object? > > An example in the standard library of such behavior would be much > appreciated, thanks for any help. > -- > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jimmy.Schementi at microsoft.com Thu Dec 17 13:54:48 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Thu, 17 Dec 2009 18:54:48 +0000 Subject: [Ironruby-core] Ruby Libraries ==> IronRuby In-Reply-To: References: Message-ID: <1B42307CD4AADD438CDDA2FE1121CC9205E8ED@TK5EX14MBXC141.redmond.corp.microsoft.com> For the rest of our ~10% missing Ruby built-in/library support, using code from Rubinius could possibly make more things work. I?d try this out for a library you care about that isn?t implemented, see if you can get all the specs passing for that, and report back. =) However, are you referring to ?C-library ports to Ruby? that are outside the Ruby stdlib (as in, 3rd party libs, gems, etc)? I don?t know of many of those existing, but probably because I haven?t been looking, but again if they do exist their doesn?t seem like anything wrong with trying to get them working on IronRuby for more 3rd party library support. The only issues I see is if they somehow use Rubinius only features. Another thing to be aware of is licensing; the IronRuby codebase is partitioned into three licenses, based on where we got the code from: Ms-Pl, Ruby license, and Creative Commons. If the intention is to commit these Ruby libraries into IronRuby to fill out our support, then we just need to be mindful of what license the incoming code. ~Jimmy From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ryan Riley Sent: Thursday, December 17, 2009 9:00 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Ruby Libraries ==> IronRuby Tomas's message below seems to reflect what I've been thinking lately. Does anyone else think that in many cases porting C libraries to Ruby or even reusing ports from the Rubinius project would be beneficial to getting more libraries running on IronRuby? I'm supposing that IR performance will continue to improve, and I like the idea of contributing to more than one project (or reusing someone else's work). Is that a good idea? Should we instead wait for FFI on IR? Or is all of this a case-by-case basis approach? I have nothing concrete in mind, atm, I'm just wondering "out loud." Cheers! Ryan Riley Email: ryan.riley at panesofglass.org LinkedIn: http://www.linkedin.com/in/ryanriley Blog: http://wizardsofsmart.net/ Twitter: @panesofglass Website: http://panesofglass.org/ On Fri, Nov 27, 2009 at 4:46 PM, Tomas Matousek > wrote: BTW: Since parts of the OpenSSL library are already written in Ruby (see ruby-1.8.6p368\lib\ruby\1.8\openssl directory) it might be easier to write the rest in Ruby as well. With calls to .NET implementation of the cryptographic algorithms, of course. If you chose to go that way you can add the scripts to Merlin\Main\Languages\Ruby\Libs. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek Sent: Friday, November 27, 2009 2:38 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] handling ruby types and CallSiteStorage in std library It depends whether the method is supposed to invoke Digest's methods dynamically or not. Does pkcs5_keyivgen method accept any Ruby object that implements the methods pkcs5_keyivgen calls? Or does it need to be an instance of Digest class? If the former is true than you need to use "object" as the parameter type and use dynamic call sites to invoke those methods. An example of such dynamic behavior would be MutableStringOps.Compare. If the latter is true you can just type the parameter to Digest CLR type and call its methods directly. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Dylan McClung Sent: Friday, November 27, 2009 9:34 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] handling ruby types and CallSiteStorage in std library I'm working on adding code to the OpenSSL extension of the standard library and I need to understand the design for invoking and typing Ruby code. I read the 'Modifying the sources' github page and it mentions using CallSiteStorage to call into Ruby code. Specifically, the Cipher ruby class has a dependency on the Digest ruby classes for the pkcs5_keyivgen method. An optional parameter for this method is an instance of the Ruby class Digest::Base. How would the type look, maybe Digest.Digest.Base digest/*optional*/? Or would it be an object and I'd also need to pass in CallSiteStorage to call methods on the object? An example in the standard library of such behavior would be much appreciated, thanks for any help. -- 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jimmy.Schementi at microsoft.com Thu Dec 17 14:14:10 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Thu, 17 Dec 2009 19:14:10 +0000 Subject: [Ironruby-core] Ruby Libraries ==> IronRuby In-Reply-To: <1B42307CD4AADD438CDDA2FE1121CC9205E8ED@TK5EX14MBXC141.redmond.corp.microsoft.com> References: <1B42307CD4AADD438CDDA2FE1121CC9205E8ED@TK5EX14MBXC141.redmond.corp.microsoft.com> Message-ID: <1B42307CD4AADD438CDDA2FE1121CC9205E9CC@TK5EX14MBXC141.redmond.corp.microsoft.com> Correction: replace ?Creative Commons? with CPL: http://www.opensource.org/licenses/cpl1.0.php From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jimmy Schementi Sent: Thursday, December 17, 2009 10:55 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Ruby Libraries ==> IronRuby For the rest of our ~10% missing Ruby built-in/library support, using code from Rubinius could possibly make more things work. I?d try this out for a library you care about that isn?t implemented, see if you can get all the specs passing for that, and report back. =) However, are you referring to ?C-library ports to Ruby? that are outside the Ruby stdlib (as in, 3rd party libs, gems, etc)? I don?t know of many of those existing, but probably because I haven?t been looking, but again if they do exist their doesn?t seem like anything wrong with trying to get them working on IronRuby for more 3rd party library support. The only issues I see is if they somehow use Rubinius only features. Another thing to be aware of is licensing; the IronRuby codebase is partitioned into three licenses, based on where we got the code from: Ms-Pl, Ruby license, and Creative Commons. If the intention is to commit these Ruby libraries into IronRuby to fill out our support, then we just need to be mindful of what license the incoming code. ~Jimmy From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ryan Riley Sent: Thursday, December 17, 2009 9:00 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Ruby Libraries ==> IronRuby Tomas's message below seems to reflect what I've been thinking lately. Does anyone else think that in many cases porting C libraries to Ruby or even reusing ports from the Rubinius project would be beneficial to getting more libraries running on IronRuby? I'm supposing that IR performance will continue to improve, and I like the idea of contributing to more than one project (or reusing someone else's work). Is that a good idea? Should we instead wait for FFI on IR? Or is all of this a case-by-case basis approach? I have nothing concrete in mind, atm, I'm just wondering "out loud." Cheers! Ryan Riley Email: ryan.riley at panesofglass.org LinkedIn: http://www.linkedin.com/in/ryanriley Blog: http://wizardsofsmart.net/ Twitter: @panesofglass Website: http://panesofglass.org/ On Fri, Nov 27, 2009 at 4:46 PM, Tomas Matousek > wrote: BTW: Since parts of the OpenSSL library are already written in Ruby (see ruby-1.8.6p368\lib\ruby\1.8\openssl directory) it might be easier to write the rest in Ruby as well. With calls to .NET implementation of the cryptographic algorithms, of course. If you chose to go that way you can add the scripts to Merlin\Main\Languages\Ruby\Libs. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek Sent: Friday, November 27, 2009 2:38 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] handling ruby types and CallSiteStorage in std library It depends whether the method is supposed to invoke Digest's methods dynamically or not. Does pkcs5_keyivgen method accept any Ruby object that implements the methods pkcs5_keyivgen calls? Or does it need to be an instance of Digest class? If the former is true than you need to use "object" as the parameter type and use dynamic call sites to invoke those methods. An example of such dynamic behavior would be MutableStringOps.Compare. If the latter is true you can just type the parameter to Digest CLR type and call its methods directly. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Dylan McClung Sent: Friday, November 27, 2009 9:34 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] handling ruby types and CallSiteStorage in std library I'm working on adding code to the OpenSSL extension of the standard library and I need to understand the design for invoking and typing Ruby code. I read the 'Modifying the sources' github page and it mentions using CallSiteStorage to call into Ruby code. Specifically, the Cipher ruby class has a dependency on the Digest ruby classes for the pkcs5_keyivgen method. An optional parameter for this method is an instance of the Ruby class Digest::Base. How would the type look, maybe Digest.Digest.Base digest/*optional*/? Or would it be an object and I'd also need to pass in CallSiteStorage to call methods on the object? An example in the standard library of such behavior would be much appreciated, thanks for any help. -- 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From vonWedel at web.de Fri Dec 18 03:12:09 2009 From: vonWedel at web.de (Lars Von Wedel) Date: Fri, 18 Dec 2009 09:12:09 +0100 Subject: [Ironruby-core] Problems installing rake Message-ID: <991087435@web.de> Hello, I installed Ironruby, mainly for the purpose of experimenting with rake. Using 'igem install rake' fails, I suspect due to authentication issues with the proxies on our company network. I then downloaded the rake sources as of 0.8.7 and ran 'ir install.rb' in the sources directory, but this doesn't seem to work either. What am I doing wrong or are there any other options to install rake for IronRuby ? Lars ___________________________________________________________ Preisknaller: WEB.DE DSL Flatrate f?r nur 16,99 Euro/mtl.! http://produkte.web.de/go/02/ From Jimmy.Schementi at microsoft.com Fri Dec 18 03:49:06 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Fri, 18 Dec 2009 08:49:06 +0000 Subject: [Ironruby-core] Problems installing rake In-Reply-To: <991087435@web.de> References: <991087435@web.de> Message-ID: <1B42307CD4AADD438CDDA2FE1121CC9205F394@TK5EX14MBXC141.redmond.corp.microsoft.com> What version of IronRuby are you using, and what is the error message you get in both cases (using gems and running the installer locally)? You probably just want to download the gem file for rake and install that locally. If you're OK with building from the IronRuby sources, we have rake pre-installed in that environment. > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Lars Von Wedel > Sent: Friday, December 18, 2009 12:12 AM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] Problems installing rake > > > Hello, > > I installed Ironruby, mainly for the purpose of experimenting with rake. > Using 'igem install rake' fails, I suspect due to authentication issues with > the proxies on our company network. > > I then downloaded the rake sources as of 0.8.7 and ran 'ir install.rb' in the > sources directory, but this doesn't seem to work either. > > What am I doing wrong or are there any other options to install rake for > IronRuby ? > > Lars > ___________________________________________________________ > Preisknaller: WEB.DE DSL Flatrate f?r nur 16,99 Euro/mtl.! > http://produkte.web.de/go/02/ > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From jay.turpin at intel.com Mon Dec 21 15:17:39 2009 From: jay.turpin at intel.com (Turpin, Jay) Date: Mon, 21 Dec 2009 13:17:39 -0700 Subject: [Ironruby-core] Problems installing rake In-Reply-To: <991087435@web.de> References: <991087435@web.de> Message-ID: <02EA1FD4E5205C48BE881A7ACE2F7C8C1313AA74CE@azsmsx502.amr.corp.intel.com> Did you setup the environment variable for your proxy? SET HTTP_PROXY=http://proxy.mycompany.com:2112 igem install rake --no-rdoc --no-ri irake --version Regards, Jay Turpin "Do, or do not. There is no 'try'. " - Yoda ('The Empire Strikes Back') From ayqazi at gmail.com Tue Dec 22 06:24:37 2009 From: ayqazi at gmail.com (Asfand Yar Qazi) Date: Tue, 22 Dec 2009 11:24:37 +0000 Subject: [Ironruby-core] Compiling Ruby classes to assemblies for use with Unity3D (which uses Mono 1.2.4) Message-ID: <79328ea80912220324o6c896c29wc3b3c6d9183d96e7@mail.gmail.com> Hi, I want to be able to use Ruby code in the Unity3D game engine, which embeds GNU Mono 1.2.4 to provide support for various languages (a ECMAScript-based language, Boo, and C# - they don't upgrade the ancient Mono version to keep compatibility with games designed for older versions of Unity3D). Forgive my use of terminology, I'm new to this .NET/Mono malarky :) I was told that I can product .NET 2 assemblies, plug them into Unity3D, and the classes will be accessible from the other languages. Will I be able to use IronRuby to create .NET 2 assemblies in this manner? Sorry for asking here, but the Unity3D people don't seem interested in Ruby as much, and I just can't live without coding in BDD style in a robust environment. Thanks. Regards, Asfand From ivan at flanders.co.nz Tue Dec 22 07:26:34 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Tue, 22 Dec 2009 13:26:34 +0100 Subject: [Ironruby-core] Compiling Ruby classes to assemblies for use with Unity3D (which uses Mono 1.2.4) In-Reply-To: <79328ea80912220324o6c896c29wc3b3c6d9183d96e7@mail.gmail.com> References: <79328ea80912220324o6c896c29wc3b3c6d9183d96e7@mail.gmail.com> Message-ID: You can't compile to an assembly with IronRuby at this point. But you can reference the ironruby interpreter library and host the ruby engine in your application to have it execute ruby files. http://ironruby.net/Documentation/.NET/Hosting But I don't think that will completely solve your issue though because to interop with CLR classes their definitions must exist in the CLR so you would probably have to build some bridges. the most straightforward way to do that is by defining CLR interfaces and adding them to IronRuby classes. public interface IRobot{ DeathAndDestructionMode ForgetAboutThe3Laws(); } in Ruby: require '/path/to/interfaces/assembly' class EvilBot include IRobot def forget_about_the_3_laws DeathAndDestructionMode.world_domination end end a consuming C# class could then get an object you created with your hosting code and still talk to it because of the CLR interface. If you're after testing then you can use ruby tools like bacon/rspec to test your C# code. The only thing that will be weird if you're going to use it this way is that ruby mockers have no clue what to do with CLR objects. I created a project that: a) accepts patches and contributions b) gives you mocking that knows about the CLR http://github.com/casualjim/caricature --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Tue, Dec 22, 2009 at 12:24 PM, Asfand Yar Qazi wrote: > Hi, > > I want to be able to use Ruby code in the Unity3D game engine, which > embeds GNU Mono 1.2.4 to provide support for various languages (a > ECMAScript-based language, Boo, and C# - they don't upgrade the > ancient Mono version to keep compatibility with games designed for > older versions of Unity3D). > > Forgive my use of terminology, I'm new to this .NET/Mono malarky :) > > I was told that I can product .NET 2 assemblies, plug them into > Unity3D, and the classes will be accessible from the other languages. > > Will I be able to use IronRuby to create .NET 2 assemblies in this manner? > > Sorry for asking here, but the Unity3D people don't seem interested in > Ruby as much, and I just can't live without coding in BDD style in a > robust environment. > > Thanks. Regards, > Asfand > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jb at nurv.fr Tue Dec 22 07:34:34 2009 From: jb at nurv.fr (Jb Evain) Date: Tue, 22 Dec 2009 13:34:34 +0100 Subject: [Ironruby-core] Compiling Ruby classes to assemblies for use with Unity3D (which uses Mono 1.2.4) In-Reply-To: <79328ea80912220324o6c896c29wc3b3c6d9183d96e7@mail.gmail.com> References: <79328ea80912220324o6c896c29wc3b3c6d9183d96e7@mail.gmail.com> Message-ID: <69f7d8470912220434u6e6f1590wdaecfb7d33f2b4b2@mail.gmail.com> Hey, On 12/22/09, Asfand Yar Qazi wrote: > I want to be able to use Ruby code in the Unity3D game engine, which > embeds GNU Mono 1.2.4 to provide support for various languages (a > ECMAScript-based language, Boo, and C# - they don't upgrade the > ancient Mono version to keep compatibility with games designed for > older versions of Unity3D). Mono 1.2.4 is most probably too old to support IronRuby and the DLR. -- Jb Evain From ayqazi at gmail.com Tue Dec 22 08:31:48 2009 From: ayqazi at gmail.com (Asfand Yar Qazi) Date: Tue, 22 Dec 2009 13:31:48 +0000 Subject: [Ironruby-core] Compiling Ruby classes to assemblies for use with Unity3D (which uses Mono 1.2.4) In-Reply-To: <69f7d8470912220434u6e6f1590wdaecfb7d33f2b4b2@mail.gmail.com> References: <79328ea80912220324o6c896c29wc3b3c6d9183d96e7@mail.gmail.com> <69f7d8470912220434u6e6f1590wdaecfb7d33f2b4b2@mail.gmail.com> Message-ID: <79328ea80912220531l42b9d417qfe13cf23d6621da3@mail.gmail.com> 2009/12/22 Jb Evain : > Hey, > > On 12/22/09, Asfand Yar Qazi wrote: >> ?I want to be able to use Ruby code in the Unity3D game engine, which >> ?embeds GNU Mono 1.2.4 to provide support for various languages (a >> ?ECMAScript-based language, Boo, and C# - they don't upgrade the >> ?ancient Mono version to keep compatibility with games designed for >> ?older versions of Unity3D). > > Mono 1.2.4 is most probably too old to support IronRuby and the DLR. Thanks for that, I can now stop chasing a pointless dream :) From lists at ruby-forum.com Tue Dec 22 17:10:25 2009 From: lists at ruby-forum.com (Alexandre Mutel) Date: Tue, 22 Dec 2009 23:10:25 +0100 Subject: [Ironruby-core] [ANN] IronRuby 1.0 RC1 In-Reply-To: <1B42307CD4AADD438CDDA2FE1121CC9205D28E@TK5EX14MBXC141.redmond.corp.microsoft.com> References: <1B42307CD4AADD438CDDA2FE1121CC9205D28E@TK5EX14MBXC141.redmond.corp.microsoft.com> Message-ID: <2cbf0fa52183f61558a7b7bb819ac2e6@ruby-forum.com> IronRuby project is really cool, looking forward for performance improvement, thanks for making Ruby available on .NET! -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Wed Dec 23 12:59:45 2009 From: lists at ruby-forum.com (Gordon Marsh) Date: Wed, 23 Dec 2009 18:59:45 +0100 Subject: [Ironruby-core] Testing with IronRuby Query Message-ID: <17a52d4e5eb8bd4b6ae75ba731cdf5c4@ruby-forum.com> Hi, I have just got IronRuby up and running. I'm intending on using it with Cucumber to test some of the DLLs on our server. It all seems to have been set up correctly and I have require'd one of the DLLs from a location on our server. I have access to the DLL's via a shared drive, but they are on a different machine to my own. The DLLs sit on the webserver in the bin directory within the wwwroot directory of an IIS server. The class interfaces are quite simple, but the DLLs do a lot of work calling other services, databases etc. Now, on my machine, where my test scripts are, if I import one of these DLLs using require 'mydll.dll' What does this actually do? 1) Does it make a copy of the DLL code which I can use but is running on my machine? Or; 2) Does it reference the DLL on the webserver itself such that I am running code on the webserver? I ask as to test the DLLs effectively they will need to have the same resources available to them as on the webserver (access to the DB etc). If the code is running on my machine, then I can't test effectively. Any advice appreciated.... Thanks, Gordon -- Posted via http://www.ruby-forum.com/. From ivan at flanders.co.nz Wed Dec 23 13:58:35 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Wed, 23 Dec 2009 19:58:35 +0100 Subject: [Ironruby-core] Testing with IronRuby Query In-Reply-To: <17a52d4e5eb8bd4b6ae75ba731cdf5c4@ruby-forum.com> References: <17a52d4e5eb8bd4b6ae75ba731cdf5c4@ruby-forum.com> Message-ID: when you do require 'MyAssembly.dll' ironruby looks in it's search paths to see if it can find the file in one of those locations. If it exists it will just load the file with Assembly.LoadFromPath Not much magic You may have to change the trust level in your .net security configuration to allow network locations but that counts for other .NET stuff too. --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Wed, Dec 23, 2009 at 6:59 PM, Gordon Marsh wrote: > Hi, > > I have just got IronRuby up and running. I'm intending on using it with > Cucumber to test some of the DLLs on our server. > > It all seems to have been set up correctly and I have require'd one of > the DLLs from a location on our server. I have access to the DLL's via a > shared drive, but they are on a different machine to my own. The DLLs > sit on the webserver in the bin directory within the wwwroot directory > of an IIS server. The class interfaces are quite simple, but the DLLs do > a lot of work calling other services, databases etc. > > Now, on my machine, where my test scripts are, if I import one of these > DLLs using > > require 'mydll.dll' > > What does this actually do? > > 1) Does it make a copy of the DLL code which I can use but is running > on my machine? Or; > 2) Does it reference the DLL on the webserver itself such that I am > running code on the webserver? > > I ask as to test the DLLs effectively they will need to have the same > resources available to them as on the webserver (access to the DB etc). > If the code is running on my machine, then I can't test effectively. > > Any advice appreciated.... > > Thanks, > > Gordon > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ruby-forum.com Sat Dec 26 06:12:34 2009 From: lists at ruby-forum.com (James Leskovar) Date: Sat, 26 Dec 2009 12:12:34 +0100 Subject: [Ironruby-core] Handling runtime errors in embedded applications Message-ID: <2bf821a55ad665ba38567e9edf385cf4@ruby-forum.com> Hi there, So my application is basically a lightweight IDE for IronRuby, built in C#, with the idea that users should be able to quickly edit and prototype ruby scripts. Part of the application's requirements is to have the ability to handle compilation/syntax errors and runtime exceptions, as well as the ability to 'jump to' the source of errors. At the moment, I'm wrapping CreateScriptSourceFromFile, Compile and Execute within a try/catch. Syntax errors are easily handled with a custom ErrorListener passed into ScriptSource.Compile. Handling runtime errors though are a little bit more tricky; the easiest way I've found so far involves RubyExceptionData.GetInstance and a linq expression to parse the backtrace with regexes. Not the most elegant solution, but it works. However, one area where this method falls flat is when the error occurs in a thread created within the script itself; execution is now outside the try/catch, so I'm not able to catch the Exception object. Futhermore, nothing seems to happen when the error does occur; nothing gets written to the errorstream, nor is there any indication of any error. It seems like the only way to handle these thread errors is to do it within the script using a begin-rescue block. My question is, is there an easier way to get runtime error information other than RubyExceptionData? Additionally, what is the best way to handle errors when they occur in a thread other than the one which calls Execute()? It would be handy to be able to set some sort of global 'ErrorListener', or perhaps have the ability to pass in such an object to the call to Execute. Kind regards, James -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Mon Dec 28 09:58:26 2009 From: lists at ruby-forum.com (Ameer Deen) Date: Mon, 28 Dec 2009 15:58:26 +0100 Subject: [Ironruby-core] Using IronRuby from Ruby (newbie) Message-ID: Hello, I'm working in an environment that's very Ruby heavy and I've never used ruby before. I need to be able to access Windows performance counters in from a Windows service is written in native Ruby (not IronRuby). I'm traditionally a C# and JAVA programmer. I was wondering if it might be possible for Ruby to be able to access the .Net System.Diagnostics performance counters via IronRuby. Of course, if there's a much simpler way I'm all ears. I tried searching the forum and it seems my searching skills are not up to par and apologize if this has been already answered. Thanks in advance for any help. Ameer. -- Posted via http://www.ruby-forum.com/. From shay.friedman at gmail.com Mon Dec 28 10:12:42 2009 From: shay.friedman at gmail.com (Shay Friedman) Date: Mon, 28 Dec 2009 17:12:42 +0200 Subject: [Ironruby-core] Using IronRuby from Ruby (newbie) In-Reply-To: References: Message-ID: You can access System.Diagnostics via IronRuby. However, you will have to use the IronRuby interpreter to run your native ruby code, which is something I guess you are not willing to do (yet). Maybe you'd better look for a gem or a Ruby library that simplifies performance counter access... Thanks, Shay. -------------------------------------------------- Shay Friedman Author of IronRuby Unleashed http://www.IronShay.com Follow me: http://twitter.com/ironshay On Mon, Dec 28, 2009 at 4:58 PM, Ameer Deen wrote: > Hello, > > I'm working in an environment that's very Ruby heavy and I've never used > ruby before. I need to be able to access Windows performance counters in > from a Windows service is written in native Ruby (not IronRuby). I'm > traditionally a C# and JAVA programmer. > > I was wondering if it might be possible for Ruby to be able to access > the .Net System.Diagnostics performance counters via IronRuby. Of > course, if there's a much simpler way I'm all ears. > > I tried searching the forum and it seems my searching skills are not up > to par and apologize if this has been already answered. Thanks in > advance for any help. > > > Ameer. > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jimmy.Schementi at microsoft.com Mon Dec 28 10:43:51 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Mon, 28 Dec 2009 15:43:51 +0000 Subject: [Ironruby-core] Using IronRuby from Ruby (newbie) In-Reply-To: References: Message-ID: <1B42307CD4AADD438CDDA2FE1121CC92063EBD@TK5EX14MBXC141.redmond.corp.microsoft.com> To access the .NET framework from MRI (the Ruby implementation you are currently using), your best bet is to use RubyCLR: http://rubyforge.org/projects/rubyclr/. It is a native bridge between Ruby and the CLR, using Ruby's Win32OLE support to talk directly to the CLR hosting APIs. ~js ________________________________________ From: ironruby-core-bounces at rubyforge.org [ironruby-core-bounces at rubyforge.org] on behalf of Ameer Deen [lists at ruby-forum.com] Sent: Monday, December 28, 2009 6:58 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Using IronRuby from Ruby (newbie) Hello, I'm working in an environment that's very Ruby heavy and I've never used ruby before. I need to be able to access Windows performance counters in from a Windows service is written in native Ruby (not IronRuby). I'm traditionally a C# and JAVA programmer. I was wondering if it might be possible for Ruby to be able to access the .Net System.Diagnostics performance counters via IronRuby. Of course, if there's a much simpler way I'm all ears. I tried searching the forum and it seems my searching skills are not up to par and apologize if this has been already answered. Thanks in advance for any help. Ameer. -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From jdeville at microsoft.com Mon Dec 28 15:56:37 2009 From: jdeville at microsoft.com (Jim Deville) Date: Mon, 28 Dec 2009 20:56:37 +0000 Subject: [Ironruby-core] Code Review: utr In-Reply-To: <7CEEC335D70FFE4B957737DDE836F51B1897C47B@TK5EX14MBXC123.redmond.corp.microsoft.com> References: <7CEEC335D70FFE4B957737DDE836F51B1897C47B@TK5EX14MBXC123.redmond.corp.microsoft.com> Message-ID: I know I was having issues with python tests while you were gone, but that wasn't one of them. I don't know how it got disabled. Sorry. JD -----Original Message----- From: Dave Fugate Sent: Monday, December 28, 2009 10:40 AM To: Jim Deville; IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: RE: Code Review: utr Why was test_ipyw.py disabled? This isn't a Ruby test. Dave -----Original Message----- From: Jim Deville Sent: Tuesday, December 08, 2009 12:25 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org; Dave Fugate Subject: Code Review: utr I would like to get this reviewed by Dave or Shri before I submit if they can get to email. JD tfpt review "/shelveset:utr;REDMOND\jdeville" Comment : Unifies the test runner for Test::Unit. I've really just removed the duplication found in the various *Tests.rb files in Ruby\Tests\Scripts. I've adjusted all affected scripts: * irtests * generate_test-unit_tags.rb * rake.generictest * rubygems.generictest Usage of utr: utr testname will run the tests setup by the file testname_tests.rb, thus utr gem will run the Gem tests. Passing the -all flag will ignore the skipped tests and run all tests, this currently doesn't work for gems, but I will be removing our custom skips and going back to the monkeypatching model. Eventually, I will implement a -list flag to list all tests utr can see. From Jimmy.Schementi at microsoft.com Mon Dec 28 21:27:28 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Tue, 29 Dec 2009 02:27:28 +0000 Subject: [Ironruby-core] Handling runtime errors in embedded applications In-Reply-To: <2bf821a55ad665ba38567e9edf385cf4@ruby-forum.com> References: <2bf821a55ad665ba38567e9edf385cf4@ruby-forum.com> Message-ID: <1B42307CD4AADD438CDDA2FE1121CC92063EF0@TK5EX14MBXC141.redmond.corp.microsoft.com> James, To be up-front, your requirements are all possible with IronRuby. For syntax errors, you're doing the right thing by using ScriptSource.Compile(ErrorListener). For runtime errors, this gets trickier since all IronRuby runtime errors are also actual CLR exceptions, so you need to depend on the CLR's exception catching mechanisms to detect runtime errors and have your application react accordingly. While using try/catch is one way to simply capture exceptions, as you say, it doesn't cover all cases like catching exceptions from other threads. To solve this, you can hook the CLR's ApplicationUnhandedException event to catch all exceptions from code executing in an AppDomain: public static void Main() { AppDomain currentDomain = AppDomain.CurrentDomain; currentDomain.UnhandledException += new UnhandledExceptionEventHandler(MyHandler); try { throw new Exception("1"); } catch (Exception e) { Console.WriteLine("Catch clause caught : " + e.Message); } throw new Exception("2"); // Output: // Catch clause caught : 1 // MyHandler caught : 2 } static void MyHandler(object sender, UnhandledExceptionEventArgs args) { Exception e = (Exception) args.ExceptionObject; Console.WriteLine("MyHandler caught : " + e.Message); } AppDomain.UnhandedException documentation: http://msdn.microsoft.com/en-us/library/system.appdomain.unhandledexception.aspx. Now that you have a reliable way of capturing the actual exception object, you need to do something useful with it. Rather than using RubyExceptionData, it's preferred to use the DLR hosting API: "ScriptEngine.GetService()". This gives you a ExceptionOperations type, which you can use to format an exception as the language defines. However, it sounds like you'd rather get a list of stack frames to iterate through, and get information about the frame, rather than just a stacktrace string. You can get the actual dynamic stack frames with ScriptingRuntimeHelpers.GetDynamicStackFrames(exception), which will give you a DynamicStackFrame[] to iterate through, and pull out filenames, line numbers, and method names, without resorting to a regex. Does that answer all your questions? ~Jimmy ________________________________________ From: ironruby-core-bounces at rubyforge.org [ironruby-core-bounces at rubyforge.org] on behalf of James Leskovar [lists at ruby-forum.com] Sent: Saturday, December 26, 2009 3:12 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Handling runtime errors in embedded applications Hi there, So my application is basically a lightweight IDE for IronRuby, built in C#, with the idea that users should be able to quickly edit and prototype ruby scripts. Part of the application's requirements is to have the ability to handle compilation/syntax errors and runtime exceptions, as well as the ability to 'jump to' the source of errors. At the moment, I'm wrapping CreateScriptSourceFromFile, Compile and Execute within a try/catch. Syntax errors are easily handled with a custom ErrorListener passed into ScriptSource.Compile. Handling runtime errors though are a little bit more tricky; the easiest way I've found so far involves RubyExceptionData.GetInstance and a linq expression to parse the backtrace with regexes. Not the most elegant solution, but it works. However, one area where this method falls flat is when the error occurs in a thread created within the script itself; execution is now outside the try/catch, so I'm not able to catch the Exception object. Futhermore, nothing seems to happen when the error does occur; nothing gets written to the errorstream, nor is there any indication of any error. It seems like the only way to handle these thread errors is to do it within the script using a begin-rescue block. My question is, is there an easier way to get runtime error information other than RubyExceptionData? Additionally, what is the best way to handle errors when they occur in a thread other than the one which calls Execute()? It would be handy to be able to set some sort of global 'ErrorListener', or perhaps have the ability to pass in such an object to the call to Execute. Kind regards, James -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From Tomas.Matousek at microsoft.com Tue Dec 29 03:46:01 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 29 Dec 2009 08:46:01 +0000 Subject: [Ironruby-core] Handling runtime errors in embedded applications In-Reply-To: <1B42307CD4AADD438CDDA2FE1121CC92063EF0@TK5EX14MBXC141.redmond.corp.microsoft.com> References: <2bf821a55ad665ba38567e9edf385cf4@ruby-forum.com> <1B42307CD4AADD438CDDA2FE1121CC92063EF0@TK5EX14MBXC141.redmond.corp.microsoft.com> Message-ID: <4B342496A3EFEB48839E10BB4BF5964C1829A33B@TK5EX14MBXC129.redmond.corp.microsoft.com> ScriptingRuntimeHelpers.GetDynamicStackFrames does not work for IronRuby frames though, only Python is using this technique of stack tracing. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jimmy Schementi Sent: Tuesday, December 29, 2009 3:27 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Handling runtime errors in embedded applications James, To be up-front, your requirements are all possible with IronRuby. For syntax errors, you're doing the right thing by using ScriptSource.Compile(ErrorListener). For runtime errors, this gets trickier since all IronRuby runtime errors are also actual CLR exceptions, so you need to depend on the CLR's exception catching mechanisms to detect runtime errors and have your application react accordingly. While using try/catch is one way to simply capture exceptions, as you say, it doesn't cover all cases like catching exceptions from other threads. To solve this, you can hook the CLR's ApplicationUnhandedException event to catch all exceptions from code executing in an AppDomain: public static void Main() { AppDomain currentDomain = AppDomain.CurrentDomain; currentDomain.UnhandledException += new UnhandledExceptionEventHandler(MyHandler); try { throw new Exception("1"); } catch (Exception e) { Console.WriteLine("Catch clause caught : " + e.Message); } throw new Exception("2"); // Output: // Catch clause caught : 1 // MyHandler caught : 2 } static void MyHandler(object sender, UnhandledExceptionEventArgs args) { Exception e = (Exception) args.ExceptionObject; Console.WriteLine("MyHandler caught : " + e.Message); } AppDomain.UnhandedException documentation: http://msdn.microsoft.com/en-us/library/system.appdomain.unhandledexception.aspx. Now that you have a reliable way of capturing the actual exception object, you need to do something useful with it. Rather than using RubyExceptionData, it's preferred to use the DLR hosting API: "ScriptEngine.GetService()". This gives you a ExceptionOperations type, which you can use to format an exception as the language defines. However, it sounds like you'd rather get a list of stack frames to iterate through, and get information about the frame, rather than just a stacktrace string. You can get the actual dynamic stack frames with ScriptingRuntimeHelpers.GetDynamicStackFrames(exception), which will give you a DynamicStackFrame[] to iterate through, and pull out filenames, line numbers, and method names, without resorting to a regex. Does that answer all your questions? ~Jimmy ________________________________________ From: ironruby-core-bounces at rubyforge.org [ironruby-core-bounces at rubyforge.org] on behalf of James Leskovar [lists at ruby-forum.com] Sent: Saturday, December 26, 2009 3:12 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Handling runtime errors in embedded applications Hi there, So my application is basically a lightweight IDE for IronRuby, built in C#, with the idea that users should be able to quickly edit and prototype ruby scripts. Part of the application's requirements is to have the ability to handle compilation/syntax errors and runtime exceptions, as well as the ability to 'jump to' the source of errors. At the moment, I'm wrapping CreateScriptSourceFromFile, Compile and Execute within a try/catch. Syntax errors are easily handled with a custom ErrorListener passed into ScriptSource.Compile. Handling runtime errors though are a little bit more tricky; the easiest way I've found so far involves RubyExceptionData.GetInstance and a linq expression to parse the backtrace with regexes. Not the most elegant solution, but it works. However, one area where this method falls flat is when the error occurs in a thread created within the script itself; execution is now outside the try/catch, so I'm not able to catch the Exception object. Futhermore, nothing seems to happen when the error does occur; nothing gets written to the errorstream, nor is there any indication of any error. It seems like the only way to handle these thread errors is to do it within the script using a begin-rescue block. My question is, is there an easier way to get runtime error information other than RubyExceptionData? Additionally, what is the best way to handle errors when they occur in a thread other than the one which calls Execute()? It would be handy to be able to set some sort of global 'ErrorListener', or perhaps have the ability to pass in such an object to the call to Execute. Kind regards, James -- 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 From Jimmy.Schementi at microsoft.com Tue Dec 29 10:50:04 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Tue, 29 Dec 2009 15:50:04 +0000 Subject: [Ironruby-core] Handling runtime errors in embedded applications In-Reply-To: <4B342496A3EFEB48839E10BB4BF5964C1829A33B@TK5EX14MBXC129.redmond.corp.microsoft.com> References: <2bf821a55ad665ba38567e9edf385cf4@ruby-forum.com> <1B42307CD4AADD438CDDA2FE1121CC92063EF0@TK5EX14MBXC141.redmond.corp.microsoft.com> <4B342496A3EFEB48839E10BB4BF5964C1829A33B@TK5EX14MBXC129.redmond.corp.microsoft.com> Message-ID: Oh really? Is there any way to get a to the dynamic stack trace info without parsing it yourself? ~Jimmy On Dec 29, 2009, at 12:51 AM, "Tomas Matousek" wrote: > ScriptingRuntimeHelpers.GetDynamicStackFrames does not work for > IronRuby frames though, only Python is using this technique of stack > tracing. > > Tomas > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Jimmy Schementi > Sent: Tuesday, December 29, 2009 3:27 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Handling runtime errors in embedded > applications > > James, > > To be up-front, your requirements are all possible with IronRuby. > > For syntax errors, you're doing the right thing by using > ScriptSource.Compile(ErrorListener). > > For runtime errors, this gets trickier since all IronRuby runtime > errors are also actual CLR exceptions, so you need to depend on the > CLR's exception catching mechanisms to detect runtime errors and > have your application react accordingly. While using try/catch is > one way to simply capture exceptions, as you say, it doesn't cover > all cases like catching exceptions from other threads. To solve > this, you can hook the CLR's ApplicationUnhandedException event to > catch all exceptions from code executing in an AppDomain: > > public static void Main() { > AppDomain currentDomain = AppDomain.CurrentDomain; > currentDomain.UnhandledException += new > UnhandledExceptionEventHandler(MyHandler); > try { > throw new Exception("1"); > } catch (Exception e) { > Console.WriteLine("Catch clause caught : " + e.Message); > } > throw new Exception("2"); > // Output: > // Catch clause caught : 1 > // MyHandler caught : 2 > } > static void MyHandler(object sender, UnhandledExceptionEventArgs > args) { > Exception e = (Exception) args.ExceptionObject; > Console.WriteLine("MyHandler caught : " + e.Message); > } > > AppDomain.UnhandedException documentation: http://msdn.microsoft.com/en-us/library/system.appdomain.unhandledexception.aspx > . > > Now that you have a reliable way of capturing the actual exception > object, you need to do something useful with it. Rather than using > RubyExceptionData, it's preferred to use the DLR hosting API: > "ScriptEngine.GetService()". This gives you a > ExceptionOperations type, which you can use to format an exception > as the language defines. > > However, it sounds like you'd rather get a list of stack frames to > iterate through, and get information about the frame, rather than > just a stacktrace string. You can get the actual dynamic stack > frames with ScriptingRuntimeHelpers.GetDynamicStackFrames > (exception), which will give you a DynamicStackFrame[] to iterate > through, and pull out filenames, line numbers, and method names, > without resorting to a regex. > > Does that answer all your questions? > > ~Jimmy > ________________________________________ > From: ironruby-core-bounces at rubyforge.org [ironruby-core- > bounces at rubyforge.org] on behalf of James Leskovar [lists at ruby- > forum.com] > Sent: Saturday, December 26, 2009 3:12 AM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] Handling runtime errors in embedded > applications > > Hi there, > > So my application is basically a lightweight IDE for IronRuby, built > in C#, with the idea that users should be able to quickly edit and > prototype ruby scripts. Part of the application's requirements is to > have the ability to handle compilation/syntax errors and runtime > exceptions, as well as the ability to 'jump to' the source of errors. > > At the moment, I'm wrapping CreateScriptSourceFromFile, Compile and > Execute within a try/catch. Syntax errors are easily handled with a > custom ErrorListener passed into ScriptSource.Compile. Handling > runtime errors though are a little bit more tricky; the easiest way > I've found so far involves RubyExceptionData.GetInstance and a linq > expression to parse the backtrace with regexes. Not the most elegant > solution, but it works. > > However, one area where this method falls flat is when the error > occurs in a thread created within the script itself; execution is > now outside the try/catch, so I'm not able to catch the Exception > object. > Futhermore, nothing seems to happen when the error does occur; > nothing gets written to the errorstream, nor is there any indication > of any error. It seems like the only way to handle these thread > errors is to do it within the script using a begin-rescue block. > > My question is, is there an easier way to get runtime error > information other than RubyExceptionData? Additionally, what is the > best way to handle errors when they occur in a thread other than the > one which calls Execute()? It would be handy to be able to set some > sort of global 'ErrorListener', or perhaps have the ability to pass > in such an object to the call to Execute. > > Kind regards, > James > -- > 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 > From lists at ruby-forum.com Tue Dec 29 19:26:16 2009 From: lists at ruby-forum.com (James Leskovar) Date: Wed, 30 Dec 2009 01:26:16 +0100 Subject: [Ironruby-core] Handling runtime errors in embedded applications In-Reply-To: <1B42307CD4AADD438CDDA2FE1121CC92063EF0@TK5EX14MBXC141.redmond.corp.microsoft.com> References: <2bf821a55ad665ba38567e9edf385cf4@ruby-forum.com> <1B42307CD4AADD438CDDA2FE1121CC92063EF0@TK5EX14MBXC141.redmond.corp.microsoft.com> Message-ID: <150744b1d22a8e137dac869aa5174d9c@ruby-forum.com> Unfortunantly, the problem with setting the unhandled exception event is that there's no way to 'recover' from the exception; the application terminates immediately after the event. Additionally, this method doesn't seem to work for exceptions within threads: class Program { static void Main(string[] args) { AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(MyExceptionHandler); Console.WriteLine("Creating engine"); var engine = Ruby.CreateEngine(); engine.Execute("Thread.start { puts 'raising exception...'; raise Exception, 'my exception'; puts 'not reached'; }"); Console.WriteLine("Done"); Console.ReadKey(true); } static void MyExceptionHandler(object sender, UnhandledExceptionEventArgs e) { Console.WriteLine("Caught " + ((Exception)e.ExceptionObject).Message); } } On my box (IronRuby 0.9.2, .NET 3.5sp1), the output is Creating engine Done raising exception... and then blocks on the call to ReadKey, without ever calling MyExceptionHandler. Again, the current workaround is to use a begin-rescue inside the thread proc, which isn't too terrible. One possible solution would probably be to reopen Thread.start so that it wraps the given block with begin-rescue, and then pass the exception object onto my host object for invoking onerror events. Jimmy Schementi wrote: > To solve this, you can hook the > CLR's ApplicationUnhandedException event to catch all exceptions from > code executing in an AppDomain: -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Tue Dec 29 21:00:21 2009 From: lists at ruby-forum.com (Ameer Deen) Date: Wed, 30 Dec 2009 03:00:21 +0100 Subject: [Ironruby-core] Using IronRuby from Ruby (newbie) In-Reply-To: References: Message-ID: Shay Friedman wrote: > You can access System.Diagnostics via IronRuby. However, you will have > to > use the IronRuby interpreter to run your native ruby code, which is > something I guess you are not willing to do (yet). > > Maybe you'd better look for a gem or a Ruby library that simplifies > performance counter access... > > Thanks, > Shay. > > -------------------------------------------------- > Shay Friedman > Author of IronRuby Unleashed > http://www.IronShay.com > Follow me: http://twitter.com/ironshay Hi there Shay, I'm not sure if I can run this existing ruby service (called collectd) on IronRuby instead and I need to investigate that so your right about the yet :). I'll see if I can find a gem that can do what I'm looking for. Thanks for the help. Ameer. -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Tue Dec 29 21:03:41 2009 From: lists at ruby-forum.com (Ameer Deen) Date: Wed, 30 Dec 2009 03:03:41 +0100 Subject: [Ironruby-core] Using IronRuby from Ruby (newbie) In-Reply-To: <1B42307CD4AADD438CDDA2FE1121CC92063EBD@TK5EX14MBXC141.redmond.corp.microsoft.com> References: <1B42307CD4AADD438CDDA2FE1121CC92063EBD@TK5EX14MBXC141.redmond.corp.microsoft.com> Message-ID: Hi there Jimmy, This looks very promising. Thanks very much for the pointer. Ameer. Jimmy Schementi wrote: > To access the .NET framework from MRI (the Ruby implementation you are > currently using), your best bet is to use RubyCLR: > http://rubyforge.org/projects/rubyclr/. It is a native bridge between > Ruby and the CLR, using Ruby's Win32OLE support to talk directly to the > CLR hosting APIs. > > ~js -- Posted via http://www.ruby-forum.com/. From Jimmy.Schementi at microsoft.com Tue Dec 29 21:46:08 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Wed, 30 Dec 2009 02:46:08 +0000 Subject: [Ironruby-core] Handling runtime errors in embedded applications In-Reply-To: <150744b1d22a8e137dac869aa5174d9c@ruby-forum.com> References: <2bf821a55ad665ba38567e9edf385cf4@ruby-forum.com> <1B42307CD4AADD438CDDA2FE1121CC92063EF0@TK5EX14MBXC141.redmond.corp.microsoft.com>, <150744b1d22a8e137dac869aa5174d9c@ruby-forum.com> Message-ID: <1B42307CD4AADD438CDDA2FE1121CC92064A68@TK5EX14MBXC141.redmond.corp.microsoft.com> UnhandledException *does* have the feature to not terminate the process; you need to do "e.Handled = true;" in your exception handler to tell the CLR that the exception has been properly handled. If you don't set it, the CLR doesn't see the exception as handled and continues propagating the exception, which will eventually terminate the process. I was pretty sure it worked for Threads as well, since all threads are still bound to the current AppDomain, but let me know if your fixed exception handler still doesn't solve this. However, your work-around will work in the meantime. ~js ________________________________________ From: ironruby-core-bounces at rubyforge.org [ironruby-core-bounces at rubyforge.org] on behalf of James Leskovar [lists at ruby-forum.com] Sent: Tuesday, December 29, 2009 4:26 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Handling runtime errors in embedded applications Unfortunantly, the problem with setting the unhandled exception event is that there's no way to 'recover' from the exception; the application terminates immediately after the event. Additionally, this method doesn't seem to work for exceptions within threads: class Program { static void Main(string[] args) { AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(MyExceptionHandler); Console.WriteLine("Creating engine"); var engine = Ruby.CreateEngine(); engine.Execute("Thread.start { puts 'raising exception...'; raise Exception, 'my exception'; puts 'not reached'; }"); Console.WriteLine("Done"); Console.ReadKey(true); } static void MyExceptionHandler(object sender, UnhandledExceptionEventArgs e) { Console.WriteLine("Caught " + ((Exception)e.ExceptionObject).Message); } } On my box (IronRuby 0.9.2, .NET 3.5sp1), the output is Creating engine Done raising exception... and then blocks on the call to ReadKey, without ever calling MyExceptionHandler. Again, the current workaround is to use a begin-rescue inside the thread proc, which isn't too terrible. One possible solution would probably be to reopen Thread.start so that it wraps the given block with begin-rescue, and then pass the exception object onto my host object for invoking onerror events. Jimmy Schementi wrote: > To solve this, you can hook the > CLR's ApplicationUnhandedException event to catch all exceptions from > code executing in an AppDomain: -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From Idgy at yandex.ru Wed Dec 30 05:33:31 2009 From: Idgy at yandex.ru (=?koi8-r?B?6czY0Q==?=) Date: Wed, 30 Dec 2009 13:33:31 +0300 Subject: [Ironruby-core] Using IronRuby from Ruby (newbie) In-Reply-To: References: <1B42307CD4AADD438CDDA2FE1121CC92063EBD@TK5EX14MBXC141.redmond.corp.microsoft.com> Message-ID: <4961262169211@webmail22.yandex.ru> To high speed access the .NET framework from Ruby you can write own Ruby extension on C++/CLI. So you can create custom wrapper for .NET class and optimize them for your needs. From Jimmy.Schementi at microsoft.com Wed Dec 30 13:40:29 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Wed, 30 Dec 2009 18:40:29 +0000 Subject: [Ironruby-core] Using IronRuby from Ruby (newbie) In-Reply-To: <4961262169211@webmail22.yandex.ru> References: <1B42307CD4AADD438CDDA2FE1121CC92063EBD@TK5EX14MBXC141.redmond.corp.microsoft.com> <4961262169211@webmail22.yandex.ru> Message-ID: Yeah, RubyCLR is that. On Dec 30, 2009, at 2:41 AM, "????" wrote: > To high speed access the .NET framework from Ruby you can write own > Ruby extension on C++/CLI. So you can create custom wrapper for .NET > class and optimize them for your needs. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > From jdeville at microsoft.com Wed Dec 30 15:53:26 2009 From: jdeville at microsoft.com (Jim Deville) Date: Wed, 30 Dec 2009 20:53:26 +0000 Subject: [Ironruby-core] Code Review: regressions Message-ID: tfpt review "/shelveset:regressions;REDMOND\jdeville" Comment : Closes the following bugs: http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=3196 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=2118 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=2044 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=2217 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=2912 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=2962 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1920 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=2116 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1353 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1354 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1651 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=2051 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=2892 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=2827 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=2514 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=2654 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=2191 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=2190 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1558 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1486 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1485 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=923 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=597 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1483 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=2421 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: regressions.diff Type: application/octet-stream Size: 69567 bytes Desc: regressions.diff URL: From jdeville at microsoft.com Wed Dec 30 15:54:55 2009 From: jdeville at microsoft.com (Jim Deville) Date: Wed, 30 Dec 2009 20:54:55 +0000 Subject: [Ironruby-core] Code Review: regressions In-Reply-To: References: Message-ID: This is currently in snap, I meant it as a test only job, but since I forgot that flag, I'm just letting it run to see how it does. JD From: Jim Deville Sent: Wednesday, December 30, 2009 12:53 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: regressions tfpt review "/shelveset:regressions;REDMOND\jdeville" Comment : Closes the following bugs: http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=3196 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=2118 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=2044 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=2217 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=2912 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=2962 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1920 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=2116 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1353 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1354 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1651 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=2051 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=2892 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=2827 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=2514 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=2654 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=2191 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=2190 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1558 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1486 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1485 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=923 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=597 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1483 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=2421 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jimmy.Schementi at microsoft.com Wed Dec 30 17:23:21 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Wed, 30 Dec 2009 22:23:21 +0000 Subject: [Ironruby-core] Testing with IronRuby Query In-Reply-To: References: <17a52d4e5eb8bd4b6ae75ba731cdf5c4@ruby-forum.com> Message-ID: <1B42307CD4AADD438CDDA2FE1121CC9206540F@TK5EX14MBXC141.redmond.corp.microsoft.com> Gordon, I?m a bit confused about what you?re trying to do ? let me see if I understand ? > It all seems to have been set up correctly and I have require'd one of > the DLLs from a location on our server. I have access to the DLL's via a > shared drive, but they are on a different machine to my own. The DLLs > sit on the webserver in the bin directory within the wwwroot directory > of an IIS server. The class interfaces are quite simple, but the DLLs do > a lot of work calling other services, databases etc. So you have a bunch of DLLs you want to use in IronRuby, and they are located on a shared drive on a different machine than where you want to run IronRuby on? Because Windows treats a shared drive just like a local drive, IronRuby will be able to access these files just fine. > Now, on my machine, where my test scripts are, if I import one of these > DLLs using > > require 'mydll.dll' > > What does this actually do? > > 1) Does it make a copy of the DLL code which I can use but is running > on my machine? Or; > 2) Does it reference the DLL on the webserver itself such that I am > running code on the webserver? > > I ask as to test the DLLs effectively they will need to have the same > resources available to them as on the webserver (access to the DB etc). > If the code is running on my machine, then I can't test effectively. All execution is happening on the machine running IronRuby; the DLLs bits are just being loaded from the shared drive. It sounds like that?s not what you want, as you need those DLLs be in their production environment to work correctly. To test those DLLs effectively, you either need to run IronRuby on the same machine as where those binaries will work, or you need to make those binaries work on your dev machine. Keep in mind this is not a limitation of IronRuby; the problem you are trying to solve is not a job for just a programming language. Sounds like you?d ideally want a web-service on your server so you can expose functionality you want to test to your dev machines. Or even something like remote procedure calls. But I?d just test these binaries in a special environment where the web services are mocked out; testing things in production is always tricky, and not always worth it. ~js From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Wednesday, December 23, 2009 10:59 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Testing with IronRuby Query when you do require 'MyAssembly.dll' ironruby looks in it's search paths to see if it can find the file in one of those locations. If it exists it will just load the file with Assembly.LoadFromPath Not much magic You may have to change the trust level in your .net security configuration to allow network locations but that counts for other .NET stuff too. --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Wed, Dec 23, 2009 at 6:59 PM, Gordon Marsh > wrote: Hi, I have just got IronRuby up and running. I'm intending on using it with Cucumber to test some of the DLLs on our server. It all seems to have been set up correctly and I have require'd one of the DLLs from a location on our server. I have access to the DLL's via a shared drive, but they are on a different machine to my own. The DLLs sit on the webserver in the bin directory within the wwwroot directory of an IIS server. The class interfaces are quite simple, but the DLLs do a lot of work calling other services, databases etc. Now, on my machine, where my test scripts are, if I import one of these DLLs using require 'mydll.dll' What does this actually do? 1) Does it make a copy of the DLL code which I can use but is running on my machine? Or; 2) Does it reference the DLL on the webserver itself such that I am running code on the webserver? I ask as to test the DLLs effectively they will need to have the same resources available to them as on the webserver (access to the DB etc). If the code is running on my machine, then I can't test effectively. Any advice appreciated.... Thanks, Gordon -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdeville at microsoft.com Wed Dec 30 17:56:02 2009 From: jdeville at microsoft.com (Jim Deville) Date: Wed, 30 Dec 2009 22:56:02 +0000 Subject: [Ironruby-core] Code Review: tzinfo2 Message-ID: tfpt review "/shelveset:tzinfo2;REDMOND\jdeville" Comment : Rechecks in tzinfo gem and a few related gems needed for Rails 3 and other recent checkins. Also re-enables the tzinfo tests in snap. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: tzinfo2.diff Type: application/octet-stream Size: 792219 bytes Desc: tzinfo2.diff URL: From lists at ruby-forum.com Thu Dec 31 09:23:36 2009 From: lists at ruby-forum.com (Ameer Deen) Date: Thu, 31 Dec 2009 15:23:36 +0100 Subject: [Ironruby-core] Iron Ruby Windows Service Message-ID: Hello there, I am trying to find some pointers on how I might create a Windows Service running on IronRuby. Any pointers would be appreciated. Thank you. Ameer Deen. -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Thu Dec 31 09:26:49 2009 From: lists at ruby-forum.com (Ameer Deen) Date: Thu, 31 Dec 2009 15:26:49 +0100 Subject: [Ironruby-core] Iron Ruby Windows Service In-Reply-To: References: Message-ID: Would this be the answer? http://raa.ruby-lang.org/project/win32-service/ Ameer Deen wrote: > Hello there, > > I am trying to find some pointers on how I might create a Windows > Service running on IronRuby. Any pointers would be appreciated. Thank > you. > > Ameer Deen. -- Posted via http://www.ruby-forum.com/. From ivan at flanders.co.nz Thu Dec 31 09:51:44 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Thu, 31 Dec 2009 15:51:44 +0100 Subject: [Ironruby-core] Iron Ruby Windows Service In-Reply-To: References: Message-ID: win32-service lets you control services This lets you create services. ultimately you're running ir.exe a C# program with a bunch of command line parameters http://social.msdn.microsoft.com/forums/en-US/csharpgeneral/thread/d8f300e3-6c09-424f-829e-c5fda34c1bc7 --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Thu, Dec 31, 2009 at 3:26 PM, Ameer Deen wrote: > Would this be the answer? > > http://raa.ruby-lang.org/project/win32-service/ > > > Ameer Deen wrote: > > Hello there, > > > > I am trying to find some pointers on how I might create a Windows > > Service running on IronRuby. Any pointers would be appreciated. Thank > > you. > > > > Ameer Deen. > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ruby-forum.com Thu Dec 31 18:23:28 2009 From: lists at ruby-forum.com (Ameer Deen) Date: Fri, 1 Jan 2010 00:23:28 +0100 Subject: [Ironruby-core] Iron Ruby Windows Service In-Reply-To: References: Message-ID: Beautiful, understood. Thanks Ivan. Ameer. Ivan Porto carrero wrote: > win32-service lets you control services > > This lets you create services. ultimately you're running ir.exe a C# > program > with a bunch of command line parameters > http://social.msdn.microsoft.com/forums/en-US/csharpgeneral/thread/d8f300e3-6c09-424f-829e-c5fda34c1bc7 > --- > Met vriendelijke groeten - Best regards - Salutations > Ivan Porto Carrero > Blog: http://flanders.co.nz > Twitter: http://twitter.com/casualjim > Author of IronRuby in Action (http://manning.com/carrero) -- Posted via http://www.ruby-forum.com/.