From wim at fixnum.org Tue Sep 2 15:35:44 2008 From: wim at fixnum.org (Wim Vander Schelden) Date: Tue, 2 Sep 2008 21:35:44 +0200 Subject: [Ironruby-core] IronRuby on Mono Message-ID: Hi, I was trying to build IronRuby from SVN head, but I encountered a few problems: 1. Several times in context.rb, there are calls to String#basename and String#dirname. These should probably be replaced by File.basename(some_string) and File.dirname(some_string), respectively. 2. After fixing this I encountered something an issue because the paths have been hard coded with "\" as the path separator, which doesn't work on non-Windows systems. Since I'm not sure where all these paths are coming from, and I don't want to break other things, I've added pathname = pathname.gsub('\\', File::SEPARATOR) at the beginning of the method. 3. This still doesn't fix things, as the method is receiving a filename surrounded by double quotes ("Actions\ActionSelfExpression.cs"), instead of just the filename. I'm not sure this is to be sure you don't mess up paths with spaces in them, but it causes trouble here. I've hacked around it by removing the quotes before changing the separator issue, but this is obviously a dirty hack. 4. After I did this, it turned out the path being passed resided in a subdirectory of the current directory, instead of the current directory itself. I'm not sure what to do about this issue. Are all the paths refering to ./src/microsoft.scripting/actions? Has anyone else tried running a recent version on Mono? -- Wim Vander Schelden http://fixnum.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From sanxiyn at gmail.com Tue Sep 2 17:27:15 2008 From: sanxiyn at gmail.com (Seo Sanghyeon) Date: Wed, 3 Sep 2008 06:27:15 +0900 Subject: [Ironruby-core] IronRuby on Mono In-Reply-To: References: Message-ID: <5b0248170809021427p36732b19u32104b75067eaa23@mail.gmail.com> 2008/9/3 Wim Vander Schelden : > Has anyone else tried running a recent version on Mono? Yes, please use patches here: http://sparcs.kaist.ac.kr/~tinuviel/download/IronRuby/ -- Seo Sanghyeon From wim at fixnum.org Tue Sep 2 17:50:07 2008 From: wim at fixnum.org (Wim Vander Schelden) Date: Tue, 2 Sep 2008 23:50:07 +0200 Subject: [Ironruby-core] IronRuby on Mono In-Reply-To: <5b0248170809021427p36732b19u32104b75067eaa23@mail.gmail.com> References: <5b0248170809021427p36732b19u32104b75067eaa23@mail.gmail.com> Message-ID: Ok, these patches get me past the errors I got earlier, but a few steps further I run into this: ./utils/helpers.cs(37,20): error CS1502: The best overloaded method match for `System.Reflection.Emit.DynamicMethod.DynamicMethod(string, System.Type, System.Type[], System.Reflection.Module)' has some invalid arguments /usr/lib/mono/2.0/mscorlib.dll (Location of the symbol related to previous error) ./utils/helpers.cs(37,20): error CS1503: Argument 4: Cannot convert type `bool' to `System.Reflection.Module' Compilation failed: 2 error(s), 12 warnings I'm using Mono 1.9.1. On Tue, Sep 2, 2008 at 11:27 PM, Seo Sanghyeon wrote: > 2008/9/3 Wim Vander Schelden : > > Has anyone else tried running a recent version on Mono? > > Yes, please use patches here: > http://sparcs.kaist.ac.kr/~tinuviel/download/IronRuby/ > > -- > Seo Sanghyeon > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -- Wim Vander Schelden http://fixnum.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From cjac at colliertech.org Tue Sep 2 17:52:12 2008 From: cjac at colliertech.org (C.J. Adams-Collier) Date: Tue, 2 Sep 2008 21:52:12 +0000 Subject: [Ironruby-core] IronRuby r128 on Mono In-Reply-To: <5b0248170808131030p4005e27due89cc0c6f80018f0@mail.gmail.com> References: <5b0248170808130011x3556269bvd0eb949cfe815af0@mail.gmail.com> <372109E149E8084D8E6C7D9CFD82E0633342CAA090@NA-EXMSG-C115.redmond.corp.microsoft.com> <5b0248170808131030p4005e27due89cc0c6f80018f0@mail.gmail.com> Message-ID: <20080902215212.GI11698@colliertech.org> On Thu, Aug 14, 2008 at 02:30:45AM +0900, Seo Sanghyeon wrote: > 2008/8/13 John Lam (IRONRUBY) : > > Curious - why did you have to change the visibility of the NodeFlags enum? > > A bug of Mono C# compiler. I am trying to find a small repro. Did this get reported to Marek & co.? -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature URL: From cjac at colliertech.org Tue Sep 2 18:02:24 2008 From: cjac at colliertech.org (C.J. Adams-Collier) Date: Tue, 2 Sep 2008 22:02:24 +0000 Subject: [Ironruby-core] Mono fixes committed In-Reply-To: <5b0248170808141321m1dc7742pf5ba891afe1e9530@mail.gmail.com> References: <5b0248170808141321m1dc7742pf5ba891afe1e9530@mail.gmail.com> Message-ID: <20080902220224.GJ11698@colliertech.org> On Fri, Aug 15, 2008 at 05:21:17AM +0900, Seo Sanghyeon wrote: > Thanks to Jim Deville, I got a SVN commit permission yesterday. I have > committed Mono fixes, so current SVN trunk should build with Mono SVN > trunk (sorry, you can't build with Mono 1.9.x.) > > r129: Do not use *.csproj which contains Windows paths > r130: Change the visibility of NodeFlags enum to workaround a Mono bug > r131: Add missing references > Seo, have you tried using xbuild to interpret the .csproj files? I hear it's a pretty good implementation of the msbuild stack. Or at least it's coming along well :) http://www.mono-project.com/Microsoft.Build PoC at Novell is Michael Hutchinson (mhutch on #mono) code is here: http://anonsvn.mono-project.com/viewvc/trunk/mcs/class/Microsoft.Build.Engine/ http://anonsvn.mono-project.com/viewvc/trunk/mcs/class/Microsoft.Build.Framework/ http://anonsvn.mono-project.com/viewvc/trunk/mcs/class/Microsoft.Build.Tasks/ http://anonsvn.mono-project.com/viewvc/trunk/mcs/class/Microsoft.Build.Utilities/ -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature URL: From cjac at colliertech.org Tue Sep 2 18:05:42 2008 From: cjac at colliertech.org (C.J. Adams-Collier) Date: Tue, 2 Sep 2008 22:05:42 +0000 Subject: [Ironruby-core] IronRuby Deployment Scenerio in Future... In-Reply-To: <5b0248170808271050j41d49c38l7feb2e8782bb7381@mail.gmail.com> References: <0cdeff6b13fc8758ff776c860965d999@ruby-forum.com> <5ed5bd8e47755236374071f8c178512c@ruby-forum.com> <372109E149E8084D8E6C7D9CFD82E06333433D64DE@NA-EXMSG-C115.redmond.corp.microsoft.com> <5b0248170808271050j41d49c38l7feb2e8782bb7381@mail.gmail.com> Message-ID: <20080902220541.GK11698@colliertech.org> On Thu, Aug 28, 2008 at 02:50:18AM +0900, Seo Sanghyeon wrote: > 2008/8/28 John Lam (IRONRUBY) : > > Even more to the point - why relational databases at all - especially for Web 2.0 style applications? Certainly none of the big boys (Google, Amazon, eBay, Yahoo etc.) use relational databases on their user-facing high-volume properties. > > Doesn't eBay use Oracle? Is this page outdated? > http://highscalability.com/ebay-architecture > > IIRC MySpace uses SQL Server. Is that not big enough for you? Heh, Amazon uses an RDBMS. There are services that are responsible for speaking to the DB, but yes, http://www.amazon.com/ does hit a database. Ask me how I know :) -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature URL: From sanxiyn at gmail.com Tue Sep 2 18:08:25 2008 From: sanxiyn at gmail.com (Seo Sanghyeon) Date: Wed, 3 Sep 2008 07:08:25 +0900 Subject: [Ironruby-core] IronRuby Deployment Scenerio in Future... In-Reply-To: <20080902220541.GK11698@colliertech.org> References: <0cdeff6b13fc8758ff776c860965d999@ruby-forum.com> <5ed5bd8e47755236374071f8c178512c@ruby-forum.com> <372109E149E8084D8E6C7D9CFD82E06333433D64DE@NA-EXMSG-C115.redmond.corp.microsoft.com> <5b0248170808271050j41d49c38l7feb2e8782bb7381@mail.gmail.com> <20080902220541.GK11698@colliertech.org> Message-ID: <5b0248170809021508k126a560bg4c285e609ca6647e@mail.gmail.com> 2008/9/3 C.J. Adams-Collier : > Heh, Amazon uses an RDBMS. There are services that are responsible > for speaking to the DB, but yes, http://www.amazon.com/ does hit a > database. Ask me how I know :) Which RDBMS? :) -- Seo Sanghyeon From cjac at colliertech.org Tue Sep 2 18:10:34 2008 From: cjac at colliertech.org (C.J. Adams-Collier) Date: Tue, 2 Sep 2008 22:10:34 +0000 Subject: [Ironruby-core] IronRuby on Mono In-Reply-To: <5b0248170809021427p36732b19u32104b75067eaa23@mail.gmail.com> References: <5b0248170809021427p36732b19u32104b75067eaa23@mail.gmail.com> Message-ID: <20080902221034.GL11698@colliertech.org> On Wed, Sep 03, 2008 at 06:27:15AM +0900, Seo Sanghyeon wrote: > 2008/9/3 Wim Vander Schelden : > > Has anyone else tried running a recent version on Mono? > > Yes, please use patches here: > http://sparcs.kaist.ac.kr/~tinuviel/download/IronRuby/ > Seo and I are working on constructing an automated build test machine. We'll document the process as we proceed. Keep your eye on http://ironruby.colliertech.org/ Cheers, C.J. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature URL: From sanxiyn at gmail.com Tue Sep 2 18:09:14 2008 From: sanxiyn at gmail.com (Seo Sanghyeon) Date: Wed, 3 Sep 2008 07:09:14 +0900 Subject: [Ironruby-core] IronRuby on Mono In-Reply-To: References: <5b0248170809021427p36732b19u32104b75067eaa23@mail.gmail.com> Message-ID: <5b0248170809021509s6db1721du74b473b2d93708fc@mail.gmail.com> 2008/9/3 Wim Vander Schelden : > I'm using Mono 1.9.1. Yes, these issues are fixed in SVN, but not fixed in any stable releases yet. -- Seo Sanghyeon From sanxiyn at gmail.com Tue Sep 2 18:10:37 2008 From: sanxiyn at gmail.com (Seo Sanghyeon) Date: Wed, 3 Sep 2008 07:10:37 +0900 Subject: [Ironruby-core] IronRuby r128 on Mono In-Reply-To: <20080902215212.GI11698@colliertech.org> References: <5b0248170808130011x3556269bvd0eb949cfe815af0@mail.gmail.com> <372109E149E8084D8E6C7D9CFD82E0633342CAA090@NA-EXMSG-C115.redmond.corp.microsoft.com> <5b0248170808131030p4005e27due89cc0c6f80018f0@mail.gmail.com> <20080902215212.GI11698@colliertech.org> Message-ID: <5b0248170809021510m2ba6ac7byf9376f907d8dace5@mail.gmail.com> 2008/9/3 C.J. Adams-Collier : > On Thu, Aug 14, 2008 at 02:30:45AM +0900, Seo Sanghyeon wrote: >> 2008/8/13 John Lam (IRONRUBY) : >> > Curious - why did you have to change the visibility of the NodeFlags enum? >> >> A bug of Mono C# compiler. I am trying to find a small repro. > > Did this get reported to Marek & co.? No, I failed to reduce the case. -- Seo Sanghyeon From steve.eichert at gmail.com Tue Sep 2 18:14:18 2008 From: steve.eichert at gmail.com (Steve Eichert) Date: Tue, 2 Sep 2008 18:14:18 -0400 Subject: [Ironruby-core] IronRuby Deployment Scenerio in Future... In-Reply-To: <20080902220541.GK11698@colliertech.org> References: <0cdeff6b13fc8758ff776c860965d999@ruby-forum.com> <5ed5bd8e47755236374071f8c178512c@ruby-forum.com> <372109E149E8084D8E6C7D9CFD82E06333433D64DE@NA-EXMSG-C115.redmond.corp.microsoft.com> <5b0248170808271050j41d49c38l7feb2e8782bb7381@mail.gmail.com> <20080902220541.GK11698@colliertech.org> Message-ID: How do you know? :) On Tue, Sep 2, 2008 at 6:05 PM, C.J. Adams-Collier wrote: > On Thu, Aug 28, 2008 at 02:50:18AM +0900, Seo Sanghyeon wrote: > > 2008/8/28 John Lam (IRONRUBY) : > > > Even more to the point - why relational databases at all - especially > for Web 2.0 style applications? Certainly none of the big boys (Google, > Amazon, eBay, Yahoo etc.) use relational databases on their user-facing > high-volume properties. > > > > Doesn't eBay use Oracle? Is this page outdated? > > http://highscalability.com/ebay-architecture > > > > IIRC MySpace uses SQL Server. Is that not big enough for you? > > Heh, Amazon uses an RDBMS. There are services that are responsible > for speaking to the DB, but yes, http://www.amazon.com/ does hit a > database. Ask me how I know :) > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.6 (GNU/Linux) > > iD8DBQFIvbi1XKBS0hdr6UYRAtuBAJ9i3z6Tv6gpaPnvwDqWwlj9PdjRIQCbBqmK > 6qaTsTuqDJiVedLgsJjfSBM= > =R9KO > -----END PGP SIGNATURE----- > > _______________________________________________ > 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 cjac at colliertech.org Tue Sep 2 18:33:29 2008 From: cjac at colliertech.org (C.J. Adams-Collier) Date: Tue, 2 Sep 2008 22:33:29 +0000 Subject: [Ironruby-core] IronRuby on Mono In-Reply-To: References: <5b0248170809021427p36732b19u32104b75067eaa23@mail.gmail.com> Message-ID: <20080902223328.GM11698@colliertech.org> hey there Wim, I just finished reviewing Seo's recent postings and it looks like IronRuby currently requires a Mono from subversion. We'd be happy to walk you through the process on #mono (irc.gimp.net). If you're familiar with ye olde autotools build system, you can grab the source from svn and go. $ svn co svn://anonsvn.mono-project.com/source/trunk/mono $ cd mono $ svn co svn://anonsvn.mono-project.com/source/trunk/mcs $ wget -O ~/.devenv http://www.colliertech.org/~cjac/scripts/_devenv.sh $ . ~/.devenv $ ./autogen.sh --prefix=$HOME/opt $ make $ make install ... $ which mono Cheers, C.J. On Tue, Sep 02, 2008 at 11:50:07PM +0200, Wim Vander Schelden wrote: > Ok, these patches get me past the errors I got earlier, but a few steps > further I run into this: > > ./utils/helpers.cs(37,20): error CS1502: The best overloaded method match > for `System.Reflection.Emit.DynamicMethod.DynamicMethod(string, System.Type, > System.Type[], System.Reflection.Module)' has some invalid arguments > /usr/lib/mono/2.0/mscorlib.dll (Location of the symbol related to previous > error) > ./utils/helpers.cs(37,20): error CS1503: Argument 4: Cannot convert type > `bool' to `System.Reflection.Module' > Compilation failed: 2 error(s), 12 warnings > > > I'm using Mono 1.9.1. > > On Tue, Sep 2, 2008 at 11:27 PM, Seo Sanghyeon wrote: > > > 2008/9/3 Wim Vander Schelden : > > > Has anyone else tried running a recent version on Mono? > > > > Yes, please use patches here: > > http://sparcs.kaist.ac.kr/~tinuviel/download/IronRuby/ > > > > -- > > Seo Sanghyeon > > _______________________________________________ > > Ironruby-core mailing list > > Ironruby-core at rubyforge.org > > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > > > -- > Wim Vander Schelden > http://fixnum.org > _______________________________________________ > 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: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature URL: From jflam at microsoft.com Wed Sep 3 01:04:56 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Tue, 2 Sep 2008 22:04:56 -0700 Subject: [Ironruby-core] Code Review: config-1 Message-ID: <372109E149E8084D8E6C7D9CFD82E06333435A9B6D@NA-EXMSG-C115.redmond.corp.microsoft.com> tfpt review "/shelveset:config-1;REDMOND\jflam" Comment : Updated the Rakefile to reflect the new DLR configuration settings. We now transform app.config to ir.exe.config based on whether it is a Merlin, Svn, or Binary distribution build / package. -------------- next part -------------- A non-text attachment was scrubbed... Name: config-1.diff Type: application/octet-stream Size: 9843 bytes Desc: config-1.diff URL: From curth at microsoft.com Wed Sep 3 11:30:39 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Wed, 3 Sep 2008 08:30:39 -0700 Subject: [Ironruby-core] Code Review: config-1 In-Reply-To: <372109E149E8084D8E6C7D9CFD82E06333435A9B6D@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <372109E149E8084D8E6C7D9CFD82E06333435A9B6D@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: Looks good. -----Original Message----- From: John Lam (IRONRUBY) Sent: Tuesday, September 02, 2008 10:05 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: config-1 tfpt review "/shelveset:config-1;REDMOND\jflam" Comment : Updated the Rakefile to reflect the new DLR configuration settings. We now transform app.config to ir.exe.config based on whether it is a Merlin, Svn, or Binary distribution build / package. From curth at microsoft.com Wed Sep 3 20:08:31 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Wed, 3 Sep 2008 17:08:31 -0700 Subject: [Ironruby-core] Code Review: RubyClrInterop03 Message-ID: tfpt review "/shelveset:RubyClrInterop03;REDMOND\curth" Comment : More Ruby CLR interop: Allow Ruby classes to implement / override virtual methods found in CLR base classes, including those from interfaces Support "super" calls on virtual methods The bulk of the new code is in ClsTypeEmitter.cs, which was largely derived from (and can be compared to) IronPython's NewTypeMaker.cs. -- Curt Hagenlocher curt at hagenlocher.org -------------- next part -------------- A non-text attachment was scrubbed... Name: RubyClrInterop03.diff Type: application/octet-stream Size: 99816 bytes Desc: RubyClrInterop03.diff URL: From jflam at microsoft.com Thu Sep 4 13:14:06 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Thu, 4 Sep 2008 10:14:06 -0700 Subject: [Ironruby-core] Code Review: config-2 Message-ID: <372109E149E8084D8E6C7D9CFD82E063334823498C@NA-EXMSG-C115.redmond.corp.microsoft.com> tfpt review "/shelveset:config-2;REDMOND\jflam" Comment : Updated Rakefile to correctly transform *.csproj files to map to a transformed app.config file which removes signing on SVN layout builds. -------------- next part -------------- A non-text attachment was scrubbed... Name: config-2.diff Type: application/octet-stream Size: 6493 bytes Desc: config-2.diff URL: From curth at microsoft.com Thu Sep 4 13:49:37 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Thu, 4 Sep 2008 10:49:37 -0700 Subject: [Ironruby-core] Code Review: config-2 In-Reply-To: <372109E149E8084D8E6C7D9CFD82E063334823498C@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <372109E149E8084D8E6C7D9CFD82E063334823498C@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: Changes look good. -----Original Message----- From: John Lam (IRONRUBY) Sent: Thursday, September 04, 2008 10:14 AM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: config-2 tfpt review "/shelveset:config-2;REDMOND\jflam" Comment : Updated Rakefile to correctly transform *.csproj files to map to a transformed app.config file which removes signing on SVN layout builds. From wim at fixnum.org Thu Sep 4 18:10:30 2008 From: wim at fixnum.org (Wim Vander Schelden) Date: Fri, 5 Sep 2008 00:10:30 +0200 Subject: [Ironruby-core] IronRuby on Mono In-Reply-To: <20080902223328.GM11698@colliertech.org> References: <5b0248170809021427p36732b19u32104b75067eaa23@mail.gmail.com> <20080902223328.GM11698@colliertech.org> Message-ID: I've built Mono from SVN (following the instructions found on http://www.mono-project.com/Compiling_Mono) now, but I'm still getting errors. The old ones are fixed, but now I'm getting these (output contains many more warnings, but I don't think those matter at the moment): ./ast/LambdaExpression.cs(178,20): error CS0122: `System.Linq.Expressions.Expression.Expression(System.Linq.Expressions.Expression, System.Collections.ObjectModel.ReadOnlyCollection)' is inaccessible due to its protection level /home/wim/usr/lib/mono/gac/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll (Location of the symbol related to previous error) ./ast/LambdaExpression.cs(178,20): error CS1729: The type `System.Linq.Expressions.Expression' does not contain a constructor that takes `5' arguments /home/wim/usr/lib/mono/gac/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll (Location of the symbol related to previous error) ./ast/LambdaExpression.cs(313,20): error CS0122: `System.Linq.Expressions.Expression.Expression(System.Linq.Expressions.Expression, System.Collections.ObjectModel.ReadOnlyCollection)' is inaccessible due to its protection level /home/wim/usr/lib/mono/gac/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll (Location of the symbol related to previous error) ./ast/LambdaExpression.cs(313,20): error CS1729: The type `System.Linq.Expressions.Expression' does not contain a constructor that takes `5' arguments /home/wim/usr/lib/mono/gac/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll (Location of the symbol related to previous error) Any help with this one? I'm really sorry to keep polluting the mailinglist with these problems, but I don't know where else to look. kind regards, Wim On Wed, Sep 3, 2008 at 12:33 AM, C.J. Adams-Collier wrote: > hey there Wim, > > I just finished reviewing Seo's recent postings and it looks like > IronRuby currently requires a Mono from subversion. We'd be happy to > walk you through the process on #mono (irc.gimp.net). If you're > familiar with ye olde autotools build system, you can grab the source > from svn and go. > > $ svn co svn://anonsvn.mono-project.com/source/trunk/mono > $ cd mono > $ svn co svn://anonsvn.mono-project.com/source/trunk/mcs > $ wget -O ~/.devenv http://www.colliertech.org/~cjac/scripts/_devenv.sh > $ . ~/.devenv > $ ./autogen.sh --prefix=$HOME/opt > $ make > $ make install > ... > $ which mono > > Cheers, > > C.J. > > On Tue, Sep 02, 2008 at 11:50:07PM +0200, Wim Vander Schelden wrote: > > Ok, these patches get me past the errors I got earlier, but a few steps > > further I run into this: > > > > ./utils/helpers.cs(37,20): error CS1502: The best overloaded method match > > for `System.Reflection.Emit.DynamicMethod.DynamicMethod(string, > System.Type, > > System.Type[], System.Reflection.Module)' has some invalid arguments > > /usr/lib/mono/2.0/mscorlib.dll (Location of the symbol related to > previous > > error) > > ./utils/helpers.cs(37,20): error CS1503: Argument 4: Cannot convert type > > `bool' to `System.Reflection.Module' > > Compilation failed: 2 error(s), 12 warnings > > > > > > I'm using Mono 1.9.1. > > > > On Tue, Sep 2, 2008 at 11:27 PM, Seo Sanghyeon > wrote: > > > > > 2008/9/3 Wim Vander Schelden : > > > > Has anyone else tried running a recent version on Mono? > > > > > > Yes, please use patches here: > > > http://sparcs.kaist.ac.kr/~tinuviel/download/IronRuby/ > > > > > > > -- > > > Seo Sanghyeon > > > _______________________________________________ > > > Ironruby-core mailing list > > > Ironruby-core at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > > > > > > > > -- > > Wim Vander Schelden > > http://fixnum.org > > > _______________________________________________ > > Ironruby-core mailing list > > Ironruby-core at rubyforge.org > > http://rubyforge.org/mailman/listinfo/ironruby-core > > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.6 (GNU/Linux) > > iD8DBQFIvb84XKBS0hdr6UYRAjuUAJ0TX+XeBGq91FKdAfFBmZuddg2H2QCeIQp4 > cbKyo6Gyh0/QhIfCsFS+GM8= > =aX75 > -----END PGP SIGNATURE----- > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -- Wim Vander Schelden http://fixnum.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From jb at nurv.fr Thu Sep 4 18:16:07 2008 From: jb at nurv.fr (Jb Evain) Date: Fri, 5 Sep 2008 00:16:07 +0200 Subject: [Ironruby-core] IronRuby on Mono In-Reply-To: References: <5b0248170809021427p36732b19u32104b75067eaa23@mail.gmail.com> <20080902223328.GM11698@colliertech.org> Message-ID: <69f7d8470809041516g3bf6e9d5w8f05cd149c544632@mail.gmail.com> Hey, On 9/5/08, Wim Vander Schelden wrote: > The old ones are fixed, but now I'm getting these Pass -noconfig to gmcs, that will prevent it to reference System.Core, which causes the conflicts you're seing. -- Jb Evain From hellosticky at gmail.com Fri Sep 5 02:41:58 2008 From: hellosticky at gmail.com (Hello Sticky) Date: Fri, 5 Sep 2008 02:41:58 -0400 Subject: [Ironruby-core] Experiences building IronRuby from source Message-ID: <6936856c0809042341w3f85c908r81a77f6affe2ea4f@mail.gmail.com> Hi, I've just downloaded the IronRuby source code because I'd like to create something akin to IronPython's pyc.py which can put one or more ruby files into an Assembly which I can later load into a partial trust domain and instantiate and run a particular ruby file. First, a few questions on the solution file: 1. What is /svn/trunk/runfirst.cmd? Do I really need stuff put into %USERPROFILE%? I will ultimately be running under ASP.NET. 2. There are many warnings in the various projects about weird references to mscorlib (which is automatically referenced) and "System" without a version. Can I propose a patch with updates to the vcproj files? 3. The Ruby.Console and IronRuby.Tests projects both have a project file reference to "..\..\App.config" -- is this required? This is a build error. There's no App.config file in /svn/trunk/ Thanks, From hellosticky at gmail.com Fri Sep 5 02:56:54 2008 From: hellosticky at gmail.com (KE) Date: Fri, 5 Sep 2008 02:56:54 -0400 Subject: [Ironruby-core] Experiences building IronRuby from source In-Reply-To: <6936856c0809042341w3f85c908r81a77f6affe2ea4f@mail.gmail.com> Message-ID: <48c0d85f.232d400a.1654.0459@mx.google.com> Also, any help on generating the Assembly from .rb source files would be appreciated. Is there any equivalent to IronPython's ClrModule. CompileModules? Thanks, -----Original Message----- From: Hello Sticky [mailto:hellosticky at gmail.com] Sent: Friday, September 05, 2008 2:42 AM To: ironruby-core at rubyforge.org Subject: Experiences building IronRuby from source Hi, I've just downloaded the IronRuby source code because I'd like to create something akin to IronPython's pyc.py which can put one or more ruby files into an Assembly which I can later load into a partial trust domain and instantiate and run a particular ruby file. First, a few questions on the solution file: 1. What is /svn/trunk/runfirst.cmd? Do I really need stuff put into %USERPROFILE%? I will ultimately be running under ASP.NET. 2. There are many warnings in the various projects about weird references to mscorlib (which is automatically referenced) and "System" without a version. Can I propose a patch with updates to the vcproj files? 3. The Ruby.Console and IronRuby.Tests projects both have a project file reference to "..\..\App.config" -- is this required? This is a build error. There's no App.config file in /svn/trunk/ Thanks, From wim at fixnum.org Fri Sep 5 07:48:46 2008 From: wim at fixnum.org (Wim Vander Schelden) Date: Fri, 5 Sep 2008 13:48:46 +0200 Subject: [Ironruby-core] IronRuby on Mono In-Reply-To: <69f7d8470809041516g3bf6e9d5w8f05cd149c544632@mail.gmail.com> References: <5b0248170809021427p36732b19u32104b75067eaa23@mail.gmail.com> <20080902223328.GM11698@colliertech.org> <69f7d8470809041516g3bf6e9d5w8f05cd149c544632@mail.gmail.com> Message-ID: I've tried alliasing gmcs, but that doesn't seem to work, how do I make rake use gmcs -noconfig instead of gmcs? kind regards, Wim On Fri, Sep 5, 2008 at 12:16 AM, Jb Evain wrote: > Hey, > > On 9/5/08, Wim Vander Schelden wrote: > > The old ones are fixed, but now I'm getting these > > Pass -noconfig to gmcs, that will prevent it to reference System.Core, > which causes the conflicts you're seing. > > -- > Jb Evain > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -- Wim Vander Schelden http://fixnum.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From jflam at microsoft.com Fri Sep 5 11:23:17 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Fri, 5 Sep 2008 08:23:17 -0700 Subject: [Ironruby-core] Experiences building IronRuby from source In-Reply-To: <6936856c0809042341w3f85c908r81a77f6affe2ea4f@mail.gmail.com> References: <6936856c0809042341w3f85c908r81a77f6affe2ea4f@mail.gmail.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0633348234EB3@NA-EXMSG-C115.redmond.corp.microsoft.com> Hello Sticky: > 1. What is /svn/trunk/runfirst.cmd? Do I really need stuff put into > %USERPROFILE%? I will ultimately be running under ASP.NET. Yes, if you want to run the RubySpec test suite. > 2. There are many warnings in the various projects about weird > references to mscorlib (which is automatically referenced) and "System" > without a version. Can I propose a patch with updates to the vcproj > files? Can you provide details? I don't see them here. > 3. The Ruby.Console and IronRuby.Tests projects both have a project > file reference to "..\..\App.config" -- is this required? This is a > build error. There's no App.config file in /svn/trunk/ I omitted this file by mistake (it's a strange special case in our mirroring script), but it's fixed in r140 which I just committed. Thanks, -John From jflam at microsoft.com Fri Sep 5 11:23:55 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Fri, 5 Sep 2008 08:23:55 -0700 Subject: [Ironruby-core] Experiences building IronRuby from source In-Reply-To: <48c0d85f.232d400a.1654.0459@mx.google.com> References: <6936856c0809042341w3f85c908r81a77f6affe2ea4f@mail.gmail.com> <48c0d85f.232d400a.1654.0459@mx.google.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0633348234EB4@NA-EXMSG-C115.redmond.corp.microsoft.com> KE: > Also, any help on generating the Assembly from .rb source files would > be appreciated. Is there any equivalent to IronPython's ClrModule. > CompileModules? This isn't supported today, but we're working on a solution. Not sure what the ETA is right now though. Thanks, -John From hellosticky at gmail.com Fri Sep 5 12:00:01 2008 From: hellosticky at gmail.com (KE) Date: Fri, 5 Sep 2008 12:00:01 -0400 Subject: [Ironruby-core] Experiences building IronRuby from source In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0633348234EB3@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <48c157ac.1b17400a.44fa.46a6@mx.google.com> >From a clean checkout: Warning 1 The referenced component 'mscorlib' could not be found. Warning 2 The referenced component 'System' could not be found. Warning 3 The referenced component 'mscorlib' could not be found. Warning 4 The referenced component 'System' could not be found. Warning 5 The referenced component 'mscorlib' could not be found. Warning 6 The referenced component 'System.Net' could not be found. Warning 7 The referenced component 'System' could not be found. Warning 8 The referenced component 'mscorlib' could not be found. Warning 9 The referenced component 'System' could not be found. Warning 10 The referenced component 'System.Net' could not be found. Visual Studio doesn't report which project the warning is for, but double clicking on each warning goes to the problematic reference. For example, in src/ironruby/Ruby.csproj: False $(SilverlightSdkPath)\mscorlib.dll False $(SilverlightSdkPath)\System.Net.dll False $(SilverlightSdkPath)\System.dll I don't have the Silverlight SDK installed, is this required? IronPython has Silverlight support, but doesn't have these types of references in its .csproj files. Thanks, -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of John Lam (IRONRUBY) Sent: Friday, September 05, 2008 11:23 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Experiences building IronRuby from source Hello Sticky: > 1. What is /svn/trunk/runfirst.cmd? Do I really need stuff put into > %USERPROFILE%? I will ultimately be running under ASP.NET. Yes, if you want to run the RubySpec test suite. > 2. There are many warnings in the various projects about weird > references to mscorlib (which is automatically referenced) and "System" > without a version. Can I propose a patch with updates to the vcproj > files? Can you provide details? I don't see them here. > 3. The Ruby.Console and IronRuby.Tests projects both have a project > file reference to "..\..\App.config" -- is this required? This is a > build error. There's no App.config file in /svn/trunk/ I omitted this file by mistake (it's a strange special case in our mirroring script), but it's fixed in r140 which I just committed. Thanks, -John _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From curth at microsoft.com Fri Sep 5 12:01:35 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Fri, 5 Sep 2008 09:01:35 -0700 Subject: [Ironruby-core] Experiences building IronRuby from source In-Reply-To: <48c157ac.1b17400a.44fa.46a6@mx.google.com> References: <372109E149E8084D8E6C7D9CFD82E0633348234EB3@NA-EXMSG-C115.redmond.corp.microsoft.com> <48c157ac.1b17400a.44fa.46a6@mx.google.com> Message-ID: This is for building Silverlight. Silverlight builds against a different version of the CLR. You should ignore these warnings. -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of KE Sent: Friday, September 05, 2008 9:00 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Experiences building IronRuby from source >From a clean checkout: Warning 1 The referenced component 'mscorlib' could not be found. Warning 2 The referenced component 'System' could not be found. Warning 3 The referenced component 'mscorlib' could not be found. Warning 4 The referenced component 'System' could not be found. Warning 5 The referenced component 'mscorlib' could not be found. Warning 6 The referenced component 'System.Net' could not be found. Warning 7 The referenced component 'System' could not be found. Warning 8 The referenced component 'mscorlib' could not be found. Warning 9 The referenced component 'System' could not be found. Warning 10 The referenced component 'System.Net' could not be found. Visual Studio doesn't report which project the warning is for, but double clicking on each warning goes to the problematic reference. For example, in src/ironruby/Ruby.csproj: False $(SilverlightSdkPath)\mscorlib.dll False $(SilverlightSdkPath)\System.Net.dll False $(SilverlightSdkPath)\System.dll I don't have the Silverlight SDK installed, is this required? IronPython has Silverlight support, but doesn't have these types of references in its .csproj files. Thanks, -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of John Lam (IRONRUBY) Sent: Friday, September 05, 2008 11:23 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Experiences building IronRuby from source Hello Sticky: > 1. What is /svn/trunk/runfirst.cmd? Do I really need stuff put into > %USERPROFILE%? I will ultimately be running under ASP.NET. Yes, if you want to run the RubySpec test suite. > 2. There are many warnings in the various projects about weird > references to mscorlib (which is automatically referenced) and "System" > without a version. Can I propose a patch with updates to the vcproj > files? Can you provide details? I don't see them here. > 3. The Ruby.Console and IronRuby.Tests projects both have a project > file reference to "..\..\App.config" -- is this required? This is a > build error. There's no App.config file in /svn/trunk/ I omitted this file by mistake (it's a strange special case in our mirroring script), but it's fixed in r140 which I just committed. Thanks, -John _______________________________________________ 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 hellosticky at gmail.com Fri Sep 5 14:00:50 2008 From: hellosticky at gmail.com (KE) Date: Fri, 5 Sep 2008 14:00:50 -0400 Subject: [Ironruby-core] -X:SaveAssemblies Message-ID: <48c173fc.1917400a.2cde.ffffb447@mx.google.com> Hi, I find it odd that the ConsoleOptions class only has a single FileName string property. This forces the creation of pyc.py for creating a DLL with one or more files to compile, whereas I believe the functionality in pyc.py of creating a DLL from one or more input files should be right in the DLR. OptionsParser even already has a switch for -X:SaveAssemblies. IronRuby makes the same assumption. It adds the experimental -save option to ir.exe, assuming only one input file (with the rest of the args being arguments). I think it would be unfortunate if then IronRuby would need a separate irc.rb to mimic pyc.py... rinse and repeat for every other language. Are people in agreement and this is just caused because ConsoleOptions started off as executing one input file with args, and the issue of compiling to a DLL was unforeseen? Is this planned to be changed? I would be interested in changing this, so I don't mind doing the coding, but I don't want to code something that is opposed on some unforeseen philosophical basis. Thanks, From hellosticky at gmail.com Fri Sep 5 16:18:40 2008 From: hellosticky at gmail.com (KE) Date: Fri, 5 Sep 2008 16:18:40 -0400 Subject: [Ironruby-core] [IronPython] -X:SaveAssemblies In-Reply-To: Message-ID: <48c1944b.1b2d400a.4d1a.377b@mx.google.com> > -X:SaveAssemblies is for debugging purposes and does not produce > output equivalent to that produced by pyc.py. Okay, but my question still stands of whether or not part or all of the function of pyc.py should be moved into the DLR (obviously with some virtual methods for implementers)? Thanks, From hellosticky at gmail.com Fri Sep 5 16:28:20 2008 From: hellosticky at gmail.com (KE) Date: Fri, 5 Sep 2008 16:28:20 -0400 Subject: [Ironruby-core] [IronPython] -X:SaveAssemblies In-Reply-To: Message-ID: <48c1968e.0c2d400a.0494.40d5@mx.google.com> >> >> Okay, but my question still stands of whether or not part or all of the >> function of pyc.py should be moved into the DLR (obviously with some >virtual >> methods for implementers)? > > The bulk of the compiler code is actually in the DLR and in IronPython > itself. pyc.py is a user-friendly wrapper around that functionality. > There's no reason you couldn't use pyc.py to compile itself, if you > wanted to distribute it in a binary form. > > If you've got a real-world scenario that you don't think we've > adequately addressed, you'll need to provide more information before > we can understand the shortcomings of this approach. The question began when I was investigating an equivalent to pyc.py in IronRuby. ir.exe has an experimental option called -save (which doesn't currently work) -- instead of some kind of irc.rb -- but it shows that the lack of a consistent approach to compiling source code files into an Assembly causes confusion for language implementers and, ultimately, users. The approach in ir.exe is inherently broken because the base DLR OptionsParser parses a single file input argument (called FileName), whereas compiling usually (not always) needs to compile more than one source file into the output file. As you mention, the DLR methods like ScriptCode.SaveToAssembly already do the bulk of the work, so why not work into this into the DLR? Thanks, From hellosticky at gmail.com Fri Sep 5 17:21:00 2008 From: hellosticky at gmail.com (KE) Date: Fri, 5 Sep 2008 17:21:00 -0400 Subject: [Ironruby-core] [IronPython] -X:SaveAssemblies In-Reply-To: <350E7D38B6D819428718949920EC2355421B1C61E4@NA-EXMSG-C102.redmond.corp.microsoft.com> Message-ID: <48c1a2e7.073e400a.02a3.71ab@mx.google.com> Okay, understood, although I'd think the DLR could just create an abstract base class with various Save/Load methods? The logic in pyc.py is not incredibly complex. BTW, I'd be interested in what Ruby precompilation issues you're talking? I'd like to use IronRuby in this capacity. Thanks! -----Original Message----- From: Dino Viehland [mailto:dinov at microsoft.com] Sent: Friday, September 05, 2008 5:18 PM To: hellosticky at gmail.com; Discussion of IronPython; 'Curt Hagenlocher' Cc: 'IronRuby' Subject: RE: [IronPython] -X:SaveAssemblies The big reason the DLR doesn't currently handle it all is that languages are ultimately responsible for how they load the code back - for example IronPython will load the code after it's been AddReference'd. Combine that with wanting a consistent interface which both takes and returns ScriptCode objects and you start to see why the languages need to be involved. And unfortunately ScriptCode objects are outside of the hosting APIs so there's not necessarily an easy way to get at them. But if you do get a ScriptCode object in theory you can write that out to disk & load it back up. I think there's some issues which prevent Ruby from using precompilation anyway though. -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of KE Sent: Friday, September 05, 2008 1:28 PM To: 'Curt Hagenlocher' Cc: 'IronRuby'; 'Discussion of IronPython' Subject: Re: [IronPython] -X:SaveAssemblies >> >> Okay, but my question still stands of whether or not part or all of the >> function of pyc.py should be moved into the DLR (obviously with some >virtual >> methods for implementers)? > > The bulk of the compiler code is actually in the DLR and in IronPython > itself. pyc.py is a user-friendly wrapper around that functionality. > There's no reason you couldn't use pyc.py to compile itself, if you > wanted to distribute it in a binary form. > > If you've got a real-world scenario that you don't think we've > adequately addressed, you'll need to provide more information before > we can understand the shortcomings of this approach. The question began when I was investigating an equivalent to pyc.py in IronRuby. ir.exe has an experimental option called -save (which doesn't currently work) -- instead of some kind of irc.rb -- but it shows that the lack of a consistent approach to compiling source code files into an Assembly causes confusion for language implementers and, ultimately, users. The approach in ir.exe is inherently broken because the base DLR OptionsParser parses a single file input argument (called FileName), whereas compiling usually (not always) needs to compile more than one source file into the output file. As you mention, the DLR methods like ScriptCode.SaveToAssembly already do the bulk of the work, so why not work into this into the DLR? Thanks, _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From hellosticky at gmail.com Fri Sep 5 20:24:10 2008 From: hellosticky at gmail.com (KE) Date: Fri, 5 Sep 2008 20:24:10 -0400 Subject: [Ironruby-core] irc.rb Message-ID: <48c1cdd5.1d3e400a.5b11.ffffe0e3@mx.google.com> Hi, I've created an irc.rb (attached) which mimics IronPython's pyc.py. It is failing on this line: Microsoft::Scripting::ScriptCode.save_to_assembly(outfile, codes.to_array()) With the following exception... Any help would be greatly appreciated. The test file I'm trying to compile is also attached. I am building on revision 140. I have also tried with the Microsoft.Scripting and Microsoft.Scripting.Core dlls from IronPython with the same result. C:\work\ironruby\co\svn\trunk\build\release>.\ir.exe irc.rb -target:dll -verbose test.rb Compiling C:\work\ironruby\co\svn\trunk\build\release\test.rb... Creating output file C:\work\ironruby\co\svn\trunk\build\release\test.dll... C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\NewExpression .cs:88:in `New': Value cannot be null. Parameter name: constructor (System::ArgumentNullException) from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\NewExpression .cs:83:in `New' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:294:in `DefaultVisitDynamicExpression' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:191:in `VisitNode' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:40:in `VisitNodes' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:108:in `Visit' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:264:in `DefaultVisitBlock' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:176:in `VisitNode' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:40:in `VisitNodes' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:108:in `Visit' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:264:in `DefaultVisitBlock' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:176:in `VisitNode' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:40:in `VisitNodes' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:108:in `Visit' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:264:in `DefaultVisitBlock' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:176:in `VisitNode' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:40:in `VisitNodes' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:108:in `Visit' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:264:in `DefaultVisitBlock' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:176:in `VisitNode' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:272:in `Visit' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:374:in `DefaultVisitScopeExpression' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:218:in `VisitNode' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:189:in `Visit' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Actions\MatchCall er.Generated.cs:40:in `Call4' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Actions\CallSite. cs:275:in `UpdateAndExecute' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Actions\UpdateDel egates.Generated.cs:52:in `Update4' from :0 -------------- next part -------------- A non-text attachment was scrubbed... Name: irc.rb Type: application/octet-stream Size: 3462 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: test.rb Type: application/octet-stream Size: 314 bytes Desc: not available URL: From Tomas.Matousek at microsoft.com Sat Sep 6 00:48:43 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Fri, 5 Sep 2008 21:48:43 -0700 Subject: [Ironruby-core] [IronPython] irc.rb In-Reply-To: <48c1cdd5.1d3e400a.5b11.ffffe0e3@mx.google.com> References: <48c1cdd5.1d3e400a.5b11.ffffe0e3@mx.google.com> Message-ID: Right. This is the error Dino overheard me talking about :) As you can see from the stack trac, something seems to be broken in DLR. I'll look at it and see whether I can come with a simple fix. Precompilation is currently P2 on our task list though, so I'm afraid any more complex work would need to wait until P1's are done. Tomas -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of KE Sent: Friday, September 05, 2008 5:24 PM To: IronRuby Cc: IronPython Subject: [IronPython] irc.rb Hi, I've created an irc.rb (attached) which mimics IronPython's pyc.py. It is failing on this line: Microsoft::Scripting::ScriptCode.save_to_assembly(outfile, codes.to_array()) With the following exception... Any help would be greatly appreciated. The test file I'm trying to compile is also attached. I am building on revision 140. I have also tried with the Microsoft.Scripting and Microsoft.Scripting.Core dlls from IronPython with the same result. C:\work\ironruby\co\svn\trunk\build\release>.\ir.exe irc.rb -target:dll -verbose test.rb Compiling C:\work\ironruby\co\svn\trunk\build\release\test.rb... Creating output file C:\work\ironruby\co\svn\trunk\build\release\test.dll... C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\NewExpression .cs:88:in `New': Value cannot be null. Parameter name: constructor (System::ArgumentNullException) from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\NewExpression .cs:83:in `New' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:294:in `DefaultVisitDynamicExpression' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:191:in `VisitNode' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:40:in `VisitNodes' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:108:in `Visit' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:264:in `DefaultVisitBlock' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:176:in `VisitNode' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:40:in `VisitNodes' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:108:in `Visit' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:264:in `DefaultVisitBlock' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:176:in `VisitNode' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:40:in `VisitNodes' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:108:in `Visit' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:264:in `DefaultVisitBlock' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:176:in `VisitNode' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:40:in `VisitNodes' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:108:in `Visit' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:264:in `DefaultVisitBlock' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:176:in `VisitNode' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:272:in `Visit' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:374:in `DefaultVisitScopeExpression' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:218:in `VisitNode' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:189:in `Visit' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Actions\MatchCall er.Generated.cs:40:in `Call4' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Actions\CallSite. cs:275:in `UpdateAndExecute' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Actions\UpdateDel egates.Generated.cs:52:in `Update4' from :0 From lists at ruby-forum.com Sat Sep 6 03:09:25 2008 From: lists at ruby-forum.com (Aaron Clauson) Date: Sat, 6 Sep 2008 09:09:25 +0200 Subject: [Ironruby-core] Compile Ruby Script Message-ID: <32dbb8baa5efa2b693780240341d64ce@ruby-forum.com> Hi, Is there a compile option available for IronRuby so that a script could be compiled and then re-executed repeatedly? The PythonEngine has a compile option that facilitates that and I'm trying to determine if IronRuby has an equivalent. Thanks, Aaron -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Sat Sep 6 05:30:06 2008 From: lists at ruby-forum.com (Aaron Clauson) Date: Sat, 6 Sep 2008 11:30:06 +0200 Subject: [Ironruby-core] Compile Ruby Script In-Reply-To: <32dbb8baa5efa2b693780240341d64ce@ruby-forum.com> References: <32dbb8baa5efa2b693780240341d64ce@ruby-forum.com> Message-ID: <125618584ecceaf4b54718a063cc473b@ruby-forum.com> Found it: CompiledCode compiledScript = scriptScope.Engine.CreateScriptSourceFromString(script).Compile() Regards, Aaron -- Posted via http://www.ruby-forum.com/. From hellosticky at gmail.com Sat Sep 6 06:50:20 2008 From: hellosticky at gmail.com (KE) Date: Sat, 6 Sep 2008 06:50:20 -0400 Subject: [Ironruby-core] [IronPython] irc.rb In-Reply-To: Message-ID: <48c26097.062a400a.4076.34d7@mx.google.com> Thanks! I've also created a bug report: http://rubyforge.org/tracker/index.php?func=detail&aid=21839&group_id=4359&a tid=16798 This includes the irc.rb which I think IronRuby will be interested in including in the IronRuby distribution as well.. I'll try to step through into this bug and understand what's going on, although I have no clue what I'm looking at :) Thanks, -----Original Message----- From: Tomas Matousek [mailto:Tomas.Matousek at microsoft.com] Sent: Saturday, September 06, 2008 12:49 AM To: hellosticky at gmail.com; Discussion of IronPython; IronRuby Subject: RE: [IronPython] irc.rb Right. This is the error Dino overheard me talking about :) As you can see from the stack trac, something seems to be broken in DLR. I'll look at it and see whether I can come with a simple fix. Precompilation is currently P2 on our task list though, so I'm afraid any more complex work would need to wait until P1's are done. Tomas -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of KE Sent: Friday, September 05, 2008 5:24 PM To: IronRuby Cc: IronPython Subject: [IronPython] irc.rb Hi, I've created an irc.rb (attached) which mimics IronPython's pyc.py. It is failing on this line: Microsoft::Scripting::ScriptCode.save_to_assembly(outfile, codes.to_array()) With the following exception... Any help would be greatly appreciated. The test file I'm trying to compile is also attached. I am building on revision 140. I have also tried with the Microsoft.Scripting and Microsoft.Scripting.Core dlls from IronPython with the same result. C:\work\ironruby\co\svn\trunk\build\release>.\ir.exe irc.rb -target:dll -verbose test.rb Compiling C:\work\ironruby\co\svn\trunk\build\release\test.rb... Creating output file C:\work\ironruby\co\svn\trunk\build\release\test.dll... C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\NewExpression .cs:88:in `New': Value cannot be null. Parameter name: constructor (System::ArgumentNullException) from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\NewExpression .cs:83:in `New' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:294:in `DefaultVisitDynamicExpression' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:191:in `VisitNode' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:40:in `VisitNodes' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:108:in `Visit' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:264:in `DefaultVisitBlock' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:176:in `VisitNode' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:40:in `VisitNodes' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:108:in `Visit' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:264:in `DefaultVisitBlock' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:176:in `VisitNode' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:40:in `VisitNodes' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:108:in `Visit' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:264:in `DefaultVisitBlock' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:176:in `VisitNode' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:40:in `VisitNodes' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:108:in `Visit' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:264:in `DefaultVisitBlock' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:176:in `VisitNode' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:272:in `Visit' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:374:in `DefaultVisitScopeExpression' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:218:in `VisitNode' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:189:in `Visit' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Actions\MatchCall er.Generated.cs:40:in `Call4' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Actions\CallSite. cs:275:in `UpdateAndExecute' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Actions\UpdateDel egates.Generated.cs:52:in `Update4' from :0 From hellosticky at gmail.com Sat Sep 6 07:25:00 2008 From: hellosticky at gmail.com (KE) Date: Sat, 6 Sep 2008 07:25:00 -0400 Subject: [Ironruby-core] [IronPython] irc.rb Message-ID: <48c268b7.1138400a.55da.ffff8b45@mx.google.com> Okay, well I found two code problems in two IR implementations of IExpressionSerializable: /ironruby/Runtime/Calls/rubycallaction.cs CreateExpression() is passing the wrong second Type parameter. It should be typeof(RubyCallSignature) /ironruby/Runtime/Calls/rubycallsignature.cs CreateExpression() is not passing enough parameters. typeof(bool) and Ast.Constant(_hasRhsArgument) should be added to find the right Constructor. The next problem is: Variable '#globalScope' referenced from lambda 'C:\work\ironruby\co\svn\trunk\build\release\test.rb', but it is not defined in an outer scope In Microsoft.Scripting.Core.dll!System.Linq.Expressions.Compiler.VariableBinder .Reference(System.Linq.Expressions.Expression variable = {#globalScope}, bool hoist = false) Line 238 C# I'm guessing I haven't initialized some global context? Thanks, -----Original Message----- From: KE [mailto:hellosticky at gmail.com] Sent: Saturday, September 06, 2008 6:50 AM To: 'Tomas Matousek'; 'Discussion of IronPython'; 'IronRuby' Subject: RE: [IronPython] irc.rb Thanks! I've also created a bug report: http://rubyforge.org/tracker/index.php?func=detail&aid=21839&group_id=4359&a tid=16798 This includes the irc.rb which I think IronRuby will be interested in including in the IronRuby distribution as well.. I'll try to step through into this bug and understand what's going on, although I have no clue what I'm looking at :) Thanks, -----Original Message----- From: Tomas Matousek [mailto:Tomas.Matousek at microsoft.com] Sent: Saturday, September 06, 2008 12:49 AM To: hellosticky at gmail.com; Discussion of IronPython; IronRuby Subject: RE: [IronPython] irc.rb Right. This is the error Dino overheard me talking about :) As you can see from the stack trac, something seems to be broken in DLR. I'll look at it and see whether I can come with a simple fix. Precompilation is currently P2 on our task list though, so I'm afraid any more complex work would need to wait until P1's are done. Tomas -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of KE Sent: Friday, September 05, 2008 5:24 PM To: IronRuby Cc: IronPython Subject: [IronPython] irc.rb Hi, I've created an irc.rb (attached) which mimics IronPython's pyc.py. It is failing on this line: Microsoft::Scripting::ScriptCode.save_to_assembly(outfile, codes.to_array()) With the following exception... Any help would be greatly appreciated. The test file I'm trying to compile is also attached. I am building on revision 140. I have also tried with the Microsoft.Scripting and Microsoft.Scripting.Core dlls from IronPython with the same result. C:\work\ironruby\co\svn\trunk\build\release>.\ir.exe irc.rb -target:dll -verbose test.rb Compiling C:\work\ironruby\co\svn\trunk\build\release\test.rb... Creating output file C:\work\ironruby\co\svn\trunk\build\release\test.dll... C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\NewExpression .cs:88:in `New': Value cannot be null. Parameter name: constructor (System::ArgumentNullException) from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\NewExpression .cs:83:in `New' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:294:in `DefaultVisitDynamicExpression' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:191:in `VisitNode' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:40:in `VisitNodes' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:108:in `Visit' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:264:in `DefaultVisitBlock' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:176:in `VisitNode' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:40:in `VisitNodes' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:108:in `Visit' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:264:in `DefaultVisitBlock' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:176:in `VisitNode' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:40:in `VisitNodes' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:108:in `Visit' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:264:in `DefaultVisitBlock' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:176:in `VisitNode' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:40:in `VisitNodes' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:108:in `Visit' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:264:in `DefaultVisitBlock' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:176:in `VisitNode' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:272:in `Visit' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:374:in `DefaultVisitScopeExpression' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:218:in `VisitNode' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:189:in `Visit' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Actions\MatchCall er.Generated.cs:40:in `Call4' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Actions\CallSite. cs:275:in `UpdateAndExecute' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Actions\UpdateDel egates.Generated.cs:52:in `Update4' from :0 From hellosticky at gmail.com Sat Sep 6 08:07:39 2008 From: hellosticky at gmail.com (KE) Date: Sat, 6 Sep 2008 08:07:39 -0400 Subject: [Ironruby-core] [IronPython] irc.rb Message-ID: <48c272b7.1c17400a.5019.7769@mx.google.com> It's coming from the call stack -> CompileLambda -> AnalyzeLambda. The LambdaExpression is "($scope, $language) => [Scope]" but AnalyzeLambda passes a null CompilerScope to VariableBinder.Bind. Somehow this same VariableBinder is used during a ExpressionType.Call to: // // AST: MethodCallExpression // (RubyOps.CreateTopLevelScope)( .localScope ( ) , (.arg #globalScope), (.arg #language), (.var #self_5_0), (.var #rfc_nonlifted_5_2), ) It is using the VariableBinder with a null parent CompilerScope on the ".arg #globalScope" evaluation -----Original Message----- From: KE [mailto:hellosticky at gmail.com] Sent: Saturday, September 06, 2008 7:25 AM To: 'Tomas Matousek'; 'IronRuby'; IronPython Subject: RE: [IronPython] irc.rb Okay, well I found two code problems in two IR implementations of IExpressionSerializable: /ironruby/Runtime/Calls/rubycallaction.cs CreateExpression() is passing the wrong second Type parameter. It should be typeof(RubyCallSignature) /ironruby/Runtime/Calls/rubycallsignature.cs CreateExpression() is not passing enough parameters. typeof(bool) and Ast.Constant(_hasRhsArgument) should be added to find the right Constructor. The next problem is: Variable '#globalScope' referenced from lambda 'C:\work\ironruby\co\svn\trunk\build\release\test.rb', but it is not defined in an outer scope In Microsoft.Scripting.Core.dll!System.Linq.Expressions.Compiler.VariableBinder .Reference(System.Linq.Expressions.Expression variable = {#globalScope}, bool hoist = false) Line 238 C# I'm guessing I haven't initialized some global context? Thanks, -----Original Message----- From: KE [mailto:hellosticky at gmail.com] Sent: Saturday, September 06, 2008 6:50 AM To: 'Tomas Matousek'; 'Discussion of IronPython'; 'IronRuby' Subject: RE: [IronPython] irc.rb Thanks! I've also created a bug report: http://rubyforge.org/tracker/index.php?func=detail&aid=21839&group_id=4359&a tid=16798 This includes the irc.rb which I think IronRuby will be interested in including in the IronRuby distribution as well.. I'll try to step through into this bug and understand what's going on, although I have no clue what I'm looking at :) Thanks, -----Original Message----- From: Tomas Matousek [mailto:Tomas.Matousek at microsoft.com] Sent: Saturday, September 06, 2008 12:49 AM To: hellosticky at gmail.com; Discussion of IronPython; IronRuby Subject: RE: [IronPython] irc.rb Right. This is the error Dino overheard me talking about :) As you can see from the stack trac, something seems to be broken in DLR. I'll look at it and see whether I can come with a simple fix. Precompilation is currently P2 on our task list though, so I'm afraid any more complex work would need to wait until P1's are done. Tomas -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of KE Sent: Friday, September 05, 2008 5:24 PM To: IronRuby Cc: IronPython Subject: [IronPython] irc.rb Hi, I've created an irc.rb (attached) which mimics IronPython's pyc.py. It is failing on this line: Microsoft::Scripting::ScriptCode.save_to_assembly(outfile, codes.to_array()) With the following exception... Any help would be greatly appreciated. The test file I'm trying to compile is also attached. I am building on revision 140. I have also tried with the Microsoft.Scripting and Microsoft.Scripting.Core dlls from IronPython with the same result. C:\work\ironruby\co\svn\trunk\build\release>.\ir.exe irc.rb -target:dll -verbose test.rb Compiling C:\work\ironruby\co\svn\trunk\build\release\test.rb... Creating output file C:\work\ironruby\co\svn\trunk\build\release\test.dll... C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\NewExpression .cs:88:in `New': Value cannot be null. Parameter name: constructor (System::ArgumentNullException) from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\NewExpression .cs:83:in `New' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:294:in `DefaultVisitDynamicExpression' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:191:in `VisitNode' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:40:in `VisitNodes' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:108:in `Visit' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:264:in `DefaultVisitBlock' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:176:in `VisitNode' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:40:in `VisitNodes' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:108:in `Visit' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:264:in `DefaultVisitBlock' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:176:in `VisitNode' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:40:in `VisitNodes' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:108:in `Visit' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:264:in `DefaultVisitBlock' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:176:in `VisitNode' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:40:in `VisitNodes' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:108:in `Visit' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:264:in `DefaultVisitBlock' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:176:in `VisitNode' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:272:in `Visit' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:374:in `DefaultVisitScopeExpression' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:218:in `VisitNode' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:189:in `Visit' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Actions\MatchCall er.Generated.cs:40:in `Call4' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Actions\CallSite. cs:275:in `UpdateAndExecute' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Actions\UpdateDel egates.Generated.cs:52:in `Update4' from :0 From ksunair at yahoo.com Sat Sep 6 09:57:49 2008 From: ksunair at yahoo.com (Unnikrishnan Nair) Date: Sat, 6 Sep 2008 06:57:49 -0700 (PDT) Subject: [Ironruby-core] Did any build ironruby successfully in Mono? Message-ID: <222051.15960.qm@web50611.mail.re2.yahoo.com> Just curious, I just checked out 140 from svn and when I build I am getting basename not found in string... Just curious... From sanxiyn at gmail.com Sat Sep 6 10:47:24 2008 From: sanxiyn at gmail.com (Seo Sanghyeon) Date: Sat, 6 Sep 2008 23:47:24 +0900 Subject: [Ironruby-core] Did any build ironruby successfully in Mono? In-Reply-To: <222051.15960.qm@web50611.mail.re2.yahoo.com> References: <222051.15960.qm@web50611.mail.re2.yahoo.com> Message-ID: <5b0248170809060747s3eac9fa3obfa3c79dffd3cb13@mail.gmail.com> 2008/9/6 Unnikrishnan Nair : > Just curious, I just checked out 140 from svn and when I build I am getting basename not found in string... > Just curious... I do. I need to (again, and again!) write up and update HOWTO, but I'm currently busy looking at Google Chrome... -- Seo Sanghyeon From ksunair at yahoo.com Sat Sep 6 11:09:32 2008 From: ksunair at yahoo.com (Unnikrishnan Nair) Date: Sat, 6 Sep 2008 08:09:32 -0700 (PDT) Subject: [Ironruby-core] Did any build ironruby successfully in Mono? In-Reply-To: <5b0248170809060747s3eac9fa3obfa3c79dffd3cb13@mail.gmail.com> Message-ID: <978061.68973.qm@web50611.mail.re2.yahoo.com> Thanks. I might have missed some mails I guess. --- On Sat, 9/6/08, Seo Sanghyeon wrote: > From: Seo Sanghyeon > Subject: Re: [Ironruby-core] Did any build ironruby successfully in Mono? > To: ksunair at yahoo.com, ironruby-core at rubyforge.org > Date: Saturday, September 6, 2008, 9:47 AM > 2008/9/6 Unnikrishnan Nair : > > Just curious, I just checked out 140 from svn and when > I build I am getting basename not found in string... > > Just curious... > > I do. I need to (again, and again!) write up and update > HOWTO, but I'm > currently busy looking at Google Chrome... > > -- > Seo Sanghyeon From fuzzyman at voidspace.org.uk Sat Sep 6 11:35:16 2008 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Sat, 06 Sep 2008 16:35:16 +0100 Subject: [Ironruby-core] Did any build ironruby successfully in Mono? In-Reply-To: <5b0248170809060747s3eac9fa3obfa3c79dffd3cb13@mail.gmail.com> References: <222051.15960.qm@web50611.mail.re2.yahoo.com> <5b0248170809060747s3eac9fa3obfa3c79dffd3cb13@mail.gmail.com> Message-ID: <48C2A334.1020003@voidspace.org.uk> Seo Sanghyeon wrote: > 2008/9/6 Unnikrishnan Nair : > >> Just curious, I just checked out 140 from svn and when I build I am getting basename not found in string... >> Just curious... >> > > I do. I need to (again, and again!) write up and update HOWTO, but I'm > currently busy looking at Google Chrome... > > And then you have Ironclad and a new FePy release to work on, right? ;-) Michael -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/ http://www.trypython.org/ http://www.ironpython.info/ http://www.theotherdelia.co.uk/ http://www.resolverhacks.net/ From jdeville at microsoft.com Sun Sep 7 03:32:12 2008 From: jdeville at microsoft.com (Jim Deville) Date: Sun, 7 Sep 2008 00:32:12 -0700 Subject: [Ironruby-core] Did any build ironruby successfully in Mono? In-Reply-To: <48C2A334.1020003@voidspace.org.uk> References: <222051.15960.qm@web50611.mail.re2.yahoo.com> <5b0248170809060747s3eac9fa3obfa3c79dffd3cb13@mail.gmail.com>, <48C2A334.1020003@voidspace.org.uk> Message-ID: Seo, Isn't that a Rakefile or context.rb issue? If so can you just fix it and check it in? JD ________________________________________ From: ironruby-core-bounces at rubyforge.org [ironruby-core-bounces at rubyforge.org] On Behalf Of Michael Foord [fuzzyman at voidspace.org.uk] Sent: Saturday, September 06, 2008 8:35 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Did any build ironruby successfully in Mono? Seo Sanghyeon wrote: > 2008/9/6 Unnikrishnan Nair : > >> Just curious, I just checked out 140 from svn and when I build I am getting basename not found in string... >> Just curious... >> > > I do. I need to (again, and again!) write up and update HOWTO, but I'm > currently busy looking at Google Chrome... > > And then you have Ironclad and a new FePy release to work on, right? ;-) Michael -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/ http://www.trypython.org/ http://www.ironpython.info/ http://www.theotherdelia.co.uk/ http://www.resolverhacks.net/ _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From stefan.dobrev at gmail.com Sun Sep 7 15:11:08 2008 From: stefan.dobrev at gmail.com (Stefan Dobrev) Date: Sun, 7 Sep 2008 22:11:08 +0300 Subject: [Ironruby-core] Deriving from framework class with Initialize method Message-ID: <928de89c0809071211p19a47cbfvb3e2d570b4d8d4bf@mail.gmail.com> Hi guys, I was trying to run the following code: *class MyObj < DependencyObject end obj = MyObj.new* Where DepenencyObject comes from the WPF stack (WindowsBase.dll). However this fails on the *MyObj.new* line with strange error that wrong arguments or types are passed to initialize method. After some digging I found that DependencyObject have a private method Initialize which makes the problem. Rewriting the code like this makes it work: *class MyObj < DependencyObject def initialize end end* May be method resolution somehow get messed up. Sample file attached. Regards, Stefan -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: init_issues.rb Type: application/octet-stream Size: 406 bytes Desc: not available URL: From curth at microsoft.com Sun Sep 7 16:18:39 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Sun, 7 Sep 2008 13:18:39 -0700 Subject: [Ironruby-core] Deriving from framework class with Initialize method In-Reply-To: <928de89c0809071211p19a47cbfvb3e2d570b4d8d4bf@mail.gmail.com> References: <928de89c0809071211p19a47cbfvb3e2d570b4d8d4bf@mail.gmail.com> Message-ID: Interesting. What do you think should happen when a CLS type has a method whose name collides with a "special" Ruby method name like "initialize" or "allocate"? This isn't an issue in IronPython because of Guido's foresight in decorating all special names with double underscores. :) Maybe for IronRuby, we could decorate certain CLS-imported names with a trailing underscore to avoid this kind of problem. Out of curiosity, what does JRuby do in this case? From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Stefan Dobrev Sent: Sunday, September 07, 2008 12:11 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Deriving from framework class with Initialize method Hi guys, I was trying to run the following code: class MyObj < DependencyObject end obj = MyObj.new Where DepenencyObject comes from the WPF stack (WindowsBase.dll). However this fails on the MyObj.new line with strange error that wrong arguments or types are passed to initialize method. After some digging I found that DependencyObject have a private method Initialize which makes the problem. Rewriting the code like this makes it work: class MyObj < DependencyObject def initialize end end May be method resolution somehow get messed up. Sample file attached. Regards, Stefan -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tomas.Matousek at microsoft.com Mon Sep 8 02:18:20 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Sun, 7 Sep 2008 23:18:20 -0700 Subject: [Ironruby-core] Deriving from framework class with Initialize method In-Reply-To: References: <928de89c0809071211p19a47cbfvb3e2d570b4d8d4bf@mail.gmail.com> Message-ID: Or maybe we could just not mangle Initialize CLR method name. That would prevent the conflict in most cases (.NET guidelines recommend to use Pascal case method names). Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Curt Hagenlocher Sent: Sunday, September 07, 2008 1:19 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Deriving from framework class with Initialize method Interesting. What do you think should happen when a CLS type has a method whose name collides with a "special" Ruby method name like "initialize" or "allocate"? This isn't an issue in IronPython because of Guido's foresight in decorating all special names with double underscores. :) Maybe for IronRuby, we could decorate certain CLS-imported names with a trailing underscore to avoid this kind of problem. Out of curiosity, what does JRuby do in this case? From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Stefan Dobrev Sent: Sunday, September 07, 2008 12:11 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Deriving from framework class with Initialize method Hi guys, I was trying to run the following code: class MyObj < DependencyObject end obj = MyObj.new Where DepenencyObject comes from the WPF stack (WindowsBase.dll). However this fails on the MyObj.new line with strange error that wrong arguments or types are passed to initialize method. After some digging I found that DependencyObject have a private method Initialize which makes the problem. Rewriting the code like this makes it work: class MyObj < DependencyObject def initialize end end May be method resolution somehow get messed up. Sample file attached. Regards, Stefan -------------- next part -------------- An HTML attachment was scrubbed... URL: From hellosticky at gmail.com Mon Sep 8 18:03:51 2008 From: hellosticky at gmail.com (KE) Date: Mon, 8 Sep 2008 18:03:51 -0400 Subject: [Ironruby-core] [IronPython] irc.rb In-Reply-To: <350E7D38B6D819428718949920EC2355421B1C638A@NA-EXMSG-C102.redmond.corp.microsoft.com> Message-ID: <48c5a14a.1f2d400a.2726.ffff983d@mx.google.com> Hi Tomas, Can you provide any guidance on what #globalScope means and why it might be null or how to initialize it? I've already found two bugs in the save assembly process, and I'm glad to keep swatting at them since I'd really like to get this to work for, but this is a bit internal for me to just use my intuition with. Thanks! -----Original Message----- From: Dino Viehland [mailto:dinov at microsoft.com] Sent: Saturday, September 06, 2008 1:41 PM To: hellosticky at gmail.com; Discussion of IronPython; Tomas Matousek; 'IronRuby' Subject: RE: [IronPython] irc.rb You'll probably want to track down where #globalScope is defined and make sure the newly defined variable is getting added to the list of variables in a Scope expression. If there's no scope expression you can just add one and give it the original body & the #globalScope var. Hopefully it's just the code which is immediately creating it causing the problem rather than a tree rewriter somewhere. -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of KE Sent: Saturday, September 06, 2008 5:08 AM To: Tomas Matousek; 'IronRuby'; IronPython Subject: Re: [IronPython] irc.rb It's coming from the call stack -> CompileLambda -> AnalyzeLambda. The LambdaExpression is "($scope, $language) => [Scope]" but AnalyzeLambda passes a null CompilerScope to VariableBinder.Bind. Somehow this same VariableBinder is used during a ExpressionType.Call to: // // AST: MethodCallExpression // (RubyOps.CreateTopLevelScope)( .localScope ( ) , (.arg #globalScope), (.arg #language), (.var #self_5_0), (.var #rfc_nonlifted_5_2), ) It is using the VariableBinder with a null parent CompilerScope on the ".arg #globalScope" evaluation -----Original Message----- From: KE [mailto:hellosticky at gmail.com] Sent: Saturday, September 06, 2008 7:25 AM To: 'Tomas Matousek'; 'IronRuby'; IronPython Subject: RE: [IronPython] irc.rb Okay, well I found two code problems in two IR implementations of IExpressionSerializable: /ironruby/Runtime/Calls/rubycallaction.cs CreateExpression() is passing the wrong second Type parameter. It should be typeof(RubyCallSignature) /ironruby/Runtime/Calls/rubycallsignature.cs CreateExpression() is not passing enough parameters. typeof(bool) and Ast.Constant(_hasRhsArgument) should be added to find the right Constructor. The next problem is: Variable '#globalScope' referenced from lambda 'C:\work\ironruby\co\svn\trunk\build\release\test.rb', but it is not defined in an outer scope In Microsoft.Scripting.Core.dll!System.Linq.Expressions.Compiler.VariableBinder .Reference(System.Linq.Expressions.Expression variable = {#globalScope}, bool hoist = false) Line 238 C# I'm guessing I haven't initialized some global context? Thanks, -----Original Message----- From: KE [mailto:hellosticky at gmail.com] Sent: Saturday, September 06, 2008 6:50 AM To: 'Tomas Matousek'; 'Discussion of IronPython'; 'IronRuby' Subject: RE: [IronPython] irc.rb Thanks! I've also created a bug report: http://rubyforge.org/tracker/index.php?func=detail&aid=21839&group_id=4359&a tid=16798 This includes the irc.rb which I think IronRuby will be interested in including in the IronRuby distribution as well.. I'll try to step through into this bug and understand what's going on, although I have no clue what I'm looking at :) Thanks, -----Original Message----- From: Tomas Matousek [mailto:Tomas.Matousek at microsoft.com] Sent: Saturday, September 06, 2008 12:49 AM To: hellosticky at gmail.com; Discussion of IronPython; IronRuby Subject: RE: [IronPython] irc.rb Right. This is the error Dino overheard me talking about :) As you can see from the stack trac, something seems to be broken in DLR. I'll look at it and see whether I can come with a simple fix. Precompilation is currently P2 on our task list though, so I'm afraid any more complex work would need to wait until P1's are done. Tomas -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of KE Sent: Friday, September 05, 2008 5:24 PM To: IronRuby Cc: IronPython Subject: [IronPython] irc.rb Hi, I've created an irc.rb (attached) which mimics IronPython's pyc.py. It is failing on this line: Microsoft::Scripting::ScriptCode.save_to_assembly(outfile, codes.to_array()) With the following exception... Any help would be greatly appreciated. The test file I'm trying to compile is also attached. I am building on revision 140. I have also tried with the Microsoft.Scripting and Microsoft.Scripting.Core dlls from IronPython with the same result. C:\work\ironruby\co\svn\trunk\build\release>.\ir.exe irc.rb -target:dll -verbose test.rb Compiling C:\work\ironruby\co\svn\trunk\build\release\test.rb... Creating output file C:\work\ironruby\co\svn\trunk\build\release\test.dll... C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\NewExpression .cs:88:in `New': Value cannot be null. Parameter name: constructor (System::ArgumentNullException) from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\NewExpression .cs:83:in `New' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:294:in `DefaultVisitDynamicExpression' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:191:in `VisitNode' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:40:in `VisitNodes' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:108:in `Visit' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:264:in `DefaultVisitBlock' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:176:in `VisitNode' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:40:in `VisitNodes' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:108:in `Visit' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:264:in `DefaultVisitBlock' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:176:in `VisitNode' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:40:in `VisitNodes' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:108:in `Visit' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:264:in `DefaultVisitBlock' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:176:in `VisitNode' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:40:in `VisitNodes' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:108:in `Visit' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:264:in `DefaultVisitBlock' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:176:in `VisitNode' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:272:in `Visit' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:374:in `DefaultVisitScopeExpression' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:218:in `VisitNode' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:189:in `Visit' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Actions\MatchCall er.Generated.cs:40:in `Call4' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Actions\CallSite. cs:275:in `UpdateAndExecute' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Actions\UpdateDel egates.Generated.cs:52:in `Update4' from :0 _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From curth at microsoft.com Mon Sep 8 18:53:09 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Mon, 8 Sep 2008 15:53:09 -0700 Subject: [Ironruby-core] Code Review: InfiniteRubyRecursion1 Message-ID: tfpt review "/shelveset:InfiniteRubyRecursion1;REDMOND\curth" Comment : Fix recursive behavior in Array.flatten and Hash.to_s Maintain multiple recursion trackers for different operations -- Curt Hagenlocher curth at microsoft.com -------------- next part -------------- A non-text attachment was scrubbed... Name: InfiniteRubyRecursion1.diff Type: application/octet-stream Size: 19611 bytes Desc: InfiniteRubyRecursion1.diff URL: From curth at microsoft.com Tue Sep 9 00:21:39 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Mon, 8 Sep 2008 21:21:39 -0700 Subject: [Ironruby-core] Overriding CLS Virtuals Message-ID: 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 curth at microsoft.com Tue Sep 9 00:23:20 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Mon, 8 Sep 2008 21:23:20 -0700 Subject: [Ironruby-core] Overriding CLS Virtuals In-Reply-To: References: Message-ID: Oops... that should have said "include System::IDisposable". My Outlook-based syntax checker is clearly not working. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Curt Hagenlocher Sent: Monday, September 08, 2008 9:22 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] 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 orion.edwards at open2view.com Tue Sep 9 00:36:55 2008 From: orion.edwards at open2view.com (Orion Edwards) Date: Tue, 09 Sep 2008 16:36:55 +1200 Subject: [Ironruby-core] Overriding CLS Virtuals In-Reply-To: References: Message-ID: <48C5FD67.4090009@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 dotnetguy at gmail.com Tue Sep 9 00:39:43 2008 From: dotnetguy at gmail.com (Brad Wilson) Date: Mon, 8 Sep 2008 21:39:43 -0700 Subject: [Ironruby-core] Overriding CLS Virtuals In-Reply-To: <48C5FD67.4090009@open2view.com> References: <48C5FD67.4090009@open2view.com> Message-ID: <6bbcce480809082139k663180b0wcb1b8054131337d6@mail.gmail.com> It's not real unless you start singing "You are the wind beneath my wings". :) On Mon, Sep 8, 2008 at 9:36 PM, Orion Edwards wrote: > You are my hero :-) > > Curt Hagenlocher wrote: > > 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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From orion.edwards at open2view.com Tue Sep 9 00:57:03 2008 From: orion.edwards at open2view.com (Orion Edwards) Date: Tue, 09 Sep 2008 16:57:03 +1200 Subject: [Ironruby-core] Mysteriously broken calls to dispose? In-Reply-To: <6bbcce480809082139k663180b0wcb1b8054131337d6@mail.gmail.com> References: <48C5FD67.4090009@open2view.com> <6bbcce480809082139k663180b0wcb1b8054131337d6@mail.gmail.com> Message-ID: <48C6021F.20704@open2view.com> An HTML attachment was scrubbed... URL: From orion.edwards at open2view.com Tue Sep 9 01:12:06 2008 From: orion.edwards at open2view.com (Orion Edwards) Date: Tue, 09 Sep 2008 17:12:06 +1200 Subject: [Ironruby-core] Mysteriously broken calls to dispose? In-Reply-To: <48C6021F.20704@open2view.com> References: <48C5FD67.4090009@open2view.com> <6bbcce480809082139k663180b0wcb1b8054131337d6@mail.gmail.com> <48C6021F.20704@open2view.com> Message-ID: <48C605A6.20000@open2view.com> An HTML attachment was scrubbed... URL: From jdeville at microsoft.com Tue Sep 9 04:00:58 2008 From: jdeville at microsoft.com (Jim Deville) Date: Tue, 9 Sep 2008 01:00:58 -0700 Subject: [Ironruby-core] Overriding CLS Virtuals In-Reply-To: <6bbcce480809082139k663180b0wcb1b8054131337d6@mail.gmail.com> References: <48C5FD67.4090009@open2view.com>, <6bbcce480809082139k663180b0wcb1b8054131337d6@mail.gmail.com> Message-ID: Are we planning on supporting name mangling to give more Ruby-ish names? Like will we be able to do "def dispose" instead of "def Dispose"? JD ________________________________________ From: ironruby-core-bounces at rubyforge.org [ironruby-core-bounces at rubyforge.org] On Behalf Of Brad Wilson [dotnetguy at gmail.com] Sent: Monday, September 08, 2008 9:39 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Overriding CLS Virtuals It's not real unless you start singing "You are the wind beneath my wings". :) On Mon, Sep 8, 2008 at 9:36 PM, Orion Edwards > wrote: You are my hero :-) Curt Hagenlocher wrote: 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 From curth at microsoft.com Tue Sep 9 07:25:56 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Tue, 9 Sep 2008 04:25:56 -0700 Subject: [Ironruby-core] Mysteriously broken calls to dispose? In-Reply-To: <48C605A6.20000@open2view.com> References: <48C5FD67.4090009@open2view.com> <6bbcce480809082139k663180b0wcb1b8054131337d6@mail.gmail.com> <48C6021F.20704@open2view.com> <48C605A6.20000@open2view.com> Message-ID: Yes, this has been reported before (in fact, I think it was when someone was writing "using" ?) and we haven't yet worked out a resolution. I'll see if there's something quick that can be fixed here later today. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards Sent: Monday, September 08, 2008 10:12 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Mysteriously broken calls to dispose? Follow-up If I call $fs.dispose(true), then it works. It seems there's a protected dispose(bool) in a derived class. I can't actually call Dispose(true) from C# as the compiler tells me it's protected. It strikes me as somewhat broken that the method which ironruby actually invokes is the one that you shouldn't invoke... At any rate, I'd be overjoyed if anyone could point me in the direction of a fix. I'm trying to write 'using' (a la C#) in ruby as part of demo for my local .NET user group. It should be trivial and showcase how awesome IronRuby is :-( Orion Edwards wrote: I don't seem to be able to call Dispose on a filestream. Needless to say this is problematic. Here's a paste, straight from the IR console (latest svn version 141) >>> require 'mscorlib' => true >>> include System::IO => Object >>> $fs = FileStream.new( 'file.txt', FileMode.Open ) => # >>> $fs.Dispose c:\development\ironruby\trunk\src\microsoft.scripting.core\actions\matchcaller.generated.cs:30:in `Call2': wrong number or type of arguments for `Dispose' (ArgumentError) from c:\development\ironruby\trunk\src\microsoft.scripting.core\actions\callsite.cs:275:in `UpdateAndExecute' from c:\development\ironruby\trunk\src\microsoft.scripting.core\actions\updatedelegates.generated.cs:38:in `Update2' from :0 >>> All the other methods on the filestream object work fine (read_all_text, and so on), but the call to dispose crashes. Likewise, I get a crash calling methods with overloads, which looks like it may (??) be related. >>> require 'mscorlib' => true >>> include System::IO => Object >>> $bytes = System::IO::File.read_all_bytes( 'file.txt' ); nil # nil is to prevent ir from printing the GIANT ARRAY => nil >>> $text = System::Text::Encoding.UTF8.get_string($bytes) c:\development\ironruby\trunk\src\microsoft.scripting.core\actions\matchcaller.generated.cs:35:in `Call3': wrong number or type of arguments for `get_string' (ArgumentError) from c:\development\ironruby\trunk\src\microsoft.scripting.core\actions\callsite.cs:275:in `UpdateAndExecute' from c:\development\ironruby\trunk\src\microsoft.scripting.core\actions\updatedelegates.generated.cs:45:in `Update3' from :0 >>> $text = System::Text::Encoding.UTF8.get_string($bytes, 0, $bytes.length) => "PROPER TEXT GOES HERE" It seems like it can't figure out that there is GetString(bytes) and GetString(bytes, index, length) and just uses the latter always. Is there a solution for either of these problems? Thanks a lot, Orion ________________________________ _______________________________________________ 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 ivan at flanders.co.nz Tue Sep 9 07:34:16 2008 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Tue, 9 Sep 2008 13:34:16 +0200 Subject: [Ironruby-core] Mysteriously broken calls to dispose? In-Reply-To: References: <48C5FD67.4090009@open2view.com> <6bbcce480809082139k663180b0wcb1b8054131337d6@mail.gmail.com> <48C6021F.20704@open2view.com> <48C605A6.20000@open2view.com> Message-ID: yep that is correct :) http://github.com/casualjim/ironnails/tree/master/IronNails/vendor/iron_nails/lib/core_ext/kernel.rb I figure you can wrap that in a begin..rescue block again and first try the one with the bool and then the one without it. Some implementations of Dispose don't actually implement the method with a bool as parameter. Instead of FileStream you can use the ruby File class or you could write a FileStreamAdapter in C# or something so you can safely use it from IronRuby without the overloading mayhem. Cheers Ivan On Tue, Sep 9, 2008 at 1:25 PM, Curt Hagenlocher wrote: > Yes, this has been reported before (in fact, I think it was when someone > was writing "using" J) and we haven't yet worked out a resolution. I'll > see if there's something quick that can be fixed here later today. > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Orion Edwards > *Sent:* Monday, September 08, 2008 10:12 PM > *To:* ironruby-core at rubyforge.org > *Subject:* Re: [Ironruby-core] Mysteriously broken calls to dispose? > > > > Follow-up > > If I call $fs.dispose(true), then it works. > > It seems there's a protected dispose(bool) in a derived class. > I can't actually call Dispose(true) from C# as the compiler tells me it's > protected. > > It strikes me as somewhat broken that the method which ironruby actually > invokes is the one that you shouldn't invoke... > > At any rate, I'd be overjoyed if anyone could point me in the direction of > a fix. I'm trying to write 'using' (a la C#) in ruby as part of demo for my > local .NET user group. It should be trivial and showcase how awesome > IronRuby is :-( > > Orion Edwards wrote: > > I don't seem to be able to call Dispose on a filestream. Needless to say > this is problematic. > > Here's a paste, straight from the IR console (latest svn version 141) > > >>> require 'mscorlib' > > => true > > >>> include System::IO > > => Object > > >>> $fs = FileStream.new( 'file.txt', FileMode.Open ) > > => # > > >>> $fs.Dispose > > c:\development\ironruby\trunk\src\microsoft.scripting.core\actions\matchcaller.generated.cs:30:in `Call2': wrong number or type of arguments for `Dispose' (ArgumentError) > > from c:\development\ironruby\trunk\src\microsoft.scripting.core\actions\callsite.cs:275:in `UpdateAndExecute' > > from c:\development\ironruby\trunk\src\microsoft.scripting.core\actions\updatedelegates.generated.cs:38:in `Update2' > > from :0 > > >>> > > > > > > All the other methods on the filestream object work fine (read_all_text, > and so on), but the call to dispose crashes. > > Likewise, I get a crash calling methods with overloads, which looks like it > may (??) be related. > > >>> require 'mscorlib' > > => true > > >>> include System::IO > > => Object > > >>> $bytes = System::IO::File.read_all_bytes( 'file.txt' ); nil # nil is to prevent ir from printing the GIANT ARRAY > > => nil > > >>> $text = System::Text::Encoding.UTF8.get_string($bytes) > > c:\development\ironruby\trunk\src\microsoft.scripting.core\actions\matchcaller.generated.cs:35:in `Call3': wrong number or type of arguments for `get_string' (ArgumentError) > > from c:\development\ironruby\trunk\src\microsoft.scripting.core\actions\callsite.cs:275:in `UpdateAndExecute' > > from c:\development\ironruby\trunk\src\microsoft.scripting.core\actions\updatedelegates.generated.cs:45:in `Update3' > > from :0 > > > > >>> $text = System::Text::Encoding.UTF8.get_string($bytes, 0, $bytes.length) > > => "PROPER TEXT GOES HERE" > > > > It seems like it can't figure out that there is GetString(bytes) and > GetString(bytes, index, length) and just uses the latter always. > Is there a solution for either of these problems? > > Thanks a lot, Orion > > > > > > ------------------------------ > > > > _______________________________________________ > > 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 Tue Sep 9 07:39:40 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Tue, 9 Sep 2008 04:39:40 -0700 Subject: [Ironruby-core] Overriding CLS Virtuals In-Reply-To: References: <48C5FD67.4090009@open2view.com>, <6bbcce480809082139k663180b0wcb1b8054131337d6@mail.gmail.com> Message-ID: When you override a virtual method you're pushing much more into CLR-world than when you're just calling some function on some method. In the latter case, you shouldn't have to know that the function you're calling is actually defined outside of Ruby, while in the former, this is a fairly important piece of information. In any event, I recall that both John and Tomas felt that we shouldn't -- but no longer remember all the details. -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jim Deville Sent: Tuesday, September 09, 2008 1:01 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Overriding CLS Virtuals Are we planning on supporting name mangling to give more Ruby-ish names? Like will we be able to do "def dispose" instead of "def Dispose"? JD ________________________________________ From: ironruby-core-bounces at rubyforge.org [ironruby-core-bounces at rubyforge.org] On Behalf Of Brad Wilson [dotnetguy at gmail.com] Sent: Monday, September 08, 2008 9:39 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Overriding CLS Virtuals It's not real unless you start singing "You are the wind beneath my wings". :) On Mon, Sep 8, 2008 at 9:36 PM, Orion Edwards > wrote: You are my hero :-) Curt Hagenlocher wrote: 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 _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From curth at microsoft.com Tue Sep 9 08:00:12 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Tue, 9 Sep 2008 05:00:12 -0700 Subject: [Ironruby-core] Mysteriously broken calls to dispose? In-Reply-To: References: <48C5FD67.4090009@open2view.com> <6bbcce480809082139k663180b0wcb1b8054131337d6@mail.gmail.com> <48C6021F.20704@open2view.com> <48C605A6.20000@open2view.com> Message-ID: Well, the interface itself only contains the parameterless method. The version with the parameter is part of a very common pattern that also optimizes the finalization experience and plays nicely with derived classes. If you're really concerned about cleaning something up, you'll probably follow that pattern. But if you're just interested in the syntactic sugar of "using" and/or never expect the object's lifespan to exceed that of the current method, then there's no real need to implement the additional two methods or pay the cost of having a finalizer. (Even if you suppress it later, creating an object with a finalizer is more expensive than creating it without one iirc.) IDisposable is one of my favorite topics. I believe that officially makes me a masochist. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Tuesday, September 09, 2008 4:34 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Mysteriously broken calls to dispose? yep that is correct :) http://github.com/casualjim/ironnails/tree/master/IronNails/vendor/iron_nails/lib/core_ext/kernel.rb I figure you can wrap that in a begin..rescue block again and first try the one with the bool and then the one without it. Some implementations of Dispose don't actually implement the method with a bool as parameter. Instead of FileStream you can use the ruby File class or you could write a FileStreamAdapter in C# or something so you can safely use it from IronRuby without the overloading mayhem. Cheers Ivan On Tue, Sep 9, 2008 at 1:25 PM, Curt Hagenlocher > wrote: Yes, this has been reported before (in fact, I think it was when someone was writing "using" ?) and we haven't yet worked out a resolution. I'll see if there's something quick that can be fixed here later today. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards Sent: Monday, September 08, 2008 10:12 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Mysteriously broken calls to dispose? Follow-up If I call $fs.dispose(true), then it works. It seems there's a protected dispose(bool) in a derived class. I can't actually call Dispose(true) from C# as the compiler tells me it's protected. It strikes me as somewhat broken that the method which ironruby actually invokes is the one that you shouldn't invoke... At any rate, I'd be overjoyed if anyone could point me in the direction of a fix. I'm trying to write 'using' (a la C#) in ruby as part of demo for my local .NET user group. It should be trivial and showcase how awesome IronRuby is :-( Orion Edwards wrote: I don't seem to be able to call Dispose on a filestream. Needless to say this is problematic. Here's a paste, straight from the IR console (latest svn version 141) >>> require 'mscorlib' => true >>> include System::IO => Object >>> $fs = FileStream.new( 'file.txt', FileMode.Open ) => # >>> $fs.Dispose c:\development\ironruby\trunk\src\microsoft.scripting.core\actions\matchcaller.generated.cs:30:in `Call2': wrong number or type of arguments for `Dispose' (ArgumentError) from c:\development\ironruby\trunk\src\microsoft.scripting.core\actions\callsite.cs:275:in `UpdateAndExecute' from c:\development\ironruby\trunk\src\microsoft.scripting.core\actions\updatedelegates.generated.cs:38:in `Update2' from :0 >>> All the other methods on the filestream object work fine (read_all_text, and so on), but the call to dispose crashes. Likewise, I get a crash calling methods with overloads, which looks like it may (??) be related. >>> require 'mscorlib' => true >>> include System::IO => Object >>> $bytes = System::IO::File.read_all_bytes( 'file.txt' ); nil # nil is to prevent ir from printing the GIANT ARRAY => nil >>> $text = System::Text::Encoding.UTF8.get_string($bytes) c:\development\ironruby\trunk\src\microsoft.scripting.core\actions\matchcaller.generated.cs:35:in `Call3': wrong number or type of arguments for `get_string' (ArgumentError) from c:\development\ironruby\trunk\src\microsoft.scripting.core\actions\callsite.cs:275:in `UpdateAndExecute' from c:\development\ironruby\trunk\src\microsoft.scripting.core\actions\updatedelegates.generated.cs:45:in `Update3' from :0 >>> $text = System::Text::Encoding.UTF8.get_string($bytes, 0, $bytes.length) => "PROPER TEXT GOES HERE" It seems like it can't figure out that there is GetString(bytes) and GetString(bytes, index, length) and just uses the latter always. Is there a solution for either of these problems? Thanks a lot, Orion ________________________________ _______________________________________________ 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 Tomas.Matousek at microsoft.com Tue Sep 9 11:54:02 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 9 Sep 2008 08:54:02 -0700 Subject: [Ironruby-core] Overriding CLS Virtuals In-Reply-To: References: <48C5FD67.4090009@open2view.com>, <6bbcce480809082139k663180b0wcb1b8054131337d6@mail.gmail.com> Message-ID: Let's revisit that later, I'm also not sure what the details were. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Curt Hagenlocher Sent: Tuesday, September 09, 2008 4:40 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Overriding CLS Virtuals When you override a virtual method you're pushing much more into CLR-world than when you're just calling some function on some method. In the latter case, you shouldn't have to know that the function you're calling is actually defined outside of Ruby, while in the former, this is a fairly important piece of information. In any event, I recall that both John and Tomas felt that we shouldn't -- but no longer remember all the details. -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jim Deville Sent: Tuesday, September 09, 2008 1:01 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Overriding CLS Virtuals Are we planning on supporting name mangling to give more Ruby-ish names? Like will we be able to do "def dispose" instead of "def Dispose"? JD ________________________________________ From: ironruby-core-bounces at rubyforge.org [ironruby-core-bounces at rubyforge.org] On Behalf Of Brad Wilson [dotnetguy at gmail.com] Sent: Monday, September 08, 2008 9:39 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Overriding CLS Virtuals It's not real unless you start singing "You are the wind beneath my wings". :) On Mon, Sep 8, 2008 at 9:36 PM, Orion Edwards > wrote: You are my hero :-) Curt Hagenlocher wrote: 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 _______________________________________________ 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 jdeville at microsoft.com Tue Sep 9 12:42:30 2008 From: jdeville at microsoft.com (Jim Deville) Date: Tue, 9 Sep 2008 09:42:30 -0700 Subject: [Ironruby-core] Overriding CLS Virtuals Message-ID: I know their naming convention is different, but lets see what JRuby does too. JD -----Original Message----- From: Tomas Matousek Sent: September 09, 2008 8:55 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Overriding CLS Virtuals Let's revisit that later, I'm also not sure what the details were. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Curt Hagenlocher Sent: Tuesday, September 09, 2008 4:40 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Overriding CLS Virtuals When you override a virtual method you're pushing much more into CLR-world than when you're just calling some function on some method. In the latter case, you shouldn't have to