From Jimmy.Schementi at microsoft.com Wed Oct 1 03:15:27 2008 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Wed, 1 Oct 2008 00:15:27 -0700 Subject: [Ironruby-core] Dynamic Languages in Silverlight 2 RC0 Message-ID: <5283CA0A4168DF4FBBD71AE9ECA5A328489FEB9A1B@NA-EXMSG-C116.redmond.corp.microsoft.com> All, Visit http://codeplex.com/sdlsdk to download IronPython and IronRuby binaries for Silverlight 2 RC0! Here's the direct release page (http://www.codeplex.com/sdlsdk/Release/ProjectReleases.aspx?ReleaseId=17839) and you can read more about it on my blog (http://blog.jimmy.schementi.com/2008/10/dynamic-languages-in-silverlight-2-rc0.html). As always, please report any issues to the Issues tab (http://www.codeplex.com/sdlsdk/WorkItem/List.aspx) and feel free to ask questions here or on the Discussions tab(http://www.codeplex.com/sdlsdk/Thread/List.aspx). Enjoy! ~Jimmy From curth at microsoft.com Wed Oct 1 10:55:27 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Wed, 1 Oct 2008 07:55:27 -0700 Subject: [Ironruby-core] Code Review: BacktraceFix In-Reply-To: References: Message-ID: Both overloads of RubyExceptionData.AddBacktrace take skipFrames as a reference parameter, but it doesn't look like any of the call sites care about the modified value. Looks good otherwise. -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek Sent: Tuesday, September 30, 2008 5:27 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: [Ironruby-core] Code Review: BacktraceFix tfpt review "/shelveset:BacktraceFix;REDMOND\tomat" Comment : Backtraces weren't handled correctly for rethrown exceptions. Adds some tests for backtraces and modifies the infrastructure to run unit tests in all combinations of /interpret and /partial modes. Tomas From Tomas.Matousek at microsoft.com Wed Oct 1 13:20:44 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Wed, 1 Oct 2008 10:20:44 -0700 Subject: [Ironruby-core] Code Review: BacktraceFix In-Reply-To: References: Message-ID: One of the overload is called in CreateBacktrace and ref skipFrames is used there. You're right about the other overload. I used the same pattern for consistency. Tomas -----Original Message----- From: Curt Hagenlocher Sent: Wednesday, October 01, 2008 7:55 AM To: ironruby-core at rubyforge.org; IronRuby External Code Reviewers Subject: RE: Code Review: BacktraceFix Both overloads of RubyExceptionData.AddBacktrace take skipFrames as a reference parameter, but it doesn't look like any of the call sites care about the modified value. Looks good otherwise. -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek Sent: Tuesday, September 30, 2008 5:27 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: [Ironruby-core] Code Review: BacktraceFix tfpt review "/shelveset:BacktraceFix;REDMOND\tomat" Comment : Backtraces weren't handled correctly for rethrown exceptions. Adds some tests for backtraces and modifies the infrastructure to run unit tests in all combinations of /interpret and /partial modes. Tomas From Tomas.Matousek at microsoft.com Wed Oct 1 17:01:17 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Wed, 1 Oct 2008 14:01:17 -0700 Subject: [Ironruby-core] Code Review: BugFixesX2 Message-ID: tfpt review "/shelveset:BugFixesX2;REDMOND\tomat" (Reviewed by John). Fixes various bugs, enables specs. Bugs fixed include: [ ironruby-Bugs-21729 ] UnboundMethod raises ArgumentError when called. [ ironruby-Bugs-20704 ] Class.new should create an anonymous class without a name Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: BugFixesX2.diff Type: application/octet-stream Size: 54085 bytes Desc: BugFixesX2.diff URL: From jdeville at microsoft.com Wed Oct 1 17:29:20 2008 From: jdeville at microsoft.com (Jim Deville) Date: Wed, 1 Oct 2008 14:29:20 -0700 Subject: [Ironruby-core] Code Review: BugFixesX2 In-Reply-To: References: Message-ID: Test changes look good. I'll re-run tags for the external repo after this gets through JD > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Tomas Matousek > Sent: Wednesday, October 01, 2008 2:01 PM > To: IronRuby External Code Reviewers > Cc: ironruby-core at rubyforge.org > Subject: [Ironruby-core] Code Review: BugFixesX2 > > tfpt review "/shelveset:BugFixesX2;REDMOND\tomat" > > (Reviewed by John). > > Fixes various bugs, enables specs. > > Bugs fixed include: > [ ironruby-Bugs-21729 ] UnboundMethod raises ArgumentError when > called. > [ ironruby-Bugs-20704 ] Class.new should create an anonymous class > without a name > > Tomas From Tomas.Matousek at microsoft.com Wed Oct 1 18:12:55 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Wed, 1 Oct 2008 15:12:55 -0700 Subject: [Ironruby-core] Code Review: RubyOps2 Message-ID: tfpt review "/shelveset:RubyOps2;REDMOND\tomat" (Reviewed by John). Moves emitted helpers from RuntimeFlowControl and BlockParam classes to RubyOps and makes all of them static. Adds a debug-only attribute [Emitted] that is used to mark C# methods, fields and properties that are emitted to the IL. Refactors AstFactory.OpCall so that arrays of expressions are not created unnecessarily for small number of arguments. Includes shelveset BacktraceFix: Backtraces weren't handled correctly for rethrown exceptions. Adds some tests for backtraces and modifies the infrastructure to run unit tests in all combinations of /interpret and /partial modes. Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: RubyOps2.diff Type: application/octet-stream Size: 196018 bytes Desc: RubyOps2.diff URL: From Tomas.Matousek at microsoft.com Wed Oct 1 22:28:53 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Wed, 1 Oct 2008 19:28:53 -0700 Subject: [Ironruby-core] Code Review: BugFixes1.1 Message-ID: tfpt review "/shelveset:BugFixes1.1;REDMOND\tomat" Fixes several minor issues that were introduced by previous shelveset (RubyOps2). Adds unit tests for all of the missed cases. Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: BugFixes1.1.diff Type: application/octet-stream Size: 8213 bytes Desc: BugFixes1.1.diff URL: From curth at microsoft.com Thu Oct 2 00:17:38 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Wed, 1 Oct 2008 21:17:38 -0700 Subject: [Ironruby-core] Code Review: BugFixes1.1 In-Reply-To: References: Message-ID: Changes look good. -----Original Message----- From: Tomas Matousek Sent: Wednesday, October 01, 2008 7:29 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: BugFixes1.1 tfpt review "/shelveset:BugFixes1.1;REDMOND\tomat" Fixes several minor issues that were introduced by previous shelveset (RubyOps2). Adds unit tests for all of the missed cases. Tomas From curth at microsoft.com Thu Oct 2 18:26:14 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Thu, 2 Oct 2008 15:26:14 -0700 Subject: [Ironruby-core] Code Review: RandomRubyFixes03 Message-ID: tfpt review "/shelveset:RandomRubyFixes03;REDMOND\curth" Comment : Implement unpack directive L as equivalent to I on this platform Fix stack overflow resulting from inspecting recursive objects Fix instance variable operations to use consistent context/scope variable type Implement Proc.binding Implement Thread.abort_on_exception, Thread.value. Flow exceptions across Thread.join. (ThreadOps is now in need of some refactoring...) Supply stack trace when there's no handler -- Curt Hagenlocher curth at microsoft.com -------------- next part -------------- A non-text attachment was scrubbed... Name: RandomRubyFixes03.diff Type: application/octet-stream Size: 31001 bytes Desc: RandomRubyFixes03.diff URL: From Tomas.Matousek at microsoft.com Thu Oct 2 18:30:47 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Thu, 2 Oct 2008 15:30:47 -0700 Subject: [Ironruby-core] Code Review: RandomRubyFixes03 In-Reply-To: References: Message-ID: Missing overflow check in ThreadOps.cs:259 if (!self.Join((int)(timeout * 1000))) { Other than that looks good. Tomas -----Original Message----- From: Curt Hagenlocher Sent: Thursday, October 02, 2008 3:26 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: RandomRubyFixes03 tfpt review "/shelveset:RandomRubyFixes03;REDMOND\curth" Comment : Implement unpack directive L as equivalent to I on this platform Fix stack overflow resulting from inspecting recursive objects Fix instance variable operations to use consistent context/scope variable type Implement Proc.binding Implement Thread.abort_on_exception, Thread.value. Flow exceptions across Thread.join. (ThreadOps is now in need of some refactoring...) Supply stack trace when there's no handler -- Curt Hagenlocher curth at microsoft.com From robert.brotherus at napa.fi Fri Oct 3 06:41:08 2008 From: robert.brotherus at napa.fi (Robert Brotherus) Date: Fri, 3 Oct 2008 13:41:08 +0300 Subject: [Ironruby-core] Compilation errors for IR SVN 154 References: <372109E149E8084D8E6C7D9CFD82E06333432EA5E6@NA-EXMSG-C115.redmond.corp.microsoft.com><48B1E47C.1060502@open2view.com> <000601c90686$ecd18c30$c674a490$@com> Message-ID: <53194650933664488F3F0C3A0AB56832A074FE@nw60.napa.fi> I am getting compilation errors in IronRuby.Libraries project with the latest IR SVN 154 version when compiling with Visual Studio 2008: ------ Build started: Project: Microsoft.Scripting.Core, Configuration: Debug Any CPU ------ Microsoft.Scripting.Core -> C:\programs\IronRuby\trunk\build\debug\Microsoft.Scripting.Core.dll ------ Build started: Project: Microsoft.Scripting, Configuration: Debug Any CPU ------ Microsoft.Scripting -> C:\programs\IronRuby\trunk\build\debug\Microsoft.Scripting.dll ------ Build started: Project: Ruby, Configuration: Debug Any CPU ------ Ruby -> C:\programs\IronRuby\trunk\build\debug\IronRuby.dll ------ Build started: Project: IronRuby.Libraries, Configuration: Debug Any CPU ------ ... warning CS1685: The predefined type 'System.Runtime.CompilerServices.ExtensionAttribute' is defined in multiple assemblies in the global alias; using definition from 'c:\programs\IronRuby\trunk\build\debug\Microsoft.Scripting.dll' C:\programs\IronRuby\trunk\src\IronRuby.Libraries\Initializers.Generated .cs(6813,17): error CS0123: No overload for 'Add' matches delegate 'System.Func' c:\programs\IronRuby\trunk\build\debug\Microsoft.Scripting.Core.dll: (Related file) C:\programs\IronRuby\trunk\src\IronRuby.Libraries\BigDecimal\BigDecimalO ps.cs(352,30): (Related location) C:\programs\IronRuby\trunk\src\IronRuby.Libraries\Initializers.Generated .cs(6822,17): error CS0123: No overload for 'Coerce' matches delegate 'System.Func' c:\programs\IronRuby\trunk\build\debug\Microsoft.Scripting.Core.dll: (Related file) ... Compile complete -- 8 errors, 1 warnings ... ========== Build: 5 succeeded or up-to-date, 3 failed, 0 skipped ========== From robert.brotherus at napa.fi Fri Oct 3 06:57:58 2008 From: robert.brotherus at napa.fi (Robert Brotherus) Date: Fri, 3 Oct 2008 13:57:58 +0300 Subject: [Ironruby-core] Usage errors with IR SVN 153 References: <372109E149E8084D8E6C7D9CFD82E06333432EA5E6@NA-EXMSG-C115.redmond.corp.microsoft.com><48B1E47C.1060502@open2view.com> <000601c90686$ecd18c30$c674a490$@com> Message-ID: <53194650933664488F3F0C3A0AB56832A07515@nw60.napa.fi> Reverting back to IR SVN 153, I was getting it compiled. However, when switching to use the the SVN 153 compiled binaries (upgrading from SVN 141) in my IronRuby-embedding app, I get following compilation errors: ------ Build started: Project: gui, Configuration: Debug Any CPU ------ ... warning CS1685: The predefined type 'System.Runtime.CompilerServices.ExtensionAttribute' is defined in multiple assemblies in the global alias; using definition from 'c:\programs\IronRuby\trunk\build\debug\avn153\Microsoft.Scripting.Core. dll' ... warning CS1685: The predefined type 'System.Linq.Expressions.ElementInit' is defined in multiple assemblies in the global alias; using definition from 'c:\programs\IronRuby\trunk\build\debug\avn153\Microsoft.Scripting.Core. dll' error CS0656: Missing compiler required member 'System.Runtime.CompilerServices.ExtensionAttribute..ctor' error CS0656: Missing compiler required member 'System.Runtime.CompilerServices.ExtensionAttribute..ctor' error CS0656: Missing compiler required member 'System.Runtime.CompilerServices.ExtensionAttribute..ctor' error CS0656: Missing compiler required member 'System.Runtime.CompilerServices.ExtensionAttribute..ctor' Robert Brotherus Software architect Napa Ltd Tammasaarenkatu 3, Helsinki FI-00180 P.O.Box 470, Helsinki FI-00181 Tel. +358 9 22 813 1 Direct. +358 9 22 813 611 GSM +358 45 11 456 02 Fax. +358 9 22 813 800 Email: Robert.Brotherus at napa.fi www.napa.fi From curth at microsoft.com Fri Oct 3 11:13:13 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Fri, 3 Oct 2008 08:13:13 -0700 Subject: [Ironruby-core] Usage errors with IR SVN 153 In-Reply-To: <53194650933664488F3F0C3A0AB56832A07515@nw60.napa.fi> References: <372109E149E8084D8E6C7D9CFD82E06333432EA5E6@NA-EXMSG-C115.redmond.corp.microsoft.com><48B1E47C.1060502@open2view.com> <000601c90686$ecd18c30$c674a490$@com> <53194650933664488F3F0C3A0AB56832A07515@nw60.napa.fi> Message-ID: You define extension methods in your hosting app, right? We're still working out the details of our second attempt to fix this problem. In the short term, the workaround is to define your own private copy of ExtensionAttribute in any hosting project that defines extension methods. That requires the following 4 lines of code: namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Method | AttributeTargets.Class | AttributeTargets.Assembly)] sealed class ExtensionAttribute : Attribute { } } -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Robert Brotherus Sent: Friday, October 03, 2008 3:58 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Usage errors with IR SVN 153 Reverting back to IR SVN 153, I was getting it compiled. However, when switching to use the the SVN 153 compiled binaries (upgrading from SVN 141) in my IronRuby-embedding app, I get following compilation errors: ------ Build started: Project: gui, Configuration: Debug Any CPU ------ ... warning CS1685: The predefined type 'System.Runtime.CompilerServices.ExtensionAttribute' is defined in multiple assemblies in the global alias; using definition from 'c:\programs\IronRuby\trunk\build\debug\avn153\Microsoft.Scripting.Core. dll' ... warning CS1685: The predefined type 'System.Linq.Expressions.ElementInit' is defined in multiple assemblies in the global alias; using definition from 'c:\programs\IronRuby\trunk\build\debug\avn153\Microsoft.Scripting.Core. dll' error CS0656: Missing compiler required member 'System.Runtime.CompilerServices.ExtensionAttribute..ctor' error CS0656: Missing compiler required member 'System.Runtime.CompilerServices.ExtensionAttribute..ctor' error CS0656: Missing compiler required member 'System.Runtime.CompilerServices.ExtensionAttribute..ctor' error CS0656: Missing compiler required member 'System.Runtime.CompilerServices.ExtensionAttribute..ctor' Robert Brotherus Software architect Napa Ltd Tammasaarenkatu 3, Helsinki FI-00180 P.O.Box 470, Helsinki FI-00181 Tel. +358 9 22 813 1 Direct. +358 9 22 813 611 GSM +358 45 11 456 02 Fax. +358 9 22 813 800 Email: Robert.Brotherus at napa.fi www.napa.fi _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From stefan.dobrev at gmail.com Fri Oct 3 11:25:56 2008 From: stefan.dobrev at gmail.com (Stefan Dobrev) Date: Fri, 3 Oct 2008 18:25:56 +0300 Subject: [Ironruby-core] Compilation errors for IR SVN 154 In-Reply-To: <53194650933664488F3F0C3A0AB56832A074FE@nw60.napa.fi> References: <372109E149E8084D8E6C7D9CFD82E06333432EA5E6@NA-EXMSG-C115.redmond.corp.microsoft.com> <48B1E47C.1060502@open2view.com> <000601c90686$ecd18c30$c674a490$@com> <53194650933664488F3F0C3A0AB56832A074FE@nw60.napa.fi> Message-ID: <928de89c0810030825r6e2bff5y367e369dc701200b@mail.gmail.com> I think this problem came from BigDecimal implementation that Peter recently committed. Maybe \IronRuby.Libraries\Initializers.Generated.cs should be regenerated and committed again. You can revert to revision 152 that compiles just fine. P.S.: When the recent changes that were posted in the list will get committed in the public repository? 2008/10/3 Robert Brotherus > I am getting compilation errors in IronRuby.Libraries project with the > latest IR SVN 154 version when compiling with Visual Studio 2008: > > ------ Build started: Project: Microsoft.Scripting.Core, Configuration: > Debug Any CPU ------ > Microsoft.Scripting.Core -> > C:\programs\IronRuby\trunk\build\debug\Microsoft.Scripting.Core.dll > ------ Build started: Project: Microsoft.Scripting, Configuration: Debug > Any CPU ------ > Microsoft.Scripting -> > C:\programs\IronRuby\trunk\build\debug\Microsoft.Scripting.dll > ------ Build started: Project: Ruby, Configuration: Debug Any CPU ------ > Ruby -> C:\programs\IronRuby\trunk\build\debug\IronRuby.dll > ------ Build started: Project: IronRuby.Libraries, Configuration: Debug > Any CPU ------ > ... > warning CS1685: The predefined type > 'System.Runtime.CompilerServices.ExtensionAttribute' is defined in > multiple assemblies in the global alias; using definition from > 'c:\programs\IronRuby\trunk\build\debug\Microsoft.Scripting.dll' > C:\programs\IronRuby\trunk\src\IronRuby.Libraries\Initializers.Generated > .cs(6813,17): error CS0123: No overload for 'Add' matches delegate > 'System.Func brary.BigDecimal.BigDecimal,object,object,object>' > c:\programs\IronRuby\trunk\build\debug\Microsoft.Scripting.Core.dll: > (Related file) > C:\programs\IronRuby\trunk\src\IronRuby.Libraries\BigDecimal\BigDecimalO > ps.cs(352,30): (Related location) > C:\programs\IronRuby\trunk\src\IronRuby.Libraries\Initializers.Generated > .cs(6822,17): error CS0123: No overload for 'Coerce' matches delegate > 'System.Func brary.BigDecimal.BigDecimal,double,IronRuby.Builtins.RubyArray>' > c:\programs\IronRuby\trunk\build\debug\Microsoft.Scripting.Core.dll: > (Related file) > ... > > Compile complete -- 8 errors, 1 warnings > > ... > > ========== Build: 5 succeeded or up-to-date, 3 failed, 0 skipped > ========== > _______________________________________________ > 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 jflam at microsoft.com Fri Oct 3 12:08:25 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Fri, 3 Oct 2008 09:08:25 -0700 Subject: [Ironruby-core] Compilation errors for IR SVN 154 In-Reply-To: <928de89c0810030825r6e2bff5y367e369dc701200b@mail.gmail.com> References: <372109E149E8084D8E6C7D9CFD82E06333432EA5E6@NA-EXMSG-C115.redmond.corp.microsoft.com> <48B1E47C.1060502@open2view.com> <000601c90686$ecd18c30$c674a490$@com> <53194650933664488F3F0C3A0AB56832A074FE@nw60.napa.fi> <928de89c0810030825r6e2bff5y367e369dc701200b@mail.gmail.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E063334B00BD22@NA-EXMSG-C115.redmond.corp.microsoft.com> Just committed a fix for the compilation errors. Thanks, -John From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Stefan Dobrev Sent: Friday, October 03, 2008 8:26 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Compilation errors for IR SVN 154 I think this problem came from BigDecimal implementation that Peter recently committed. Maybe \IronRuby.Libraries\Initializers.Generated.cs should be regenerated and committed again. You can revert to revision 152 that compiles just fine. P.S.: When the recent changes that were posted in the list will get committed in the public repository? 2008/10/3 Robert Brotherus > I am getting compilation errors in IronRuby.Libraries project with the latest IR SVN 154 version when compiling with Visual Studio 2008: ------ Build started: Project: Microsoft.Scripting.Core, Configuration: Debug Any CPU ------ Microsoft.Scripting.Core -> C:\programs\IronRuby\trunk\build\debug\Microsoft.Scripting.Core.dll ------ Build started: Project: Microsoft.Scripting, Configuration: Debug Any CPU ------ Microsoft.Scripting -> C:\programs\IronRuby\trunk\build\debug\Microsoft.Scripting.dll ------ Build started: Project: Ruby, Configuration: Debug Any CPU ------ Ruby -> C:\programs\IronRuby\trunk\build\debug\IronRuby.dll ------ Build started: Project: IronRuby.Libraries, Configuration: Debug Any CPU ------ ... warning CS1685: The predefined type 'System.Runtime.CompilerServices.ExtensionAttribute' is defined in multiple assemblies in the global alias; using definition from 'c:\programs\IronRuby\trunk\build\debug\Microsoft.Scripting.dll' C:\programs\IronRuby\trunk\src\IronRuby.Libraries\Initializers.Generated .cs(6813,17): error CS0123: No overload for 'Add' matches delegate 'System.Func' c:\programs\IronRuby\trunk\build\debug\Microsoft.Scripting.Core.dll: (Related file) C:\programs\IronRuby\trunk\src\IronRuby.Libraries\BigDecimal\BigDecimalO ps.cs(352,30): (Related location) C:\programs\IronRuby\trunk\src\IronRuby.Libraries\Initializers.Generated .cs(6822,17): error CS0123: No overload for 'Coerce' matches delegate 'System.Func' c:\programs\IronRuby\trunk\build\debug\Microsoft.Scripting.Core.dll: (Related file) ... Compile complete -- 8 errors, 1 warnings ... ========== Build: 5 succeeded or up-to-date, 3 failed, 0 skipped ========== _______________________________________________ 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 bacondarwin at googlemail.com Fri Oct 3 13:42:22 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Fri, 3 Oct 2008 18:42:22 +0100 Subject: [Ironruby-core] Compilation errors for IR SVN 154 In-Reply-To: <372109E149E8084D8E6C7D9CFD82E063334B00BD22@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <372109E149E8084D8E6C7D9CFD82E06333432EA5E6@NA-EXMSG-C115.redmond.corp.microsoft.com> <48B1E47C.1060502@open2view.com> <000601c90686$ecd18c30$c674a490$@com> <53194650933664488F3F0C3A0AB56832A074FE@nw60.napa.fi> <928de89c0810030825r6e2bff5y367e369dc701200b@mail.gmail.com> <372109E149E8084D8E6C7D9CFD82E063334B00BD22@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <001501c9257f$6751acd0$35f50670$@com> Sorry, I should update initializers.generated.cs when I commit - I always shied away from that when posting patches as they would need to be regenerated anyway. By the way, should there be some kind of code review for my commits? Should I post my proposed changes to the list first? Regards, Pete From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of John Lam (IRONRUBY) Sent: Friday,03 October 03, 2008 17:08 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Compilation errors for IR SVN 154 Just committed a fix for the compilation errors. Thanks, -John From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Stefan Dobrev Sent: Friday, October 03, 2008 8:26 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Compilation errors for IR SVN 154 I think this problem came from BigDecimal implementation that Peter recently committed. Maybe \IronRuby.Libraries\Initializers.Generated.cs should be regenerated and committed again. You can revert to revision 152 that compiles just fine. P.S.: When the recent changes that were posted in the list will get committed in the public repository? 2008/10/3 Robert Brotherus I am getting compilation errors in IronRuby.Libraries project with the latest IR SVN 154 version when compiling with Visual Studio 2008: ------ Build started: Project: Microsoft.Scripting.Core, Configuration: Debug Any CPU ------ Microsoft.Scripting.Core -> C:\programs\IronRuby\trunk\build\debug\Microsoft.Scripting.Core.dll ------ Build started: Project: Microsoft.Scripting, Configuration: Debug Any CPU ------ Microsoft.Scripting -> C:\programs\IronRuby\trunk\build\debug\Microsoft.Scripting.dll ------ Build started: Project: Ruby, Configuration: Debug Any CPU ------ Ruby -> C:\programs\IronRuby\trunk\build\debug\IronRuby.dll ------ Build started: Project: IronRuby.Libraries, Configuration: Debug Any CPU ------ ... warning CS1685: The predefined type 'System.Runtime.CompilerServices.ExtensionAttribute' is defined in multiple assemblies in the global alias; using definition from 'c:\programs\IronRuby\trunk\build\debug\Microsoft.Scripting.dll' C:\programs\IronRuby\trunk\src\IronRuby.Libraries\Initializers.Generated .cs(6813,17): error CS0123: No overload for 'Add' matches delegate 'System.Func' c:\programs\IronRuby\trunk\build\debug\Microsoft.Scripting.Core.dll: (Related file) C:\programs\IronRuby\trunk\src\IronRuby.Libraries\BigDecimal\BigDecimalO ps.cs(352,30): (Related location) C:\programs\IronRuby\trunk\src\IronRuby.Libraries\Initializers.Generated .cs(6822,17): error CS0123: No overload for 'Coerce' matches delegate 'System.Func' c:\programs\IronRuby\trunk\build\debug\Microsoft.Scripting.Core.dll: (Related file) ... Compile complete -- 8 errors, 1 warnings ... ========== Build: 5 succeeded or up-to-date, 3 failed, 0 skipped ========== _______________________________________________ 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 Fri Oct 3 13:44:45 2008 From: jdeville at microsoft.com (Jim Deville) Date: Fri, 3 Oct 2008 10:44:45 -0700 Subject: [Ironruby-core] Compilation errors for IR SVN 154 In-Reply-To: <001501c9257f$6751acd0$35f50670$@com> References: <372109E149E8084D8E6C7D9CFD82E06333432EA5E6@NA-EXMSG-C115.redmond.corp.microsoft.com> <48B1E47C.1060502@open2view.com> <000601c90686$ecd18c30$c674a490$@com> <53194650933664488F3F0C3A0AB56832A074FE@nw60.napa.fi> <928de89c0810030825r6e2bff5y367e369dc701200b@mail.gmail.com> <372109E149E8084D8E6C7D9CFD82E063334B00BD22@NA-EXMSG-C115.redmond.corp.microsoft.com> <001501c9257f$6751acd0$35f50670$@com> Message-ID: I think we all should have code review before we commit. It's something we do for everything here, and it would probably be useful for everyone else. JD From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Peter Bacon Darwin Sent: Friday, October 03, 2008 10:42 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Compilation errors for IR SVN 154 Sorry, I should update initializers.generated.cs when I commit - I always shied away from that when posting patches as they would need to be regenerated anyway. By the way, should there be some kind of code review for my commits? Should I post my proposed changes to the list first? Regards, Pete From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of John Lam (IRONRUBY) Sent: Friday,03 October 03, 2008 17:08 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Compilation errors for IR SVN 154 Just committed a fix for the compilation errors. Thanks, -John From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Stefan Dobrev Sent: Friday, October 03, 2008 8:26 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Compilation errors for IR SVN 154 I think this problem came from BigDecimal implementation that Peter recently committed. Maybe \IronRuby.Libraries\Initializers.Generated.cs should be regenerated and committed again. You can revert to revision 152 that compiles just fine. P.S.: When the recent changes that were posted in the list will get committed in the public repository? 2008/10/3 Robert Brotherus > I am getting compilation errors in IronRuby.Libraries project with the latest IR SVN 154 version when compiling with Visual Studio 2008: ------ Build started: Project: Microsoft.Scripting.Core, Configuration: Debug Any CPU ------ Microsoft.Scripting.Core -> C:\programs\IronRuby\trunk\build\debug\Microsoft.Scripting.Core.dll ------ Build started: Project: Microsoft.Scripting, Configuration: Debug Any CPU ------ Microsoft.Scripting -> C:\programs\IronRuby\trunk\build\debug\Microsoft.Scripting.dll ------ Build started: Project: Ruby, Configuration: Debug Any CPU ------ Ruby -> C:\programs\IronRuby\trunk\build\debug\IronRuby.dll ------ Build started: Project: IronRuby.Libraries, Configuration: Debug Any CPU ------ ... warning CS1685: The predefined type 'System.Runtime.CompilerServices.ExtensionAttribute' is defined in multiple assemblies in the global alias; using definition from 'c:\programs\IronRuby\trunk\build\debug\Microsoft.Scripting.dll' C:\programs\IronRuby\trunk\src\IronRuby.Libraries\Initializers.Generated .cs(6813,17): error CS0123: No overload for 'Add' matches delegate 'System.Func' c:\programs\IronRuby\trunk\build\debug\Microsoft.Scripting.Core.dll: (Related file) C:\programs\IronRuby\trunk\src\IronRuby.Libraries\BigDecimal\BigDecimalO ps.cs(352,30): (Related location) C:\programs\IronRuby\trunk\src\IronRuby.Libraries\Initializers.Generated .cs(6822,17): error CS0123: No overload for 'Coerce' matches delegate 'System.Func' c:\programs\IronRuby\trunk\build\debug\Microsoft.Scripting.Core.dll: (Related file) ... Compile complete -- 8 errors, 1 warnings ... ========== Build: 5 succeeded or up-to-date, 3 failed, 0 skipped ========== _______________________________________________ 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 bacondarwin at googlemail.com Fri Oct 3 14:06:58 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Fri, 3 Oct 2008 19:06:58 +0100 Subject: [Ironruby-core] Compilation errors for IR SVN 154 In-Reply-To: References: <372109E149E8084D8E6C7D9CFD82E06333432EA5E6@NA-EXMSG-C115.redmond.corp.microsoft.com> <48B1E47C.1060502@open2view.com> <000601c90686$ecd18c30$c674a490$@com> <53194650933664488F3F0C3A0AB56832A074FE@nw60.napa.fi> <928de89c0810030825r6e2bff5y367e369dc701200b@mail.gmail.com> <372109E149E8084D8E6C7D9CFD82E063334B00BD22@NA-EXMSG-C115.redmond.corp.microsoft.com> <001501c9257f$6751acd0$35f50670$@com> Message-ID: <002001c92582$d59ca980$80d5fc80$@com> OK so I will post the changes to this list first. What are the criteria for the code being accepted? What if nobody replies? How long do I wait before I commit? Etc etc etc. Pete From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jim Deville Sent: Friday,03 October 03, 2008 18:45 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Compilation errors for IR SVN 154 I think we all should have code review before we commit. It's something we do for everything here, and it would probably be useful for everyone else. JD From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Peter Bacon Darwin Sent: Friday, October 03, 2008 10:42 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Compilation errors for IR SVN 154 Sorry, I should update initializers.generated.cs when I commit - I always shied away from that when posting patches as they would need to be regenerated anyway. By the way, should there be some kind of code review for my commits? Should I post my proposed changes to the list first? Regards, Pete From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of John Lam (IRONRUBY) Sent: Friday,03 October 03, 2008 17:08 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Compilation errors for IR SVN 154 Just committed a fix for the compilation errors. Thanks, -John From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Stefan Dobrev Sent: Friday, October 03, 2008 8:26 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Compilation errors for IR SVN 154 I think this problem came from BigDecimal implementation that Peter recently committed. Maybe \IronRuby.Libraries\Initializers.Generated.cs should be regenerated and committed again. You can revert to revision 152 that compiles just fine. P.S.: When the recent changes that were posted in the list will get committed in the public repository? 2008/10/3 Robert Brotherus I am getting compilation errors in IronRuby.Libraries project with the latest IR SVN 154 version when compiling with Visual Studio 2008: ------ Build started: Project: Microsoft.Scripting.Core, Configuration: Debug Any CPU ------ Microsoft.Scripting.Core -> C:\programs\IronRuby\trunk\build\debug\Microsoft.Scripting.Core.dll ------ Build started: Project: Microsoft.Scripting, Configuration: Debug Any CPU ------ Microsoft.Scripting -> C:\programs\IronRuby\trunk\build\debug\Microsoft.Scripting.dll ------ Build started: Project: Ruby, Configuration: Debug Any CPU ------ Ruby -> C:\programs\IronRuby\trunk\build\debug\IronRuby.dll ------ Build started: Project: IronRuby.Libraries, Configuration: Debug Any CPU ------ ... warning CS1685: The predefined type 'System.Runtime.CompilerServices.ExtensionAttribute' is defined in multiple assemblies in the global alias; using definition from 'c:\programs\IronRuby\trunk\build\debug\Microsoft.Scripting.dll' C:\programs\IronRuby\trunk\src\IronRuby.Libraries\Initializers.Generated .cs(6813,17): error CS0123: No overload for 'Add' matches delegate 'System.Func' c:\programs\IronRuby\trunk\build\debug\Microsoft.Scripting.Core.dll: (Related file) C:\programs\IronRuby\trunk\src\IronRuby.Libraries\BigDecimal\BigDecimalO ps.cs(352,30): (Related location) C:\programs\IronRuby\trunk\src\IronRuby.Libraries\Initializers.Generated .cs(6822,17): error CS0123: No overload for 'Coerce' matches delegate 'System.Func' c:\programs\IronRuby\trunk\build\debug\Microsoft.Scripting.Core.dll: (Related file) ... Compile complete -- 8 errors, 1 warnings ... ========== Build: 5 succeeded or up-to-date, 3 failed, 0 skipped ========== _______________________________________________ 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 jflam at microsoft.com Fri Oct 3 15:57:43 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Fri, 3 Oct 2008 12:57:43 -0700 Subject: [Ironruby-core] Compilation errors for IR SVN 154 In-Reply-To: <002001c92582$d59ca980$80d5fc80$@com> References: <372109E149E8084D8E6C7D9CFD82E06333432EA5E6@NA-EXMSG-C115.redmond.corp.microsoft.com> <48B1E47C.1060502@open2view.com> <000601c90686$ecd18c30$c674a490$@com> <53194650933664488F3F0C3A0AB56832A074FE@nw60.napa.fi> <928de89c0810030825r6e2bff5y367e369dc701200b@mail.gmail.com> <372109E149E8084D8E6C7D9CFD82E063334B00BD22@NA-EXMSG-C115.redmond.corp.microsoft.com> <001501c9257f$6751acd0$35f50670$@com> <002001c92582$d59ca980$80d5fc80$@com> Message-ID: <372109E149E8084D8E6C7D9CFD82E063334B00BF36@NA-EXMSG-C115.redmond.corp.microsoft.com> We'll make sure we review your code; if for some reason it falls through the cracks, just ping :) Thanks, -John From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Peter Bacon Darwin Sent: Friday, October 03, 2008 11:07 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Compilation errors for IR SVN 154 OK so I will post the changes to this list first. What are the criteria for the code being accepted? What if nobody replies? How long do I wait before I commit? Etc etc etc. Pete From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jim Deville Sent: Friday,03 October 03, 2008 18:45 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Compilation errors for IR SVN 154 I think we all should have code review before we commit. It's something we do for everything here, and it would probably be useful for everyone else. JD From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Peter Bacon Darwin Sent: Friday, October 03, 2008 10:42 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Compilation errors for IR SVN 154 Sorry, I should update initializers.generated.cs when I commit - I always shied away from that when posting patches as they would need to be regenerated anyway. By the way, should there be some kind of code review for my commits? Should I post my proposed changes to the list first? Regards, Pete From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of John Lam (IRONRUBY) Sent: Friday,03 October 03, 2008 17:08 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Compilation errors for IR SVN 154 Just committed a fix for the compilation errors. Thanks, -John From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Stefan Dobrev Sent: Friday, October 03, 2008 8:26 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Compilation errors for IR SVN 154 I think this problem came from BigDecimal implementation that Peter recently committed. Maybe \IronRuby.Libraries\Initializers.Generated.cs should be regenerated and committed again. You can revert to revision 152 that compiles just fine. P.S.: When the recent changes that were posted in the list will get committed in the public repository? 2008/10/3 Robert Brotherus > I am getting compilation errors in IronRuby.Libraries project with the latest IR SVN 154 version when compiling with Visual Studio 2008: ------ Build started: Project: Microsoft.Scripting.Core, Configuration: Debug Any CPU ------ Microsoft.Scripting.Core -> C:\programs\IronRuby\trunk\build\debug\Microsoft.Scripting.Core.dll ------ Build started: Project: Microsoft.Scripting, Configuration: Debug Any CPU ------ Microsoft.Scripting -> C:\programs\IronRuby\trunk\build\debug\Microsoft.Scripting.dll ------ Build started: Project: Ruby, Configuration: Debug Any CPU ------ Ruby -> C:\programs\IronRuby\trunk\build\debug\IronRuby.dll ------ Build started: Project: IronRuby.Libraries, Configuration: Debug Any CPU ------ ... warning CS1685: The predefined type 'System.Runtime.CompilerServices.ExtensionAttribute' is defined in multiple assemblies in the global alias; using definition from 'c:\programs\IronRuby\trunk\build\debug\Microsoft.Scripting.dll' C:\programs\IronRuby\trunk\src\IronRuby.Libraries\Initializers.Generated .cs(6813,17): error CS0123: No overload for 'Add' matches delegate 'System.Func' c:\programs\IronRuby\trunk\build\debug\Microsoft.Scripting.Core.dll: (Related file) C:\programs\IronRuby\trunk\src\IronRuby.Libraries\BigDecimal\BigDecimalO ps.cs(352,30): (Related location) C:\programs\IronRuby\trunk\src\IronRuby.Libraries\Initializers.Generated .cs(6822,17): error CS0123: No overload for 'Coerce' matches delegate 'System.Func' c:\programs\IronRuby\trunk\build\debug\Microsoft.Scripting.Core.dll: (Related file) ... Compile complete -- 8 errors, 1 warnings ... ========== Build: 5 succeeded or up-to-date, 3 failed, 0 skipped ========== _______________________________________________ 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 Tomas.Matousek at microsoft.com Fri Oct 3 18:08:04 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Fri, 3 Oct 2008 15:08:04 -0700 Subject: [Ironruby-core] Code Review: NoSymbolId1 Message-ID: tfpt review "/shelveset:NoSymbolId1;REDMOND\tomat" Removes SymbolIds from IronRuby compiler and runtime. Still keeps SymbolId as a representation of Symbol Ruby class. The plan is to replace SymbolId completely by System.String with interning table on RubyContext (the integer values will be unique per script runtime). The table will hold on additional information about the strings (encoding, taint, instance variables, etc.). Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: NoSymbolId1.diff Type: application/octet-stream Size: 421046 bytes Desc: NoSymbolId1.diff URL: From jflam at microsoft.com Fri Oct 3 18:24:24 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Fri, 3 Oct 2008 15:24:24 -0700 Subject: [Ironruby-core] Code Review: bigdecimal-2 Message-ID: <372109E149E8084D8E6C7D9CFD82E063334B00C049@NA-EXMSG-C115.redmond.corp.microsoft.com> tfpt review "/shelveset:bigdecimal-2;REDMOND\jflam" Comment : BigDecimal contribution from Peter Bacon Darwin -------------- next part -------------- A non-text attachment was scrubbed... Name: bigdecimal-2.diff Type: application/octet-stream Size: 243833 bytes Desc: bigdecimal-2.diff URL: From jflam at microsoft.com Fri Oct 3 18:27:09 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Fri, 3 Oct 2008 15:27:09 -0700 Subject: [Ironruby-core] Code Review: tracefixes-1 Message-ID: <372109E149E8084D8E6C7D9CFD82E063334B00C04D@NA-EXMSG-C115.redmond.corp.microsoft.com> tfpt review "/shelveset:tracefixes-1;REDMOND\jflam" Comment : Bug fixes in tracing infrastructure -------------- next part -------------- A non-text attachment was scrubbed... Name: tracefixes-1.diff Type: application/octet-stream Size: 5064 bytes Desc: tracefixes-1.diff URL: From curth at microsoft.com Fri Oct 3 18:30:55 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Fri, 3 Oct 2008 15:30:55 -0700 Subject: [Ironruby-core] Code Review: tracefixes-1 In-Reply-To: <372109E149E8084D8E6C7D9CFD82E063334B00C04D@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <372109E149E8084D8E6C7D9CFD82E063334B00C04D@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: I think I'll review in reverse chronological order. :) Looks good. -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of John Lam (IRONRUBY) Sent: Friday, October 03, 2008 3:27 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: [Ironruby-core] Code Review: tracefixes-1 tfpt review "/shelveset:tracefixes-1;REDMOND\jflam" Comment : Bug fixes in tracing infrastructure From curth at microsoft.com Fri Oct 3 19:02:42 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Fri, 3 Oct 2008 16:02:42 -0700 Subject: [Ironruby-core] Code Review: bigdecimal-2 In-Reply-To: <372109E149E8084D8E6C7D9CFD82E063334B00C049@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <372109E149E8084D8E6C7D9CFD82E063334B00C049@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: Code looks good. There might have been less churn to have CodeContext on each method now so that we can use it to get a Config later -- but there's also something to be said for making it work first. Style consistency issues: The line endings in bigdecimal.cs appear to be a mix of LF and CRLF. They should all be CRLF. We tend to prefer not to say "this.varname = x"; if the symbol name conflicts, it should be changed if possible. -----Original Message----- From: John Lam (IRONRUBY) Sent: Friday, October 03, 2008 3:24 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: bigdecimal-2 tfpt review "/shelveset:bigdecimal-2;REDMOND\jflam" Comment : BigDecimal contribution from Peter Bacon Darwin From Tomas.Matousek at microsoft.com Fri Oct 3 19:32:52 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Fri, 3 Oct 2008 16:32:52 -0700 Subject: [Ironruby-core] Code Review: bigdecimal-2 In-Reply-To: References: <372109E149E8084D8E6C7D9CFD82E063334B00C049@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: I noticed the file name casing is wrong: bigdecimal.cs, fraction.cs. Was it broken by some transformation? Tomas -----Original Message----- From: Curt Hagenlocher Sent: Friday, October 03, 2008 4:03 PM To: John Lam (IRONRUBY); IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: RE: Code Review: bigdecimal-2 Code looks good. There might have been less churn to have CodeContext on each method now so that we can use it to get a Config later -- but there's also something to be said for making it work first. Style consistency issues: The line endings in bigdecimal.cs appear to be a mix of LF and CRLF. They should all be CRLF. We tend to prefer not to say "this.varname = x"; if the symbol name conflicts, it should be changed if possible. -----Original Message----- From: John Lam (IRONRUBY) Sent: Friday, October 03, 2008 3:24 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: bigdecimal-2 tfpt review "/shelveset:bigdecimal-2;REDMOND\jflam" Comment : BigDecimal contribution from Peter Bacon Darwin From Tomas.Matousek at microsoft.com Fri Oct 3 19:37:34 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Fri, 3 Oct 2008 16:37:34 -0700 Subject: [Ironruby-core] Code Review: bigdecimal-2 In-Reply-To: References: <372109E149E8084D8E6C7D9CFD82E063334B00C049@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: One more note: // TODO: This static field need to be added to a hash on RubyExecutionContext private static readonly BigDecimal.Config _config = new BigDecimal.Config(); internal static BigDecimal.Config GetConfig() { return _config; } There is already API on RubyContext for what you need: public bool TryGetLibraryData(object key, out object value) public object GetOrCreateLibraryData(object key, Func valueFactory) public bool TryAddLibraryData(object key, object value, out object actualValue) Tomas -----Original Message----- From: Curt Hagenlocher Sent: Friday, October 03, 2008 4:03 PM To: John Lam (IRONRUBY); IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: RE: Code Review: bigdecimal-2 Code looks good. There might have been less churn to have CodeContext on each method now so that we can use it to get a Config later -- but there's also something to be said for making it work first. Style consistency issues: The line endings in bigdecimal.cs appear to be a mix of LF and CRLF. They should all be CRLF. We tend to prefer not to say "this.varname = x"; if the symbol name conflicts, it should be changed if possible. -----Original Message----- From: John Lam (IRONRUBY) Sent: Friday, October 03, 2008 3:24 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: bigdecimal-2 tfpt review "/shelveset:bigdecimal-2;REDMOND\jflam" Comment : BigDecimal contribution from Peter Bacon Darwin From curth at microsoft.com Fri Oct 3 20:11:44 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Fri, 3 Oct 2008 17:11:44 -0700 Subject: [Ironruby-core] Code Review: NoSymbolId1 In-Reply-To: References: Message-ID: Changes look good, overall. I like the approach. In Tokenizer.cs, you replaced Symbols.Minus with the hardcoded "-" -- but Symbols.Minus has separately been redefined to "-". Best to continue to use the symbolic name, no? -----Original Message----- From: Tomas Matousek Sent: Friday, October 03, 2008 3:08 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: NoSymbolId1 tfpt review "/shelveset:NoSymbolId1;REDMOND\tomat" Removes SymbolIds from IronRuby compiler and runtime. Still keeps SymbolId as a representation of Symbol Ruby class. The plan is to replace SymbolId completely by System.String with interning table on RubyContext (the integer values will be unique per script runtime). The table will hold on additional information about the strings (encoding, taint, instance variables, etc.). Tomas From Tomas.Matousek at microsoft.com Fri Oct 3 20:24:12 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Fri, 3 Oct 2008 17:24:12 -0700 Subject: [Ironruby-core] Code Review: NoSymbolId1 In-Reply-To: References: Message-ID: OK, I've undone this line for now. Tomas -----Original Message----- From: Curt Hagenlocher Sent: Friday, October 03, 2008 5:12 PM To: Tomas Matousek; IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: RE: Code Review: NoSymbolId1 Changes look good, overall. I like the approach. In Tokenizer.cs, you replaced Symbols.Minus with the hardcoded "-" -- but Symbols.Minus has separately been redefined to "-". Best to continue to use the symbolic name, no? -----Original Message----- From: Tomas Matousek Sent: Friday, October 03, 2008 3:08 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: NoSymbolId1 tfpt review "/shelveset:NoSymbolId1;REDMOND\tomat" Removes SymbolIds from IronRuby compiler and runtime. Still keeps SymbolId as a representation of Symbol Ruby class. The plan is to replace SymbolId completely by System.String with interning table on RubyContext (the integer values will be unique per script runtime). The table will hold on additional information about the strings (encoding, taint, instance variables, etc.). Tomas From Tomas.Matousek at microsoft.com Fri Oct 3 23:56:35 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Fri, 3 Oct 2008 20:56:35 -0700 Subject: [Ironruby-core] Code Review: arity Message-ID: tfpt review "/shelveset:arity;REDMOND\tomat" Comment : Fixes bugs in block parameters: 1) Anonymous unsplat parameters were not handled correctly (the parser ignored them): def y a = [1,2,3,4,5] yield a,[6] end y { |(x,y,*),*| p x,y } 2) Arity wasn't calculated correctly. Arity depends upon AST structure that is not preserved in runtime. Therefore we need to calculate block arity at compile time and save it to BlockDispatcher. Some peculiar cases: Proc.new{|(a,b,c,*)|}.arity.should == -4 Proc.new{|(*)|}.arity.should == -1 Proc.new{}.arity.should == -1 Proc.new{||}.arity.should == 0 Proc.new{x,}.arity.should == 1 Proc.new{(x,)}.arity.should == 1 Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: arity.diff Type: application/octet-stream Size: 599751 bytes Desc: arity.diff URL: From curth at microsoft.com Sun Oct 5 00:49:09 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Sat, 4 Oct 2008 21:49:09 -0700 Subject: [Ironruby-core] Code Review: arity In-Reply-To: References: Message-ID: Looks good. One minor formatting problem: Some of the changed parts of parser.y are now using tab characters instead of spaces. In the BlockSignatureAttributes enumeration (in BlockDispatcher.cs), there's a comment that "bits 31..3 store arity". Are you numbering bits from 1? I'm used to numbering them from zero :). -----Original Message----- From: Tomas Matousek Sent: Friday, October 03, 2008 8:57 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: arity tfpt review "/shelveset:arity;REDMOND\tomat" Comment : Fixes bugs in block parameters: 1) Anonymous unsplat parameters were not handled correctly (the parser ignored them): def y a = [1,2,3,4,5] yield a,[6] end y { |(x,y,*),*| p x,y } 2) Arity wasn't calculated correctly. Arity depends upon AST structure that is not preserved in runtime. Therefore we need to calculate block arity at compile time and save it to BlockDispatcher. Some peculiar cases: Proc.new{|(a,b,c,*)|}.arity.should == -4 Proc.new{|(*)|}.arity.should == -1 Proc.new{}.arity.should == -1 Proc.new{||}.arity.should == 0 Proc.new{x,}.arity.should == 1 Proc.new{(x,)}.arity.should == 1 Tomas From jflam at microsoft.com Sun Oct 5 00:54:03 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Sat, 4 Oct 2008 21:54:03 -0700 Subject: [Ironruby-core] Code Review: bigdecimal-2 In-Reply-To: References: <372109E149E8084D8E6C7D9CFD82E063334B00C049@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E063334B00C1C6@NA-EXMSG-C115.redmond.corp.microsoft.com> I'm going ahead and removing the static field. Love the GetOrCreateLibraryData API! :) Thanks, -John -----Original Message----- From: Tomas Matousek Sent: Friday, October 03, 2008 4:38 PM To: Curt Hagenlocher; John Lam (IRONRUBY); IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: RE: Code Review: bigdecimal-2 One more note: // TODO: This static field need to be added to a hash on RubyExecutionContext private static readonly BigDecimal.Config _config = new BigDecimal.Config(); internal static BigDecimal.Config GetConfig() { return _config; } There is already API on RubyContext for what you need: public bool TryGetLibraryData(object key, out object value) public object GetOrCreateLibraryData(object key, Func valueFactory) public bool TryAddLibraryData(object key, object value, out object actualValue) Tomas -----Original Message----- From: Curt Hagenlocher Sent: Friday, October 03, 2008 4:03 PM To: John Lam (IRONRUBY); IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: RE: Code Review: bigdecimal-2 Code looks good. There might have been less churn to have CodeContext on each method now so that we can use it to get a Config later -- but there's also something to be said for making it work first. Style consistency issues: The line endings in bigdecimal.cs appear to be a mix of LF and CRLF. They should all be CRLF. We tend to prefer not to say "this.varname = x"; if the symbol name conflicts, it should be changed if possible. -----Original Message----- From: John Lam (IRONRUBY) Sent: Friday, October 03, 2008 3:24 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: bigdecimal-2 tfpt review "/shelveset:bigdecimal-2;REDMOND\jflam" Comment : BigDecimal contribution from Peter Bacon Darwin From jflam at microsoft.com Sun Oct 5 01:24:33 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Sat, 4 Oct 2008 22:24:33 -0700 Subject: [Ironruby-core] Code Review: bigdecimal-3 Message-ID: <372109E149E8084D8E6C7D9CFD82E063334B00C1D4@NA-EXMSG-C115.redmond.corp.microsoft.com> tfpt review "/shelveset:bigdecimal-3;REDMOND\jflam" Comment : Removed static _config field from Peter Bacon Darwin's BigDecimal contribution. -------------- next part -------------- A non-text attachment was scrubbed... Name: bigdecimal-3.diff Type: application/octet-stream Size: 249174 bytes Desc: bigdecimal-3.diff URL: From curth at microsoft.com Sun Oct 5 01:49:59 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Sat, 4 Oct 2008 22:49:59 -0700 Subject: [Ironruby-core] Code Review: bigdecimal-3 In-Reply-To: <372109E149E8084D8E6C7D9CFD82E063334B00C1D4@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <372109E149E8084D8E6C7D9CFD82E063334B00C1D4@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: I'm still getting "The line endings in the following file are not consistent. Do you want to normalize the line endings?" from BigDecimal.cs Otherwise, changes look good. -----Original Message----- From: John Lam (IRONRUBY) Sent: Saturday, October 04, 2008 10:25 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: bigdecimal-3 tfpt review "/shelveset:bigdecimal-3;REDMOND\jflam" Comment : Removed static _config field from Peter Bacon Darwin's BigDecimal contribution. From ben2004uk at googlemail.com Sun Oct 5 21:28:16 2008 From: ben2004uk at googlemail.com (Ben Hall) Date: Mon, 6 Oct 2008 02:28:16 +0100 Subject: [Ironruby-core] Annoymous class extending a module doesn't return expected kind_of Message-ID: Hi guys, I've been bashing my head again this problem for the last few days where the object I expected wasn't passed around, tonight I decided to break it down and focus on a much small part. Turns out, I was looking in the wrong part. This is what I think the problem is. The code is creating an anonymous class which is extending a module. The code then does a kind_of? to decide what to do with it. >From what I can tell, it looks like the kind_of doesn't recognize the modules it is extending. This is the code which demonstrates the problem: Code Repro: module AAA class << self def a puts "Hello" end end def myAAA klass = Class.new do extend AAA end puts "Am I a type of what I extended (AAA)?" puts klass.kind_of?(AAA) end end class XYZ include AAA end $a = XYZ.new $a.myAAA With MRI, true is returned. With IronRuby, false is returned. Output: E:\IronRuby\trunk\build\debug>ruby array_test Am I a type of what I extended (AAA)? true E:\IronRuby\trunk\build\debug>ir array_test Am I a type of what I extended (AAA)? false This has blocked me moving on. Anyone got any ideas? Any help on this would be great! Thanks Ben Blog.BenHall.me.uk From curth at microsoft.com Mon Oct 6 01:13:28 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Sun, 5 Oct 2008 22:13:28 -0700 Subject: [Ironruby-core] Annoymous class extending a module doesn't return expected kind_of In-Reply-To: References: Message-ID: This is working for me with our internal sources but not with what's current in RubyForge. I think we might be a few days behind on the sync -- you should see it working after the next one happens. -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ben Hall Sent: Sunday, October 05, 2008 6:28 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Annoymous class extending a module doesn't return expected kind_of Hi guys, I've been bashing my head again this problem for the last few days where the object I expected wasn't passed around, tonight I decided to break it down and focus on a much small part. Turns out, I was looking in the wrong part. This is what I think the problem is. The code is creating an anonymous class which is extending a module. The code then does a kind_of? to decide what to do with it. >From what I can tell, it looks like the kind_of doesn't recognize the modules it is extending. This is the code which demonstrates the problem: Code Repro: module AAA class << self def a puts "Hello" end end def myAAA klass = Class.new do extend AAA end puts "Am I a type of what I extended (AAA)?" puts klass.kind_of?(AAA) end end class XYZ include AAA end $a = XYZ.new $a.myAAA With MRI, true is returned. With IronRuby, false is returned. Output: E:\IronRuby\trunk\build\debug>ruby array_test Am I a type of what I extended (AAA)? true E:\IronRuby\trunk\build\debug>ir array_test Am I a type of what I extended (AAA)? false This has blocked me moving on. Anyone got any ideas? Any help on this would be great! Thanks Ben Blog.BenHall.me.uk _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From robert.brotherus at napa.fi Mon Oct 6 01:40:26 2008 From: robert.brotherus at napa.fi (Robert Brotherus) Date: Mon, 6 Oct 2008 08:40:26 +0300 Subject: [Ironruby-core] Usage errors with IR SVN 153 References: <372109E149E8084D8E6C7D9CFD82E06333432EA5E6@NA-EXMSG-C115.redmond.corp.microsoft.com><48B1E47C.1060502@open2view.com><000601c90686$ecd18c30$c674a490$@com><53194650933664488F3F0C3A0AB56832A07515@nw60.napa.fi> Message-ID: <53194650933664488F3F0C3A0AB56832A72298@nw60.napa.fi> John Lam: > Just committed a fix for the compilation errors. Curt Hagenlocher: > You define extension methods in your hosting app, right? > We're still working out the details of our second attempt to fix this problem. > In the short term, the workaround is to define your own private copy of ExtensionAttribute ... Thanks John and Curt for quick responses, now my hosting up running happily again with IR SVN 155! Robert Brotherus Software architect Napa Ltd Tammasaarenkatu 3, Helsinki FI-00180 P.O.Box 470, Helsinki FI-00181 Tel. +358 9 22 813 1 Direct. +358 9 22 813 611 GSM +358 45 11 456 02 Fax. +358 9 22 813 800 Email: Robert.Brotherus at napa.fi www.napa.fi From stefan.dobrev at gmail.com Mon Oct 6 02:29:15 2008 From: stefan.dobrev at gmail.com (Stefan Dobrev) Date: Mon, 6 Oct 2008 09:29:15 +0300 Subject: [Ironruby-core] Annoymous class extending a module doesn't return expected kind_of In-Reply-To: References: Message-ID: <928de89c0810052329x78f2b7bbob1dad59fc2c9d1b@mail.gmail.com> There was a discussion about this some time ago. Here it is: http://rubyforge.org/pipermail/ironruby-core/2008-September/002874.html The reported bug is here: http://rubyforge.org/tracker/?func=detail&aid=21995&group_id=4359&atid=16798 Stefan. 2008/10/6 Ben Hall > Hi guys, > > I've been bashing my head again this problem for the last few days > where the object I expected wasn't passed around, tonight I decided to > break it down and focus on a much small part. Turns out, I was > looking in the wrong part. > > This is what I think the problem is. The code is creating an anonymous > class which is extending a module. The code then does a kind_of? to > decide what to do with it. > > >From what I can tell, it looks like the kind_of doesn't recognize the > modules it is extending. This is the code which demonstrates the > problem: > > Code Repro: > module AAA > class << self > def a > puts "Hello" > end > end > > def myAAA > klass = Class.new do > extend AAA > end > > puts "Am I a type of what I extended (AAA)?" > puts klass.kind_of?(AAA) > end > end > > class XYZ > include AAA > end > > $a = XYZ.new > $a.myAAA > > > With MRI, true is returned. With IronRuby, false is returned. > > Output: > > E:\IronRuby\trunk\build\debug>ruby array_test > Am I a type of what I extended (AAA)? > true > > E:\IronRuby\trunk\build\debug>ir array_test > Am I a type of what I extended (AAA)? > false > > > This has blocked me moving on. Anyone got any ideas? > > Any help on this would be great! > > Thanks > > Ben > Blog.BenHall.me.uk > _______________________________________________ > 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 ben2004uk at googlemail.com Mon Oct 6 05:42:42 2008 From: ben2004uk at googlemail.com (Ben Hall) Date: Mon, 6 Oct 2008 10:42:42 +0100 Subject: [Ironruby-core] Annoymous class extending a module doesn't return expected kind_of In-Reply-To: References: Message-ID: Hi Curt, Any ideas when the next release will happen? Is this going to be a post PDC thing? Ben On Mon, Oct 6, 2008 at 6:13 AM, Curt Hagenlocher wrote: > This is working for me with our internal sources but not with what's current in RubyForge. I think we might be a few days behind on the sync -- you should see it working after the next one happens. > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ben Hall > Sent: Sunday, October 05, 2008 6:28 PM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] Annoymous class extending a module doesn't return expected kind_of > > Hi guys, > > I've been bashing my head again this problem for the last few days > where the object I expected wasn't passed around, tonight I decided to > break it down and focus on a much small part. Turns out, I was > looking in the wrong part. > > This is what I think the problem is. The code is creating an anonymous > class which is extending a module. The code then does a kind_of? to > decide what to do with it. > > >From what I can tell, it looks like the kind_of doesn't recognize the > modules it is extending. This is the code which demonstrates the > problem: > > Code Repro: > module AAA > class << self > def a > puts "Hello" > end > end > > def myAAA > klass = Class.new do > extend AAA > end > > puts "Am I a type of what I extended (AAA)?" > puts klass.kind_of?(AAA) > end > end > > class XYZ > include AAA > end > > $a = XYZ.new > $a.myAAA > > > With MRI, true is returned. With IronRuby, false is returned. > > Output: > > E:\IronRuby\trunk\build\debug>ruby array_test > Am I a type of what I extended (AAA)? > true > > E:\IronRuby\trunk\build\debug>ir array_test > Am I a type of what I extended (AAA)? > false > > > This has blocked me moving on. Anyone got any ideas? > > Any help on this would be great! > > Thanks > > Ben > Blog.BenHall.me.uk > _______________________________________________ > 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 ben2004uk at googlemail.com Mon Oct 6 05:45:19 2008 From: ben2004uk at googlemail.com (Ben Hall) Date: Mon, 6 Oct 2008 10:45:19 +0100 Subject: [Ironruby-core] Annoymous class extending a module doesn't return expected kind_of In-Reply-To: <928de89c0810052329x78f2b7bbob1dad59fc2c9d1b@mail.gmail.com> References: <928de89c0810052329x78f2b7bbob1dad59fc2c9d1b@mail.gmail.com> Message-ID: Hi Stefan, Looks like you are working on the same item as me :) This is the last problem I have I think to run unmodified RSpec, well until I hit the next thing :) Ben On Mon, Oct 6, 2008 at 7:29 AM, Stefan Dobrev wrote: > There was a discussion about this some time ago. > > Here it is: > http://rubyforge.org/pipermail/ironruby-core/2008-September/002874.html > The reported bug is here: > http://rubyforge.org/tracker/?func=detail&aid=21995&group_id=4359&atid=16798 > > Stefan. > > 2008/10/6 Ben Hall >> >> Hi guys, >> >> I've been bashing my head again this problem for the last few days >> where the object I expected wasn't passed around, tonight I decided to >> break it down and focus on a much small part. Turns out, I was >> looking in the wrong part. >> >> This is what I think the problem is. The code is creating an anonymous >> class which is extending a module. The code then does a kind_of? to >> decide what to do with it. >> >> >From what I can tell, it looks like the kind_of doesn't recognize the >> modules it is extending. This is the code which demonstrates the >> problem: >> >> Code Repro: >> module AAA >> class << self >> def a >> puts "Hello" >> end >> end >> >> def myAAA >> klass = Class.new do >> extend AAA >> end >> >> puts "Am I a type of what I extended (AAA)?" >> puts klass.kind_of?(AAA) >> end >> end >> >> class XYZ >> include AAA >> end >> >> $a = XYZ.new >> $a.myAAA >> >> >> With MRI, true is returned. With IronRuby, false is returned. >> >> Output: >> >> E:\IronRuby\trunk\build\debug>ruby array_test >> Am I a type of what I extended (AAA)? >> true >> >> E:\IronRuby\trunk\build\debug>ir array_test >> Am I a type of what I extended (AAA)? >> false >> >> >> This has blocked me moving on. Anyone got any ideas? >> >> Any help on this would be great! >> >> Thanks >> >> Ben >> Blog.BenHall.me.uk >> _______________________________________________ >> 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 curth at microsoft.com Mon Oct 6 10:41:42 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Mon, 6 Oct 2008 07:41:42 -0700 Subject: [Ironruby-core] Annoymous class extending a module doesn't return expected kind_of In-Reply-To: References: Message-ID: Oh, no -- we're doing it pretty regularly. I think there's just been a short delay while we pull in Peter's work and that we'll probably push back out in the next two days. We're totally not optimized for outside contributions at this point, but "working from a single repository" is on someone's list of commitments for the next year. -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ben Hall Sent: Monday, October 06, 2008 2:43 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Annoymous class extending a module doesn't return expected kind_of Hi Curt, Any ideas when the next release will happen? Is this going to be a post PDC thing? Ben On Mon, Oct 6, 2008 at 6:13 AM, Curt Hagenlocher wrote: > This is working for me with our internal sources but not with what's current in RubyForge. I think we might be a few days behind on the sync -- you should see it working after the next one happens. > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ben Hall > Sent: Sunday, October 05, 2008 6:28 PM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] Annoymous class extending a module doesn't return expected kind_of > > Hi guys, > > I've been bashing my head again this problem for the last few days > where the object I expected wasn't passed around, tonight I decided to > break it down and focus on a much small part. Turns out, I was > looking in the wrong part. > > This is what I think the problem is. The code is creating an anonymous > class which is extending a module. The code then does a kind_of? to > decide what to do with it. > > >From what I can tell, it looks like the kind_of doesn't recognize the > modules it is extending. This is the code which demonstrates the > problem: > > Code Repro: > module AAA > class << self > def a > puts "Hello" > end > end > > def myAAA > klass = Class.new do > extend AAA > end > > puts "Am I a type of what I extended (AAA)?" > puts klass.kind_of?(AAA) > end > end > > class XYZ > include AAA > end > > $a = XYZ.new > $a.myAAA > > > With MRI, true is returned. With IronRuby, false is returned. > > Output: > > E:\IronRuby\trunk\build\debug>ruby array_test > Am I a type of what I extended (AAA)? > true > > E:\IronRuby\trunk\build\debug>ir array_test > Am I a type of what I extended (AAA)? > false > > > This has blocked me moving on. Anyone got any ideas? > > Any help on this would be great! > > Thanks > > Ben > Blog.BenHall.me.uk > _______________________________________________ > 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 ben2004uk at googlemail.com Mon Oct 6 11:20:05 2008 From: ben2004uk at googlemail.com (Ben Hall) Date: Mon, 6 Oct 2008 16:20:05 +0100 Subject: [Ironruby-core] Annoymous class extending a module doesn't return expected kind_of In-Reply-To: References: Message-ID: Excellent. I'll continue with my work around until then :) I'll go over the changes i've made locally and raise bugs where required tonight. Sadly, they are all core so I can't submit them myself. Cheers Ben On Mon, Oct 6, 2008 at 3:41 PM, Curt Hagenlocher wrote: > Oh, no -- we're doing it pretty regularly. I think there's just been a short delay while we pull in Peter's work and that we'll probably push back out in the next two days. We're totally not optimized for outside contributions at this point, but "working from a single repository" is on someone's list of commitments for the next year. > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ben Hall > Sent: Monday, October 06, 2008 2:43 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Annoymous class extending a module doesn't return expected kind_of > > Hi Curt, > > Any ideas when the next release will happen? Is this going to be a > post PDC thing? > > Ben > > On Mon, Oct 6, 2008 at 6:13 AM, Curt Hagenlocher wrote: >> This is working for me with our internal sources but not with what's current in RubyForge. I think we might be a few days behind on the sync -- you should see it working after the next one happens. >> >> -----Original Message----- >> From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ben Hall >> Sent: Sunday, October 05, 2008 6:28 PM >> To: ironruby-core at rubyforge.org >> Subject: [Ironruby-core] Annoymous class extending a module doesn't return expected kind_of >> >> Hi guys, >> >> I've been bashing my head again this problem for the last few days >> where the object I expected wasn't passed around, tonight I decided to >> break it down and focus on a much small part. Turns out, I was >> looking in the wrong part. >> >> This is what I think the problem is. The code is creating an anonymous >> class which is extending a module. The code then does a kind_of? to >> decide what to do with it. >> >> >From what I can tell, it looks like the kind_of doesn't recognize the >> modules it is extending. This is the code which demonstrates the >> problem: >> >> Code Repro: >> module AAA >> class << self >> def a >> puts "Hello" >> end >> end >> >> def myAAA >> klass = Class.new do >> extend AAA >> end >> >> puts "Am I a type of what I extended (AAA)?" >> puts klass.kind_of?(AAA) >> end >> end >> >> class XYZ >> include AAA >> end >> >> $a = XYZ.new >> $a.myAAA >> >> >> With MRI, true is returned. With IronRuby, false is returned. >> >> Output: >> >> E:\IronRuby\trunk\build\debug>ruby array_test >> Am I a type of what I extended (AAA)? >> true >> >> E:\IronRuby\trunk\build\debug>ir array_test >> Am I a type of what I extended (AAA)? >> false >> >> >> This has blocked me moving on. Anyone got any ideas? >> >> Any help on this would be great! >> >> Thanks >> >> Ben >> Blog.BenHall.me.uk >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core >> >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core >> > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > From jflam at microsoft.com Mon Oct 6 12:08:25 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Mon, 6 Oct 2008 09:08:25 -0700 Subject: [Ironruby-core] Just committed r156 In-Reply-To: References: Message-ID: <372109E149E8084D8E6C7D9CFD82E063334B00C3D9@NA-EXMSG-C115.redmond.corp.microsoft.com> Thanks, -John From Tomas.Matousek at microsoft.com Mon Oct 6 16:53:17 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Mon, 6 Oct 2008 13:53:17 -0700 Subject: [Ironruby-core] Code Review: Autoload6 Message-ID: tfpt review "/shelveset:Autoload6;REDMOND\tomat" Comment : Implements Kernel#autoload, Module#autoload and adds more specs for them. Fixes incorrect evaluation order in post-test loop (begin ... end while cond). Adds helpers to Tokenizer class that check whether a given string is a valid method/constant/class-variable/instance-variable name. Fixes signature of Kernel#printf. Adds support for HOME directory mapping to 'load' and 'require'. Fixes few symbol related bugs introduced by previous checkin. Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: Autoload6.diff Type: application/octet-stream Size: 173234 bytes Desc: Autoload6.diff URL: From ben2004uk at googlemail.com Mon Oct 6 17:22:18 2008 From: ben2004uk at googlemail.com (Ben Hall) Date: Mon, 6 Oct 2008 22:22:18 +0100 Subject: [Ironruby-core] Caller(0)[1] returns :0 if not debugging Message-ID: Hi, As promised, I'm trying to track down and reproduce various bugs I have hit. The first one I have is that my code is calling caller(0)[1] which expects the path to the calling method. However, if i'm using running the ir, then it can't find the file or the method name, and the line number is 0 in the stack trace, as such the information being returned is incorrect which is causing expand_path to blow up. Hope that makes sense? E:\IronRuby\r156\build\debug>ir expandpath_call.rb :0 E:\IronRuby\r156\build\debug>ir -D expandpath_call.rb expandpath_call.rb:4 E:\IronRuby\r156\build\debug>ruby expandpath_call.rb expandpath_call.rb:4 File: expandpath_call.rb require 'expandpath.rb' $a = A.new $a.method File: expandpath.rb class A def method puts caller(0)[1] end end In the actual code, the stack frame looks something like this: {#top-level-method#$18##18 at offset 10911 in file:line:column :0:0} Hope this helps Cheers Ben -------------- next part -------------- A non-text attachment was scrubbed... Name: expandpath.rb Type: application/octet-stream Size: 108 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: expandpath_call.rb Type: application/octet-stream Size: 48 bytes Desc: not available URL: From curth at microsoft.com Mon Oct 6 18:04:43 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Mon, 6 Oct 2008 15:04:43 -0700 Subject: [Ironruby-core] Code Review: Autoload6 In-Reply-To: References: Message-ID: Coding changes look good. -----Original Message----- From: Tomas Matousek Sent: Monday, October 06, 2008 1:53 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: Autoload6 tfpt review "/shelveset:Autoload6;REDMOND\tomat" Comment : Implements Kernel#autoload, Module#autoload and adds more specs for them. Fixes incorrect evaluation order in post-test loop (begin ... end while cond). Adds helpers to Tokenizer class that check whether a given string is a valid method/constant/class-variable/instance-variable name. Fixes signature of Kernel#printf. Adds support for HOME directory mapping to 'load' and 'require'. Fixes few symbol related bugs introduced by previous checkin. Tomas From jdeville at microsoft.com Mon Oct 6 18:11:37 2008 From: jdeville at microsoft.com (Jim Deville) Date: Mon, 6 Oct 2008 15:11:37 -0700 Subject: [Ironruby-core] Code Review: Autoload6 In-Reply-To: References: Message-ID: Test looks good JD > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Curt Hagenlocher > Sent: Monday, October 06, 2008 3:05 PM > To: Tomas Matousek; IronRuby External Code Reviewers > Cc: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Code Review: Autoload6 > > Coding changes look good. > > -----Original Message----- > From: Tomas Matousek > Sent: Monday, October 06, 2008 1:53 PM > To: IronRuby External Code Reviewers > Cc: ironruby-core at rubyforge.org > Subject: Code Review: Autoload6 > > tfpt review "/shelveset:Autoload6;REDMOND\tomat" > Comment : > Implements Kernel#autoload, Module#autoload and adds more specs for > them. > Fixes incorrect evaluation order in post-test loop (begin ... end > while cond). > Adds helpers to Tokenizer class that check whether a given string > is a valid method/constant/class-variable/instance-variable name. > Fixes signature of Kernel#printf. > Adds support for HOME directory mapping to 'load' and 'require'. > Fixes few symbol related bugs introduced by previous checkin. > > Tomas > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From ben2004uk at googlemail.com Mon Oct 6 18:14:27 2008 From: ben2004uk at googlemail.com (Ben Hall) Date: Mon, 6 Oct 2008 23:14:27 +0100 Subject: [Ironruby-core] Expand_Path - Errors when path contains line number Message-ID: Hi, When using FileOps.ExpandPath() (otherwise known as File.expand_path), I think the method should accept a path which includes additional information - such as the line number : ../../path/folder/file.rb:93 Should return E:/IronRuby/r156/path/folder/file.rb:93 However, i've found that it actually throws an exception: E:\IronRuby\r156\src\IronRuby.Libraries\Builtins\FileOps.cs:358:in `expand_path': Invalid argument - ../../path/folder/file.rb:93 (Errno::EINVAL) I'm getting the path by calling: caller(0)[1] Is this right? Or has something else gone wrong? Thanks Ben From Tomas.Matousek at microsoft.com Mon Oct 6 18:21:49 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Mon, 6 Oct 2008 15:21:49 -0700 Subject: [Ironruby-core] Expand_Path - Errors when path contains line number In-Reply-To: References: Message-ID: The problem is that ':' is a special character used for delimiting drive name on Windows. Currently, we use .NET file API for expand_path implementation. Maybe we should use string manipulation only. Can you file a bug? Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ben Hall Sent: Monday, October 06, 2008 3:14 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Expand_Path - Errors when path contains line number Hi, When using FileOps.ExpandPath() (otherwise known as File.expand_path), I think the method should accept a path which includes additional information - such as the line number : ../../path/folder/file.rb:93 Should return E:/IronRuby/r156/path/folder/file.rb:93 However, i've found that it actually throws an exception: E:\IronRuby\r156\src\IronRuby.Libraries\Builtins\FileOps.cs:358:in `expand_path': Invalid argument - ../../path/folder/file.rb:93 (Errno::EINVAL) I'm getting the path by calling: caller(0)[1] Is this right? Or has something else gone wrong? Thanks Ben _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From ben2004uk at googlemail.com Mon Oct 6 18:36:31 2008 From: ben2004uk at googlemail.com (Ben Hall) Date: Mon, 6 Oct 2008 23:36:31 +0100 Subject: [Ironruby-core] Expand_Path - Errors when path contains line number In-Reply-To: References: Message-ID: Done http://rubyforge.org/tracker/index.php?func=detail&aid=22315&group_id=4359&atid=16798 Cheers Ben On Mon, Oct 6, 2008 at 11:21 PM, Tomas Matousek wrote: > The problem is that ':' is a special character used for delimiting drive name on Windows. Currently, we use .NET file API for expand_path implementation. Maybe we should use string manipulation only. Can you file a bug? > > Tomas > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ben Hall > Sent: Monday, October 06, 2008 3:14 PM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] Expand_Path - Errors when path contains line number > > Hi, > > When using FileOps.ExpandPath() (otherwise known as File.expand_path), > I think the method should accept a path which includes additional > information - such as the line number : > ../../path/folder/file.rb:93 > > Should return > E:/IronRuby/r156/path/folder/file.rb:93 > > However, i've found that it actually throws an exception: > E:\IronRuby\r156\src\IronRuby.Libraries\Builtins\FileOps.cs:358:in > `expand_path': Invalid argument - ../../path/folder/file.rb:93 > (Errno::EINVAL) > > I'm getting the path by calling: > caller(0)[1] > > Is this right? Or has something else gone wrong? > > Thanks > > Ben > _______________________________________________ > 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 Mon Oct 6 18:37:22 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Mon, 6 Oct 2008 15:37:22 -0700 Subject: [Ironruby-core] Code Review: MoreDefaultProtocols Message-ID: tfpt review "/shelveset:MoreDefaultProtocols;REDMOND\tomat" Introduces more default protocol conversions. Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: MoreDefaultProtocols.diff Type: application/octet-stream Size: 70279 bytes Desc: MoreDefaultProtocols.diff URL: From curth at microsoft.com Mon Oct 6 19:34:13 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Mon, 6 Oct 2008 16:34:13 -0700 Subject: [Ironruby-core] Code Review: MoreDefaultProtocols In-Reply-To: References: Message-ID: Some methods that were changed from object[] to MutableString[] aren't tagged with [DefaultProtocol]. Is this conversion enabled by default? Why can't FileOps.UpdateTimes use the protocol conversion? Is to for semantic compatibility? (ie don't call to_s if the time conversion fails) Looks good otherwise. -----Original Message----- From: Tomas Matousek Sent: Monday, October 06, 2008 3:37 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: MoreDefaultProtocols tfpt review "/shelveset:MoreDefaultProtocols;REDMOND\tomat" Introduces more default protocol conversions. Tomas From Tomas.Matousek at microsoft.com Mon Oct 6 19:37:57 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Mon, 6 Oct 2008 16:37:57 -0700 Subject: [Ironruby-core] Code Review: MoreDefaultProtocols In-Reply-To: References: Message-ID: The methods that take MutableString[] are not [RubyMethods] - they're just helper methods. We don't support [DefaultProtocol] on arrays of MutableString yet. But this change is the first step in that direction. UpdateTimes have two overloads - one taking a single string and the other arbitrary number of arbitrary objects on which default protocol conversion is applied. So as soon as [DefaultProtocol] works on params array we can use it here. Tomas -----Original Message----- From: Curt Hagenlocher Sent: Monday, October 06, 2008 4:34 PM To: Tomas Matousek; IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: RE: Code Review: MoreDefaultProtocols Some methods that were changed from object[] to MutableString[] aren't tagged with [DefaultProtocol]. Is this conversion enabled by default? Why can't FileOps.UpdateTimes use the protocol conversion? Is to for semantic compatibility? (ie don't call to_s if the time conversion fails) Looks good otherwise. -----Original Message----- From: Tomas Matousek Sent: Monday, October 06, 2008 3:37 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: MoreDefaultProtocols tfpt review "/shelveset:MoreDefaultProtocols;REDMOND\tomat" Introduces more default protocol conversions. Tomas From curth at microsoft.com Mon Oct 6 19:42:44 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Mon, 6 Oct 2008 16:42:44 -0700 Subject: [Ironruby-core] Code Review: MoreDefaultProtocols In-Reply-To: References: Message-ID: Ah, okay. I obviously missed that they weren't RubyMethods. -----Original Message----- From: Tomas Matousek Sent: Monday, October 06, 2008 4:38 PM To: Curt Hagenlocher; IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: RE: Code Review: MoreDefaultProtocols The methods that take MutableString[] are not [RubyMethods] - they're just helper methods. We don't support [DefaultProtocol] on arrays of MutableString yet. But this change is the first step in that direction. UpdateTimes have two overloads - one taking a single string and the other arbitrary number of arbitrary objects on which default protocol conversion is applied. So as soon as [DefaultProtocol] works on params array we can use it here. Tomas -----Original Message----- From: Curt Hagenlocher Sent: Monday, October 06, 2008 4:34 PM To: Tomas Matousek; IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: RE: Code Review: MoreDefaultProtocols Some methods that were changed from object[] to MutableString[] aren't tagged with [DefaultProtocol]. Is this conversion enabled by default? Why can't FileOps.UpdateTimes use the protocol conversion? Is to for semantic compatibility? (ie don't call to_s if the time conversion fails) Looks good otherwise. -----Original Message----- From: Tomas Matousek Sent: Monday, October 06, 2008 3:37 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: MoreDefaultProtocols tfpt review "/shelveset:MoreDefaultProtocols;REDMOND\tomat" Introduces more default protocol conversions. Tomas From bacondarwin at googlemail.com Tue Oct 7 09:38:00 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Tue, 7 Oct 2008 14:38:00 +0100 Subject: [Ironruby-core] Code Review (External): NumericalFixes Message-ID: <001a01c92881$ec22ddd0$c4689970$@com> A number of fixes to pass most of the relevant rubyspecs. BignumOps.cs: Leftshift and Rightshift fixes FixnumOps.cs: Leftshift, Rightshift, Bitwise_Xor, Bitwise_And and Bitwise_Or fixes FloatOps.cs: Constant and IsNegativeZero modification. Also partial fix to ToS Integer.cs: DownTo and UpTo fixes Numeric.cs: Remainder and Step fixes. (There are now only 2 failures in Numeric, 1 in Float and a number in Bignum.) -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: numeric_fixes.diff Type: application/octet-stream Size: 13363 bytes Desc: not available URL: From Tomas.Matousek at microsoft.com Tue Oct 7 13:47:33 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 7 Oct 2008 10:47:33 -0700 Subject: [Ironruby-core] Code Review: symbolconversions Message-ID: tfpt review "/shelveset:symbolconversions;REDMOND\tomat" (Reviewed by John) Implements default protocol conversion for symbol and bool. Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: symbolconversions.diff Type: application/octet-stream Size: 110825 bytes Desc: symbolconversions.diff URL: From Tomas.Matousek at microsoft.com Wed Oct 8 00:25:55 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 7 Oct 2008 21:25:55 -0700 Subject: [Ironruby-core] Code Review: MethodLookup Message-ID: tfpt review "/shelveset:MethodLookup;REDMOND\tomat" 'alias' keyword, alias_method and public/private/protected methods look the method up in Object if called on a module, which we didn't do Also, 'super' keyword doesn't use current 'self' if called in class_eval/instance_eval. Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: MethodLookup.diff Type: application/octet-stream Size: 51827 bytes Desc: MethodLookup.diff URL: From curth at microsoft.com Wed Oct 8 00:52:37 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Tue, 7 Oct 2008 21:52:37 -0700 Subject: [Ironruby-core] Code Review: MethodLookup In-Reply-To: References: Message-ID: Changes are largely good. The change involving MetaObjectBuilder.TreatRestrictionsAsConditions is pretty awkward, but I'm sure you think so too and there don't seem to be any terribly clean alternatives. In the case we were looking at earlier today, will ResolveMethodFallbackToObject find Module.freeze or only Object.freeze? -----Original Message----- From: Tomas Matousek Sent: Tuesday, October 07, 2008 9:26 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: MethodLookup tfpt review "/shelveset:MethodLookup;REDMOND\tomat" 'alias' keyword, alias_method and public/private/protected methods look the method up in Object if called on a module, which we didn't do Also, 'super' keyword doesn't use current 'self' if called in class_eval/instance_eval. Tomas From Tomas.Matousek at microsoft.com Wed Oct 8 01:35:54 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 7 Oct 2008 22:35:54 -0700 Subject: [Ironruby-core] Code Review: MethodLookup In-Reply-To: References: Message-ID: Yes, TreatRestrictionsAsConditions is a little ugly, but I don't see any much cleaner way how to achieve the same. I don't remember the exact details, let's revisit it tomorrow. Tomas -----Original Message----- From: Curt Hagenlocher Sent: Tuesday, October 07, 2008 9:53 PM To: Tomas Matousek; IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: RE: Code Review: MethodLookup Changes are largely good. The change involving MetaObjectBuilder.TreatRestrictionsAsConditions is pretty awkward, but I'm sure you think so too and there don't seem to be any terribly clean alternatives. In the case we were looking at earlier today, will ResolveMethodFallbackToObject find Module.freeze or only Object.freeze? -----Original Message----- From: Tomas Matousek Sent: Tuesday, October 07, 2008 9:26 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: MethodLookup tfpt review "/shelveset:MethodLookup;REDMOND\tomat" 'alias' keyword, alias_method and public/private/protected methods look the method up in Object if called on a module, which we didn't do Also, 'super' keyword doesn't use current 'self' if called in class_eval/instance_eval. Tomas From curth at microsoft.com Wed Oct 8 11:52:02 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Wed, 8 Oct 2008 08:52:02 -0700 Subject: [Ironruby-core] Code Review: MethodLookup In-Reply-To: <4273983241B2C748B62D389845DE815D069F881268@NA-EXMSG-C118.redmond.corp.microsoft.com> References: <4273983241B2C748B62D389845DE815D069F881268@NA-EXMSG-C118.redmond.corp.microsoft.com> Message-ID: I ran my test case against MRI and determined that MRI itself would only find Object.freeze under these circumstances. I suspect that the original code in edge Rails is therefore incorrect, in that it will create a method alias for Object.freeze instead of Module.freeze. Bottom line: you're doing the same thing as MRI so the code is okay. :) -----Original Message----- From: Curt Hagenlocher Sent: Tuesday, October 07, 2008 9:53 PM To: Tomas Matousek; IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: RE: Code Review: MethodLookup Changes are largely good. The change involving MetaObjectBuilder.TreatRestrictionsAsConditions is pretty awkward, but I'm sure you think so too and there don't seem to be any terribly clean alternatives. In the case we were looking at earlier today, will ResolveMethodFallbackToObject find Module.freeze or only Object.freeze? -----Original Message----- From: Tomas Matousek Sent: Tuesday, October 07, 2008 9:26 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: MethodLookup tfpt review "/shelveset:MethodLookup;REDMOND\tomat" 'alias' keyword, alias_method and public/private/protected methods look the method up in Object if called on a module, which we didn't do Also, 'super' keyword doesn't use current 'self' if called in class_eval/instance_eval. Tomas From bacondarwin at googlemail.com Wed Oct 8 13:09:20 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Wed, 8 Oct 2008 18:09:20 +0100 Subject: [Ironruby-core] Code Review (External): NumericalFixes Message-ID: <004901c92968$9bbd93c0$d338bb40$@com> Ping! From: Peter Bacon Darwin [mailto:bacondarwin at googlemail.com] Sent: Tuesday,07 October 07, 2008 14:38 To: 'ironruby-core at rubyforge.org' Subject: Code Review (External): NumericalFixes A number of fixes to pass most of the relevant rubyspecs. BignumOps.cs: Leftshift and Rightshift fixes FixnumOps.cs: Leftshift, Rightshift, Bitwise_Xor, Bitwise_And and Bitwise_Or fixes FloatOps.cs: Constant and IsNegativeZero modification. Also partial fix to ToS Integer.cs: DownTo and UpTo fixes Numeric.cs: Remainder and Step fixes. (There are now only 2 failures in Numeric, 1 in Float and a number in Bignum.) -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdeville at microsoft.com Wed Oct 8 16:43:37 2008 From: jdeville at microsoft.com (Jim Deville) Date: Wed, 8 Oct 2008 13:43:37 -0700 Subject: [Ironruby-core] Code Review (External): NumericalFixes In-Reply-To: <004901c92968$9bbd93c0$d338bb40$@com> References: <004901c92968$9bbd93c0$d338bb40$@com> Message-ID: If you are running against the RubySpec's version of RubySpecs (as opposed to the IronRuby repo) you may want to sync and test again. I pushed some changes last night that make some of the float comparison do numerical comparisons instead of string comparisons. JD From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Peter Bacon Darwin Sent: Wednesday, October 08, 2008 10:09 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review (External): NumericalFixes Ping! From: Peter Bacon Darwin [mailto:bacondarwin at googlemail.com] Sent: Tuesday,07 October 07, 2008 14:38 To: 'ironruby-core at rubyforge.org' Subject: Code Review (External): NumericalFixes A number of fixes to pass most of the relevant rubyspecs. BignumOps.cs: Leftshift and Rightshift fixes FixnumOps.cs: Leftshift, Rightshift, Bitwise_Xor, Bitwise_And and Bitwise_Or fixes FloatOps.cs: Constant and IsNegativeZero modification. Also partial fix to ToS Integer.cs: DownTo and UpTo fixes Numeric.cs: Remainder and Step fixes. (There are now only 2 failures in Numeric, 1 in Float and a number in Bignum.) -------------- next part -------------- An HTML attachment was scrubbed... URL: From bacondarwin at googlemail.com Thu Oct 9 10:21:25 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Thu, 9 Oct 2008 15:21:25 +0100 Subject: [Ironruby-core] Code Review (External): NumericalFixes In-Reply-To: References: <004901c92968$9bbd93c0$d338bb40$@com> Message-ID: <003701c92a1a$51e30ac0$f5a92040$@com> Thanks Jim. I pulled the latest rubyspecs and there are no unexpected failures. Still waiting for someone to review my code... Pete From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jim Deville Sent: Wednesday,08 October 08, 2008 21:44 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review (External): NumericalFixes If you are running against the RubySpec's version of RubySpecs (as opposed to the IronRuby repo) you may want to sync and test again. I pushed some changes last night that make some of the float comparison do numerical comparisons instead of string comparisons. JD From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Peter Bacon Darwin Sent: Wednesday, October 08, 2008 10:09 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review (External): NumericalFixes Ping! From: Peter Bacon Darwin [mailto:bacondarwin at googlemail.com] Sent: Tuesday,07 October 07, 2008 14:38 To: 'ironruby-core at rubyforge.org' Subject: Code Review (External): NumericalFixes A number of fixes to pass most of the relevant rubyspecs. BignumOps.cs: Leftshift and Rightshift fixes FixnumOps.cs: Leftshift, Rightshift, Bitwise_Xor, Bitwise_And and Bitwise_Or fixes FloatOps.cs: Constant and IsNegativeZero modification. Also partial fix to ToS Integer.cs: DownTo and UpTo fixes Numeric.cs: Remainder and Step fixes. (There are now only 2 failures in Numeric, 1 in Float and a number in Bignum.) -------------- next part -------------- An HTML attachment was scrubbed... URL: From jflam at microsoft.com Thu Oct 9 12:17:07 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Thu, 9 Oct 2008 09:17:07 -0700 Subject: [Ironruby-core] Code Review (External): NumericalFixes In-Reply-To: <003701c92a1a$51e30ac0$f5a92040$@com> References: <004901c92968$9bbd93c0$d338bb40$@com> <003701c92a1a$51e30ac0$f5a92040$@com> Message-ID: <372109E149E8084D8E6C7D9CFD82E063334B20B0E5@NA-EXMSG-C115.redmond.corp.microsoft.com> Looks good. Please check into SVN and I'll integrate. Note that I'm pushing out r159 in a few minutes, so you'll need to update and regenerate the initializers before you check in. Thanks, -John From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Peter Bacon Darwin Sent: Thursday, October 09, 2008 7:21 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review (External): NumericalFixes Thanks Jim. I pulled the latest rubyspecs and there are no unexpected failures. Still waiting for someone to review my code... Pete From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jim Deville Sent: Wednesday,08 October 08, 2008 21:44 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review (External): NumericalFixes If you are running against the RubySpec's version of RubySpecs (as opposed to the IronRuby repo) you may want to sync and test again. I pushed some changes last night that make some of the float comparison do numerical comparisons instead of string comparisons. JD From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Peter Bacon Darwin Sent: Wednesday, October 08, 2008 10:09 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review (External): NumericalFixes Ping! From: Peter Bacon Darwin [mailto:bacondarwin at googlemail.com] Sent: Tuesday,07 October 07, 2008 14:38 To: 'ironruby-core at rubyforge.org' Subject: Code Review (External): NumericalFixes A number of fixes to pass most of the relevant rubyspecs. BignumOps.cs: Leftshift and Rightshift fixes FixnumOps.cs: Leftshift, Rightshift, Bitwise_Xor, Bitwise_And and Bitwise_Or fixes FloatOps.cs: Constant and IsNegativeZero modification. Also partial fix to ToS Integer.cs: DownTo and UpTo fixes Numeric.cs: Remainder and Step fixes. (There are now only 2 failures in Numeric, 1 in Float and a number in Bignum.) -------------- next part -------------- An HTML attachment was scrubbed... URL: From bacondarwin at googlemail.com Thu Oct 9 15:00:14 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Thu, 9 Oct 2008 20:00:14 +0100 Subject: [Ironruby-core] Code Review (External): NumericalFixes In-Reply-To: <372109E149E8084D8E6C7D9CFD82E063334B20B0E5@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <004901c92968$9bbd93c0$d338bb40$@com> <003701c92a1a$51e30ac0$f5a92040$@com> <372109E149E8084D8E6C7D9CFD82E063334B20B0E5@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <007801c92a41$44dc0300$ce940900$@com> Pushed the bug fixes to SVN r160. Someone on MS side needs to look at ironruby-tags and make sure it is up to date. Pete From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of John Lam (IRONRUBY) Sent: Thursday,09 October 09, 2008 17:17 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review (External): NumericalFixes Looks good. Please check into SVN and I'll integrate. Note that I'm pushing out r159 in a few minutes, so you'll need to update and regenerate the initializers before you check in. Thanks, -John From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Peter Bacon Darwin Sent: Thursday, October 09, 2008 7:21 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review (External): NumericalFixes Thanks Jim. I pulled the latest rubyspecs and there are no unexpected failures. Still waiting for someone to review my code... Pete From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jim Deville Sent: Wednesday,08 October 08, 2008 21:44 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review (External): NumericalFixes If you are running against the RubySpec's version of RubySpecs (as opposed to the IronRuby repo) you may want to sync and test again. I pushed some changes last night that make some of the float comparison do numerical comparisons instead of string comparisons. JD From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Peter Bacon Darwin Sent: Wednesday, October 08, 2008 10:09 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review (External): NumericalFixes Ping! From: Peter Bacon Darwin [mailto:bacondarwin at googlemail.com] Sent: Tuesday,07 October 07, 2008 14:38 To: 'ironruby-core at rubyforge.org' Subject: Code Review (External): NumericalFixes A number of fixes to pass most of the relevant rubyspecs. BignumOps.cs: Leftshift and Rightshift fixes FixnumOps.cs: Leftshift, Rightshift, Bitwise_Xor, Bitwise_And and Bitwise_Or fixes FloatOps.cs: Constant and IsNegativeZero modification. Also partial fix to ToS Integer.cs: DownTo and UpTo fixes Numeric.cs: Remainder and Step fixes. (There are now only 2 failures in Numeric, 1 in Float and a number in Bignum.) -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jimmy.Schementi at microsoft.com Thu Oct 9 22:39:20 2008 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Thu, 9 Oct 2008 19:39:20 -0700 Subject: [Ironruby-core] ironruby.net back up soon Message-ID: <5283CA0A4168DF4FBBD71AE9ECA5A32848A051D7D5@NA-EXMSG-C116.redmond.corp.microsoft.com> All, ironruby.net should be back up whenever the new A-records propagate. Thanks. ~Jimmy -------------- next part -------------- An HTML attachment was scrubbed... URL: From jflam at microsoft.com Fri Oct 10 18:07:31 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Fri, 10 Oct 2008 15:07:31 -0700 Subject: [Ironruby-core] Code Review (External): NumericalFixes In-Reply-To: <007801c92a41$44dc0300$ce940900$@com> References: <004901c92968$9bbd93c0$d338bb40$@com> <003701c92a1a$51e30ac0$f5a92040$@com> <372109E149E8084D8E6C7D9CFD82E063334B20B0E5@NA-EXMSG-C115.redmond.corp.microsoft.com> <007801c92a41$44dc0300$ce940900$@com> Message-ID: <372109E149E8084D8E6C7D9CFD82E063334B20BAE5@NA-EXMSG-C115.redmond.corp.microsoft.com> You changed this line: StringFormatter sf = new StringFormatter(scope, "%.15g", new object[] { self }); To: StringFormatter sf = new StringFormatter(scope, "%.14g", new object[] { self }); Why the reduced # of digits? This is causing one of the specs to fail: 1) Math.sqrt returns the square root of the argument FAILED Expected "123456789.12346" to equal "123456789.123457" Thanks, -John From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Peter Bacon Darwin Sent: Thursday, October 09, 2008 12:00 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review (External): NumericalFixes Pushed the bug fixes to SVN r160. Someone on MS side needs to look at ironruby-tags and make sure it is up to date. Pete From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of John Lam (IRONRUBY) Sent: Thursday,09 October 09, 2008 17:17 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review (External): NumericalFixes Looks good. Please check into SVN and I'll integrate. Note that I'm pushing out r159 in a few minutes, so you'll need to update and regenerate the initializers before you check in. Thanks, -John From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Peter Bacon Darwin Sent: Thursday, October 09, 2008 7:21 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review (External): NumericalFixes Thanks Jim. I pulled the latest rubyspecs and there are no unexpected failures. Still waiting for someone to review my code... Pete From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jim Deville Sent: Wednesday,08 October 08, 2008 21:44 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review (External): NumericalFixes If you are running against the RubySpec's version of RubySpecs (as opposed to the IronRuby repo) you may want to sync and test again. I pushed some changes last night that make some of the float comparison do numerical comparisons instead of string comparisons. JD From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Peter Bacon Darwin Sent: Wednesday, October 08, 2008 10:09 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review (External): NumericalFixes Ping! From: Peter Bacon Darwin [mailto:bacondarwin at googlemail.com] Sent: Tuesday,07 October 07, 2008 14:38 To: 'ironruby-core at rubyforge.org' Subject: Code Review (External): NumericalFixes A number of fixes to pass most of the relevant rubyspecs. BignumOps.cs: Leftshift and Rightshift fixes FixnumOps.cs: Leftshift, Rightshift, Bitwise_Xor, Bitwise_And and Bitwise_Or fixes FloatOps.cs: Constant and IsNegativeZero modification. Also partial fix to ToS Integer.cs: DownTo and UpTo fixes Numeric.cs: Remainder and Step fixes. (There are now only 2 failures in Numeric, 1 in Float and a number in Bignum.) -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tomas.Matousek at microsoft.com Fri Oct 10 21:43:02 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Fri, 10 Oct 2008 18:43:02 -0700 Subject: [Ironruby-core] Code Review: Copy4 Message-ID: tfpt review "/shelveset:Copy4;REDMOND\tomat" Implements initialize_copy for built-in classes. Removes assertion in Proc, it was wrong. Improves and fixes Kernel#send. Implements default protocol for to_ary conversion. Fixes super call with a block but no other arguments. Fixes bugs: [#20849] instance_eval within class_eval causes incorrect method lookup. [ ironruby-Bugs-20317 ] Kernel#instance_eval. [ ironruby-Bugs-20705 ] instance_eval allows defining methods on all objects [ ironruby-Bugs-20408 ] TRUE, FALSE & NIL not defined. [ ironruby-Bugs-21942 ] a const defined on a metaclass is not preserved when the object is cloned Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: Copy4.diff Type: application/octet-stream Size: 137491 bytes Desc: Copy4.diff URL: From bacondarwin at googlemail.com Sat Oct 11 04:20:43 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Sat, 11 Oct 2008 09:20:43 +0100 Subject: [Ironruby-core] Code Review (External): NumericalFixes In-Reply-To: <372109E149E8084D8E6C7D9CFD82E063334B20BAE5@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <004901c92968$9bbd93c0$d338bb40$@com> <003701c92a1a$51e30ac0$f5a92040$@com> <372109E149E8084D8E6C7D9CFD82E063334B20B0E5@NA-EXMSG-C115.redmond.corp.microsoft.com> <007801c92a41$44dc0300$ce940900$@com> <372109E149E8084D8E6C7D9CFD82E063334B20BAE5@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <001501c92b7a$42440bd0$c6cc2370$@com> OK, I mean to raise a bug about this one. There is some funniness inside MRI's string formatting of floating point numbers. Feel free to change it back but then one of the Float specs fails. I think the relevant one is something like: 10000000000000.0.to_s.should == "100000000000000.0" 100000000000000.0.to_s.should == "1.0E+15" But IronRuby produces "1.0E+14" and "1.0E+15" or something like that. I think it has to do with whether you count the trailing zero as a significant digit. Pete From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of John Lam (IRONRUBY) Sent: Friday,10 October 10, 2008 23:08 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review (External): NumericalFixes You changed this line: StringFormatter sf = new StringFormatter(scope, "%.15g", new object[] { self }); To: StringFormatter sf = new StringFormatter(scope, "%.14g", new object[] { self }); Why the reduced # of digits? This is causing one of the specs to fail: 1) Math.sqrt returns the square root of the argument FAILED Expected "123456789.12346" to equal "123456789.123457" Thanks, -John From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Peter Bacon Darwin Sent: Thursday, October 09, 2008 12:00 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review (External): NumericalFixes Pushed the bug fixes to SVN r160. Someone on MS side needs to look at ironruby-tags and make sure it is up to date. Pete From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of John Lam (IRONRUBY) Sent: Thursday,09 October 09, 2008 17:17 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review (External): NumericalFixes Looks good. Please check into SVN and I'll integrate. Note that I'm pushing out r159 in a few minutes, so you'll need to update and regenerate the initializers before you check in. Thanks, -John From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Peter Bacon Darwin Sent: Thursday, October 09, 2008 7:21 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review (External): NumericalFixes Thanks Jim. I pulled the latest rubyspecs and there are no unexpected failures. Still waiting for someone to review my code... Pete From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jim Deville Sent: Wednesday,08 October 08, 2008 21:44 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review (External): NumericalFixes If you are running against the RubySpec's version of RubySpecs (as opposed to the IronRuby repo) you may want to sync and test again. I pushed some changes last night that make some of the float comparison do numerical comparisons instead of string comparisons. JD From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Peter Bacon Darwin Sent: Wednesday, October 08, 2008 10:09 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review (External): NumericalFixes Ping! From: Peter Bacon Darwin [mailto:bacondarwin at googlemail.com] Sent: Tuesday,07 October 07, 2008 14:38 To: 'ironruby-core at rubyforge.org' Subject: Code Review (External): NumericalFixes A number of fixes to pass most of the relevant rubyspecs. BignumOps.cs: Leftshift and Rightshift fixes FixnumOps.cs: Leftshift, Rightshift, Bitwise_Xor, Bitwise_And and Bitwise_Or fixes FloatOps.cs: Constant and IsNegativeZero modification. Also partial fix to ToS Integer.cs: DownTo and UpTo fixes Numeric.cs: Remainder and Step fixes. (There are now only 2 failures in Numeric, 1 in Float and a number in Bignum.) -------------- next part -------------- An HTML attachment was scrubbed... URL: From bacondarwin at googlemail.com Sat Oct 11 16:54:47 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Sat, 11 Oct 2008 21:54:47 +0100 Subject: [Ironruby-core] Code Review (External): NumericalFixes In-Reply-To: <372109E149E8084D8E6C7D9CFD82E063334B20BAE5@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <004901c92968$9bbd93c0$d338bb40$@com> <003701c92a1a$51e30ac0$f5a92040$@com> <372109E149E8084D8E6C7D9CFD82E063334B20B0E5@NA-EXMSG-C115.redmond.corp.microsoft.com> <007801c92a41$44dc0300$ce940900$@com> <372109E149E8084D8E6C7D9CFD82E063334B20BAE5@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <001901c92be3$9a088530$ce198f90$@com> I have submitted two bugs regarding this: 22384 and 22385 . I think for now you get less weirdness if you revert my change below back to StringFormatter sf = new StringFormatter(scope, "%.15g", new object[] { self }); But this is still not right. The problem is that the trailing zero is being added in after the formatting but that a) it should be counted as a significant digit and b) it is not being picked up when there is an exponent displayed. I think that the StringFormatter needs to be fiddled with to sort this out but I am wary of entering into this rather complex beast in case I break other stuff. Regards, Pete From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of John Lam (IRONRUBY) Sent: Friday,10 October 10, 2008 23:08 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review (External): NumericalFixes You changed this line: StringFormatter sf = new StringFormatter(scope, "%.15g", new object[] { self }); To: StringFormatter sf = new StringFormatter(scope, "%.14g", new object[] { self }); Why the reduced # of digits? This is causing one of the specs to fail: 1) Math.sqrt returns the square root of the argument FAILED Expected "123456789.12346" to equal "123456789.123457" Thanks, -John From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Peter Bacon Darwin Sent: Thursday, October 09, 2008 12:00 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review (External): NumericalFixes Pushed the bug fixes to SVN r160. Someone on MS side needs to look at ironruby-tags and make sure it is up to date. Pete From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of John Lam (IRONRUBY) Sent: Thursday,09 October 09, 2008 17:17 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review (External): NumericalFixes Looks good. Please check into SVN and I'll integrate. Note that I'm pushing out r159 in a few minutes, so you'll need to update and regenerate the initializers before you check in. Thanks, -John From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Peter Bacon Darwin Sent: Thursday, October 09, 2008 7:21 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review (External): NumericalFixes Thanks Jim. I pulled the latest rubyspecs and there are no unexpected failures. Still waiting for someone to review my code... Pete From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jim Deville Sent: Wednesday,08 October 08, 2008 21:44 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review (External): NumericalFixes If you are running against the RubySpec's version of RubySpecs (as opposed to the IronRuby repo) you may want to sync and test again. I pushed some changes last night that make some of the float comparison do numerical comparisons instead of string comparisons. JD From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Peter Bacon Darwin Sent: Wednesday, October 08, 2008 10:09 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review (External): NumericalFixes Ping! From: Peter Bacon Darwin [mailto:bacondarwin at googlemail.com] Sent: Tuesday,07 October 07, 2008 14:38 To: 'ironruby-core at rubyforge.org' Subject: Code Review (External): NumericalFixes A number of fixes to pass most of the relevant rubyspecs. BignumOps.cs: Leftshift and Rightshift fixes FixnumOps.cs: Leftshift, Rightshift, Bitwise_Xor, Bitwise_And and Bitwise_Or fixes FloatOps.cs: Constant and IsNegativeZero modification. Also partial fix to ToS Integer.cs: DownTo and UpTo fixes Numeric.cs: Remainder and Step fixes. (There are now only 2 failures in Numeric, 1 in Float and a number in Bignum.) -------------- next part -------------- An HTML attachment was scrubbed... URL: From curth at microsoft.com Sun Oct 12 23:17:50 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Sun, 12 Oct 2008 20:17:50 -0700 Subject: [Ironruby-core] Code Review: Copy4 In-Reply-To: References: Message-ID: The KernelOps._sites dictionary never There's at least one "#region IRubyCloneableMembers" in RubyObject.cs which should be renamed. (There may be others.) Some of the comments in RubyModule.Subclass.cs weren't edited after they were copied from MutableString.Subclass.c -----Original Message----- From: Tomas Matousek Sent: Friday, October 10, 2008 6:43 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: Copy4 tfpt review "/shelveset:Copy4;REDMOND\tomat" Implements initialize_copy for built-in classes. Removes assertion in Proc, it was wrong. Improves and fixes Kernel#send. Implements default protocol for to_ary conversion. Fixes super call with a block but no other arguments. Fixes bugs: [#20849] instance_eval within class_eval causes incorrect method lookup. [ ironruby-Bugs-20317 ] Kernel#instance_eval. [ ironruby-Bugs-20705 ] instance_eval allows defining methods on all objects [ ironruby-Bugs-20408 ] TRUE, FALSE & NIL not defined. [ ironruby-Bugs-21942 ] a const defined on a metaclass is not preserved when the object is cloned Tomas From curth at microsoft.com Sun Oct 12 23:28:30 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Sun, 12 Oct 2008 20:28:30 -0700 Subject: [Ironruby-core] Code Review: Copy4 In-Reply-To: References: Message-ID: Sorry about the premature send. I blame the keyboard. ;) Changes are good. Four comments: 1. The KernelOps._sites dictionary never has the opportunity to have something removed from it; this worries me a little. 2. There's at least one "#region IRubyCloneableMembers" in RubyObject.cs which should be renamed. (There may be others.) 3. Some of the comments in RubyModule.Subclass.cs weren't edited after they were copied from MutableString.Subclass.cs. 4. There was a trivial change to DLR outer ring that should probably have been copied to dlrcr. -----Original Message----- From: Tomas Matousek Sent: Friday, October 10, 2008 6:43 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: Copy4 tfpt review "/shelveset:Copy4;REDMOND\tomat" Implements initialize_copy for built-in classes. Removes assertion in Proc, it was wrong. Improves and fixes Kernel#send. Implements default protocol for to_ary conversion. Fixes super call with a block but no other arguments. Fixes bugs: [#20849] instance_eval within class_eval causes incorrect method lookup. [ ironruby-Bugs-20317 ] Kernel#instance_eval. [ ironruby-Bugs-20705 ] instance_eval allows defining methods on all objects [ ironruby-Bugs-20408 ] TRUE, FALSE & NIL not defined. [ ironruby-Bugs-21942 ] a const defined on a metaclass is not preserved when the object is cloned Tomas From Tomas.Matousek at microsoft.com Mon Oct 13 13:36:01 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Mon, 13 Oct 2008 10:36:01 -0700 Subject: [Ironruby-core] Code Review: Copy4 In-Reply-To: References: Message-ID: 2,3,4) fixed. 1) Yes, it's potential issue, however DLR doesn't clear rule cache either. I'll follow up. -----Original Message----- From: Curt Hagenlocher Sent: Sunday, October 12, 2008 8:29 PM To: Tomas Matousek; IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: RE: Code Review: Copy4 Sorry about the premature send. I blame the keyboard. ;) Changes are good. Four comments: 1. The KernelOps._sites dictionary never has the opportunity to have something removed from it; this worries me a little. 2. There's at least one "#region IRubyCloneableMembers" in RubyObject.cs which should be renamed. (There may be others.) 3. Some of the comments in RubyModule.Subclass.cs weren't edited after they were copied from MutableString.Subclass.cs. 4. There was a trivial change to DLR outer ring that should probably have been copied to dlrcr. -----Original Message----- From: Tomas Matousek Sent: Friday, October 10, 2008 6:43 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: Copy4 tfpt review "/shelveset:Copy4;REDMOND\tomat" Implements initialize_copy for built-in classes. Removes assertion in Proc, it was wrong. Improves and fixes Kernel#send. Implements default protocol for to_ary conversion. Fixes super call with a block but no other arguments. Fixes bugs: [#20849] instance_eval within class_eval causes incorrect method lookup. [ ironruby-Bugs-20317 ] Kernel#instance_eval. [ ironruby-Bugs-20705 ] instance_eval allows defining methods on all objects [ ironruby-Bugs-20408 ] TRUE, FALSE & NIL not defined. [ ironruby-Bugs-21942 ] a const defined on a metaclass is not preserved when the object is cloned Tomas From Tomas.Matousek at microsoft.com Tue Oct 14 13:52:17 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 14 Oct 2008 10:52:17 -0700 Subject: [Ironruby-core] Code Review: Misc1 Message-ID: tfpt review "/shelveset:Misc1;REDMOND\tomat" Replaces calls to Expression.Comma/Block with calls to AstFactory.Comma/Block that avoids copying and creating arrays of expressions. Fixes super call with no arguments. Implements SuperCallAction serialization. Makes -save option accept a path where to store the precompiled assembly. Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: Misc1.diff Type: application/octet-stream Size: 36636 bytes Desc: Misc1.diff URL: From curth at microsoft.com Tue Oct 14 14:06:03 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Tue, 14 Oct 2008 11:06:03 -0700 Subject: [Ironruby-core] Code Review: Misc1 In-Reply-To: References: Message-ID: Changes are good. -----Original Message----- From: Tomas Matousek Sent: Tuesday, October 14, 2008 10:52 AM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: Misc1 tfpt review "/shelveset:Misc1;REDMOND\tomat" Replaces calls to Expression.Comma/Block with calls to AstFactory.Comma/Block that avoids copying and creating arrays of expressions. Fixes super call with no arguments. Implements SuperCallAction serialization. Makes -save option accept a path where to store the precompiled assembly. Tomas From jdeville at microsoft.com Tue Oct 14 17:48:50 2008 From: jdeville at microsoft.com (Jim Deville) Date: Tue, 14 Oct 2008 14:48:50 -0700 Subject: [Ironruby-core] Code Review: math Message-ID: tfpt review "/shelveset:math;REDMOND\jdeville" Comment : Implements most of the missing math methods. Modifies specs around those. Math.erf and Math.erfc are still unimplemented, and all Math methods still don't handle nil or coersion correctly. ~~~~ JD http://blog.jredville.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdeville at microsoft.com Tue Oct 14 17:49:44 2008 From: jdeville at microsoft.com (Jim Deville) Date: Tue, 14 Oct 2008 14:49:44 -0700 Subject: [Ironruby-core] Code Review: math Message-ID: Doh, forgot the diff. JD From: Jim Deville Sent: Tuesday, October 14, 2008 2:49 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: math tfpt review "/shelveset:math;REDMOND\jdeville" Comment : Implements most of the missing math methods. Modifies specs around those. Math.erf and Math.erfc are still unimplemented, and all Math methods still don't handle nil or coersion correctly. ~~~~ JD http://blog.jredville.com -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: math.diff Type: application/octet-stream Size: 35318 bytes Desc: math.diff URL: From curth at microsoft.com Tue Oct 14 17:57:44 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Tue, 14 Oct 2008 14:57:44 -0700 Subject: [Ironruby-core] Code Review: math In-Reply-To: References: Message-ID: Looks good overall. You should probably resort the frexp, hypot and ldexp methods back into alphabetical order. From: Jim Deville Sent: Tuesday, October 14, 2008 2:50 PM To: Jim Deville; IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: RE: Code Review: math Doh, forgot the diff. JD From: Jim Deville Sent: Tuesday, October 14, 2008 2:49 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: math tfpt review "/shelveset:math;REDMOND\jdeville" Comment : Implements most of the missing math methods. Modifies specs around those. Math.erf and Math.erfc are still unimplemented, and all Math methods still don't handle nil or coersion correctly. ~~~~ JD http://blog.jredville.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From curth at microsoft.com Tue Oct 14 18:58:15 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Tue, 14 Oct 2008 15:58:15 -0700 Subject: [Ironruby-core] Code Review: RubyFloatConversion1 Message-ID: tfpt review "/shelveset:RubyFloatConversion1;REDMOND\curth" Comment : Support for Float protocol conversion Implement some missing error types Want to do this now so Jim can use the conversions for his math checkin -- Curt Hagenlocher curth at microsoft.com -------------- next part -------------- A non-text attachment was scrubbed... Name: RubyFloatConversion1.diff Type: application/octet-stream Size: 9715 bytes Desc: RubyFloatConversion1.diff URL: From jdeville at microsoft.com Tue Oct 14 19:49:52 2008 From: jdeville at microsoft.com (Jim Deville) Date: Tue, 14 Oct 2008 16:49:52 -0700 Subject: [Ironruby-core] Code Review: mailrb Message-ID: tfpt review "/shelveset:mailrb;REDMOND\jdeville" Comment : Modifies mail.rb to dump the email contents and location of the diff file if Outlook fails to respond ~~~~ JD http://blog.jredville.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben2004uk at googlemail.com Tue Oct 14 19:51:13 2008 From: ben2004uk at googlemail.com (Ben Hall) Date: Wed, 15 Oct 2008 00:51:13 +0100 Subject: [Ironruby-core] Code Review: mailrb In-Reply-To: References: Message-ID: Hi Jim, The diff is empty.... Ben On Wed, Oct 15, 2008 at 12:49 AM, Jim Deville wrote: > tfpt review "/shelveset:mailrb;REDMOND\jdeville" > > Comment : > > Modifies mail.rb to dump the email contents and location of the diff file if > Outlook fails to respond > > > > ~~~~ > > JD > > http://blog.jredville.com > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > From jdeville at microsoft.com Tue Oct 14 20:00:16 2008 From: jdeville at microsoft.com (Jim Deville) Date: Tue, 14 Oct 2008 17:00:16 -0700 Subject: [Ironruby-core] Code Review: mailrb In-Reply-To: References: Message-ID: Here's the right diff. JD > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Ben Hall > Sent: Tuesday, October 14, 2008 4:51 PM > To: ironruby-core at rubyforge.org > Cc: IronRuby External Code Reviewers > Subject: Re: [Ironruby-core] Code Review: mailrb > > Hi Jim, > > The diff is empty.... > > Ben > > On Wed, Oct 15, 2008 at 12:49 AM, Jim Deville > wrote: > > tfpt review "/shelveset:mailrb;REDMOND\jdeville" > > > > Comment : > > > > Modifies mail.rb to dump the email contents and location of the diff > file if > > Outlook fails to respond > > > > > > > > ~~~~ > > > > JD > > > > http://blog.jredville.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 -------------- A non-text attachment was scrubbed... Name: mail.diff Type: application/octet-stream Size: 3198 bytes Desc: mail.diff URL: From jdeville at microsoft.com Tue Oct 14 20:15:37 2008 From: jdeville at microsoft.com (Jim Deville) Date: Tue, 14 Oct 2008 17:15:37 -0700 Subject: [Ironruby-core] Code Review: RubyFloatConversion1 In-Reply-To: References: Message-ID: After looking into it more, this probably isn't the right path to follow. It doesn't follow the Numeric coercion protocol, among other things. I've notified Curt, but ya'll can ignore this. JD > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Curt Hagenlocher > Sent: Tuesday, October 14, 2008 3:58 PM > To: IronRuby External Code Reviewers > Cc: ironruby-core at rubyforge.org > Subject: [Ironruby-core] Code Review: RubyFloatConversion1 > > tfpt review "/shelveset:RubyFloatConversion1;REDMOND\curth" > > Comment : > Support for Float protocol conversion > Implement some missing error types > Want to do this now so Jim can use the conversions for his math > checkin > > -- > Curt Hagenlocher > curth at microsoft.com From Tomas.Matousek at microsoft.com Tue Oct 14 23:07:09 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 14 Oct 2008 20:07:09 -0700 Subject: [Ironruby-core] Code Review: RubyReflectionCache Message-ID: tfpt review "/shelveset:RubyReflectionCache;REDMOND\tomat" Implements profiling of Ruby methods: Given -profile on command line the compiler instruments each Ruby method by code that captures the current timestamp (in ticks) in method prologue and updates a global variable associated with the method in its epilogue. At the end, it dumps all values into "profile.log" file. Implements reflection cache: a static class Methods that contains properties for each method that is emitted into IL. The properties return MethodInfo for the method and cache it. The properties are generated for methods in RubyOps marked by [Emitted] attribute. The generator ("ClassInitGenerator") now refers to internal classes so it needs to be signed and a friend assembly of IronRuby.dll Adds alias "gencache" that generates ReflectionCache.Generated.cs file. Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: RubyReflectionCache.diff Type: application/octet-stream Size: 205365 bytes Desc: RubyReflectionCache.diff URL: From curth at microsoft.com Tue Oct 14 23:36:08 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Tue, 14 Oct 2008 20:36:08 -0700 Subject: [Ironruby-core] Code Review: RubyReflectionCache In-Reply-To: References: Message-ID: Nice! Looks good. -----Original Message----- From: Tomas Matousek Sent: Tuesday, October 14, 2008 8:07 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: RubyReflectionCache tfpt review "/shelveset:RubyReflectionCache;REDMOND\tomat" Implements profiling of Ruby methods: Given -profile on command line the compiler instruments each Ruby method by code that captures the current timestamp (in ticks) in method prologue and updates a global variable associated with the method in its epilogue. At the end, it dumps all values into "profile.log" file. Implements reflection cache: a static class Methods that contains properties for each method that is emitted into IL. The properties return MethodInfo for the method and cache it. The properties are generated for methods in RubyOps marked by [Emitted] attribute. The generator ("ClassInitGenerator") now refers to internal classes so it needs to be signed and a friend assembly of IronRuby.dll Adds alias "gencache" that generates ReflectionCache.Generated.cs file. Tomas From Tomas.Matousek at microsoft.com Wed Oct 15 02:08:40 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 14 Oct 2008 23:08:40 -0700 Subject: [Ironruby-core] irb In-Reply-To: References: Message-ID: We have recently implemented the last feature that prevented irb from running, so here it is: C:\M1\Merlin\External\Languages\Ruby\ruby-1.8.6\bin>rbr -X:Interpret irb irb(main):001:0> 1+1 => 2 irb(main):002:0> puts < nil irb(main):005:0> require 'mscorlib' => true irb(main):006:0> include System::Collections::Generic => Object irb(main):007:0> l = List[Fixnum].new => [] irb(main):008:0> l.add 1 => nil irb(main):009:0> l.add 2 => nil irb(main):010:0> l.add 3 => nil irb(main):011:0> l => [1, 2, 3] irb(main):012:0> l.each_with_index { |x,i| puts "#{i} -> #{x}" } 0 -> 1 1 -> 2 2 -> 3 => [1, 2, 3] irb(main):013:0> exit Tomas From Tomas.Matousek at microsoft.com Wed Oct 15 02:13:15 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 14 Oct 2008 23:13:15 -0700 Subject: [Ironruby-core] irb In-Reply-To: References: Message-ID: This should be more readable... -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek Sent: Tuesday, October 14, 2008 11:09 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] irb We have recently implemented the last feature that prevented irb from running, so here it is: C:\M1\Merlin\External\Languages\Ruby\ruby-1.8.6\bin>rbr -X:Interpret irb irb(main):001:0> 1+1 => 2 irb(main):002:0> puts < nil irb(main):005:0> require 'mscorlib' => true irb(main):006:0> include System::Collections::Generic => Object irb(main):007:0> l = List[Fixnum].new => [] irb(main):008:0> l.add 1 => nil irb(main):009:0> l.add 2 => nil irb(main):010:0> l.add 3 => nil irb(main):011:0> l => [1, 2, 3] irb(main):012:0> l.each_with_index { |x,i| puts "#{i} -> #{x}" } 0 -> 1 1 -> 2 2 -> 3 => [1, 2, 3] irb(main):013:0> exit Tomas _______________________________________________ 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 ben2004uk at googlemail.com Wed Oct 15 04:33:19 2008 From: ben2004uk at googlemail.com (Ben Hall) Date: Wed, 15 Oct 2008 09:33:19 +0100 Subject: [Ironruby-core] irb In-Reply-To: References: Message-ID: I migth have missed something along the way - what is rbr? Ben On Wed, Oct 15, 2008 at 7:13 AM, Tomas Matousek wrote: > This should be more readable... > > > > -----Original Message----- > > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek > > Sent: Tuesday, October 14, 2008 11:09 PM > > To: ironruby-core at rubyforge.org > > Subject: [Ironruby-core] irb > > > > We have recently implemented the last feature that prevented irb from > running, so here it is: > > > > > > C:\M1\Merlin\External\Languages\Ruby\ruby-1.8.6\bin>rbr -X:Interpret irb > > irb(main):001:0> 1+1 > > => 2 > > irb(main):002:0> puts < > irb(main):003:0" hello world > > irb(main):004:0" end > > hello world > > => nil > > irb(main):005:0> require 'mscorlib' > > => true > > irb(main):006:0> include System::Collections::Generic > > => Object > > irb(main):007:0> l = List[Fixnum].new > > => [] > > irb(main):008:0> l.add 1 > > => nil > > irb(main):009:0> l.add 2 > > => nil > > irb(main):010:0> l.add 3 > > => nil > > irb(main):011:0> l > > => [1, 2, 3] > > irb(main):012:0> l.each_with_index { |x,i| puts "#{i} -> #{x}" } > > 0 -> 1 > > 1 -> 2 > > 2 -> 3 > > => [1, 2, 3] > > irb(main):013:0> exit > > > > Tomas > > _______________________________________________ > > 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 curth at microsoft.com Wed Oct 15 08:42:00 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Wed, 15 Oct 2008 05:42:00 -0700 Subject: [Ironruby-core] irb In-Reply-To: References: Message-ID: In our standard set of aliases, it resolves to the release build of IronRuby. rbd resolves to the debug build. -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ben Hall Sent: Wednesday, October 15, 2008 1:33 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] irb I migth have missed something along the way - what is rbr? Ben On Wed, Oct 15, 2008 at 7:13 AM, Tomas Matousek wrote: > This should be more readable... > > > > -----Original Message----- > > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek > > Sent: Tuesday, October 14, 2008 11:09 PM > > To: ironruby-core at rubyforge.org > > Subject: [Ironruby-core] irb > > > > We have recently implemented the last feature that prevented irb from > running, so here it is: > > > > > > C:\M1\Merlin\External\Languages\Ruby\ruby-1.8.6\bin>rbr -X:Interpret irb > > irb(main):001:0> 1+1 > > => 2 > > irb(main):002:0> puts < > irb(main):003:0" hello world > > irb(main):004:0" end > > hello world > > => nil > > irb(main):005:0> require 'mscorlib' > > => true > > irb(main):006:0> include System::Collections::Generic > > => Object > > irb(main):007:0> l = List[Fixnum].new > > => [] > > irb(main):008:0> l.add 1 > > => nil > > irb(main):009:0> l.add 2 > > => nil > > irb(main):010:0> l.add 3 > > => nil > > irb(main):011:0> l > > => [1, 2, 3] > > irb(main):012:0> l.each_with_index { |x,i| puts "#{i} -> #{x}" } > > 0 -> 1 > > 1 -> 2 > > 2 -> 3 > > => [1, 2, 3] > > irb(main):013:0> exit > > > > Tomas > > _______________________________________________ > > 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 Fri Oct 17 04:29:39 2008 From: lists at ruby-forum.com (Pat Gannon) Date: Fri, 17 Oct 2008 10:29:39 +0200 Subject: [Ironruby-core] Cucumber / RSpec Story Runner Message-ID: <9319fe7416065945f7de725dce3272fe@ruby-forum.com> Has anyone tried to get Cucumber (or it's predecessor: the RSpec story runner) to work with IronRuby? I have not had any luck thus far (I am extremely new to Ruby), and I would really like to be able to use Cucumber to write executable feature documentation for my .NET code. http://github.com/aslakhellesoy/cucumber/wikis I copied it under the "lib" directory, as well as several of its dependencies, but when I try to do "require 'cucumber-0.1.7/lib/cucumber'", ir (interactive ruby) fails with a stack overflow. The same thing happens when I try to require some its dependencies manually (eg. "require 'hoe-1.8.0/lib/hoe'" and "require 'rake-0.8.3/lib/rake'"), but some work just fine (eg. "require 'polyglot-0.2.3/lib/polyglot'" and "require 'treetop-1.2.4/lib/treetop'"). I also tried to get gem working to aide me in this process, but I had problems with that too. Has anyone got gem working with IronRuby? Thanks in advance! Pat Gannon -- Posted via http://www.ruby-forum.com/. From curth at microsoft.com Fri Oct 17 09:53:49 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Fri, 17 Oct 2008 06:53:49 -0700 Subject: [Ironruby-core] Cucumber / RSpec Story Runner In-Reply-To: <9319fe7416065945f7de725dce3272fe@ruby-forum.com> References: <9319fe7416065945f7de725dce3272fe@ruby-forum.com> Message-ID: If you explicitly set the GEM_PATH before requiring gems, you should be able to use gems that are already present. I haven't tried any other gem operations. I assume you're running with the latest source? -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Pat Gannon Sent: Friday, October 17, 2008 1:30 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Cucumber / RSpec Story Runner Has anyone tried to get Cucumber (or it's predecessor: the RSpec story runner) to work with IronRuby? I have not had any luck thus far (I am extremely new to Ruby), and I would really like to be able to use Cucumber to write executable feature documentation for my .NET code. http://github.com/aslakhellesoy/cucumber/wikis I copied it under the "lib" directory, as well as several of its dependencies, but when I try to do "require 'cucumber-0.1.7/lib/cucumber'", ir (interactive ruby) fails with a stack overflow. The same thing happens when I try to require some its dependencies manually (eg. "require 'hoe-1.8.0/lib/hoe'" and "require 'rake-0.8.3/lib/rake'"), but some work just fine (eg. "require 'polyglot-0.2.3/lib/polyglot'" and "require 'treetop-1.2.4/lib/treetop'"). I also tried to get gem working to aide me in this process, but I had problems with that too. Has anyone got gem working with IronRuby? Thanks in advance! Pat Gannon -- 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 Fri Oct 17 13:45:45 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Fri, 17 Oct 2008 10:45:45 -0700 Subject: [Ironruby-core] Code Review: IronRails2 Message-ID: tfpt review "/shelveset:IronRails2;REDMOND\tomat" Contains a simple change in DLR. Ruby changes: Improves IronRails - switches to IIS7 integrated mode, adds a log, implements static file handling. Updates Ruby HAPI. Fixes writing to text streams (\n should be replaced by \r\n). Ruby console host exposes the current Ruby engine via "iron_ruby" variable int the console scope. Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: IronRails2.diff Type: application/octet-stream Size: 15262 bytes Desc: IronRails2.diff URL: From curth at microsoft.com Fri Oct 17 13:58:19 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Fri, 17 Oct 2008 10:58:19 -0700 Subject: [Ironruby-core] Code Review: IronRails2 In-Reply-To: References: Message-ID: Ruby and IronRails changes are good. The call to Handler.HandleFile could go outside of the Rails lock as there's no Ruby code invoked. -----Original Message----- From: Tomas Matousek Sent: Friday, October 17, 2008 10:46 AM To: IronRuby External Code Reviewers; DLR Code Reviews Cc: ironruby-core at rubyforge.org Subject: Code Review: IronRails2 tfpt review "/shelveset:IronRails2;REDMOND\tomat" Contains a simple change in DLR. Ruby changes: Improves IronRails - switches to IIS7 integrated mode, adds a log, implements static file handling. Updates Ruby HAPI. Fixes writing to text streams (\n should be replaced by \r\n). Ruby console host exposes the current Ruby engine via "iron_ruby" variable int the console scope. Tomas From enicholson at gmail.com Fri Oct 17 14:47:51 2008 From: enicholson at gmail.com (Eric Nicholson) Date: Fri, 17 Oct 2008 14:47:51 -0400 Subject: [Ironruby-core] Code Review: IronRails2 In-Reply-To: References: Message-ID: Now wait just a minute.... :) You can't casually mention "IronRails changes look good" on the list without any indication of what IronRails is. That sounds far too exciting to pass up. Can someone explain what this might be to us non MSofties? -Eric On Fri, Oct 17, 2008 at 1:58 PM, Curt Hagenlocher wrote: > Ruby and IronRails changes are good. > The call to Handler.HandleFile could go outside of the Rails lock as > there's no Ruby code invoked. > > -----Original Message----- > From: Tomas Matousek > Sent: Friday, October 17, 2008 10:46 AM > To: IronRuby External Code Reviewers; DLR Code Reviews > Cc: ironruby-core at rubyforge.org > Subject: Code Review: IronRails2 > > tfpt review "/shelveset:IronRails2;REDMOND\tomat" > > Contains a simple change in DLR. > > Ruby changes: > Improves IronRails - switches to IIS7 integrated mode, adds a log, > implements static file handling. > Updates Ruby HAPI. > Fixes writing to text streams (\n should be replaced by \r\n). > Ruby console host exposes the current Ruby engine via "iron_ruby" variable > int the console scope. > > Tomas > > > _______________________________________________ > 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 Tomas.Matousek at microsoft.com Fri Oct 17 15:52:23 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Fri, 17 Oct 2008 12:52:23 -0700 Subject: [Ironruby-core] Code Review: IronRails2 In-Reply-To: References: Message-ID: It's a top secret experimental ASP.NET HttpHandler that dispatches to a Rails application :) Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Eric Nicholson Sent: Friday, October 17, 2008 11:48 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review: IronRails2 Now wait just a minute.... :) You can't casually mention "IronRails changes look good" on the list without any indication of what IronRails is. That sounds far too exciting to pass up. Can someone explain what this might be to us non MSofties? -Eric On Fri, Oct 17, 2008 at 1:58 PM, Curt Hagenlocher > wrote: Ruby and IronRails changes are good. The call to Handler.HandleFile could go outside of the Rails lock as there's no Ruby code invoked. -----Original Message----- From: Tomas Matousek Sent: Friday, October 17, 2008 10:46 AM To: IronRuby External Code Reviewers; DLR Code Reviews Cc: ironruby-core at rubyforge.org Subject: Code Review: IronRails2 tfpt review "/shelveset:IronRails2;REDMOND\tomat" Contains a simple change in DLR. Ruby changes: Improves IronRails - switches to IIS7 integrated mode, adds a log, implements static file handling. Updates Ruby HAPI. Fixes writing to text streams (\n should be replaced by \r\n). Ruby console host exposes the current Ruby engine via "iron_ruby" variable int the console scope. Tomas _______________________________________________ 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 curth at microsoft.com Fri Oct 17 15:52:51 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Fri, 17 Oct 2008 12:52:51 -0700 Subject: [Ironruby-core] Code Review: IronRails2 In-Reply-To: References: Message-ID: It's an IIS handler to calls Rails directly without going through Webrick or some other Ruby-based http server. It's mostly experimental at this point. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Eric Nicholson Sent: Friday, October 17, 2008 11:48 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review: IronRails2 Now wait just a minute.... :) You can't casually mention "IronRails changes look good" on the list without any indication of what IronRails is. That sounds far too exciting to pass up. Can someone explain what this might be to us non MSofties? -Eric On Fri, Oct 17, 2008 at 1:58 PM, Curt Hagenlocher > wrote: Ruby and IronRails changes are good. The call to Handler.HandleFile could go outside of the Rails lock as there's no Ruby code invoked. -----Original Message----- From: Tomas Matousek Sent: Friday, October 17, 2008 10:46 AM To: IronRuby External Code Reviewers; DLR Code Reviews Cc: ironruby-core at rubyforge.org Subject: Code Review: IronRails2 tfpt review "/shelveset:IronRails2;REDMOND\tomat" Contains a simple change in DLR. Ruby changes: Improves IronRails - switches to IIS7 integrated mode, adds a log, implements static file handling. Updates Ruby HAPI. Fixes writing to text streams (\n should be replaced by \r\n). Ruby console host exposes the current Ruby engine via "iron_ruby" variable int the console scope. Tomas _______________________________________________ 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 curth at microsoft.com Fri Oct 17 15:53:45 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Fri, 17 Oct 2008 12:53:45 -0700 Subject: [Ironruby-core] Code Review: IronRails2 In-Reply-To: References: Message-ID: Can you tell that we all just got back from lunch? :) From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek Sent: Friday, October 17, 2008 12:52 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review: IronRails2 It's a top secret experimental ASP.NET HttpHandler that dispatches to a Rails application :) Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Eric Nicholson Sent: Friday, October 17, 2008 11:48 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review: IronRails2 Now wait just a minute.... :) You can't casually mention "IronRails changes look good" on the list without any indication of what IronRails is. That sounds far too exciting to pass up. Can someone explain what this might be to us non MSofties? -Eric On Fri, Oct 17, 2008 at 1:58 PM, Curt Hagenlocher > wrote: Ruby and IronRails changes are good. The call to Handler.HandleFile could go outside of the Rails lock as there's no Ruby code invoked. -----Original Message----- From: Tomas Matousek Sent: Friday, October 17, 2008 10:46 AM To: IronRuby External Code Reviewers; DLR Code Reviews Cc: ironruby-core at rubyforge.org Subject: Code Review: IronRails2 tfpt review "/shelveset:IronRails2;REDMOND\tomat" Contains a simple change in DLR. Ruby changes: Improves IronRails - switches to IIS7 integrated mode, adds a log, implements static file handling. Updates Ruby HAPI. Fixes writing to text streams (\n should be replaced by \r\n). Ruby console host exposes the current Ruby engine via "iron_ruby" variable int the console scope. Tomas _______________________________________________ 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 blowmage at gmail.com Fri Oct 17 16:04:16 2008 From: blowmage at gmail.com (Mike Moore) Date: Fri, 17 Oct 2008 14:04:16 -0600 Subject: [Ironruby-core] Code Review: IronRails2 In-Reply-To: References: Message-ID: And Scott Guthrie said Microsoft had no interest in enabling Rails to run in IronRuby... :) On Fri, Oct 17, 2008 at 1:52 PM, Tomas Matousek < Tomas.Matousek at microsoft.com> wrote: > It's a top secret experimental ASP.NET HttpHandler that dispatches to a > Rails application J > > > > Tomas > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Eric Nicholson > *Sent:* Friday, October 17, 2008 11:48 AM > *To:* ironruby-core at rubyforge.org > *Subject:* Re: [Ironruby-core] Code Review: IronRails2 > > > > Now wait just a minute.... > > :) > > You can't casually mention "IronRails changes look good" on the list > without any indication of what IronRails is. That sounds far too exciting > to pass up. Can someone explain what this might be to us non MSofties? > > -Eric > > On Fri, Oct 17, 2008 at 1:58 PM, Curt Hagenlocher > wrote: > > Ruby and IronRails changes are good. > The call to Handler.HandleFile could go outside of the Rails lock as > there's no Ruby code invoked. > > > -----Original Message----- > From: Tomas Matousek > Sent: Friday, October 17, 2008 10:46 AM > To: IronRuby External Code Reviewers; DLR Code Reviews > Cc: ironruby-core at rubyforge.org > Subject: Code Review: IronRails2 > > tfpt review "/shelveset:IronRails2;REDMOND\tomat" > > Contains a simple change in DLR. > > Ruby changes: > Improves IronRails - switches to IIS7 integrated mode, adds a log, > implements static file handling. > Updates Ruby HAPI. > Fixes writing to text streams (\n should be replaced by \r\n). > Ruby console host exposes the current Ruby engine via "iron_ruby" variable > int the console scope. > > Tomas > > _______________________________________________ > 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 curth at microsoft.com Fri Oct 17 16:09:24 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Fri, 17 Oct 2008 13:09:24 -0700 Subject: [Ironruby-core] Code Review: IronRails2 In-Reply-To: References: Message-ID: There's quite a difference between a development environment like ASP.NET that's fully supported by Microsoft and one that we make available on an as-is basis for the community to play with - and maybe take ownership of. Our goal has always been to create a fully conformant Ruby implementation, and by definition, that's going to be able to run Rails. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Mike Moore Sent: Friday, October 17, 2008 1:04 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review: IronRails2 And Scott Guthrie said Microsoft had no interest in enabling Rails to run in IronRuby... :) On Fri, Oct 17, 2008 at 1:52 PM, Tomas Matousek > wrote: It's a top secret experimental ASP.NET HttpHandler that dispatches to a Rails application :) Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Eric Nicholson Sent: Friday, October 17, 2008 11:48 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review: IronRails2 Now wait just a minute.... :) You can't casually mention "IronRails changes look good" on the list without any indication of what IronRails is. That sounds far too exciting to pass up. Can someone explain what this might be to us non MSofties? -Eric On Fri, Oct 17, 2008 at 1:58 PM, Curt Hagenlocher > wrote: Ruby and IronRails changes are good. The call to Handler.HandleFile could go outside of the Rails lock as there's no Ruby code invoked. -----Original Message----- From: Tomas Matousek Sent: Friday, October 17, 2008 10:46 AM To: IronRuby External Code Reviewers; DLR Code Reviews Cc: ironruby-core at rubyforge.org Subject: Code Review: IronRails2 tfpt review "/shelveset:IronRails2;REDMOND\tomat" Contains a simple change in DLR. Ruby changes: Improves IronRails - switches to IIS7 integrated mode, adds a log, implements static file handling. Updates Ruby HAPI. Fixes writing to text streams (\n should be replaced by \r\n). Ruby console host exposes the current Ruby engine via "iron_ruby" variable int the console scope. Tomas _______________________________________________ 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 blowmage at gmail.com Fri Oct 17 17:06:28 2008 From: blowmage at gmail.com (Mike Moore) Date: Fri, 17 Oct 2008 15:06:28 -0600 Subject: [Ironruby-core] Code Review: IronRails2 In-Reply-To: References: Message-ID: On Fri, Oct 17, 2008 at 2:09 PM, Curt Hagenlocher wrote: > There's quite a difference between a development environment like ASP.NETthat's fully supported by Microsoft and one that we make available on an > as-is basis for the community to play with ? and maybe take ownership of. > Our goal has always been to create a fully conformant Ruby implementation, > and by definition, that's going to be able to run Rails. > Sure, but the word before was that any ability to run Rails with IronRuby was not going to come from Microsoft and would have to be provided by the community. This looks to be coming directly from Microsoft. You could have left it alone and made us proxy from IIS to webrick/mongrel or use FastCGI, but this is evidence of the IronRuby team going above and beyond. You are to be commended. I would like to hear more chatter about this though. What are the results of your experiments with IronRails so far? -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tomas.Matousek at microsoft.com Fri Oct 17 17:53:57 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Fri, 17 Oct 2008 14:53:57 -0700 Subject: [Ironruby-core] Code Review: IronRails2 In-Reply-To: References: Message-ID: The result so far is that it is able to dispatch a request to Rails and send output to client. The shelveset I've just submitted implements static file handling (so that static file requests are not dispatched to Rails). Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Mike Moore Sent: Friday, October 17, 2008 2:06 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review: IronRails2 On Fri, Oct 17, 2008 at 2:09 PM, Curt Hagenlocher > wrote: There's quite a difference between a development environment like ASP.NET that's fully supported by Microsoft and one that we make available on an as-is basis for the community to play with - and maybe take ownership of. Our goal has always been to create a fully conformant Ruby implementation, and by definition, that's going to be able to run Rails. Sure, but the word before was that any ability to run Rails with IronRuby was not going to come from Microsoft and would have to be provided by the community. This looks to be coming directly from Microsoft. You could have left it alone and made us proxy from IIS to webrick/mongrel or use FastCGI, but this is evidence of the IronRuby team going above and beyond. You are to be commended. I would like to hear more chatter about this though. What are the results of your experiments with IronRails so far? -------------- next part -------------- An HTML attachment was scrubbed... URL: From curth at microsoft.com Fri Oct 17 18:58:37 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Fri, 17 Oct 2008 15:58:37 -0700 Subject: [Ironruby-core] Code Review: RubyProfile1 Message-ID: tfpt review "/shelveset:RubyProfile1;REDMOND\curth" Comment : Changes for improved profiling support Created Ruby-accessible wrapper in new "Clr" module Created standard function for normalizing a CLR long and refactored TimeOps to use it Fixed small bug in profiler Eliminate two warnings in StringIO.cs Add exception classes ENOTCONN and ECONNRESET -- Curt Hagenlocher curth at microsoft.com -------------- next part -------------- A non-text attachment was scrubbed... Name: RubyProfile1.diff Type: application/octet-stream Size: 71104 bytes Desc: RubyProfile1.diff URL: From Tomas.Matousek at microsoft.com Fri Oct 17 20:00:32 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Fri, 17 Oct 2008 17:00:32 -0700 Subject: [Ironruby-core] Code Review: Blocks Message-ID: tfpt review "/shelveset:Blocks;REDMOND\tomat" Ruby: Avoids creating lists of expressions and block expressions, optimizes block creation in AstFactory (which improves Rails startup time by about 5s). DLR: Optimizes interpretation of block expressions. Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: Blocks.diff Type: application/octet-stream Size: 19459 bytes Desc: Blocks.diff URL: From curth at microsoft.com Fri Oct 17 20:09:29 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Fri, 17 Oct 2008 17:09:29 -0700 Subject: [Ironruby-core] Code Review: Blocks In-Reply-To: References: Message-ID: Ruby changes look good. A few tab characters snuck into InterpretBlock in Interpreter.cs -----Original Message----- From: Tomas Matousek Sent: Friday, October 17, 2008 5:01 PM To: IronRuby External Code Reviewers; DLR Code Reviews Cc: ironruby-core at rubyforge.org Subject: Code Review: Blocks tfpt review "/shelveset:Blocks;REDMOND\tomat" Ruby: Avoids creating lists of expressions and block expressions, optimizes block creation in AstFactory (which improves Rails startup time by about 5s). DLR: Optimizes interpretation of block expressions. Tomas From lists at ruby-forum.com Sat Oct 18 00:57:13 2008 From: lists at ruby-forum.com (Aaron Clauson) Date: Sat, 18 Oct 2008 06:57:13 +0200 Subject: [Ironruby-core] Microsoft.Scripting.ExtensionAttribute Message-ID: <14d1d0041837b3a42f314519e1df05a9@ruby-forum.com> Hi All, I'm attempting to build from Trunk but am having a problem with assembly references. The main projects are referencing a Microsoft.Scripting.ExtensionAttribute assembly that doesn't seem to be in svn. The object that seems to be heavily used from that assembly is System.Runtime.CompilerServices.ExtensionAttribute can also be found in System.Core but adding a reference to that for the Microsoft.Scripting project generates 900 errors. Is there a trick to building from Trunk now or is the missing Microsoft.Scripting.ExtensionAttribute assembly required? Regards, Aaron -- Posted via http://www.ruby-forum.com/. From enicholson at gmail.com Sat Oct 18 08:44:58 2008 From: enicholson at gmail.com (Eric Nicholson) Date: Sat, 18 Oct 2008 08:44:58 -0400 Subject: [Ironruby-core] Code Review: IronRails2 In-Reply-To: References: Message-ID: That's great! Thanks for the update! -Eric On Fri, Oct 17, 2008 at 5:53 PM, Tomas Matousek < Tomas.Matousek at microsoft.com> wrote: > The result so far is that it is able to dispatch a request to Rails and > send output to client. The shelveset I've just submitted implements static > file handling (so that static file requests are not dispatched to Rails). > > > > Tomas > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Mike Moore > *Sent:* Friday, October 17, 2008 2:06 PM > *To:* ironruby-core at rubyforge.org > *Subject:* Re: [Ironruby-core] Code Review: IronRails2 > > > > On Fri, Oct 17, 2008 at 2:09 PM, Curt Hagenlocher > wrote: > > There's quite a difference between a development environment like ASP.NETthat's fully supported by Microsoft and one that we make available on an > as-is basis for the community to play with ? and maybe take ownership of. > Our goal has always been to create a fully conformant Ruby implementation, > and by definition, that's going to be able to run Rails. > > Sure, but the word before was that any ability to run Rails with IronRuby > was not going to come from Microsoft and would have to be provided by the > community. This looks to be coming directly from Microsoft. You could have > left it alone and made us proxy from IIS to webrick/mongrel or use FastCGI, > but this is evidence of the IronRuby team going above and beyond. You are to > be commended. > > > > I would like to hear more chatter about this though. What are the results > of your experiments with IronRails so far? > > _______________________________________________ > 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 curth at microsoft.com Sat Oct 18 10:14:31 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Sat, 18 Oct 2008 07:14:31 -0700 Subject: [Ironruby-core] Microsoft.Scripting.ExtensionAttribute In-Reply-To: <14d1d0041837b3a42f314519e1df05a9@ruby-forum.com> References: <14d1d0041837b3a42f314519e1df05a9@ruby-forum.com> Message-ID: We've had to do a lot of tap-dancing to deal with the overlap between Microsoft.Scripting.Core and System.Core. Some of this ended up being very "last minute" as part of releasing IronPython 2.0 -- and these changes haven't necessarily made it into the IronRuby export script. We're trying to juggle that with PDC preparation right now, so I don't know how quickly the script will be updated. The added assembly really contains nothing but the following code: namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Method | AttributeTargets.Class | AttributeTargets.Assembly)] public sealed class ExtensionAttribute : Attribute { } } -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Aaron Clauson Sent: Friday, October 17, 2008 9:57 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Microsoft.Scripting.ExtensionAttribute Hi All, I'm attempting to build from Trunk but am having a problem with assembly references. The main projects are referencing a Microsoft.Scripting.ExtensionAttribute assembly that doesn't seem to be in svn. The object that seems to be heavily used from that assembly is System.Runtime.CompilerServices.ExtensionAttribute can also be found in System.Core but adding a reference to that for the Microsoft.Scripting project generates 900 errors. Is there a trick to building from Trunk now or is the missing Microsoft.Scripting.ExtensionAttribute assembly required? Regards, Aaron -- 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 Sat Oct 18 11:08:24 2008 From: lists at ruby-forum.com (Aaron Clauson) Date: Sat, 18 Oct 2008 17:08:24 +0200 Subject: [Ironruby-core] Microsoft.Scripting.ExtensionAttribute In-Reply-To: References: <14d1d0041837b3a42f314519e1df05a9@ruby-forum.com> Message-ID: <9c3b24be58a7f09dcb08ae8f7d74fcb3@ruby-forum.com> Thanks Curt. I'll add that code in and see how I go. Regards, Aaron -- Posted via http://www.ruby-forum.com/. From ben2004uk at googlemail.com Mon Oct 20 05:24:32 2008 From: ben2004uk at googlemail.com (Ben Hall) Date: Mon, 20 Oct 2008 10:24:32 +0100 Subject: [Ironruby-core] Cucumber / RSpec Story Runner In-Reply-To: References: <9319fe7416065945f7de725dce3272fe@ruby-forum.com> Message-ID: Hi, To get rspec to work you will need to modify the actual Ironruby source. I've raised bugs to get the changes required fixed, however I did this based on 1.1.4, I think Cucumber will have a whole load more bugs attached as it has more dependencies. I know for a fact you won't be able to run Cucumber unmodified due to existing bugs around gems. (for example, gem needing .rb at the end of the file to be able to find it) However, I haven't had chance to take a closer look. Ben On Fri, Oct 17, 2008 at 2:53 PM, Curt Hagenlocher wrote: > If you explicitly set the GEM_PATH before requiring gems, you should be able to use gems that are already present. I haven't tried any other gem operations. > > I assume you're running with the latest source? > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Pat Gannon > Sent: Friday, October 17, 2008 1:30 AM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] Cucumber / RSpec Story Runner > > Has anyone tried to get Cucumber (or it's predecessor: the RSpec story > runner) to work with IronRuby? I have not had any luck thus far (I am > extremely new to Ruby), and I would really like to be able to use > Cucumber to write executable feature documentation for my .NET code. > > http://github.com/aslakhellesoy/cucumber/wikis > > I copied it under the "lib" directory, as well as several of its > dependencies, but when I try to do "require > 'cucumber-0.1.7/lib/cucumber'", ir (interactive ruby) fails with a stack > overflow. The same thing happens when I try to require some its > dependencies manually (eg. "require 'hoe-1.8.0/lib/hoe'" and "require > 'rake-0.8.3/lib/rake'"), but some work just fine (eg. "require > 'polyglot-0.2.3/lib/polyglot'" and "require > 'treetop-1.2.4/lib/treetop'"). > > I also tried to get gem working to aide me in this process, but I had > problems with that too. Has anyone got gem working with IronRuby? > > Thanks in advance! > Pat Gannon > -- > 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 Tomas.Matousek at microsoft.com Mon Oct 20 12:30:22 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Mon, 20 Oct 2008 09:30:22 -0700 Subject: [Ironruby-core] Code Review: RubyProfile1 In-Reply-To: References: Message-ID: Looks good. Tomas -----Original Message----- From: Curt Hagenlocher Sent: Friday, October 17, 2008 3:59 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: RubyProfile1 tfpt review "/shelveset:RubyProfile1;REDMOND\curth" Comment : Changes for improved profiling support Created Ruby-accessible wrapper in new "Clr" module Created standard function for normalizing a CLR long and refactored TimeOps to use it Fixed small bug in profiler Eliminate two warnings in StringIO.cs Add exception classes ENOTCONN and ECONNRESET -- Curt Hagenlocher curth at microsoft.com From Tomas.Matousek at microsoft.com Mon Oct 20 23:03:24 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Mon, 20 Oct 2008 20:03:24 -0700 Subject: [Ironruby-core] Code Review: ParseTree5 Message-ID: tfpt review "/shelveset:ParseTree5;REDMOND\tomat" Comment : Bunch of tweaks to AST: - removes some nodes that are notneeded any more, - moves block argument out of Arguments to CallExpression, Fixes several bugs: - order of evaluation in "(x,y) while z", - passing parameters to a super method when a block is specified "super {}", - yield should report an error when a block argument is given "yield &p" Implements ParseTree library - there are few nodes that are to be finished, - in some cases the generated parse tree deosn't exactly match MRI (some of which I consider bugs in MRI), - adds ir_parse_tree.rb that implements the same API as parse_tree.rb calling to IronRuby for tree transformation, - only string parsing is supported now, getting AST from method/class at runtime is not yet implemented. Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: ParseTree5.diff Type: application/octet-stream Size: 465969 bytes Desc: ParseTree5.diff URL: From curth at microsoft.com Mon Oct 20 23:45:18 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Mon, 20 Oct 2008 20:45:18 -0700 Subject: [Ironruby-core] Code Review: ParseTree5 In-Reply-To: References: Message-ID: In ir_parse_tree.rb, there's code near the bottom that's 'if RUBY_VERSION > "1.9"'. Is that version check a typo or does it actually reflect differences between 1.9 and 1.9.1? Otherwise, changes look good. And exciting! -----Original Message----- From: Tomas Matousek Sent: Monday, October 20, 2008 8:03 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: ParseTree5 tfpt review "/shelveset:ParseTree5;REDMOND\tomat" Comment : Bunch of tweaks to AST: - removes some nodes that are notneeded any more, - moves block argument out of Arguments to CallExpression, Fixes several bugs: - order of evaluation in "(x,y) while z", - passing parameters to a super method when a block is specified "super {}", - yield should report an error when a block argument is given "yield &p" Implements ParseTree library - there are few nodes that are to be finished, - in some cases the generated parse tree deosn't exactly match MRI (some of which I consider bugs in MRI), - adds ir_parse_tree.rb that implements the same API as parse_tree.rb calling to IronRuby for tree transformation, - only string parsing is supported now, getting AST from method/class at runtime is not yet implemented. Tomas From curth at microsoft.com Tue Oct 21 10:27:55 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Tue, 21 Oct 2008 07:27:55 -0700 Subject: [Ironruby-core] Code Review: RandomRubyFixes04 Message-ID: tfpt review "/shelveset:RandomRubyFixes04;REDMOND\curth" Comment : Eliminated static field BasicSocket.DoNotReverseLookup in favor of a property on the context. Fixed two variants of String.slice! to work the same (inconsistent :) way as MRI Stub implementation of Process.uid Added exception class ECONNABORTED Naive support for non-Fixnum result of "hash" Implemented IoOps.sysread -- Curt Hagenlocher curth at microsoft.com -------------- next part -------------- A non-text attachment was scrubbed... Name: RandomRubyFixes04.diff Type: application/octet-stream Size: 65354 bytes Desc: RandomRubyFixes04.diff URL: From Tomas.Matousek at microsoft.com Tue Oct 21 12:20:45 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 21 Oct 2008 09:20:45 -0700 Subject: [Ironruby-core] Code Review: RandomRubyFixes04 In-Reply-To: References: Message-ID: Looks good. -----Original Message----- From: Curt Hagenlocher Sent: Tuesday, October 21, 2008 7:28 AM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: RandomRubyFixes04 tfpt review "/shelveset:RandomRubyFixes04;REDMOND\curth" Comment : Eliminated static field BasicSocket.DoNotReverseLookup in favor of a property on the context. Fixed two variants of String.slice! to work the same (inconsistent :) way as MRI Stub implementation of Process.uid Added exception class ECONNABORTED Naive support for non-Fixnum result of "hash" Implemented IoOps.sysread -- Curt Hagenlocher curth at microsoft.com From jflam at microsoft.com Tue Oct 21 19:14:23 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Tue, 21 Oct 2008 16:14:23 -0700 Subject: [Ironruby-core] Code Review: bugfixes-10 Message-ID: <372109E149E8084D8E6C7D9CFD82E063334B4E7824@NA-EXMSG-C115.redmond.corp.microsoft.com> tfpt review "/shelveset:bugfixes-10;REDMOND\jflam" Comment : Fixes find bug, adds thunks for system and system.drawing assemblies and forces ironruby to use MRI gem path -------------- next part -------------- A non-text attachment was scrubbed... Name: bugfixes-10.diff Type: application/octet-stream Size: 55160 bytes Desc: bugfixes-10.diff URL: From jdeville at microsoft.com Tue Oct 21 19:20:54 2008 From: jdeville at microsoft.com (Jim Deville) Date: Tue, 21 Oct 2008 16:20:54 -0700 Subject: [Ironruby-core] Code Review: bugfixes-10 In-Reply-To: <372109E149E8084D8E6C7D9CFD82E063334B4E7824@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <372109E149E8084D8E6C7D9CFD82E063334B4E7824@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: Two comments: * The change from ironruby to ruby in the ExecutionContext might break a lang test. You can check with rake mspec:lang. * Should we default the .NET namespaces to do a default require, without the file, but allow that require to be overridden with a file? Other than that it looks good. -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of John Lam (IRONRUBY) Sent: Tuesday, October 21, 2008 4:14 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: [Ironruby-core] Code Review: bugfixes-10 tfpt review "/shelveset:bugfixes-10;REDMOND\jflam" Comment : Fixes find bug, adds thunks for system and system.drawing assemblies and forces ironruby to use MRI gem path From Tomas.Matousek at microsoft.com Tue Oct 21 20:37:05 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 21 Oct 2008 17:37:05 -0700 Subject: [Ironruby-core] Code Review: ParseTree5 In-Reply-To: References: Message-ID: ir_parse_tree.rb is just a copy of parse_tree.rb from ParseTree gem with C code replaced by a call to IronRuby. I haven't modified anything other than that. Tomas -----Original Message----- From: Curt Hagenlocher Sent: Monday, October 20, 2008 8:45 PM To: Tomas Matousek; IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: RE: Code Review: ParseTree5 In ir_parse_tree.rb, there's code near the bottom that's 'if RUBY_VERSION > "1.9"'. Is that version check a typo or does it actually reflect differences between 1.9 and 1.9.1? Otherwise, changes look good. And exciting! -----Original Message----- From: Tomas Matousek Sent: Monday, October 20, 2008 8:03 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: ParseTree5 tfpt review "/shelveset:ParseTree5;REDMOND\tomat" Comment : Bunch of tweaks to AST: - removes some nodes that are notneeded any more, - moves block argument out of Arguments to CallExpression, Fixes several bugs: - order of evaluation in "(x,y) while z", - passing parameters to a super method when a block is specified "super {}", - yield should report an error when a block argument is given "yield &p" Implements ParseTree library - there are few nodes that are to be finished, - in some cases the generated parse tree deosn't exactly match MRI (some of which I consider bugs in MRI), - adds ir_parse_tree.rb that implements the same API as parse_tree.rb calling to IronRuby for tree transformation, - only string parsing is supported now, getting AST from method/class at runtime is not yet implemented. Tomas From orion.edwards at open2view.com Tue Oct 21 22:03:55 2008 From: orion.edwards at open2view.com (Orion Edwards) Date: Wed, 22 Oct 2008 15:03:55 +1300 Subject: [Ironruby-core] Cucumber / RSpec Story Runner In-Reply-To: References: <9319fe7416065945f7de725dce3272fe@ruby-forum.com> Message-ID: <48FE8A0B.9000502@open2view.com> An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.jpg Type: image/jpeg Size: 8147 bytes Desc: not available URL: From jdeville at microsoft.com Tue Oct 21 22:15:36 2008 From: jdeville at microsoft.com (Jim Deville) Date: Tue, 21 Oct 2008 19:15:36 -0700 Subject: [Ironruby-core] Cucumber / RSpec Story Runner In-Reply-To: <48FE8A0B.9000502@open2view.com> References: <9319fe7416065945f7de725dce3272fe@ruby-forum.com> <48FE8A0B.9000502@open2view.com> Message-ID: I'll add a rake task to compile release. Can you try to isolate those cases and file bugs? The second one is pretty easy, but I'd like to have tracking on both of them. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards Sent: Tuesday, October 21, 2008 7:04 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner I just ran rspec 1.1.9 (straight from github) on IronRuby build 167, and it appears to work (I only have a simple test, but hey). I only had to make 2 changes: rspec\lib\spec\extensions\main.rb:26 is args.last[:spec_path] = File.expand_path(caller(0)[1]) IronRuby still doesn't seem to handle caller quite the same as MRI. I have no idea what that code is for, but I replaced it with this as a quick hack args.last[:spec_path] = "." and it seemed to work. I encountered another problem using the 'have' matcher - rspec does this if inflector = (defined?(ActiveSupport::Inflector) ? ActiveSupport::Inflector : (defined?(Inflector) ? Inflector : nil)) IronRuby throws uninitialized constant Object::ActiveSupport, whereas MRI just returns nil - it looks like IR isn't handling defined? on nested things properly yet. To work around this I just put module ActiveSupport; end at the top of my ruby file to get around the nested module issue. And presto! C:\development\irtest>ir rspectest.rb . Finished in 2.072133 seconds 1 example, 0 failures C:\development\irtest>ruby rspectest.rb . Finished in 0.053 seconds 1 example, 0 failures The only problem now is that 2.07 seconds is somewhat larger than 0.053... I am using the debug build of ir though, as that's what rake:compile seems to give me. Just playing with VS now to see if I can build a release version and try that Ben Hall wrote: Hi, To get rspec to work you will need to modify the actual Ironruby source. I've raised bugs to get the changes required fixed, however I did this based on 1.1.4, I think Cucumber will have a whole load more bugs attached as it has more dependencies. I know for a fact you won't be able to run Cucumber unmodified due to existing bugs around gems. (for example, gem needing .rb at the end of the file to be able to find it) However, I haven't had chance to take a closer look. Ben On Fri, Oct 17, 2008 at 2:53 PM, Curt Hagenlocher wrote: If you explicitly set the GEM_PATH before requiring gems, you should be able to use gems that are already present. I haven't tried any other gem operations. I assume you're running with the latest source? -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Pat Gannon Sent: Friday, October 17, 2008 1:30 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Cucumber / RSpec Story Runner Has anyone tried to get Cucumber (or it's predecessor: the RSpec story runner) to work with IronRuby? I have not had any luck thus far (I am extremely new to Ruby), and I would really like to be able to use Cucumber to write executable feature documentation for my .NET code. http://github.com/aslakhellesoy/cucumber/wikis I copied it under the "lib" directory, as well as several of its dependencies, but when I try to do "require 'cucumber-0.1.7/lib/cucumber'", ir (interactive ruby) fails with a stack overflow. The same thing happens when I try to require some its dependencies manually (eg. "require 'hoe-1.8.0/lib/hoe'" and "require 'rake-0.8.3/lib/rake'"), but some work just fine (eg. "require 'polyglot-0.2.3/lib/polyglot'" and "require 'treetop-1.2.4/lib/treetop'"). I also tried to get gem working to aide me in this process, but I had problems with that too. Has anyone got gem working with IronRuby? Thanks in advance! Pat Gannon -- 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 -- Orion Edwards Web Application Developer T: +64 7 859 2120 F: +64 7 859 2320 E: orion.edwards at open2view.com Open2view.com The Real Estate Website [cid:image001.jpg at 01C933B0.F8A84DD0] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 8147 bytes Desc: image001.jpg URL: From orion.edwards at open2view.com Tue Oct 21 22:18:16 2008 From: orion.edwards at open2view.com (Orion Edwards) Date: Wed, 22 Oct 2008 15:18:16 +1300 Subject: [Ironruby-core] Cucumber / RSpec Story Runner In-Reply-To: <48FE8A0B.9000502@open2view.com> References: <9319fe7416065945f7de725dce3272fe@ruby-forum.com> <48FE8A0B.9000502@open2view.com> Message-ID: <48FE8D68.602@open2view.com> An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/jpeg Size: 8147 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.jpg Type: image/jpeg Size: 8147 bytes Desc: not available URL: From curth at microsoft.com Tue Oct 21 22:45:08 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Tue, 21 Oct 2008 19:45:08 -0700 Subject: [Ironruby-core] Cucumber / RSpec Story Runner In-Reply-To: <48FE8D68.602@open2view.com> References: <9319fe7416065945f7de725dce3272fe@ruby-forum.com> <48FE8A0B.9000502@open2view.com> <48FE8D68.602@open2view.com> Message-ID: The ExtensionAttribute thing is a problem with the export and build scripts. It works in our internal source tree.. (See http://devhawk.net/2008/10/21/The+Fifth+Assembly.aspx for an explanation of why it's there to begin with.) The problem with the Merlin folders seems to come and go. If you can identify what's causing them to be created now, then that's at least as useful as an actual diff. Because of the way some of our sources build against both CLR2 and CLR4, we need to run transformations on the "internal source" before we can push it to RubyForge - so the patch probably couldn't be applied directly anyway. I think all of this stuff is actually in the Rakefile. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards Sent: Tuesday, October 21, 2008 7:18 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner Built a release version, and it takes 1.769418 seconds, which is a fair improvement from 2.07 congrats on getting this far! PS: The painful mess that you have to go through regarding Microsoft.Scripting.ExtensionAttribute.dll and littering the C drive with Merlin and Main folders is a bit uncool :-( Is this kind of thing an area you will accept patches for? Orion Edwards wrote: I just ran rspec 1.1.9 (straight from github) on IronRuby build 167, and it appears to work (I only have a simple test, but hey). I only had to make 2 changes: rspec\lib\spec\extensions\main.rb:26 is args.last[:spec_path] = File.expand_path(caller(0)[1]) IronRuby still doesn't seem to handle caller quite the same as MRI. I have no idea what that code is for, but I replaced it with this as a quick hack args.last[:spec_path] = "." and it seemed to work. I encountered another problem using the 'have' matcher - rspec does this if inflector = (defined?(ActiveSupport::Inflector) ? ActiveSupport::Inflector : (defined?(Inflector) ? Inflector : nil)) IronRuby throws uninitialized constant Object::ActiveSupport, whereas MRI just returns nil - it looks like IR isn't handling defined? on nested things properly yet. To work around this I just put module ActiveSupport; end at the top of my ruby file to get around the nested module issue. And presto! C:\development\irtest>ir rspectest.rb . Finished in 2.072133 seconds 1 example, 0 failures C:\development\irtest>ruby rspectest.rb . Finished in 0.053 seconds 1 example, 0 failures The only problem now is that 2.07 seconds is somewhat larger than 0.053... I am using the debug build of ir though, as that's what rake:compile seems to give me. Just playing with VS now to see if I can build a release version and try that Ben Hall wrote: Hi, To get rspec to work you will need to modify the actual Ironruby source. I've raised bugs to get the changes required fixed, however I did this based on 1.1.4, I think Cucumber will have a whole load more bugs attached as it has more dependencies. I know for a fact you won't be able to run Cucumber unmodified due to existing bugs around gems. (for example, gem needing .rb at the end of the file to be able to find it) However, I haven't had chance to take a closer look. Ben On Fri, Oct 17, 2008 at 2:53 PM, Curt Hagenlocher wrote: If you explicitly set the GEM_PATH before requiring gems, you should be able to use gems that are already present. I haven't tried any other gem operations. I assume you're running with the latest source? -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Pat Gannon Sent: Friday, October 17, 2008 1:30 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Cucumber / RSpec Story Runner Has anyone tried to get Cucumber (or it's predecessor: the RSpec story runner) to work with IronRuby? I have not had any luck thus far (I am extremely new to Ruby), and I would really like to be able to use Cucumber to write executable feature documentation for my .NET code. http://github.com/aslakhellesoy/cucumber/wikis I copied it under the "lib" directory, as well as several of its dependencies, but when I try to do "require 'cucumber-0.1.7/lib/cucumber'", ir (interactive ruby) fails with a stack overflow. The same thing happens when I try to require some its dependencies manually (eg. "require 'hoe-1.8.0/lib/hoe'" and "require 'rake-0.8.3/lib/rake'"), but some work just fine (eg. "require 'polyglot-0.2.3/lib/polyglot'" and "require 'treetop-1.2.4/lib/treetop'"). I also tried to get gem working to aide me in this process, but I had problems with that too. Has anyone got gem working with IronRuby? Thanks in advance! Pat Gannon -- 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 -- Orion Edwards Web Application Developer T: +64 7 859 2120 F: +64 7 859 2320 E: orion.edwards at open2view.com Open2view.com The Real Estate Website [cid:image001.jpg at 01C933B5.86003EF0] ________________________________ _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -- Orion Edwards Web Application Developer T: +64 7 859 2120 F: +64 7 859 2320 E: orion.edwards at open2view.com Open2view.com The Real Estate Website [cid:image001.jpg at 01C933B5.86003EF0] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 8147 bytes Desc: image001.jpg URL: From jflam at microsoft.com Tue Oct 21 23:05:34 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Tue, 21 Oct 2008 20:05:34 -0700 Subject: [Ironruby-core] Cucumber / RSpec Story Runner In-Reply-To: <48FE8D68.602@open2view.com> References: <9319fe7416065945f7de725dce3272fe@ruby-forum.com> <48FE8A0B.9000502@open2view.com> <48FE8D68.602@open2view.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E063334B4E793E@NA-EXMSG-C115.redmond.corp.microsoft.com> Sorry -the transform script that strips internal layout details from our .csproj files hasn't been updated to support the ExtensionAttribute project yet. If you do rake compile from the command prompt it will build correctly. I suspect that your problem with ActiveSupport has to do with the fact that we're not searching your local gems path for IronRuby (it's based off of the RUBY_ENGINE constant which means that it will look under a different set of paths. Since we haven't gotten gem install to work correctly yet, we've been hacking things to work with an existing MRI installation and pulling gems out of that path instead. If you add these lines to the first file that runs (and before require 'rubygems'), things should just work: RUBY_ENGINE = 'ruby' Thanks, -John From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards Sent: Tuesday, October 21, 2008 7:18 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner Built a release version, and it takes 1.769418 seconds, which is a fair improvement from 2.07 congrats on getting this far! PS: The painful mess that you have to go through regarding Microsoft.Scripting.ExtensionAttribute.dll and littering the C drive with Merlin and Main folders is a bit uncool :-( Is this kind of thing an area you will accept patches for? Orion Edwards wrote: I just ran rspec 1.1.9 (straight from github) on IronRuby build 167, and it appears to work (I only have a simple test, but hey). I only had to make 2 changes: rspec\lib\spec\extensions\main.rb:26 is args.last[:spec_path] = File.expand_path(caller(0)[1]) IronRuby still doesn't seem to handle caller quite the same as MRI. I have no idea what that code is for, but I replaced it with this as a quick hack args.last[:spec_path] = "." and it seemed to work. I encountered another problem using the 'have' matcher - rspec does this if inflector = (defined?(ActiveSupport::Inflector) ? ActiveSupport::Inflector : (defined?(Inflector) ? Inflector : nil)) IronRuby throws uninitialized constant Object::ActiveSupport, whereas MRI just returns nil - it looks like IR isn't handling defined? on nested things properly yet. To work around this I just put module ActiveSupport; end at the top of my ruby file to get around the nested module issue. And presto! C:\development\irtest>ir rspectest.rb . Finished in 2.072133 seconds 1 example, 0 failures C:\development\irtest>ruby rspectest.rb . Finished in 0.053 seconds 1 example, 0 failures The only problem now is that 2.07 seconds is somewhat larger than 0.053... I am using the debug build of ir though, as that's what rake:compile seems to give me. Just playing with VS now to see if I can build a release version and try that Ben Hall wrote: Hi, To get rspec to work you will need to modify the actual Ironruby source. I've raised bugs to get the changes required fixed, however I did this based on 1.1.4, I think Cucumber will have a whole load more bugs attached as it has more dependencies. I know for a fact you won't be able to run Cucumber unmodified due to existing bugs around gems. (for example, gem needing .rb at the end of the file to be able to find it) However, I haven't had chance to take a closer look. Ben On Fri, Oct 17, 2008 at 2:53 PM, Curt Hagenlocher wrote: If you explicitly set the GEM_PATH before requiring gems, you should be able to use gems that are already present. I haven't tried any other gem operations. I assume you're running with the latest source? -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Pat Gannon Sent: Friday, October 17, 2008 1:30 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Cucumber / RSpec Story Runner Has anyone tried to get Cucumber (or it's predecessor: the RSpec story runner) to work with IronRuby? I have not had any luck thus far (I am extremely new to Ruby), and I would really like to be able to use Cucumber to write executable feature documentation for my .NET code. http://github.com/aslakhellesoy/cucumber/wikis I copied it under the "lib" directory, as well as several of its dependencies, but when I try to do "require 'cucumber-0.1.7/lib/cucumber'", ir (interactive ruby) fails with a stack overflow. The same thing happens when I try to require some its dependencies manually (eg. "require 'hoe-1.8.0/lib/hoe'" and "require 'rake-0.8.3/lib/rake'"), but some work just fine (eg. "require 'polyglot-0.2.3/lib/polyglot'" and "require 'treetop-1.2.4/lib/treetop'"). I also tried to get gem working to aide me in this process, but I had problems with that too. Has anyone got gem working with IronRuby? Thanks in advance! Pat Gannon -- 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 -- Orion Edwards Web Application Developer T: +64 7 859 2120 F: +64 7 859 2320 E: orion.edwards at open2view.com Open2view.com The Real Estate Website [cid:image001.jpg at 01C933B8.607502D0] ________________________________ _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -- Orion Edwards Web Application Developer T: +64 7 859 2120 F: +64 7 859 2320 E: orion.edwards at open2view.com Open2view.com The Real Estate Website [cid:image001.jpg at 01C933B8.607502D0] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 8147 bytes Desc: image001.jpg URL: From Tomas.Matousek at microsoft.com Tue Oct 21 23:12:25 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 21 Oct 2008 20:12:25 -0700 Subject: [Ironruby-core] Cucumber / RSpec Story Runner In-Reply-To: <48FE8A0B.9000502@open2view.com> References: <9319fe7416065945f7de725dce3272fe@ruby-forum.com> <48FE8A0B.9000502@open2view.com> Message-ID: Qualified constants (and method calls) in 'define?' are actually quite interesting. In: defined? x(f(1))::y(f(2))::D methods f, x, f, y are called (in this order) and if any of them throws an exception the exception is swallowed ($! is not set). It seems that the code should actually do something like: begin x(f(1))::y(f(2)).const_defined?(:D) ? 'constant' : nil rescue Exception end Also 'defined?' on a method call: defined? foo(1,2,3).bar(1,2,3) should do: begin foo(1,2,3).instance_methods.include? 'bar' rescue Exception end Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards Sent: Tuesday, October 21, 2008 7:04 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner I just ran rspec 1.1.9 (straight from github) on IronRuby build 167, and it appears to work (I only have a simple test, but hey). I only had to make 2 changes: rspec\lib\spec\extensions\main.rb:26 is args.last[:spec_path] = File.expand_path(caller(0)[1]) IronRuby still doesn't seem to handle caller quite the same as MRI. I have no idea what that code is for, but I replaced it with this as a quick hack args.last[:spec_path] = "." and it seemed to work. I encountered another problem using the 'have' matcher - rspec does this if inflector = (defined?(ActiveSupport::Inflector) ? ActiveSupport::Inflector : (defined?(Inflector) ? Inflector : nil)) IronRuby throws uninitialized constant Object::ActiveSupport, whereas MRI just returns nil - it looks like IR isn't handling defined? on nested things properly yet. To work around this I just put module ActiveSupport; end at the top of my ruby file to get around the nested module issue. And presto! C:\development\irtest>ir rspectest.rb . Finished in 2.072133 seconds 1 example, 0 failures C:\development\irtest>ruby rspectest.rb . Finished in 0.053 seconds 1 example, 0 failures The only problem now is that 2.07 seconds is somewhat larger than 0.053... I am using the debug build of ir though, as that's what rake:compile seems to give me. Just playing with VS now to see if I can build a release version and try that Ben Hall wrote: Hi, To get rspec to work you will need to modify the actual Ironruby source. I've raised bugs to get the changes required fixed, however I did this based on 1.1.4, I think Cucumber will have a whole load more bugs attached as it has more dependencies. I know for a fact you won't be able to run Cucumber unmodified due to existing bugs around gems. (for example, gem needing .rb at the end of the file to be able to find it) However, I haven't had chance to take a closer look. Ben On Fri, Oct 17, 2008 at 2:53 PM, Curt Hagenlocher wrote: If you explicitly set the GEM_PATH before requiring gems, you should be able to use gems that are already present. I haven't tried any other gem operations. I assume you're running with the latest source? -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Pat Gannon Sent: Friday, October 17, 2008 1:30 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Cucumber / RSpec Story Runner Has anyone tried to get Cucumber (or it's predecessor: the RSpec story runner) to work with IronRuby? I have not had any luck thus far (I am extremely new to Ruby), and I would really like to be able to use Cucumber to write executable feature documentation for my .NET code. http://github.com/aslakhellesoy/cucumber/wikis I copied it under the "lib" directory, as well as several of its dependencies, but when I try to do "require 'cucumber-0.1.7/lib/cucumber'", ir (interactive ruby) fails with a stack overflow. The same thing happens when I try to require some its dependencies manually (eg. "require 'hoe-1.8.0/lib/hoe'" and "require 'rake-0.8.3/lib/rake'"), but some work just fine (eg. "require 'polyglot-0.2.3/lib/polyglot'" and "require 'treetop-1.2.4/lib/treetop'"). I also tried to get gem working to aide me in this process, but I had problems with that too. Has anyone got gem working with IronRuby? Thanks in advance! Pat Gannon -- 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 -- Orion Edwards Web Application Developer T: +64 7 859 2120 F: +64 7 859 2320 E: orion.edwards at open2view.com Open2view.com The Real Estate Website [cid:image001.jpg at 01C933B7.42B304F0] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 8147 bytes Desc: image001.jpg URL: From jdeville at microsoft.com Tue Oct 21 23:13:20 2008 From: jdeville at microsoft.com (Jim Deville) Date: Tue, 21 Oct 2008 20:13:20 -0700 Subject: [Ironruby-core] Cucumber / RSpec Story Runner In-Reply-To: <372109E149E8084D8E6C7D9CFD82E063334B4E793E@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <9319fe7416065945f7de725dce3272fe@ruby-forum.com> <48FE8A0B.9000502@open2view.com> <48FE8D68.602@open2view.com> <372109E149E8084D8E6C7D9CFD82E063334B4E793E@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: John: The reason for ActiveSupport not being defined may have been due to the search path, but throwing an error on defined? Foo::Foo is a bug in our implementation. The bug is more of the problem in this case. RSpec is trying to use ActiveSupport if it's already loaded, or load its own copy of the Inflector library. Orion: Were you wanting to patch the ExtensionAttribute thing? Or something with the Merlin and Main folders. The former just needs to be corrected by us (we already have it, it just needs some changes to our scripts), the latter is something we could probably take a patch for. JD From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of John Lam (IRONRUBY) Sent: Tuesday, October 21, 2008 8:06 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner Sorry -the transform script that strips internal layout details from our .csproj files hasn't been updated to support the ExtensionAttribute project yet. If you do rake compile from the command prompt it will build correctly. I suspect that your problem with ActiveSupport has to do with the fact that we're not searching your local gems path for IronRuby (it's based off of the RUBY_ENGINE constant which means that it will look under a different set of paths. Since we haven't gotten gem install to work correctly yet, we've been hacking things to work with an existing MRI installation and pulling gems out of that path instead. If you add these lines to the first file that runs (and before require 'rubygems'), things should just work: RUBY_ENGINE = 'ruby' Thanks, -John From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards Sent: Tuesday, October 21, 2008 7:18 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner Built a release version, and it takes 1.769418 seconds, which is a fair improvement from 2.07 congrats on getting this far! PS: The painful mess that you have to go through regarding Microsoft.Scripting.ExtensionAttribute.dll and littering the C drive with Merlin and Main folders is a bit uncool :-( Is this kind of thing an area you will accept patches for? Orion Edwards wrote: I just ran rspec 1.1.9 (straight from github) on IronRuby build 167, and it appears to work (I only have a simple test, but hey). I only had to make 2 changes: rspec\lib\spec\extensions\main.rb:26 is args.last[:spec_path] = File.expand_path(caller(0)[1]) IronRuby still doesn't seem to handle caller quite the same as MRI. I have no idea what that code is for, but I replaced it with this as a quick hack args.last[:spec_path] = "." and it seemed to work. I encountered another problem using the 'have' matcher - rspec does this if inflector = (defined?(ActiveSupport::Inflector) ? ActiveSupport::Inflector : (defined?(Inflector) ? Inflector : nil)) IronRuby throws uninitialized constant Object::ActiveSupport, whereas MRI just returns nil - it looks like IR isn't handling defined? on nested things properly yet. To work around this I just put module ActiveSupport; end at the top of my ruby file to get around the nested module issue. And presto! C:\development\irtest>ir rspectest.rb . Finished in 2.072133 seconds 1 example, 0 failures C:\development\irtest>ruby rspectest.rb . Finished in 0.053 seconds 1 example, 0 failures The only problem now is that 2.07 seconds is somewhat larger than 0.053... I am using the debug build of ir though, as that's what rake:compile seems to give me. Just playing with VS now to see if I can build a release version and try that Ben Hall wrote: Hi, To get rspec to work you will need to modify the actual Ironruby source. I've raised bugs to get the changes required fixed, however I did this based on 1.1.4, I think Cucumber will have a whole load more bugs attached as it has more dependencies. I know for a fact you won't be able to run Cucumber unmodified due to existing bugs around gems. (for example, gem needing .rb at the end of the file to be able to find it) However, I haven't had chance to take a closer look. Ben On Fri, Oct 17, 2008 at 2:53 PM, Curt Hagenlocher wrote: If you explicitly set the GEM_PATH before requiring gems, you should be able to use gems that are already present. I haven't tried any other gem operations. I assume you're running with the latest source? -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Pat Gannon Sent: Friday, October 17, 2008 1:30 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Cucumber / RSpec Story Runner Has anyone tried to get Cucumber (or it's predecessor: the RSpec story runner) to work with IronRuby? I have not had any luck thus far (I am extremely new to Ruby), and I would really like to be able to use Cucumber to write executable feature documentation for my .NET code. http://github.com/aslakhellesoy/cucumber/wikis I copied it under the "lib" directory, as well as several of its dependencies, but when I try to do "require 'cucumber-0.1.7/lib/cucumber'", ir (interactive ruby) fails with a stack overflow. The same thing happens when I try to require some its dependencies manually (eg. "require 'hoe-1.8.0/lib/hoe'" and "require 'rake-0.8.3/lib/rake'"), but some work just fine (eg. "require 'polyglot-0.2.3/lib/polyglot'" and "require 'treetop-1.2.4/lib/treetop'"). I also tried to get gem working to aide me in this process, but I had problems with that too. Has anyone got gem working with IronRuby? Thanks in advance! Pat Gannon -- 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 -- Orion Edwards Web Application Developer T: +64 7 859 2120 F: +64 7 859 2320 E: orion.edwards at open2view.com Open2view.com The Real Estate Website [cid:image001.jpg at 01C933B9.7636F7D0] ________________________________ _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -- Orion Edwards Web Application Developer T: +64 7 859 2120 F: +64 7 859 2320 E: orion.edwards at open2view.com Open2view.com The Real Estate Website [cid:image001.jpg at 01C933B9.7636F7D0] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 8147 bytes Desc: image001.jpg URL: From jdeville at microsoft.com Tue Oct 21 23:15:22 2008 From: jdeville at microsoft.com (Jim Deville) Date: Tue, 21 Oct 2008 20:15:22 -0700 Subject: [Ironruby-core] Cucumber / RSpec Story Runner In-Reply-To: References: <9319fe7416065945f7de725dce3272fe@ruby-forum.com> <48FE8A0B.9000502@open2view.com> Message-ID: Are those behaviors spec'd? If not they should be. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek Sent: Tuesday, October 21, 2008 8:12 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner Qualified constants (and method calls) in 'define?' are actually quite interesting. In: defined? x(f(1))::y(f(2))::D methods f, x, f, y are called (in this order) and if any of them throws an exception the exception is swallowed ($! is not set). It seems that the code should actually do something like: begin x(f(1))::y(f(2)).const_defined?(:D) ? 'constant' : nil rescue Exception end Also 'defined?' on a method call: defined? foo(1,2,3).bar(1,2,3) should do: begin foo(1,2,3).instance_methods.include? 'bar' rescue Exception end Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards Sent: Tuesday, October 21, 2008 7:04 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner I just ran rspec 1.1.9 (straight from github) on IronRuby build 167, and it appears to work (I only have a simple test, but hey). I only had to make 2 changes: rspec\lib\spec\extensions\main.rb:26 is args.last[:spec_path] = File.expand_path(caller(0)[1]) IronRuby still doesn't seem to handle caller quite the same as MRI. I have no idea what that code is for, but I replaced it with this as a quick hack args.last[:spec_path] = "." and it seemed to work. I encountered another problem using the 'have' matcher - rspec does this if inflector = (defined?(ActiveSupport::Inflector) ? ActiveSupport::Inflector : (defined?(Inflector) ? Inflector : nil)) IronRuby throws uninitialized constant Object::ActiveSupport, whereas MRI just returns nil - it looks like IR isn't handling defined? on nested things properly yet. To work around this I just put module ActiveSupport; end at the top of my ruby file to get around the nested module issue. And presto! C:\development\irtest>ir rspectest.rb . Finished in 2.072133 seconds 1 example, 0 failures C:\development\irtest>ruby rspectest.rb . Finished in 0.053 seconds 1 example, 0 failures The only problem now is that 2.07 seconds is somewhat larger than 0.053... I am using the debug build of ir though, as that's what rake:compile seems to give me. Just playing with VS now to see if I can build a release version and try that Ben Hall wrote: Hi, To get rspec to work you will need to modify the actual Ironruby source. I've raised bugs to get the changes required fixed, however I did this based on 1.1.4, I think Cucumber will have a whole load more bugs attached as it has more dependencies. I know for a fact you won't be able to run Cucumber unmodified due to existing bugs around gems. (for example, gem needing .rb at the end of the file to be able to find it) However, I haven't had chance to take a closer look. Ben On Fri, Oct 17, 2008 at 2:53 PM, Curt Hagenlocher wrote: If you explicitly set the GEM_PATH before requiring gems, you should be able to use gems that are already present. I haven't tried any other gem operations. I assume you're running with the latest source? -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Pat Gannon Sent: Friday, October 17, 2008 1:30 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Cucumber / RSpec Story Runner Has anyone tried to get Cucumber (or it's predecessor: the RSpec story runner) to work with IronRuby? I have not had any luck thus far (I am extremely new to Ruby), and I would really like to be able to use Cucumber to write executable feature documentation for my .NET code. http://github.com/aslakhellesoy/cucumber/wikis I copied it under the "lib" directory, as well as several of its dependencies, but when I try to do "require 'cucumber-0.1.7/lib/cucumber'", ir (interactive ruby) fails with a stack overflow. The same thing happens when I try to require some its dependencies manually (eg. "require 'hoe-1.8.0/lib/hoe'" and "require 'rake-0.8.3/lib/rake'"), but some work just fine (eg. "require 'polyglot-0.2.3/lib/polyglot'" and "require 'treetop-1.2.4/lib/treetop'"). I also tried to get gem working to aide me in this process, but I had problems with that too. Has anyone got gem working with IronRuby? Thanks in advance! Pat Gannon -- 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 -- Orion Edwards Web Application Developer T: +64 7 859 2120 F: +64 7 859 2320 E: orion.edwards at open2view.com Open2view.com The Real Estate Website [cid:image001.jpg at 01C933B9.BF0D8370] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 8147 bytes Desc: image001.jpg URL: From jflam at microsoft.com Wed Oct 22 00:49:57 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Tue, 21 Oct 2008 21:49:57 -0700 Subject: [Ironruby-core] Cucumber / RSpec Story Runner In-Reply-To: <48FE8D68.602@open2view.com> References: <9319fe7416065945f7de725dce3272fe@ruby-forum.com> <48FE8A0B.9000502@open2view.com> <48FE8D68.602@open2view.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E063334B4E7988@NA-EXMSG-C115.redmond.corp.microsoft.com> Try r168 that I just pushed out. It should fix all of the problems related to littering your root directory, as well as the Microsoft.Scripting.ExtensionAttribute.dll build from both the IronRuby.sln solution, as well as in the rake compile task. The YAML external build was the main thing that was causing this - to the point where I doubt that YAML has worked for externals in quite some time. Thanks, -John From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards Sent: Tuesday, October 21, 2008 7:18 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner Built a release version, and it takes 1.769418 seconds, which is a fair improvement from 2.07 congrats on getting this far! PS: The painful mess that you have to go through regarding Microsoft.Scripting.ExtensionAttribute.dll and littering the C drive with Merlin and Main folders is a bit uncool :-( Is this kind of thing an area you will accept patches for? Orion Edwards wrote: I just ran rspec 1.1.9 (straight from github) on IronRuby build 167, and it appears to work (I only have a simple test, but hey). I only had to make 2 changes: rspec\lib\spec\extensions\main.rb:26 is args.last[:spec_path] = File.expand_path(caller(0)[1]) IronRuby still doesn't seem to handle caller quite the same as MRI. I have no idea what that code is for, but I replaced it with this as a quick hack args.last[:spec_path] = "." and it seemed to work. I encountered another problem using the 'have' matcher - rspec does this if inflector = (defined?(ActiveSupport::Inflector) ? ActiveSupport::Inflector : (defined?(Inflector) ? Inflector : nil)) IronRuby throws uninitialized constant Object::ActiveSupport, whereas MRI just returns nil - it looks like IR isn't handling defined? on nested things properly yet. To work around this I just put module ActiveSupport; end at the top of my ruby file to get around the nested module issue. And presto! C:\development\irtest>ir rspectest.rb . Finished in 2.072133 seconds 1 example, 0 failures C:\development\irtest>ruby rspectest.rb . Finished in 0.053 seconds 1 example, 0 failures The only problem now is that 2.07 seconds is somewhat larger than 0.053... I am using the debug build of ir though, as that's what rake:compile seems to give me. Just playing with VS now to see if I can build a release version and try that Ben Hall wrote: Hi, To get rspec to work you will need to modify the actual Ironruby source. I've raised bugs to get the changes required fixed, however I did this based on 1.1.4, I think Cucumber will have a whole load more bugs attached as it has more dependencies. I know for a fact you won't be able to run Cucumber unmodified due to existing bugs around gems. (for example, gem needing .rb at the end of the file to be able to find it) However, I haven't had chance to take a closer look. Ben On Fri, Oct 17, 2008 at 2:53 PM, Curt Hagenlocher wrote: If you explicitly set the GEM_PATH before requiring gems, you should be able to use gems that are already present. I haven't tried any other gem operations. I assume you're running with the latest source? -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Pat Gannon Sent: Friday, October 17, 2008 1:30 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Cucumber / RSpec Story Runner Has anyone tried to get Cucumber (or it's predecessor: the RSpec story runner) to work with IronRuby? I have not had any luck thus far (I am extremely new to Ruby), and I would really like to be able to use Cucumber to write executable feature documentation for my .NET code. http://github.com/aslakhellesoy/cucumber/wikis I copied it under the "lib" directory, as well as several of its dependencies, but when I try to do "require 'cucumber-0.1.7/lib/cucumber'", ir (interactive ruby) fails with a stack overflow. The same thing happens when I try to require some its dependencies manually (eg. "require 'hoe-1.8.0/lib/hoe'" and "require 'rake-0.8.3/lib/rake'"), but some work just fine (eg. "require 'polyglot-0.2.3/lib/polyglot'" and "require 'treetop-1.2.4/lib/treetop'"). I also tried to get gem working to aide me in this process, but I had problems with that too. Has anyone got gem working with IronRuby? Thanks in advance! Pat Gannon -- 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 -- Orion Edwards Web Application Developer T: +64 7 859 2120 F: +64 7 859 2320 E: orion.edwards at open2view.com Open2view.com The Real Estate Website [cid:image001.jpg at 01C933C6.F5B96940] ________________________________ _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -- Orion Edwards Web Application Developer T: +64 7 859 2120 F: +64 7 859 2320 E: orion.edwards at open2view.com Open2view.com The Real Estate Website [cid:image001.jpg at 01C933C6.F5B96940] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 8147 bytes Desc: image001.jpg URL: From jflam at microsoft.com Wed Oct 22 00:56:23 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Tue, 21 Oct 2008 21:56:23 -0700 Subject: [Ironruby-core] Code Review: transformfixes-1 Message-ID: <372109E149E8084D8E6C7D9CFD82E063334B4E798E@NA-EXMSG-C115.redmond.corp.microsoft.com> tfpt review "/shelveset:transformfixes-1;REDMOND\jflam" Comment : FYI: Fixes bugs in Rakefile external transform and updates IronRuby.sln to reference new ExtensionAttribute assembly. -------------- next part -------------- A non-text attachment was scrubbed... Name: transformfixes-1.diff Type: application/octet-stream Size: 21111 bytes Desc: transformfixes-1.diff URL: From orion.edwards at open2view.com Tue Oct 21 22:37:19 2008 From: orion.edwards at open2view.com (Orion Edwards) Date: Wed, 22 Oct 2008 15:37:19 +1300 Subject: [Ironruby-core] Cucumber / RSpec Story Runner In-Reply-To: References: <9319fe7416065945f7de725dce3272fe@ruby-forum.com> <48FE8A0B.9000502@open2view.com> Message-ID: <48FE91DF.7010803@open2view.com> An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/jpeg Size: 8147 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.jpg Type: image/jpeg Size: 8147 bytes Desc: not available URL: From jflam at microsoft.com Wed Oct 22 01:40:27 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Tue, 21 Oct 2008 22:40:27 -0700 Subject: [Ironruby-core] Cucumber / RSpec Story Runner In-Reply-To: <48FE91DF.7010803@open2view.com> References: <9319fe7416065945f7de725dce3272fe@ruby-forum.com> <48FE8A0B.9000502@open2view.com> <48FE91DF.7010803@open2view.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E063334B4E79B2@NA-EXMSG-C115.redmond.corp.microsoft.com> Orion - can you supply us with your rspectest.rb file? I was just hacking around with rspec 1.1.9 here, and it's blowing up with a bunch of dependencies on startup. Thanks, -John From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards Sent: Tuesday, October 21, 2008 7:37 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner The nested defined? bug is logged here: http://rubyforge.org/tracker/index.php?func=detail&aid=22503&group_id=4359&atid=16798 The 'caller' one is actually 2 bugs, both of which have been logged by ben hall already http://rubyforge.org/tracker/?group_id=4359&atid=16798&func=detail&aid=22315 http://rubyforge.org/tracker/?group_id=4359&atid=16798&func=detail&aid=22348 For those interested in running rspec right now, a better fix is to replace line 26 of main.rb with args.last[:spec_path] = File.expand_path( caller(0)[1].split(':').first ) This will only cause rspec to lose the line number - you also have to run ir with the -D flag, or it doesn't include the path at all. As far as my quick-hack investigation shows me, rspec only uses this data for showing friendly error messages, rather than any core logic, so perhaps it's not super-critical. It would be nice to run it unpatched tho, IronRuby is looking incredibly close to doing that :-) Jim Deville wrote: I'll add a rake task to compile release. Can you try to isolate those cases and file bugs? The second one is pretty easy, but I'd like to have tracking on both of them. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards Sent: Tuesday, October 21, 2008 7:04 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner I just ran rspec 1.1.9 (straight from github) on IronRuby build 167, and it appears to work (I only have a simple test, but hey). I only had to make 2 changes: rspec\lib\spec\extensions\main.rb:26 is args.last[:spec_path] = File.expand_path(caller(0)[1]) IronRuby still doesn't seem to handle caller quite the same as MRI. I have no idea what that code is for, but I replaced it with this as a quick hack args.last[:spec_path] = "." and it seemed to work. I encountered another problem using the 'have' matcher - rspec does this if inflector = (defined?(ActiveSupport::Inflector) ? ActiveSupport::Inflector : (defined?(Inflector) ? Inflector : nil)) IronRuby throws uninitialized constant Object::ActiveSupport, whereas MRI just returns nil - it looks like IR isn't handling defined? on nested things properly yet. To work around this I just put module ActiveSupport; end at the top of my ruby file to get around the nested module issue. And presto! C:\development\irtest>ir rspectest.rb . Finished in 2.072133 seconds 1 example, 0 failures C:\development\irtest>ruby rspectest.rb . Finished in 0.053 seconds 1 example, 0 failures The only problem now is that 2.07 seconds is somewhat larger than 0.053... I am using the debug build of ir though, as that's what rake:compile seems to give me. Just playing with VS now to see if I can build a release version and try that Ben Hall wrote: Hi, To get rspec to work you will need to modify the actual Ironruby source. I've raised bugs to get the changes required fixed, however I did this based on 1.1.4, I think Cucumber will have a whole load more bugs attached as it has more dependencies. I know for a fact you won't be able to run Cucumber unmodified due to existing bugs around gems. (for example, gem needing .rb at the end of the file to be able to find it) However, I haven't had chance to take a closer look. Ben On Fri, Oct 17, 2008 at 2:53 PM, Curt Hagenlocher wrote: If you explicitly set the GEM_PATH before requiring gems, you should be able to use gems that are already present. I haven't tried any other gem operations. I assume you're running with the latest source? -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Pat Gannon Sent: Friday, October 17, 2008 1:30 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Cucumber / RSpec Story Runner Has anyone tried to get Cucumber (or it's predecessor: the RSpec story runner) to work with IronRuby? I have not had any luck thus far (I am extremely new to Ruby), and I would really like to be able to use Cucumber to write executable feature documentation for my .NET code. http://github.com/aslakhellesoy/cucumber/wikis I copied it under the "lib" directory, as well as several of its dependencies, but when I try to do "require 'cucumber-0.1.7/lib/cucumber'", ir (interactive ruby) fails with a stack overflow. The same thing happens when I try to require some its dependencies manually (eg. "require 'hoe-1.8.0/lib/hoe'" and "require 'rake-0.8.3/lib/rake'"), but some work just fine (eg. "require 'polyglot-0.2.3/lib/polyglot'" and "require 'treetop-1.2.4/lib/treetop'"). I also tried to get gem working to aide me in this process, but I had problems with that too. Has anyone got gem working with IronRuby? Thanks in advance! Pat Gannon -- 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 -- Orion Edwards Web Application Developer T: +64 7 859 2120 F: +64 7 859 2320 E: orion.edwards at open2view.com Open2view.com The Real Estate Website [cid:image001.jpg at 01C933CE.03EA3510] ________________________________ _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -- Orion Edwards Web Application Developer T: +64 7 859 2120 F: +64 7 859 2320 E: orion.edwards at open2view.com Open2view.com The Real Estate Website [cid:image001.jpg at 01C933CE.03EA3510] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 8147 bytes Desc: image001.jpg URL: From orion.edwards at open2view.com Wed Oct 22 01:57:30 2008 From: orion.edwards at open2view.com (Orion Edwards) Date: Wed, 22 Oct 2008 18:57:30 +1300 Subject: [Ironruby-core] Cucumber / RSpec Story Runner In-Reply-To: References: <9319fe7416065945f7de725dce3272fe@ruby-forum.com> <48FE8A0B.9000502@open2view.com> <48FE8D68.602@open2view.com> <372109E149E8084D8E6C7D9CFD82E063334B4E793E@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <87BB8D78-558B-4451-BAD6-64284A176BA2@open2view.com> I wasn't really sure where to start. Running a rake compile leaves the system alone, it's actually when you open the projects in visual studio (which I needed to do earlier to compile a release build). Note: I have my code in c:\dev\ironruby on this box. there's no trunk subfolder, so this may have something to do with all those ....\..\.. \..\..\.\.\...\'s that are in the csproj files The security warning dialog comes up telling me it may be unsafe, and asking to load the project for browsing, or to load normally. I tell it to load the project normally (I trust you guys, awwww), and it then creates these folders. Note that the only thing that was present previously was my c:\dev c:\build\release c:\Merlin\Main\Bin\FxCop c:\dev\Bin\FxCop Note: At this point, all I've done is tell VS to load microsoft.scripting.core.dll It then prompts me again if I trust it to load microsoft.scripting.extensionattribute.dll, which doesn't create any extra directories that I can find This is not something I realised visual studio could actually even do, so perhaps I'm not the right person to provide a patch for it... Moving on, I now switch to release config, and hit compile. This now works with no additional hackery in svn r168 (Thanks John!) However, I now also have c:\Tools\Nessie\Nessie\bin\IronRuby.dll c:\build\debug IIRC compiling from VS in debug mode produces even more littering too. Thanks, Orion On 22/10/2008, at 4:13 PM, Jim Deville wrote: > John: > The reason for ActiveSupport not being defined may have been due to > the search path, but throwing an error on defined? Foo::Foo is a bug > in our implementation. The bug is more of the problem in this case. > RSpec is trying to use ActiveSupport if it?s already loaded, or load > its own copy of the Inflector library. > > Orion: > Were you wanting to patch the ExtensionAttribute thing? Or something > with the Merlin and Main folders. The former just needs to be > corrected by us (we already have it, it just needs some changes to > our scripts), the latter is something we could probably take a patch > for. > JD > > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org > ] On Behalf Of John Lam (IRONRUBY) > Sent: Tuesday, October 21, 2008 8:06 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner > > Sorry ?the transform script that strips internal layout details from > our .csproj files hasn?t been updated to support the > ExtensionAttribute project yet. > > If you do rake compile from the command prompt it will build > correctly. > > I suspect that your problem with ActiveSupport has to do with the > fact that we?re not searching your local gems path for IronRuby > (it?s based off of the RUBY_ENGINE constant which means that it will > look under a different set of paths. > > Since we haven?t gotten gem install to work correctly yet, we?ve > been hacking things to work with an existing MRI installation and > pulling gems out of that path instead. If you add these lines to the > first file that runs (and before require ?rubygems?), things should > just work: > > RUBY_ENGINE = ?ruby? > > Thanks, > -John > > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org > ] On Behalf Of Orion Edwards > Sent: Tuesday, October 21, 2008 7:18 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner > > Built a release version, and it takes 1.769418 seconds, which is a > fair improvement from 2.07 > > congrats on getting this far! > > PS: The painful mess that you have to go through regarding > Microsoft.Scripting.ExtensionAttribute.dll and littering the C drive > with Merlin and Main folders is a bit uncool :-( > Is this kind of thing an area you will accept patches for? > > Orion Edwards wrote: > I just ran rspec 1.1.9 (straight from github) on IronRuby build 167, > and it appears to work (I only have a simple test, but hey). > > I only had to make 2 changes: > > rspec\lib\spec\extensions\main.rb:26 is > args.last[:spec_path] = File.expand_path(caller(0)[1]) > > IronRuby still doesn't seem to handle caller quite the same as MRI. > I have no idea what that code is for, but I replaced it with this as > a quick hack > args.last[:spec_path] = "." > > and it seemed to work. > > I encountered another problem using the 'have' matcher - rspec does > this > if inflector = (defined?(ActiveSupport::Inflector) ? > ActiveSupport::Inflector : (defined?(Inflector) ? Inflector : nil)) > > IronRuby throws uninitialized constant Object::ActiveSupport, > whereas MRI just returns nil - it looks like IR isn't handling > defined? on nested things properly yet. > > To work around this I just put > module ActiveSupport; end > > at the top of my ruby file to get around the nested module issue. > > And presto! > C:\development\irtest>ir rspectest.rb > . > > Finished in 2.072133 seconds > > 1 example, 0 failures > > C:\development\irtest>ruby rspectest.rb > . > > Finished in 0.053 seconds > > 1 example, 0 failures > > > The only problem now is that 2.07 seconds is somewhat larger than > 0.053... I am using the debug build of ir though, as that's what > rake:compile seems to give me. > > Just playing with VS now to see if I can build a release version and > try that > > Ben Hall wrote: > Hi, > > To get rspec to work you will need to modify the actual Ironruby > source. I've raised bugs to get the changes required fixed, however I > did this based on 1.1.4, I think Cucumber will have a whole load more > bugs attached as it has more dependencies. > > I know for a fact you won't be able to run Cucumber unmodified due to > existing bugs around gems. (for example, gem needing .rb at the end > of the file to be able to find it) > > However, I haven't had chance to take a closer look. > > Ben > > > > On Fri, Oct 17, 2008 at 2:53 PM, Curt Hagenlocher > wrote: > > If you explicitly set the GEM_PATH before requiring gems, you should > be able to use gems that are already present. I haven't tried any > other gem operations. > > I assume you're running with the latest source? > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org > ] On Behalf Of Pat Gannon > Sent: Friday, October 17, 2008 1:30 AM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] Cucumber / RSpec Story Runner > > Has anyone tried to get Cucumber (or it's predecessor: the RSpec story > runner) to work with IronRuby? I have not had any luck thus far (I am > extremely new to Ruby), and I would really like to be able to use > Cucumber to write executable feature documentation for my .NET code. > > http://github.com/aslakhellesoy/cucumber/wikis > > I copied it under the "lib" directory, as well as several of its > dependencies, but when I try to do "require > 'cucumber-0.1.7/lib/cucumber'", ir (interactive ruby) fails with a > stack > overflow. The same thing happens when I try to require some its > dependencies manually (eg. "require 'hoe-1.8.0/lib/hoe'" and "require > 'rake-0.8.3/lib/rake'"), but some work just fine (eg. "require > 'polyglot-0.2.3/lib/polyglot'" and "require > 'treetop-1.2.4/lib/treetop'"). > > I also tried to get gem working to aide me in this process, but I had > problems with that too. Has anyone got gem working with IronRuby? > > Thanks in advance! > Pat Gannon > -- > 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 > > > -- > Orion Edwards > Web Application Developer > > T: +64 7 859 2120 > F: +64 7 859 2320 > E: orion.edwards at open2view.com > > Open2view.com > The Real Estate Website > > > > > > > > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > > -- > Orion Edwards > Web Application Developer > > T: +64 7 859 2120 > F: +64 7 859 2320 > E: orion.edwards at open2view.com > > Open2view.com > The Real Estate Website > > > _______________________________________________ > 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 Oct 22 02:02:56 2008 From: jdeville at microsoft.com (Jim Deville) Date: Tue, 21 Oct 2008 23:02:56 -0700 Subject: [Ironruby-core] Cucumber / RSpec Story Runner In-Reply-To: <372109E149E8084D8E6C7D9CFD82E063334B4E79B2@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <9319fe7416065945f7de725dce3272fe@ruby-forum.com> <48FE8A0B.9000502@open2view.com> <48FE91DF.7010803@open2view.com>, <372109E149E8084D8E6C7D9CFD82E063334B4E79B2@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: It appears that rspec has a broken gemspec. It's not installing spicycode-rcov, syntax, and possibly more. JD ________________________________________ From: ironruby-core-bounces at rubyforge.org [ironruby-core-bounces at rubyforge.org] On Behalf Of John Lam (IRONRUBY) [jflam at microsoft.com] Sent: Tuesday, October 21, 2008 10:40 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner Orion ? can you supply us with your rspectest.rb file? I was just hacking around with rspec 1.1.9 here, and it?s blowing up with a bunch of dependencies on startup. Thanks, -John From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards Sent: Tuesday, October 21, 2008 7:37 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner The nested defined? bug is logged here: http://rubyforge.org/tracker/index.php?func=detail&aid=22503&group_id=4359&atid=16798 The 'caller' one is actually 2 bugs, both of which have been logged by ben hall already http://rubyforge.org/tracker/?group_id=4359&atid=16798&func=detail&aid=22315 http://rubyforge.org/tracker/?group_id=4359&atid=16798&func=detail&aid=22348 For those interested in running rspec right now, a better fix is to replace line 26 of main.rb with args.last[:spec_path] = File.expand_path( caller(0)[1].split(':').first ) This will only cause rspec to lose the line number - you also have to run ir with the -D flag, or it doesn't include the path at all. As far as my quick-hack investigation shows me, rspec only uses this data for showing friendly error messages, rather than any core logic, so perhaps it's not super-critical. It would be nice to run it unpatched tho, IronRuby is looking incredibly close to doing that :-) Jim Deville wrote: I?ll add a rake task to compile release. Can you try to isolate those cases and file bugs? The second one is pretty easy, but I?d like to have tracking on both of them. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards Sent: Tuesday, October 21, 2008 7:04 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner I just ran rspec 1.1.9 (straight from github) on IronRuby build 167, and it appears to work (I only have a simple test, but hey). I only had to make 2 changes: rspec\lib\spec\extensions\main.rb:26 is args.last[:spec_path] = File.expand_path(caller(0)[1]) IronRuby still doesn't seem to handle caller quite the same as MRI. I have no idea what that code is for, but I replaced it with this as a quick hack args.last[:spec_path] = "." and it seemed to work. I encountered another problem using the 'have' matcher - rspec does this if inflector = (defined?(ActiveSupport::Inflector) ? ActiveSupport::Inflector : (defined?(Inflector) ? Inflector : nil)) IronRuby throws uninitialized constant Object::ActiveSupport, whereas MRI just returns nil - it looks like IR isn't handling defined? on nested things properly yet. To work around this I just put module ActiveSupport; end at the top of my ruby file to get around the nested module issue. And presto! C:\development\irtest>ir rspectest.rb . Finished in 2.072133 seconds 1 example, 0 failures C:\development\irtest>ruby rspectest.rb . Finished in 0.053 seconds 1 example, 0 failures The only problem now is that 2.07 seconds is somewhat larger than 0.053... I am using the debug build of ir though, as that's what rake:compile seems to give me. Just playing with VS now to see if I can build a release version and try that Ben Hall wrote: Hi, To get rspec to work you will need to modify the actual Ironruby source. I've raised bugs to get the changes required fixed, however I did this based on 1.1.4, I think Cucumber will have a whole load more bugs attached as it has more dependencies. I know for a fact you won't be able to run Cucumber unmodified due to existing bugs around gems. (for example, gem needing .rb at the end of the file to be able to find it) However, I haven't had chance to take a closer look. Ben On Fri, Oct 17, 2008 at 2:53 PM, Curt Hagenlocher wrote: If you explicitly set the GEM_PATH before requiring gems, you should be able to use gems that are already present. I haven't tried any other gem operations. I assume you're running with the latest source? -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Pat Gannon Sent: Friday, October 17, 2008 1:30 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Cucumber / RSpec Story Runner Has anyone tried to get Cucumber (or it's predecessor: the RSpec story runner) to work with IronRuby? I have not had any luck thus far (I am extremely new to Ruby), and I would really like to be able to use Cucumber to write executable feature documentation for my .NET code. http://github.com/aslakhellesoy/cucumber/wikis I copied it under the "lib" directory, as well as several of its dependencies, but when I try to do "require 'cucumber-0.1.7/lib/cucumber'", ir (interactive ruby) fails with a stack overflow. The same thing happens when I try to require some its dependencies manually (eg. "require 'hoe-1.8.0/lib/hoe'" and "require 'rake-0.8.3/lib/rake'"), but some work just fine (eg. "require 'polyglot-0.2.3/lib/polyglot'" and "require 'treetop-1.2.4/lib/treetop'"). I also tried to get gem working to aide me in this process, but I had problems with that too. Has anyone got gem working with IronRuby? Thanks in advance! Pat Gannon -- 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 -- Orion Edwards Web Application Developer T: +64 7 859 2120 F: +64 7 859 2320 E: orion.edwards at open2view.com Open2view.com The Real Estate Website [cid:image001.jpg at 01C933CE.03EA3510] ________________________________ _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -- Orion Edwards Web Application Developer T: +64 7 859 2120 F: +64 7 859 2320 E: orion.edwards at open2view.com Open2view.com The Real Estate Website [cid:image001.jpg at 01C933CE.03EA3510] From orion.edwards at open2view.com Wed Oct 22 02:07:16 2008 From: orion.edwards at open2view.com (Orion Edwards) Date: Wed, 22 Oct 2008 19:07:16 +1300 Subject: [Ironruby-core] Cucumber / RSpec Story Runner In-Reply-To: <372109E149E8084D8E6C7D9CFD82E063334B4E79B2@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <9319fe7416065945f7de725dce3272fe@ruby-forum.com> <48FE8A0B.9000502@open2view.com> <48FE91DF.7010803@open2view.com> <372109E149E8084D8E6C7D9CFD82E063334B4E79B2@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: Sure. Here's the entire contents of the ruby file $LOAD_PATH << 'c:/dev/rspec/lib' require 'spec' module ActiveSupport; end # workaround ironruby defined? bug class Vehicle def initialize(people) @people = people end attr_accessor :people end describe Vehicle do it "should assign people using the constructor" do car = Vehicle.new(['orion', 'john', 'jim']) car.should have(3).people end end Note I'm not using gems or anything else like that. To replicate this you'd basically do this: svn checkout ironruby 168 into c:\dev\ironruby rake compile git clone rspec straight from github, and stick it in c:\dev\rspec edit c:\dev\rspec\lib\spec\extensions\main.rb and fix the call to File.expand_path spin up a command prompt and set PATH=blahblah so it can see the ironruby binaries that got build previously ir rspectest.rb On 22/10/2008, at 6:40 PM, John Lam (IRONRUBY) wrote: > Orion ? can you supply us with your rspectest.rb file? > > I was just hacking around with rspec 1.1.9 here, and it?s blowing up > with a bunch of dependencies on startup. > > Thanks, > -John > > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org > ] On Behalf Of Orion Edwards > Sent: Tuesday, October 21, 2008 7:37 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner > > The nested defined? bug is logged here: > > http://rubyforge.org/tracker/index.php?func=detail&aid=22503&group_id=4359&atid=16798 > > The 'caller' one is actually 2 bugs, both of which have been logged > by ben hall already > > http://rubyforge.org/tracker/?group_id=4359&atid=16798&func=detail&aid=22315 > http://rubyforge.org/tracker/?group_id=4359&atid=16798&func=detail&aid=22348 > > For those interested in running rspec right now, a better fix is to > replace line 26 of main.rb with > args.last[:spec_path] = File.expand_path( caller(0) > [1].split(':').first ) > > This will only cause rspec to lose the line number - you also have > to run ir with the -D flag, or it doesn't include the path at all. > > As far as my quick-hack investigation shows me, rspec only uses this > data for showing friendly error messages, rather than any core > logic, so perhaps it's not super-critical. > It would be nice to run it unpatched tho, IronRuby is looking > incredibly close to doing that :-) > > > Jim Deville wrote: > I?ll add a rake task to compile release. Can you try to isolate > those cases and file bugs? The second one is pretty easy, but I?d > like to have tracking on both of them. > > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org > ] On Behalf Of Orion Edwards > Sent: Tuesday, October 21, 2008 7:04 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner > > I just ran rspec 1.1.9 (straight from github) on IronRuby build 167, > and it appears to work (I only have a simple test, but hey). > > I only had to make 2 changes: > > rspec\lib\spec\extensions\main.rb:26 is > args.last[:spec_path] = File.expand_path(caller(0)[1]) > IronRuby still doesn't seem to handle caller quite the same as MRI. > I have no idea what that code is for, but I replaced it with this as > a quick hack > args.last[:spec_path] = "." > and it seemed to work. > > I encountered another problem using the 'have' matcher - rspec does > this > if inflector = (defined?(ActiveSupport::Inflector) ? > ActiveSupport::Inflector : (defined?(Inflector) ? Inflector : nil)) > IronRuby throws uninitialized constant Object::ActiveSupport, > whereas MRI just returns nil - it looks like IR isn't handling > defined? on nested things properly yet. > > To work around this I just put > module ActiveSupport; end > at the top of my ruby file to get around the nested module issue. > > And presto! > C:\development\irtest>ir rspectest.rb > . > > Finished in 2.072133 seconds > > 1 example, 0 failures > > C:\development\irtest>ruby rspectest.rb > . > > Finished in 0.053 seconds > > 1 example, 0 failures > > The only problem now is that 2.07 seconds is somewhat larger than > 0.053... I am using the debug build of ir though, as that's what > rake:compile seems to give me. > > Just playing with VS now to see if I can build a release version and > try that > > Ben Hall wrote: > Hi, > > To get rspec to work you will need to modify the actual Ironruby > source. I've raised bugs to get the changes required fixed, however I > did this based on 1.1.4, I think Cucumber will have a whole load more > bugs attached as it has more dependencies. > > I know for a fact you won't be able to run Cucumber unmodified due to > existing bugs around gems. (for example, gem needing .rb at the end > of the file to be able to find it) > > However, I haven't had chance to take a closer look. > > Ben > > > > On Fri, Oct 17, 2008 at 2:53 PM, Curt Hagenlocher > wrote: > > If you explicitly set the GEM_PATH before requiring gems, you should > be able to use gems that are already present. I haven't tried any > other gem operations. > > I assume you're running with the latest source? > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org > ] On Behalf Of Pat Gannon > Sent: Friday, October 17, 2008 1:30 AM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] Cucumber / RSpec Story Runner > > Has anyone tried to get Cucumber (or it's predecessor: the RSpec story > runner) to work with IronRuby? I have not had any luck thus far (I am > extremely new to Ruby), and I would really like to be able to use > Cucumber to write executable feature documentation for my .NET code. > > http://github.com/aslakhellesoy/cucumber/wikis > > I copied it under the "lib" directory, as well as several of its > dependencies, but when I try to do "require > 'cucumber-0.1.7/lib/cucumber'", ir (interactive ruby) fails with a > stack > overflow. The same thing happens when I try to require some its > dependencies manually (eg. "require 'hoe-1.8.0/lib/hoe'" and "require > 'rake-0.8.3/lib/rake'"), but some work just fine (eg. "require > 'polyglot-0.2.3/lib/polyglot'" and "require > 'treetop-1.2.4/lib/treetop'"). > > I also tried to get gem working to aide me in this process, but I had > problems with that too. Has anyone got gem working with IronRuby? > > Thanks in advance! > Pat Gannon > -- > 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 > > > -- > Orion Edwards > Web Application Developer > > T: +64 7 859 2120 > F: +64 7 859 2320 > E: orion.edwards at open2view.com > > Open2view.com > The Real Estate Website > > > > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > > -- > Orion Edwards > Web Application Developer > > T: +64 7 859 2120 > F: +64 7 859 2320 > E: orion.edwards at open2view.com > > Open2view.com > The Real Estate Website > > > _______________________________________________ > 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 Oct 22 02:10:06 2008 From: jdeville at microsoft.com (Jim Deville) Date: Tue, 21 Oct 2008 23:10:06 -0700 Subject: [Ironruby-core] Cucumber / RSpec Story Runner In-Reply-To: References: <9319fe7416065945f7de725dce3272fe@ruby-forum.com> <48FE8A0B.9000502@open2view.com> <48FE91DF.7010803@open2view.com> <372109E149E8084D8E6C7D9CFD82E063334B4E79B2@NA-EXMSG-C115.redmond.corp.microsoft.com>, Message-ID: Here's another test if you are using gems. It should work with ir test_spec.rb JD ________________________________________ From: ironruby-core-bounces at rubyforge.org [ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards [orion.edwards at open2view.com] Sent: Tuesday, October 21, 2008 11:07 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner Sure. Here's the entire contents of the ruby file $LOAD_PATH << 'c:/dev/rspec/lib' require 'spec' module ActiveSupport; end # workaround ironruby defined? bug class Vehicle def initialize(people) @people = people end attr_accessor :people end describe Vehicle do it "should assign people using the constructor" do car = Vehicle.new(['orion', 'john', 'jim']) car.should have(3).people end end Note I'm not using gems or anything else like that. To replicate this you'd basically do this: svn checkout ironruby 168 into c:\dev\ironruby rake compile git clone rspec straight from github, and stick it in c:\dev\rspec edit c:\dev\rspec\lib\spec\extensions\main.rb and fix the call to File.expand_path spin up a command prompt and set PATH=blahblah so it can see the ironruby binaries that got build previously ir rspectest.rb On 22/10/2008, at 6:40 PM, John Lam (IRONRUBY) wrote: Orion ? can you supply us with your rspectest.rb file? I was just hacking around with rspec 1.1.9 here, and it?s blowing up with a bunch of dependencies on startup. Thanks, -John From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards Sent: Tuesday, October 21, 2008 7:37 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner The nested defined? bug is logged here: http://rubyforge.org/tracker/index.php?func=detail&aid=22503&group_id=4359&atid=16798 The 'caller' one is actually 2 bugs, both of which have been logged by ben hall already http://rubyforge.org/tracker/?group_id=4359&atid=16798&func=detail&aid=22315 http://rubyforge.org/tracker/?group_id=4359&atid=16798&func=detail&aid=22348 For those interested in running rspec right now, a better fix is to replace line 26 of main.rb with args.last[:spec_path] = File.expand_path( caller(0)[1].split(':').first ) This will only cause rspec to lose the line number - you also have to run ir with the -D flag, or it doesn't include the path at all. As far as my quick-hack investigation shows me, rspec only uses this data for showing friendly error messages, rather than any core logic, so perhaps it's not super-critical. It would be nice to run it unpatched tho, IronRuby is looking incredibly close to doing that :-) Jim Deville wrote: I?ll add a rake task to compile release. Can you try to isolate those cases and file bugs? The second one is pretty easy, but I?d like to have tracking on both of them. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards Sent: Tuesday, October 21, 2008 7:04 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner I just ran rspec 1.1.9 (straight from github) on IronRuby build 167, and it appears to work (I only have a simple test, but hey). I only had to make 2 changes: rspec\lib\spec\extensions\main.rb:26 is args.last[:spec_path] = File.expand_path(caller(0)[1]) IronRuby still doesn't seem to handle caller quite the same as MRI. I have no idea what that code is for, but I replaced it with this as a quick hack args.last[:spec_path] = "." and it seemed to work. I encountered another problem using the 'have' matcher - rspec does this if inflector = (defined?(ActiveSupport::Inflector) ? ActiveSupport::Inflector : (defined?(Inflector) ? Inflector : nil)) IronRuby throws uninitialized constant Object::ActiveSupport, whereas MRI just returns nil - it looks like IR isn't handling defined? on nested things properly yet. To work around this I just put module ActiveSupport; end at the top of my ruby file to get around the nested module issue. And presto! C:\development\irtest>ir rspectest.rb . Finished in 2.072133 seconds 1 example, 0 failures C:\development\irtest>ruby rspectest.rb . Finished in 0.053 seconds 1 example, 0 failures The only problem now is that 2.07 seconds is somewhat larger than 0.053... I am using the debug build of ir though, as that's what rake:compile seems to give me. Just playing with VS now to see if I can build a release version and try that Ben Hall wrote: Hi, To get rspec to work you will need to modify the actual Ironruby source. I've raised bugs to get the changes required fixed, however I did this based on 1.1.4, I think Cucumber will have a whole load more bugs attached as it has more dependencies. I know for a fact you won't be able to run Cucumber unmodified due to existing bugs around gems. (for example, gem needing .rb at the end of the file to be able to find it) However, I haven't had chance to take a closer look. Ben On Fri, Oct 17, 2008 at 2:53 PM, Curt Hagenlocher wrote: If you explicitly set the GEM_PATH before requiring gems, you should be able to use gems that are already present. I haven't tried any other gem operations. I assume you're running with the latest source? -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Pat Gannon Sent: Friday, October 17, 2008 1:30 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Cucumber / RSpec Story Runner Has anyone tried to get Cucumber (or it's predecessor: the RSpec story runner) to work with IronRuby? I have not had any luck thus far (I am extremely new to Ruby), and I would really like to be able to use Cucumber to write executable feature documentation for my .NET code. http://github.com/aslakhellesoy/cucumber/wikis I copied it under the "lib" directory, as well as several of its dependencies, but when I try to do "require 'cucumber-0.1.7/lib/cucumber'", ir (interactive ruby) fails with a stack overflow. The same thing happens when I try to require some its dependencies manually (eg. "require 'hoe-1.8.0/lib/hoe'" and "require 'rake-0.8.3/lib/rake'"), but some work just fine (eg. "require 'polyglot-0.2.3/lib/polyglot'" and "require 'treetop-1.2.4/lib/treetop'"). I also tried to get gem working to aide me in this process, but I had problems with that too. Has anyone got gem working with IronRuby? Thanks in advance! Pat Gannon -- 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 -- Orion Edwards Web Application Developer T: +64 7 859 2120 F: +64 7 859 2320 E: orion.edwards at open2view.com Open2view.com The Real Estate Website ________________________________ _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -- Orion Edwards Web Application Developer T: +64 7 859 2120 F: +64 7 859 2320 E: orion.edwards at open2view.com Open2view.com The Real Estate Website _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- A non-text attachment was scrubbed... Name: test_spec.rb Type: text/x-ruby-script Size: 106 bytes Desc: test_spec.rb URL: From jdeville at microsoft.com Wed Oct 22 02:15:33 2008 From: jdeville at microsoft.com (Jim Deville) Date: Tue, 21 Oct 2008 23:15:33 -0700 Subject: [Ironruby-core] Cucumber / RSpec Story Runner In-Reply-To: References: <9319fe7416065945f7de725dce3272fe@ruby-forum.com> <48FE8A0B.9000502@open2view.com> <48FE91DF.7010803@open2view.com> <372109E149E8084D8E6C7D9CFD82E063334B4E79B2@NA-EXMSG-C115.redmond.corp.microsoft.com>, , Message-ID: John, for the record, you have to add github as a source for spicycode-rcov (gem sources -a http://gems.github.com). JD ________________________________________ From: ironruby-core-bounces at rubyforge.org [ironruby-core-bounces at rubyforge.org] On Behalf Of Jim Deville [jdeville at microsoft.com] Sent: Tuesday, October 21, 2008 11:10 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner Here's another test if you are using gems. It should work with ir test_spec.rb JD ________________________________________ From: ironruby-core-bounces at rubyforge.org [ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards [orion.edwards at open2view.com] Sent: Tuesday, October 21, 2008 11:07 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner Sure. Here's the entire contents of the ruby file $LOAD_PATH << 'c:/dev/rspec/lib' require 'spec' module ActiveSupport; end # workaround ironruby defined? bug class Vehicle def initialize(people) @people = people end attr_accessor :people end describe Vehicle do it "should assign people using the constructor" do car = Vehicle.new(['orion', 'john', 'jim']) car.should have(3).people end end Note I'm not using gems or anything else like that. To replicate this you'd basically do this: svn checkout ironruby 168 into c:\dev\ironruby rake compile git clone rspec straight from github, and stick it in c:\dev\rspec edit c:\dev\rspec\lib\spec\extensions\main.rb and fix the call to File.expand_path spin up a command prompt and set PATH=blahblah so it can see the ironruby binaries that got build previously ir rspectest.rb On 22/10/2008, at 6:40 PM, John Lam (IRONRUBY) wrote: Orion ? can you supply us with your rspectest.rb file? I was just hacking around with rspec 1.1.9 here, and it?s blowing up with a bunch of dependencies on startup. Thanks, -John From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards Sent: Tuesday, October 21, 2008 7:37 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner The nested defined? bug is logged here: http://rubyforge.org/tracker/index.php?func=detail&aid=22503&group_id=4359&atid=16798 The 'caller' one is actually 2 bugs, both of which have been logged by ben hall already http://rubyforge.org/tracker/?group_id=4359&atid=16798&func=detail&aid=22315 http://rubyforge.org/tracker/?group_id=4359&atid=16798&func=detail&aid=22348 For those interested in running rspec right now, a better fix is to replace line 26 of main.rb with args.last[:spec_path] = File.expand_path( caller(0)[1].split(':').first ) This will only cause rspec to lose the line number - you also have to run ir with the -D flag, or it doesn't include the path at all. As far as my quick-hack investigation shows me, rspec only uses this data for showing friendly error messages, rather than any core logic, so perhaps it's not super-critical. It would be nice to run it unpatched tho, IronRuby is looking incredibly close to doing that :-) Jim Deville wrote: I?ll add a rake task to compile release. Can you try to isolate those cases and file bugs? The second one is pretty easy, but I?d like to have tracking on both of them. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards Sent: Tuesday, October 21, 2008 7:04 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner I just ran rspec 1.1.9 (straight from github) on IronRuby build 167, and it appears to work (I only have a simple test, but hey). I only had to make 2 changes: rspec\lib\spec\extensions\main.rb:26 is args.last[:spec_path] = File.expand_path(caller(0)[1]) IronRuby still doesn't seem to handle caller quite the same as MRI. I have no idea what that code is for, but I replaced it with this as a quick hack args.last[:spec_path] = "." and it seemed to work. I encountered another problem using the 'have' matcher - rspec does this if inflector = (defined?(ActiveSupport::Inflector) ? ActiveSupport::Inflector : (defined?(Inflector) ? Inflector : nil)) IronRuby throws uninitialized constant Object::ActiveSupport, whereas MRI just returns nil - it looks like IR isn't handling defined? on nested things properly yet. To work around this I just put module ActiveSupport; end at the top of my ruby file to get around the nested module issue. And presto! C:\development\irtest>ir rspectest.rb . Finished in 2.072133 seconds 1 example, 0 failures C:\development\irtest>ruby rspectest.rb . Finished in 0.053 seconds 1 example, 0 failures The only problem now is that 2.07 seconds is somewhat larger than 0.053... I am using the debug build of ir though, as that's what rake:compile seems to give me. Just playing with VS now to see if I can build a release version and try that Ben Hall wrote: Hi, To get rspec to work you will need to modify the actual Ironruby source. I've raised bugs to get the changes required fixed, however I did this based on 1.1.4, I think Cucumber will have a whole load more bugs attached as it has more dependencies. I know for a fact you won't be able to run Cucumber unmodified due to existing bugs around gems. (for example, gem needing .rb at the end of the file to be able to find it) However, I haven't had chance to take a closer look. Ben On Fri, Oct 17, 2008 at 2:53 PM, Curt Hagenlocher wrote: If you explicitly set the GEM_PATH before requiring gems, you should be able to use gems that are already present. I haven't tried any other gem operations. I assume you're running with the latest source? -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Pat Gannon Sent: Friday, October 17, 2008 1:30 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Cucumber / RSpec Story Runner Has anyone tried to get Cucumber (or it's predecessor: the RSpec story runner) to work with IronRuby? I have not had any luck thus far (I am extremely new to Ruby), and I would really like to be able to use Cucumber to write executable feature documentation for my .NET code. http://github.com/aslakhellesoy/cucumber/wikis I copied it under the "lib" directory, as well as several of its dependencies, but when I try to do "require 'cucumber-0.1.7/lib/cucumber'", ir (interactive ruby) fails with a stack overflow. The same thing happens when I try to require some its dependencies manually (eg. "require 'hoe-1.8.0/lib/hoe'" and "require 'rake-0.8.3/lib/rake'"), but some work just fine (eg. "require 'polyglot-0.2.3/lib/polyglot'" and "require 'treetop-1.2.4/lib/treetop'"). I also tried to get gem working to aide me in this process, but I had problems with that too. Has anyone got gem working with IronRuby? Thanks in advance! Pat Gannon -- 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 -- Orion Edwards Web Application Developer T: +64 7 859 2120 F: +64 7 859 2320 E: orion.edwards at open2view.com Open2view.com The Real Estate Website ________________________________ _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -- Orion Edwards Web Application Developer T: +64 7 859 2120 F: +64 7 859 2320 E: orion.edwards at open2view.com Open2view.com The Real Estate Website _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From jflam at microsoft.com Wed Oct 22 02:21:58 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Tue, 21 Oct 2008 23:21:58 -0700 Subject: [Ironruby-core] Cucumber / RSpec Story Runner In-Reply-To: References: <9319fe7416065945f7de725dce3272fe@ruby-forum.com> <48FE8A0B.9000502@open2view.com> <48FE91DF.7010803@open2view.com> <372109E149E8084D8E6C7D9CFD82E063334B4E79B2@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E063334B4E79BE@NA-EXMSG-C115.redmond.corp.microsoft.com> Great - I have it working now on my machine. I'm seeing 0.45s or so as the net time (excluding startup) for the tests if I run using the -X:Interpret flag. Can you try running with that flag enabled on your machine and let me know how quickly it runs? Thanks, -John From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards Sent: Tuesday, October 21, 2008 11:07 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner Sure. Here's the entire contents of the ruby file $LOAD_PATH << 'c:/dev/rspec/lib' require 'spec' module ActiveSupport; end # workaround ironruby defined? bug class Vehicle def initialize(people) @people = people end attr_accessor :people end describe Vehicle do it "should assign people using the constructor" do car = Vehicle.new(['orion', 'john', 'jim']) car.should have(3).people end end Note I'm not using gems or anything else like that. To replicate this you'd basically do this: svn checkout ironruby 168 into c:\dev\ironruby rake compile git clone rspec straight from github, and stick it in c:\dev\rspec edit c:\dev\rspec\lib\spec\extensions\main.rb and fix the call to File.expand_path spin up a command prompt and set PATH=blahblah so it can see the ironruby binaries that got build previously ir rspectest.rb On 22/10/2008, at 6:40 PM, John Lam (IRONRUBY) wrote: Orion - can you supply us with your rspectest.rb file? I was just hacking around with rspec 1.1.9 here, and it's blowing up with a bunch of dependencies on startup. Thanks, -John From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards Sent: Tuesday, October 21, 2008 7:37 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner The nested defined? bug is logged here: http://rubyforge.org/tracker/index.php?func=detail&aid=22503&group_id=4359&atid=16798 The 'caller' one is actually 2 bugs, both of which have been logged by ben hall already http://rubyforge.org/tracker/?group_id=4359&atid=16798&func=detail&aid=22315 http://rubyforge.org/tracker/?group_id=4359&atid=16798&func=detail&aid=22348 For those interested in running rspec right now, a better fix is to replace line 26 of main.rb with args.last[:spec_path] = File.expand_path( caller(0)[1].split(':').first ) This will only cause rspec to lose the line number - you also have to run ir with the -D flag, or it doesn't include the path at all. As far as my quick-hack investigation shows me, rspec only uses this data for showing friendly error messages, rather than any core logic, so perhaps it's not super-critical. It would be nice to run it unpatched tho, IronRuby is looking incredibly close to doing that :-) Jim Deville wrote: I'll add a rake task to compile release. Can you try to isolate those cases and file bugs? The second one is pretty easy, but I'd like to have tracking on both of them. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards Sent: Tuesday, October 21, 2008 7:04 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner I just ran rspec 1.1.9 (straight from github) on IronRuby build 167, and it appears to work (I only have a simple test, but hey). I only had to make 2 changes: rspec\lib\spec\extensions\main.rb:26 is args.last[:spec_path] = File.expand_path(caller(0)[1]) IronRuby still doesn't seem to handle caller quite the same as MRI. I have no idea what that code is for, but I replaced it with this as a quick hack args.last[:spec_path] = "." and it seemed to work. I encountered another problem using the 'have' matcher - rspec does this if inflector = (defined?(ActiveSupport::Inflector) ? ActiveSupport::Inflector : (defined?(Inflector) ? Inflector : nil)) IronRuby throws uninitialized constant Object::ActiveSupport, whereas MRI just returns nil - it looks like IR isn't handling defined? on nested things properly yet. To work around this I just put module ActiveSupport; end at the top of my ruby file to get around the nested module issue. And presto! C:\development\irtest>ir rspectest.rb . Finished in 2.072133 seconds 1 example, 0 failures C:\development\irtest>ruby rspectest.rb . Finished in 0.053 seconds 1 example, 0 failures The only problem now is that 2.07 seconds is somewhat larger than 0.053... I am using the debug build of ir though, as that's what rake:compile seems to give me. Just playing with VS now to see if I can build a release version and try that Ben Hall wrote: Hi, To get rspec to work you will need to modify the actual Ironruby source. I've raised bugs to get the changes required fixed, however I did this based on 1.1.4, I think Cucumber will have a whole load more bugs attached as it has more dependencies. I know for a fact you won't be able to run Cucumber unmodified due to existing bugs around gems. (for example, gem needing .rb at the end of the file to be able to find it) However, I haven't had chance to take a closer look. Ben On Fri, Oct 17, 2008 at 2:53 PM, Curt Hagenlocher wrote: If you explicitly set the GEM_PATH before requiring gems, you should be able to use gems that are already present. I haven't tried any other gem operations. I assume you're running with the latest source? -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Pat Gannon Sent: Friday, October 17, 2008 1:30 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Cucumber / RSpec Story Runner Has anyone tried to get Cucumber (or it's predecessor: the RSpec story runner) to work with IronRuby? I have not had any luck thus far (I am extremely new to Ruby), and I would really like to be able to use Cucumber to write executable feature documentation for my .NET code. http://github.com/aslakhellesoy/cucumber/wikis I copied it under the "lib" directory, as well as several of its dependencies, but when I try to do "require 'cucumber-0.1.7/lib/cucumber'", ir (interactive ruby) fails with a stack overflow. The same thing happens when I try to require some its dependencies manually (eg. "require 'hoe-1.8.0/lib/hoe'" and "require 'rake-0.8.3/lib/rake'"), but some work just fine (eg. "require 'polyglot-0.2.3/lib/polyglot'" and "require 'treetop-1.2.4/lib/treetop'"). I also tried to get gem working to aide me in this process, but I had problems with that too. Has anyone got gem working with IronRuby? Thanks in advance! Pat Gannon -- 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 -- Orion Edwards Web Application Developer T: +64 7 859 2120 F: +64 7 859 2320 E: orion.edwards at open2view.com Open2view.com The Real Estate Website ________________________________ _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -- Orion Edwards Web Application Developer T: +64 7 859 2120 F: +64 7 859 2320 E: orion.edwards at open2view.com Open2view.com The Real Estate Website _______________________________________________ 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 orion.edwards at open2view.com Wed Oct 22 02:37:35 2008 From: orion.edwards at open2view.com (Orion Edwards) Date: Wed, 22 Oct 2008 19:37:35 +1300 Subject: [Ironruby-core] Cucumber / RSpec Story Runner In-Reply-To: <372109E149E8084D8E6C7D9CFD82E063334B4E79BE@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <9319fe7416065945f7de725dce3272fe@ruby-forum.com> <48FE8A0B.9000502@open2view.com> <48FE91DF.7010803@open2view.com> <372109E149E8084D8E6C7D9CFD82E063334B4E79B2@NA-EXMSG-C115.redmond.corp.microsoft.com> <372109E149E8084D8E6C7D9CFD82E063334B4E79BE@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: I'm not on the same machine as earlier - the previous machine was my work desktop PC running vista This one is running windows XP under vmware on a macbook Running with -X:Interpret I see 0.78 seconds on repeated runs (0.79 on the first) Without it I see 1.95 seconds (2.05 on the first run) I didn't know about -X:Interpret... So what exactly does it do differently, and if it's so much faster, why isn't it the default? On 22/10/2008, at 7:21 PM, John Lam (IRONRUBY) wrote: > Great ? I have it working now on my machine. > > I?m seeing 0.45s or so as the net time (excluding startup) for the > tests if I run using the ?X:Interpret flag. Can you try running with > that flag enabled on your machine and let me know how quickly it runs? > > Thanks, > -John > > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org > ] On Behalf Of Orion Edwards > Sent: Tuesday, October 21, 2008 11:07 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner > > Sure. Here's the entire contents of the ruby file > > $LOAD_PATH << 'c:/dev/rspec/lib' > > require 'spec' > > module ActiveSupport; end # workaround ironruby defined? bug > > class Vehicle > def initialize(people) > @people = people > end > attr_accessor :people > end > > describe Vehicle do > it "should assign people using the constructor" do > car = Vehicle.new(['orion', 'john', 'jim']) > car.should have(3).people > end > end > > Note I'm not using gems or anything else like that. To replicate > this you'd basically do this: > > svn checkout ironruby 168 into c:\dev\ironruby > > rake compile > > git clone rspec straight from github, and stick it in c:\dev\rspec > > edit c:\dev\rspec\lib\spec\extensions\main.rb and fix the call to > File.expand_path > > spin up a command prompt and set PATH=blahblah so it can see the > ironruby binaries that got build previously > > ir rspectest.rb > > > > On 22/10/2008, at 6:40 PM, John Lam (IRONRUBY) wrote: > > > Orion ? can you supply us with your rspectest.rb file? > > I was just hacking around with rspec 1.1.9 here, and it?s blowing up > with a bunch of dependencies on startup. > > Thanks, > -John > > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org > ] On Behalf Of Orion Edwards > Sent: Tuesday, October 21, 2008 7:37 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner > > The nested defined? bug is logged here: > > http://rubyforge.org/tracker/index.php?func=detail&aid=22503&group_id=4359&atid=16798 > > The 'caller' one is actually 2 bugs, both of which have been logged > by ben hall already > > http://rubyforge.org/tracker/?group_id=4359&atid=16798&func=detail&aid=22315 > http://rubyforge.org/tracker/?group_id=4359&atid=16798&func=detail&aid=22348 > > For those interested in running rspec right now, a better fix is to > replace line 26 of main.rb with > args.last[:spec_path] = File.expand_path( caller(0) > [1].split(':').first ) > > This will only cause rspec to lose the line number - you also have > to run ir with the -D flag, or it doesn't include the path at all. > > As far as my quick-hack investigation shows me, rspec only uses this > data for showing friendly error messages, rather than any core > logic, so perhaps it's not super-critical. > It would be nice to run it unpatched tho, IronRuby is looking > incredibly close to doing that :-) > > > Jim Deville wrote: > I?ll add a rake task to compile release. Can you try to isolate > those cases and file bugs? The second one is pretty easy, but I?d > like to have tracking on both of them. > > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org > ] On Behalf Of Orion Edwards > Sent: Tuesday, October 21, 2008 7:04 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner > > I just ran rspec 1.1.9 (straight from github) on IronRuby build 167, > and it appears to work (I only have a simple test, but hey). > > I only had to make 2 changes: > > rspec\lib\spec\extensions\main.rb:26 is > args.last[:spec_path] = File.expand_path(caller(0)[1]) > IronRuby still doesn't seem to handle caller quite the same as MRI. > I have no idea what that code is for, but I replaced it with this as > a quick hack > args.last[:spec_path] = "." > and it seemed to work. > > I encountered another problem using the 'have' matcher - rspec does > this > if inflector = (defined?(ActiveSupport::Inflector) ? > ActiveSupport::Inflector : (defined?(Inflector) ? Inflector : nil)) > IronRuby throws uninitialized constant Object::ActiveSupport, > whereas MRI just returns nil - it looks like IR isn't handling > defined? on nested things properly yet. > > To work around this I just put > module ActiveSupport; end > at the top of my ruby file to get around the nested module issue. > > And presto! > C:\development\irtest>ir rspectest.rb > . > > Finished in 2.072133 seconds > > 1 example, 0 failures > > C:\development\irtest>ruby rspectest.rb > . > > Finished in 0.053 seconds > > 1 example, 0 failures > > The only problem now is that 2.07 seconds is somewhat larger than > 0.053... I am using the debug build of ir though, as that's what > rake:compile seems to give me. > > Just playing with VS now to see if I can build a release version and > try that > > Ben Hall wrote: > Hi, > > To get rspec to work you will need to modify the actual Ironruby > source. I've raised bugs to get the changes required fixed, however I > did this based on 1.1.4, I think Cucumber will have a whole load more > bugs attached as it has more dependencies. > > I know for a fact you won't be able to run Cucumber unmodified due to > existing bugs around gems. (for example, gem needing .rb at the end > of the file to be able to find it) > > However, I haven't had chance to take a closer look. > > Ben > > > > On Fri, Oct 17, 2008 at 2:53 PM, Curt Hagenlocher > wrote: > > If you explicitly set the GEM_PATH before requiring gems, you should > be able to use gems that are already present. I haven't tried any > other gem operations. > > I assume you're running with the latest source? > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org > ] On Behalf Of Pat Gannon > Sent: Friday, October 17, 2008 1:30 AM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] Cucumber / RSpec Story Runner > > Has anyone tried to get Cucumber (or it's predecessor: the RSpec story > runner) to work with IronRuby? I have not had any luck thus far (I am > extremely new to Ruby), and I would really like to be able to use > Cucumber to write executable feature documentation for my .NET code. > > http://github.com/aslakhellesoy/cucumber/wikis > > I copied it under the "lib" directory, as well as several of its > dependencies, but when I try to do "require > 'cucumber-0.1.7/lib/cucumber'", ir (interactive ruby) fails with a > stack > overflow. The same thing happens when I try to require some its > dependencies manually (eg. "require 'hoe-1.8.0/lib/hoe'" and "require > 'rake-0.8.3/lib/rake'"), but some work just fine (eg. "require > 'polyglot-0.2.3/lib/polyglot'" and "require > 'treetop-1.2.4/lib/treetop'"). > > I also tried to get gem working to aide me in this process, but I had > problems with that too. Has anyone got gem working with IronRuby? > > Thanks in advance! > Pat Gannon > -- > 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 > > > -- > Orion Edwards > Web Application Developer > > T: +64 7 859 2120 > F: +64 7 859 2320 > E: orion.edwards at open2view.com > > Open2view.com > The Real Estate Website > > > > > > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > > -- > Orion Edwards > Web Application Developer > > T: +64 7 859 2120 > F: +64 7 859 2320 > E: orion.edwards at open2view.com > > Open2view.com > The Real Estate Website > > > _______________________________________________ > 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 jflam at microsoft.com Wed Oct 22 03:01:08 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Wed, 22 Oct 2008 00:01:08 -0700 Subject: [Ironruby-core] Cucumber / RSpec Story Runner In-Reply-To: References: <9319fe7416065945f7de725dce3272fe@ruby-forum.com> <48FE8A0B.9000502@open2view.com> <48FE91DF.7010803@open2view.com> <372109E149E8084D8E6C7D9CFD82E063334B4E79B2@NA-EXMSG-C115.redmond.corp.microsoft.com> <372109E149E8084D8E6C7D9CFD82E063334B4E79BE@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E063334B4E79C0@NA-EXMSG-C115.redmond.corp.microsoft.com> -X:Interpret forces execution to always go through the DLR interpreter rather than through the DLR compilation engine. This trades-off faster startup for decreased throughput. We have a number of different strategies that we're exploring to improve things: 1) Ahead of time cached pre-compilation to native x86 via ngen 2) Mixed mode DLR interpreter and DLR compiler. We'll start off interpreting and compile the 'hot' code paths dynamically at runtime. 3) Mixed mode Ruby interpreter and DLR compiler. We can improve perf even more by writing a Ruby specific interpreter and avoiding the tree transform from the Ruby AST to DLR trees for the interpreted code paths. We really haven't done any performance tuning of note on IronRuby so far. We're focusing on getting the language correct; performance will come after we stabilize the language. Thanks, -John > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Orion Edwards > Sent: Tuesday, October 21, 2008 11:38 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner > > I'm not on the same machine as earlier - the previous machine was my > work desktop PC running vista > > This one is running windows XP under vmware on a macbook > > Running with -X:Interpret I see 0.78 seconds on repeated runs (0.79 on > the first) Without it I see 1.95 seconds (2.05 on the first run) > > I didn't know about -X:Interpret... > So what exactly does it do differently, and if it's so much faster, > why isn't it the default? > > > > On 22/10/2008, at 7:21 PM, John Lam (IRONRUBY) wrote: > > > > Great - I have it working now on my machine. > > I'm seeing 0.45s or so as the net time (excluding startup) for the > tests if I run using the -X:Interpret flag. Can you try running with > that flag enabled on your machine and let me know how quickly it runs? > > Thanks, > -John > > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards > Sent: Tuesday, October 21, 2008 11:07 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner > > Sure. Here's the entire contents of the ruby file > > $LOAD_PATH << 'c:/dev/rspec/lib' > > require 'spec' > > module ActiveSupport; end # workaround ironruby defined? bug > > class Vehicle > def initialize(people) > @people = people > end > attr_accessor :people > end > > describe Vehicle do > it "should assign people using the constructor" do > car = Vehicle.new(['orion', 'john', 'jim']) > car.should have(3).people > end > end > > Note I'm not using gems or anything else like that. To replicate this > you'd basically do this: > > svn checkout ironruby 168 into c:\dev\ironruby > > rake compile > > git clone rspec straight from github, and stick it in c:\dev\rspec > > edit c:\dev\rspec\lib\spec\extensions\main.rb and fix the call to > File.expand_path > > spin up a command prompt and set PATH=blahblah so it can see the > ironruby binaries that got build previously > > ir rspectest.rb > > > > On 22/10/2008, at 6:40 PM, John Lam (IRONRUBY) wrote: > > > Orion - can you supply us with your rspectest.rb file? > > I was just hacking around with rspec 1.1.9 here, and it's blowing up > with a bunch of dependencies on startup. > > Thanks, > -John > > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards > Sent: Tuesday, October 21, 2008 7:37 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner > > The nested defined? bug is logged here: > > > http://rubyforge.org/tracker/index.php?func=detail&aid=22503&group_id= > 4 > 3 > 59&atid=16798 > > The 'caller' one is actually 2 bugs, both of which have been logged > by ben hall already > > > http://rubyforge.org/tracker/?group_id=4359&atid=16798&func=detail&aid > = > 2 > 2315 > > http://rubyforge.org/tracker/?group_id=4359&atid=16798&func=detail&aid > = > 2 > 2348 > > For those interested in running rspec right now, a better fix is to > replace line 26 of main.rb with > args.last[:spec_path] = File.expand_path( > caller(0)[1].split(':').first ) > > This will only cause rspec to lose the line number - you also have to > run ir with the -D flag, or it doesn't include the path at all. > > As far as my quick-hack investigation shows me, rspec only uses this > data for showing friendly error messages, rather than any core logic, > so perhaps it's not super-critical. > It would be nice to run it unpatched tho, IronRuby is looking > incredibly close to doing that :-) > > > Jim Deville wrote: > I'll add a rake task to compile release. Can you try to isolate those > cases and file bugs? The second one is pretty easy, but I'd like to > have tracking on both of them. > > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards > Sent: Tuesday, October 21, 2008 7:04 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner > > I just ran rspec 1.1.9 (straight from github) on IronRuby build 167, > and it appears to work (I only have a simple test, but hey). > > I only had to make 2 changes: > > rspec\lib\spec\extensions\main.rb:26 is > args.last[:spec_path] = File.expand_path(caller(0)[1]) > IronRuby still doesn't seem to handle caller quite the same as MRI. I > have no idea what that code is for, but I replaced it with this as a > quick hack > args.last[:spec_path] = "." > > and it seemed to work. > > I encountered another problem using the 'have' matcher - rspec does > this > if inflector = (defined?(ActiveSupport::Inflector) ? > ActiveSupport::Inflector : (defined?(Inflector) ? Inflector : nil)) > IronRuby throws uninitialized constant Object::ActiveSupport, whereas > MRI just returns nil - it looks like IR isn't handling defined? > on nested things properly yet. > > To work around this I just put > module ActiveSupport; end > at the top of my ruby file to get around the nested module issue. > > And presto! > C:\development\irtest>ir rspectest.rb > . > > Finished in 2.072133 seconds > > 1 example, 0 failures > > C:\development\irtest>ruby rspectest.rb > . > > Finished in 0.053 seconds > > 1 example, 0 failures > > The only problem now is that 2.07 seconds is somewhat larger than > 0.053... I am using the debug build of ir though, as that's what > rake:compile seems to give me. > > Just playing with VS now to see if I can build a release version and > try that > > Ben Hall wrote: > Hi, > > To get rspec to work you will need to modify the actual Ironruby > source. I've raised bugs to get the changes required fixed, however > I > did this based on 1.1.4, I think Cucumber will have a whole load more > bugs attached as it has more dependencies. > > I know for a fact you won't be able to run Cucumber unmodified due to > existing bugs around gems. (for example, gem needing .rb at the end > of the file to be able to find it) > > However, I haven't had chance to take a closer look. > > Ben > > > > On Fri, Oct 17, 2008 at 2:53 PM, Curt Hagenlocher > wrote: > > > If you explicitly set the GEM_PATH before requiring gems, you should > be able to use gems that are already present. I haven't tried any > other gem operations. > > I assume you're running with the latest source? > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Pat Gannon > Sent: Friday, October 17, 2008 1:30 AM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] Cucumber / RSpec Story Runner > > Has anyone tried to get Cucumber (or it's predecessor: > the RSpec story > runner) to work with IronRuby? I have not had any luck thus far (I > am > extremely new to Ruby), and I would really like to be able to use > Cucumber to write executable feature documentation for my .NET code. > > http://github.com/aslakhellesoy/cucumber/wikis > > I copied it under the "lib" directory, as well as several of its > dependencies, but when I try to do "require > 'cucumber-0.1.7/lib/cucumber'", ir (interactive ruby) fails with a > stack > overflow. The same thing happens when I try to require some its > dependencies manually (eg. "require 'hoe-1.8.0/lib/hoe'" > and "require > 'rake-0.8.3/lib/rake'"), but some work just fine (eg. > "require > 'polyglot-0.2.3/lib/polyglot'" and "require > 'treetop-1.2.4/lib/treetop'"). > > I also tried to get gem working to aide me in this process, but I > had > problems with that too. Has anyone got gem working with IronRuby? > > Thanks in advance! > Pat Gannon > -- > 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 > > > -- > Orion Edwards > Web Application Developer > > T: +64 7 859 2120 > F: +64 7 859 2320 > E: orion.edwards at open2view.com > > > Open2view.com > The Real Estate Website > > > > > ________________________________ > > > > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > > -- > Orion Edwards > Web Application Developer > > T: +64 7 859 2120 > F: +64 7 859 2320 > E: orion.edwards at open2view.com > > > Open2view.com > The Real Estate Website > > > _______________________________________________ > 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 ben2004uk at googlemail.com Wed Oct 22 03:56:58 2008 From: ben2004uk at googlemail.com (Ben Hall) Date: Wed, 22 Oct 2008 08:56:58 +0100 Subject: [Ironruby-core] Cucumber / RSpec Story Runner In-Reply-To: <372109E149E8084D8E6C7D9CFD82E063334B4E79C0@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <9319fe7416065945f7de725dce3272fe@ruby-forum.com> <48FE8A0B.9000502@open2view.com> <48FE91DF.7010803@open2view.com> <372109E149E8084D8E6C7D9CFD82E063334B4E79B2@NA-EXMSG-C115.redmond.corp.microsoft.com> <372109E149E8084D8E6C7D9CFD82E063334B4E79BE@NA-EXMSG-C115.redmond.corp.microsoft.com> <372109E149E8084D8E6C7D9CFD82E063334B4E79C0@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: Nice work guys!! Pleased that I won't be having to use a hacked version of r156 :) One of the problems you mentioned (pretty errors due to backtrace) will cause the story runner in 1.1.4 to blow up and throw an exception, but as that is now Cucumber I don't know if we will have the same issues. Have you tried Cucumber yet? Ben On Wed, Oct 22, 2008 at 8:01 AM, John Lam (IRONRUBY) wrote: > -X:Interpret forces execution to always go through the DLR interpreter rather than through the DLR compilation engine. > > This trades-off faster startup for decreased throughput. > > We have a number of different strategies that we're exploring to improve things: > > 1) Ahead of time cached pre-compilation to native x86 via ngen > 2) Mixed mode DLR interpreter and DLR compiler. We'll start off interpreting and compile the 'hot' code paths dynamically at runtime. > 3) Mixed mode Ruby interpreter and DLR compiler. We can improve perf even more by writing a Ruby specific interpreter and avoiding the tree transform from the Ruby AST to DLR trees for the interpreted code paths. > > We really haven't done any performance tuning of note on IronRuby so far. We're focusing on getting the language correct; performance will come after we stabilize the language. > > > Thanks, > -John > > >> -----Original Message----- >> From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- >> bounces at rubyforge.org] On Behalf Of Orion Edwards >> Sent: Tuesday, October 21, 2008 11:38 PM >> To: ironruby-core at rubyforge.org >> Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner >> >> I'm not on the same machine as earlier - the previous machine was my >> work desktop PC running vista >> >> This one is running windows XP under vmware on a macbook >> >> Running with -X:Interpret I see 0.78 seconds on repeated runs (0.79 on >> the first) Without it I see 1.95 seconds (2.05 on the first run) >> >> I didn't know about -X:Interpret... >> So what exactly does it do differently, and if it's so much faster, >> why isn't it the default? >> >> >> >> On 22/10/2008, at 7:21 PM, John Lam (IRONRUBY) wrote: >> >> >> >> Great - I have it working now on my machine. >> >> I'm seeing 0.45s or so as the net time (excluding startup) for the >> tests if I run using the -X:Interpret flag. Can you try running with >> that flag enabled on your machine and let me know how quickly it runs? >> >> Thanks, >> -John >> >> From: ironruby-core-bounces at rubyforge.org >> [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards >> Sent: Tuesday, October 21, 2008 11:07 PM >> To: ironruby-core at rubyforge.org >> Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner >> >> Sure. Here's the entire contents of the ruby file >> >> $LOAD_PATH << 'c:/dev/rspec/lib' >> >> require 'spec' >> >> module ActiveSupport; end # workaround ironruby defined? bug >> >> class Vehicle >> def initialize(people) >> @people = people >> end >> attr_accessor :people >> end >> >> describe Vehicle do >> it "should assign people using the constructor" do >> car = Vehicle.new(['orion', 'john', 'jim']) >> car.should have(3).people >> end >> end >> >> Note I'm not using gems or anything else like that. To replicate this >> you'd basically do this: >> >> svn checkout ironruby 168 into c:\dev\ironruby >> >> rake compile >> >> git clone rspec straight from github, and stick it in c:\dev\rspec >> >> edit c:\dev\rspec\lib\spec\extensions\main.rb and fix the call to >> File.expand_path >> >> spin up a command prompt and set PATH=blahblah so it can see the >> ironruby binaries that got build previously >> >> ir rspectest.rb >> >> >> >> On 22/10/2008, at 6:40 PM, John Lam (IRONRUBY) wrote: >> >> >> Orion - can you supply us with your rspectest.rb file? >> >> I was just hacking around with rspec 1.1.9 here, and it's blowing up >> with a bunch of dependencies on startup. >> >> Thanks, >> -John >> >> From: ironruby-core-bounces at rubyforge.org >> [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards >> Sent: Tuesday, October 21, 2008 7:37 PM >> To: ironruby-core at rubyforge.org >> Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner >> >> The nested defined? bug is logged here: >> >> >> http://rubyforge.org/tracker/index.php?func=detail&aid=22503&group_id= >> 4 >> 3 >> 59&atid=16798 >> >> The 'caller' one is actually 2 bugs, both of which have been logged >> by ben hall already >> >> >> http://rubyforge.org/tracker/?group_id=4359&atid=16798&func=detail&aid >> = >> 2 >> 2315 >> >> http://rubyforge.org/tracker/?group_id=4359&atid=16798&func=detail&aid >> = >> 2 >> 2348 >> >> For those interested in running rspec right now, a better fix is to >> replace line 26 of main.rb with >> args.last[:spec_path] = File.expand_path( >> caller(0)[1].split(':').first ) >> >> This will only cause rspec to lose the line number - you also have to >> run ir with the -D flag, or it doesn't include the path at all. >> >> As far as my quick-hack investigation shows me, rspec only uses this >> data for showing friendly error messages, rather than any core logic, >> so perhaps it's not super-critical. >> It would be nice to run it unpatched tho, IronRuby is looking >> incredibly close to doing that :-) >> >> >> Jim Deville wrote: >> I'll add a rake task to compile release. Can you try to isolate those >> cases and file bugs? The second one is pretty easy, but I'd like to >> have tracking on both of them. >> >> From: ironruby-core-bounces at rubyforge.org >> [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards >> Sent: Tuesday, October 21, 2008 7:04 PM >> To: ironruby-core at rubyforge.org >> Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner >> >> I just ran rspec 1.1.9 (straight from github) on IronRuby build 167, >> and it appears to work (I only have a simple test, but hey). >> >> I only had to make 2 changes: >> >> rspec\lib\spec\extensions\main.rb:26 is >> args.last[:spec_path] = File.expand_path(caller(0)[1]) >> IronRuby still doesn't seem to handle caller quite the same as MRI. I >> have no idea what that code is for, but I replaced it with this as a >> quick hack >> args.last[:spec_path] = "." >> >> and it seemed to work. >> >> I encountered another problem using the 'have' matcher - rspec does >> this >> if inflector = (defined?(ActiveSupport::Inflector) ? >> ActiveSupport::Inflector : (defined?(Inflector) ? Inflector : nil)) >> IronRuby throws uninitialized constant Object::ActiveSupport, whereas >> MRI just returns nil - it looks like IR isn't handling defined? >> on nested things properly yet. >> >> To work around this I just put >> module ActiveSupport; end >> at the top of my ruby file to get around the nested module issue. >> >> And presto! >> C:\development\irtest>ir rspectest.rb >> . >> >> Finished in 2.072133 seconds >> >> 1 example, 0 failures >> >> C:\development\irtest>ruby rspectest.rb >> . >> >> Finished in 0.053 seconds >> >> 1 example, 0 failures >> >> The only problem now is that 2.07 seconds is somewhat larger than >> 0.053... I am using the debug build of ir though, as that's what >> rake:compile seems to give me. >> >> Just playing with VS now to see if I can build a release version and >> try that >> >> Ben Hall wrote: >> Hi, >> >> To get rspec to work you will need to modify the actual Ironruby >> source. I've raised bugs to get the changes required fixed, however >> I >> did this based on 1.1.4, I think Cucumber will have a whole load more >> bugs attached as it has more dependencies. >> >> I know for a fact you won't be able to run Cucumber unmodified due to >> existing bugs around gems. (for example, gem needing .rb at the end >> of the file to be able to find it) >> >> However, I haven't had chance to take a closer look. >> >> Ben >> >> >> >> On Fri, Oct 17, 2008 at 2:53 PM, Curt Hagenlocher >> wrote: >> >> >> If you explicitly set the GEM_PATH before requiring gems, you should >> be able to use gems that are already present. I haven't tried any >> other gem operations. >> >> I assume you're running with the latest source? >> >> -----Original Message----- >> From: ironruby-core-bounces at rubyforge.org >> [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Pat Gannon >> Sent: Friday, October 17, 2008 1:30 AM >> To: ironruby-core at rubyforge.org >> Subject: [Ironruby-core] Cucumber / RSpec Story Runner >> >> Has anyone tried to get Cucumber (or it's predecessor: >> the RSpec story >> runner) to work with IronRuby? I have not had any luck thus far (I >> am >> extremely new to Ruby), and I would really like to be able to use >> Cucumber to write executable feature documentation for my .NET code. >> >> http://github.com/aslakhellesoy/cucumber/wikis >> >> I copied it under the "lib" directory, as well as several of its >> dependencies, but when I try to do "require >> 'cucumber-0.1.7/lib/cucumber'", ir (interactive ruby) fails with a >> stack >> overflow. The same thing happens when I try to require some its >> dependencies manually (eg. "require 'hoe-1.8.0/lib/hoe'" >> and "require >> 'rake-0.8.3/lib/rake'"), but some work just fine (eg. >> "require >> 'polyglot-0.2.3/lib/polyglot'" and "require >> 'treetop-1.2.4/lib/treetop'"). >> >> I also tried to get gem working to aide me in this process, but I >> had >> problems with that too. Has anyone got gem working with IronRuby? >> >> Thanks in advance! >> Pat Gannon >> -- >> 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 >> >> >> -- >> Orion Edwards >> Web Application Developer >> >> T: +64 7 859 2120 >> F: +64 7 859 2320 >> E: orion.edwards at open2view.com >> >> >> Open2view.com >> The Real Estate Website >> >> >> >> >> ________________________________ >> >> >> >> >> >> >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core >> >> >> -- >> Orion Edwards >> Web Application Developer >> >> T: +64 7 859 2120 >> F: +64 7 859 2320 >> E: orion.edwards at open2view.com >> >> >> Open2view.com >> The Real Estate Website >> >> >> _______________________________________________ >> 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 ivan at flanders.co.nz Wed Oct 22 04:08:05 2008 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Wed, 22 Oct 2008 10:08:05 +0200 Subject: [Ironruby-core] Cucumber / RSpec Story Runner In-Reply-To: References: <9319fe7416065945f7de725dce3272fe@ruby-forum.com> <48FE8A0B.9000502@open2view.com> <48FE91DF.7010803@open2view.com> <372109E149E8084D8E6C7D9CFD82E063334B4E79B2@NA-EXMSG-C115.redmond.corp.microsoft.com> <372109E149E8084D8E6C7D9CFD82E063334B4E79BE@NA-EXMSG-C115.redmond.corp.microsoft.com> <372109E149E8084D8E6C7D9CFD82E063334B4E79C0@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: I'll try cucumber tonight when i get home. I'm trying to build a little rails app with rspec etc. What's the status on a .NET based active record adapter? I've been thinking that it might be necessary to write an adapter that creates the correct .NET provider and dispatches the calls through that layer. Either as a part of ruby-dbd or as adapters to ActiveRecord.. dbd gives the advantage that you can use it everywhere then. any thoughts? --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero GSM: +32.486.787.582 Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim On Wed, Oct 22, 2008 at 9:56 AM, Ben Hall wrote: > Nice work guys!! Pleased that I won't be having to use a hacked > version of r156 :) > > One of the problems you mentioned (pretty errors due to backtrace) > will cause the story runner in 1.1.4 to blow up and throw an > exception, but as that is now Cucumber I don't know if we will have > the same issues. Have you tried Cucumber yet? > > > Ben > > > > > On Wed, Oct 22, 2008 at 8:01 AM, John Lam (IRONRUBY) > wrote: > > -X:Interpret forces execution to always go through the DLR interpreter > rather than through the DLR compilation engine. > > > > This trades-off faster startup for decreased throughput. > > > > We have a number of different strategies that we're exploring to improve > things: > > > > 1) Ahead of time cached pre-compilation to native x86 via ngen > > 2) Mixed mode DLR interpreter and DLR compiler. We'll start off > interpreting and compile the 'hot' code paths dynamically at runtime. > > 3) Mixed mode Ruby interpreter and DLR compiler. We can improve perf even > more by writing a Ruby specific interpreter and avoiding the tree transform > from the Ruby AST to DLR trees for the interpreted code paths. > > > > We really haven't done any performance tuning of note on IronRuby so far. > We're focusing on getting the language correct; performance will come after > we stabilize the language. > > > > > > Thanks, > > -John > > > > > >> -----Original Message----- > >> From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > >> bounces at rubyforge.org] On Behalf Of Orion Edwards > >> Sent: Tuesday, October 21, 2008 11:38 PM > >> To: ironruby-core at rubyforge.org > >> Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner > >> > >> I'm not on the same machine as earlier - the previous machine was my > >> work desktop PC running vista > >> > >> This one is running windows XP under vmware on a macbook > >> > >> Running with -X:Interpret I see 0.78 seconds on repeated runs (0.79 on > >> the first) Without it I see 1.95 seconds (2.05 on the first run) > >> > >> I didn't know about -X:Interpret... > >> So what exactly does it do differently, and if it's so much faster, > >> why isn't it the default? > >> > >> > >> > >> On 22/10/2008, at 7:21 PM, John Lam (IRONRUBY) wrote: > >> > >> > >> > >> Great - I have it working now on my machine. > >> > >> I'm seeing 0.45s or so as the net time (excluding startup) for the > >> tests if I run using the -X:Interpret flag. Can you try running with > >> that flag enabled on your machine and let me know how quickly it runs? > >> > >> Thanks, > >> -John > >> > >> From: ironruby-core-bounces at rubyforge.org > >> [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards > >> Sent: Tuesday, October 21, 2008 11:07 PM > >> To: ironruby-core at rubyforge.org > >> Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner > >> > >> Sure. Here's the entire contents of the ruby file > >> > >> $LOAD_PATH << 'c:/dev/rspec/lib' > >> > >> require 'spec' > >> > >> module ActiveSupport; end # workaround ironruby defined? bug > >> > >> class Vehicle > >> def initialize(people) > >> @people = people > >> end > >> attr_accessor :people > >> end > >> > >> describe Vehicle do > >> it "should assign people using the constructor" do > >> car = Vehicle.new(['orion', 'john', 'jim']) > >> car.should have(3).people > >> end > >> end > >> > >> Note I'm not using gems or anything else like that. To replicate > this > >> you'd basically do this: > >> > >> svn checkout ironruby 168 into c:\dev\ironruby > >> > >> rake compile > >> > >> git clone rspec straight from github, and stick it in c:\dev\rspec > >> > >> edit c:\dev\rspec\lib\spec\extensions\main.rb and fix the call to > >> File.expand_path > >> > >> spin up a command prompt and set PATH=blahblah so it can see the > >> ironruby binaries that got build previously > >> > >> ir rspectest.rb > >> > >> > >> > >> On 22/10/2008, at 6:40 PM, John Lam (IRONRUBY) wrote: > >> > >> > >> Orion - can you supply us with your rspectest.rb file? > >> > >> I was just hacking around with rspec 1.1.9 here, and it's blowing > up > >> with a bunch of dependencies on startup. > >> > >> Thanks, > >> -John > >> > >> From: ironruby-core-bounces at rubyforge.org > >> [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards > >> Sent: Tuesday, October 21, 2008 7:37 PM > >> To: ironruby-core at rubyforge.org > >> Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner > >> > >> The nested defined? bug is logged here: > >> > >> > >> http://rubyforge.org/tracker/index.php?func=detail&aid=22503&group_id= > >> 4 > >> 3 > >> 59&atid=16798 > >> > >> The 'caller' one is actually 2 bugs, both of which have been > logged > >> by ben hall already > >> > >> > >> http://rubyforge.org/tracker/?group_id=4359&atid=16798&func=detail&aid > >> = > >> 2 > >> 2315 > >> > >> http://rubyforge.org/tracker/?group_id=4359&atid=16798&func=detail&aid > >> = > >> 2 > >> 2348 > >> > >> For those interested in running rspec right now, a better fix is > to > >> replace line 26 of main.rb with > >> args.last[:spec_path] = File.expand_path( > >> caller(0)[1].split(':').first ) > >> > >> This will only cause rspec to lose the line number - you also have > to > >> run ir with the -D flag, or it doesn't include the path at all. > >> > >> As far as my quick-hack investigation shows me, rspec only uses > this > >> data for showing friendly error messages, rather than any core logic, > >> so perhaps it's not super-critical. > >> It would be nice to run it unpatched tho, IronRuby is looking > >> incredibly close to doing that :-) > >> > >> > >> Jim Deville wrote: > >> I'll add a rake task to compile release. Can you try to isolate > those > >> cases and file bugs? The second one is pretty easy, but I'd like to > >> have tracking on both of them. > >> > >> From: ironruby-core-bounces at rubyforge.org > >> [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards > >> Sent: Tuesday, October 21, 2008 7:04 PM > >> To: ironruby-core at rubyforge.org > >> Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner > >> > >> I just ran rspec 1.1.9 (straight from github) on IronRuby build > 167, > >> and it appears to work (I only have a simple test, but hey). > >> > >> I only had to make 2 changes: > >> > >> rspec\lib\spec\extensions\main.rb:26 is > >> args.last[:spec_path] = File.expand_path(caller(0)[1]) > >> IronRuby still doesn't seem to handle caller quite the same as > MRI. I > >> have no idea what that code is for, but I replaced it with this as a > >> quick hack > >> args.last[:spec_path] = "." > >> > >> and it seemed to work. > >> > >> I encountered another problem using the 'have' matcher - rspec > does > >> this > >> if inflector = (defined?(ActiveSupport::Inflector) ? > >> ActiveSupport::Inflector : (defined?(Inflector) ? Inflector : nil)) > >> IronRuby throws uninitialized constant Object::ActiveSupport, > whereas > >> MRI just returns nil - it looks like IR isn't handling defined? > >> on nested things properly yet. > >> > >> To work around this I just put > >> module ActiveSupport; end > >> at the top of my ruby file to get around the nested module issue. > >> > >> And presto! > >> C:\development\irtest>ir rspectest.rb > >> . > >> > >> Finished in 2.072133 seconds > >> > >> 1 example, 0 failures > >> > >> C:\development\irtest>ruby rspectest.rb > >> . > >> > >> Finished in 0.053 seconds > >> > >> 1 example, 0 failures > >> > >> The only problem now is that 2.07 seconds is somewhat larger than > >> 0.053... I am using the debug build of ir though, as that's what > >> rake:compile seems to give me. > >> > >> Just playing with VS now to see if I can build a release version > and > >> try that > >> > >> Ben Hall wrote: > >> Hi, > >> > >> To get rspec to work you will need to modify the actual Ironruby > >> source. I've raised bugs to get the changes required fixed, > however > >> I > >> did this based on 1.1.4, I think Cucumber will have a whole load > more > >> bugs attached as it has more dependencies. > >> > >> I know for a fact you won't be able to run Cucumber unmodified due > to > >> existing bugs around gems. (for example, gem needing .rb at the > end > >> of the file to be able to find it) > >> > >> However, I haven't had chance to take a closer look. > >> > >> Ben > >> > >> > >> > >> On Fri, Oct 17, 2008 at 2:53 PM, Curt Hagenlocher > >> wrote: > >> > >> > >> If you explicitly set the GEM_PATH before requiring gems, > you should > >> be able to use gems that are already present. I haven't tried any > >> other gem operations. > >> > >> I assume you're running with the latest source? > >> > >> -----Original Message----- > >> From: ironruby-core-bounces at rubyforge.org > >> [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Pat Gannon > >> Sent: Friday, October 17, 2008 1:30 AM > >> To: ironruby-core at rubyforge.org > >> Subject: [Ironruby-core] Cucumber / RSpec Story Runner > >> > >> Has anyone tried to get Cucumber (or it's predecessor: > >> the RSpec story > >> runner) to work with IronRuby? I have not had any luck > thus far (I > >> am > >> extremely new to Ruby), and I would really like to be able > to use > >> Cucumber to write executable feature documentation for my > .NET code. > >> > >> http://github.com/aslakhellesoy/cucumber/wikis > >> > >> I copied it under the "lib" directory, as well as several > of its > >> dependencies, but when I try to do "require > >> 'cucumber-0.1.7/lib/cucumber'", ir (interactive ruby) > fails with a > >> stack > >> overflow. The same thing happens when I try to require > some its > >> dependencies manually (eg. "require 'hoe-1.8.0/lib/hoe'" > >> and "require > >> 'rake-0.8.3/lib/rake'"), but some work just fine (eg. > >> "require > >> 'polyglot-0.2.3/lib/polyglot'" and "require > >> 'treetop-1.2.4/lib/treetop'"). > >> > >> I also tried to get gem working to aide me in this > process, but I > >> had > >> problems with that too. Has anyone got gem working with > IronRuby? > >> > >> Thanks in advance! > >> Pat Gannon > >> -- > >> 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 > >> > >> > >> -- > >> Orion Edwards > >> Web Application Developer > >> > >> T: +64 7 859 2120 > >> F: +64 7 859 2320 > >> E: orion.edwards at open2view.com > >> > >> > >> Open2view.com > >> The Real Estate Website > >> > >> > >> > >> > >> ________________________________ > >> > >> > >> > >> > >> > >> > >> _______________________________________________ > >> Ironruby-core mailing list > >> Ironruby-core at rubyforge.org > >> http://rubyforge.org/mailman/listinfo/ironruby-core > >> > >> > >> -- > >> Orion Edwards > >> Web Application Developer > >> > >> T: +64 7 859 2120 > >> F: +64 7 859 2320 > >> E: orion.edwards at open2view.com > >> > >> > >> Open2view.com > >> The Real Estate Website > >> > >> > >> _______________________________________________ > >> Ironruby-core mailing list > >> Ironruby-core at rubyforge.org > >> http://rubyforge.org/mailman/listinfo/ironruby-core > >> > >> _______________________________________________ > >> Ironruby-core mailing list > >> Ironruby-core at rubyforge.org > >> http://rubyforge.org/mailman/listinfo/ironruby-core > >> > >> > > > > _______________________________________________ > > Ironruby-core mailing list > > Ironruby-core at rubyforge.org > > http://rubyforge.org/mailman/listinfo/ironruby-core > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: From curth at microsoft.com Wed Oct 22 12:21:31 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Wed, 22 Oct 2008 09:21:31 -0700 Subject: [Ironruby-core] Cucumber / RSpec Story Runner In-Reply-To: References: <9319fe7416065945f7de725dce3272fe@ruby-forum.com> <48FE8A0B.9000502@open2view.com> <48FE91DF.7010803@open2view.com> <372109E149E8084D8E6C7D9CFD82E063334B4E79B2@NA-EXMSG-C115.redmond.corp.microsoft.com> <372109E149E8084D8E6C7D9CFD82E063334B4E79BE@NA-EXMSG-C115.redmond.corp.microsoft.com> <372109E149E8084D8E6C7D9CFD82E063334B4E79C0@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: I?ve attached an adapter against MSSQL that I use for testing. This adapter is buggy and incomplete and was cobbled together from many sources. Absolutely nothing about it is guaranteed, but someone may find some use in it. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Wednesday, October 22, 2008 1:08 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner I'll try cucumber tonight when i get home. I'm trying to build a little rails app with rspec etc. What's the status on a .NET based active record adapter? I've been thinking that it might be necessary to write an adapter that creates the correct .NET provider and dispatches the calls through that layer. Either as a part of ruby-dbd or as adapters to ActiveRecord.. dbd gives the advantage that you can use it everywhere then. any thoughts? --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero GSM: +32.486.787.582 Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim On Wed, Oct 22, 2008 at 9:56 AM, Ben Hall > wrote: Nice work guys!! Pleased that I won't be having to use a hacked version of r156 :) One of the problems you mentioned (pretty errors due to backtrace) will cause the story runner in 1.1.4 to blow up and throw an exception, but as that is now Cucumber I don't know if we will have the same issues. Have you tried Cucumber yet? Ben On Wed, Oct 22, 2008 at 8:01 AM, John Lam (IRONRUBY) > wrote: > -X:Interpret forces execution to always go through the DLR interpreter rather than through the DLR compilation engine. > > This trades-off faster startup for decreased throughput. > > We have a number of different strategies that we're exploring to improve things: > > 1) Ahead of time cached pre-compilation to native x86 via ngen > 2) Mixed mode DLR interpreter and DLR compiler. We'll start off interpreting and compile the 'hot' code paths dynamically at runtime. > 3) Mixed mode Ruby interpreter and DLR compiler. We can improve perf even more by writing a Ruby specific interpreter and avoiding the tree transform from the Ruby AST to DLR trees for the interpreted code paths. > > We really haven't done any performance tuning of note on IronRuby so far. We're focusing on getting the language correct; performance will come after we stabilize the language. > > > Thanks, > -John > > >> -----Original Message----- >> From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- >> bounces at rubyforge.org] On Behalf Of Orion Edwards >> Sent: Tuesday, October 21, 2008 11:38 PM >> To: ironruby-core at rubyforge.org >> Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner >> >> I'm not on the same machine as earlier - the previous machine was my >> work desktop PC running vista >> >> This one is running windows XP under vmware on a macbook >> >> Running with -X:Interpret I see 0.78 seconds on repeated runs (0.79 on >> the first) Without it I see 1.95 seconds (2.05 on the first run) >> >> I didn't know about -X:Interpret... >> So what exactly does it do differently, and if it's so much faster, >> why isn't it the default? >> >> >> >> On 22/10/2008, at 7:21 PM, John Lam (IRONRUBY) wrote: >> >> >> >> Great - I have it working now on my machine. >> >> I'm seeing 0.45s or so as the net time (excluding startup) for the >> tests if I run using the -X:Interpret flag. Can you try running with >> that flag enabled on your machine and let me know how quickly it runs? >> >> Thanks, >> -John >> >> From: ironruby-core-bounces at rubyforge.org >> [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards >> Sent: Tuesday, October 21, 2008 11:07 PM >> To: ironruby-core at rubyforge.org >> Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner >> >> Sure. Here's the entire contents of the ruby file >> >> $LOAD_PATH << 'c:/dev/rspec/lib' >> >> require 'spec' >> >> module ActiveSupport; end # workaround ironruby defined? bug >> >> class Vehicle >> def initialize(people) >> @people = people >> end >> attr_accessor :people >> end >> >> describe Vehicle do >> it "should assign people using the constructor" do >> car = Vehicle.new(['orion', 'john', 'jim']) >> car.should have(3).people >> end >> end >> >> Note I'm not using gems or anything else like that. To replicate this >> you'd basically do this: >> >> svn checkout ironruby 168 into c:\dev\ironruby >> >> rake compile >> >> git clone rspec straight from github, and stick it in c:\dev\rspec >> >> edit c:\dev\rspec\lib\spec\extensions\main.rb and fix the call to >> File.expand_path >> >> spin up a command prompt and set PATH=blahblah so it can see the >> ironruby binaries that got build previously >> >> ir rspectest.rb >> >> >> >> On 22/10/2008, at 6:40 PM, John Lam (IRONRUBY) wrote: >> >> >> Orion - can you supply us with your rspectest.rb file? >> >> I was just hacking around with rspec 1.1.9 here, and it's blowing up >> with a bunch of dependencies on startup. >> >> Thanks, >> -John >> >> From: ironruby-core-bounces at rubyforge.org >> [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards >> Sent: Tuesday, October 21, 2008 7:37 PM >> To: ironruby-core at rubyforge.org >> Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner >> >> The nested defined? bug is logged here: >> >> >> http://rubyforge.org/tracker/index.php?func=detail&aid=22503&group_id= >> 4 >> 3 >> 59&atid=16798 >> >> The 'caller' one is actually 2 bugs, both of which have been logged >> by ben hall already >> >> >> http://rubyforge.org/tracker/?group_id=4359&atid=16798&func=detail&aid >> = >> 2 >> 2315 >> >> http://rubyforge.org/tracker/?group_id=4359&atid=16798&func=detail&aid >> = >> 2 >> 2348 >> >> For those interested in running rspec right now, a better fix is to >> replace line 26 of main.rb with >> args.last[:spec_path] = File.expand_path( >> caller(0)[1].split(':').first ) >> >> This will only cause rspec to lose the line number - you also have to >> run ir with the -D flag, or it doesn't include the path at all. >> >> As far as my quick-hack investigation shows me, rspec only uses this >> data for showing friendly error messages, rather than any core logic, >> so perhaps it's not super-critical. >> It would be nice to run it unpatched tho, IronRuby is looking >> incredibly close to doing that :-) >> >> >> Jim Deville wrote: >> I'll add a rake task to compile release. Can you try to isolate those >> cases and file bugs? The second one is pretty easy, but I'd like to >> have tracking on both of them. >> >> From: ironruby-core-bounces at rubyforge.org >> [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards >> Sent: Tuesday, October 21, 2008 7:04 PM >> To: ironruby-core at rubyforge.org >> Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner >> >> I just ran rspec 1.1.9 (straight from github) on IronRuby build 167, >> and it appears to work (I only have a simple test, but hey). >> >> I only had to make 2 changes: >> >> rspec\lib\spec\extensions\main.rb:26 is >> args.last[:spec_path] = File.expand_path(caller(0)[1]) >> IronRuby still doesn't seem to handle caller quite the same as MRI. I >> have no idea what that code is for, but I replaced it with this as a >> quick hack >> args.last[:spec_path] = "." >> >> and it seemed to work. >> >> I encountered another problem using the 'have' matcher - rspec does >> this >> if inflector = (defined?(ActiveSupport::Inflector) ? >> ActiveSupport::Inflector : (defined?(Inflector) ? Inflector : nil)) >> IronRuby throws uninitialized constant Object::ActiveSupport, whereas >> MRI just returns nil - it looks like IR isn't handling defined? >> on nested things properly yet. >> >> To work around this I just put >> module ActiveSupport; end >> at the top of my ruby file to get around the nested module issue. >> >> And presto! >> C:\development\irtest>ir rspectest.rb >> . >> >> Finished in 2.072133 seconds >> >> 1 example, 0 failures >> >> C:\development\irtest>ruby rspectest.rb >> . >> >> Finished in 0.053 seconds >> >> 1 example, 0 failures >> >> The only problem now is that 2.07 seconds is somewhat larger than >> 0.053... I am using the debug build of ir though, as that's what >> rake:compile seems to give me. >> >> Just playing with VS now to see if I can build a release version and >> try that >> >> Ben Hall wrote: >> Hi, >> >> To get rspec to work you will need to modify the actual Ironruby >> source. I've raised bugs to get the changes required fixed, however >> I >> did this based on 1.1.4, I think Cucumber will have a whole load more >> bugs attached as it has more dependencies. >> >> I know for a fact you won't be able to run Cucumber unmodified due to >> existing bugs around gems. (for example, gem needing .rb at the end >> of the file to be able to find it) >> >> However, I haven't had chance to take a closer look. >> >> Ben >> >> >> >> On Fri, Oct 17, 2008 at 2:53 PM, Curt Hagenlocher >> > > wrote: >> >> >> If you explicitly set the GEM_PATH before requiring gems, you should >> be able to use gems that are already present. I haven't tried any >> other gem operations. >> >> I assume you're running with the latest source? >> >> -----Original Message----- >> From: ironruby-core-bounces at rubyforge.org >> [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Pat Gannon >> Sent: Friday, October 17, 2008 1:30 AM >> To: ironruby-core at rubyforge.org >> Subject: [Ironruby-core] Cucumber / RSpec Story Runner >> >> Has anyone tried to get Cucumber (or it's predecessor: >> the RSpec story >> runner) to work with IronRuby? I have not had any luck thus far (I >> am >> extremely new to Ruby), and I would really like to be able to use >> Cucumber to write executable feature documentation for my .NET code. >> >> http://github.com/aslakhellesoy/cucumber/wikis >> >> I copied it under the "lib" directory, as well as several of its >> dependencies, but when I try to do "require >> 'cucumber-0.1.7/lib/cucumber'", ir (interactive ruby) fails with a >> stack >> overflow. The same thing happens when I try to require some its >> dependencies manually (eg. "require 'hoe-1.8.0/lib/hoe'" >> and "require >> 'rake-0.8.3/lib/rake'"), but some work just fine (eg. >> "require >> 'polyglot-0.2.3/lib/polyglot'" and "require >> 'treetop-1.2.4/lib/treetop'"). >> >> I also tried to get gem working to aide me in this process, but I >> had >> problems with that too. Has anyone got gem working with IronRuby? >> >> Thanks in advance! >> Pat Gannon >> -- >> 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 >> >> >> -- >> Orion Edwards >> Web Application Developer >> >> T: +64 7 859 2120 >> F: +64 7 859 2320 >> E: orion.edwards at open2view.com >> > >> >> Open2view.com >> The Real Estate Website >> >> >> >> >> ________________________________ >> >> >> >> >> >> >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core >> >> >> -- >> Orion Edwards >> Web Application Developer >> >> T: +64 7 859 2120 >> F: +64 7 859 2320 >> E: orion.edwards at open2view.com >> > >> >> Open2view.com >> The Real Estate Website >> >> >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core >> >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core >> >> > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: mssql_adapter.rb Type: application/octet-stream Size: 17245 bytes Desc: mssql_adapter.rb URL: From ben2004uk at googlemail.com Wed Oct 22 15:38:21 2008 From: ben2004uk at googlemail.com (Ben Hall) Date: Wed, 22 Oct 2008 20:38:21 +0100 Subject: [Ironruby-core] Cucumber / RSpec Story Runner In-Reply-To: References: <9319fe7416065945f7de725dce3272fe@ruby-forum.com> <48FE91DF.7010803@open2view.com> <372109E149E8084D8E6C7D9CFD82E063334B4E79B2@NA-EXMSG-C115.redmond.corp.microsoft.com> <372109E149E8084D8E6C7D9CFD82E063334B4E79BE@NA-EXMSG-C115.redmond.corp.microsoft.com> <372109E149E8084D8E6C7D9CFD82E063334B4E79C0@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: Oh, I remember I had problems with cucumber due to require needing to have .rb on the end (http://rubyforge.org/tracker/?group_id=4359&atid=16798&func=detail&aid=20167). For example, this line - load 'cucumber' E:\IronRuby\r156\src\IronRuby.Libraries\Builtins\KernelOps.cs:380:in `load': no such file to load -- cucumber (LoadError ) from :0 Command I was using was: E:\IronRuby\r156\build\debug>ir "c:\ruby\bin\cucumber" -r "E:\IronRuby\r156\cucumber\examples\calculator\features\steps\ calculator_steps.rb" "E:\IronRuby\r156\cucumber\examples\calculator\features\addition.feature" I made a change (load 'cucumber.rb'), but now i'm getting You must gem install win32console to get coloured output on this ruby platform (i386-mswin32) but no output :( I guess I need to do something else.... On Wed, Oct 22, 2008 at 5:21 PM, Curt Hagenlocher wrote: > I've attached an adapter against MSSQL that I use for testing. This adapter > is buggy and incomplete and was cobbled together from many sources. > Absolutely nothing about it is guaranteed, but someone may find some use in > it. > > > > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero > Sent: Wednesday, October 22, 2008 1:08 AM > > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner > > > > I'll try cucumber tonight when i get home. > I'm trying to build a little rails app with rspec etc. > > What's the status on a .NET based active record adapter? > I've been thinking that it might be necessary to write an adapter that > creates the correct .NET provider and dispatches the calls through that > layer. > Either as a part of ruby-dbd or as adapters to ActiveRecord.. > dbd gives the advantage that you can use it everywhere then. > > any thoughts? > --- > Met vriendelijke groeten - Best regards - Salutations > Ivan Porto Carrero > GSM: +32.486.787.582 > Blog: http://flanders.co.nz > Twitter: http://twitter.com/casualjim > > > On Wed, Oct 22, 2008 at 9:56 AM, Ben Hall wrote: > > Nice work guys!! Pleased that I won't be having to use a hacked > version of r156 :) > > One of the problems you mentioned (pretty errors due to backtrace) > will cause the story runner in 1.1.4 to blow up and throw an > exception, but as that is now Cucumber I don't know if we will have > the same issues. Have you tried Cucumber yet? > > > Ben > > > > On Wed, Oct 22, 2008 at 8:01 AM, John Lam (IRONRUBY) > wrote: >> -X:Interpret forces execution to always go through the DLR interpreter >> rather than through the DLR compilation engine. >> >> This trades-off faster startup for decreased throughput. >> >> We have a number of different strategies that we're exploring to improve >> things: >> >> 1) Ahead of time cached pre-compilation to native x86 via ngen >> 2) Mixed mode DLR interpreter and DLR compiler. We'll start off >> interpreting and compile the 'hot' code paths dynamically at runtime. >> 3) Mixed mode Ruby interpreter and DLR compiler. We can improve perf even >> more by writing a Ruby specific interpreter and avoiding the tree transform >> from the Ruby AST to DLR trees for the interpreted code paths. >> >> We really haven't done any performance tuning of note on IronRuby so far. >> We're focusing on getting the language correct; performance will come after >> we stabilize the language. >> >> >> Thanks, >> -John >> >> >>> -----Original Message----- >>> From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- >>> bounces at rubyforge.org] On Behalf Of Orion Edwards >>> Sent: Tuesday, October 21, 2008 11:38 PM >>> To: ironruby-core at rubyforge.org >>> Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner >>> >>> I'm not on the same machine as earlier - the previous machine was my >>> work desktop PC running vista >>> >>> This one is running windows XP under vmware on a macbook >>> >>> Running with -X:Interpret I see 0.78 seconds on repeated runs (0.79 on >>> the first) Without it I see 1.95 seconds (2.05 on the first run) >>> >>> I didn't know about -X:Interpret... >>> So what exactly does it do differently, and if it's so much faster, >>> why isn't it the default? >>> >>> >>> >>> On 22/10/2008, at 7:21 PM, John Lam (IRONRUBY) wrote: >>> >>> >>> >>> Great - I have it working now on my machine. >>> >>> I'm seeing 0.45s or so as the net time (excluding startup) for the >>> tests if I run using the -X:Interpret flag. Can you try running with >>> that flag enabled on your machine and let me know how quickly it runs? >>> >>> Thanks, >>> -John >>> >>> From: ironruby-core-bounces at rubyforge.org >>> [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards >>> Sent: Tuesday, October 21, 2008 11:07 PM >>> To: ironruby-core at rubyforge.org >>> Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner >>> >>> Sure. Here's the entire contents of the ruby file >>> >>> $LOAD_PATH << 'c:/dev/rspec/lib' >>> >>> require 'spec' >>> >>> module ActiveSupport; end # workaround ironruby defined? bug >>> >>> class Vehicle >>> def initialize(people) >>> @people = people >>> end >>> attr_accessor :people >>> end >>> >>> describe Vehicle do >>> it "should assign people using the constructor" do >>> car = Vehicle.new(['orion', 'john', 'jim']) >>> car.should have(3).people >>> end >>> end >>> >>> Note I'm not using gems or anything else like that. To replicate >>> this >>> you'd basically do this: >>> >>> svn checkout ironruby 168 into c:\dev\ironruby >>> >>> rake compile >>> >>> git clone rspec straight from github, and stick it in c:\dev\rspec >>> >>> edit c:\dev\rspec\lib\spec\extensions\main.rb and fix the call to >>> File.expand_path >>> >>> spin up a command prompt and set PATH=blahblah so it can see the >>> ironruby binaries that got build previously >>> >>> ir rspectest.rb >>> >>> >>> >>> On 22/10/2008, at 6:40 PM, John Lam (IRONRUBY) wrote: >>> >>> >>> Orion - can you supply us with your rspectest.rb file? >>> >>> I was just hacking around with rspec 1.1.9 here, and it's blowing >>> up >>> with a bunch of dependencies on startup. >>> >>> Thanks, >>> -John >>> >>> From: ironruby-core-bounces at rubyforge.org >>> [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards >>> Sent: Tuesday, October 21, 2008 7:37 PM >>> To: ironruby-core at rubyforge.org >>> Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner >>> >>> The nested defined? bug is logged here: >>> >>> >>> http://rubyforge.org/tracker/index.php?func=detail&aid=22503&group_id= >>> 4 >>> 3 >>> 59&atid=16798 >>> >>> The 'caller' one is actually 2 bugs, both of which have been logged >>> by ben hall already >>> >>> >>> http://rubyforge.org/tracker/?group_id=4359&atid=16798&func=detail&aid >>> = >>> 2 >>> 2315 >>> >>> http://rubyforge.org/tracker/?group_id=4359&atid=16798&func=detail&aid >>> = >>> 2 >>> 2348 >>> >>> For those interested in running rspec right now, a better fix is to >>> replace line 26 of main.rb with >>> args.last[:spec_path] = File.expand_path( >>> caller(0)[1].split(':').first ) >>> >>> This will only cause rspec to lose the line number - you also have >>> to >>> run ir with the -D flag, or it doesn't include the path at all. >>> >>> As far as my quick-hack investigation shows me, rspec only uses >>> this >>> data for showing friendly error messages, rather than any core logic, >>> so perhaps it's not super-critical. >>> It would be nice to run it unpatched tho, IronRuby is looking >>> incredibly close to doing that :-) >>> >>> >>> Jim Deville wrote: >>> I'll add a rake task to compile release. Can you try to isolate >>> those >>> cases and file bugs? The second one is pretty easy, but I'd like to >>> have tracking on both of them. >>> >>> From: ironruby-core-bounces at rubyforge.org >>> [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards >>> Sent: Tuesday, October 21, 2008 7:04 PM >>> To: ironruby-core at rubyforge.org >>> Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner >>> >>> I just ran rspec 1.1.9 (straight from github) on IronRuby build >>> 167, >>> and it appears to work (I only have a simple test, but hey). >>> >>> I only had to make 2 changes: >>> >>> rspec\lib\spec\extensions\main.rb:26 is >>> args.last[:spec_path] = File.expand_path(caller(0)[1]) >>> IronRuby still doesn't seem to handle caller quite the same as MRI. >>> I >>> have no idea what that code is for, but I replaced it with this as a >>> quick hack >>> args.last[:spec_path] = "." >>> >>> and it seemed to work. >>> >>> I encountered another problem using the 'have' matcher - rspec does >>> this >>> if inflector = (defined?(ActiveSupport::Inflector) ? >>> ActiveSupport::Inflector : (defined?(Inflector) ? Inflector : nil)) >>> IronRuby throws uninitialized constant Object::ActiveSupport, >>> whereas >>> MRI just returns nil - it looks like IR isn't handling defined? >>> on nested things properly yet. >>> >>> To work around this I just put >>> module ActiveSupport; end >>> at the top of my ruby file to get around the nested module issue. >>> >>> And presto! >>> C:\development\irtest>ir rspectest.rb >>> . >>> >>> Finished in 2.072133 seconds >>> >>> 1 example, 0 failures >>> >>> C:\development\irtest>ruby rspectest.rb >>> . >>> >>> Finished in 0.053 seconds >>> >>> 1 example, 0 failures >>> >>> The only problem now is that 2.07 seconds is somewhat larger than >>> 0.053... I am using the debug build of ir though, as that's what >>> rake:compile seems to give me. >>> >>> Just playing with VS now to see if I can build a release version >>> and >>> try that >>> >>> Ben Hall wrote: >>> Hi, >>> >>> To get rspec to work you will need to modify the actual Ironruby >>> source. I've raised bugs to get the changes required fixed, >>> however >>> I >>> did this based on 1.1.4, I think Cucumber will have a whole load >>> more >>> bugs attached as it has more dependencies. >>> >>> I know for a fact you won't be able to run Cucumber unmodified due >>> to >>> existing bugs around gems. (for example, gem needing .rb at the >>> end >>> of the file to be able to find it) >>> >>> However, I haven't had chance to take a closer look. >>> >>> Ben >>> >>> >>> >>> On Fri, Oct 17, 2008 at 2:53 PM, Curt Hagenlocher >>> wrote: >>> >>> >>> If you explicitly set the GEM_PATH before requiring gems, >>> you should >>> be able to use gems that are already present. I haven't tried any >>> other gem operations. >>> >>> I assume you're running with the latest source? >>> >>> -----Original Message----- >>> From: ironruby-core-bounces at rubyforge.org >>> [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Pat Gannon >>> Sent: Friday, October 17, 2008 1:30 AM >>> To: ironruby-core at rubyforge.org >>> Subject: [Ironruby-core] Cucumber / RSpec Story Runner >>> >>> Has anyone tried to get Cucumber (or it's predecessor: >>> the RSpec story >>> runner) to work with IronRuby? I have not had any luck >>> thus far (I >>> am >>> extremely new to Ruby), and I would really like to be able >>> to use >>> Cucumber to write executable feature documentation for my >>> .NET code. >>> >>> http://github.com/aslakhellesoy/cucumber/wikis >>> >>> I copied it under the "lib" directory, as well as several >>> of its >>> dependencies, but when I try to do "require >>> 'cucumber-0.1.7/lib/cucumber'", ir (interactive ruby) fails >>> with a >>> stack >>> overflow. The same thing happens when I try to require >>> some its >>> dependencies manually (eg. "require 'hoe-1.8.0/lib/hoe'" >>> and "require >>> 'rake-0.8.3/lib/rake'"), but some work just fine (eg. >>> "require >>> 'polyglot-0.2.3/lib/polyglot'" and "require >>> 'treetop-1.2.4/lib/treetop'"). >>> >>> I also tried to get gem working to aide me in this process, >>> but I >>> had >>> problems with that too. Has anyone got gem working with >>> IronRuby? >>> >>> Thanks in advance! >>> Pat Gannon >>> -- >>> 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 >>> >>> >>> -- >>> Orion Edwards >>> Web Application Developer >>> >>> T: +64 7 859 2120 >>> F: +64 7 859 2320 >>> E: orion.edwards at open2view.com >>> >>> >>> Open2view.com >>> The Real Estate Website >>> >>> >>> >>> >>> ________________________________ >>> >>> >>> >>> >>> >>> >>> _______________________________________________ >>> Ironruby-core mailing list >>> Ironruby-core at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/ironruby-core >>> >>> >>> -- >>> Orion Edwards >>> Web Application Developer >>> >>> T: +64 7 859 2120 >>> F: +64 7 859 2320 >>> E: orion.edwards at open2view.com >>> >>> >>> Open2view.com >>> The Real Estate Website >>> >>> >>> _______________________________________________ >>> Ironruby-core mailing list >>> Ironruby-core at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/ironruby-core >>> >>> _______________________________________________ >>> Ironruby-core mailing list >>> Ironruby-core at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/ironruby-core >>> >>> >> >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core >> > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > From orion.edwards at open2view.com Wed Oct 22 15:56:02 2008 From: orion.edwards at open2view.com (Orion Edwards) Date: Thu, 23 Oct 2008 08:56:02 +1300 Subject: [Ironruby-core] Cucumber / RSpec Story Runner In-Reply-To: References: <9319fe7416065945f7de725dce3272fe@ruby-forum.com> <48FE91DF.7010803@open2view.com> <372109E149E8084D8E6C7D9CFD82E063334B4E79B2@NA-EXMSG-C115.redmond.corp.microsoft.com> <372109E149E8084D8E6C7D9CFD82E063334B4E79BE@NA-EXMSG-C115.redmond.corp.microsoft.com> <372109E149E8084D8E6C7D9CFD82E063334B4E79C0@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <48FF8552.1060705@open2view.com> An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.jpg Type: image/jpeg Size: 8147 bytes Desc: not available URL: From ben2004uk at googlemail.com Wed Oct 22 17:32:39 2008 From: ben2004uk at googlemail.com (Ben Hall) Date: Wed, 22 Oct 2008 22:32:39 +0100 Subject: [Ironruby-core] Cucumber / RSpec Story Runner In-Reply-To: <48FF8552.1060705@open2view.com> References: <9319fe7416065945f7de725dce3272fe@ruby-forum.com> <372109E149E8084D8E6C7D9CFD82E063334B4E79BE@NA-EXMSG-C115.redmond.corp.microsoft.com> <372109E149E8084D8E6C7D9CFD82E063334B4E79C0@NA-EXMSG-C115.redmond.corp.microsoft.com> <48FF8552.1060705@open2view.com> Message-ID: Well, this is how Cucumber has implement the code, as such there must be something different. Something is happening, i'm just not sure what, but there is a problem still with IronRuby. The file i'm looking at is "c:\ruby\bin\cucumber" - maybe its different due to rubygems... Without it, i'm not sure how else to run Cucumber. For example, this also fails to output anything: E:\IronRuby\r156\build\debug>ir "c:\ruby\bin\cucumber" --help This also fails: E:\IronRuby\r156\build\debug>ir "C:\ruby\lib\ruby\gems\1.8\gems\cucumber-0.1.8\lib\cucumber.rb" --help ir "c:/ruby/bin/cucumber" --help However, this works: C:/Ruby/bin/ruby.exe "c:/ruby/bin/cucumber" --help On Wed, Oct 22, 2008 at 8:56 PM, Orion Edwards wrote: > load always needs the .rb on the end (in MRI as well as IronRuby). > It looks like you should be using require instead - require is not at all > the same thing as load > > Currently with IronRuby SVN r167 this happens: > > There is a file called 'mylib.rb' in the current directory > > require 'mylib' # works in both IR and MRI > require 'mylib.rb' # works in both IR and MRI > load 'mylib.rb' # works in both IR and MRI > load 'mylib' # works in neither IR or MRI - it's not supposed to > > Looks all correct to me... Maybe time to close that bug? > > Ben Hall wrote: > > Oh, I remember I had problems with cucumber due to require needing to > have .rb on the end > (http://rubyforge.org/tracker/?group_id=4359&atid=16798&func=detail&aid=20167). > For example, this line - load 'cucumber' > E:\IronRuby\r156\src\IronRuby.Libraries\Builtins\KernelOps.cs:380:in > `load': no such file to load -- cucumber (LoadError > ) > from :0 > Command I was using was: E:\IronRuby\r156\build\debug>ir > "c:\ruby\bin\cucumber" -r > "E:\IronRuby\r156\cucumber\examples\calculator\features\steps\ > calculator_steps.rb" > "E:\IronRuby\r156\cucumber\examples\calculator\features\addition.feature" > I made a change (load 'cucumber.rb'), but now i'm getting You must gem > install win32console to get coloured output on this ruby platform > (i386-mswin32) but no output :( I guess I need to do something > else.... > On Wed, Oct 22, 2008 at 5:21 PM, Curt Hagenlocher > wrote: > > > I've attached an adapter against MSSQL that I use for testing. This adapter > is buggy and incomplete and was cobbled together from many sources. > Absolutely nothing about it is guaranteed, but someone may find some use in > it. > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero > Sent: Wednesday, October 22, 2008 1:08 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner > I'll try cucumber tonight when i get home. > I'm trying to build a little rails app with rspec etc. > What's the status on a .NET based active record adapter? > I've been thinking that it might be necessary to write an adapter that > creates the correct .NET provider and dispatches the calls through that > layer. > Either as a part of ruby-dbd or as adapters to ActiveRecord.. > dbd gives the advantage that you can use it everywhere then. > any thoughts? > --- > Met vriendelijke groeten - Best regards - Salutations > Ivan Porto Carrero > GSM: +32.486.787.582 > Blog: http://flanders.co.nz > Twitter: http://twitter.com/casualjim > On Wed, Oct 22, 2008 at 9:56 AM, Ben Hall wrote: > Nice work guys!! Pleased that I won't be having to use a hacked > version of r156 :) > One of the problems you mentioned (pretty errors due to backtrace) > will cause the story runner in 1.1.4 to blow up and throw an > exception, but as that is now Cucumber I don't know if we will have > the same issues. Have you tried Cucumber yet? > Ben > On Wed, Oct 22, 2008 at 8:01 AM, John Lam (IRONRUBY) > wrote: > > > -X:Interpret forces execution to always go through the DLR interpreter > rather than through the DLR compilation engine. > This trades-off faster startup for decreased throughput. > We have a number of different strategies that we're exploring to improve > things: > 1) Ahead of time cached pre-compilation to native x86 via ngen > 2) Mixed mode DLR interpreter and DLR compiler. We'll start off > interpreting and compile the 'hot' code paths dynamically at runtime. > 3) Mixed mode Ruby interpreter and DLR compiler. We can improve perf even > more by writing a Ruby specific interpreter and avoiding the tree transform > from the Ruby AST to DLR trees for the interpreted code paths. > We really haven't done any performance tuning of note on IronRuby so far. > We're focusing on getting the language correct; performance will come after > we stabilize the language. > Thanks, > -John > > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Orion Edwards > Sent: Tuesday, October 21, 2008 11:38 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner > I'm not on the same machine as earlier - the previous machine was my > work desktop PC running vista > This one is running windows XP under vmware on a macbook > Running with -X:Interpret I see 0.78 seconds on repeated runs (0.79 on > the first) Without it I see 1.95 seconds (2.05 on the first run) > I didn't know about -X:Interpret... > So what exactly does it do differently, and if it's so much faster, > why isn't it the default? > On 22/10/2008, at 7:21 PM, John Lam (IRONRUBY) wrote: > Great - I have it working now on my machine. > I'm seeing 0.45s or so as the net time (excluding startup) for the > tests if I run using the -X:Interpret flag. Can you try running with > that flag enabled on your machine and let me know how quickly it runs? > Thanks, > -John > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards > Sent: Tuesday, October 21, 2008 11:07 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner > Sure. Here's the entire contents of the ruby file > $LOAD_PATH << 'c:/dev/rspec/lib' > require 'spec' > module ActiveSupport; end # workaround ironruby defined? bug > class Vehicle > def initialize(people) > @people = people > end > attr_accessor :people > end > describe Vehicle do > it "should assign people using the constructor" do > car = Vehicle.new(['orion', 'john', 'jim']) > car.should have(3).people > end > end > Note I'm not using gems or anything else like that. To replicate > this > you'd basically do this: > svn checkout ironruby 168 into c:\dev\ironruby > rake compile > git clone rspec straight from github, and stick it in c:\dev\rspec > edit c:\dev\rspec\lib\spec\extensions\main.rb and fix the call to > File.expand_path > spin up a command prompt and set PATH=blahblah so it can see the > ironruby binaries that got build previously > ir rspectest.rb > On 22/10/2008, at 6:40 PM, John Lam (IRONRUBY) wrote: > Orion - can you supply us with your rspectest.rb file? > I was just hacking around with rspec 1.1.9 here, and it's blowing > up > with a bunch of dependencies on startup. > Thanks, > -John > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards > Sent: Tuesday, October 21, 2008 7:37 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner > The nested defined? bug is logged here: > http://rubyforge.org/tracker/index.php?func=detail&aid=22503&group_id= > 4 > 3 > 59&atid=16798 > The 'caller' one is actually 2 bugs, both of which have been logged > by ben hall already > http://rubyforge.org/tracker/?group_id=4359&atid=16798&func=detail&aid > = > 2 > 2315 > http://rubyforge.org/tracker/?group_id=4359&atid=16798&func=detail&aid > = > 2 > 2348 > For those interested in running rspec right now, a better fix is to > replace line 26 of main.rb with > args.last[:spec_path] = File.expand_path( > caller(0)[1].split(':').first ) > This will only cause rspec to lose the line number - you also have > to > run ir with the -D flag, or it doesn't include the path at all. > As far as my quick-hack investigation shows me, rspec only uses > this > data for showing friendly error messages, rather than any core logic, > so perhaps it's not super-critical. > It would be nice to run it unpatched tho, IronRuby is looking > incredibly close to doing that :-) > Jim Deville wrote: > I'll add a rake task to compile release. Can you try to isolate > those > cases and file bugs? The second one is pretty easy, but I'd like to > have tracking on both of them. > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards > Sent: Tuesday, October 21, 2008 7:04 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner > I just ran rspec 1.1.9 (straight from github) on IronRuby build > 167, > and it appears to work (I only have a simple test, but hey). > I only had to make 2 changes: > rspec\lib\spec\extensions\main.rb:26 is > args.last[:spec_path] = File.expand_path(caller(0)[1]) > IronRuby still doesn't seem to handle caller quite the same as MRI. > I > have no idea what that code is for, but I replaced it with this as a > quick hack > args.last[:spec_path] = "." > and it seemed to work. > I encountered another problem using the 'have' matcher - rspec does > this > if inflector = (defined?(ActiveSupport::Inflector) ? > ActiveSupport::Inflector : (defined?(Inflector) ? Inflector : nil)) > IronRuby throws uninitialized constant Object::ActiveSupport, > whereas > MRI just returns nil - it looks like IR isn't handling defined? > on nested things properly yet. > To work around this I just put > module ActiveSupport; end > at the top of my ruby file to get around the nested module issue. > And presto! > C:\development\irtest>ir rspectest.rb > . > Finished in 2.072133 seconds > 1 example, 0 failures > C:\development\irtest>ruby rspectest.rb > . > Finished in 0.053 seconds > 1 example, 0 failures > The only problem now is that 2.07 seconds is somewhat larger than > 0.053... I am using the debug build of ir though, as that's what > rake:compile seems to give me. > Just playing with VS now to see if I can build a release version > and > try that > Ben Hall wrote: > Hi, > To get rspec to work you will need to modify the actual Ironruby > source. I've raised bugs to get the changes required fixed, > however > I > did this based on 1.1.4, I think Cucumber will have a whole load > more > bugs attached as it has more dependencies. > I know for a fact you won't be able to run Cucumber unmodified due > to > existing bugs around gems. (for example, gem needing .rb at the > end > of the file to be able to find it) > However, I haven't had chance to take a closer look. > Ben > On Fri, Oct 17, 2008 at 2:53 PM, Curt Hagenlocher > wrote: > If you explicitly set the GEM_PATH before requiring gems, > you should > be able to use gems that are already present. I haven't tried any > other gem operations. > I assume you're running with the latest source? > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Pat Gannon > Sent: Friday, October 17, 2008 1:30 AM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] Cucumber / RSpec Story Runner > Has anyone tried to get Cucumber (or it's predecessor: > the RSpec story > runner) to work with IronRuby? I have not had any luck > thus far (I > am > extremely new to Ruby), and I would really like to be able > to use > Cucumber to write executable feature documentation for my > .NET code. > http://github.com/aslakhellesoy/cucumber/wikis > I copied it under the "lib" directory, as well as several > of its > dependencies, but when I try to do "require > 'cucumber-0.1.7/lib/cucumber'", ir (interactive ruby) fails > with a > stack > overflow. The same thing happens when I try to require > some its > dependencies manually (eg. "require 'hoe-1.8.0/lib/hoe'" > and "require > 'rake-0.8.3/lib/rake'"), but some work just fine (eg. > "require > 'polyglot-0.2.3/lib/polyglot'" and "require > 'treetop-1.2.4/lib/treetop'"). > I also tried to get gem working to aide me in this process, > but I > had > problems with that too. Has anyone got gem working with > IronRuby? > Thanks in advance! > Pat Gannon > -- > 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 > -- > Orion Edwards > Web Application Developer > T: +64 7 859 2120 > F: +64 7 859 2320 > E: orion.edwards at open2view.com > > Open2view.com > The Real Estate Website > > ________________________________ > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -- > Orion Edwards > Web Application Developer > T: +64 7 859 2120 > F: +64 7 859 2320 > E: orion.edwards at open2view.com > > Open2view.com > The Real Estate Website > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > _______________________________________________ > 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 > > > -- > Orion Edwards > Web Application Developer > > T: +64 7 859 2120 > F: +64 7 859 2320 > E: orion.edwards at open2view.com > > Open2view.com > The Real Estate Website > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > From tmilker at gmail.com Thu Oct 23 12:31:49 2008 From: tmilker at gmail.com (Ted Milker) Date: Thu, 23 Oct 2008 11:31:49 -0500 Subject: [Ironruby-core] IronRuby Compiles Broken? Message-ID: <7d8bf26d0810230931m422dd322j3c09c43032522bba@mail.gmail.com> Is the IronRuby tree currently broken for compiles? I have tried everything I can think of to get it to build and I just get: Setting environment for using Microsoft Visual Studio 2008 x86 tools. c:\Users\ted\Desktop\IronRuby>rake compile (in c:/Users/ted/Desktop/IronRuby) Read in 17 resources from "c:\users\ted\desktop\ironruby\src\microsoft.scripting \math\MathResources.resx" Writing resource file... Done. The command line is too long. rake aborted! Command failed with status (1): [csc /out:"c:\users\ted\desktop\ironruby\bu...] c:/Users/ted/Desktop/IronRuby/rakefile:284 (See full trace by running task with --trace) c:\Users\ted\Desktop\IronRuby> I am running on Vista Ultimate 64bit with Visual Studio 2008 Professional. I have tried both the 32bit and 64bit command line shortcuts and I just cannot get past "The command line is too long." I cannot even figure out which command line is too long. I have tried on two different machines(both Vista Ultimate 64bit) with the same results. From ivan at flanders.co.nz Thu Oct 23 12:49:49 2008 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Thu, 23 Oct 2008 18:49:49 +0200 Subject: [Ironruby-core] IronRuby Compiles Broken? In-Reply-To: <7d8bf26d0810230931m422dd322j3c09c43032522bba@mail.gmail.com> References: <7d8bf26d0810230931m422dd322j3c09c43032522bba@mail.gmail.com> Message-ID: I got the same errors yesterday. I could build it using visual studio though. Mine was on vista 32-bit in both powershell and command On Thu, Oct 23, 2008 at 6:31 PM, Ted Milker wrote: > Is the IronRuby tree currently broken for compiles? I have tried > everything I can think of to get it to build and I just get: > > Setting environment for using Microsoft Visual Studio 2008 x86 tools. > > c:\Users\ted\Desktop\IronRuby>rake compile > (in c:/Users/ted/Desktop/IronRuby) > Read in 17 resources from > "c:\users\ted\desktop\ironruby\src\microsoft.scripting > \math\MathResources.resx" > Writing resource file... Done. > The command line is too long. > rake aborted! > Command failed with status (1): [csc > /out:"c:\users\ted\desktop\ironruby\bu...] > c:/Users/ted/Desktop/IronRuby/rakefile:284 > (See full trace by running task with --trace) > > c:\Users\ted\Desktop\IronRuby> > > I am running on Vista Ultimate 64bit with Visual Studio 2008 > Professional. I have tried both the 32bit and 64bit command line > shortcuts and I just cannot get past "The command line is too long." > I cannot even figure out which command line is too long. I have tried > on two different machines(both Vista Ultimate 64bit) with the same > results. > _______________________________________________ > 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 tmilker at gmail.com Thu Oct 23 13:33:50 2008 From: tmilker at gmail.com (Ted Milker) Date: Thu, 23 Oct 2008 12:33:50 -0500 Subject: [Ironruby-core] IronRuby Compiles Broken? In-Reply-To: References: <7d8bf26d0810230931m422dd322j3c09c43032522bba@mail.gmail.com> Message-ID: <7d8bf26d0810231033u2271ff1bse605d0744cd7a86a@mail.gmail.com> On Thu, Oct 23, 2008 at 11:49 AM, Ivan Porto Carrero wrote: > I got the same errors yesterday. I could build it using visual studio > though. > Mine was on vista 32-bit in both powershell and command Wow, I sure was overlooking the obvious. I have been fighting this since the weekend, trying to figure out what was wrong. I was reading your book and have been trying to build with your instructions in the first chapter and I totally missed the solution file. From ivan at flanders.co.nz Thu Oct 23 14:40:10 2008 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Thu, 23 Oct 2008 20:40:10 +0200 Subject: [Ironruby-core] IronRuby Compiles Broken? In-Reply-To: <7d8bf26d0810231033u2271ff1bse605d0744cd7a86a@mail.gmail.com> References: <7d8bf26d0810230931m422dd322j3c09c43032522bba@mail.gmail.com> <7d8bf26d0810231033u2271ff1bse605d0744cd7a86a@mail.gmail.com> Message-ID: Great to hear somebody is reading it :) Thanks I'll add it to the first chapter that you can also build it using visual studio. I guess by the time ironruby releases I'll just replace that section with a how to download the binaries ;) On Thu, Oct 23, 2008 at 7:33 PM, Ted Milker wrote: > On Thu, Oct 23, 2008 at 11:49 AM, Ivan Porto Carrero > wrote: > > I got the same errors yesterday. I could build it using visual studio > > though. > > Mine was on vista 32-bit in both powershell and command > > Wow, I sure was overlooking the obvious. I have been fighting this > since the weekend, trying to figure out what was wrong. I was reading > your book and have been trying to build with your instructions in the > first chapter and I totally missed the solution file. > _______________________________________________ > 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 Oct 23 16:48:48 2008 From: lists at ruby-forum.com (Pat Gannon) Date: Thu, 23 Oct 2008 22:48:48 +0200 Subject: [Ironruby-core] Cucumber / RSpec Story Runner In-Reply-To: References: <9319fe7416065945f7de725dce3272fe@ruby-forum.com> <48FE8A0B.9000502@open2view.com> <48FE91DF.7010803@open2view.com> <372109E149E8084D8E6C7D9CFD82E063334B4E79B2@NA-EXMSG-C115.redmond.corp.microsoft.com> <372109E149E8084D8E6C7D9CFD82E063334B4E79BE@NA-EXMSG-C115.redmond.corp.microsoft.com> <372109E149E8084D8E6C7D9CFD82E063334B4E79C0@NA-EXMSG-C115.redmond.corp.microsoft.com> <48FF8552.1060705@open2view.com> Message-ID: After a lot of experimentation and hacking, I was able to get Cucumber to work with IronRuby (mostly). I was not able to get the Cucumber output in ANSI color, but it works out fine in black and white. I also had to disable the functionality in Cucumber that prints the source file and line of code associated with each step. Finally, I had to re-wire the way expectations are propagated from specification failures. I have posted the instructions to get Cucumber working with IronRuby here: http://www.patrickgannon.net/archive/2008/10/23/bdd-style-feature-tests-using-ironruby-and-rspeccucumber.aspx Thanks, Pat Gannon -- Posted via http://www.ruby-forum.com/. From curth at microsoft.com Fri Oct 24 11:23:24 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Fri, 24 Oct 2008 08:23:24 -0700 Subject: [Ironruby-core] Code Review: RandomRubyFixes05 Message-ID: tfpt review "/shelveset:RandomRubyFixes05;REDMOND\curth" Comment : Factored class IOWrapper.cs out of Marshal and into the Ruby core so it can be accessed from multiple places Factored object creation out of Marshal and into RubyUtils so it can share code with Yaml Disabled name-mangling for symbol "initialize" so that CLR methods with the name Initialize don't cause trouble Implemented String.hex and String.oct Modified Socket and StringIO classes so they open in binary mode by default Extensive modifications to zlib: Fixed uncompressed blocks to inflate properly Reformatted to match standard Many small changes to cleanup code and improve performance Added support for reading from any object implementing "read" -- not just IO objects -- by using IOWrapper Added an overload to IO.seek that accepts BigInteger. (This turned out not to be needed, but the code works.) Modified Yaml construction to call yaml_initialize if it exists -- Curt Hagenlocher curth at microsoft.com -------------- next part -------------- A non-text attachment was scrubbed... Name: RandomRubyFixes05.diff Type: application/octet-stream Size: 138733 bytes Desc: RandomRubyFixes05.diff URL: From Tomas.Matousek at microsoft.com Fri Oct 24 13:18:55 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Fri, 24 Oct 2008 10:18:55 -0700 Subject: [Ironruby-core] Code Review: RandomRubyFixes05 In-Reply-To: References: Message-ID: Looks good. There is a minor formatting glitch in RubyUtils: return new RubyCompilerOptions(targetScope.ExecutionContext.Context.RubyOptions) { } (the opening brace on a new line). I guess you need to set this in VS formatting options. Tomas -----Original Message----- From: Curt Hagenlocher Sent: Friday, October 24, 2008 8:23 AM To: IronRuby External Code Reviewers; Oleg Tkachenko Cc: ironruby-core at rubyforge.org Subject: Code Review: RandomRubyFixes05 tfpt review "/shelveset:RandomRubyFixes05;REDMOND\curth" Comment : Factored class IOWrapper.cs out of Marshal and into the Ruby core so it can be accessed from multiple places Factored object creation out of Marshal and into RubyUtils so it can share code with Yaml Disabled name-mangling for symbol "initialize" so that CLR methods with the name Initialize don't cause trouble Implemented String.hex and String.oct Modified Socket and StringIO classes so they open in binary mode by default Extensive modifications to zlib: Fixed uncompressed blocks to inflate properly Reformatted to match standard Many small changes to cleanup code and improve performance Added support for reading from any object implementing "read" -- not just IO objects -- by using IOWrapper Added an overload to IO.seek that accepts BigInteger. (This turned out not to be needed, but the code works.) Modified Yaml construction to call yaml_initialize if it exists -- Curt Hagenlocher curth at microsoft.com From Tomas.Matousek at microsoft.com Fri Oct 24 14:16:57 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Fri, 24 Oct 2008 11:16:57 -0700 Subject: [Ironruby-core] Code Review: miscrubyfixes Message-ID: tfpt review "/shelveset:miscrubyfixes;REDMOND\tomat" Comment : Implements range conditions: - If a range whose bounds are not integer literals is used as a control flow condition (if/unless/while-loop/until-loop/?:) it is considered a 'range condition'. It returns true/false depending on whether the execution state is in the range or not (the state is maintained in a local variable). - Adjusts ParseTree to return flip2, flip3 nodes for range conditions. - Removes compile time checks of range bounds - they should be evaluated at runtime. Implements regex conditions: A regex in a condition should perform match against $_. Converts a call to =~ method to MatchExpression if the left hand side is a regex expression (MRI doesn't call =~ method in that case). Stops using dynamic sites for Proc#call, we can easily use block dispatchers. Fixes bugs: - def f; yield; end; f {|a,b,*c| p [a,b,c] } - proc{|x,| x}.call([1]).should == [1] ... This is actually inconsistent with yield in MRI. We had it consistent :-/. - [ ironruby-Bugs-21258 ] Can't splat to unwrap an array of exceptions. - Symbol#inspect should quote only symbols that are not valid variable/method/operator names. - Fixes 'defined?' for qualified constants and methods. Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: miscrubyfixes.diff Type: application/octet-stream Size: 685667 bytes Desc: miscrubyfixes.diff URL: From olegtk at microsoft.com Fri Oct 24 14:22:36 2008 From: olegtk at microsoft.com (Oleg Tkachenko) Date: Fri, 24 Oct 2008 11:22:36 -0700 Subject: [Ironruby-core] Code Review: RandomRubyFixes05 In-Reply-To: References: Message-ID: YAML changes look good too. -- Oleg -----Original Message----- From: Curt Hagenlocher Sent: Friday, October 24, 2008 8:23 AM To: IronRuby External Code Reviewers; Oleg Tkachenko Cc: ironruby-core at rubyforge.org Subject: Code Review: RandomRubyFixes05 tfpt review "/shelveset:RandomRubyFixes05;REDMOND\curth" Comment : Factored class IOWrapper.cs out of Marshal and into the Ruby core so it can be accessed from multiple places Factored object creation out of Marshal and into RubyUtils so it can share code with Yaml Disabled name-mangling for symbol "initialize" so that CLR methods with the name Initialize don't cause trouble Implemented String.hex and String.oct Modified Socket and StringIO classes so they open in binary mode by default Extensive modifications to zlib: Fixed uncompressed blocks to inflate properly Reformatted to match standard Many small changes to cleanup code and improve performance Added support for reading from any object implementing "read" -- not just IO objects -- by using IOWrapper Added an overload to IO.seek that accepts BigInteger. (This turned out not to be needed, but the code works.) Modified Yaml construction to call yaml_initialize if it exists -- Curt Hagenlocher curth at microsoft.com From curth at microsoft.com Fri Oct 24 18:23:16 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Fri, 24 Oct 2008 15:23:16 -0700 Subject: [Ironruby-core] Code Review: miscrubyfixes In-Reply-To: References: Message-ID: Looks good. -----Original Message----- From: Tomas Matousek Sent: Friday, October 24, 2008 11:17 AM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: miscrubyfixes tfpt review "/shelveset:miscrubyfixes;REDMOND\tomat" Comment : Implements range conditions: - If a range whose bounds are not integer literals is used as a control flow condition (if/unless/while-loop/until-loop/?:) it is considered a 'range condition'. It returns true/false depending on whether the execution state is in the range or not (the state is maintained in a local variable). - Adjusts ParseTree to return flip2, flip3 nodes for range conditions. - Removes compile time checks of range bounds - they should be evaluated at runtime. Implements regex conditions: A regex in a condition should perform match against $_. Converts a call to =~ method to MatchExpression if the left hand side is a regex expression (MRI doesn't call =~ method in that case). Stops using dynamic sites for Proc#call, we can easily use block dispatchers. Fixes bugs: - def f; yield; end; f {|a,b,*c| p [a,b,c] } - proc{|x,| x}.call([1]).should == [1] ... This is actually inconsistent with yield in MRI. We had it consistent :-/. - [ ironruby-Bugs-21258 ] Can't splat to unwrap an array of exceptions. - Symbol#inspect should quote only symbols that are not valid variable/method/operator names. - Fixes 'defined?' for qualified constants and methods. Tomas From curth at microsoft.com Fri Oct 24 20:54:21 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Fri, 24 Oct 2008 17:54:21 -0700 Subject: [Ironruby-core] Overriding CLS Virtuals Message-ID: We're thinking now that we're going to go with the mangled version of the name instead of the originally cased-version. "Dispose" just doesn't look Rubyish enough. Any objections? From: Curt Hagenlocher Sent: Monday, September 08, 2008 9:22 PM To: 'ironruby-core at rubyforge.org' Subject: Overriding CLS Virtuals I've committed some changes to IronRuby (in SVN revision 141) that let you implement CLS interfaces and override virtual methods on CLS base types. Interfaces work like Ruby modules, so to make your class implement IDisposable you could say require 'mscorlib' class Disposable include System.IDisposable def Dispose # Do something end end You can also override virtual properties. A class or interface that has the C# declaration "string Value { get; set; }" is overridden from IronRuby with methods named "Value" for the getter and "Value=" for the setter. Note that you need to use the same casing as the CLS definition for both methods and properties. We're just getting started with better .NET interop support and don't have very much test coverage yet - but this should let you get going on some more sophisticated interop scenarios than were previously possible. -- Curt Hagenlocher curth at microsoft.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From tmilker at gmail.com Fri Oct 24 21:11:23 2008 From: tmilker at gmail.com (Ted Milker) Date: Fri, 24 Oct 2008 20:11:23 -0500 Subject: [Ironruby-core] Overriding CLS Virtuals In-Reply-To: References: Message-ID: <7d8bf26d0810241811l6896f0e8kb49ddc754eb703ed@mail.gmail.com> On Fri, Oct 24, 2008 at 7:54 PM, Curt Hagenlocher wrote: > We're thinking now that we're going to go with the mangled version of the > name instead of the originally cased-version. "Dispose" just doesn't look > Rubyish enough. Any objections? My opinion does not count for much but I love Ruby openness and hate the naming conventions. I much prefer camel case and .NET guidelines for naming than underscore and lowercase hell. I am just getting started with Ruby and have no intention of following the naming conventions if I can avoid it. IronRuby and .NET are my platform of choice for the future, even in its immature state. From michael.letterle at gmail.com Fri Oct 24 21:20:34 2008 From: michael.letterle at gmail.com (Michael Letterle) Date: Fri, 24 Oct 2008 21:20:34 -0400 Subject: [Ironruby-core] Overriding CLS Virtuals In-Reply-To: References: Message-ID: Do it. :) On Fri, Oct 24, 2008 at 8:54 PM, Curt Hagenlocher wrote: > We're thinking now that we're going to go with the mangled version of the > name instead of the originally cased-version. "Dispose" just doesn't look > Rubyish enough. Any objections? > > > > *From:* Curt Hagenlocher > *Sent:* Monday, September 08, 2008 9:22 PM > *To:* 'ironruby-core at rubyforge.org' > *Subject:* Overriding CLS Virtuals > > > > I've committed some changes to IronRuby (in SVN revision 141) that let you > implement CLS interfaces and override virtual methods on CLS base types. > Interfaces work like Ruby modules, so to make your class implement > IDisposable you could say > > > > require 'mscorlib' > > class Disposable > > include System.IDisposable > > def Dispose > > # Do something > > end > > end > > > > You can also override virtual properties. A class or interface that has > the C# declaration "string Value { get; set; }" is overridden from IronRuby > with methods named "Value" for the getter and "Value=" for the setter. > > > > Note that you need to use the same casing as the CLS definition for both > methods and properties. > > > > We're just getting started with better .NET interop support and don't have > very much test coverage yet ? but this should let you get going on some more > sophisticated interop scenarios than were previously possible. > > > > -- > > Curt Hagenlocher > > curth at microsoft.com > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -- Michael Letterle [Polymath Prokrammer] http://blog.prokrams.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdeville at microsoft.com Fri Oct 24 21:55:44 2008 From: jdeville at microsoft.com (Jim Deville) Date: Fri, 24 Oct 2008 18:55:44 -0700 Subject: [Ironruby-core] Overriding CLS Virtuals Message-ID: Hey that's one of the best parts of Ruby, aside from the siglets and capitalization rules for constants, you _can_ do whatever naming you want. Glad to haave your support :) JD -----Original Message----- From: Ted Milker Sent: October 24, 2008 6:11 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Overriding CLS Virtuals On Fri, Oct 24, 2008 at 7:54 PM, Curt Hagenlocher wrote: > We're thinking now that we're going to go with the mangled version of the > name instead of the originally cased-version. "Dispose" just doesn't look > Rubyish enough. Any objections? My opinion does not count for much but I love Ruby openness and hate the naming conventions. I much prefer camel case and .NET guidelines for naming than underscore and lowercase hell. I am just getting started with Ruby and have no intention of following the naming conventions if I can avoid it. IronRuby and .NET are my platform of choice for the future, even in its immature state. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From blowmage at gmail.com Fri Oct 24 22:01:15 2008 From: blowmage at gmail.com (Mike Moore) Date: Fri, 24 Oct 2008 20:01:15 -0600 Subject: [Ironruby-core] Overriding CLS Virtuals In-Reply-To: References: Message-ID: On Fri, Oct 24, 2008 at 6:54 PM, Curt Hagenlocher wrote: > We're thinking now that we're going to go with the mangled version of the > name instead of the originally cased-version. "Dispose" just doesn't look > Rubyish enough. Any objections? > No objections. I'd prefer def dispose; end over def Dispose; end. -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowmage at gmail.com Fri Oct 24 22:07:19 2008 From: blowmage at gmail.com (Mike Moore) Date: Fri, 24 Oct 2008 20:07:19 -0600 Subject: [Ironruby-core] Overriding CLS Virtuals In-Reply-To: <7d8bf26d0810241811l6896f0e8kb49ddc754eb703ed@mail.gmail.com> References: <7d8bf26d0810241811l6896f0e8kb49ddc754eb703ed@mail.gmail.com> Message-ID: On Fri, Oct 24, 2008 at 7:11 PM, Ted Milker wrote: > > I much prefer camel case and .NET guidelines for naming than underscore and > lowercase hell. You'd like it better if you'd call it "snake case". :) -------------- next part -------------- An HTML attachment was scrubbed... URL: From orion.edwards at open2view.com Sat Oct 25 19:59:06 2008 From: orion.edwards at open2view.com (Orion Edwards) Date: Sun, 26 Oct 2008 12:59:06 +1300 Subject: [Ironruby-core] Overriding CLS Virtuals In-Reply-To: <7d8bf26d0810241811l6896f0e8kb49ddc754eb703ed@mail.gmail.com> References: <7d8bf26d0810241811l6896f0e8kb49ddc754eb703ed@mail.gmail.com> Message-ID: <2855F25E-34CC-40E4-8498-11ED32CAAD10@open2view.com> I used to think this kind of thing too. Each language (or large-subset-of-language) has it's own conventions. Examples: gnu/posix C: lower_underscore_case Microsoft C (eg the win32 api): UpperCamelCase Java: lowerCamelCase Javascript: lowerCamelCase .NET: UpperCamelCase (except local variables which seem to be lowerCamelCase) ruby/python: lower_underscore_case While none of the languages will stop you from using any conventions you like, it's MUCH easier to learn to put your ego aside, and go with the conventions. The simple fact is, you're going to be reading loads of sourcecode written by others in the form of examples and so forth, and if you get annoyed every time you see stuff you 'hate' - well you're going to be having a pretty unhappy time. On 25/10/2008, at 2:11 PM, Ted Milker wrote: > On Fri, Oct 24, 2008 at 7:54 PM, Curt Hagenlocher > wrote: >> We're thinking now that we're going to go with the mangled version >> of the >> name instead of the originally cased-version. "Dispose" just >> doesn't look >> Rubyish enough. Any objections? > > My opinion does not count for much but I love Ruby openness and hate > the naming conventions. I much prefer camel case and .NET guidelines > for naming than underscore and lowercase hell. I am just getting > started with Ruby and have no intention of following the naming > conventions if I can avoid it. IronRuby and .NET are my platform of > choice for the future, even in its immature state. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From tmilker at gmail.com Sun Oct 26 00:35:15 2008 From: tmilker at gmail.com (Ted Milker) Date: Sat, 25 Oct 2008 23:35:15 -0500 Subject: [Ironruby-core] Overriding CLS Virtuals In-Reply-To: <2855F25E-34CC-40E4-8498-11ED32CAAD10@open2view.com> References: <7d8bf26d0810241811l6896f0e8kb49ddc754eb703ed@mail.gmail.com> <2855F25E-34CC-40E4-8498-11ED32CAAD10@open2view.com> Message-ID: <7d8bf26d0810252135q2714d680kf2cc955e3100d3a0@mail.gmail.com> On Sat, Oct 25, 2008 at 6:59 PM, Orion Edwards wrote: > While none of the languages will stop you from using any conventions you > like, it's MUCH easier to learn to put your ego aside, and go with the > conventions. I agree, however, the DLR adds a twist to the formula. > The simple fact is, you're going to be reading loads of sourcecode written > by others in the form of examples and so forth, and if you get annoyed every > time you see stuff you 'hate' - well you're going to be having a pretty > unhappy time. I do not get annoyed if I am reading or programming in a single language. I do like to keep things simple though. If I am working in .NET, I am going to keep a single, consistent style convention for my source code. I am not going to maintain two different conventions just because I am using Ruby in half of my app and C# in the other. Even if it were pure Ruby in IronRuby, I would use .NET guidelines because I am almost certain to be using the .NET libraries in IronRuby. In this case and in my opinion, the framework determines the convention, not the languages used. One of the main reasons why I am interested in IronRuby is because it will give me access to WPF. GUIs with Ruby in Windows, I have learned, is a pretty painful and overall annoying experience compared to C# and WPF. I do have a particular dislike for the underscore key because of its placement on the keyboard as well. From curth at microsoft.com Sun Oct 26 01:20:41 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Sat, 25 Oct 2008 22:20:41 -0700 Subject: [Ironruby-core] Overriding CLS Virtuals In-Reply-To: <7d8bf26d0810252135q2714d680kf2cc955e3100d3a0@mail.gmail.com> References: <7d8bf26d0810241811l6896f0e8kb49ddc754eb703ed@mail.gmail.com> <2855F25E-34CC-40E4-8498-11ED32CAAD10@open2view.com> <7d8bf26d0810252135q2714d680kf2cc955e3100d3a0@mail.gmail.com> Message-ID: Let's say that w is a WPF window. That is, w = System::Windows::Window.new Then you can currently get the actual height of the window by saying either w.ActualHeight -or- w.actual_height. This is something that we don't intend to change. The nature of a dynamic call site is such that the method lookup is deferred until the point this code is reached, and then we're free to bind the actual call target using whatever semantics we please. We don't even have to pay any real overhead for this ability, because we cache the result of the lookups after they were made the first time and don't have to perform them again. (Window *is* after all, a *static* type. :) However, virtual calls from a C# application back into IronRuby are a different matter, due Ruby's dynamic nature. Here there is both a performance cost and a semantic cost for performing multiple lookups. The performance cost results from the fact that we have to check for two different symbol names on every CLS call to this method before we can identify that we need to delegate to the base class implementation. (To be fair, this, too could be cached, albeit with slightly greater difficulty.) The semantic cost is based in the confusion resulting when methods with both names are defined on the class. Should we call method "dispose" or method "Dispose"? or both? Finally, as you're probably aware by now, capitalization in Ruby is not simply a matter of convention. In many cases, the parser actually treats identifiers which start with a capital letter differently than it does identifiers that start lower case. Now it turns out that method names are one of the places where Ruby doesn't draw this distinction, but I'd guess that many Ruby programmers look at any identifier starting with a capital letter and think "that's a constant". -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ted Milker Sent: Saturday, October 25, 2008 9:35 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Overriding CLS Virtuals On Sat, Oct 25, 2008 at 6:59 PM, Orion Edwards wrote: > While none of the languages will stop you from using any conventions you > like, it's MUCH easier to learn to put your ego aside, and go with the > conventions. I agree, however, the DLR adds a twist to the formula. > The simple fact is, you're going to be reading loads of sourcecode written > by others in the form of examples and so forth, and if you get annoyed every > time you see stuff you 'hate' - well you're going to be having a pretty > unhappy time. I do not get annoyed if I am reading or programming in a single language. I do like to keep things simple though. If I am working in .NET, I am going to keep a single, consistent style convention for my source code. I am not going to maintain two different conventions just because I am using Ruby in half of my app and C# in the other. Even if it were pure Ruby in IronRuby, I would use .NET guidelines because I am almost certain to be using the .NET libraries in IronRuby. In this case and in my opinion, the framework determines the convention, not the languages used. One of the main reasons why I am interested in IronRuby is because it will give me access to WPF. GUIs with Ruby in Windows, I have learned, is a pretty painful and overall annoying experience compared to C# and WPF. I do have a particular dislike for the underscore key because of its placement on the keyboard as well. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From tmilker at gmail.com Sun Oct 26 02:12:13 2008 From: tmilker at gmail.com (Ted Milker) Date: Sun, 26 Oct 2008 01:12:13 -0500 Subject: [Ironruby-core] Overriding CLS Virtuals In-Reply-To: References: <7d8bf26d0810241811l6896f0e8kb49ddc754eb703ed@mail.gmail.com> <2855F25E-34CC-40E4-8498-11ED32CAAD10@open2view.com> <7d8bf26d0810252135q2714d680kf2cc955e3100d3a0@mail.gmail.com> Message-ID: <7d8bf26d0810252312q7d76fc82y152372abf6a4cf@mail.gmail.com> On Sun, Oct 26, 2008 at 12:20 AM, Curt Hagenlocher wrote: > > However, virtual calls from a C# application back into IronRuby are a different matter, due Ruby's dynamic nature. Here there is both a performance cost and a semantic cost for performing multiple lookups. The performance cost results from the fact that we have to check for two different symbol names on every CLS call to this method before we can identify that we need to delegate to the base class implementation. (To be fair, this, too could be cached, albeit with slightly greater difficulty.) The semantic cost is based in the confusion resulting when methods with both names are defined on the class. Should we call method "dispose" or method "Dispose"? or both? This is a tough one, glad I do not have to make the call. Pitfalls and trouble every way I try to think of it and type a response. :) My gut tells me that capitalization matters, regardless of The Ruby Way, when it comes to .NET. If you want to write a new Dispose, def Dispose. > Finally, as you're probably aware by now, capitalization in Ruby is not simply a matter of convention. In many cases, the parser actually treats identifiers which start with a capital letter differently than it does identifiers that start lower case. Now it turns out that method names are one of the places where Ruby doesn't draw this distinction, but I'd guess that many Ruby programmers look at any identifier starting with a capital letter and think "that's a constant". But given the following: def Foo "Bar" end Foo() what Ruby programmer would look at Foo and still think it is a constant? Of course, if I would have made it lowercase, the parentheses would not be necessary. My point is that the parentheses tell the reader that it is not a constant, but a method. Is there a situation where Foo could appear legally, as defined above, without parentheses and be confused for a constant? From blowmage at gmail.com Sun Oct 26 03:35:14 2008 From: blowmage at gmail.com (Mike Moore) Date: Sun, 26 Oct 2008 01:35:14 -0600 Subject: [Ironruby-core] Overriding CLS Virtuals In-Reply-To: References: <7d8bf26d0810241811l6896f0e8kb49ddc754eb703ed@mail.gmail.com> <2855F25E-34CC-40E4-8498-11ED32CAAD10@open2view.com> <7d8bf26d0810252135q2714d680kf2cc955e3100d3a0@mail.gmail.com> Message-ID: On Sat, Oct 25, 2008 at 11:20 PM, Curt Hagenlocher wrote: > Now it turns out that method names are one of the places where Ruby doesn't > draw this distinction, but I'd guess that many Ruby programmers look at any > identifier starting with a capital letter and think "that's a constant". Agreed. That's what I think when I see that. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdeville at microsoft.com Sun Oct 26 03:42:28 2008 From: jdeville at microsoft.com (Jim Deville) Date: Sun, 26 Oct 2008 00:42:28 -0700 Subject: [Ironruby-core] Overriding CLS Virtuals In-Reply-To: <7d8bf26d0810252312q7d76fc82y152372abf6a4cf@mail.gmail.com> References: <7d8bf26d0810241811l6896f0e8kb49ddc754eb703ed@mail.gmail.com> <2855F25E-34CC-40E4-8498-11ED32CAAD10@open2view.com> <7d8bf26d0810252135q2714d680kf2cc955e3100d3a0@mail.gmail.com> , <7d8bf26d0810252312q7d76fc82y152372abf6a4cf@mail.gmail.com> Message-ID: The parenthesis do give an important clue, and luckily they are required for calling a method with a constant identifier. As far as idioms and conventions go, I don't know how much of an official convention (as much as a Ruby convention is official) there is, but the few cases of capitalized methods I've seen do one of two things, cast to the name of the method (Kernel.Float for example) or they return a class. An example of the second is the R() method in _why's Camping framework, which returns a class for controllers. It's used in class definitions in this case: class Foo < R('/') end is a controller at the route / (root of the website). So since I'm used to that, I prefer seeing IDisposable use def dispose in my Ruby classes. JD ________________________________________ From: ironruby-core-bounces at rubyforge.org [ironruby-core-bounces at rubyforge.org] On Behalf Of Ted Milker [tmilker at gmail.com] Sent: Saturday, October 25, 2008 11:12 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Overriding CLS Virtuals On Sun, Oct 26, 2008 at 12:20 AM, Curt Hagenlocher wrote: > > However, virtual calls from a C# application back into IronRuby are a different matter, due Ruby's dynamic nature. Here there is both a performance cost and a semantic cost for performing multiple lookups. The performance cost results from the fact that we have to check for two different symbol names on every CLS call to this method before we can identify that we need to delegate to the base class implementation. (To be fair, this, too could be cached, albeit with slightly greater difficulty.) The semantic cost is based in the confusion resulting when methods with both names are defined on the class. Should we call method "dispose" or method "Dispose"? or both? This is a tough one, glad I do not have to make the call. Pitfalls and trouble every way I try to think of it and type a response. :) My gut tells me that capitalization matters, regardless of The Ruby Way, when it comes to .NET. If you want to write a new Dispose, def Dispose. > Finally, as you're probably aware by now, capitalization in Ruby is not simply a matter of convention. In many cases, the parser actually treats identifiers which start with a capital letter differently than it does identifiers that start lower case. Now it turns out that method names are one of the places where Ruby doesn't draw this distinction, but I'd guess that many Ruby programmers look at any identifier starting with a capital letter and think "that's a constant". But given the following: def Foo "Bar" end Foo() what Ruby programmer would look at Foo and still think it is a constant? Of course, if I would have made it lowercase, the parentheses would not be necessary. My point is that the parentheses tell the reader that it is not a constant, but a method. Is there a situation where Foo could appear legally, as defined above, without parentheses and be confused for a constant? _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From hooligan495 at gmail.com Sun Oct 26 08:58:35 2008 From: hooligan495 at gmail.com (Jay McGaffigan) Date: Sun, 26 Oct 2008 08:58:35 -0400 Subject: [Ironruby-core] Overriding CLS Virtuals In-Reply-To: <2855F25E-34CC-40E4-8498-11ED32CAAD10@open2view.com> References: <7d8bf26d0810241811l6896f0e8kb49ddc754eb703ed@mail.gmail.com> <2855F25E-34CC-40E4-8498-11ED32CAAD10@open2view.com> Message-ID: <4e4283b20810260558q1a754b7qb127f09a203e0237@mail.gmail.com> With respect to conventions the dynamic languages are the first languages that I've used that can actually depend on the casing (and pluralization) to work right (think active record models). Now it's no longer part of the "readability" factor of code but it can play an important part in how a DSL works. Jay On Sat, Oct 25, 2008 at 7:59 PM, Orion Edwards wrote: > I used to think this kind of thing too. > > Each language (or large-subset-of-language) has it's own conventions. > > Examples: > > gnu/posix C: lower_underscore_case > Microsoft C (eg the win32 api): UpperCamelCase > Java: lowerCamelCase > Javascript: lowerCamelCase > .NET: UpperCamelCase (except local variables which seem to be > lowerCamelCase) > ruby/python: lower_underscore_case > > While none of the languages will stop you from using any conventions you > like, it's MUCH easier to learn to put your ego aside, and go with the > conventions. > > The simple fact is, you're going to be reading loads of sourcecode written > by others in the form of examples and so forth, and if you get annoyed every > time you see stuff you 'hate' - well you're going to be having a pretty > unhappy time. > > > On 25/10/2008, at 2:11 PM, Ted Milker wrote: > > On Fri, Oct 24, 2008 at 7:54 PM, Curt Hagenlocher >> wrote: >> >>> We're thinking now that we're going to go with the mangled version of the >>> name instead of the originally cased-version. "Dispose" just doesn't >>> look >>> Rubyish enough. Any objections? >>> >> >> My opinion does not count for much but I love Ruby openness and hate >> the naming conventions. I much prefer camel case and .NET guidelines >> for naming than underscore and lowercase hell. I am just getting >> started with Ruby and have no intention of following the naming >> conventions if I can avoid it. IronRuby and .NET are my platform of >> choice for the future, even in its immature state. >> _______________________________________________ >> 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 tmilker at gmail.com Sun Oct 26 12:37:37 2008 From: tmilker at gmail.com (Ted Milker) Date: Sun, 26 Oct 2008 11:37:37 -0500 Subject: [Ironruby-core] Unicode Source Files Message-ID: <7d8bf26d0810260937g57bf5dbfi366b0b429fd7fd7@mail.gmail.com> Is the DLR going to be fixed so that it properly supports Unicode source files or is this an issue with IronRuby? If you attempt to create a new Code File with Visual Studio 2008 and call it test.rb and then execute it with: ScriptRuntime runtime = IronRuby.Ruby.CreateRuntime(); runtime.ExecuteFile( "test.rb" ); it blows up on the Unicode byte-order marker with: Unhandled Exception: Microsoft.Scripting.SyntaxErrorException: Invalid character '?' in expression at Microsoft.Scripting.ErrorSink.Add(SourceUnit source, String message, SourceSpan span, Int32 errorCode, Severity severity) in C:\Users\ted\Desktop\IronRuby\src\Microsoft.Scripting\ErrorSink.cs:line 34 at Microsoft.Scripting.ErrorCounter.Add(SourceUnit source, String message, SourceSpan span, Int32 errorCode, Severity severity) in C:\Users\ted\Desktop\IronRuby\src\Microsoft.Scripting\ErrorSink.cs:line 92 at IronRuby.Compiler.Tokenizer.Report(String message, Int32 errorCode, SourceSpan location, Severity severity) in C:\Users\ted\Desktop\IronRuby\src\ironruby\Compiler\Parser\Tokenizer.cs:line 430 at IronRuby.Compiler.Tokenizer.ReportError(ErrorInfo info, Object[] args) in C:\Users\ted\Desktop\IronRuby\src\ironruby\Compiler\Parser\Tokenizer.cs:line 442 at IronRuby.Compiler.Tokenizer.Tokenize(Boolean whitespaceSeen, Boolean cmdState) in C:\Users\ted\Desktop\IronRuby\src\ironruby\Compiler\Parser\Tokenizer.cs:line 966 at IronRuby.Compiler.Tokenizer.Tokenize() in C:\Users\ted\Desktop\IronRuby\src\ironruby\Compiler\Parser\Tokenizer.cs:line 739 at IronRuby.Compiler.Tokenizer.GetNextToken() in C:\Users\ted\Desktop\IronRuby\src\ironruby\Compiler\Parser\Tokenizer.cs:line 711 at IronRuby.Compiler.Parser.GetNextToken() in C:\Users\ted\Desktop\IronRuby\src\ironruby\Compiler\Parser\Parser.cs:line 99 at IronRuby.Compiler.ShiftReduceParser`2.Parse() in C:\Users\ted\Desktop\IronRuby\src\ironruby\Compiler\Parser\GPPG.cs:line 310 at IronRuby.Compiler.Parser.Parse(SourceUnit sourceUnit, RubyCompilerOptions options, ErrorSink errorSink) in C:\Users\ted\Desktop\IronRuby\src\ironruby\Compiler\Parser\Parser.cs:line 158 at IronRuby.Runtime.RubyContext.ParseSourceCode(SourceUnit sourceUnit, RubyCompilerOptions options, ErrorSink errorSink) in C:\Users\ted\Desktop\IronRuby\src\ironruby\Runtime\RubyContext.cs:line 203 at IronRuby.Runtime.RubyContext.CompileSourceCode(SourceUnit sourceUnit, CompilerOptions options, ErrorSink errorSink) in C:\Users\ted\Desktop\IronRuby\src\ironruby\Runtime\RubyContext.cs:line 179 at Microsoft.Scripting.SourceUnit.Compile(CompilerOptions options, ErrorSink errorSink) in C:\Users\ted\Desktop\IronRuby\src\Microsoft.Scripting\SourceUnit.cs:line 215 at Microsoft.Scripting.SourceUnit.Execute(Scope scope, ErrorSink errorSink) in C:\Users\ted\Desktop\IronRuby\src\Microsoft.Scripting\SourceUnit.cs:line 225 at Microsoft.Scripting.Hosting.ScriptSource.Execute(ScriptScope scope) in C:\Users\ted\Desktop\IronRuby\src\Microsoft.Scripting\Hosting\ScriptSource.cs:line 129 at Microsoft.Scripting.Hosting.ScriptEngine.ExecuteFile(String path, ScriptScope scope) in C:\Users\ted\Desktop\IronRuby\src\Microsoft.Scripting\Hosting\ScriptEngine.cs:line 159 at Microsoft.Scripting.Hosting.ScriptEngine.ExecuteFile(String path) in C:\Users\ted\Desktop\IronRuby\src\Microsoft.Scripting\Hosting\ScriptEngine.cs:line 148 at Microsoft.Scripting.Hosting.ScriptRuntime.ExecuteFile(String path) in C:\Users\ted\Desktop\IronRuby\src\Microsoft.Scripting\Hosting\ScriptRuntime.cs:line 257 at HostingDLRConsole.Program.Main(String[] args) in C:\Users\ted\Documents\Visual Studio 2008\Projects\Books\IronRuby in Action\HostingDLRConsole\HostingDLRConsole\Program.cs:line 14 Press any key to continue . . . I know I can fix this by using the Advanced Save Options but the DLR spec talks about Unicode support, so I assume this means that ScriptRuntime.ExecuteFile() should also support Unicode source files. From curth at microsoft.com Sun Oct 26 12:52:59 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Sun, 26 Oct 2008 09:52:59 -0700 Subject: [Ironruby-core] Unicode Source Files In-Reply-To: <7d8bf26d0810260937g57bf5dbfi366b0b429fd7fd7@mail.gmail.com> References: <7d8bf26d0810260937g57bf5dbfi366b0b429fd7fd7@mail.gmail.com> Message-ID: We do this for compatibility with Ruby 1.8.6, though as you can see, we don't have the error message quite right: PS F:\> C:\ruby\bin\ruby.exe x.rb x.rb:1: Invalid char `\377' in expression x.rb:1: Invalid char `\376' in expression :) I believe you'll need to save as UTF-8 and then manually strip the BOM in order to use Unicode source files -- hopefully Tomas will tell me if I'm wrong. Source encoding for Ruby is extremely tricky, and (from what I can tell) hasn't even yet been finalized for 1.9.x. We will eventually support whatever the Ruby standards are. -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ted Milker Sent: Sunday, October 26, 2008 9:38 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Unicode Source Files Is the DLR going to be fixed so that it properly supports Unicode source files or is this an issue with IronRuby? If you attempt to create a new Code File with Visual Studio 2008 and call it test.rb and then execute it with: ScriptRuntime runtime = IronRuby.Ruby.CreateRuntime(); runtime.ExecuteFile( "test.rb" ); it blows up on the Unicode byte-order marker with: Unhandled Exception: Microsoft.Scripting.SyntaxErrorException: Invalid character '?' in expression at Microsoft.Scripting.ErrorSink.Add(SourceUnit source, String message, SourceSpan span, Int32 errorCode, Severity severity) in C:\Users\ted\Desktop\IronRuby\src\Microsoft.Scripting\ErrorSink.cs:line 34 at Microsoft.Scripting.ErrorCounter.Add(SourceUnit source, String message, SourceSpan span, Int32 errorCode, Severity severity) in C:\Users\ted\Desktop\IronRuby\src\Microsoft.Scripting\ErrorSink.cs:line 92 at IronRuby.Compiler.Tokenizer.Report(String message, Int32 errorCode, SourceSpan location, Severity severity) in C:\Users\ted\Desktop\IronRuby\src\ironruby\Compiler\Parser\Tokenizer.cs:line 430 at IronRuby.Compiler.Tokenizer.ReportError(ErrorInfo info, Object[] args) in C:\Users\ted\Desktop\IronRuby\src\ironruby\Compiler\Parser\Tokenizer.cs:line 442 at IronRuby.Compiler.Tokenizer.Tokenize(Boolean whitespaceSeen, Boolean cmdState) in C:\Users\ted\Desktop\IronRuby\src\ironruby\Compiler\Parser\Tokenizer.cs:line 966 at IronRuby.Compiler.Tokenizer.Tokenize() in C:\Users\ted\Desktop\IronRuby\src\ironruby\Compiler\Parser\Tokenizer.cs:line 739 at IronRuby.Compiler.Tokenizer.GetNextToken() in C:\Users\ted\Desktop\IronRuby\src\ironruby\Compiler\Parser\Tokenizer.cs:line 711 at IronRuby.Compiler.Parser.GetNextToken() in C:\Users\ted\Desktop\IronRuby\src\ironruby\Compiler\Parser\Parser.cs:line 99 at IronRuby.Compiler.ShiftReduceParser`2.Parse() in C:\Users\ted\Desktop\IronRuby\src\ironruby\Compiler\Parser\GPPG.cs:line 310 at IronRuby.Compiler.Parser.Parse(SourceUnit sourceUnit, RubyCompilerOptions options, ErrorSink errorSink) in C:\Users\ted\Desktop\IronRuby\src\ironruby\Compiler\Parser\Parser.cs:line 158 at IronRuby.Runtime.RubyContext.ParseSourceCode(SourceUnit sourceUnit, RubyCompilerOptions options, ErrorSink errorSink) in C:\Users\ted\Desktop\IronRuby\src\ironruby\Runtime\RubyContext.cs:line 203 at IronRuby.Runtime.RubyContext.CompileSourceCode(SourceUnit sourceUnit, CompilerOptions options, ErrorSink errorSink) in C:\Users\ted\Desktop\IronRuby\src\ironruby\Runtime\RubyContext.cs:line 179 at Microsoft.Scripting.SourceUnit.Compile(CompilerOptions options, ErrorSink errorSink) in C:\Users\ted\Desktop\IronRuby\src\Microsoft.Scripting\SourceUnit.cs:line 215 at Microsoft.Scripting.SourceUnit.Execute(Scope scope, ErrorSink errorSink) in C:\Users\ted\Desktop\IronRuby\src\Microsoft.Scripting\SourceUnit.cs:line 225 at Microsoft.Scripting.Hosting.ScriptSource.Execute(ScriptScope scope) in C:\Users\ted\Desktop\IronRuby\src\Microsoft.Scripting\Hosting\ScriptSource.cs:line 129 at Microsoft.Scripting.Hosting.ScriptEngine.ExecuteFile(String path, ScriptScope scope) in C:\Users\ted\Desktop\IronRuby\src\Microsoft.Scripting\Hosting\ScriptEngine.cs:line 159 at Microsoft.Scripting.Hosting.ScriptEngine.ExecuteFile(String path) in C:\Users\ted\Desktop\IronRuby\src\Microsoft.Scripting\Hosting\ScriptEngine.cs:line 148 at Microsoft.Scripting.Hosting.ScriptRuntime.ExecuteFile(String path) in C:\Users\ted\Desktop\IronRuby\src\Microsoft.Scripting\Hosting\ScriptRuntime.cs:line 257 at HostingDLRConsole.Program.Main(String[] args) in C:\Users\ted\Documents\Visual Studio 2008\Projects\Books\IronRuby in Action\HostingDLRConsole\HostingDLRConsole\Program.cs:line 14 Press any key to continue . . . I know I can fix this by using the Advanced Save Options but the DLR spec talks about Unicode support, so I assume this means that ScriptRuntime.ExecuteFile() should also support Unicode source files. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From tmilker at gmail.com Sun Oct 26 14:33:31 2008 From: tmilker at gmail.com (Ted Milker) Date: Sun, 26 Oct 2008 13:33:31 -0500 Subject: [Ironruby-core] Unicode Source Files In-Reply-To: References: <7d8bf26d0810260937g57bf5dbfi366b0b429fd7fd7@mail.gmail.com> Message-ID: <7d8bf26d0810261133y1feb838eg36e1aba1cee9dc62@mail.gmail.com> Why so rigorous? I understand the need to maintain compatibility but this effectively eliminates Visual Studio as an editor for .rb files, without some kind of clunky build mechanism. I guess I will just use an extension method to get around the behavior for the time being. >From the things I have read about Ruby and UTF-8, it seems more like it is just extremely broken, rather than extremely tricky. I still cannot even get pure Ruby stuff in Windows to work properly with UTF-8, like when using the Shoes toolkit for example. On Sun, Oct 26, 2008 at 11:52 AM, Curt Hagenlocher wrote: > We do this for compatibility with Ruby 1.8.6, though as you can see, we don't have the error message quite right: > > PS F:\> C:\ruby\bin\ruby.exe x.rb > x.rb:1: Invalid char `\377' in expression > x.rb:1: Invalid char `\376' in expression > > :) > > I believe you'll need to save as UTF-8 and then manually strip the BOM in order to use Unicode source files -- hopefully Tomas will tell me if I'm wrong. > > Source encoding for Ruby is extremely tricky, and (from what I can tell) hasn't even yet been finalized for 1.9.x. We will eventually support whatever the Ruby standards are. From tmilker at gmail.com Sun Oct 26 15:01:06 2008 From: tmilker at gmail.com (Ted Milker) Date: Sun, 26 Oct 2008 14:01:06 -0500 Subject: [Ironruby-core] Unicode Source Files In-Reply-To: <7d8bf26d0810261133y1feb838eg36e1aba1cee9dc62@mail.gmail.com> References: <7d8bf26d0810260937g57bf5dbfi366b0b429fd7fd7@mail.gmail.com> <7d8bf26d0810261133y1feb838eg36e1aba1cee9dc62@mail.gmail.com> Message-ID: <7d8bf26d0810261201i5c7a085bu4fa52e14012992e0@mail.gmail.com> Here is the extension method I am using if anyone else is interested: public static object ExecuteUnicodeFile( this ScriptRuntime rt, string filename ) { string rbCode; // OpenText will strip the BOM and keep the Unicode intact using( var rdr = File.OpenText( filename ) ) { rbCode = rdr.ReadToEnd(); } return IronRuby.Ruby.GetEngine( rt ).Execute( rbCode ); } It works great for using Japanese in strings in Ruby with IronRuby and WPF. From jdeville at microsoft.com Sun Oct 26 16:17:40 2008 From: jdeville at microsoft.com (Jim Deville) Date: Sun, 26 Oct 2008 13:17:40 -0700 Subject: [Ironruby-core] Unicode Source Files Message-ID: A lot of the work in 1.9 and 2.0 has gone to better unicode support. Most string handling functions are now codepoint aware, and there is now the ability for the source file to have an encoding attached to it. Like Curt said, these are in flex, but they are spec'd in RubySpec, so they are more than just fleeting ideas. If you are able to solve this with an extension method, then it looks likely that any VS integration work for IRb will take care of that. As it is, I use GVim for most of my Ruby coding these days. :) JD -----Original Message----- From: Ted Milker Sent: October 26, 2008 12:08 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Unicode Source Files Here is the extension method I am using if anyone else is interested: public static object ExecuteUnicodeFile( this ScriptRuntime rt, string filename ) { string rbCode; // OpenText will strip the BOM and keep the Unicode intact using( var rdr = File.OpenText( filename ) ) { rbCode = rdr.ReadToEnd(); } return IronRuby.Ruby.GetEngine( rt ).Execute( rbCode ); } It works great for using Japanese in strings in Ruby with IronRuby and WPF. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From curth at microsoft.com Sun Oct 26 16:31:29 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Sun, 26 Oct 2008 13:31:29 -0700 Subject: [Ironruby-core] Unicode Source Files In-Reply-To: <7d8bf26d0810261133y1feb838eg36e1aba1cee9dc62@mail.gmail.com> References: <7d8bf26d0810260937g57bf5dbfi366b0b429fd7fd7@mail.gmail.com> <7d8bf26d0810261133y1feb838eg36e1aba1cee9dc62@mail.gmail.com> Message-ID: If you save in "Western European (Windows) - Codepage 1252" from within Visual Studio, you'll get the right result -- as long as you're not using any characters with a codepoint greater than 127. And if you are, you're probably better off anyway expressing this code point as an explicit set of UTF-8 compatible bytes because -- as you've noticed -- Ruby's currently a bit weird in its Unicode support. -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ted Milker Sent: Sunday, October 26, 2008 11:34 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Unicode Source Files Why so rigorous? I understand the need to maintain compatibility but this effectively eliminates Visual Studio as an editor for .rb files, without some kind of clunky build mechanism. I guess I will just use an extension method to get around the behavior for the time being. >From the things I have read about Ruby and UTF-8, it seems more like it is just extremely broken, rather than extremely tricky. I still cannot even get pure Ruby stuff in Windows to work properly with UTF-8, like when using the Shoes toolkit for example. On Sun, Oct 26, 2008 at 11:52 AM, Curt Hagenlocher wrote: > We do this for compatibility with Ruby 1.8.6, though as you can see, we don't have the error message quite right: > > PS F:\> C:\ruby\bin\ruby.exe x.rb > x.rb:1: Invalid char `\377' in expression > x.rb:1: Invalid char `\376' in expression > > :) > > I believe you'll need to save as UTF-8 and then manually strip the BOM in order to use Unicode source files -- hopefully Tomas will tell me if I'm wrong. > > Source encoding for Ruby is extremely tricky, and (from what I can tell) hasn't even yet been finalized for 1.9.x. We will eventually support whatever the Ruby standards are. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From tmilker at gmail.com Sun Oct 26 16:57:24 2008 From: tmilker at gmail.com (Ted Milker) Date: Sun, 26 Oct 2008 15:57:24 -0500 Subject: [Ironruby-core] Unicode Source Files In-Reply-To: References: Message-ID: <7d8bf26d0810261357j63e7e4bq640049ffebac8526@mail.gmail.com> On Sun, Oct 26, 2008 at 3:17 PM, Jim Deville wrote: > > If you are able to solve this with an extension method, then it looks likely that any VS integration work for IRb will take care of that. As it is, I use GVim for most of my Ruby coding these days. :) I use ViEmu for the best of both worlds. :) From Tomas.Matousek at microsoft.com Sun Oct 26 17:36:07 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Sun, 26 Oct 2008 14:36:07 -0700 Subject: [Ironruby-core] Unicode Source Files In-Reply-To: <7d8bf26d0810261357j63e7e4bq640049ffebac8526@mail.gmail.com> References: <7d8bf26d0810261357j63e7e4bq640049ffebac8526@mail.gmail.com> Message-ID: You can switch to 1.9 compat mode by passing -19 argument on command line. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ted Milker Sent: Sunday, October 26, 2008 1:57 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Unicode Source Files On Sun, Oct 26, 2008 at 3:17 PM, Jim Deville wrote: > > If you are able to solve this with an extension method, then it looks likely that any VS integration work for IRb will take care of that. As it is, I use GVim for most of my Ruby coding these days. :) I use ViEmu for the best of both worlds. :) _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From Tomas.Matousek at microsoft.com Mon Oct 27 01:16:01 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Sun, 26 Oct 2008 22:16:01 -0700 Subject: [Ironruby-core] Code Review: ido1 Message-ID: tfpt review "/shelveset:ido1;REDMOND\tomat" Comment : Implements Call, GetMember and Create dynamic object operations. Removes IOldDynamicObject dependencies. Improves Ruby hosting API. Also simplifies implementation of the flip-flop operator. Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: ido1.diff Type: application/octet-stream Size: 49748 bytes Desc: ido1.diff URL: From curth at microsoft.com Mon Oct 27 01:37:40 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Sun, 26 Oct 2008 22:37:40 -0700 Subject: [Ironruby-core] Code Review: ido1 In-Reply-To: References: Message-ID: Looks good. -----Original Message----- From: Tomas Matousek Sent: Sunday, October 26, 2008 10:16 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: ido1 tfpt review "/shelveset:ido1;REDMOND\tomat" Comment : Implements Call, GetMember and Create dynamic object operations. Removes IOldDynamicObject dependencies. Improves Ruby hosting API. Also simplifies implementation of the flip-flop operator. Tomas From lists at ruby-forum.com Mon Oct 27 11:44:22 2008 From: lists at ruby-forum.com (Maurits Rijk) Date: Mon, 27 Oct 2008 16:44:22 +0100 Subject: [Ironruby-core] IronRuby for GIMP Message-ID: <8ce68595f83aba8ff0320141a506cfc7@ruby-forum.com> I'm completely new at IronRuby and I try to use it for writing GIMP plug-ins, using my GIMP# library (http://sourceforge.net/projects/gimp-sharp/). I have hacked up the following code: require "../../lib/gimp-sharp" require "mscorlib" class RubySample < Gimp::Plugin def initialize(args) super(args, 'RubySample') end end puts ARGV[0] RubySample.new(ARGV) --- But I get the following error: unknown: wrong number or type of arguments for `initialize' (ArgumentError) The Plugin class has a constructor that takes two arguments: an array of strings (the command line arguments) and a string. Does IronRuby have a different notion of arrays and/or strings than the CLR? If so, how do I convert them? Thanks, Maurits -- Posted via http://www.ruby-forum.com/. From Tomas.Matousek at microsoft.com Mon Oct 27 17:56:23 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Mon, 27 Oct 2008 14:56:23 -0700 Subject: [Ironruby-core] Code Review: IDO2 Message-ID: tfpt review "/shelveset:IDO2;REDMOND\tomat" Comment : Implements more of IDO in Ruby. Adds InvokeMember action to DynamicOperations and ObjectOperations. Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: IDO2.diff Type: application/octet-stream Size: 11708 bytes Desc: IDO2.diff URL: From curth at microsoft.com Mon Oct 27 18:13:59 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Mon, 27 Oct 2008 15:13:59 -0700 Subject: [Ironruby-core] Code Review: IDO2 In-Reply-To: References: Message-ID: Ruby changes look good, but shouldn't GetMember and InvokeMember be implemented on RubyModule.Meta instead of RubyClass.Meta? -----Original Message----- From: Tomas Matousek Sent: Monday, October 27, 2008 2:56 PM To: IronRuby External Code Reviewers; DLR Code Reviews Cc: ironruby-core at rubyforge.org Subject: Code Review: IDO2 tfpt review "/shelveset:IDO2;REDMOND\tomat" Comment : Implements more of IDO in Ruby. Adds InvokeMember action to DynamicOperations and ObjectOperations. Tomas From Tomas.Matousek at microsoft.com Tue Oct 28 02:24:43 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Mon, 27 Oct 2008 23:24:43 -0700 Subject: [Ironruby-core] Code Review: ContextMerge Message-ID: tfpt review "/shelveset:ContextMerge;REDMOND\tomat" Phase 1 of RubyContext and RubyExecutionContext merge. Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: ContextMerge.diff Type: application/octet-stream Size: 291251 bytes Desc: ContextMerge.diff URL: From curth at microsoft.com Tue Oct 28 11:21:46 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Tue, 28 Oct 2008 08:21:46 -0700 Subject: [Ironruby-core] Code Review: ContextMerge In-Reply-To: References: Message-ID: Looks good. -----Original Message----- From: Tomas Matousek Sent: Monday, October 27, 2008 11:25 PM To: IronRuby External Code Reviewers Cc: 'ironruby-core at rubyforge.org' Subject: Code Review: ContextMerge tfpt review "/shelveset:ContextMerge;REDMOND\tomat" Phase 1 of RubyContext and RubyExecutionContext merge. Tomas From Tomas.Matousek at microsoft.com Wed Oct 29 17:07:13 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Wed, 29 Oct 2008 14:07:13 -0700 Subject: [Ironruby-core] Code Review: LexicalScope2 Message-ID: tfpt review "/shelveset:LexicalScope2;REDMOND\tomat" Refactors and simplifies LexicalScope and allocation of local variables. Previously a LocalVariable instance was created per each local variable access, which is unnecessary. Also, since many scopes don't define any variables at all we allocate a variable dictionary lazily. In evals, we used to fallback to dynamic variable lookup in some cases even though we could lookup statically. Tomas From olegtk at microsoft.com Wed Oct 29 12:36:57 2008 From: olegtk at microsoft.com (Oleg Tkachenko) Date: Wed, 29 Oct 2008 09:36:57 -0700 Subject: [Ironruby-core] John Lam's IronRuby talk at PDC (video) Message-ID: Here is a video of John's PDC talk "IronRuby: The Right Language for the Right Job" - http://channel9.msdn.com/pdc2008/TL44 -- Oleg -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tomas.Matousek at microsoft.com Wed Oct 29 17:11:13 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Wed, 29 Oct 2008 14:11:13 -0700 Subject: [Ironruby-core] Code Review: LexicalScopes2 Message-ID: tfpt review "/shelveset:LexicalScopes2;REDMOND\tomat" The actual shelveset :) Refactors and simplifies LexicalScope and allocation of local variables. Previously a LocalVariable instance was created per each local variable access, which is unnecessary. Since many scopes don't define any variables at all we allocate a variable dictionary lazily. We also used to fallback to dynamic variable lookup in evals in some cases even though we could lookup statically. Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: LexicalScopes2.diff Type: application/octet-stream Size: 40425 bytes Desc: LexicalScopes2.diff URL: From jdeville at microsoft.com Wed Oct 29 19:03:43 2008 From: jdeville at microsoft.com (Jim Deville) Date: Wed, 29 Oct 2008 16:03:43 -0700 Subject: [Ironruby-core] IronRuby for GIMP In-Reply-To: <8ce68595f83aba8ff0320141a506cfc7@ruby-forum.com> References: <8ce68595f83aba8ff0320141a506cfc7@ruby-forum.com> Message-ID: Did anyone ever help you with this? -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Maurits Rijk Sent: Monday, October 27, 2008 8:44 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] IronRuby for GIMP I'm completely new at IronRuby and I try to use it for writing GIMP plug-ins, using my GIMP# library (http://sourceforge.net/projects/gimp-sharp/). I have hacked up the following code: require "../../lib/gimp-sharp" require "mscorlib" class RubySample < Gimp::Plugin def initialize(args) super(args, 'RubySample') end end puts ARGV[0] RubySample.new(ARGV) --- But I get the following error: unknown: wrong number or type of arguments for `initialize' (ArgumentError) The Plugin class has a constructor that takes two arguments: an array of strings (the command line arguments) and a string. Does IronRuby have a different notion of arrays and/or strings than the CLR? If so, how do I convert them? Thanks, Maurits -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From andrew at mindscape.co.nz Wed Oct 29 20:16:05 2008 From: andrew at mindscape.co.nz (Andrew Peters) Date: Thu, 30 Oct 2008 14:16:05 +1400 Subject: [Ironruby-core] Calling super from CLS override Message-ID: <771cfe010810291716h3d7fd465g4e0832e39d652aab@mail.gmail.com> Hi, Was wondering if this is currently possible as I'm currently getting: System.ArgumentException : wrong number or type of arguments for `Render' at _stub_$19##19(Closure , CallSite , RubyMethodScope , Object , Proc , Object ) C:\Dev\ironruby\trunk\src\Microsoft.Scripting.Core\Actions\MatchCaller.Generated.cs(40,0): at System.Scripting.Actions.MatchCaller.Call4[T0,T1,T2,T3,TRet](Func`6 target, CallSite site, Object[] args) C:\Dev\ironruby\trunk\src\Microsoft.Scripting.Core\Actions\CallSite.cs(275,0): at System.Scripting.Actions.CallSite`1.UpdateAndExecute(Object[] args) C:\Dev\ironruby\trunk\src\Microsoft.Scripting.Core\Actions\UpdateDelegates.Generated.cs(52,0): at System.Scripting.Actions.UpdateDelegates.Update4[T,T0,T1,T2,T3,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3) // c# public abstract class ViewBase { public virtual void Render(TextWriter textWriter) { } } // rb class MyView < ViewBase def Render(text_writer) super end end Cheers, Andrew. From Tomas.Matousek at microsoft.com Thu Oct 30 00:10:11 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Wed, 29 Oct 2008 21:10:11 -0700 Subject: [Ironruby-core] IronRuby for GIMP In-Reply-To: References: <8ce68595f83aba8ff0320141a506cfc7@ruby-forum.com> Message-ID: RubyArrays are not implicitly convertible to CLR arrays. You need something like: def to_string_vector array list = System::Collections::Generic::List[ClrString].new array.each {|x| list.add(x.to_s.to_clr_string) } list.to_array end Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jim Deville Sent: Wednesday, October 29, 2008 4:04 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] IronRuby for GIMP Did anyone ever help you with this? -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Maurits Rijk Sent: Monday, October 27, 2008 8:44 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] IronRuby for GIMP I'm completely new at IronRuby and I try to use it for writing GIMP plug-ins, using my GIMP# library (http://sourceforge.net/projects/gimp-sharp/). I have hacked up the following code: require "../../lib/gimp-sharp" require "mscorlib" class RubySample < Gimp::Plugin def initialize(args) super(args, 'RubySample') end end puts ARGV[0] RubySample.new(ARGV) --- But I get the following error: unknown: wrong number or type of arguments for `initialize' (ArgumentError) The Plugin class has a constructor that takes two arguments: an array of strings (the command line arguments) and a string. Does IronRuby have a different notion of arrays and/or strings than the CLR? If so, how do I convert them? Thanks, Maurits -- 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 curth at microsoft.com Thu Oct 30 00:43:00 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Wed, 29 Oct 2008 21:43:00 -0700 Subject: [Ironruby-core] Calling super from CLS override In-Reply-To: <771cfe010810291716h3d7fd465g4e0832e39d652aab@mail.gmail.com> References: <771cfe010810291716h3d7fd465g4e0832e39d652aab@mail.gmail.com> Message-ID: I'm fairly sure this was working at some point -- my bad for not adding an appropriate test :(. -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Andrew Peters Sent: Wednesday, October 29, 2008 5:16 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Calling super from CLS override Hi, Was wondering if this is currently possible as I'm currently getting: System.ArgumentException : wrong number or type of arguments for `Render' at _stub_$19##19(Closure , CallSite , RubyMethodScope , Object , Proc , Object ) C:\Dev\ironruby\trunk\src\Microsoft.Scripting.Core\Actions\MatchCaller.Generated.cs(40,0): at System.Scripting.Actions.MatchCaller.Call4[T0,T1,T2,T3,TRet](Func`6 target, CallSite site, Object[] args) C:\Dev\ironruby\trunk\src\Microsoft.Scripting.Core\Actions\CallSite.cs(275,0): at System.Scripting.Actions.CallSite`1.UpdateAndExecute(Object[] args) C:\Dev\ironruby\trunk\src\Microsoft.Scripting.Core\Actions\UpdateDelegates.Generated.cs(52,0): at System.Scripting.Actions.UpdateDelegates.Update4[T,T0,T1,T2,T3,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3) // c# public abstract class ViewBase { public virtual void Render(TextWriter textWriter) { } } // rb class MyView < ViewBase def Render(text_writer) super end end Cheers, Andrew. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From jdeville at microsoft.com Thu Oct 30 02:50:51 2008 From: jdeville at microsoft.com (Jim Deville) Date: Wed, 29 Oct 2008 23:50:51 -0700 Subject: [Ironruby-core] Calling super from CLS override In-Reply-To: References: <771cfe010810291716h3d7fd465g4e0832e39d652aab@mail.gmail.com>, Message-ID: I'll try to get the barebones structure in tomorrow so we can get tests in. JD ________________________________________ From: ironruby-core-bounces at rubyforge.org [ironruby-core-bounces at rubyforge.org] On Behalf Of Curt Hagenlocher [curth at microsoft.com] Sent: Wednesday, October 29, 2008 9:43 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Calling super from CLS override I'm fairly sure this was working at some point -- my bad for not adding an appropriate test :(. -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Andrew Peters Sent: Wednesday, October 29, 2008 5:16 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Calling super from CLS override Hi, Was wondering if this is currently possible as I'm currently getting: System.ArgumentException : wrong number or type of arguments for `Render' at _stub_$19##19(Closure , CallSite , RubyMethodScope , Object , Proc , Object ) C:\Dev\ironruby\trunk\src\Microsoft.Scripting.Core\Actions\MatchCaller.Generated.cs(40,0): at System.Scripting.Actions.MatchCaller.Call4[T0,T1,T2,T3,TRet](Func`6 target, CallSite site, Object[] args) C:\Dev\ironruby\trunk\src\Microsoft.Scripting.Core\Actions\CallSite.cs(275,0): at System.Scripting.Actions.CallSite`1.UpdateAndExecute(Object[] args) C:\Dev\ironruby\trunk\src\Microsoft.Scripting.Core\Actions\UpdateDelegates.Generated.cs(52,0): at System.Scripting.Actions.UpdateDelegates.Update4[T,T0,T1,T2,T3,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3) // c# public abstract class ViewBase { public virtual void Render(TextWriter textWriter) { } } // rb class MyView < ViewBase def Render(text_writer) super end end Cheers, Andrew. _______________________________________________ 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 andrew at mindscape.co.nz Thu Oct 30 03:00:16 2008 From: andrew at mindscape.co.nz (Andrew Peters) Date: Thu, 30 Oct 2008 21:00:16 +1400 Subject: [Ironruby-core] Passing block to CLS method via Action Message-ID: <771cfe010810300000s7a49405fhb3d07fa599f56612@mail.gmail.com> Will this ever be supported? // c# public void Tag(Action action) { action(); } // rb tag do puts 'yay!' end Cheers, Andrew. From Tomas.Matousek at microsoft.com Thu Oct 30 03:15:22 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Thu, 30 Oct 2008 00:15:22 -0700 Subject: [Ironruby-core] Passing block to CLS method via Action In-Reply-To: <771cfe010810300000s7a49405fhb3d07fa599f56612@mail.gmail.com> References: <771cfe010810300000s7a49405fhb3d07fa599f56612@mail.gmail.com> Message-ID: This should work: tag Action.new { puts 'foo' } Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Andrew Peters Sent: Thursday, October 30, 2008 12:00 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Passing block to CLS method via Action Will this ever be supported? // c# public void Tag(Action action) { action(); } // rb tag do puts 'yay!' end Cheers, Andrew. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From lists at ruby-forum.com Thu Oct 30 03:33:41 2008 From: lists at ruby-forum.com (Maurits Rijk) Date: Thu, 30 Oct 2008 08:33:41 +0100 Subject: [Ironruby-core] IronRuby for GIMP In-Reply-To: References: <8ce68595f83aba8ff0320141a506cfc7@ruby-forum.com> Message-ID: <20a0211b21e2d13cc5927a863e29b340@ruby-forum.com> Thanks! I'm still a bit surprised that one has to do the conversion explicitly. I would expect that either IronRuby uses CLR arrays (and strings) or would do the conversion implicitly for me. But as I said in my previous mail, I'm new to IronRuby and probably missing a whole bunch of design decisions and other relevant information. Regards, Maurits Tomas Matousek wrote: > RubyArrays are not implicitly convertible to CLR arrays. > > You need something like: > > def to_string_vector array > list = System::Collections::Generic::List[ClrString].new > array.each {|x| list.add(x.to_s.to_clr_string) } > list.to_array > end > > Tomas -- Posted via http://www.ruby-forum.com/. From andrew at mindscape.co.nz Thu Oct 30 07:25:53 2008 From: andrew at mindscape.co.nz (Andrew Peters) Date: Fri, 31 Oct 2008 01:25:53 +1400 Subject: [Ironruby-core] Another Interop Question Message-ID: <771cfe010810300425p72fa5541i7f695c011515df6b@mail.gmail.com> >From C#, is it possible to new up an instance of an IronRuby class and then invoke a method on it? I.e: var ruby = new StringBuilder(); ruby.AppendLine("class MyClass"); ruby.AppendLine(" def render"); ruby.AppendLine(" \"Hello!\""); ruby.AppendLine(" end"); ruby.AppendLine("end"); var scriptEngine = Ruby.CreateEngine(); scriptEngine.Execute(ruby.ToString()); var action = scriptEngine.CreateScriptSourceFromString("MyClass.method(:new)").Execute(); var o = scriptEngine.Operations.Call(action); // how to invoke render? Cheers, Andrew. From michael.letterle at gmail.com Thu Oct 30 10:05:21 2008 From: michael.letterle at gmail.com (Michael Letterle) Date: Thu, 30 Oct 2008 10:05:21 -0400 Subject: [Ironruby-core] IronRuby for GIMP In-Reply-To: References: <8ce68595f83aba8ff0320141a506cfc7@ruby-forum.com> Message-ID: FWIW I've used this helper method: class Array def to_clr_arr arr = System::Array.CreateInstance self[0].class.to_clr_type, self.length.to_clr_int self.each_with_index { |r, i| arr[i] = r } return arr end end Here's the to_clr_int method: class Object def to_clr_int System::Int32.parse(self.to_s) end end On Thu, Oct 30, 2008 at 12:10 AM, Tomas Matousek < Tomas.Matousek at microsoft.com> wrote: > RubyArrays are not implicitly convertible to CLR arrays. > > You need something like: > > def to_string_vector array > list = System::Collections::Generic::List[ClrString].new > array.each {|x| list.add(x.to_s.to_clr_string) } > list.to_array > end > > Tomas > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] On Behalf Of Jim Deville > Sent: Wednesday, October 29, 2008 4:04 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] IronRuby for GIMP > > Did anyone ever help you with this? > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] On Behalf Of Maurits Rijk > Sent: Monday, October 27, 2008 8:44 AM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] IronRuby for GIMP > > I'm completely new at IronRuby and I try to use it for writing GIMP > plug-ins, using my GIMP# library > (http://sourceforge.net/projects/gimp-sharp/). > > I have hacked up the following code: > > require "../../lib/gimp-sharp" > require "mscorlib" > > class RubySample < Gimp::Plugin > > def initialize(args) > super(args, 'RubySample') > end > > end > > puts ARGV[0] > RubySample.new(ARGV) > > --- > > But I get the following error: unknown: wrong number or type of > arguments for `initialize' (ArgumentError) > > The Plugin class has a constructor that takes two arguments: an array of > strings (the command line arguments) and a string. Does IronRuby have a > different notion of arrays and/or strings than the CLR? If so, how do I > convert them? > > Thanks, Maurits > -- > 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 > -- Michael Letterle [Polymath Prokrammer] http://blog.prokrams.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ruby-forum.com Thu Oct 30 10:45:16 2008 From: lists at ruby-forum.com (Maurits Rijk) Date: Thu, 30 Oct 2008 15:45:16 +0100 Subject: [Ironruby-core] IronRuby for GIMP In-Reply-To: References: <8ce68595f83aba8ff0320141a506cfc7@ruby-forum.com> Message-ID: Nice, the array conversion seems to work quite well. Right now I'm encountering the next problem. The Plugin base class (C#) has the follow signature: protected abstract IEnumerator ListProcedures(); How can I implement this in my IronRuby derived class? Of course I tried something like: def ListProcedures yield new Procedure(...) end However, this method never gets called. Thanks, Maurits -- Posted via http://www.ruby-forum.com/. From curth at microsoft.com Thu Oct 30 11:12:08 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Thu, 30 Oct 2008 08:12:08 -0700 Subject: [Ironruby-core] IronRuby for GIMP In-Reply-To: References: <8ce68595f83aba8ff0320141a506cfc7@ruby-forum.com> Message-ID: "yield" doesn't do in Ruby what it does in C#. You'll probably need to define your own enumerator class doing something like this: class ProcedureEnumerator include System::Collections::Generic::IEnumerator.of(Procedure) def initialize *proc_list @proc_list = proc_list @pos = 0 end def MoveNext @pos = @pos + 1 if @pos < @proc_list.length throw :IndexError if @pos < @proc_list.length end def Reset @pos = 0 end def Current @proc_list[@pos] end end def ListProcedure ProcedureEnumerator.new(Procedure.new(...)) end Alternatively, you could create a statically-typed list of Procedure and get an enumerator from that: list = System::Collections::Generic::List.of(Procedure) list.add(Procedure.new(...)) Finally, we're shortly going to change the naming policy for overrides of CLS virtual methods. When this happens, you'll need to define ProcedureEnumerator with the "rubified" method names: move_next, reset and current. -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Maurits Rijk Sent: Thursday, October 30, 2008 7:45 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] IronRuby for GIMP Nice, the array conversion seems to work quite well. Right now I'm encountering the next problem. The Plugin base class (C#) has the follow signature: protected abstract IEnumerator ListProcedures(); How can I implement this in my IronRuby derived class? Of course I tried something like: def ListProcedures yield new Procedure(...) end However, this method never gets called. Thanks, Maurits -- 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 Thu Oct 30 11:50:28 2008 From: lists at ruby-forum.com (Maurits Rijk) Date: Thu, 30 Oct 2008 16:50:28 +0100 Subject: [Ironruby-core] IronRuby for GIMP In-Reply-To: References: <8ce68595f83aba8ff0320141a506cfc7@ruby-forum.com> Message-ID: <77bdb2cfbcf08f814a06b693c5548d2c@ruby-forum.com> Hi Curt, Curt Hagenlocher wrote: > "yield" doesn't do in Ruby what it does in C#. Ah, I wasn't aware of that. > You'll probably need to define your own enumerator class doing something > like this: > def ListProcedure > ProcedureEnumerator.new(Procedure.new(...)) >end For some weird reason my method ListProcedure never gets called. At first I thought it might have the wrong signature, so I tried to override the simplest function in the Plugin base class (public virtual void Init() {}), but even that didn't work. Investigations will continue and of course all the help already given in this forum is very much appreciated! Thanks, Maurits -- Posted via http://www.ruby-forum.com/. From tmilker at gmail.com Thu Oct 30 12:11:46 2008 From: tmilker at gmail.com (Ted Milker) Date: Thu, 30 Oct 2008 11:11:46 -0500 Subject: [Ironruby-core] IronRuby for GIMP In-Reply-To: References: <8ce68595f83aba8ff0320141a506cfc7@ruby-forum.com> Message-ID: <7d8bf26d0810300911u3b711003sb1c874cffdff57c7@mail.gmail.com> On Thu, Oct 30, 2008 at 10:12 AM, Curt Hagenlocher wrote: > Finally, we're shortly going to change the naming policy for overrides of CLS virtual methods. When this happens, you'll need to define ProcedureEnumerator with the "rubified" method names: move_next, reset and current. I still do not like this decision. Any chance there could be a flag we could set to get back to using the normal .NET naming? From curth at microsoft.com Thu Oct 30 12:48:23 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Thu, 30 Oct 2008 09:48:23 -0700 Subject: [Ironruby-core] Code Review: LexicalScopes2 In-Reply-To: References: Message-ID: Looks good. -----Original Message----- From: Tomas Matousek Sent: Wednesday, October 29, 2008 2:11 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: LexicalScopes2 tfpt review "/shelveset:LexicalScopes2;REDMOND\tomat" The actual shelveset :) Refactors and simplifies LexicalScope and allocation of local variables. Previously a LocalVariable instance was created per each local variable access, which is unnecessary. Since many scopes don't define any variables at all we allocate a variable dictionary lazily. We also used to fallback to dynamic variable lookup in evals in some cases even though we could lookup statically. Tomas From curth at microsoft.com Thu Oct 30 19:00:07 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Thu, 30 Oct 2008 16:00:07 -0700 Subject: [Ironruby-core] IronRuby for GIMP In-Reply-To: <77bdb2cfbcf08f814a06b693c5548d2c@ruby-forum.com> References: <8ce68595f83aba8ff0320141a506cfc7@ruby-forum.com> <77bdb2cfbcf08f814a06b693c5548d2c@ruby-forum.com> Message-ID: Do you know that your script is being loaded at all? How are you integrating with the extension model (which no doubt expects an assembly)? -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Maurits Rijk Sent: Thursday, October 30, 2008 8:50 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] IronRuby for GIMP Hi Curt, Curt Hagenlocher wrote: > "yield" doesn't do in Ruby what it does in C#. Ah, I wasn't aware of that. > You'll probably need to define your own enumerator class doing something > like this: > def ListProcedure > ProcedureEnumerator.new(Procedure.new(...)) >end For some weird reason my method ListProcedure never gets called. At first I thought it might have the wrong signature, so I tried to override the simplest function in the Plugin base class (public virtual void Init() {}), but even that didn't work. Investigations will continue and of course all the help already given in this forum is very much appreciated! Thanks, Maurits -- 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 Thu Oct 30 21:17:45 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Thu, 30 Oct 2008 18:17:45 -0700 Subject: [Ironruby-core] Code Review: Contexts3 Message-ID: tfpt review "/shelveset:Contexts3;REDMOND\tomat" Contains the changes from previously reviewed shelveset IDO2 + following changes (I needed to merge these due to TFS shutdown): DLR, Python changes: Replaces CodeContext by LanguageContext in BinderOps.GetDelegate and related code. Ruby changes: Removes almost all uses of CodeContext from Ruby. Adds HasScope flag to RubyCallAction which determines whether the site takes RubyScope or RubyContext. CodeContext is not supported any more. Tomas -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Contexts3.diff Type: application/octet-stream Size: 965287 bytes Desc: Contexts3.diff URL: From andrew at mindscape.co.nz Thu Oct 30 21:40:07 2008 From: andrew at mindscape.co.nz (Andrew Peters) Date: Fri, 31 Oct 2008 14:40:07 +1300 Subject: [Ironruby-core] Another Interop Question In-Reply-To: <771cfe010810300425p72fa5541i7f695c011515df6b@mail.gmail.com> References: <771cfe010810300425p72fa5541i7f695c011515df6b@mail.gmail.com> Message-ID: <771cfe010810301840h3c687d33q636d5504e48efd2c@mail.gmail.com> No worries, I've found what I need in Phil Haack's IronRuby view engine sample. Cheers, Andrew. On Fri, Oct 31, 2008 at 12:25 AM, Andrew Peters wrote: > From C#, is it possible to new up an instance of an IronRuby class and > then invoke a method on it? > > I.e: > > var ruby = new StringBuilder(); > > ruby.AppendLine("class MyClass"); > ruby.AppendLine(" def render"); > ruby.AppendLine(" \"Hello!\""); > ruby.AppendLine(" end"); > ruby.AppendLine("end"); > > var scriptEngine = Ruby.CreateEngine(); > > scriptEngine.Execute(ruby.ToString()); > > var action = scriptEngine.CreateScriptSourceFromString("MyClass.method(:new)").Execute(); > > var o = scriptEngine.Operations.Call(action); > > // how to invoke render? > > Cheers, > > Andrew. > From curth at microsoft.com Thu Oct 30 22:18:48 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Thu, 30 Oct 2008 19:18:48 -0700 Subject: [Ironruby-core] Another Interop Question In-Reply-To: <771cfe010810301840h3c687d33q636d5504e48efd2c@mail.gmail.com> References: <771cfe010810300425p72fa5541i7f695c011515df6b@mail.gmail.com> <771cfe010810301840h3c687d33q636d5504e48efd2c@mail.gmail.com> Message-ID: Cool. Now you can provide an answer when the next person asks. :) -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Andrew Peters Sent: Thursday, October 30, 2008 6:40 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Another Interop Question No worries, I've found what I need in Phil Haack's IronRuby view engine sample. Cheers, Andrew. On Fri, Oct 31, 2008 at 12:25 AM, Andrew Peters wrote: > From C#, is it possible to new up an instance of an IronRuby class and > then invoke a method on it? > > I.e: > > var ruby = new StringBuilder(); > > ruby.AppendLine("class MyClass"); > ruby.AppendLine(" def render"); > ruby.AppendLine(" \"Hello!\""); > ruby.AppendLine(" end"); > ruby.AppendLine("end"); > > var scriptEngine = Ruby.CreateEngine(); > > scriptEngine.Execute(ruby.ToString()); > > var action = scriptEngine.CreateScriptSourceFromString("MyClass.method(:new)").Execute(); > > var o = scriptEngine.Operations.Call(action); > > // how to invoke render? > > Cheers, > > Andrew. > _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From lists at ruby-forum.com Fri Oct 31 03:40:55 2008 From: lists at ruby-forum.com (Maurits Rijk) Date: Fri, 31 Oct 2008 08:40:55 +0100 Subject: [Ironruby-core] IronRuby for GIMP In-Reply-To: References: <8ce68595f83aba8ff0320141a506cfc7@ruby-forum.com> <77bdb2cfbcf08f814a06b693c5548d2c@ruby-forum.com> Message-ID: <2a2f45ed840d8fae29cd1bf480ef9e4a@ruby-forum.com> Curt Hagenlocher wrote: > Do you know that your script is being loaded at all? How are you Yes, I'm very sure. The IronRuby class uses the constructor of the base class, which has some print statements in it. > integrating with the extension model (which no doubt expects an > assembly)? I use a require statement to load my gimp-sharp.dll. This seems to work quite well because GIMP actually loads my IronRuby plug-in. Only problem I still have is that it doesn't overload the abstract method ListProcedures, which means that the plug-in doesn't register itself yet. Thanks, Maurits -- Posted via http://www.ruby-forum.com/.