From m.david at xmlhacker.com Thu May 1 00:00:47 2008 From: m.david at xmlhacker.com (M. David Peterson) Date: Wed, 30 Apr 2008 22:00:47 -0600 Subject: [Ironruby-core] Opening up our tree to external committers In-Reply-To: References: <580a8fc4a55d2ecd24eb11f03dba39ee@ruby-forum.com> <4815E720.4000706@sun.com> <372109E149E8084D8E6C7D9CFD82E0632D92C66716@NA-EXMSG-C115.redmond.corp.microsoft.com> <000901c8a948$518e7850$f4ab68f0$@com> <372109E149E8084D8E6C7D9CFD82E0632D92D0BB65@NA-EXMSG-C115.redmond.corp.microsoft.com> <6821FE23D98BAC41AC2A91E7970F31AF1E300189DE@QUTEXMBX02.qut.edu.au> Message-ID: On Wed, 30 Apr 2008 21:54:58 -0600, M. David Peterson wrote: > load did I say load keyword? *YIKES*! I need to stop being such a language whore. ;-) I mean require and the related thread is @ http://rubyforge.org/pipermail/ironruby-core/2008-February/000858.html -- /M:D M. David Peterson Co-Founder & Chief Architect, 3rd&Urban, LLC Email: m.david at 3rdandUrban.com | m.david at amp.fm Mobile: (206) 999-0588 http://3rdandUrban.com | http://amp.fm | http://www.oreillynet.com/pub/au/2354 From michael.letterle at gmail.com Thu May 1 00:05:47 2008 From: michael.letterle at gmail.com (Michael Letterle) Date: Thu, 1 May 2008 00:05:47 -0400 Subject: [Ironruby-core] Opening up our tree to external committers In-Reply-To: References: <580a8fc4a55d2ecd24eb11f03dba39ee@ruby-forum.com> <372109E149E8084D8E6C7D9CFD82E0632D92C66716@NA-EXMSG-C115.redmond.corp.microsoft.com> <000901c8a948$518e7850$f4ab68f0$@com> <372109E149E8084D8E6C7D9CFD82E0632D92D0BB65@NA-EXMSG-C115.redmond.corp.microsoft.com> <6821FE23D98BAC41AC2A91E7970F31AF1E300189DE@QUTEXMBX02.qut.edu.au> Message-ID: Actually couldn't you have something like.. openssl.rb: require 'IronRuby.Libraries.dll, version=xxxxxx, blahblabh' and then just "require 'openssl'" in your app? On Wed, Apr 30, 2008 at 11:58 PM, Curt Hagenlocher wrote: > > On Wed, Apr 30, 2008 at 8:43 PM, Tomas Matousek > wrote: > > > > > > > > > > > > The only issue that needs to be solved is how to efficiently discover > libraries embedded in .NET assemblies. > > It's certainly the *primary* issue. :) > > -- > > Curt Hagenlocher > curt at hagenlocher.org > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -- Michael Letterle [Polymath Prokrammer] http://blog.prokrams.com From Tomas.Matousek at microsoft.com Thu May 1 00:14:27 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Wed, 30 Apr 2008 21:14:27 -0700 Subject: [Ironruby-core] Opening up our tree to external committers In-Reply-To: References: <580a8fc4a55d2ecd24eb11f03dba39ee@ruby-forum.com> <372109E149E8084D8E6C7D9CFD82E0632D92C66716@NA-EXMSG-C115.redmond.corp.microsoft.com> <000901c8a948$518e7850$f4ab68f0$@com> <372109E149E8084D8E6C7D9CFD82E0632D92D0BB65@NA-EXMSG-C115.redmond.corp.microsoft.com> <6821FE23D98BAC41AC2A91E7970F31AF1E300189DE@QUTEXMBX02.qut.edu.au> Message-ID: Yes, I think I've already mentioned it :) You would need to identify the library inside the assembly. But that could be easy - just add the type name: require 'MyTypeThatContainsLibInitializer, IronRuby.Libraries, version=xxxxxx, blahblabh' Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Michael Letterle Sent: Wednesday, April 30, 2008 9:06 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Opening up our tree to external committers Actually couldn't you have something like.. openssl.rb: require 'IronRuby.Libraries.dll, version=xxxxxx, blahblabh' and then just "require 'openssl'" in your app? On Wed, Apr 30, 2008 at 11:58 PM, Curt Hagenlocher wrote: > > On Wed, Apr 30, 2008 at 8:43 PM, Tomas Matousek > wrote: > > > > > > > > > > > > The only issue that needs to be solved is how to efficiently discover > libraries embedded in .NET assemblies. > > It's certainly the *primary* issue. :) > > -- > > Curt Hagenlocher > curt at hagenlocher.org > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -- Michael Letterle [Polymath Prokrammer] http://blog.prokrams.com _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From Tomas.Matousek at microsoft.com Thu May 1 00:18:54 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Wed, 30 Apr 2008 21:18:54 -0700 Subject: [Ironruby-core] Opening up our tree to external committers In-Reply-To: References: <580a8fc4a55d2ecd24eb11f03dba39ee@ruby-forum.com> <5b0248170804272231g6dd74f75scd696d22d1829f20@mail.gmail.com> <4815E720.4000706@sun.com> <372109E149E8084D8E6C7D9CFD82E0632D92C66716@NA-EXMSG-C115.redmond.corp.microsoft.com> <000901c8a948$518e7850$f4ab68f0$@com> <372109E149E8084D8E6C7D9CFD82E0632D92D0BB65@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: Interesting has this e-mail just arrived? Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek Sent: Wednesday, April 30, 2008 11:58 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Opening up our tree to external committers That could be easily fixed by including 'zlib.rb', 'yaml.rb' next to IronRuby.exe. These files would do require 'IronRuby.ZLib, version=1.0.0.0, ..." to load the .NET assemblies. I need to think about our loader story more, but this idea seems to provide a nice way how to configure where the extensions are located, which version should be used etc. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Michael Letterle Sent: Wednesday, April 30, 2008 11:47 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Opening up our tree to external committers The only issue with this is we'll have to have some mechanism for them to be referenced with require 'zlib', requrie 'yaml', et. al. in order to maintain compatibility. On Wed, Apr 30, 2008 at 12:27 PM, Tomas Matousek wrote: > I would name the assemblies (and maybe the directories for consistency) IronRuby.ZLib, IronRuby.Oniguruma, IronRuby.Yaml since they are dependent on IronRuby and are not general implementations of zlib, regex, yaml. And to be consistent with other assembly names. > > Tomas > > > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of John Lam (IRONRUBY) > Sent: Wednesday, April 30, 2008 7:01 AM > To: ironruby-core at rubyforge.org > Cc: Qing Ye > Subject: [Ironruby-core] Opening up our tree to external committers > > Peter Bacon Darwin: > > > It is not too late to implement something like this. If a bit of work > > could be done on loading external IR libraries then projects could > > begin to be setup independently. This would have the multiple benefit > > of getting people to work on interesting and challenging projects, > > potentially creating alternative options to the IR community but also > > those people working on the projects are more likely to pickup bugs and > > add in the smaller patches to the core that are not getting people > > excited at the moment. > > I'm working on giving commit rights to contributors. We will open up parts of the repository to folks who want to work / collaborate on libraries like zlib, ironi, and your jvyaml port. > > Something like: > > src\ > zlib > ironi > yaml > ... > > We would have external folks own those directories and they would be responsible for reviewing contributions into those directories. > > Those directories would compile into stand-alone assemblies, but this gives folks a place to build and collaborate. I'm leaning towards treating those projects as living on a level above our current libraries + runtime: > > zlib ironi yaml > ironruby.libraries > ironruby > > The ironruby.libraries + ironruby are things that we are responsible for and have to get past our check-in troll. The zlib, ironi, and yaml libraries are things that we will periodically (on a schedule) integrate with our internal test infrastructure. This way, folks outside can continue to work without the overhead (on your end or our end) of having to run each check in past our troll. > > That said, this means that you're deferring pain until integration time. One of the things that you'll need to ensure happens is that your code compiles and runs using Silverlight. This is *painful* since running CoreCLR outside of the browser is something that we do not support today. > > Internally we have a tool that lets us do this, but we cannot redist that tool to external folks. Also, that tool is being phased out, and we're replacing it with a browser-based testing infrastructure for code that has to compile and run under Silverlight. We may be able to help with this longer term, but we don't have any short term cycles to make this happen today. > > I think that the natural owners of these libraries are: > > zlib: Michael Letterle > ironi: Peter Bacon Darwin > yaml: John Messerly > > There may be others - thoughts? > > 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 > -- Michael Letterle [Polymath Prokrammer] http://blog.prokrams.com _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From m.david at xmlhacker.com Thu May 1 00:53:41 2008 From: m.david at xmlhacker.com (M. David Peterson) Date: Wed, 30 Apr 2008 22:53:41 -0600 Subject: [Ironruby-core] Opening up our tree to external committers In-Reply-To: References: <580a8fc4a55d2ecd24eb11f03dba39ee@ruby-forum.com> <5b0248170804272231g6dd74f75scd696d22d1829f20@mail.gmail.com> <4815E720.4000706@sun.com> <372109E149E8084D8E6C7D9CFD82E0632D92C66716@NA-EXMSG-C115.redmond.corp.microsoft.com> <000901c8a948$518e7850$f4ab68f0$@com> <372109E149E8084D8E6C7D9CFD82E0632D92D0BB65@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: On Wed, 30 Apr 2008 22:18:54 -0600, Tomas Matousek wrote: > Interesting has this e-mail just arrived? Not sure. I've been away most of the day, so have no clue when it officially arrived. The timestamp suggests it arrived soon after you sent it, but that, quite obviously, means nothing given the timestamp wouldn't have been effected by a delayed delivery. I've noticed there tends to be somewhat of a delay in delivery of mail sent to the IronRuby list, though I haven't seen anything quite as delayed as 9 hours. -- /M:D M. David Peterson Co-Founder & Chief Architect, 3rd&Urban, LLC Email: m.david at 3rdandUrban.com | m.david at amp.fm Mobile: (206) 999-0588 http://3rdandUrban.com | http://amp.fm | http://www.oreillynet.com/pub/au/2354 From Jimmy.Schementi at microsoft.com Thu May 1 03:37:58 2008 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Thu, 1 May 2008 00:37:58 -0700 Subject: [Ironruby-core] Opening up our tree to external committers In-Reply-To: References: <580a8fc4a55d2ecd24eb11f03dba39ee@ruby-forum.com> <4815E720.4000706@sun.com> <372109E149E8084D8E6C7D9CFD82E0632D92C66716@NA-EXMSG-C115.redmond.corp.microsoft.com> <000901c8a948$518e7850$f4ab68f0$@com> <372109E149E8084D8E6C7D9CFD82E0632D92D0BB65@NA-EXMSG-C115.redmond.corp.microsoft.com> <6821FE23D98BAC41AC2A91E7970F31AF1E300189DE@QUTEXMBX02.qut.edu.au> Message-ID: <5283CA0A4168DF4FBBD71AE9ECA5A32845802D0678@NA-EXMSG-C116.redmond.corp.microsoft.com> Splitting into different DLLs complicate things for Silverlight. On the desktop you can have the assembly loading be dynamic with a foo.rb wrapper for a library. However, Silverlight (today) requires the DLL would have to be downloaded to the client first before loading. In other words, the AppManifest.xaml (and the XAP, but that's optional) would have to know about ALL the IronRuby Library DLLs you "could" want to use. We automate the generation of this file and XAP, so that tool (Chiron) would need to know this. While this isn't a direct problem, it does make the # of assemblies you need to include with your app go from 2 to n. Splitting could potentially save download size, but figuring out which DLLs to include is hard (see below). Are there other options for how to get DLLs onto a client machine? To get this option out of the way, we can't bake this logic (download an assembly when you require it) into our Silverlight integration, or even push the responsibility on the libraries themselves. Downloading in SL requires asynchronous requests, and we can't pause user code to do this (aka. Continuations). We could technically implement it by hacking on XmlHttpRequest directly to get synchronous support, but ugh. If network connection gets flakey your browser hangs ... not very pleasant. Do we introduce a config.rb to Silverlight that lets you define the closure of all the assemblies you'll need? This file gets loaded first, it triggers the downloads the necessary assemblies, and then load the real program? Again, the AppManifest solution will work, but it's not very dynamic-language-esc, and becomes more apparent if we split the libraries out. I'm just brainstorming for better solutions to this. Ideas? ~Jimmy > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Curt Hagenlocher > Sent: Wednesday, April 30, 2008 8:50 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Opening up our tree to external > committers > > On Wed, Apr 30, 2008 at 8:36 PM, M. David Peterson > wrote: > > > On Wed, 30 Apr 2008 21:14:23 -0600, Curt Hagenlocher > wrote: > > > > One advantage of having "one dll per library" is that you can make > decisions about which DLL to load based solely on the library name. > Once you have multiple libraries per DLL, you need a more complicated > probing or mapping scheme to know which assembly to load. > > > > Why not meet half way: Generate netmodules who's primary purpose, if > I am remembering correctly, is the ability to be merged together into > a final assembly. > > > This isn't dynamic, though. There has to be a single manifest for the > assembly that lists all the netmodules. I imagine it would be > desirable to be able to add a new library simply by copying it into > the appropriate directory without having to register it or relink the > assembly. > > -- > Curt Hagenlocher > curt at hagenlocher.org From Jimmy.Schementi at microsoft.com Thu May 1 03:42:07 2008 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Thu, 1 May 2008 00:42:07 -0700 Subject: [Ironruby-core] Opening up our tree to external committers In-Reply-To: <5283CA0A4168DF4FBBD71AE9ECA5A32845802D0678@NA-EXMSG-C116.redmond.corp.microsoft.com> References: <580a8fc4a55d2ecd24eb11f03dba39ee@ruby-forum.com> <4815E720.4000706@sun.com> <372109E149E8084D8E6C7D9CFD82E0632D92C66716@NA-EXMSG-C115.redmond.corp.microsoft.com> <000901c8a948$518e7850$f4ab68f0$@com> <372109E149E8084D8E6C7D9CFD82E0632D92D0BB65@NA-EXMSG-C115.redmond.corp.microsoft.com> <6821FE23D98BAC41AC2A91E7970F31AF1E300189DE@QUTEXMBX02.qut.edu.au> <5283CA0A4168DF4FBBD71AE9ECA5A32845802D0678@NA-EXMSG-C116.redmond.corp.microsoft.com> Message-ID: <5283CA0A4168DF4FBBD71AE9ECA5A32845802D0679@NA-EXMSG-C116.redmond.corp.microsoft.com> Whoa, if you want to actually understand the first paragraph, read this version =P > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Jimmy Schementi > Sent: Thursday, May 01, 2008 12:38 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Opening up our tree to external committers > > Splitting into different DLLs complicates things for Silverlight. > > On the desktop you can have the assembly loading be dynamic with a > foo.rb wrapper for a library. However, Silverlight (today) requires > DLLs to be downloaded to the client first before loading. In > other words, the AppManifest.xaml > would have to know about ALL the IronRuby Library DLLs you "could" want > to use (and the XAP, but that's optional). > We automate the generation of this file and XAP, so that tool > (Chiron) would need to know this. While this isn't a direct problem, it > does make the # of assemblies you need to include with your app go from > 2 to n. Splitting could potentially save download size, but figuring > out which DLLs to include is hard (see below). > > Are there other options for how to get DLLs onto a client machine? > > To get this option out of the way, we can't bake this logic (download > an assembly when you require it) into our Silverlight integration, or > even push the responsibility on the libraries themselves. Downloading > in SL requires asynchronous requests, and we can't pause user code to > do this (aka. Continuations). We could technically implement it by > hacking on XmlHttpRequest directly to get synchronous support, but ugh. > If network connection gets flakey your browser hangs ... not very > pleasant. > > Do we introduce a config.rb to Silverlight that lets you define the > closure of all the assemblies you'll need? This file gets loaded first, > it triggers the downloads the necessary assemblies, and then load the > real program? > > Again, the AppManifest solution will work, but it's not very dynamic- > language-esc, and becomes more apparent if we split the libraries out. > I'm just brainstorming for better solutions to this. Ideas? > > ~Jimmy > > > -----Original Message----- > > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > > bounces at rubyforge.org] On Behalf Of Curt Hagenlocher > > Sent: Wednesday, April 30, 2008 8:50 PM > > To: ironruby-core at rubyforge.org > > Subject: Re: [Ironruby-core] Opening up our tree to external > > committers > > > > On Wed, Apr 30, 2008 at 8:36 PM, M. David Peterson > > wrote: > > > > > > On Wed, 30 Apr 2008 21:14:23 -0600, Curt Hagenlocher > > wrote: > > > > > > > > One advantage of having "one dll per library" is that > > you can make decisions about which DLL to load based solely on the > library name. > > Once you have multiple libraries per DLL, you need a more complicated > > probing or mapping scheme to know which assembly to load. > > > > > > > > Why not meet half way: Generate netmodules who's primary > > purpose, if I am remembering correctly, is the ability to be merged > > together into a final assembly. > > > > > > This isn't dynamic, though. There has to be a single manifest for > the > > assembly that lists all the netmodules. I imagine it would be > > desirable to be able to add a new library simply by copying it into > > the appropriate directory without having to register it or relink the > > assembly. > > > > -- > > Curt Hagenlocher > > curt at hagenlocher.org > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From michael.letterle at gmail.com Thu May 1 08:32:24 2008 From: michael.letterle at gmail.com (Michael Letterle) Date: Thu, 1 May 2008 08:32:24 -0400 Subject: [Ironruby-core] Opening up our tree to external committers In-Reply-To: References: <580a8fc4a55d2ecd24eb11f03dba39ee@ruby-forum.com> <4815E720.4000706@sun.com> <372109E149E8084D8E6C7D9CFD82E0632D92C66716@NA-EXMSG-C115.redmond.corp.microsoft.com> <000901c8a948$518e7850$f4ab68f0$@com> <372109E149E8084D8E6C7D9CFD82E0632D92D0BB65@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: Well... it wasn't in my reader when I sent the exact same thing ;) On Thu, May 1, 2008 at 12:18 AM, Tomas Matousek wrote: > Interesting has this e-mail just arrived? > > Tomas > > > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek > Sent: Wednesday, April 30, 2008 11:58 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Opening up our tree to external committers > > That could be easily fixed by including 'zlib.rb', 'yaml.rb' next to IronRuby.exe. These files would do > require 'IronRuby.ZLib, version=1.0.0.0, ..." to load the .NET assemblies. I need to think about our loader story more, but this idea seems to provide a nice way how to configure where the extensions are located, which version should be used etc. > > Tomas > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Michael Letterle > Sent: Wednesday, April 30, 2008 11:47 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Opening up our tree to external committers > > The only issue with this is we'll have to have some mechanism for them > to be referenced with require 'zlib', requrie 'yaml', et. al. in order > to maintain compatibility. > > On Wed, Apr 30, 2008 at 12:27 PM, Tomas Matousek > wrote: > > I would name the assemblies (and maybe the directories for consistency) IronRuby.ZLib, IronRuby.Oniguruma, IronRuby.Yaml since they are dependent on IronRuby and are not general implementations of zlib, regex, yaml. And to be consistent with other assembly names. > > > > Tomas > > > > > > > > -----Original Message----- > > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of John Lam (IRONRUBY) > > Sent: Wednesday, April 30, 2008 7:01 AM > > To: ironruby-core at rubyforge.org > > Cc: Qing Ye > > Subject: [Ironruby-core] Opening up our tree to external committers > > > > Peter Bacon Darwin: > > > > > It is not too late to implement something like this. If a bit of work > > > could be done on loading external IR libraries then projects could > > > begin to be setup independently. This would have the multiple benefit > > > of getting people to work on interesting and challenging projects, > > > potentially creating alternative options to the IR community but also > > > those people working on the projects are more likely to pickup bugs and > > > add in the smaller patches to the core that are not getting people > > > excited at the moment. > > > > I'm working on giving commit rights to contributors. We will open up parts of the repository to folks who want to work / collaborate on libraries like zlib, ironi, and your jvyaml port. > > > > Something like: > > > > src\ > > zlib > > ironi > > yaml > > ... > > > > We would have external folks own those directories and they would be responsible for reviewing contributions into those directories. > > > > Those directories would compile into stand-alone assemblies, but this gives folks a place to build and collaborate. I'm leaning towards treating those projects as living on a level above our current libraries + runtime: > > > > zlib ironi yaml > > ironruby.libraries > > ironruby > > > > The ironruby.libraries + ironruby are things that we are responsible for and have to get past our check-in troll. The zlib, ironi, and yaml libraries are things that we will periodically (on a schedule) integrate with our internal test infrastructure. This way, folks outside can continue to work without the overhead (on your end or our end) of having to run each check in past our troll. > > > > That said, this means that you're deferring pain until integration time. One of the things that you'll need to ensure happens is that your code compiles and runs using Silverlight. This is *painful* since running CoreCLR outside of the browser is something that we do not support today. > > > > Internally we have a tool that lets us do this, but we cannot redist that tool to external folks. Also, that tool is being phased out, and we're replacing it with a browser-based testing infrastructure for code that has to compile and run under Silverlight. We may be able to help with this longer term, but we don't have any short term cycles to make this happen today. > > > > I think that the natural owners of these libraries are: > > > > zlib: Michael Letterle > > ironi: Peter Bacon Darwin > > yaml: John Messerly > > > > There may be others - thoughts? > > > > 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 > > > > > > -- > Michael Letterle > [Polymath Prokrammer] > http://blog.prokrams.com > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -- Michael Letterle [Polymath Prokrammer] http://blog.prokrams.com From michael.letterle at gmail.com Thu May 1 09:00:27 2008 From: michael.letterle at gmail.com (Michael Letterle) Date: Thu, 1 May 2008 09:00:27 -0400 Subject: [Ironruby-core] Ruby Design Meeting 4/30 Message-ID: I attended the Ruby Design meeting for last night. Since it appears that I was the only person working on IronRuby in any fashion there, I thought I'd share some of the results of the meeting with everyone. First of all, let me say the meeting was quite educational, it's not often you get to sit and listen to a bunch of really smart people discuss the ins and outs of language design. It was quite orderly and the feeling of collaboration was almost tangible. While a number of items have to be worked out over time, at least the meeting gets all the different implementors thinking about certain topics. The most important topic that's immediately relevant is probably the decision that all implmentations will use RUBY_ENGINE to report which implementation they are, in all lowercase with no spaces. It seems pretty obvious that IronRuby would be "ironruby". Attached is a patch implementing that. Most of the other topics are things we're not implementing yet, but things that should be considered. Feel free to look over the transcript: http://ruby-design.pbwiki.com/f/ruby-core-20080430.txt for details. Most of the other topics are going to spawn threads in the main ruby-core list anyway. The next meeting is set for 5/15, hope to see some of you there! -- Michael Letterle [Polymath Prokrammer] http://blog.prokrams.com -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: RubyEngineImpl.patch Type: application/octet-stream Size: 868 bytes Desc: not available URL: From jflam at microsoft.com Thu May 1 09:17:16 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Thu, 1 May 2008 06:17:16 -0700 Subject: [Ironruby-core] Ruby Design Meeting 4/30 In-Reply-To: References: Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D92D91A9C@NA-EXMSG-C115.redmond.corp.microsoft.com> Michael Letterle: > The most important topic that's immediately relevant is probably the > decision that all implmentations will use RUBY_ENGINE to report which > implementation they are, in all lowercase with no spaces. It seems > pretty obvious that IronRuby would be "ironruby". Attached is a patch > implementing that. Unfortunately, that time works out horribly for me since that's when I put the boys to bed. Thanks for sending around the notes - I've already applied your patch to my local copy here. Thanks, -John From ryan.riley at panesofglass.org Thu May 1 09:36:16 2008 From: ryan.riley at panesofglass.org (Ryan Riley) Date: Thu, 1 May 2008 08:36:16 -0500 Subject: [Ironruby-core] Separating standard libraries from builtin In-Reply-To: References: <580a8fc4a55d2ecd24eb11f03dba39ee@ruby-forum.com> <4815E720.4000706@sun.com> <372109E149E8084D8E6C7D9CFD82E0632D92C66716@NA-EXMSG-C115.redmond.corp.microsoft.com> <000901c8a948$518e7850$f4ab68f0$@com> <372109E149E8084D8E6C7D9CFD82E0632D92D0BB65@NA-EXMSG-C115.redmond.corp.microsoft.com> <6821FE23D98BAC41AC2A91E7970F31AF1E300189DE@QUTEXMBX02.qut.edu.au> <6821FE23D98BAC41AC2A91E7970F31AF1E300AB333@QUTEXMBX02.qut.edu.au> Message-ID: Would a multi-file assembly be a good fit for this? I haven't worked much with them, so I'm not sure about including multiple namespaces within one, but I would imagine it's entirely possible. On Wed, Apr 30, 2008 at 10:02 PM, Michael Letterle < michael.letterle at gmail.com> wrote: > It may not be /too/ bad if the intent is to load the CLR code, but not > expose it to the ruby runtime until a "require" is called for that > library.. though I agree, I'd rather have it implemented as separate > dlls. This also becomes relevant when we start talking about IronRuby > and silverlight, not all silverlight apps are going to need all > libraries (or even most) keeping it small is important, but if a > library is needed it shouldn't need to take a bunch of baggage with > it. > > On Wed, Apr 30, 2008 at 10:55 PM, Wayne Kelly wrote: > > > > Are you suggesting that long term - modules like digest and openssl > remain in the IronRuby.Libraries and be automatically loaded at startup? > > > > I had assumed that this was just a temporary hack and I think long term > it is the wrong way to go. There are both performance and compatibility > arguments ... Firstly, the overhead of loading non-builtin modules such as > digest should only be incurred for those applications that explicitly choose > to require it. Secondly, by automatically loading such modules, we are > poluting the global namespace and setting up possible collisions with > programmer created classes. > > In general, loading a module can have side effects. At present there > are only a handful of such modules, but long term there will be dozens, if > not hundreds. Matz should be the one that decides which modules get loaded > automatically and which require explicit loading. > > > > Cheers, Wayne. > > > > > -----Original Message----- > > > From: ironruby-core-bounces at rubyforge.org > > > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of > > > Tomas Matousek > > > Sent: Thursday, 1 May 2008 11:38 AM > > > To: ironruby-core at rubyforge.org > > > Subject: Re: [Ironruby-core] Opening up our tree to external > > > committers > > > > > > I don't think we should go crazy and create one dll per > > > library. Loading dlls has some overhead. Since digest and > > > openssl are just IronRuby stubs for functionality already > > > implemented in BCL, it could be in one dll. I need to figure > > > out how to do loading of Ruby libraries contained in an > > > assembly, but I think it could be done. > > > > > > Tomas > > > > > > -----Original Message----- > > > From: ironruby-core-bounces at rubyforge.org > > > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Wayne Kelly > > > Sent: Wednesday, April 30, 2008 4:40 PM > > > To: ironruby-core at rubyforge.org > > > Subject: Re: [Ironruby-core] Opening up our tree to external > > > committers > > > > > > > > > For consistency, can we also separate the other standard > > > libraries such as digest, openssl, etc (that require explicit > > > loading) into separate assemblies? > > > This of course, first requires us to be able to load such assemblies. > > > > > > There will of course be an ever increasing set of such > > > libraries, so it would be nice to have a relatively > > > lightweight process to allow such new directories/libraries > > > to be created. > > > > > > Note, some of these libraries might be implemented using a > > > combination of Ruby and C# code. > > > > > > I hope this mechanism will enable people to upload prototypes > > > of what they're working on, so that we don't need to wait > > > until something is complete and polished before seeing it. > > > > > > Perhaps we could have a generic IronRuby.Misc that people > > > could create directories beneath initially, which could then > > > be moved to top level status once they've matured. > > > > > > Cheers, Wayne. > > > _______________________________________________ > > > Ironruby-core mailing list > > > Ironruby-core at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/ironruby-core > > > _______________________________________________ > > > Ironruby-core mailing list > > > Ironruby-core at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > > _______________________________________________ > > Ironruby-core mailing list > > Ironruby-core at rubyforge.org > > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > > > -- > Michael Letterle > [Polymath Prokrammer] > http://blog.prokrams.com > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -- Ryan Riley ryan.riley at panesofglass.org http://www.panesofglass.org/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From ryan.riley at panesofglass.org Thu May 1 09:49:00 2008 From: ryan.riley at panesofglass.org (Ryan Riley) Date: Thu, 1 May 2008 08:49:00 -0500 Subject: [Ironruby-core] Opening up our tree to external committers In-Reply-To: <5283CA0A4168DF4FBBD71AE9ECA5A32845802D0678@NA-EXMSG-C116.redmond.corp.microsoft.com> References: <580a8fc4a55d2ecd24eb11f03dba39ee@ruby-forum.com> <372109E149E8084D8E6C7D9CFD82E0632D92C66716@NA-EXMSG-C115.redmond.corp.microsoft.com> <000901c8a948$518e7850$f4ab68f0$@com> <372109E149E8084D8E6C7D9CFD82E0632D92D0BB65@NA-EXMSG-C115.redmond.corp.microsoft.com> <6821FE23D98BAC41AC2A91E7970F31AF1E300189DE@QUTEXMBX02.qut.edu.au> <5283CA0A4168DF4FBBD71AE9ECA5A32845802D0678@NA-EXMSG-C116.redmond.corp.microsoft.com> Message-ID: On Thu, May 1, 2008 at 2:37 AM, Jimmy Schementi < Jimmy.Schementi at microsoft.com> wrote: > Splitting into different DLLs complicate things for Silverlight. > > On the desktop you can have the assembly loading be dynamic with a foo.rb > wrapper for a library. However, Silverlight (today) requires the DLL would > have to be downloaded to the client first before loading. In other words, > the AppManifest.xaml (and the XAP, but that's optional) would have to know > about ALL the IronRuby Library DLLs you "could" want to use. We automate the > generation of this file and XAP, so that tool (Chiron) would need to know > this. While this isn't a direct problem, it does make the # of assemblies > you need to include with your app go from 2 to n. Splitting could > potentially save download size, but figuring out which DLLs to include is > hard (see below). > > Are there other options for how to get DLLs onto a client machine? > > To get this option out of the way, we can't bake this logic (download an > assembly when you require it) into our Silverlight integration, or even push > the responsibility on the libraries themselves. Downloading in SL requires > asynchronous requests, and we can't pause user code to do this (aka. > Continuations). We could technically implement it by hacking on > XmlHttpRequest directly to get synchronous support, but ugh. If network > connection gets flakey your browser hangs ... not very pleasant. > > Do we introduce a config.rb to Silverlight that lets you define the > closure of all the assemblies you'll need? This file gets loaded first, it > triggers the downloads the necessary assemblies, and then load the real > program? > > Again, the AppManifest solution will work, but it's not very > dynamic-language-esc, and becomes more apparent if we split the libraries > out. I'm just brainstorming for better solutions to this. Ideas? > > ~Jimmy Wouldn't this, then, lend itself toward a solution towards that proposed by /M:D? I don't know multi-file assemblies that well, but it seems the best solution in that, iirc, only the .netmodules needed are loaded as they are called, but they're already linked by the primary assembly. This might be more complicated to maintain and cleanly build; I don't know. I also don't quite understand the "not dynamic" comment, but again, I'm not too familiar with multi-file assemblies. (Also, apologies for the duplicate in the other thread.) -R2 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ryan.riley at panesofglass.org Thu May 1 09:51:08 2008 From: ryan.riley at panesofglass.org (Ryan Riley) Date: Thu, 1 May 2008 08:51:08 -0500 Subject: [Ironruby-core] Separating standard libraries from builtin In-Reply-To: References: <580a8fc4a55d2ecd24eb11f03dba39ee@ruby-forum.com> <372109E149E8084D8E6C7D9CFD82E0632D92C66716@NA-EXMSG-C115.redmond.corp.microsoft.com> <000901c8a948$518e7850$f4ab68f0$@com> <372109E149E8084D8E6C7D9CFD82E0632D92D0BB65@NA-EXMSG-C115.redmond.corp.microsoft.com> <6821FE23D98BAC41AC2A91E7970F31AF1E300189DE@QUTEXMBX02.qut.edu.au> <6821FE23D98BAC41AC2A91E7970F31AF1E300AB333@QUTEXMBX02.qut.edu.au> Message-ID: Sorry, I see this is being discussed elsewhere. Kindly disregard. :) -R2 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdeville at microsoft.com Thu May 1 11:22:53 2008 From: jdeville at microsoft.com (Jim Deville) Date: Thu, 1 May 2008 08:22:53 -0700 Subject: [Ironruby-core] class question. In-Reply-To: <508795.93049.qm@web50608.mail.re2.yahoo.com> References: <508795.93049.qm@web50608.mail.re2.yahoo.com> Message-ID: Private appears to be broken. Can you submit this as a bug please? JD From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Unnikrishnan Nair Sent: Wednesday, April 30, 2008 1:52 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] class question. Please bear with me if it is already discussed; I am running the following code class Tester def sayHello hi puts "I am saying hello" end private def hi puts "Did I say hi?" end private :hi #doube checking private end p = Tester.new p.hi p.sayHello As per ruby, it should fail but Ironruby runs through without any error. I am going through the code to see where it is performed. Thanks. Unni -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at exchange.microsoft.com Thu May 1 12:29:40 2008 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Thu, 1 May 2008 09:29:40 -0700 Subject: [Ironruby-core] Code Review: Procs5 In-Reply-To: References: Message-ID: <7AD436E4270DD54A94238001769C2227012B27AD7ED4@DF-GRTDANE-MSG.exchange.corp.microsoft.com> I'm assuming proc's are 1st class things because their IDO's which produce a call rule. Should the extra public properties (Id, Self, LocalScope, etc...) be accessible to Ruby programs? Or should they be internal w/ static accessors somewhere in RubyOps? Also is there a reason you can't use object identity instead of ID equality - it seems there'll be a 1<->1 relationship here. Otherwise looks good. -----Original Message----- From: Tomas Matousek Sent: Tuesday, April 29, 2008 8:16 PM To: Rowan Code Reviewers; IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: Procs5 tfpt review /shelveset:Procs5;REDMOND\tomat Refactors Ruby blocks and procs: - The compiled block has now signature (BlockParam, self, formal-args) - self argument was added. Previously it was passed thru BlockParam.Proc in a very hacky way. - Removed hacks from dynamic actions on blocks and methods created by define_method. Improved rules generated for these actions. - RubyBlockInfo no longer inherits from RubyMemberInfo. There is no reason to do so, blocks are not directly stored in method tables and cannot be invoked via InvokeMemberAction. Adds YieldAction - a custom Ruby action for yielding to a block that allows to pass BlockParam and self. Implements module_eval/class_eval - both Proc and string versions. Implements eval that takes Proc as a binding. Adds module_eval and proc related unit tests. Tomas From jflam at microsoft.com Thu May 1 12:30:10 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Thu, 1 May 2008 09:30:10 -0700 Subject: [Ironruby-core] Code Review: zlib Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D92D91B58@NA-EXMSG-C115.redmond.corp.microsoft.com> Hi Michael, Thanks so much for sending in this patch! I did a high-level review of the code (I didn't attempt to analyze the algorithms that you're using) for compatibility with the rest of the codebase, style, invariants etc. I'm attaching a diff to this mail so that folks can follow along with the discussion. Note that the diff isn't quite as useful as it might be in this case because the code formatting was different on the way in. In the future, we can do a more detailed review of the algorithms but for now let's just treat it as a black box. Overall I think it's awesome that it works as advertised. There's just some work that needs to be done to make sure that the methods follow Ruby semantics. I intend to check this code in as-is for the time being since we don't have any tests that exercise it in our current test matrix. This should make it easier for folks to work on it instead of shipping around patch files on mailing lists. ETA should be tomorrow on this check-in. General comments: ================= 1. Attach our standard MsPL copyright header to the top of files 2. Follow standard .NET naming conventions (PascalCaseMethodsAndClasses, _instanceMembers). This is really easy to fix after the fact via VS refactoring tools, but it's a matter of who does the work :) 3. Please spend some time thinking about your invariants, and in particular your non-nullable reference types (that's what the /*!*/ annotations mean). This will help you think about cases where you need to add explicit null checks vs. cases where you don't. 4. Consider using #region to group chunks of code together 5. If there's more work or missing work, a few TODO comments would help guide folks reading the code. 6. PLEASE format your code the way the rest of the source code is formatted, since this will make diffs on code reviews much more readable (there's *way* too much noise in this diff). Specific comments: ================== 1. Using "initialize" to initialize your .NET invariants is a bad idea - someone could override initialize and invalidate your invariants. Move those things to a constructor instead. Instead of: [RubyMethod("initialize")] public static ZStream/*!*/ Initialize(ZStream/*!*/ self) { self._outPos = -1; self._inPos = -1; self._bitBucket = 0; self._bitCount = 0; self._inputBuffer = new List(); self._outputBuffer = new List(); return self; } Do: public ZStream() { _outPos = -1; _inPos = -1; _bitBucket = 0; _bitCount = 0; _inputBuffer = new List(); _outputBuffer = new List(); } 2. The HuffmanTree class: a) does not appear to be a Ruby class b) should use properties with backing private fields 3. The GzipReader#open instance method: This appears to be a private instance method in Ruby. You had it defined as a public instance method that creates a new instance of GZipReader. I doubt that this is correct. I suspect that it is used to initialize the current instance of GZipReader to the IO object that is passed in. I believe that the code that you have in the GZipReader's constructor should be moved to this method. 4. The GzipReader.open singleton methods: You only have a single overload that handles the MutableString case. In most cases, Ruby libraries will do an implicit conversion via to_str on any arbitrary object that is passed in as a parameter. You'll need to use the [NotNull] attribute to force the call to the overload that accepts object for the case where the caller passes in nil. Instead of: public static GZipReader Open(CodeContext/*!*/ context, RubyClass/*!*/ self, MutableString/*!*/ filename) { ... } Do public static GZipReader Open(CodeContext/*!*/ context, RubyClass/*!*/ self, [NotNull]MutableString/*!*/ filename) { ... } public static GZipReader Open(CodeContext/*!*/ context, RubyClass/*!*/ self, object filename) { return Open(context, self, Protocols.CastToString(context, filename)); } 5. The block method overload of GzipReader.open() The signature wasn't correct - the correct signature is: public static void Open(CodeContext/*!*/ context, RubyClass/*!*/ self, BlockParam block, [NotNull]MutableString/*!*/ filename) There were a few other problems in the original implementation a) allocate just allocates memory - it doesn't call initialize to initialize a new instance of a specific class; you'll need to invoke new on that class. b) open is a private instance method, so you won't need to invoke it via a site Tests: ====== I still have to sync to the latest rubinius specs which has a spec suite for zlib. Thanks, -John -------------- next part -------------- A non-text attachment was scrubbed... Name: zlib.diff Type: application/octet-stream Size: 96506 bytes Desc: zlib.diff URL: From charles.nutter at sun.com Thu May 1 12:40:14 2008 From: charles.nutter at sun.com (Charles Oliver Nutter) Date: Thu, 01 May 2008 11:40:14 -0500 Subject: [Ironruby-core] Ruby Design Meeting 4/30 In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D92D91A9C@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <372109E149E8084D8E6C7D9CFD82E0632D92D91A9C@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <4819F26E.8000307@sun.com> John Lam (IRONRUBY) wrote: > Michael Letterle: > >> The most important topic that's immediately relevant is probably the >> decision that all implmentations will use RUBY_ENGINE to report which >> implementation they are, in all lowercase with no spaces. It seems >> pretty obvious that IronRuby would be "ironruby". Attached is a patch >> implementing that. > > Unfortunately, that time works out horribly for me since that's when I put the boys to bed. Thanks for sending around the notes - I've already applied your patch to my local copy here. John, you should definitely bring this up on the list. Nobody replied to Matz's last message about the second meeting, so we went forward. The next meeting is scheduled for the 15th/16th at the same time of day. If the time doesn't work, it can be adjusted. But you need to let ruby-core know...we miss you! - Charlie From Tomas.Matousek at microsoft.com Thu May 1 13:46:05 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Thu, 1 May 2008 10:46:05 -0700 Subject: [Ironruby-core] Code Review: Procs5 In-Reply-To: <7AD436E4270DD54A94238001769C2227012B27AD7ED4@DF-GRTDANE-MSG.exchange.corp.microsoft.com> References: <7AD436E4270DD54A94238001769C2227012B27AD7ED4@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: Yes, they are 1st class. Some of the properties should be accessible, some not. There will be more cleanup later, after all operations are implemented. Some fields might move among classes (RubyBlockInfo, Proc, BlockParam) etc. The id is now 1:1 but might not be in future - some blocks could be compatible if they have the same signature shape. Tomas -----Original Message----- From: Dino Viehland Sent: Thursday, May 01, 2008 9:30 AM To: Tomas Matousek; Rowan Code Reviewers; IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: RE: Code Review: Procs5 I'm assuming proc's are 1st class things because their IDO's which produce a call rule. Should the extra public properties (Id, Self, LocalScope, etc...) be accessible to Ruby programs? Or should they be internal w/ static accessors somewhere in RubyOps? Also is there a reason you can't use object identity instead of ID equality - it seems there'll be a 1<->1 relationship here. Otherwise looks good. -----Original Message----- From: Tomas Matousek Sent: Tuesday, April 29, 2008 8:16 PM To: Rowan Code Reviewers; IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: Procs5 tfpt review /shelveset:Procs5;REDMOND\tomat Refactors Ruby blocks and procs: - The compiled block has now signature (BlockParam, self, formal-args) - self argument was added. Previously it was passed thru BlockParam.Proc in a very hacky way. - Removed hacks from dynamic actions on blocks and methods created by define_method. Improved rules generated for these actions. - RubyBlockInfo no longer inherits from RubyMemberInfo. There is no reason to do so, blocks are not directly stored in method tables and cannot be invoked via InvokeMemberAction. Adds YieldAction - a custom Ruby action for yielding to a block that allows to pass BlockParam and self. Implements module_eval/class_eval - both Proc and string versions. Implements eval that takes Proc as a binding. Adds module_eval and proc related unit tests. Tomas From Tomas.Matousek at microsoft.com Thu May 1 13:50:11 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Thu, 1 May 2008 10:50:11 -0700 Subject: [Ironruby-core] Code Review: ExplicitRuby In-Reply-To: References: Message-ID: Looks good. Tomas -----Original Message----- From: Martin Maly Sent: Thursday, May 01, 2008 9:53 AM To: Tomas Matousek; John Lam (IRONRUBY) Cc: ironruby-core at rubyforge.org Subject: Code Review: ExplicitRuby If the language expects CodeContext to be present on the dynamic call site, it is now required to pass the code context expression to the DLR compiler explicitly as an argument to the dynamic expression. This change adopts Ruby to this DLR requirement. tfpt review /shelveset:ExplicitRuby;REDMOND\mmaly Thanks! Martin From ksunair at yahoo.com Thu May 1 13:56:16 2008 From: ksunair at yahoo.com (Unnikrishnan Nair) Date: Thu, 1 May 2008 10:56:16 -0700 (PDT) Subject: [Ironruby-core] class question. Message-ID: <37696.12969.qm@web50610.mail.re2.yahoo.com> I will continue the rest of the testing.. Thanks ----- Original Message ---- From: Jim Deville To: "ironruby-core at rubyforge.org" Sent: Thursday, May 1, 2008 10:22:53 AM Subject: Re: [Ironruby-core] class question. Private appears to be broken. Can you submit this as a bug please? JD From:ironruby-core-bounces at rubyforge.org[mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of UnnikrishnanNair Sent: Wednesday, April 30, 2008 1:52 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] class question. Please bear with me if it isalready discussed; I am running the following code class Tester def sayHello hi puts "I am saying hello" end private def hi puts "Did I say hi?" end private :hi #doube checking private end p = Tester.new p.hi p.sayHello As per ruby, it should fail but Ironruby runs through without any error. I amgoing through the code to see where it is performed. Thanks. Unni -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tomas.Matousek at microsoft.com Thu May 1 14:18:17 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Thu, 1 May 2008 11:18:17 -0700 Subject: [Ironruby-core] Code Review: HostingSeparation1 Message-ID: tfpt review /shelveset:HostingSeparation1;REDMOND\tomat DLR, HAPI, Nessie and all languages. A step towards full HAPI/DLR separation and fixes of some inconsistencies with the spec. Details: Splits TokenCategorizer class into two classes: TokenizerService (language API) and TokenCategorizer (HAPI). TokenizerService is what languages implement, it could be either a base class for language tokenizers or it could delegate to the language tokenizer - that's up to the language. Moves TokenInfo, TokenCategory, TokenTriggers out of Hosting namespace - these are shared concepts among HAPI, DLR and languages. Moves and renames EngineTextContentProvider to Microsoft.Scripting.LanguageBoundTextContentProvider (it was an internal helper class in Hosting used from M.S.). Removes Hosting.CodeSenseProvider - it's not used. Removes differences from specification: - CompiledCode - renames, adds and remissing ones, removes CreateOptimizedScope. Adds parameter-less Execute() that executes in an optimized scope. We need to revisit optimized scopes, but this is needed for now. - ScriptCode - adds parameter-less Run() that executes the code in an optimized scope. Consolidates optimized scope execution from SourceUnit and CompiledCode. - ScriptRuntime - adds CreateScope, Operations, CreateOperations. Removes Platform and DomainManager properties, they are duplicating existing members. - ScriptDomainManager - makes ExecuteSourceUnit private. - SourceUnit, ScriptSource - removes ToString(). It was there just to display the path in debug watches, which is better done via DebuggerDispay attribute. Fixes bug in ScriptDomainManager.LanguageRegistration.LoadLanguageContext - it wasn't thread-safe. Two different language contexts could have escaped the method. Adds missing methods to HostingHelpers. These are supposed to be used by languages/frameworks that implement their hosting API on top of DLR HAPI. Tomas -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: HostingSeparation1.diff Type: application/octet-stream Size: 142736 bytes Desc: HostingSeparation1.diff URL: From Shri.Borde at microsoft.com Fri May 2 02:56:17 2008 From: Shri.Borde at microsoft.com (Shri Borde) Date: Thu, 1 May 2008 23:56:17 -0700 Subject: [Ironruby-core] Opening up our tree to external committers In-Reply-To: References: <580a8fc4a55d2ecd24eb11f03dba39ee@ruby-forum.com> <372109E149E8084D8E6C7D9CFD82E0632D92C66716@NA-EXMSG-C115.redmond.corp.microsoft.com> <000901c8a948$518e7850$f4ab68f0$@com> <372109E149E8084D8E6C7D9CFD82E0632D92D0BB65@NA-EXMSG-C115.redmond.corp.microsoft.com> <6821FE23D98BAC41AC2A91E7970F31AF1E300189DE@QUTEXMBX02.qut.edu.au> <5283CA0A4168DF4FBBD71AE9ECA5A32845802D0678@NA-EXMSG-C116.redmond.corp.microsoft.com> Message-ID: <50B69702CA6E6D4E849D30CD4989AB8EE7AC495A51@DF-GRTDANE-MSG.exchange.corp.microsoft.com> IronPython has the following scheme for loading Python modules: 1. IronPython looks for all the PythonModuleAttribute custom attributes inside any assembly registered with IronPython using "clr.AddReference(assemblyName)" which is similar to "require" in Ruby. The assembly-level attributes point to all the Python modules available inside the assembly. For eg, "[assembly: PythonModuleAttribute("nt", typeof(IronPython.Modules.PythonNT))]" indicates that the "PythonNT" C# type implements the "nt" Python module. A single assembly can contain multiple Python modules. 2. On startup, IronPython registers IronPython.Modules.dll automatically. Hence, all Python modules from the dll become accessible. 3. Python loads site.py on startup. The site.py that ships with IronPython looks inside a specific folder and registers all assemblies in that folder. So a user can drop an assembly in this folder, and all the Python modules in the assembly will become accessible. I believe Seo uses this to good measure in FePy to make his own set of Python modules available to users. 4. Accessible modules are put on a stand-by list. They get activated only if the user does "import someModule" which is similar to "require" in Ruby. Until then, the user is not exposed to the fact that the modules are accessible. Could a similar scheme work for IronRuby? All the small IronRuby libraries owned by external committers could live in an assembly like IronRuby.Libraries.Staging.dll, and this could be placed in some well-known folder relative to IronRuby.dll. Size should not be much of an issue in Silverlight as you would expect that the IronRuby runtime and libraries would be cached on the user's machine most of the time. If it does become an issue, we can later break up IronRuby.Libraries.Staging.dll into smaller pieces. Once the DLR gets more stable, IronRuby.Libraries.Staging.dll can be merged into IronRuby.Libraries.dll. Thanks, Shri Want to work on IronPython, IronRuby, F#? Visit http://blogs.msdn.com/ironpython/ From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ryan Riley Sent: Thursday, May 01, 2008 6:49 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Opening up our tree to external committers On Thu, May 1, 2008 at 2:37 AM, Jimmy Schementi > wrote: Splitting into different DLLs complicate things for Silverlight. On the desktop you can have the assembly loading be dynamic with a foo.rb wrapper for a library. However, Silverlight (today) requires the DLL would have to be downloaded to the client first before loading. In other words, the AppManifest.xaml (and the XAP, but that's optional) would have to know about ALL the IronRuby Library DLLs you "could" want to use. We automate the generation of this file and XAP, so that tool (Chiron) would need to know this. While this isn't a direct problem, it does make the # of assemblies you need to include with your app go from 2 to n. Splitting could potentially save download size, but figuring out which DLLs to include is hard (see below). Are there other options for how to get DLLs onto a client machine? To get this option out of the way, we can't bake this logic (download an assembly when you require it) into our Silverlight integration, or even push the responsibility on the libraries themselves. Downloading in SL requires asynchronous requests, and we can't pause user code to do this (aka. Continuations). We could technically implement it by hacking on XmlHttpRequest directly to get synchronous support, but ugh. If network connection gets flakey your browser hangs ... not very pleasant. Do we introduce a config.rb to Silverlight that lets you define the closure of all the assemblies you'll need? This file gets loaded first, it triggers the downloads the necessary assemblies, and then load the real program? Again, the AppManifest solution will work, but it's not very dynamic-language-esc, and becomes more apparent if we split the libraries out. I'm just brainstorming for better solutions to this. Ideas? ~Jimmy Wouldn't this, then, lend itself toward a solution towards that proposed by /M:D? I don't know multi-file assemblies that well, but it seems the best solution in that, iirc, only the .netmodules needed are loaded as they are called, but they're already linked by the primary assembly. This might be more complicated to maintain and cleanly build; I don't know. I also don't quite understand the "not dynamic" comment, but again, I'm not too familiar with multi-file assemblies. (Also, apologies for the duplicate in the other thread.) -R2 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tomas.Matousek at microsoft.com Fri May 2 14:11:02 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Fri, 2 May 2008 11:11:02 -0700 Subject: [Ironruby-core] Code Review: ConstraintsRuby In-Reply-To: References: Message-ID: Looks good. Tomas -----Original Message----- From: Martin Maly Sent: Friday, May 02, 2008 10:07 AM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: ConstraintsRuby This change updates Ruby with generic constraints that will soon be imposed by DLR. One change of note is in RubyTypeBuilder where Ruby builds a type which implements IDynamicObject interface. Ruby must also place the constraint on that type since IDynamicObject interface has the constraint. tfpt review /shelveset:ConstraintsRuby;REDMOND\mmaly Thanks! Martin From jflam at microsoft.com Fri May 2 14:26:22 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Fri, 2 May 2008 11:26:22 -0700 Subject: [Ironruby-core] FW: Code Review: ConstraintsRuby Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D92D92224@NA-EXMSG-C115.redmond.corp.microsoft.com> Martin isn't on the mailing list ... Thanks, -John -----Original Message----- From: Martin Maly Sent: Friday, May 02, 2008 10:07 AM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: ConstraintsRuby This change updates Ruby with generic constraints that will soon be imposed by DLR. One change of note is in RubyTypeBuilder where Ruby builds a type which implements IDynamicObject interface. Ruby must also place the constraint on that type since IDynamicObject interface has the constraint. tfpt review /shelveset:ConstraintsRuby;REDMOND\mmaly Thanks! Martin -------------- next part -------------- A non-text attachment was scrubbed... Name: ConstraintsRuby.diff Type: application/octet-stream Size: 5960 bytes Desc: ConstraintsRuby.diff URL: From jflam at microsoft.com Fri May 2 14:26:55 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Fri, 2 May 2008 11:26:55 -0700 Subject: [Ironruby-core] FW: Code Review: ExplicitRuby Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D92D92227@NA-EXMSG-C115.redmond.corp.microsoft.com> Martin isn't on the mailing list ... Thanks, -John -----Original Message----- From: Martin Maly Sent: Thursday, May 01, 2008 9:53 AM To: Tomas Matousek; John Lam (IRONRUBY) Cc: ironruby-core at rubyforge.org Subject: Code Review: ExplicitRuby If the language expects CodeContext to be present on the dynamic call site, it is now required to pass the code context expression to the DLR compiler explicitly as an argument to the dynamic expression. This change adopts Ruby to this DLR requirement. tfpt review /shelveset:ExplicitRuby;REDMOND\mmaly Thanks! Martin -------------- next part -------------- A non-text attachment was scrubbed... Name: ExplicitRuby.diff Type: application/octet-stream Size: 8279 bytes Desc: ExplicitRuby.diff URL: From jflam at microsoft.com Fri May 2 14:38:51 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Fri, 2 May 2008 11:38:51 -0700 Subject: [Ironruby-core] Code Review: bugfixes9 Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D92D9223C@NA-EXMSG-C115.redmond.corp.microsoft.com> tfpt review /shelveset:bugfixes9;REDMOND\jflam Ruby only bug fixes: Passes all local tests. #19804: Inheriting from Numeric - added a default ctor #19806: Wrong number or type of arguments for Regexp - added overloads and trivially implemented Regexp.compile as well - removed ctor for Regexp that takes a string - not necessary because we have implicit conversion operator for MutableString to String #19887: Array#reverse_each not implemented - implemented and verified that all specs pass #19893: String#ljust not implemented - implemented ljust - all specs pass - also trivially implemented rjust - all specs pass #19842: undef_method overload - added overload that accepts a string #19891: Module comparison methods unimplemented - implemented <, <=, >, >=, <=> - all specs pass #19845: syntax error - unexpected BLOCK_DO - fixed by patch #19880 Patches applied: #19879: Implements the RUBY_ENGINE constant (Michael Letterle) #19880: Fix for Parser CmdArg bug #19845 Thanks, -John -------------- next part -------------- A non-text attachment was scrubbed... Name: bugfixes9.diff Type: application/octet-stream Size: 146775 bytes Desc: bugfixes9.diff URL: From jdeville at microsoft.com Fri May 2 17:37:03 2008 From: jdeville at microsoft.com (Jim Deville) Date: Fri, 2 May 2008 14:37:03 -0700 Subject: [Ironruby-core] Friday Status Update Message-ID: Like we talked about earlier, let's give an update on what we are working on I'm working on hacking optparse to work so that we can update to the newest Rubinius spec's. Then I'll be closing out a whole slew of bugs. Jim Deville -------------- next part -------------- An HTML attachment was scrubbed... URL: From jflam at microsoft.com Fri May 2 18:24:33 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Fri, 2 May 2008 15:24:33 -0700 Subject: [Ironruby-core] Friday Status Update In-Reply-To: References: Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D92D923AE@NA-EXMSG-C115.redmond.corp.microsoft.com> I'm still working on the shelveset that I sent out for code review earlier today (bugfixes9). We found a few more issues when we did the code review. The most interesting case is this one: We normally define methods that accept symbol using a signature that takes a SymbolId, eg: [RubyMethod("attr", RubyMethodAttributes.PrivateInstance)] public static void Attr(CodeContext/*!*/ context, RubyModule/*!*/ self, SymbolId name) { DefineAccessor(context, self, name, true, false); } Methods like these will blow up if you pass it a 'string-like' thing. We have a Protocol to convert these things - Protocols.CastToSymbol(), which does the right thing, which is call to_str on the target. We have an open question right now which is whether we should bake in object to SymbolId conversions in the binder or whether we should handle them in a case by case basis by defining an overload that accepts an Object, and calling Protocols.CastToSymbol() on that object. Once I get this shelveset past the troll, I'll work next on getting socket.cs and the ironi regex library into the tree. Thanks, -John From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jim Deville Sent: Friday, May 02, 2008 2:37 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Friday Status Update Like we talked about earlier, let's give an update on what we are working on I'm working on hacking optparse to work so that we can update to the newest Rubinius spec's. Then I'll be closing out a whole slew of bugs. Jim Deville From michael.letterle at gmail.com Fri May 2 19:46:23 2008 From: michael.letterle at gmail.com (Michael Letterle) Date: Fri, 2 May 2008 19:46:23 -0400 Subject: [Ironruby-core] Friday Status Update In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D92D923AE@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <372109E149E8084D8E6C7D9CFD82E0632D92D923AE@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: I've been looking at what it would take to start using byte arrays rather then strings for the backing store for MutableString. It's one heck of a rabbit hole, I can get it /almost/ working... either I fail one spec, or three... and they're totally different. Anyway, if noone else is working on it I'll continue to see what I can do, this is related to the zlib issue with binary files (or actually any file that contains bytes over 127 potentially) as data is passed around as strings and not byte arrays. Oh and I hope to implement actual compression sometime soon.. just need to block out some time. On Fri, May 2, 2008 at 6:24 PM, John Lam (IRONRUBY) wrote: > I'm still working on the shelveset that I sent out for code review earlier > today (bugfixes9). We found a few more issues when we did the code review. > The most interesting case is this one: > > We normally define methods that accept symbol using a signature that takes > a SymbolId, eg: > > > [RubyMethod("attr", RubyMethodAttributes.PrivateInstance)] > public static void Attr(CodeContext/*!*/ context, RubyModule/*!*/ self, > SymbolId name) { > DefineAccessor(context, self, name, true, false); > } > > > Methods like these will blow up if you pass it a 'string-like' thing. We > have a Protocol to convert these things - Protocols.CastToSymbol(), which > does the right thing, which is call to_str on the target. > > We have an open question right now which is whether we should bake in > object to SymbolId conversions in the binder or whether we should handle > them in a case by case basis by defining an overload that accepts an Object, > and calling Protocols.CastToSymbol() on that object. > > Once I get this shelveset past the troll, I'll work next on getting > socket.cs and the ironi regex library into the tree. > > Thanks, > -John > > From: ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] On Behalf Of Jim Deville > Sent: Friday, May 02, 2008 2:37 PM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] Friday Status Update > > Like we talked about earlier, let's give an update on what we are working > on > > I'm working on hacking optparse to work so that we can update to the > newest Rubinius spec's. Then I'll be closing out a whole slew of bugs. > > Jim Deville > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -- Michael Letterle [Polymath Prokrammer] http://blog.prokrams.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jflam at microsoft.com Sat May 3 00:28:45 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Fri, 2 May 2008 21:28:45 -0700 Subject: [Ironruby-core] Friday Status Update In-Reply-To: References: <372109E149E8084D8E6C7D9CFD82E0632D92D923AE@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D92D92470@NA-EXMSG-C115.redmond.corp.microsoft.com> Michael Letterle: > I've been looking at what it would take to start using byte arrays > rather then strings for the backing store for MutableString. It's one > heck of a rabbit hole, I can get it /almost/ working... either I fail > one spec, or three... and they're totally different. Anyway, if noone > else is working on it I'll continue to see what I can do, this is > related to the zlib issue with binary files (or actually any file that > contains bytes over 127 potentially) as data is passed around as > strings and not byte arrays. > > Oh and I hope to implement actual compression sometime soon.. just > need to block out some time. Tomas has spent quite some time looking at a dual byte-array + char-array MutableString implementation. It was sitting in his work queue to tackle after his current work on eval and blocks. Perhaps you could share some of your findings with him around the zlib integration effort so that we don't duplicate our efforts? Thanks! -John From bacondarwin at googlemail.com Sat May 3 03:44:52 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Sat, 3 May 2008 08:44:52 +0100 Subject: [Ironruby-core] Friday Status Update In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D92D923AE@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <372109E149E8084D8E6C7D9CFD82E0632D92D923AE@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <001f01c8acf1$93a29260$bae7b720$@com> I might be right off track here and since I haven't seen any of the detailed discussion about the question below I might be being completely naive. The open question should really be targeting all standard conversion protocols in Ruby. In my mind it seems that the way Ruby works generally is to have a load of these "protocols" for type conversion, but that it is not enforced by the language at all and that it is entirely up the library developer to follow suit. While this allows ultimate freedom for the developer it obviously does allow inconsistency to creep in. I would feel uncomfortable baking these protocols into the binder, unless there was some way of overriding them in library code, since this is perfectly possible in MRI. For instance, it must be possible in at least some cases to monkey patch code that by default uses the standard conversion protocol so that it does something different (e.g. converts strings to symbols in some other way???) Clearly this is not a good thing to do in general but since Ruby allows it as a language, it seems that it should be supported in IronRuby. Happy to be completely wrong here. Pete -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of John Lam (IRONRUBY) Sent: Friday,02 May 02, 2008 23:25 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Friday Status Update I'm still working on the shelveset that I sent out for code review earlier today (bugfixes9). We found a few more issues when we did the code review. The most interesting case is this one: We normally define methods that accept symbol using a signature that takes a SymbolId, eg: [RubyMethod("attr", RubyMethodAttributes.PrivateInstance)] public static void Attr(CodeContext/*!*/ context, RubyModule/*!*/ self, SymbolId name) { DefineAccessor(context, self, name, true, false); } Methods like these will blow up if you pass it a 'string-like' thing. We have a Protocol to convert these things - Protocols.CastToSymbol(), which does the right thing, which is call to_str on the target. We have an open question right now which is whether we should bake in object to SymbolId conversions in the binder or whether we should handle them in a case by case basis by defining an overload that accepts an Object, and calling Protocols.CastToSymbol() on that object. Once I get this shelveset past the troll, I'll work next on getting socket.cs and the ironi regex library into the tree. Thanks, -John From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jim Deville Sent: Friday, May 02, 2008 2:37 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Friday Status Update Like we talked about earlier, let's give an update on what we are working on I'm working on hacking optparse to work so that we can update to the newest Rubinius spec's. Then I'll be closing out a whole slew of bugs. Jim Deville _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From charles.nutter at sun.com Sat May 3 04:04:49 2008 From: charles.nutter at sun.com (Charles Oliver Nutter) Date: Sat, 03 May 2008 03:04:49 -0500 Subject: [Ironruby-core] Friday Status Update In-Reply-To: <001f01c8acf1$93a29260$bae7b720$@com> References: <372109E149E8084D8E6C7D9CFD82E0632D92D923AE@NA-EXMSG-C115.redmond.corp.microsoft.com> <001f01c8acf1$93a29260$bae7b720$@com> Message-ID: <481C1CA1.2020005@sun.com> Peter Bacon Darwin wrote: > I might be right off track here and since I haven't seen any of the detailed > discussion about the question below I might be being completely naive. > > The open question should really be targeting all standard conversion > protocols in Ruby. > > In my mind it seems that the way Ruby works generally is to have a load of > these "protocols" for type conversion, but that it is not enforced by the > language at all and that it is entirely up the library developer to follow > suit. While this allows ultimate freedom for the developer it obviously > does allow inconsistency to creep in. > I would feel uncomfortable baking these protocols into the binder, unless > there was some way of overriding them in library code, since this is > perfectly possible in MRI. For instance, it must be possible in at least > some cases to monkey patch code that by default uses the standard conversion > protocol so that it does something different (e.g. converts strings to > symbols in some other way???) > > Clearly this is not a good thing to do in general but since Ruby allows it > as a language, it seems that it should be supported in IronRuby. FYI, there are a few cases in the core classes that use e.g to_s or to_a instead of to_str or to_ary to coerce. I don't remember them off the top of my head. - Charlie From Tomas.Matousek at microsoft.com Sat May 3 11:51:46 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Sat, 3 May 2008 08:51:46 -0700 Subject: [Ironruby-core] Friday Status Update In-Reply-To: <481C1CA1.2020005@sun.com> References: <372109E149E8084D8E6C7D9CFD82E0632D92D923AE@NA-EXMSG-C115.redmond.corp.microsoft.com> <001f01c8acf1$93a29260$bae7b720$@com> <481C1CA1.2020005@sun.com> Message-ID: Yes, we have Protocols class that implements various flavors of conversions that are used in libraries. The binder idea is that there would be an attribute you can apply on C# methods that would disable the default conversions implemented in binder. So if 90% of methods do the conversion one way their implementation could be simplified. The rest would be marked by the attribute. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Charles Oliver Nutter Sent: Saturday, May 03, 2008 1:05 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Friday Status Update Peter Bacon Darwin wrote: > I might be right off track here and since I haven't seen any of the detailed > discussion about the question below I might be being completely naive. > > The open question should really be targeting all standard conversion > protocols in Ruby. > > In my mind it seems that the way Ruby works generally is to have a load of > these "protocols" for type conversion, but that it is not enforced by the > language at all and that it is entirely up the library developer to follow > suit. While this allows ultimate freedom for the developer it obviously > does allow inconsistency to creep in. > I would feel uncomfortable baking these protocols into the binder, unless > there was some way of overriding them in library code, since this is > perfectly possible in MRI. For instance, it must be possible in at least > some cases to monkey patch code that by default uses the standard conversion > protocol so that it does something different (e.g. converts strings to > symbols in some other way???) > > Clearly this is not a good thing to do in general but since Ruby allows it > as a language, it seems that it should be supported in IronRuby. FYI, there are a few cases in the core classes that use e.g to_s or to_a instead of to_str or to_ary to coerce. I don't remember them off the top of my head. - Charlie _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From charles.nutter at sun.com Sat May 3 13:52:54 2008 From: charles.nutter at sun.com (Charles Oliver Nutter) Date: Sat, 03 May 2008 12:52:54 -0500 Subject: [Ironruby-core] Friday Status Update In-Reply-To: References: <372109E149E8084D8E6C7D9CFD82E0632D92D923AE@NA-EXMSG-C115.redmond.corp.microsoft.com> <001f01c8acf1$93a29260$bae7b720$@com> <481C1CA1.2020005@sun.com> Message-ID: <481CA676.6050408@sun.com> Tomas Matousek wrote: > Yes, we have Protocols class that implements various flavors of conversions that are used in libraries. > The binder idea is that there would be an attribute you can apply on C# methods that would disable the default conversions implemented in binder. So if 90% of methods do the conversion one way their implementation could be simplified. The rest would be marked by the attribute. Nice, I'll have to add that. At the moment, everything generifies to a common type, and the method itself calls the appropriate coercion mechanism. But it would be nice to eliminate that. - Charlie From jflam at microsoft.com Sat May 3 14:04:34 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Sat, 3 May 2008 11:04:34 -0700 Subject: [Ironruby-core] Friday Status Update In-Reply-To: <481CA676.6050408@sun.com> References: <372109E149E8084D8E6C7D9CFD82E0632D92D923AE@NA-EXMSG-C115.redmond.corp.microsoft.com> <001f01c8acf1$93a29260$bae7b720$@com> <481C1CA1.2020005@sun.com> <481CA676.6050408@sun.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D92D92492@NA-EXMSG-C115.redmond.corp.microsoft.com> Charles Oliver Nutter: > > The binder idea is that there would be an attribute you can apply on > C# methods that would disable the default conversions implemented in > binder. So if 90% of methods do the conversion one way their > implementation could be simplified. The rest would be marked by the > attribute. > > Nice, I'll have to add that. At the moment, everything generifies to a > common type, and the method itself calls the appropriate coercion > mechanism. But it would be nice to eliminate that. The other nice thing about this is that it would be trivial to generate a report on all of the exceptions. This way we can drive some meaningful design discussions about all of the exceptional cases and get them fixed in the libs. -John From Jimmy.Schementi at microsoft.com Sun May 4 04:23:40 2008 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Sun, 4 May 2008 01:23:40 -0700 Subject: [Ironruby-core] The story of Ruby and Python in Silverlight In-Reply-To: <47D442A8.1040507@voidspace.org.uk> References: <47D3CD22.8050406@voidspace.org.uk> <41d7f4a90803090512x4410a82at5cb9fd21162ffdc9@mail.gmail.com>, <6f4025010803090519s6ba309efve0522b6dbd1a01e4@mail.gmail.com> <7AD436E4270DD54A94238001769C2227011CF5A826FE@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <47D442A8.1040507@voidspace.org.uk> Message-ID: <5283CA0A4168DF4FBBD71AE9ECA5A3284580380336@NA-EXMSG-C116.redmond.corp.microsoft.com> http://lists.ironpython.com/pipermail/users-ironpython.com/2008-March/006559.html This is a really old thread from Michael on the IronPython Discussions list, but while looking through old mail I found it and realized no one ever directly replied to it. I read it over, and it made me realize something; we rarely talk about "why" things happen at Microsoft on the "outside" ... we just throw code over the wall and expect you to understand the "why" yourself. Granted, the IronPython/IronRuby team is much better at including you, but you all are still in the dark about why things are the way they are in Silverlight. Let me fix that ... http://blog.jimmy.schementi.com/2008/05/story-of-ruby-and-python-in-silverlight.html This is my story of taking dynamic languages from Silverlight 1.1 Alpha to Silverlight 2. Hopefully it clears up some confusion about why things are the way they are, why they're better off this way, and what we need to do to make it even better. Enjoy, and please let me know what you think of the current state of Silverlight+Dynamic Languages in the comments. ~Jimmy From w.kelly at qut.edu.au Sun May 4 06:27:34 2008 From: w.kelly at qut.edu.au (Wayne Kelly) Date: Sun, 4 May 2008 20:27:34 +1000 Subject: [Ironruby-core] Rails progress summary Message-ID: Following release of revision 99 and a few of my own minor patches applied, progress is as follows ... Note: I reduced my test suite to only those modules that MRI can independently loading without error - that reduced the total number of test files to 386. Of those, 248 load successfully with IronRuby. The remaining 138 fail to load for the following reasons: 58 - Module::module_function not implemented 24 - Class.new() not implemented [bug #19805] 16 - MemberAssignmentExpression not implemented 12 - Kernel::extend not implemented 6 - to_sym not called on block parameters to convert them to Procs [bug #19714] 4 - Alias resolution problem [bug #19706] 4 - Syntax error relating to JumpStatements [bug #19803] 4 - yaml library not implemented 2 - Codegen bug where last expression in method is a "statement" [bug #19914] 2 - load path problem 1 - eval doesn't handle assignment to constants [bug #19844] 1 - stringio library not implemented 1 - Module::extend_object not implemented 1 - Kernel::trap not implemented 1 - Regexp.new(Regexp) overload not implemented [bug #19927] It would be great if others could assist with these, with priority given to those at the top of the list. Please let us know if you are or plan to work on any of these functions or issues so that we avoid duplicated effort. These is still a long way to go, but I think we're making good progress. Cheers, Wayne. From Tomas.Matousek at microsoft.com Mon May 5 03:53:41 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Mon, 5 May 2008 00:53:41 -0700 Subject: [Ironruby-core] Code Review: Ruby custom actions, various bug fixes Message-ID: tfpt review /shelveset:Super17;REDMOND\tomat DLR changes: - Removes InvokeMethodAttributes. - Makes ActionExpression factory public - it's needed by a custom Ruby action (ProtocolConverterAction). Ruby changes: - Adds InvokeSuperMemberAction custom action - Refactors handling of member invocation in RubyBinder. - Improves implementation of super call. This is how 'super' seems to work: 1. Let s be the inner-most scope in the lexical scope hierarchy of the 'super' call site that is either a. a method scope, or b. a block definition scope of a block whose caller is a method created by 'define_method' 2. If s is a method definition scope (1a) then this method's frame f is available: either it is a. the frame that invokes the 'super' call, or b. captured by a closure of the block that contains the 'super' call 3. If s is a block (1b) then its caller's frame f is available. Use the arguments, self object and method name of the frame f for the 'super' invocation. Implementation: the method defined by define_method passes its frame into the block it calls (in BlockParam object). Super call site traverses lexical hierarchy and finds scope s and frame f. All information necessary to perform the super call are on f. For super to work within eval some additional work needs to be done beyond this shelveset - arguments needs to be distinguishable from other local variables at run-time. Super in eval will then do dynamic local variable lookup on the argument names that it finds in the frame f. This change doesn't implement any optimizations though they are possible in some cases. - Adds ProtocolConverterAction custom action. o It's an abstract class for specific protocol conversions (to_proc, to_s, ...) o This shelveset adds only ConvertToProcAction <: ProtocolConverterAction so far, we can replace Protocols by these actions in future. o The protocol used for conversions is: * if obj.respond_to? :to_xxx result = obj.to_xxx if result.subclass_of Xxx then return result end errror o The action implements an optimization that avoids 2 dynamic dispatches in case respond_to? is not overridden: * check class version of object obj in rule test * obj.class overrides respond_to? => no optimization (emit 2 dynamic dispatches to respond_to? and to_xxx) * otherwise: lookup to_xxx, not found => emit error, found => emit static call to to_xxx * check result of to_xxx - Implements to_proc conversion for & operator using ConvertToProcAction (fixes bug #19714: & operator should call to_proc) - Adds #method-definition closure local variable of type RubyMethodInfo: o Each method definition stores itself into this variable, which is used inside the method definition. This effectively enables any library/ops code to access the current method definition. o RubyMethodInfo now holds on the method's declaring local scope. o Adds DefinitionName to RubyMethodInfo - this is the name of the method definition. The method itself could be used under different names (if aliased). Some language operations care only about definition name (like super call). - Adds UndefineMethod attribute - it is used on library classes to undefined methods defined in base classes. - Fixes GetInstanceMethods to skip undefined method. - Implements Kernel#block_given?, Module#module_function methods. Fixes Kernel#private/public/protected methods. - Replaces VariableExpression and ParameterExpression by Expression where possible. - Simplifies code emitted per method definition. - Fixes bug #19907: class_eval not singleton. - Fixes bug #19672: Logical operator in method arguments won't parse. - Fixes bug #19803: rescue next syntax bug. - Fixes bug #19892: Proc cannot be used as Boolean. - Fixes bug #19706: alias method resolution bug. - Adds more unit tests and refactors unit test driver a little bit. Tomas -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Super17.diff Type: application/octet-stream Size: 824003 bytes Desc: Super17.diff URL: From Martin.Maly at microsoft.com Mon May 5 10:50:45 2008 From: Martin.Maly at microsoft.com (Martin Maly) Date: Mon, 5 May 2008 07:50:45 -0700 Subject: [Ironruby-core] Code Review: Ruby custom actions, various bug fixes In-Reply-To: References: Message-ID: DLR changes are great! From: Tomas Matousek Sent: Monday, May 05, 2008 12:54 AM To: IronRuby External Code Reviewers; Rowan Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: Ruby custom actions, various bug fixes tfpt review /shelveset:Super17;REDMOND\tomat DLR changes: - Removes InvokeMethodAttributes. - Makes ActionExpression factory public - it's needed by a custom Ruby action (ProtocolConverterAction). Ruby changes: - Adds InvokeSuperMemberAction custom action - Refactors handling of member invocation in RubyBinder. - Improves implementation of super call. This is how 'super' seems to work: 1. Let s be the inner-most scope in the lexical scope hierarchy of the 'super' call site that is either a. a method scope, or b. a block definition scope of a block whose caller is a method created by 'define_method' 2. If s is a method definition scope (1a) then this method's frame f is available: either it is a. the frame that invokes the 'super' call, or b. captured by a closure of the block that contains the 'super' call 3. If s is a block (1b) then its caller's frame f is available. Use the arguments, self object and method name of the frame f for the 'super' invocation. Implementation: the method defined by define_method passes its frame into the block it calls (in BlockParam object). Super call site traverses lexical hierarchy and finds scope s and frame f. All information necessary to perform the super call are on f. For super to work within eval some additional work needs to be done beyond this shelveset - arguments needs to be distinguishable from other local variables at run-time. Super in eval will then do dynamic local variable lookup on the argument names that it finds in the frame f. This change doesn't implement any optimizations though they are possible in some cases. - Adds ProtocolConverterAction custom action. o It's an abstract class for specific protocol conversions (to_proc, to_s, ...) o This shelveset adds only ConvertToProcAction <: ProtocolConverterAction so far, we can replace Protocols by these actions in future. o The protocol used for conversions is: * if obj.respond_to? :to_xxx result = obj.to_xxx if result.subclass_of Xxx then return result end errror o The action implements an optimization that avoids 2 dynamic dispatches in case respond_to? is not overridden: * check class version of object obj in rule test * obj.class overrides respond_to? => no optimization (emit 2 dynamic dispatches to respond_to? and to_xxx) * otherwise: lookup to_xxx, not found => emit error, found => emit static call to to_xxx * check result of to_xxx - Implements to_proc conversion for & operator using ConvertToProcAction (fixes bug #19714: & operator should call to_proc) - Adds #method-definition closure local variable of type RubyMethodInfo: o Each method definition stores itself into this variable, which is used inside the method definition. This effectively enables any library/ops code to access the current method definition. o RubyMethodInfo now holds on the method's declaring local scope. o Adds DefinitionName to RubyMethodInfo - this is the name of the method definition. The method itself could be used under different names (if aliased). Some language operations care only about definition name (like super call). - Adds UndefineMethod attribute - it is used on library classes to undefined methods defined in base classes. - Fixes GetInstanceMethods to skip undefined method. - Implements Kernel#block_given?, Module#module_function methods. Fixes Kernel#private/public/protected methods. - Replaces VariableExpression and ParameterExpression by Expression where possible. - Simplifies code emitted per method definition. - Fixes bug #19907: class_eval not singleton. - Fixes bug #19672: Logical operator in method arguments won't parse. - Fixes bug #19803: rescue next syntax bug. - Fixes bug #19892: Proc cannot be used as Boolean. - Fixes bug #19706: alias method resolution bug. - Adds more unit tests and refactors unit test driver a little bit. Tomas -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at exchange.microsoft.com Mon May 5 12:38:42 2008 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Mon, 5 May 2008 09:38:42 -0700 Subject: [Ironruby-core] Code Review: Ruby custom actions, various bug fixes In-Reply-To: References: Message-ID: <7AD436E4270DD54A94238001769C2227012B27AD8343@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Ruby changes look good. I've got one comment based upon where the DLR is going with actions - not that you need to change anything now, just that it might make your life easier in the future if you find yourself adding more actions. That is for some actions (e.g. ProtocolConversionAction) you have the rule production logic in the action it's self. For others (e.g. Super) that logic lives in the RubyBinder. Keeping all of it in the action's might make it easier when the DLR switches to having the action's (then called SiteBinders or whatever the final name is) produce the rule. Of course you could always choose to forward them onto the RubyBinder yourself. From: Tomas Matousek Sent: Monday, May 05, 2008 12:54 AM To: IronRuby External Code Reviewers; Rowan Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: Ruby custom actions, various bug fixes tfpt review /shelveset:Super17;REDMOND\tomat DLR changes: - Removes InvokeMethodAttributes. - Makes ActionExpression factory public - it's needed by a custom Ruby action (ProtocolConverterAction). Ruby changes: - Adds InvokeSuperMemberAction custom action - Refactors handling of member invocation in RubyBinder. - Improves implementation of super call. This is how 'super' seems to work: 1. Let s be the inner-most scope in the lexical scope hierarchy of the 'super' call site that is either a. a method scope, or b. a block definition scope of a block whose caller is a method created by 'define_method' 2. If s is a method definition scope (1a) then this method's frame f is available: either it is a. the frame that invokes the 'super' call, or b. captured by a closure of the block that contains the 'super' call 3. If s is a block (1b) then its caller's frame f is available. Use the arguments, self object and method name of the frame f for the 'super' invocation. Implementation: the method defined by define_method passes its frame into the block it calls (in BlockParam object). Super call site traverses lexical hierarchy and finds scope s and frame f. All information necessary to perform the super call are on f. For super to work within eval some additional work needs to be done beyond this shelveset - arguments needs to be distinguishable from other local variables at run-time. Super in eval will then do dynamic local variable lookup on the argument names that it finds in the frame f. This change doesn't implement any optimizations though they are possible in some cases. - Adds ProtocolConverterAction custom action. o It's an abstract class for specific protocol conversions (to_proc, to_s, ...) o This shelveset adds only ConvertToProcAction <: ProtocolConverterAction so far, we can replace Protocols by these actions in future. o The protocol used for conversions is: * if obj.respond_to? :to_xxx result = obj.to_xxx if result.subclass_of Xxx then return result end errror o The action implements an optimization that avoids 2 dynamic dispatches in case respond_to? is not overridden: * check class version of object obj in rule test * obj.class overrides respond_to? => no optimization (emit 2 dynamic dispatches to respond_to? and to_xxx) * otherwise: lookup to_xxx, not found => emit error, found => emit static call to to_xxx * check result of to_xxx - Implements to_proc conversion for & operator using ConvertToProcAction (fixes bug #19714: & operator should call to_proc) - Adds #method-definition closure local variable of type RubyMethodInfo: o Each method definition stores itself into this variable, which is used inside the method definition. This effectively enables any library/ops code to access the current method definition. o RubyMethodInfo now holds on the method's declaring local scope. o Adds DefinitionName to RubyMethodInfo - this is the name of the method definition. The method itself could be used under different names (if aliased). Some language operations care only about definition name (like super call). - Adds UndefineMethod attribute - it is used on library classes to undefined methods defined in base classes. - Fixes GetInstanceMethods to skip undefined method. - Implements Kernel#block_given?, Module#module_function methods. Fixes Kernel#private/public/protected methods. - Replaces VariableExpression and ParameterExpression by Expression where possible. - Simplifies code emitted per method definition. - Fixes bug #19907: class_eval not singleton. - Fixes bug #19672: Logical operator in method arguments won't parse. - Fixes bug #19803: rescue next syntax bug. - Fixes bug #19892: Proc cannot be used as Boolean. - Fixes bug #19706: alias method resolution bug. - Adds more unit tests and refactors unit test driver a little bit. Tomas -------------- next part -------------- An HTML attachment was scrubbed... URL: From jflam at microsoft.com Mon May 5 13:07:13 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Mon, 5 May 2008 10:07:13 -0700 Subject: [Ironruby-core] Code Review: socket2 Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D92D92695@NA-EXMSG-C115.redmond.corp.microsoft.com> tfpt review /shelveset:socket2;REDMOND\jflam Overall - looks good! We really want to turn on tests for this stuff. Jim's looking at getting the latest rubinius specs running so we can deprecate our current spec snapshot soon - hopefully this week. A few minor nits below: Seems like you have a couple of redundant Protocols.CastToString calls here - domain is *always* a MutableString based on your ctor ... private static Socket CreateSocket(CodeContext/*!*/ context, MutableString/*!*/ domain, MutableString/*!*/ type, object/*Numeric*/ protocol) { RubyExecutionContext ec = RubyUtils.GetExecutionContext(context); RubyClass rubySocketClass = ec.GetClass(typeof(Ruby.StandardLibrary.RubySocket)); AddressFamily addressFamily = (AddressFamily)RubyUtils.GetConstant(context, rubySocketClass, SymbolTable.StringToId(Protocols.CastToString(context, domain)), true); ProtocolType protocolType = (ProtocolType)(Protocols.CastToFixnum(context, protocol)); SocketType socketType = (SocketType)RubyUtils.GetConstant(context, rubySocketClass, SymbolTable.StringToId(Protocols.CastToString(context, type)), true); return new Socket(addressFamily, socketType, protocolType); } Also ... Socket should be Socket/*!*/ since there is only one code path out of this method barring exceptions. I've fixed these minor things in my copy. Following this analysis, this also leads to _socket in RubyBasicSocket:23 being a /*!*/ as well. BTW, I really like the /*Numeric*/ annotations that you've been putting in your code. This could lead us to doing something smarter in the future in the binder like adding a parameter attribute [Numeric] to coerce the binder into doing some smarter things with the conversions. Thinking aloud about this method - would it make more sense to have MutableString and int overloads that delegate to helpers rather than dropping everything into a single method like this one here? internal static MutableString ConvertToHostString(CodeContext/*!*/ context, object hostname) { if (hostname == null) { return null; } if (hostname is MutableString) { MutableString strHostname = (MutableString)hostname; // Special cases if (strHostname == "" ) { strHostname = new MutableString("0.0.0.0"); } else if (strHostname == "") { strHostname = new MutableString("255.255.255.255"); } return strHostname; } int iHostname; if (Protocols.IntegerAsFixnum(hostname, out iHostname)) { // Ruby uses Little Endian whereas .NET uses Big Endian IP values byte[] bytes = new byte[4]; for (int i = 3; i >= 0; --i) { bytes[i] = (byte)(iHostname & 0xff); iHostname >>= 8; } return new MutableString(new System.Net.IPAddress(bytes).ToString()); } return Protocols.CastToString(context, hostname); } Some other points - seems some of the code below could be delegated to the Protocols.CheckSafeLevel() helpers that you added. BTW, we should probably spend some time and make a call about what we're going to do about all of the safe level stuff. Arguably this stuff isn't necessary due to CLR safety (especially in Silverlight contexts). internal static void CheckSecurity(CodeContext/*!*/ context, object self, string message) { RubyExecutionContext ec = RubyUtils.GetExecutionContext(context); if (ec.CurrentSafeLevel >= 4 && ec.IsObjectTainted(self)) { throw RubyExceptions.CreateSecurityError("Insecure: " + message); } } Thanks, -John -------------- next part -------------- A non-text attachment was scrubbed... Name: socket2.diff Type: application/octet-stream Size: 160634 bytes Desc: socket2.diff URL: From mwatts42 at gmail.com Mon May 5 13:48:41 2008 From: mwatts42 at gmail.com (Mark) Date: Mon, 5 May 2008 13:48:41 -0400 Subject: [Ironruby-core] CodeReview Question about diff file Message-ID: <3c17278b0805051048x684e39apacaa71563afe3e5f@mail.gmail.com> First let me say I really like seeing the diff files for the shelvesets that the IronRuby team has been sending with the CodeReview emails to provide context. My question is this: how is tfpt used to generate those. We use TFS but I am not seeing exactly how to produce those diff files myself for my own code-reviews. -- -mark -------------- next part -------------- An HTML attachment was scrubbed... URL: From jflam at microsoft.com Mon May 5 13:53:51 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Mon, 5 May 2008 10:53:51 -0700 Subject: [Ironruby-core] CodeReview Question about diff file In-Reply-To: <3c17278b0805051048x684e39apacaa71563afe3e5f@mail.gmail.com> References: <3c17278b0805051048x684e39apacaa71563afe3e5f@mail.gmail.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D92D92714@NA-EXMSG-C115.redmond.corp.microsoft.com> Mark: > First let me say I really like seeing the diff files for the > shelvesets that the IronRuby team has been sending with the CodeReview > emails to provide context. > > My question is this: how is tfpt used to generate those. We use TFS > but I am not seeing exactly how to produce those diff files myself for > my own code-reviews. tf diff /shelveset: /format:unified Thanks, -John From mwatts42 at gmail.com Mon May 5 14:11:34 2008 From: mwatts42 at gmail.com (Mark) Date: Mon, 5 May 2008 14:11:34 -0400 Subject: [Ironruby-core] CodeReview Question about diff file In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D92D92714@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <3c17278b0805051048x684e39apacaa71563afe3e5f@mail.gmail.com> <372109E149E8084D8E6C7D9CFD82E0632D92D92714@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <3c17278b0805051111h629f1208s39d623ce4d045296@mail.gmail.com> On Mon, May 5, 2008 at 1:53 PM, John Lam (IRONRUBY) wrote: > Mark: > > > First let me say I really like seeing the diff files for the > > shelvesets that the IronRuby team has been sending with the CodeReview > > emails to provide context. > > > > My question is this: how is tfpt used to generate those. We use TFS > > but I am not seeing exactly how to produce those diff files myself for > > my own code-reviews. > > tf diff /shelveset: /format:unified > > Thanks! -mark -------------- next part -------------- An HTML attachment was scrubbed... URL: From jflam at microsoft.com Mon May 5 19:23:29 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Mon, 5 May 2008 16:23:29 -0700 Subject: [Ironruby-core] Rails progress summary In-Reply-To: References: Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D92E58B1A@NA-EXMSG-C115.redmond.corp.microsoft.com> Wayne Kelly: > The remaining 138 fail to load for the following reasons: > > 58 - Module::module_function not implemented > 24 - Class.new() not implemented [bug #19805] > 16 - MemberAssignmentExpression not implemented > 12 - Kernel::extend not implemented > 6 - to_sym not called on block parameters to convert them to Procs > [bug #19714] > 4 - Alias resolution problem [bug #19706] > 4 - Syntax error relating to JumpStatements [bug #19803] > 4 - yaml library not implemented > 2 - Codegen bug where last expression in method is a "statement" [bug > #19914] > 2 - load path problem > 1 - eval doesn't handle assignment to constants [bug #19844] > 1 - stringio library not implemented > 1 - Module::extend_object not implemented > 1 - Kernel::trap not implemented > 1 - Regexp.new(Regexp) overload not implemented [bug #19927] We've made pretty good progress against these today as of r101: module_function is in Class.new, MemberAssignmentExpression, and Kernel#extend are pending Please let us know how many new problems are uncovered by implementing Module#module_function Thanks, -John From andrew at mindscape.co.nz Mon May 5 19:38:56 2008 From: andrew at mindscape.co.nz (Andrew Peters) Date: Tue, 6 May 2008 11:38:56 +1200 Subject: [Ironruby-core] PATCH: $KCODE global variable Message-ID: <771cfe010805051638n7134f8eex8b59a53b959881ea@mail.gmail.com> Hi All, I'm keen to help out the effort and so I started having a look at implementing the nkf library. I'm about half done on nkf but it requires $KCODE so I thought I'd contribute that first on it's own. Still finding my way around so all feedback appreciated :-) Cheers, Andrew. P.S. Sorry about spurious diffs in csproj files - I think this must be a VS version thing. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: kcode_global.patch Type: application/octet-stream Size: 9286 bytes Desc: not available URL: From robert.brotherus at napa.fi Tue May 6 02:01:02 2008 From: robert.brotherus at napa.fi (Robert Brotherus) Date: Tue, 6 May 2008 09:01:02 +0300 Subject: [Ironruby-core] debugging IR References: Message-ID: <53194650933664488F3F0C3A0AB568323D0EFE@nw60.napa.fi> I return to this debugging issue briefly since in the recent IronRuby SVN versions the variable viewing support has been on decline. John Lam (DLR) Sent: Thursday, March 27, 2008 6:47 PM: > Debugging support works today in Silverlight as long as you have the > Silverlight tools for VS installed. It should just work on desktop CLR as well. > Now 'just work' means [...] it does hit breakpoints and show locals and the call > stack correctly Robert Brotherus wrote 2008-04-02: > This is working fine, thanks! > Weird spans and conditionals are a minor issue compared to the pain of no debugging at all :-) > Regarding the local variables I did not see any directly in the "Locals" table of Visual Studio, > but I was able to dig them up from $frame -> Scope -> Dict -> SymbolAttributes Now that was the situation with the IronRuby SVN current version of 2008-04-02 (can't remember the number). Things have been taking a slight step backwards with the recent SVN versions (at least already in v. 96). Now it seems that $frame->Scope is always null, so I cannot dig the locals from there (nor are they yet available as top-level symbols either) :-( I understand debugging is not a priority of the IR team, but I wonder if it would be a quick fix to restore the locals to be visible in *some* way, direct or indirect? Or alternatively tell me how to dig them up with the v. 99? Robert Brotherus Software architect Napa Ltd Tammasaarenkatu 3, Helsinki FI-00180 P.O.Box 470, Helsinki FI-00181 Tel. +358 9 22 813 1 Direct. +358 9 22 813 611 GSM +358 45 11 456 02 Fax. +358 9 22 813 800 Email: Robert.Brotherus at napa.fi www.napa.fi From Tomas.Matousek at microsoft.com Tue May 6 03:34:12 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 6 May 2008 00:34:12 -0700 Subject: [Ironruby-core] Code Review: RubyScopeDebugView Message-ID: tfpt review /shelveset:RubyScopeDebugView;REDMOND\tomat Implements DebuggerProxyType for RubyScope so that locals and scope attributes display nicely in watches. [cid:image001.png at 01C8AF10.E7B7A950] def foo a = 1 b = 2 1.times { c = a + b } end foo Notice the Ruby class name in the third column 8-) Tomas -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 16278 bytes Desc: image001.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: RubyScopeDebugView.diff Type: application/octet-stream Size: 10275 bytes Desc: RubyScopeDebugView.diff URL: From ben.aurel at gmail.com Tue May 6 05:31:13 2008 From: ben.aurel at gmail.com (Ben Aurel) Date: Tue, 6 May 2008 11:31:13 +0200 Subject: [Ironruby-core] Problems compiling IronRuby on Mac Leopard Message-ID: <899c88330805060231k6ea765ecvc520a0359ca015fb@mail.gmail.com> Hi I try to write a little blog article about installing mono and ironruby on Mac Leopard from the ground up. It's a bit a bumpy road (especially to get mono build from sources), but I'm almost there. I'm following these instructions http://sparcs.kaist.ac.kr/~tinuviel/download/IronRuby/HOWTO and work with the latest patch: $ patch -p0 < patch-mono-r94 from here: http://sparcs.kaist.ac.kr/~tinuviel/download/IronRuby/patch-mono-r94 but it doesn't work: $ rake compile mono=1 rake aborted! cannot resolve path System.dll ~/mono/compiling/ironruby/rakefile:137 (See full trace by running task with --trace) (* with --trace see below) What's needed that the System.dll can be resolved? Thanks for your help. Ben (*) $ sudo rake compile mono=1 --trace (~/mono/compiling/ironruby) ** Invoke compile (first_time) ** Invoke happy (first_time) ** Execute happy ** Invoke clean_build (first_time) ** Invoke happy ** Execute clean_build ** Invoke compile_dlr (first_time) ** Invoke clean_build ** Execute compile_dlr rake aborted! cannot resolve path System.dll ./context.rb:90:in `resolve_framework_path' ./context.rb:89:in `each' ./context.rb:89:in `resolve_framework_path' ./context.rb:130:in `resolve_framework_path' ./context.rb:405:in `resolve_framework_path' ./context.rb:420:in `references' ./context.rb:418:in `each' ./context.rb:418:in `references' ./context.rb:434:in `compile' ./context.rb:432:in `chdir' ./context.rb:432:in `compile' /mono/compiling/ironruby/rakefile:137 ./context.rb:578:in `instance_eval' ./context.rb:578:in `source_context' /mono/compiling/ironruby/rakefile:135 /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `call' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `execute' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `each' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `execute' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:508:in `invoke_with_call_chain' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `synchronize' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `invoke_with_call_chain' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:518:in `invoke_prerequisites' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:in `each' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:in `send' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:in `each' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:515:in `invoke_prerequisites' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:507:in `invoke_with_call_chain' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `synchronize' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `invoke_with_call_chain' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:494:in `invoke' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1931:in `invoke_task' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `top_level' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `each' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `top_level' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in `standard_exception_handling' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1903:in `top_level' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1881:in `run' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in `standard_exception_handling' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1878:in `run' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/bin/rake:31 /opt/local/bin/rake:16:in `load' /opt/local/bin/rake:16 From sanxiyn at gmail.com Tue May 6 06:15:14 2008 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Tue, 6 May 2008 19:15:14 +0900 Subject: [Ironruby-core] Problems compiling IronRuby on Mac Leopard In-Reply-To: <899c88330805060231k6ea765ecvc520a0359ca015fb@mail.gmail.com> References: <899c88330805060231k6ea765ecvc520a0359ca015fb@mail.gmail.com> Message-ID: <5b0248170805060315v49274614oe91333cd476e0de@mail.gmail.com> 2008/5/6 Ben Aurel : > What's needed that the System.dll can be resolved? You need to have pkg-config correctly configured. $ pkg-config --variable=libdir mono /usr/lib If you don't get any output, try setting PKG_CONFIG_PATH so that pkg-config can find mono.pc. -- Seo Sanghyeon From ben.aurel at gmail.com Tue May 6 06:41:07 2008 From: ben.aurel at gmail.com (Ben Aurel) Date: Tue, 6 May 2008 12:41:07 +0200 Subject: [Ironruby-core] Problems compiling IronRuby on Mac Leopard In-Reply-To: <5b0248170805060315v49274614oe91333cd476e0de@mail.gmail.com> References: <899c88330805060231k6ea765ecvc520a0359ca015fb@mail.gmail.com> <5b0248170805060315v49274614oe91333cd476e0de@mail.gmail.com> Message-ID: <899c88330805060341m2e501e24iea59ffecf82df5cb@mail.gmail.com> that's my line in ~/.bash_profile: ... export PKG_CONFIG_PATH="/opt/mono/lib/pkgconfig/" ,... and this is what I get with $ pkg-config --variable=libdir mono /opt/mono/lib/pkgconfig/../../lib should this be correct - no? What's wrong here? On Tue, May 6, 2008 at 12:15 PM, Sanghyeon Seo wrote: > 2008/5/6 Ben Aurel : > > > What's needed that the System.dll can be resolved? > > You need to have pkg-config correctly configured. > > $ pkg-config --variable=libdir mono > /usr/lib > > If you don't get any output, try setting PKG_CONFIG_PATH so that > pkg-config can find mono.pc. > > -- > Seo Sanghyeon > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > From ben.aurel at gmail.com Tue May 6 06:48:40 2008 From: ben.aurel at gmail.com (Ben Aurel) Date: Tue, 6 May 2008 12:48:40 +0200 Subject: [Ironruby-core] Problems compiling IronRuby on Mac Leopard In-Reply-To: <899c88330805060341m2e501e24iea59ffecf82df5cb@mail.gmail.com> References: <899c88330805060231k6ea765ecvc520a0359ca015fb@mail.gmail.com> <5b0248170805060315v49274614oe91333cd476e0de@mail.gmail.com> <899c88330805060341m2e501e24iea59ffecf82df5cb@mail.gmail.com> Message-ID: <899c88330805060348s2fc47d3eu4051dc0b05727c10@mail.gmail.com> I forgot to mention: after restarting the shell, I tried it once again: $ rake compile mono=1 (in /mono/compiling/ironruby) Read in 33 resources from '../ironruby/src/microsoft.scripting.core/Microsoft.Scripting.txt' Writing resource file... Done. --and than this error (?): ./actions/comdispatch/DispCallable.cs(134,9): error CS0452: The type `T' must be a reference type in order to use it as type parameter `T' in the generic type or method `Microsoft.Scripting.Actions.RuleBuilder'. ./actions/comdispatch/comtypelibdesc.cs(141,9): error CS0452: The type `T' must be a reference type in order to use it as type parameter `T' in the generic type or method `Microsoft.Scripting.Actions.RuleBuilder'. -- Compilation failed: 2 error(s), 0 warnings rake aborted! Command failed with status (1): [gmcs /out:"/users/shared/xfiles/root/nowit...] /mono/compiling/ironruby/rakefile:137 When I now try to run it again I simply get: $ sudo rake compile mono=1 rake aborted! cannot resolve path System.dll On Tue, May 6, 2008 at 12:41 PM, Ben Aurel wrote: > that's my line in ~/.bash_profile: > ... > export PKG_CONFIG_PATH="/opt/mono/lib/pkgconfig/" > ,... > > and this is what I get with > > $ pkg-config --variable=libdir mono > > /opt/mono/lib/pkgconfig/../../lib > > should this be correct - no? What's wrong here? > > > > > > On Tue, May 6, 2008 at 12:15 PM, Sanghyeon Seo wrote: > > 2008/5/6 Ben Aurel : > > > > > What's needed that the System.dll can be resolved? > > > > You need to have pkg-config correctly configured. > > > > $ pkg-config --variable=libdir mono > > /usr/lib > > > > If you don't get any output, try setting PKG_CONFIG_PATH so that > > pkg-config can find mono.pc. > > > > -- > > Seo Sanghyeon > > _______________________________________________ > > Ironruby-core mailing list > > Ironruby-core at rubyforge.org > > http://rubyforge.org/mailman/listinfo/ironruby-core > > > From sanxiyn at gmail.com Tue May 6 07:06:11 2008 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Tue, 6 May 2008 20:06:11 +0900 Subject: [Ironruby-core] Problems compiling IronRuby on Mac Leopard In-Reply-To: <899c88330805060348s2fc47d3eu4051dc0b05727c10@mail.gmail.com> References: <899c88330805060231k6ea765ecvc520a0359ca015fb@mail.gmail.com> <5b0248170805060315v49274614oe91333cd476e0de@mail.gmail.com> <899c88330805060341m2e501e24iea59ffecf82df5cb@mail.gmail.com> <899c88330805060348s2fc47d3eu4051dc0b05727c10@mail.gmail.com> Message-ID: <5b0248170805060406v902b23frafb223cda2e60fc4@mail.gmail.com> 2008/5/6 Ben Aurel : > --and than this error (?): > ./actions/comdispatch/DispCallable.cs(134,9): error CS0452: The type > `T' must be a reference type in order to use it as type parameter `T' > in the generic type or method > `Microsoft.Scripting.Actions.RuleBuilder'. > ./actions/comdispatch/comtypelibdesc.cs(141,9): error CS0452: The type > `T' must be a reference type in order to use it as type parameter `T' > in the generic type or method > `Microsoft.Scripting.Actions.RuleBuilder'. This is a recent unrelated error. This problem is reported as Mono bug #387040. https://bugzilla.novell.com/show_bug.cgi?id=387040 The last working revision is r98. If all you want is to try IronRuby, you could update to old revisions. > When I now try to run it again I simply get: > > $ sudo rake compile mono=1 > rake aborted! > cannot resolve path System.dll Of course, you are using sudo, which resets the shell environment. Therefore, don't. -- Seo Sanghyeon From ivan at flanders.co.nz Tue May 6 07:52:24 2008 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Tue, 6 May 2008 23:52:24 +1200 Subject: [Ironruby-core] Problems compiling IronRuby on Mac Leopard In-Reply-To: <899c88330805060341m2e501e24iea59ffecf82df5cb@mail.gmail.com> References: <899c88330805060231k6ea765ecvc520a0359ca015fb@mail.gmail.com> <5b0248170805060315v49274614oe91333cd476e0de@mail.gmail.com> <899c88330805060341m2e501e24iea59ffecf82df5cb@mail.gmail.com> Message-ID: <882906BE-DB4D-486C-A513-803EC405A008@flanders.co.nz> oh I have a script that should do all that. i can email it to you if you want. I also have that blogpost up that explains everything http://flanders.co.nz/2008/02/05/compiling-mono-and-ironruby-on-osx-leopard/ On 6/05/2008, at 10:41 PM, Ben Aurel wrote: > that's my line in ~/.bash_profile: > ... > export PKG_CONFIG_PATH="/opt/mono/lib/pkgconfig/" > ,... > > and this is what I get with > $ pkg-config --variable=libdir mono > > /opt/mono/lib/pkgconfig/../../lib > > should this be correct - no? What's wrong here? > > > > On Tue, May 6, 2008 at 12:15 PM, Sanghyeon Seo > wrote: >> 2008/5/6 Ben Aurel : >> >>> What's needed that the System.dll can be resolved? >> >> You need to have pkg-config correctly configured. >> >> $ pkg-config --variable=libdir mono >> /usr/lib >> >> If you don't get any output, try setting PKG_CONFIG_PATH so that >> pkg-config can find mono.pc. >> >> -- >> Seo Sanghyeon >> _______________________________________________ >> 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 ben.aurel at gmail.com Tue May 6 08:19:45 2008 From: ben.aurel at gmail.com (Ben Aurel) Date: Tue, 6 May 2008 14:19:45 +0200 Subject: [Ironruby-core] Problems compiling IronRuby on Mac Leopard In-Reply-To: <882906BE-DB4D-486C-A513-803EC405A008@flanders.co.nz> References: <899c88330805060231k6ea765ecvc520a0359ca015fb@mail.gmail.com> <5b0248170805060315v49274614oe91333cd476e0de@mail.gmail.com> <899c88330805060341m2e501e24iea59ffecf82df5cb@mail.gmail.com> <882906BE-DB4D-486C-A513-803EC405A008@flanders.co.nz> Message-ID: <899c88330805060519i3b123363tf6f507c96dff9c95@mail.gmail.com> Ivan, your article was one of the references for my attempt to install ironruby on leopard. It would be very nice if you could send me your script to ben.aurel at gmail.com thanks On Tue, May 6, 2008 at 1:52 PM, Ivan Porto Carrero wrote: > oh I have a script that should do all that. > i can email it to you if you want. > I also have that blogpost up that explains everything > > > http://flanders.co.nz/2008/02/05/compiling-mono-and-ironruby-on-osx-leopard/ > > > > On 6/05/2008, at 10:41 PM, Ben Aurel wrote: > > > > that's my line in ~/.bash_profile: > > ... > > export PKG_CONFIG_PATH="/opt/mono/lib/pkgconfig/" > > ,... > > > > and this is what I get with > > $ pkg-config --variable=libdir mono > > > > /opt/mono/lib/pkgconfig/../../lib > > > > should this be correct - no? What's wrong here? > > > > > > > > On Tue, May 6, 2008 at 12:15 PM, Sanghyeon Seo wrote: > > > > > 2008/5/6 Ben Aurel : > > > > > > > > > > What's needed that the System.dll can be resolved? > > > > > > > > > > You need to have pkg-config correctly configured. > > > > > > $ pkg-config --variable=libdir mono > > > /usr/lib > > > > > > If you don't get any output, try setting PKG_CONFIG_PATH so that > > > pkg-config can find mono.pc. > > > > > > -- > > > Seo Sanghyeon > > > _______________________________________________ > > > Ironruby-core mailing list > > > Ironruby-core at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > > > > > _______________________________________________ > > Ironruby-core mailing list > > Ironruby-core at rubyforge.org > > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > From ben.aurel at gmail.com Tue May 6 08:23:33 2008 From: ben.aurel at gmail.com (Ben Aurel) Date: Tue, 6 May 2008 14:23:33 +0200 Subject: [Ironruby-core] Problems compiling IronRuby on Mac Leopard In-Reply-To: <5b0248170805060406v902b23frafb223cda2e60fc4@mail.gmail.com> References: <899c88330805060231k6ea765ecvc520a0359ca015fb@mail.gmail.com> <5b0248170805060315v49274614oe91333cd476e0de@mail.gmail.com> <899c88330805060341m2e501e24iea59ffecf82df5cb@mail.gmail.com> <899c88330805060348s2fc47d3eu4051dc0b05727c10@mail.gmail.com> <5b0248170805060406v902b23frafb223cda2e60fc4@mail.gmail.com> Message-ID: <899c88330805060523w606874dcs2e379cf8491a1f7b@mail.gmail.com> ok, I'm a little confused now. What excactly do I have to do now in order to compile it? I'm stuck with compiling ironruby. $ rake compile mono=1 rake aborted! cannot resolve path System.dll What to do?? On Tue, May 6, 2008 at 1:06 PM, Sanghyeon Seo wrote: > 2008/5/6 Ben Aurel : > > > --and than this error (?): > > ./actions/comdispatch/DispCallable.cs(134,9): error CS0452: The type > > `T' must be a reference type in order to use it as type parameter `T' > > in the generic type or method > > `Microsoft.Scripting.Actions.RuleBuilder'. > > ./actions/comdispatch/comtypelibdesc.cs(141,9): error CS0452: The type > > `T' must be a reference type in order to use it as type parameter `T' > > in the generic type or method > > `Microsoft.Scripting.Actions.RuleBuilder'. > > This is a recent unrelated error. This problem is reported as Mono bug #387040. > https://bugzilla.novell.com/show_bug.cgi?id=387040 > > The last working revision is r98. If all you want is to try IronRuby, > you could update to old revisions. > > > > When I now try to run it again I simply get: > > > > $ sudo rake compile mono=1 > > rake aborted! > > cannot resolve path System.dll > > Of course, you are using sudo, which resets the shell environment. > Therefore, don't. > > -- > > > Seo Sanghyeon > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > From sanxiyn at gmail.com Tue May 6 08:30:21 2008 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Tue, 6 May 2008 21:30:21 +0900 Subject: [Ironruby-core] Problems compiling IronRuby on Mac Leopard In-Reply-To: <899c88330805060523w606874dcs2e379cf8491a1f7b@mail.gmail.com> References: <899c88330805060231k6ea765ecvc520a0359ca015fb@mail.gmail.com> <5b0248170805060315v49274614oe91333cd476e0de@mail.gmail.com> <899c88330805060341m2e501e24iea59ffecf82df5cb@mail.gmail.com> <899c88330805060348s2fc47d3eu4051dc0b05727c10@mail.gmail.com> <5b0248170805060406v902b23frafb223cda2e60fc4@mail.gmail.com> <899c88330805060523w606874dcs2e379cf8491a1f7b@mail.gmail.com> Message-ID: <5b0248170805060530k481f3d82va39e4004547160a8@mail.gmail.com> 2008/5/6 Ben Aurel : > ok, I'm a little confused now. What excactly do I have to do now in > order to compile it? I believe I already answered all your questions. If you have some more, please state it. 1. Cannot resolve path System.dll Configure pkg-config correctly. Make sure PKG_CONFIG_PATH is set. Make sure you don't use sudo, which reset the shell environment. 2. Bizarre CS0452 error from Mono C# compiler Mono bug #387040. No solution yet. Downgrade to SVN r98. -- Seo Sanghyeon From ben.aurel at gmail.com Tue May 6 08:48:23 2008 From: ben.aurel at gmail.com (Ben Aurel) Date: Tue, 6 May 2008 14:48:23 +0200 Subject: [Ironruby-core] Problems compiling IronRuby on Mac Leopard In-Reply-To: <5b0248170805060530k481f3d82va39e4004547160a8@mail.gmail.com> References: <899c88330805060231k6ea765ecvc520a0359ca015fb@mail.gmail.com> <5b0248170805060315v49274614oe91333cd476e0de@mail.gmail.com> <899c88330805060341m2e501e24iea59ffecf82df5cb@mail.gmail.com> <899c88330805060348s2fc47d3eu4051dc0b05727c10@mail.gmail.com> <5b0248170805060406v902b23frafb223cda2e60fc4@mail.gmail.com> <899c88330805060523w606874dcs2e379cf8491a1f7b@mail.gmail.com> <5b0248170805060530k481f3d82va39e4004547160a8@mail.gmail.com> Message-ID: <899c88330805060548w73bbe303r4c5373c4a9cac9ca@mail.gmail.com> Seo, As I've writte in my 2nd response PKG_CONFIG_PATH is set. The question is: Is it set correctly and what is the criteria for the correct setting? On Tue, May 6, 2008 at 2:30 PM, Sanghyeon Seo wrote: > 2008/5/6 Ben Aurel : > > > ok, I'm a little confused now. What excactly do I have to do now in > > order to compile it? > > I believe I already answered all your questions. If you have some > more, please state it. > > 1. Cannot resolve path System.dll > Configure pkg-config correctly. Make sure PKG_CONFIG_PATH is set. Make > sure you don't use sudo, which reset the shell environment. > > 2. Bizarre CS0452 error from Mono C# compiler > Mono bug #387040. No solution yet. Downgrade to SVN r98. > > -- > > > Seo Sanghyeon > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > From ben.aurel at gmail.com Tue May 6 09:00:08 2008 From: ben.aurel at gmail.com (Ben Aurel) Date: Tue, 6 May 2008 15:00:08 +0200 Subject: [Ironruby-core] Problems compiling IronRuby on Mac Leopard In-Reply-To: <899c88330805060548w73bbe303r4c5373c4a9cac9ca@mail.gmail.com> References: <899c88330805060231k6ea765ecvc520a0359ca015fb@mail.gmail.com> <5b0248170805060315v49274614oe91333cd476e0de@mail.gmail.com> <899c88330805060341m2e501e24iea59ffecf82df5cb@mail.gmail.com> <899c88330805060348s2fc47d3eu4051dc0b05727c10@mail.gmail.com> <5b0248170805060406v902b23frafb223cda2e60fc4@mail.gmail.com> <899c88330805060523w606874dcs2e379cf8491a1f7b@mail.gmail.com> <5b0248170805060530k481f3d82va39e4004547160a8@mail.gmail.com> <899c88330805060548w73bbe303r4c5373c4a9cac9ca@mail.gmail.com> Message-ID: <899c88330805060600h76e0995dje0f0cd4bb95291d4@mail.gmail.com> ok I have the reason why it didn't worked. on the post of Ivan (http://flanders.co.nz/2008/02/05/compiling-mono-and-ironruby-on-osx-leopard/) I copied the line: export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:/opt/local/lib/pkgconfig" now the path (/usr/local/...) has other exclamation marks than there are on my mac. " (blog) " (my mac) I don't know if you can see the difference. But fact is that it doesn't work with the "blog marks". Does somebody has an explanation for this? thanks Ben On Tue, May 6, 2008 at 2:48 PM, Ben Aurel wrote: > Seo, > > As I've writte in my 2nd response PKG_CONFIG_PATH is set. The question > is: Is it set correctly and what is the criteria for the correct > setting? > > > > > On Tue, May 6, 2008 at 2:30 PM, Sanghyeon Seo wrote: > > 2008/5/6 Ben Aurel : > > > > > ok, I'm a little confused now. What excactly do I have to do now in > > > order to compile it? > > > > I believe I already answered all your questions. If you have some > > more, please state it. > > > > 1. Cannot resolve path System.dll > > Configure pkg-config correctly. Make sure PKG_CONFIG_PATH is set. Make > > sure you don't use sudo, which reset the shell environment. > > > > 2. Bizarre CS0452 error from Mono C# compiler > > Mono bug #387040. No solution yet. Downgrade to SVN r98. > > > > -- > > > > > > Seo Sanghyeon > > _______________________________________________ > > Ironruby-core mailing list > > Ironruby-core at rubyforge.org > > http://rubyforge.org/mailman/listinfo/ironruby-core > > > From thibaut.barrere at gmail.com Tue May 6 09:10:22 2008 From: thibaut.barrere at gmail.com (=?ISO-8859-1?Q?Thibaut_Barr=E8re?=) Date: Tue, 6 May 2008 15:10:22 +0200 Subject: [Ironruby-core] Problems compiling IronRuby on Mac Leopard In-Reply-To: <899c88330805060600h76e0995dje0f0cd4bb95291d4@mail.gmail.com> References: <899c88330805060231k6ea765ecvc520a0359ca015fb@mail.gmail.com> <5b0248170805060315v49274614oe91333cd476e0de@mail.gmail.com> <899c88330805060341m2e501e24iea59ffecf82df5cb@mail.gmail.com> <899c88330805060348s2fc47d3eu4051dc0b05727c10@mail.gmail.com> <5b0248170805060406v902b23frafb223cda2e60fc4@mail.gmail.com> <899c88330805060523w606874dcs2e379cf8491a1f7b@mail.gmail.com> <5b0248170805060530k481f3d82va39e4004547160a8@mail.gmail.com> <899c88330805060548w73bbe303r4c5373c4a9cac9ca@mail.gmail.com> <899c88330805060600h76e0995dje0f0cd4bb95291d4@mail.gmail.com> Message-ID: <4a68b8cf0805060610u33b83d4y6eb7c45300f28e54@mail.gmail.com> > Does somebody has an explanation for this? The double quote is transformed into mister ”, a nicer yet incompatible-with-your-command-line version of itself. cheers Thibaut -- http://blog.logeek.fr - learning content for developers http://evolvingworker.com - tools for a better day From ben.aurel at gmail.com Tue May 6 09:15:20 2008 From: ben.aurel at gmail.com (Ben Aurel) Date: Tue, 6 May 2008 15:15:20 +0200 Subject: [Ironruby-core] Problems compiling IronRuby on Mac Leopard In-Reply-To: <4a68b8cf0805060610u33b83d4y6eb7c45300f28e54@mail.gmail.com> References: <899c88330805060231k6ea765ecvc520a0359ca015fb@mail.gmail.com> <5b0248170805060315v49274614oe91333cd476e0de@mail.gmail.com> <899c88330805060341m2e501e24iea59ffecf82df5cb@mail.gmail.com> <899c88330805060348s2fc47d3eu4051dc0b05727c10@mail.gmail.com> <5b0248170805060406v902b23frafb223cda2e60fc4@mail.gmail.com> <899c88330805060523w606874dcs2e379cf8491a1f7b@mail.gmail.com> <5b0248170805060530k481f3d82va39e4004547160a8@mail.gmail.com> <899c88330805060548w73bbe303r4c5373c4a9cac9ca@mail.gmail.com> <899c88330805060600h76e0995dje0f0cd4bb95291d4@mail.gmail.com> <4a68b8cf0805060610u33b83d4y6eb7c45300f28e54@mail.gmail.com> Message-ID: <899c88330805060615i164c2cfdv66fed61c1d11f004@mail.gmail.com> thanks, does that mean, that my terminal don't know the character set used on the website? On Tue, May 6, 2008 at 3:10 PM, Thibaut Barr?re wrote: > > Does somebody has an explanation for this? > > The double quote is transformed into mister ”, a nicer yet > incompatible-with-your-command-line version of itself. > > cheers > > Thibaut > -- > http://blog.logeek.fr - learning content for developers > http://evolvingworker.com - tools for a better day > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > From ben.aurel at gmail.com Tue May 6 09:23:08 2008 From: ben.aurel at gmail.com (Ben Aurel) Date: Tue, 6 May 2008 15:23:08 +0200 Subject: [Ironruby-core] Problems compiling IronRuby on Mac Leopard In-Reply-To: <5b0248170805060406v902b23frafb223cda2e60fc4@mail.gmail.com> References: <899c88330805060231k6ea765ecvc520a0359ca015fb@mail.gmail.com> <5b0248170805060315v49274614oe91333cd476e0de@mail.gmail.com> <899c88330805060341m2e501e24iea59ffecf82df5cb@mail.gmail.com> <899c88330805060348s2fc47d3eu4051dc0b05727c10@mail.gmail.com> <5b0248170805060406v902b23frafb223cda2e60fc4@mail.gmail.com> Message-ID: <899c88330805060623n1df97019v28de98035537d133@mail.gmail.com> if I understand Seo correctly, I *have* to downgrade in order to compile ironruby for mac. There is no other option. Could somebody tell me the (best) way for downgrading the sources. Can I downgrade with SVN the existing sources? If yes - how? Or is it better to remove the checked out sources and make a checkout again with the specific revision number? Again - how? thanks for your help Benh On Tue, May 6, 2008 at 1:06 PM, Sanghyeon Seo wrote: > 2008/5/6 Ben Aurel : > > > --and than this error (?): > > ./actions/comdispatch/DispCallable.cs(134,9): error CS0452: The type > > `T' must be a reference type in order to use it as type parameter `T' > > in the generic type or method > > `Microsoft.Scripting.Actions.RuleBuilder'. > > ./actions/comdispatch/comtypelibdesc.cs(141,9): error CS0452: The type > > `T' must be a reference type in order to use it as type parameter `T' > > in the generic type or method > > `Microsoft.Scripting.Actions.RuleBuilder'. > > This is a recent unrelated error. This problem is reported as Mono bug #387040. > https://bugzilla.novell.com/show_bug.cgi?id=387040 > > The last working revision is r98. If all you want is to try IronRuby, > you could update to old revisions. > > > > When I now try to run it again I simply get: > > > > $ sudo rake compile mono=1 > > rake aborted! > > cannot resolve path System.dll > > Of course, you are using sudo, which resets the shell environment. > Therefore, don't. > > -- > > > Seo Sanghyeon > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > From thibaut.barrere at gmail.com Tue May 6 09:23:27 2008 From: thibaut.barrere at gmail.com (=?ISO-8859-1?Q?Thibaut_Barr=E8re?=) Date: Tue, 6 May 2008 15:23:27 +0200 Subject: [Ironruby-core] Problems compiling IronRuby on Mac Leopard In-Reply-To: <899c88330805060615i164c2cfdv66fed61c1d11f004@mail.gmail.com> References: <899c88330805060231k6ea765ecvc520a0359ca015fb@mail.gmail.com> <899c88330805060341m2e501e24iea59ffecf82df5cb@mail.gmail.com> <899c88330805060348s2fc47d3eu4051dc0b05727c10@mail.gmail.com> <5b0248170805060406v902b23frafb223cda2e60fc4@mail.gmail.com> <899c88330805060523w606874dcs2e379cf8491a1f7b@mail.gmail.com> <5b0248170805060530k481f3d82va39e4004547160a8@mail.gmail.com> <899c88330805060548w73bbe303r4c5373c4a9cac9ca@mail.gmail.com> <899c88330805060600h76e0995dje0f0cd4bb95291d4@mail.gmail.com> <4a68b8cf0805060610u33b83d4y6eb7c45300f28e54@mail.gmail.com> <899c88330805060615i164c2cfdv66fed61c1d11f004@mail.gmail.com> Message-ID: <4a68b8cf0805060623q7898bccfx2f3d44159938091f@mail.gmail.com> > does that mean, that my terminal don't know the character set used on the website? If you use the html version on the OS X command line, the variable will keep the quotes inside the value instead of acting like a string delimiter: Macintosh:temp thbar$ export SOMEVAR="/usr/local/lib/pkgconfig:/opt/local/lib/pkgconfig" Macintosh:temp thbar$ echo $SOMEVAR *"/usr/local/lib/pkgconfig:/opt/local/lib/pkgconfig"* On the other hand, if you use the regular double-quote, you'll get the expected behaviour: Macintosh:temp thbar$ export SOMEVAR="/usr/local/lib/pkgconfig:/opt/local/lib/pkgconfig" Macintosh:temp thbar$ echo $SOMEVAR */usr/local/lib/pkgconfig:/opt/local/lib/pkgconfig * hope this helps -- Thibaut -------------- next part -------------- An HTML attachment was scrubbed... URL: From sanxiyn at gmail.com Tue May 6 09:28:50 2008 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Tue, 6 May 2008 22:28:50 +0900 Subject: [Ironruby-core] Problems compiling IronRuby on Mac Leopard In-Reply-To: <899c88330805060623n1df97019v28de98035537d133@mail.gmail.com> References: <899c88330805060231k6ea765ecvc520a0359ca015fb@mail.gmail.com> <5b0248170805060315v49274614oe91333cd476e0de@mail.gmail.com> <899c88330805060341m2e501e24iea59ffecf82df5cb@mail.gmail.com> <899c88330805060348s2fc47d3eu4051dc0b05727c10@mail.gmail.com> <5b0248170805060406v902b23frafb223cda2e60fc4@mail.gmail.com> <899c88330805060623n1df97019v28de98035537d133@mail.gmail.com> Message-ID: <5b0248170805060628v6333f756v629bb71302729d8e@mail.gmail.com> 2008/5/6 Ben Aurel : > Could somebody tell me the (best) way for downgrading the sources. Can > I downgrade with SVN the existing sources? If yes - how? Yes. svn update -r 98. -- Seo Sanghyeon From ben.aurel at gmail.com Tue May 6 10:29:26 2008 From: ben.aurel at gmail.com (Ben Aurel) Date: Tue, 6 May 2008 16:29:26 +0200 Subject: [Ironruby-core] Problems compiling IronRuby on Mac Leopard In-Reply-To: <5b0248170805060628v6333f756v629bb71302729d8e@mail.gmail.com> References: <899c88330805060231k6ea765ecvc520a0359ca015fb@mail.gmail.com> <5b0248170805060315v49274614oe91333cd476e0de@mail.gmail.com> <899c88330805060341m2e501e24iea59ffecf82df5cb@mail.gmail.com> <899c88330805060348s2fc47d3eu4051dc0b05727c10@mail.gmail.com> <5b0248170805060406v902b23frafb223cda2e60fc4@mail.gmail.com> <899c88330805060623n1df97019v28de98035537d133@mail.gmail.com> <5b0248170805060628v6333f756v629bb71302729d8e@mail.gmail.com> Message-ID: <899c88330805060729u30d4a7beq4473949336e81aec@mail.gmail.com> thanks, I always got the error: svn: Failed to add file 'web/makefile': object of the same name already exists I removed web/Makefile, and than it worked ... On Tue, May 6, 2008 at 3:28 PM, Sanghyeon Seo wrote: > 2008/5/6 Ben Aurel : > > > Could somebody tell me the (best) way for downgrading the sources. Can > > I downgrade with SVN the existing sources? If yes - how? > > Yes. svn update -r 98. > > -- > > > Seo Sanghyeon > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > From ksunair at yahoo.com Tue May 6 11:54:13 2008 From: ksunair at yahoo.com (Unnikrishnan Nair) Date: Tue, 6 May 2008 08:54:13 -0700 (PDT) Subject: [Ironruby-core] external contribution question Message-ID: <212913.43396.qm@web50610.mail.re2.yahoo.com> Just curious, which are all the modules need help with? I am interested in contributing. Thanks. ----- Original Message ---- From: John Lam (IRONRUBY) To: IronRuby External Code Reviewers Cc: "ironruby-core at rubyforge.org" Sent: Monday, May 5, 2008 12:07:13 PM Subject: [Ironruby-core] Code Review: socket2 tfpt review /shelveset:socket2;REDMOND\jflam Overall - looks good! We really want to turn on tests for this stuff. Jim's looking at getting the latest rubinius specs running so we can deprecate our current spec snapshot soon - hopefully this week. A few minor nits below: Seems like you have a couple of redundant Protocols.CastToString calls here - domain is *always* a MutableString based on your ctor ... private static Socket CreateSocket(CodeContext/*!*/ context, MutableString/*!*/ domain, MutableString/*!*/ type, object/*Numeric*/ protocol) { RubyExecutionContext ec = RubyUtils.GetExecutionContext(context); RubyClass rubySocketClass = ec.GetClass(typeof(Ruby.StandardLibrary.RubySocket)); AddressFamily addressFamily = (AddressFamily)RubyUtils.GetConstant(context, rubySocketClass, SymbolTable.StringToId(Protocols.CastToString(context, domain)), true); ProtocolType protocolType = (ProtocolType)(Protocols.CastToFixnum(context, protocol)); SocketType socketType = (SocketType)RubyUtils.GetConstant(context, rubySocketClass, SymbolTable.StringToId(Protocols.CastToString(context, type)), true); return new Socket(addressFamily, socketType, protocolType); } Also ... Socket should be Socket/*!*/ since there is only one code path out of this method barring exceptions. I've fixed these minor things in my copy. Following this analysis, this also leads to _socket in RubyBasicSocket:23 being a /*!*/ as well. BTW, I really like the /*Numeric*/ annotations that you've been putting in your code. This could lead us to doing something smarter in the future in the binder like adding a parameter attribute [Numeric] to coerce the binder into doing some smarter things with the conversions. Thinking aloud about this method - would it make more sense to have MutableString and int overloads that delegate to helpers rather than dropping everything into a single method like this one here? internal static MutableString ConvertToHostString(CodeContext/*!*/ context, object hostname) { if (hostname == null) { return null; } if (hostname is MutableString) { MutableString strHostname = (MutableString)hostname; // Special cases if (strHostname == "" ) { strHostname = new MutableString("0.0.0.0"); } else if (strHostname == "") { strHostname = new MutableString("255.255.255.255"); } return strHostname; } int iHostname; if (Protocols.IntegerAsFixnum(hostname, out iHostname)) { // Ruby uses Little Endian whereas .NET uses Big Endian IP values byte[] bytes = new byte[4]; for (int i = 3; i >= 0; --i) { bytes[i] = (byte)(iHostname & 0xff); iHostname >>= 8; } return new MutableString(new System.Net.IPAddress(bytes).ToString()); } return Protocols.CastToString(context, hostname); } Some other points - seems some of the code below could be delegated to the Protocols.CheckSafeLevel() helpers that you added. BTW, we should probably spend some time and make a call about what we're going to do about all of the safe level stuff. Arguably this stuff isn't necessary due to CLR safety (especially in Silverlight contexts). internal static void CheckSecurity(CodeContext/*!*/ context, object self, string message) { RubyExecutionContext ec = RubyUtils.GetExecutionContext(context); if (ec.CurrentSafeLevel >= 4 && ec.IsObjectTainted(self)) { throw RubyExceptions.CreateSecurityError("Insecure: " + message); } } Thanks, -John -------------- next part -------------- An HTML attachment was scrubbed... URL: From cjac at colliertech.org Tue May 6 12:06:47 2008 From: cjac at colliertech.org (C.J. Adams-Collier) Date: Tue, 06 May 2008 09:06:47 -0700 Subject: [Ironruby-core] build problems (mono, gmcs from svn) Message-ID: <1210090007.29110.236.camel@cjac.intra.cardomain.com> Hey all, I'm not familiar with ruby or rake, so please forgive the n00b question. Is IronRuby known to currently build on mono 1.9? ./actions/comdispatch/DispCallable.cs(134,9): error CS0452: The type `T' must be a reference type in order to use it as type parameter `T' in the generic type or method `Microsoft.Scripting.Actions.RuleBuilder'. ./actions/comdispatch/comtypelibdesc.cs(141,9): error CS0452: The type `T' must be a reference type in order to use it as type parameter `T' in the generic type or method `Microsoft.Scripting.Actions.RuleBuilder'. Compilation failed: 2 error(s), 0 warnings Cheers, C.J. cjcollier at karma:/usr/src/svn/rubyforge.org/ironruby/trunk$ \ grep trunk .svn/entries && \ svn up && \ rake --version && \ ruby --version && \ gmcs --version && \ mono --version && \ mono=1 rake --trace compile svn://rubyforge.org/var/svn/ironruby/trunk At revision 101. rake, version 0.8.1 ruby 1.8.6 (2008-03-03 patchlevel 114) [i486-linux] Mono C# compiler version 1.9.0.0 Mono JIT compiler version 1.9 (/trunk/ r102153) Copyright (C) 2002-2007 Novell, Inc and Contributors. www.mono-project.com TLS: __thread GC: Included Boehm (with typed GC) SIGSEGV: altstack Notifications: epoll Architecture: x86 Disabled: none (in /usr/src/svn/rubyforge.org/ironruby/trunk) ./context.rb:159: warning: Insecure world writable dir /opt in PATH, mode 040777 ** Invoke compile (first_time) ** Invoke happy (first_time) ** Execute happy /usr/src/svn/rubyforge.org/ironruby/trunk/Rakefile:368: warning: Insecure world writable dir /opt in PATH, mode 040777 ** Invoke clean_build (first_time) ** Invoke happy ** Execute clean_build ** Invoke compile_dlr (first_time) ** Invoke clean_build ** Execute compile_dlr Read in 0 resources from '/usr/src/svn/rubyforge.org/ironruby/trunk/src/microsoft.scripting.core/Microsoft.Scripting.txt' Writing resource file... Done. ./actions/comdispatch/DispCallable.cs(134,9): error CS0452: The type `T' must be a reference type in order to use it as type parameter `T' in the generic type or method `Microsoft.Scripting.Actions.RuleBuilder'. ./actions/comdispatch/comtypelibdesc.cs(141,9): error CS0452: The type `T' must be a reference type in order to use it as type parameter `T' in the generic type or method `Microsoft.Scripting.Actions.RuleBuilder'. Compilation failed: 2 error(s), 0 warnings rake aborted! Command failed with status (1): [gmcs /out:"/usr/src/svn/rubyforge.org/iron...] /usr/lib/ruby/1.8/rake.rb:899:in `sh' /usr/lib/ruby/1.8/rake.rb:906:in `call' /usr/lib/ruby/1.8/rake.rb:906:in `sh' /usr/lib/ruby/1.8/rake.rb:985:in `sh' ./context.rb:183:in `exec' ./context.rb:447:in `compile' ./context.rb:432:in `chdir' ./context.rb:432:in `compile' /usr/src/svn/rubyforge.org/ironruby/trunk/Rakefile:137 ./context.rb:578:in `instance_eval' ./context.rb:578:in `source_context' /usr/src/svn/rubyforge.org/ironruby/trunk/Rakefile:135 /usr/lib/ruby/1.8/rake.rb:546:in `call' /usr/lib/ruby/1.8/rake.rb:546:in `execute' /usr/lib/ruby/1.8/rake.rb:541:in `each' /usr/lib/ruby/1.8/rake.rb:541:in `execute' /usr/lib/ruby/1.8/rake.rb:508:in `invoke_with_call_chain' /usr/lib/ruby/1.8/rake.rb:501:in `synchronize' /usr/lib/ruby/1.8/rake.rb:501:in `invoke_with_call_chain' /usr/lib/ruby/1.8/rake.rb:518:in `invoke_prerequisites' /usr/lib/ruby/1.8/rake.rb:1183:in `each' /usr/lib/ruby/1.8/rake.rb:1183:in `send' /usr/lib/ruby/1.8/rake.rb:1183:in `each' /usr/lib/ruby/1.8/rake.rb:515:in `invoke_prerequisites' /usr/lib/ruby/1.8/rake.rb:507:in `invoke_with_call_chain' /usr/lib/ruby/1.8/rake.rb:501:in `synchronize' /usr/lib/ruby/1.8/rake.rb:501:in `invoke_with_call_chain' /usr/lib/ruby/1.8/rake.rb:494:in `invoke' /usr/lib/ruby/1.8/rake.rb:1931:in `invoke_task' /usr/lib/ruby/1.8/rake.rb:1909:in `top_level' /usr/lib/ruby/1.8/rake.rb:1909:in `each' /usr/lib/ruby/1.8/rake.rb:1909:in `top_level' /usr/lib/ruby/1.8/rake.rb:1948:in `standard_exception_handling' /usr/lib/ruby/1.8/rake.rb:1903:in `top_level' /usr/lib/ruby/1.8/rake.rb:1881:in `run' /usr/lib/ruby/1.8/rake.rb:1948:in `standard_exception_handling' /usr/lib/ruby/1.8/rake.rb:1878:in `run' /usr/bin/rake:28 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From jflam at microsoft.com Tue May 6 12:14:23 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Tue, 6 May 2008 09:14:23 -0700 Subject: [Ironruby-core] external contribution question In-Reply-To: <212913.43396.qm@web50610.mail.re2.yahoo.com> References: <212913.43396.qm@web50610.mail.re2.yahoo.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D92E58D85@NA-EXMSG-C115.redmond.corp.microsoft.com> Unnikrishnan Nair: > Just curious, which are all the modules need help with? I am > interested in contributing. > Thanks. There are a lot of methods in File that need to be implemented. That should be a reasonable place to start. We have some bugs in Dir#glob that could use some attention too. If you want a good self-contained project that will take some time, take a look at implementing #pack and #unpack. Thanks, -John From ksunair at yahoo.com Tue May 6 12:42:19 2008 From: ksunair at yahoo.com (Unnikrishnan Nair) Date: Tue, 6 May 2008 09:42:19 -0700 (PDT) Subject: [Ironruby-core] external contribution question Message-ID: <102290.84078.qm@web50612.mail.re2.yahoo.com> Thanks John, I will look at the #pack and #unpack along with File. ----- Original Message ---- From: John Lam (IRONRUBY) To: "ironruby-core at rubyforge.org" Sent: Tuesday, May 6, 2008 11:14:23 AM Subject: Re: [Ironruby-core] external contribution question Unnikrishnan Nair: > Just curious, which are all the modules need help with? I am > interested in contributing. > Thanks. There are a lot of methods in File that need to be implemented. That should be a reasonable place to start. We have some bugs in Dir#glob that could use some attention too. If you want a good self-contained project that will take some time, take a look at implementing #pack and #unpack. Thanks, -John _______________________________________________ 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 May 6 12:50:27 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 6 May 2008 09:50:27 -0700 Subject: [Ironruby-core] external contribution question In-Reply-To: <102290.84078.qm@web50612.mail.re2.yahoo.com> References: <102290.84078.qm@web50612.mail.re2.yahoo.com> Message-ID: I'll add byte array support to MutableString soon, meanwhile work with List or byte[] in #pack and #unpack methods. Or start with File. Maybe I can make MutableStr before you need it for pack/unpack. Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Unnikrishnan Nair Sent: Tuesday, May 06, 2008 9:42 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] external contribution question Thanks John, I will look at the #pack and #unpack along with File. ----- Original Message ---- From: John Lam (IRONRUBY) To: "ironruby-core at rubyforge.org" Sent: Tuesday, May 6, 2008 11:14:23 AM Subject: Re: [Ironruby-core] external contribution question Unnikrishnan Nair: > Just curious, which are all the modules need help with? I am > interested in contributing. > Thanks. There are a lot of methods in File that need to be implemented. That should be a reasonable place to start. We have some bugs in Dir#glob that could use some attention too. If you want a good self-contained project that will take some time, take a look at implementing #pack and #unpack. Thanks, -John _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: From jflam at microsoft.com Tue May 6 12:51:56 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Tue, 6 May 2008 09:51:56 -0700 Subject: [Ironruby-core] build problems (mono, gmcs from svn) In-Reply-To: <1210090007.29110.236.camel@cjac.intra.cardomain.com> References: <1210090007.29110.236.camel@cjac.intra.cardomain.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D92E58DDF@NA-EXMSG-C115.redmond.corp.microsoft.com> C.J. Adams-Collier: > Is IronRuby known to currently build on mono 1.9? > > ./actions/comdispatch/DispCallable.cs(134,9): error CS0452: The type > `T' > must be a reference type in order to use it as type parameter `T' in > the generic type or method > `Microsoft.Scripting.Actions.RuleBuilder'. > ./actions/comdispatch/comtypelibdesc.cs(141,9): error CS0452: The type > `T' must be a reference type in order to use it as type parameter `T' > in the generic type or method > `Microsoft.Scripting.Actions.RuleBuilder'. > Compilation failed: 2 error(s), 0 warnings I believe these are new bugs that our latest revision revealed in mono. https://bugzilla.novell.com/show_bug.cgi?id=387040 It's good to see that Tony's taken over the mantle of breaking mono :) Thanks, -John From bacondarwin at googlemail.com Tue May 6 13:20:00 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Tue, 6 May 2008 18:20:00 +0100 Subject: [Ironruby-core] Code Review: socket2 In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D92D92695@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <372109E149E8084D8E6C7D9CFD82E0632D92D92695@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <001b01c8af9d$70c95c70$525c1550$@com> Hi John, What is the process of these code reviews of external contributions? Are you expecting to begin a dialogue, since you do ask questions throughout the review? Or is it more of a feedback opportunity to let us know what you have done to the code? For instance, are you expecting me to make changes discussed below and resubmit the patch - clearly not in the case of the first item as you have said that you changed it already on your local copy? Cheers, Pete -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of John Lam (IRONRUBY) Sent: Monday,05 May 05, 2008 18:07 To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: [Ironruby-core] Code Review: socket2 tfpt review /shelveset:socket2;REDMOND\jflam Overall - looks good! We really want to turn on tests for this stuff. Jim's looking at getting the latest rubinius specs running so we can deprecate our current spec snapshot soon - hopefully this week. A few minor nits below: Seems like you have a couple of redundant Protocols.CastToString calls here - domain is *always* a MutableString based on your ctor ... private static Socket CreateSocket(CodeContext/*!*/ context, MutableString/*!*/ domain, MutableString/*!*/ type, object/*Numeric*/ protocol) { RubyExecutionContext ec = RubyUtils.GetExecutionContext(context); RubyClass rubySocketClass = ec.GetClass(typeof(Ruby.StandardLibrary.RubySocket)); AddressFamily addressFamily = (AddressFamily)RubyUtils.GetConstant(context, rubySocketClass, SymbolTable.StringToId(Protocols.CastToString(context, domain)), true); ProtocolType protocolType = (ProtocolType)(Protocols.CastToFixnum(context, protocol)); SocketType socketType = (SocketType)RubyUtils.GetConstant(context, rubySocketClass, SymbolTable.StringToId(Protocols.CastToString(context, type)), true); return new Socket(addressFamily, socketType, protocolType); } Also ... Socket should be Socket/*!*/ since there is only one code path out of this method barring exceptions. I've fixed these minor things in my copy. Following this analysis, this also leads to _socket in RubyBasicSocket:23 being a /*!*/ as well. BTW, I really like the /*Numeric*/ annotations that you've been putting in your code. This could lead us to doing something smarter in the future in the binder like adding a parameter attribute [Numeric] to coerce the binder into doing some smarter things with the conversions. Thinking aloud about this method - would it make more sense to have MutableString and int overloads that delegate to helpers rather than dropping everything into a single method like this one here? internal static MutableString ConvertToHostString(CodeContext/*!*/ context, object hostname) { if (hostname == null) { return null; } if (hostname is MutableString) { MutableString strHostname = (MutableString)hostname; // Special cases if (strHostname == "" ) { strHostname = new MutableString("0.0.0.0"); } else if (strHostname == "") { strHostname = new MutableString("255.255.255.255"); } return strHostname; } int iHostname; if (Protocols.IntegerAsFixnum(hostname, out iHostname)) { // Ruby uses Little Endian whereas .NET uses Big Endian IP values byte[] bytes = new byte[4]; for (int i = 3; i >= 0; --i) { bytes[i] = (byte)(iHostname & 0xff); iHostname >>= 8; } return new MutableString(new System.Net.IPAddress(bytes).ToString()); } return Protocols.CastToString(context, hostname); } Some other points - seems some of the code below could be delegated to the Protocols.CheckSafeLevel() helpers that you added. BTW, we should probably spend some time and make a call about what we're going to do about all of the safe level stuff. Arguably this stuff isn't necessary due to CLR safety (especially in Silverlight contexts). internal static void CheckSecurity(CodeContext/*!*/ context, object self, string message) { RubyExecutionContext ec = RubyUtils.GetExecutionContext(context); if (ec.CurrentSafeLevel >= 4 && ec.IsObjectTainted(self)) { throw RubyExceptions.CreateSecurityError("Insecure: " + message); } } Thanks, -John From aaronblondeau at gmail.com Tue May 6 13:46:45 2008 From: aaronblondeau at gmail.com (Aaron Blondeau) Date: Tue, 6 May 2008 11:46:45 -0600 Subject: [Ironruby-core] Trouble opening IronRuby.sln Message-ID: <365f7f800805061046y5cefd091n6fdd834b7bd49729@mail.gmail.com> I am having trouble opening the latest (rev 101) IronRuby with VisualStudio 2005. Nothing happens at all when I try to open IronRuby.sln - not even an error message. I have been able to open the individual .csproj files by themselves and get everything put together, just not the top level .sln file. Is it expected that the source will still work with VS2005 or do I need to move to VS2008 or could my issue be something else? -Aaron Blondeau -------------- next part -------------- An HTML attachment was scrubbed... URL: From cjac at colliertech.org Tue May 6 16:58:48 2008 From: cjac at colliertech.org (C.J. Adams-Collier) Date: Tue, 06 May 2008 13:58:48 -0700 Subject: [Ironruby-core] build problems (mono, gmcs from svn) In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D92E58DDF@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <1210090007.29110.236.camel@cjac.intra.cardomain.com> <372109E149E8084D8E6C7D9CFD82E0632D92E58DDF@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <1210107528.29110.238.camel@cjac.intra.cardomain.com> On Tue, 2008-05-06 at 09:51 -0700, John Lam (IRONRUBY) wrote: > C.J. Adams-Collier: > > I believe these are new bugs that our latest revision revealed in mono. https://bugzilla.novell.com/show_bug.cgi?id=387040 Thanks, John. I'll ping Marek and see if he can help me fix this. If nothing else, I'll add the test from that bug to the regression suite. > It's good to see that Tony's taken over the mantle of breaking mono :) > > Thanks, > -John Cheers, C.J. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From jdeville at microsoft.com Tue May 6 19:33:36 2008 From: jdeville at microsoft.com (Jim Deville) Date: Tue, 6 May 2008 16:33:36 -0700 Subject: [Ironruby-core] Spec runner update Message-ID: After much hacking I feel confident enough to say we have a working mspec. So why don't you have it? Well, I haven't baselined it, and it doesn't run with Rake. Those are my next tasks. By baseline, I mean enable all passing tests, and disable all failing tests. Then I'll get it running with rake. My goal is to get it running with rake in the same way that the current spec's do. I'll keep you in touch as I get more running. JD -------------- next part -------------- An HTML attachment was scrubbed... URL: From ksunair at yahoo.com Tue May 6 23:04:33 2008 From: ksunair at yahoo.com (Unnikrishnan Nair) Date: Tue, 6 May 2008 20:04:33 -0700 (PDT) Subject: [Ironruby-core] external contribution question Message-ID: <238455.48896.qm@web50604.mail.re2.yahoo.com> I will start working on the Files method implementation. Once I complete reasonable amount of work with all tests, I will let you all know. Thanks. ----- Original Message ---- From: John Lam (IRONRUBY) To: "ironruby-core at rubyforge.org" Sent: Tuesday, May 6, 2008 11:14:23 AM Subject: Re: [Ironruby-core] external contribution question Unnikrishnan Nair: > Just curious, which are all the modules need help with? I am > interested in contributing. > Thanks. There are a lot of methods in File that need to be implemented. That should be a reasonable place to start. We have some bugs in Dir#glob that could use some attention too. If you want a good self-contained project that will take some time, take a look at implementing #pack and #unpack. Thanks, -John _______________________________________________ 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 sanxiyn at gmail.com Tue May 6 23:15:55 2008 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Wed, 7 May 2008 12:15:55 +0900 Subject: [Ironruby-core] IronRuby r100 on Mono Message-ID: <5b0248170805062015h5a2212cg2e6457ea73e3a1bc@mail.gmail.com> WARNING: This is against revision 100. Revision 101 will compile, but will not run on Mono at the time. I am still working on it. In case you didn't know, you can use "svn update -r 100" to "update" to not-the-latest version. Stuffs are in the usual place: http://sparcs.kaist.ac.kr/~tinuviel/download/IronRuby/ patch-mono-r100 consists of four different things: 1. One-line case-sensitivity patch to Rakefile. 2. Workaround for long-standing console problem. 3. Workaround for Mono bug #387040, by changing explicit interface implementations to implicit one. 4. Workaround for Mono bug #387502, by rewriting ?? operator with if statement. This is a SVN regression and you don't need it if you are using Mono 1.9. Links to Mono bugs: https://bugzilla.novell.com/show_bug.cgi?id=387040 https://bugzilla.novell.com/show_bug.cgi?id=387502 P.S. DLR, IronPython, IronRuby team should create C# compiler test suite! You guys have the talent! -- Seo Sanghyeon From jflam at microsoft.com Wed May 7 01:17:42 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Tue, 6 May 2008 22:17:42 -0700 Subject: [Ironruby-core] Trouble opening IronRuby.sln In-Reply-To: <365f7f800805061046y5cefd091n6fdd834b7bd49729@mail.gmail.com> References: <365f7f800805061046y5cefd091n6fdd834b7bd49729@mail.gmail.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D92E592C8@NA-EXMSG-C115.redmond.corp.microsoft.com> Aaron Blondeau: > I am having trouble opening the latest (rev 101) IronRuby with > VisualStudio 2005. Nothing happens at all when I try to open > IronRuby.sln - not even an error message. I have been able to open > the individual .csproj files by themselves and get everything put > together, just not the top level .sln file. Is it expected that the > source will still work with VS2005 or do I need to move to VS2008 or > could my issue be something else? I know I don't have any problems opening with VS 2008. Is anyone else on the list still using VS 2005? Thanks, -John From jflam at microsoft.com Wed May 7 01:19:59 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Tue, 6 May 2008 22:19:59 -0700 Subject: [Ironruby-core] Code Review: socket2 In-Reply-To: <001b01c8af9d$70c95c70$525c1550$@com> References: <372109E149E8084D8E6C7D9CFD82E0632D92D92695@NA-EXMSG-C115.redmond.corp.microsoft.com> <001b01c8af9d$70c95c70$525c1550$@com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D92E592CA@NA-EXMSG-C115.redmond.corp.microsoft.com> Peter Bacon Darwin: > What is the process of these code reviews of external contributions? > Are you expecting to begin a dialogue, since you do ask questions > throughout the review? Or is it more of a feedback opportunity to let > us know what you have done to the code? For instance, are you > expecting me to make changes discussed below and resubmit the patch - > clearly not in the case of the first item as you have said that you > changed it already on your local copy? Generally, if folks have opinions about the review either way, please let us know. Specifically on your contribution, I'm having a heck of a time getting it to compile under Silverlight. I'm going to block off some more time tomorrow to see what I can do. Sockets are only partially implemented in Silverlight, so I have to figure out the delta. Don't worry about making changes - once I get it compiling under SL, I'll check it in and you can modify my changes :) Thanks, -John From w.kelly at qut.edu.au Wed May 7 01:47:36 2008 From: w.kelly at qut.edu.au (Wayne Kelly) Date: Wed, 7 May 2008 15:47:36 +1000 Subject: [Ironruby-core] Trouble opening IronRuby.sln In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D92E592C8@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <365f7f800805061046y5cefd091n6fdd834b7bd49729@mail.gmail.com> <372109E149E8084D8E6C7D9CFD82E0632D92E592C8@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: Yes, I still use VS 2005. I have the same problem trying to open 2008 solution files. I just create my own VS 2005 solution file and add the existing projects to it - it works fine. Inside each project I also need to manually redefine the references to mscorlib and System.dll version 2.0.5.0. Cheers, Wayne. > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of > John Lam (IRONRUBY) > Sent: Wednesday, 7 May 2008 3:18 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Trouble opening IronRuby.sln > > Aaron Blondeau: > > > I am having trouble opening the latest (rev 101) IronRuby with > > VisualStudio 2005. Nothing happens at all when I try to open > > IronRuby.sln - not even an error message. I have been able to open > > the individual .csproj files by themselves and get everything put > > together, just not the top level .sln file. Is it expected > that the > > source will still work with VS2005 or do I need to move to > VS2008 or > > could my issue be something else? > > I know I don't have any problems opening with VS 2008. Is > anyone else on the list still using VS 2005? > > Thanks, > -John > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > From cjac at colliertech.org Wed May 7 01:53:35 2008 From: cjac at colliertech.org (C.J. Adams-Collier) Date: Tue, 6 May 2008 22:53:35 -0700 Subject: [Ironruby-core] IronRuby r100 on Mono In-Reply-To: <5b0248170805062015h5a2212cg2e6457ea73e3a1bc@mail.gmail.com> References: <5b0248170805062015h5a2212cg2e6457ea73e3a1bc@mail.gmail.com> Message-ID: <2D85A6D6-88D6-4FEF-BD6D-B6E7E72E0A83@colliertech.org> Thanks Seo! I'm working with Marek to make Mono play nice with r101 :) On May 6, 2008, at 8:15 PM, Sanghyeon Seo wrote: > WARNING: This is against revision 100. Revision 101 will compile, but > will not run on Mono at the time. I am still working on it. In case > you didn't know, you can use "svn update -r 100" to "update" to > not-the-latest version. > > Stuffs are in the usual place: > http://sparcs.kaist.ac.kr/~tinuviel/download/IronRuby/ > > patch-mono-r100 consists of four different things: > > 1. One-line case-sensitivity patch to Rakefile. > 2. Workaround for long-standing console problem. > 3. Workaround for Mono bug #387040, by changing explicit interface > implementations to implicit one. > 4. Workaround for Mono bug #387502, by rewriting ?? operator with if > statement. This is a SVN regression and you don't need it if you are > using Mono 1.9. > > Links to Mono bugs: > https://bugzilla.novell.com/show_bug.cgi?id=387040 > https://bugzilla.novell.com/show_bug.cgi?id=387502 > > P.S. DLR, IronPython, IronRuby team should create C# compiler test > suite! You guys have the talent! > > -- > Seo Sanghyeon > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From bacondarwin at googlemail.com Wed May 7 05:19:58 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Wed, 7 May 2008 10:19:58 +0100 Subject: [Ironruby-core] Code Review: socket2 In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D92E592CA@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <372109E149E8084D8E6C7D9CFD82E0632D92D92695@NA-EXMSG-C115.redmond.corp.microsoft.com> <001b01c8af9d$70c95c70$525c1550$@com> <372109E149E8084D8E6C7D9CFD82E0632D92E592CA@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <000f01c8b023$86030d30$92092790$@com> The .NET Socket library is a fairly thin layer that sits on top of WinSock. Clearly Silverlight would not be able to do this since WinSock is not a standard API on other OSes. Also, Silverlight is going to have additional security restrictions that would prevent much of the Socket library from work anyway. To be honest, even the full .NET Framework socket implementation does not fully support all the features required by the Ruby socket library. I have been struggling to get the Socket class working - it is not pretty. This is partly to do with the way the Ruby socket library is implemented. In particular, the Socket class provides access to low level C API methods, which differ from system to system. In the best case this results in slightly inconsistent behaviour and different errors being raised. In the worst case it is not possible to write portable Ruby code that uses the socket library, unless you restrict yourself to well defined methods. It seems reasonable that, since the Ruby Socket library is somewhat OS dependent anyway, we should agree upon a subset of the functionality to support, particularly with regards to Silverlight. Perhaps this should be based upon common usage in programs like Mongrel? I suspect that like many of these things, we may end up having to code up some stuff in straight .NET (is this possible with socket-type things?) Pete John Lam wrote: > Specifically on your contribution, I'm having a heck of a time getting it to compile under Silverlight. I'm going to block off some more time tomorrow > to see what I can do. Sockets are only partially implemented in Silverlight, so I have to figure out the delta. Don't worry about making changes - once > I get it compiling under SL, I'll check it in and you can modify my changes :) Thanks, -John _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From cjac at colliertech.org Wed May 7 07:17:38 2008 From: cjac at colliertech.org (C.J. Adams-Collier) Date: Wed, 7 May 2008 04:17:38 -0700 Subject: [Ironruby-core] IronRuby r100 on Mono In-Reply-To: <5b0248170805062015h5a2212cg2e6457ea73e3a1bc@mail.gmail.com> References: <5b0248170805062015h5a2212cg2e6457ea73e3a1bc@mail.gmail.com> Message-ID: C<> succeeds for me. Tons of warnings, but I've got a working build. Thanks again for the hard work here, Seo! cjcollier at karma:/usr/src/svn/rubyforge.org/ironruby/trunk$ cat `which ruby` && \ > echo '===' && \ > cat hello.rb && \ > echo '===' && \ > ruby hello.rb #!/bin/bash . $HOME/.devenv IRON_RUBY=/usr/src/svn/rubyforge.org/ironruby/trunk/build/mono_debug/ ir.exe exec mono $IRON_RUBY "$*" === def sayHi( name ) puts "Hello, %s!" % String( name ) end sayHi( "C.J." ) === Hello, C.J.! Cheers, C.J. On May 6, 2008, at 8:15 PM, Sanghyeon Seo wrote: > WARNING: This is against revision 100. Revision 101 will compile, but > will not run on Mono at the time. I am still working on it. In case > you didn't know, you can use "svn update -r 100" to "update" to > not-the-latest version. > > Stuffs are in the usual place: > http://sparcs.kaist.ac.kr/~tinuviel/download/IronRuby/ > > patch-mono-r100 consists of four different things: > > 1. One-line case-sensitivity patch to Rakefile. > 2. Workaround for long-standing console problem. > 3. Workaround for Mono bug #387040, by changing explicit interface > implementations to implicit one. > 4. Workaround for Mono bug #387502, by rewriting ?? operator with if > statement. This is a SVN regression and you don't need it if you are > using Mono 1.9. > > Links to Mono bugs: > https://bugzilla.novell.com/show_bug.cgi?id=387040 > https://bugzilla.novell.com/show_bug.cgi?id=387502 > > P.S. DLR, IronPython, IronRuby team should create C# compiler test > suite! You guys have the talent! > > -- > Seo Sanghyeon > _______________________________________________ > 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 Wed May 7 07:26:59 2008 From: cjac at colliertech.org (C.J. Adams-Collier) Date: Wed, 7 May 2008 04:26:59 -0700 Subject: [Ironruby-core] IronRuby r100 on Mono In-Reply-To: <5b0248170805062015h5a2212cg2e6457ea73e3a1bc@mail.gmail.com> References: <5b0248170805062015h5a2212cg2e6457ea73e3a1bc@mail.gmail.com> Message-ID: <0DB991E6-6AD2-445B-A1C4-E1ABE446D998@colliertech.org> On May 6, 2008, at 8:15 PM, Sanghyeon Seo wrote: > P.S. DLR, IronPython, IronRuby team should create C# compiler test > suite! You guys have the talent! This might duplicate effort. There is already an open C# compiler test suite here: http://anonsvn.mono-project.com/viewcvs/trunk/mcs/tests/ BTW, I'm adding a patch to this suite to catch the bug in https:// bugzilla.novell.com/show_bug.cgi ?id=387040 - it is in code review now. ? -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: mono-ironruby.diff Type: application/octet-stream Size: 2001 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: From w.kelly at qut.edu.au Wed May 7 09:11:01 2008 From: w.kelly at qut.edu.au (Wayne Kelly) Date: Wed, 7 May 2008 23:11:01 +1000 Subject: [Ironruby-core] Rails progress summary In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D92E58B1A@NA-EXMSG-C115.redmond.corp.microsoft.com> References: , <372109E149E8084D8E6C7D9CFD82E0632D92E58B1A@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: > From: John Lam (IRONRUBY) [jflam at microsoft.com] > Sent: Tuesday, 6 May 2008 9:23 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Rails progress summary > > We've made pretty good progress against these today as of r101: > > module_function is in > > Class.new, MemberAssignmentExpression, and Kernel#extend are pending > > Please let us know how many new problems are uncovered by implementing Module#module_function After applying patches for Kernel#extend, MemberAssignmentExpression and a few other simple methods, the largest remaining cause of failure is due to new bug #19971, closely followed by Class.new not implemented. After that we're getting fairly "close" to the point where it's mostly unimplemented native libraries causing failure. Cheers, Wayne. From bacondarwin at googlemail.com Wed May 7 09:38:22 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Wed, 7 May 2008 14:38:22 +0100 Subject: [Ironruby-core] MutableString == operator Message-ID: <002401c8b047$9fb169b0$df143d10$@com> I just noticed that MutableString does not implement the == operator (and of course != operator). This could be confusing because CLR string does implement this operator to be a value comparison, rather than the default reference comparison of System.Object. I imagine most people would expect MutableString to do the same. What is the consensus view on this? Is there some reason I am not getting for not introducing this operator? I am now going to go through all the code I have written that uses MutableStrings to make sure I am using Equals rather than ==. Pete -------------- next part -------------- An HTML attachment was scrubbed... URL: From cjac at colliertech.org Wed May 7 10:09:54 2008 From: cjac at colliertech.org (C.J. Adams-Collier) Date: Wed, 7 May 2008 07:09:54 -0700 Subject: [Ironruby-core] Code Review: socket2 In-Reply-To: <000f01c8b023$86030d30$92092790$@com> References: <372109E149E8084D8E6C7D9CFD82E0632D92D92695@NA-EXMSG-C115.redmond.corp.microsoft.com> <001b01c8af9d$70c95c70$525c1550$@com> <372109E149E8084D8E6C7D9CFD82E0632D92E592CA@NA-EXMSG-C115.redmond.corp.microsoft.com> <000f01c8b023$86030d30$92092790$@com> Message-ID: <252492C6-74B2-4E92-8035-B7607A81BF34@colliertech.org> I see that the Ruby.StandardLibrary.RubySocket is implemented in C#. Is it common to write the core in C#? Has anything been written in Ruby itself? Sorry for the newbie question... is there a FAQ for this type of situation? On May 7, 2008, at 2:19 AM, Peter Bacon Darwin wrote: > The .NET Socket library is a fairly thin layer that sits on top of > WinSock. > Clearly Silverlight would not be able to do this since WinSock is > not a > standard API on other OSes. Also, Silverlight is going to have > additional > security restrictions that would prevent much of the Socket library > from > work anyway. > > To be honest, even the full .NET Framework socket implementation > does not > fully support all the features required by the Ruby socket > library. I have > been struggling to get the Socket class working - it is not pretty. > > This is partly to do with the way the Ruby socket library is > implemented. > In particular, the Socket class provides access to low level C API > methods, > which differ from system to system. In the best case this results in > slightly inconsistent behaviour and different errors being raised. > In the > worst case it is not possible to write portable Ruby code that uses > the > socket library, unless you restrict yourself to well defined methods. > > It seems reasonable that, since the Ruby Socket library is somewhat OS > dependent anyway, we should agree upon a subset of the > functionality to > support, particularly with regards to Silverlight. Perhaps this > should be > based upon common usage in programs like Mongrel? I suspect that > like many > of these things, we may end up having to code up some stuff in > straight .NET > (is this possible with socket-type things?) > > Pete > > > John Lam wrote: > >> Specifically on your contribution, I'm having a heck of a time >> getting it > to compile under Silverlight. I'm going to block off some more time > tomorrow >> to see what I can do. Sockets are only partially implemented in > Silverlight, so I have to figure out the delta. Don't worry about > making > changes - once > I get it compiling under SL, I'll check it in and > you can > modify my changes :) > > 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 ksunair at yahoo.com Wed May 7 10:15:11 2008 From: ksunair at yahoo.com (Unnikrishnan Nair) Date: Wed, 7 May 2008 07:15:11 -0700 (PDT) Subject: [Ironruby-core] Trouble opening IronRuby.sln Message-ID: <51767.84392.qm@web50607.mail.re2.yahoo.com> I am not sure anyone looked at this issue. I was able to open the project successfully in my laptop and this morning, when I tried in mydesktop I got the same error (I am using VS2008). This is what I found, 5 different project has following entries <<<<<<< .mine ======= >>>>>>> .r101 By removing and putting the proper ProjectReference I was able to compile it successfully. Thanks, ----- Original Message ---- From: John Lam (IRONRUBY) To: "ironruby-core at rubyforge.org" Sent: Wednesday, May 7, 2008 12:17:42 AM Subject: Re: [Ironruby-core] Trouble opening IronRuby.sln Aaron Blondeau: > I am having trouble opening the latest (rev 101) IronRuby with > VisualStudio 2005. Nothing happens at all when I try to open > IronRuby.sln - not even an error message. I have been able to open > the individual .csproj files by themselves and get everything put > together, just not the top level .sln file. Is it expected that the > source will still work with VS2005 or do I need to move to VS2008 or > could my issue be something else? I know I don't have any problems opening with VS 2008. Is anyone else on the list still using VS 2005? Thanks, -John _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: From bacondarwin at googlemail.com Wed May 7 10:26:18 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Wed, 7 May 2008 15:26:18 +0100 Subject: [Ironruby-core] Trouble opening IronRuby.sln In-Reply-To: <51767.84392.qm@web50607.mail.re2.yahoo.com> References: <51767.84392.qm@web50607.mail.re2.yahoo.com> Message-ID: <002f01c8b04e$51fcf890$f5f6e9b0$@com> This is a Subversion conflict. When you did an SVN Update you should have been told that these files were in a conflicted state. The notation below basically says that your local copy looks like the first line and the copy from revision 101 looks like the second line. In other words you have changed a line in the file that has also been changed in the 101 revision. You need to fix the conflict by hand somehow, depending upon what SVN client you use, which is basically what you did by putting in the correct project reference. Take a look at the SVN book for more information: http://svnbook.red-bean.com/ Pete From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Unnikrishnan Nair Sent: Wednesday,07 May 07, 2008 15:15 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Trouble opening IronRuby.sln I am not sure anyone looked at this issue. I was able to open the project successfully in my laptop and this morning, when I tried in mydesktop I got the same error (I am using VS2008). This is what I found, 5 different project has following entries <<<<<<< .mine ======= >>>>>>> .r101 By removing and putting the proper ProjectReference I was able to compile it successfully. Thanks, ----- Original Message ---- From: John Lam (IRONRUBY) To: "ironruby-core at rubyforge.org" Sent: Wednesday, May 7, 2008 12:17:42 AM Subject: Re: [Ironruby-core] Trouble opening IronRuby.sln Aaron Blondeau: > I am having trouble opening the latest (rev 101) IronRuby with > VisualStudio 2005. Nothing happens at all when I try to open > IronRuby.sln - not even an error message. I have been able to open > the individual .csproj files by themselves and get everything put > together, just not the top level .sln file. Is it expected that the > source will still work with VS2005 or do I need to move to VS2008 or > could my issue be something else? I know I don't have any problems opening with VS 2008. Is anyone else on the list still using VS 2005? Thanks, -John _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: From bacondarwin at googlemail.com Wed May 7 10:33:03 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Wed, 7 May 2008 15:33:03 +0100 Subject: [Ironruby-core] Code Review: socket2 In-Reply-To: <252492C6-74B2-4E92-8035-B7607A81BF34@colliertech.org> References: <372109E149E8084D8E6C7D9CFD82E0632D92D92695@NA-EXMSG-C115.redmond.corp.microsoft.com> <001b01c8af9d$70c95c70$525c1550$@com> <372109E149E8084D8E6C7D9CFD82E0632D92E592CA@NA-EXMSG-C115.redmond.corp.microsoft.com> <000f01c8b023$86030d30$92092790$@com> <252492C6-74B2-4E92-8035-B7607A81BF34@colliertech.org> Message-ID: <003401c8b04f$430f99e0$c92ecda0$@com> The majority if not all of the IronRuby libraries have been written in C# so far. There have been discussions about this on the mailing list before. There are a number of Ruby libraries that have been written in Ruby. Once IronRuby is fully compliant then it should be able to load these and run them straight up. Obviously stuff that cannot be written in Ruby (such as accessing hardware devices and so on) has to be written in something else. In CRuby these libraries are written in C. In IronRuby these are written in a .NET language (i.e. C#). That being said, since IronRuby provides .NET interop then it is conceivable to write a Ruby library in Ruby and bounce out to the .NET framework classes as necessary. Obviously performance issues must be taken into account. Also, there are issues discussed recently about packaging up such Ruby libraries when deploying to Silverlight. Pete -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of C.J. Adams-Collier Sent: Wednesday,07 May 07, 2008 15:10 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review: socket2 I see that the Ruby.StandardLibrary.RubySocket is implemented in C#. Is it common to write the core in C#? Has anything been written in Ruby itself? Sorry for the newbie question... is there a FAQ for this type of situation? From jflam at microsoft.com Wed May 7 10:34:13 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Wed, 7 May 2008 07:34:13 -0700 Subject: [Ironruby-core] Code Review: socket2 In-Reply-To: <252492C6-74B2-4E92-8035-B7607A81BF34@colliertech.org> References: <372109E149E8084D8E6C7D9CFD82E0632D92D92695@NA-EXMSG-C115.redmond.corp.microsoft.com> <001b01c8af9d$70c95c70$525c1550$@com> <372109E149E8084D8E6C7D9CFD82E0632D92E592CA@NA-EXMSG-C115.redmond.corp.microsoft.com> <000f01c8b023$86030d30$92092790$@com> <252492C6-74B2-4E92-8035-B7607A81BF34@colliertech.org> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D92E593AC@NA-EXMSG-C115.redmond.corp.microsoft.com> C.J. Adams-Collier: > I see that the Ruby.StandardLibrary.RubySocket is implemented in C#. > Is it common to write the core in C#? Has anything been written in > Ruby itself? Our guideline is: if it was written in C in MRI, we're writing in C#. Thanks, -John From ksunair at yahoo.com Wed May 7 10:35:03 2008 From: ksunair at yahoo.com (Unnikrishnan Nair) Date: Wed, 7 May 2008 07:35:03 -0700 (PDT) Subject: [Ironruby-core] Trouble opening IronRuby.sln Message-ID: <58737.3331.qm@web50610.mail.re2.yahoo.com> Thanks. Hopefully who ever had the problem get the answer as well. ----- Original Message ---- From: Peter Bacon Darwin To: ironruby-core at rubyforge.org Sent: Wednesday, May 7, 2008 9:26:18 AM Subject: Re: [Ironruby-core] Trouble opening IronRuby.sln This is a Subversion conflict. When you did an SVN Update you should have been told that these files were in a conflicted state. The notation below basically says that your local copy looks like the first line and the copy from revision 101 looks like the second line. In other words you have changed a line in the file that has also been changed in the 101 revision. You need to fix the conflict by hand somehow, depending upon what SVN client you use, which is basically what you did by putting in the correct project reference. Take a look at the SVN book for more information: http://svnbook.red-bean.com/ Pete From:ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Unnikrishnan Nair Sent: Wednesday,07 May 07, 2008 15:15 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Trouble opening IronRuby.sln I am not sure anyone looked at this issue. I was able to open the project successfully in my laptop and this morning, when I tried in mydesktop I got the same error (I am using VS2008). This is what I found, 5 different project has following entries <<<<<<< .mine ======= >>>>>>> .r101 By removing and putting the proper ProjectReference I was able to compile it successfully. Thanks, ----- Original Message ---- From: John Lam (IRONRUBY) To: "ironruby-core at rubyforge.org" Sent: Wednesday, May 7, 2008 12:17:42 AM Subject: Re: [Ironruby-core] Trouble opening IronRuby.sln Aaron Blondeau: > I am having trouble opening the latest (rev 101) IronRuby with > VisualStudio 2005. Nothing happens at all when I try to open > IronRuby.sln - not even an error message. I have been able to open > the individual .csproj files by themselves and get everything put > together, just not the top level .sln file. Is it expected that the > source will still work with VS2005 or do I need to move to VS2008 or > could my issue be something else? I know I don't have any problems opening with VS 2008. Is anyone else on the list still using VS 2005? Thanks, -John _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: From jflam at microsoft.com Wed May 7 10:35:38 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Wed, 7 May 2008 07:35:38 -0700 Subject: [Ironruby-core] MutableString == operator In-Reply-To: <002401c8b047$9fb169b0$df143d10$@com> References: <002401c8b047$9fb169b0$df143d10$@com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D92E593AF@NA-EXMSG-C115.redmond.corp.microsoft.com> Peter Bacon Darwin: > I just noticed that MutableString does not implement the == operator > (and of course != operator). This was an oversight ... but since Tomas is rewriting MutableString this week to support byte arrays and char arrays, let's hold off on these changes until later this week. Thanks, -John From jflam at microsoft.com Wed May 7 10:38:14 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Wed, 7 May 2008 07:38:14 -0700 Subject: [Ironruby-core] Code Review: socket2 In-Reply-To: <000f01c8b023$86030d30$92092790$@com> References: <372109E149E8084D8E6C7D9CFD82E0632D92D92695@NA-EXMSG-C115.redmond.corp.microsoft.com> <001b01c8af9d$70c95c70$525c1550$@com> <372109E149E8084D8E6C7D9CFD82E0632D92E592CA@NA-EXMSG-C115.redmond.corp.microsoft.com> <000f01c8b023$86030d30$92092790$@com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D92E593B4@NA-EXMSG-C115.redmond.corp.microsoft.com> Peter Bacon Darwin: > The .NET Socket library is a fairly thin layer that sits on top of > WinSock. > Clearly Silverlight would not be able to do this since WinSock is not a > standard API on other OSes. Also, Silverlight is going to have > additional security restrictions that would prevent much of the Socket > library from work anyway. > > To be honest, even the full .NET Framework socket implementation does > not fully support all the features required by the Ruby socket library. > I have been struggling to get the Socket class working - it is not > pretty. Do you think it would be worthwhile to just have folks use the .NET Socket support in Silverlight and not bother having a "ruby" socket implementation? In this case I still have to figure out how to conditionally compile stuff against the same Initializer.Generated.cs - I might have to add a pre-build step to force its generation. Thanks, -John From michael.letterle at gmail.com Wed May 7 10:48:46 2008 From: michael.letterle at gmail.com (Michael Letterle) Date: Wed, 7 May 2008 10:48:46 -0400 Subject: [Ironruby-core] Code Review: socket2 In-Reply-To: <003401c8b04f$430f99e0$c92ecda0$@com> References: <372109E149E8084D8E6C7D9CFD82E0632D92D92695@NA-EXMSG-C115.redmond.corp.microsoft.com> <001b01c8af9d$70c95c70$525c1550$@com> <372109E149E8084D8E6C7D9CFD82E0632D92E592CA@NA-EXMSG-C115.redmond.corp.microsoft.com> <000f01c8b023$86030d30$92092790$@com> <252492C6-74B2-4E92-8035-B7607A81BF34@colliertech.org> <003401c8b04f$430f99e0$c92ecda0$@com> Message-ID: As an example, I tried this with the zlib library initially (well not the interop, just pure ruby). The result of which is Zliby ( http://zliby.rubyforge.org/), however the performance was so abysmial it pretty much had to be rewritten in C# for it to be functional. On Wed, May 7, 2008 at 10:33 AM, Peter Bacon Darwin < bacondarwin at googlemail.com> wrote: > The majority if not all of the IronRuby libraries have been written in C# > so > far. There have been discussions about this on the mailing list before. > > There are a number of Ruby libraries that have been written in Ruby. Once > IronRuby is fully compliant then it should be able to load these and run > them straight up. > > Obviously stuff that cannot be written in Ruby (such as accessing hardware > devices and so on) has to be written in something else. In CRuby these > libraries are written in C. In IronRuby these are written in a .NET > language (i.e. C#). > > That being said, since IronRuby provides .NET interop then it is > conceivable > to write a Ruby library in Ruby and bounce out to the .NET framework > classes > as necessary. Obviously performance issues must be taken into account. > Also, there are issues discussed recently about packaging up such Ruby > libraries when deploying to Silverlight. > > Pete > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of C.J. > Adams-Collier > Sent: Wednesday,07 May 07, 2008 15:10 > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Code Review: socket2 > > I see that the Ruby.StandardLibrary.RubySocket is implemented in C#. > Is it common to write the core in C#? Has anything been written in > Ruby itself? > > Sorry for the newbie question... is there a FAQ for this type of > situation? > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -- Michael Letterle [Polymath Prokrammer] http://blog.prokrams.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.letterle at gmail.com Wed May 7 10:50:23 2008 From: michael.letterle at gmail.com (Michael Letterle) Date: Wed, 7 May 2008 10:50:23 -0400 Subject: [Ironruby-core] Code Review: socket2 In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D92E593B4@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <372109E149E8084D8E6C7D9CFD82E0632D92D92695@NA-EXMSG-C115.redmond.corp.microsoft.com> <001b01c8af9d$70c95c70$525c1550$@com> <372109E149E8084D8E6C7D9CFD82E0632D92E592CA@NA-EXMSG-C115.redmond.corp.microsoft.com> <000f01c8b023$86030d30$92092790$@com> <372109E149E8084D8E6C7D9CFD82E0632D92E593B4@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: /ideally/ we would be able to use RUBY_PLATFORM or some such to determine if we were on silverlight or not. We could have a socket.rb that loads the functions differently depending on the platform (and throws not implements if it's not applicable to Silverlight). On Wed, May 7, 2008 at 10:38 AM, John Lam (IRONRUBY) wrote: > Peter Bacon Darwin: > > > The .NET Socket library is a fairly thin layer that sits on top of > > WinSock. > > Clearly Silverlight would not be able to do this since WinSock is not a > > standard API on other OSes. Also, Silverlight is going to have > > additional security restrictions that would prevent much of the Socket > > library from work anyway. > > > > To be honest, even the full .NET Framework socket implementation does > > not fully support all the features required by the Ruby socket library. > > I have been struggling to get the Socket class working - it is not > > pretty. > > Do you think it would be worthwhile to just have folks use the .NET Socket > support in Silverlight and not bother having a "ruby" socket implementation? > In this case I still have to figure out how to conditionally compile stuff > against the same Initializer.Generated.cs - I might have to add a pre-build > step to force its generation. > > Thanks, > -John > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -- Michael Letterle [Polymath Prokrammer] http://blog.prokrams.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From cjac at colliertech.org Wed May 7 12:10:03 2008 From: cjac at colliertech.org (C.J. Adams-Collier) Date: Wed, 07 May 2008 09:10:03 -0700 Subject: [Ironruby-core] Code Review: socket2 In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D92E593B4@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <372109E149E8084D8E6C7D9CFD82E0632D92D92695@NA-EXMSG-C115.redmond.corp.microsoft.com> <001b01c8af9d$70c95c70$525c1550$@com> <372109E149E8084D8E6C7D9CFD82E0632D92E592CA@NA-EXMSG-C115.redmond.corp.microsoft.com> <000f01c8b023$86030d30$92092790$@com> <372109E149E8084D8E6C7D9CFD82E0632D92E593B4@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <1210176603.29110.276.camel@cjac.intra.cardomain.com> On Wed, 2008-05-07 at 07:38 -0700, John Lam (IRONRUBY) wrote: > Peter Bacon Darwin: > > > The .NET Socket library is a fairly thin layer that sits on top of > > WinSock. > > Clearly Silverlight would not be able to do this since WinSock is not a > > standard API on other OSes. Also, Silverlight is going to have > > additional security restrictions that would prevent much of the Socket > > library from work anyway. > > > > To be honest, even the full .NET Framework socket implementation does > > not fully support all the features required by the Ruby socket library. > > I have been struggling to get the Socket class working - it is not > > pretty. > > Do you think it would be worthwhile to just have folks use the .NET Socket support in Silverlight and not bother having a "ruby" socket implementation? In this case I still have to figure out how to conditionally compile stuff against the same Initializer.Generated.cs - I might have to add a pre-build step to force its generation. > > Thanks, > -John Did you say PreBuild? -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From cjac at colliertech.org Wed May 7 12:14:41 2008 From: cjac at colliertech.org (C.J. Adams-Collier) Date: Wed, 07 May 2008 09:14:41 -0700 Subject: [Ironruby-core] Code Review: socket2 In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D92E593AC@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <372109E149E8084D8E6C7D9CFD82E0632D92D92695@NA-EXMSG-C115.redmond.corp.microsoft.com> <001b01c8af9d$70c95c70$525c1550$@com> <372109E149E8084D8E6C7D9CFD82E0632D92E592CA@NA-EXMSG-C115.redmond.corp.microsoft.com> <000f01c8b023$86030d30$92092790$@com> <252492C6-74B2-4E92-8035-B7607A81BF34@colliertech.org> <372109E149E8084D8E6C7D9CFD82E0632D92E593AC@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <1210176881.29110.280.camel@cjac.intra.cardomain.com> On Wed, 2008-05-07 at 07:34 -0700, John Lam (IRONRUBY) wrote: > C.J. Adams-Collier: > > > I see that the Ruby.StandardLibrary.RubySocket is implemented in C#. > > Is it common to write the core in C#? Has anything been written in > > Ruby itself? > > Our guideline is: if it was written in C in MRI, we're writing in C#. > > Thanks, > -John Sounds reasonable. Any thoughts on using the 'cil' back-end for gcc to emit IL placeholders until there are enough free tuits to implement in C#? -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From jflam at microsoft.com Wed May 7 12:40:58 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Wed, 7 May 2008 09:40:58 -0700 Subject: [Ironruby-core] Code Review: socket2 In-Reply-To: <1210176881.29110.280.camel@cjac.intra.cardomain.com> References: <372109E149E8084D8E6C7D9CFD82E0632D92D92695@NA-EXMSG-C115.redmond.corp.microsoft.com> <001b01c8af9d$70c95c70$525c1550$@com> <372109E149E8084D8E6C7D9CFD82E0632D92E592CA@NA-EXMSG-C115.redmond.corp.microsoft.com> <000f01c8b023$86030d30$92092790$@com> <252492C6-74B2-4E92-8035-B7607A81BF34@colliertech.org> <372109E149E8084D8E6C7D9CFD82E0632D92E593AC@NA-EXMSG-C115.redmond.corp.microsoft.com> <1210176881.29110.280.camel@cjac.intra.cardomain.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D92E594CF@NA-EXMSG-C115.redmond.corp.microsoft.com> C.J. Adams-Collier: > Sounds reasonable. Any thoughts on using the 'cil > ' back-end for gcc to emit IL > placeholders until there are enough free tuits to implement in C#? > I doubt that would generate verifiable CIL, so it's a non-starter for most of the things that we're (especially Silverlight). Thanks, -John From cjac at colliertech.org Wed May 7 16:13:12 2008 From: cjac at colliertech.org (C.J. Adams-Collier) Date: Wed, 07 May 2008 13:13:12 -0700 Subject: [Ironruby-core] build problems (mono, gmcs from svn) In-Reply-To: <1210107528.29110.238.camel@cjac.intra.cardomain.com> References: <1210090007.29110.236.camel@cjac.intra.cardomain.com> <372109E149E8084D8E6C7D9CFD82E0632D92E58DDF@NA-EXMSG-C115.redmond.corp.microsoft.com> <1210107528.29110.238.camel@cjac.intra.cardomain.com> Message-ID: <1210191192.29110.297.camel@cjac.intra.cardomain.com> Failing test case submitted to mono svn. It should show up in anonsvn in the next 30 or so. http://anonsvn.mono-project.com/source/trunk/mcs/tests/ChangeLog http://anonsvn.mono-project.com/source/trunk/mcs/tests/gtest-395.cs Cheers, C.J. On Tue, 2008-05-06 at 13:58 -0700, C.J. Adams-Collier wrote: > On Tue, 2008-05-06 at 09:51 -0700, John Lam (IRONRUBY) wrote: > > C.J. Adams-Collier: > > > > > I believe these are new bugs that our latest revision revealed in mono. https://bugzilla.novell.com/show_bug.cgi?id=387040 > > Thanks, John. I'll ping Marek and see if he can help me fix this. If > nothing else, I'll add the test from that bug to the regression suite. > > > It's good to see that Tony's taken over the mantle of breaking mono :) > > > > Thanks, > > -John > > Cheers, > > C.J. > _______________________________________________ > 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: This is a digitally signed message part URL: From bacondarwin at googlemail.com Wed May 7 16:36:50 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Wed, 7 May 2008 21:36:50 +0100 Subject: [Ironruby-core] Code Review: socket2 In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D92E593B4@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <372109E149E8084D8E6C7D9CFD82E0632D92D92695@NA-EXMSG-C115.redmond.corp.microsoft.com> <001b01c8af9d$70c95c70$525c1550$@com> <372109E149E8084D8E6C7D9CFD82E0632D92E592CA@NA-EXMSG-C115.redmond.corp.microsoft.com> <000f01c8b023$86030d30$92092790$@com> <372109E149E8084D8E6C7D9CFD82E0632D92E593B4@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <005f01c8b082$14e92580$3ebb7080$@com> This seems reasonable to me but then I am not a seasoned Ruby Sockets user so I don't know what level of support developers would expect. Certainly for a first release I don't see why we couldn't get away without Ruby Sockets support on Silverlight. I doubt anyone coding up a Silverlight Ruby app is going to worry that their code is portable to non-IronRuby platform. The big question is whether there are any libraries that require the Ruby Socket library that might be of use to people writing Silverlight apps. Pete -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of John Lam (IRONRUBY) Sent: Wednesday,07 May 07, 2008 15:38 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review: socket2 Peter Bacon Darwin: > The .NET Socket library is a fairly thin layer that sits on top of > WinSock. > Clearly Silverlight would not be able to do this since WinSock is not a > standard API on other OSes. Also, Silverlight is going to have > additional security restrictions that would prevent much of the Socket > library from work anyway. > > To be honest, even the full .NET Framework socket implementation does > not fully support all the features required by the Ruby socket library. > I have been struggling to get the Socket class working - it is not > pretty. Do you think it would be worthwhile to just have folks use the .NET Socket support in Silverlight and not bother having a "ruby" socket implementation? In this case I still have to figure out how to conditionally compile stuff against the same Initializer.Generated.cs - I might have to add a pre-build step to force its generation. Thanks, -John _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From Shri.Borde at microsoft.com Wed May 7 17:52:35 2008 From: Shri.Borde at microsoft.com (Shri Borde) Date: Wed, 7 May 2008 14:52:35 -0700 Subject: [Ironruby-core] Welcome Curt to the IronPython team In-Reply-To: <482162F9.8060606@voidspace.org.uk> References: <4811EFE4.7060605@voidspace.org.uk> <4811F7CA.2010003@voidspace.org.uk> <48120A1F.1010004@voidspace.org.uk> <482162F9.8060606@voidspace.org.uk> Message-ID: <50B69702CA6E6D4E849D30CD4989AB8EE7AC60C60F@DF-GRTDANE-MSG.exchange.corp.microsoft.com> That was subtle indeed. So to fix that, I am pleased to welcome Curt to the IronPython team. Curt has been active in both the IronPython and IronRuby mailing lists, and we are excited to have him officially be working on these projects. Curt already has a fix in socket support which he should be checking in shortly. This might be the second-fastest checkin for a new dev. Dino had checked in as part of his interview even before he joined the team, but I can't really hold this against Curt since we couldn't accept his patches before :) Curt will be spending sometime initially on IronRuby too. Thanks, Shri Want to work on IronPython, IronRuby, F#? Visit http://blogs.msdn.com/ironpython -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord Sent: Wednesday, May 07, 2008 1:06 AM To: Discussion of IronPython Subject: Re: [IronPython] socket support in 1.1.2 Curt Hagenlocher wrote: > Well, Dino tells me that they can't accept any contributions from > outside Microsoft. So in order to best serve the IronPython > community, I've taken the arguably extreme step of joining the > IronPython team as a developer just to be able to commit this change. > Afterwards, I expect to stick around for a while and work on Visual > Studio integration. That's a subtle announcement Curt. Congratulations to you and the ongoing success of IronPython! :-D (I'm interested in the progress of Coils as well - and have an interesting idea for it, but I need to finish my book first...) Michael Foord > > I still expect to be working on my "wrapper" project after hours -- > I've been quiet about it recently largely because I got sidetracked by > an attempt to add p/invoke support. Expect something new in the next > week or so. > > On Fri, Apr 25, 2008 at 9:43 AM, Michael Foord > > wrote: > > Curt Hagenlocher wrote: > > > > I've attached a patch against 1.1.1 that (I think) fixes this. It > > works for my test case, anyway. > > > > > > We currently ship Microsoft binaries rather than compiling from > source - > so we'd rather wait for 1.1.2 than patch at this stage... but thanks. > > Michael > > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From robert.brotherus at napa.fi Thu May 8 08:41:02 2008 From: robert.brotherus at napa.fi (Robert Brotherus) Date: Thu, 8 May 2008 15:41:02 +0300 Subject: [Ironruby-core] Code Review: RubyScopeDebugView References: Message-ID: <53194650933664488F3F0C3A0AB5683245C152@nw60.napa.fi> Thanks for the quick patch Tomas, works fine! I found it even more useful when I changed the DebuggerBrowsableState of the values to Collapsed (was Never) in RubyScope.cs. With this I can expand and see values of ruby-arrays (otherwise the debugger just shows for arrays "{Ruby.Builtins.RubyArray}" that is not very useful in itself and cannot be expanded): [DebuggerDisplay("{_value}", Name = "{_name,nq}", Type = "{_valueClassName,nq}")] internal struct VariableView { [DebuggerBrowsable(DebuggerBrowsableState.Never)] private readonly string/*!*/ _name; [DebuggerBrowsable(DebuggerBrowsableState.Collapsed)] // Was: Never private readonly object _value; [DebuggerBrowsable(DebuggerBrowsableState.Never)] private readonly string/*!*/ _valueClassName; public VariableView(string/*!*/ name, object value, string/*!*/ valueClassName) { _name = name; _value = value; _valueClassName = valueClassName; } } Robert Brotherus Software architect Napa Ltd Tammasaarenkatu 3, Helsinki FI-00180 P.O.Box 470, Helsinki FI-00181 Tel. +358 9 22 813 1 Direct. +358 9 22 813 611 GSM +358 45 11 456 02 Fax. +358 9 22 813 800 Email: Robert.Brotherus at napa.fi www.napa.fi _____ From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek Sent: 6. toukokuuta 2008 10:34 To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: [Ironruby-core] Code Review: RubyScopeDebugView tfpt review /shelveset:RubyScopeDebugView;REDMOND\tomat Implements DebuggerProxyType for RubyScope so that locals and scope attributes display nicely in watches. def foo a = 1 b = 2 1.times { c = a + b } end foo Notice the Ruby class name in the third column 8-) Tomas -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 16278 bytes Desc: image001.png URL: From bacondarwin at googlemail.com Thu May 8 08:47:02 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Thu, 8 May 2008 13:47:02 +0100 Subject: [Ironruby-core] Forgetting MutableString Message-ID: <003f01c8b109$9dced8e0$d96c8aa0$@com> I keep forgetting to wrap up CLR strings in MutableStrings when returning strings retrieved from calls to .NET Framework library methods. I had this RSpec that had something like: some_array[3].should == "some mutable string" that was failing with the error: Expected "some mutable string" to equal "some mutable string": It would be great if there were some way of picking this up, possibly at compile time (possibly with SpecSharp??) or may be more simply changing the way a CLR string is printed in the console so that it is different from a MutableString. For instance how about a CLR string being printed out as <> or or something. This could be a debug thing only if you wanted. Then the error message would be: Expected <> to equal "some mutable string" Which makes it more clear what is wrong, even if you don't know the convention. [I realise that I ought to just check that the class of the some_array[3] was actually String in the first place but this would still help.] [Also, I realise that there is no implicit conversion between CLR string and MutableString, so if the method was typed to return a MutableString then this would not compile, but Ruby doesn't half like having stuff returned in arrays, so you lose the strong typing] Pete -------------- next part -------------- An HTML attachment was scrubbed... URL: From robert.brotherus at napa.fi Thu May 8 08:55:49 2008 From: robert.brotherus at napa.fi (Robert Brotherus) Date: Thu, 8 May 2008 15:55:49 +0300 Subject: [Ironruby-core] Forgetting MutableString References: <003f01c8b109$9dced8e0$d96c8aa0$@com> Message-ID: <53194650933664488F3F0C3A0AB5683245C166@nw60.napa.fi> I would guess that IR-teams plan is to implement auto-wrapping of strings coming from DotNet as MutableStrings? At least I hope so since that would get rid of my code of extensive to_s calls from parameters / values coming from C# :-) Robert Brotherus Software architect Napa Ltd _____ From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Peter Bacon Darwin Sent: 8. toukokuuta 2008 15:47 To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Forgetting MutableString I keep forgetting to wrap up CLR strings in MutableStrings when returning strings retrieved from calls to .NET Framework library methods. -------------- next part -------------- An HTML attachment was scrubbed... URL: From steve.eichert at gmail.com Thu May 8 09:06:12 2008 From: steve.eichert at gmail.com (Steve Eichert) Date: Thu, 8 May 2008 09:06:12 -0400 Subject: [Ironruby-core] Forgetting MutableString In-Reply-To: <53194650933664488F3F0C3A0AB5683245C166@nw60.napa.fi> References: <003f01c8b109$9dced8e0$d96c8aa0$@com> <53194650933664488F3F0C3A0AB5683245C166@nw60.napa.fi> Message-ID: I wasn't a fan of all the calls to to_s either so I put together a small patch (which undoubtedly is nothing like what the actual fix is going to be) to relieve my pains. The bug I submitted along with a patch I made locally can be found at: http://rubyforge.org/tracker/?func=detail&aid=19873&group_id=4359&atid=16798 Cheers, Steve On Thu, May 8, 2008 at 8:55 AM, Robert Brotherus wrote: > I would guess that IR-teams plan is to implement auto-wrapping of strings > coming from DotNet as MutableStrings? > > At least I hope so since that would get rid of my code of extensive *to_s*calls from parameters / values coming from C# :-) > * > > Robert Brotherus > *Software architect > *Napa Ltd > * > > ------------------------------ > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Peter Bacon Darwin > *Sent:* 8. toukokuuta 2008 15:47 > *To:* ironruby-core at rubyforge.org > *Subject:* [Ironruby-core] Forgetting MutableString > > I keep forgetting to wrap up CLR strings in MutableStrings when returning > strings retrieved from calls to .NET Framework library methods. > > > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bacondarwin at googlemail.com Thu May 8 09:29:42 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Thu, 8 May 2008 14:29:42 +0100 Subject: [Ironruby-core] Forgetting MutableString In-Reply-To: References: <003f01c8b109$9dced8e0$d96c8aa0$@com> <53194650933664488F3F0C3A0AB5683245C166@nw60.napa.fi> Message-ID: <005501c8b10f$942975b0$bc7c6110$@com> The trouble is that MutableStrings and CLR Strings are (going to be, if not already) quite different creatures. For a start the CLR string is always UTF-16, while the MutableString is basically just an array of bytes, which can be interpreted in different ways depending on the K-Code you are using. In order to compare these two kinds of strings you need an intelligent comparer that understands what locale you are working against. I understand that Tomas is working on a version of MutableString that has a hybrid internal organisation to enable easy cooperation with CLR strings while maintaining compatibility with Ruby strings (hopefully without losing out in performance). Pete From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Steve Eichert Sent: Thursday,08 May 08, 2008 14:06 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Forgetting MutableString I wasn't a fan of all the calls to to_s either so I put together a small patch (which undoubtedly is nothing like what the actual fix is going to be) to relieve my pains. The bug I submitted along with a patch I made locally can be found at: http://rubyforge.org/tracker/?func=detail &aid=19873&group_id=4359&atid=16798 Cheers, Steve On Thu, May 8, 2008 at 8:55 AM, Robert Brotherus wrote: I would guess that IR-teams plan is to implement auto-wrapping of strings coming from DotNet as MutableStrings? At least I hope so since that would get rid of my code of extensive to_s calls from parameters / values coming from C# :-) Robert Brotherus Software architect Napa Ltd _____ From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Peter Bacon Darwin Sent: 8. toukokuuta 2008 15:47 To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Forgetting MutableString I keep forgetting to wrap up CLR strings in MutableStrings when returning strings retrieved from calls to .NET Framework library methods. _______________________________________________ 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 steve.eichert at gmail.com Thu May 8 09:36:02 2008 From: steve.eichert at gmail.com (Steve Eichert) Date: Thu, 8 May 2008 09:36:02 -0400 Subject: [Ironruby-core] generic and non generic type with the same name Message-ID: IronRuby seems to be having a problem resolving a generic type when a non generic type with the same name exists. The specific example that I discovered the bug with is when trying to using Moq [1]. describe "some class with a mock" do it "should use the mock" do mock = Mock.of(IMyMock).new my_class = MyClass.new(mock) // ... test stuff end end Moq has a generic and non generic version of the Mock class. When I try and run the code above it tells me that Moq.Mock is not a generic type. After digging through the code a bit it looks like this should be handled my Microsoft.Scripting.Action.TypeGroup. I haven't been able to uncover where IronRuby makes use of this as of yet. Is this a known bug, or should I submit a bug on rubyforge...or am I doing something wrong? [1] http://code.google.com/p/moq/ Cheers, Steve -------------- next part -------------- An HTML attachment was scrubbed... URL: From jflam at microsoft.com Thu May 8 09:56:24 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Thu, 8 May 2008 06:56:24 -0700 Subject: [Ironruby-core] generic and non generic type with the same name In-Reply-To: References: Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D92E599B8@NA-EXMSG-C115.redmond.corp.microsoft.com> Steve Eichert: > IronRuby seems to be having a problem resolving a generic type when a > non generic type with the same name exists. The specific example that > I discovered the bug with is when trying to using Moq [1]. > > describe "some class with a mock" do > it "should use the mock" do > mock = Mock.of(IMyMock).new > my_class = MyClass.new(mock) > // ... test stuff > end > end Yep. Sorry. That's a bug. Can you open a bug please? We more or less hacked in whatever 'support' that we needed to get basic generics up and running so that we could do some Silverlight/WPF stuff. It was almost entirely on the side of consuming generic types, and this case didn't come up. As for the timeline for fixes around this stuff - it will happen post-RailsConf when we refocus on getting our .NET interop story correct. Right now we have our hands full trying to get the core language up and running. Thanks! -John From steve.eichert at gmail.com Thu May 8 10:51:56 2008 From: steve.eichert at gmail.com (Steve Eichert) Date: Thu, 8 May 2008 10:51:56 -0400 Subject: [Ironruby-core] generic and non generic type with the same name In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D92E599B8@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <372109E149E8084D8E6C7D9CFD82E0632D92E599B8@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: This issue has been reported on Rubyforge (bug #20033). Can you point me in the general direction of where things would need to change in order to get this to work so I can hack around a bit? Cheers, Steve On Thu, May 8, 2008 at 9:56 AM, John Lam (IRONRUBY) wrote: > Steve Eichert: > > > IronRuby seems to be having a problem resolving a generic type when a > > non generic type with the same name exists. The specific example that > > I discovered the bug with is when trying to using Moq [1]. > > > > describe "some class with a mock" do > > it "should use the mock" do > > mock = Mock.of(IMyMock).new > > my_class = MyClass.new(mock) > > // ... test stuff > > end > > end > > Yep. Sorry. That's a bug. Can you open a bug please? > > We more or less hacked in whatever 'support' that we needed to get basic > generics up and running so that we could do some Silverlight/WPF stuff. It > was almost entirely on the side of consuming generic types, and this case > didn't come up. > > As for the timeline for fixes around this stuff - it will happen > post-RailsConf when we refocus on getting our .NET interop story correct. > Right now we have our hands full trying to get the core language up and > running. > > Thanks! > -John > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jflam at microsoft.com Thu May 8 11:22:44 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Thu, 8 May 2008 08:22:44 -0700 Subject: [Ironruby-core] generic and non generic type with the same name In-Reply-To: References: <372109E149E8084D8E6C7D9CFD82E0632D92E599B8@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D92E59A10@NA-EXMSG-C115.redmond.corp.microsoft.com> Steve Eichert: > This issue has been reported on Rubyforge (bug #20033). Thanks! > Can you point me in the general direction of where things would need > to change in order to get this to work so I can hack around a bit? The high order bit here is that we're not delegating to the default DLR binder in our implementation as much as we will in the future. A lot of those features already exist in the DLR binder, so it's really a matter of making that happen. That said, our binder is going to undergo some major work post RailsConf. FYI - although you're more than welcome to hack around and even create patches that others can apply to their own private builds, we cannot accept patches in the core IronRuby compiler today -- libraries are the only place where we generally accept patches. Trivial patches for bug fixes are excepted from the 'no patches to IronRuby core' policy. This is why we have the distinction between IronRuby.dll vs. IronRuby.Libraries.dll Thanks, -John From steve.eichert at gmail.com Thu May 8 11:27:18 2008 From: steve.eichert at gmail.com (Steve Eichert) Date: Thu, 8 May 2008 11:27:18 -0400 Subject: [Ironruby-core] generic and non generic type with the same name In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D92E59A10@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <372109E149E8084D8E6C7D9CFD82E0632D92E599B8@NA-EXMSG-C115.redmond.corp.microsoft.com> <372109E149E8084D8E6C7D9CFD82E0632D92E59A10@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: My goal was mostly to hack around and try and get it working with the assumption that you guys would do it the right way sometime after Railsconf and I would throw my hack out. I'll dig around in the Binder to see if I can uncover anything. Thanks, Steve On Thu, May 8, 2008 at 11:22 AM, John Lam (IRONRUBY) wrote: > Steve Eichert: > > > This issue has been reported on Rubyforge (bug #20033). > > Thanks! > > > Can you point me in the general direction of where things would need > > to change in order to get this to work so I can hack around a bit? > > The high order bit here is that we're not delegating to the default DLR > binder in our implementation as much as we will in the future. A lot of > those features already exist in the DLR binder, so it's really a matter of > making that happen. > > That said, our binder is going to undergo some major work post RailsConf. > > FYI - although you're more than welcome to hack around and even create > patches that others can apply to their own private builds, we cannot accept > patches in the core IronRuby compiler today -- libraries are the only place > where we generally accept patches. Trivial patches for bug fixes are > excepted from the 'no patches to IronRuby core' policy. This is why we have > the distinction between IronRuby.dll vs. IronRuby.Libraries.dll > > Thanks, > -John > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jflam at microsoft.com Thu May 8 11:34:45 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Thu, 8 May 2008 08:34:45 -0700 Subject: [Ironruby-core] Forgetting MutableString In-Reply-To: <005501c8b10f$942975b0$bc7c6110$@com> References: <003f01c8b109$9dced8e0$d96c8aa0$@com> <53194650933664488F3F0C3A0AB5683245C166@nw60.napa.fi> <005501c8b10f$942975b0$bc7c6110$@com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D92E59A28@NA-EXMSG-C115.redmond.corp.microsoft.com> Peter Bacon Darwin: > I understand that Tomas is working on a version of MutableString that > has a hybrid internal organisation to enable easy cooperation with CLR > strings while maintaining compatibility with Ruby strings (hopefully > without losing out in performance). Yes- Tomas is working on a new MutableString this week. The idea is to avoid perf hits in the general case (eg a byte string is created and you are doing byte-string like things to it). However we will lazy eval conversions to other string types where necessary. Not sure where things will line up when the new implementation shows up this week or next. Thanks, -John From jflam at microsoft.com Thu May 8 11:35:59 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Thu, 8 May 2008 08:35:59 -0700 Subject: [Ironruby-core] Forgetting MutableString In-Reply-To: <53194650933664488F3F0C3A0AB5683245C166@nw60.napa.fi> References: <003f01c8b109$9dced8e0$d96c8aa0$@com> <53194650933664488F3F0C3A0AB5683245C166@nw60.napa.fi> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D92E59A2E@NA-EXMSG-C115.redmond.corp.microsoft.com> Robert Brotherus: > At least I hope so since that would get rid of my code of extensive > to_s calls from parameters / values coming from C# :-) Robert > Brotherus Software architect Napa Ltd Yes - your to_s hacks should go away :) Thanks, -John From ksunair at yahoo.com Thu May 8 11:52:18 2008 From: ksunair at yahoo.com (Unnikrishnan Nair) Date: Thu, 8 May 2008 08:52:18 -0700 (PDT) Subject: [Ironruby-core] TDD in coding! Message-ID: <767132.45267.qm@web50612.mail.re2.yahoo.com> Are we developing the code in TDD style with CI? Currently all the methods I have added, I have a seperate ruby code which runs test against to verify my results. I would like to know are we adding the tests build into the code itself? Sorry, I didn't see the test cases, thats why I asked. Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From chrisortman at gmail.com Thu May 8 11:53:08 2008 From: chrisortman at gmail.com (Chris Ortman) Date: Thu, 8 May 2008 10:53:08 -0500 Subject: [Ironruby-core] running tests on server 2008 Message-ID: Is anyone using windows server 2008 for ruby / ironruby? I am trying to run rake rspec and get an error when it gets to the summary: Q:\ironruby>rake rspec (in Q:/ironruby) ./chdir_spec.rb:19: warning: conflicting chdir during another chdir block ./chdir_spec.rb:10: warning: conflicting chdir during another chdir block ./chdir_spec.rb:24: warning: conflicting chdir during another chdir block ./chdir_spec.rb:10: warning: conflicting chdir during another chdir block ./chdir_spec.rb:10: warning: conflicting chdir during another chdir block ./chdir_spec.rb:10: warning: conflicting chdir during another chdir block ./chdir_spec.rb:10: warning: conflicting chdir during another chdir block ./shared/glob.rb:6: warning: conflicting chdir during another chdir block ./shared/glob.rb:119: warning: conflicting chdir during another chdir block ./shared/glob.rb:6: warning: conflicting chdir during another chdir block ./shared/glob.rb:119: warning: conflicting chdir during another chdir block ./glob_spec.rb:10: warning: conflicting chdir during another chdir block ./glob_spec.rb:52: warning: conflicting chdir during another chdir block 499 examples, 99 failures rake aborted! Command failed with status (99): ["ruby.exe" spec_runner.rb - - summary...] Q:/ironruby/rakefile:234:in `invoke_spec' (See full trace by running task with --trace) Q:\ironruby> Thanks From jflam at microsoft.com Thu May 8 12:18:22 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Thu, 8 May 2008 09:18:22 -0700 Subject: [Ironruby-core] TDD in coding! In-Reply-To: <767132.45267.qm@web50612.mail.re2.yahoo.com> References: <767132.45267.qm@web50612.mail.re2.yahoo.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D92F04C80@NA-EXMSG-C115.redmond.corp.microsoft.com> Unnikrishnan Nair: > Are we developing the code in TDD style with CI? Currently all the > methods I have added, I have a seperate ruby code which runs test > against to verify my results. I would like to know are we adding the > tests build into the code itself? Sorry, I didn't see the test cases, > thats why I asked. Thanks to the awesome work by the rubinius team, if you're working on the libraries, you're effectively working test-first. The tests live in tests\specs\core\* today. When Jim finishes his work on getting the rubinius specs running they'll move somewhere else. Thanks, -John From jflam at microsoft.com Thu May 8 12:20:48 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Thu, 8 May 2008 09:20:48 -0700 Subject: [Ironruby-core] running tests on server 2008 In-Reply-To: References: Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D92F04C87@NA-EXMSG-C115.redmond.corp.microsoft.com> Chris Ortman: > Q:\ironruby>rake rspec > (in Q:/ironruby) > ./chdir_spec.rb:19: warning: conflicting chdir during another chdir > block > ... > 499 examples, 99 failures > rake aborted! > Command failed with status (99): ["ruby.exe" spec_runner.rb - - > summary...] Q:/ironruby/rakefile:234:in `invoke_spec' Using my psychic debugging skills, this might have something to do with the drive letter vs. it being a Win2K8 issue. We still have to spend some time thinking about how to deal with paths correctly in IronRuby. Thanks, -John From jflam at microsoft.com Thu May 8 12:22:53 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Thu, 8 May 2008 09:22:53 -0700 Subject: [Ironruby-core] Forgetting MutableString In-Reply-To: <003f01c8b109$9dced8e0$d96c8aa0$@com> References: <003f01c8b109$9dced8e0$d96c8aa0$@com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D92F04C8B@NA-EXMSG-C115.redmond.corp.microsoft.com> Peter Bacon Darwin: > I keep forgetting to wrap up CLR strings in MutableStrings when > returning strings retrieved from calls to .NET Framework library > methods. I finally understand what this is ... is this what you're looking for? public override bool Equals(object other) { if (other is MutableString) return Equals(other as MutableString); else if (other is string) return Equals(other as string); else return false; } public bool Equals(string other) { if (other == null) return false; if (_data.Length != other.Length) return false; for (int i = 0; i < _data.Length; ++i) if (_data[i] != other[i]) return false; return true; } public bool Equals(MutableString other) { if (ReferenceEquals(this, other)) return true; if (other == null) return false; if (_data.Length != other.Length) return false; for (int i = 0; i < _data.Length; ++i) if (_data[i] != other.Chars[i]) return false; return true; } If so, it's coming in the next release. Thanks, -John From ksunair at yahoo.com Thu May 8 14:51:00 2008 From: ksunair at yahoo.com (Unnikrishnan Nair) Date: Thu, 8 May 2008 11:51:00 -0700 (PDT) Subject: [Ironruby-core] TDD in coding! Message-ID: <766077.27480.qm@web50610.mail.re2.yahoo.com> Thanks, How do I go about sending the code changes I made? I would like to submit a small changes first and get the feedback and then I can go full blown development. I just finished 10 functions that passed my full test. Thanks. ----- Original Message ---- From: John Lam (IRONRUBY) To: "ironruby-core at rubyforge.org" Sent: Thursday, May 8, 2008 11:18:22 AM Subject: Re: [Ironruby-core] TDD in coding! Unnikrishnan Nair: > Are we developing the code in TDD style with CI? Currently all the > methods I have added, I have a seperate ruby code which runs test > against to verify my results. I would like to know are we adding the > tests build into the code itself? Sorry, I didn't see the test cases, > thats why I asked. Thanks to the awesome work by the rubinius team, if you're working on the libraries, you're effectively working test-first. The tests live in tests\specs\core\* today. When Jim finishes his work on getting the rubinius specs running they'll move somewhere else. Thanks, -John _______________________________________________ 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 Thu May 8 14:56:48 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Thu, 8 May 2008 11:56:48 -0700 Subject: [Ironruby-core] Code Review: Reflection Message-ID: tfpt review /shelveset:Reflection;REDMOND\tomat Removes singleton classes from Module#ancestors return value to match MRI. Implements Kernel#extend, Kernel#singleton_methods, Module#extended and Module#extend_object. Fixes [#20002] singleton_methods not implemented. Fixes [#19972] Module::module_function assertion error. The assertion was incorrect. Fixes [#20011] Can't subclass module. Added protected constructors to allow inheriting in Ruby. Includes adjusted Wayne Kelly's patch. Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: Reflection.diff Type: application/octet-stream Size: 26355 bytes Desc: Reflection.diff URL: From jflam at microsoft.com Thu May 8 16:17:46 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Thu, 8 May 2008 13:17:46 -0700 Subject: [Ironruby-core] TDD in coding! In-Reply-To: <766077.27480.qm@web50610.mail.re2.yahoo.com> References: <766077.27480.qm@web50610.mail.re2.yahoo.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D92F04EB2@NA-EXMSG-C115.redmond.corp.microsoft.com> Unnikrishnan Nair: > Thanks, How do I go about sending the code changes I made? I would > like to submit a small changes first and get the feedback and then I > can go full blown development. I just finished 10 functions that > passed my full test. Please generate a patch and submit to Rubyforge: http://rubyforge.org/tracker/?atid=16800&group_id=4359&func=browse BTW, can you see if it passes the Rubinius specs too? rake spec file coverage Thanks, -John From jflam at microsoft.com Thu May 8 16:37:58 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Thu, 8 May 2008 13:37:58 -0700 Subject: [Ironruby-core] Code Review: bugfixes-7 Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D92F04ED7@NA-EXMSG-C115.redmond.corp.microsoft.com> tfpt review /shelveset:bugfixes-7;REDMOND\jflam Ruby only This shelveset fixes a number of open bugs on Rubyforge and adds some features that we need to get the latest rubinius specs running. MatchDataOps: - we used to alias MatchData to System.Text.RegularExpressions.Match. However, to fully implement MatchData we need to also hold onto a reference to the original string that we matched against. A new MatchData type was created (MatchData.cs) which wraps the existing .NET Match object. This also touches MutableStringOps.cs, RubyOps.cs, RubyScope.cs, SpecialGlobalVariableInfo.cs - finished implementing all methods. 16 out of 16 specs pass - implemented to_a which closes bug #19903 RegexpOps: - added ctor overload to close bug #19927 - made some changes to return MatchData objects instead of Match objects - made some changes to return boxed integers via RuntimeHelpers.Int32ToObject() instead of explicit boxing. This also touches MutableStringOps.cs TimeOps: - removed overloaded constructors to close bug #19956. But this exposes a new problem about Type aliasing that is described by bug 20035 (referencing a System::DateTime explicitly does not allow you to call the .NET constructors - only the Ruby-defined constructors). - fixed Time#- bug - #19955 ModuleOps: - fixed some very old bugs #15996, #15995 related to including non-sensible things (include 1, include nil). RequireNonClasses() method now throws the correct Ruby exceptions. This also touches SingletonOps.cs MutableStringOps: - added an implementation of String#rindex which closes #19904. We pass all specs except for 4 which fail because of differences between .NET regex and Ruby regex. Dir.cs: - cleaned up some code here, was about to work on glob implementation (bugs #19843 #19950, but handed off to Curt) FileOps.cs: - added an implementation of File#basename which closes #19905. passes all specs except for one which is wrong, and one which is unix-specific. These things are likely bugs in Ruby. #File.basename('baz.rb', 'z.rb').should == 'ba' -- bad test #File.basename("bar.txt.exe", ".txt.exe").should == "bar" - unix-only, should be wrapped in platform - added an implementation of File.file? to close #19949 MutableString.cs: - added a static Empty MutableString - added delegation thunks to LastIndexOf() - fixed our Equals() implementation to correctly distinguish between different types of strings (CLR vs. MutableString) File.cs: - fixes a bug related to what "w+" means in .NET. - its FileMode.OpenOrCreate Thanks, -John -------------- next part -------------- A non-text attachment was scrubbed... Name: bugfixes-7.diff Type: application/octet-stream Size: 155810 bytes Desc: bugfixes-7.diff URL: From ksunair at yahoo.com Thu May 8 16:56:54 2008 From: ksunair at yahoo.com (Unnikrishnan Nair) Date: Thu, 8 May 2008 13:56:54 -0700 (PDT) Subject: [Ironruby-core] TDD in coding! Message-ID: <821811.13718.qm@web50602.mail.re2.yahoo.com> I will do that. Thanks. ----- Original Message ---- From: John Lam (IRONRUBY) To: "ironruby-core at rubyforge.org" Sent: Thursday, May 8, 2008 3:17:46 PM Subject: Re: [Ironruby-core] TDD in coding! Unnikrishnan Nair: > Thanks, How do I go about sending the code changes I made? I would > like to submit a small changes first and get the feedback and then I > can go full blown development. I just finished 10 functions that > passed my full test. Please generate a patch and submit to Rubyforge: http://rubyforge.org/tracker/?atid=16800&group_id=4359&func=browse BTW, can you see if it passes the Rubinius specs too? rake spec file coverage Thanks, -John _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jimmy.Schementi at microsoft.com Thu May 8 17:59:39 2008 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Thu, 8 May 2008 14:59:39 -0700 Subject: [Ironruby-core] Playing around with www.ironruby.net Message-ID: <5283CA0A4168DF4FBBD71AE9ECA5A328458044387B@NA-EXMSG-C116.redmond.corp.microsoft.com> I'm trying to make http://ironruby.net take you to the same page as http://www.ironruby.net, but in the meantime both might be broken. If so, just go to http://ironruby.rubyforge.org. PS. Anyone know how to do this on GoDaddy? Extremely confusing! ~js -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.letterle at gmail.com Thu May 8 18:30:35 2008 From: michael.letterle at gmail.com (Michael Letterle) Date: Thu, 8 May 2008 18:30:35 -0400 Subject: [Ironruby-core] Playing around with www.ironruby.net In-Reply-To: <5283CA0A4168DF4FBBD71AE9ECA5A328458044387B@NA-EXMSG-C116.redmond.corp.microsoft.com> References: <5283CA0A4168DF4FBBD71AE9ECA5A328458044387B@NA-EXMSG-C116.redmond.corp.microsoft.com> Message-ID: Yeah, add some custom DNS servers and use a real DNS management tool ;) Seriously though, click on the domain, click on the "Total DNS Control and MX Records" Look at the A record, make sure the A record points to the same host as the CNAME record for 'www' (or both A records if there's two). Usually you have the A record that points to the site and a CNAME record that points to the A record... On Thu, May 8, 2008 at 5:59 PM, Jimmy Schementi < Jimmy.Schementi at microsoft.com> wrote: > I'm trying to make http://ironruby.net take you to the same page as > http://www.ironruby.net, but in the meantime both might be broken. If so, > just go to http://ironruby.rubyforge.org. > > > > PS. Anyone know how to do this on GoDaddy? Extremely confusing! > > > > ~js > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -- Michael Letterle [Polymath Prokrammer] http://blog.prokrams.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From ksunair at yahoo.com Thu May 8 19:42:46 2008 From: ksunair at yahoo.com (Unnikrishnan) Date: Thu, 8 May 2008 16:42:46 -0700 (PDT) Subject: [Ironruby-core] Code Review: bugfixes-7 Message-ID: <433103.82961.qm@web50605.mail.re2.yahoo.com> Hi john, I implemented both basename and file as well. But I will build a patch without those two in it after getting your update. Thanks. On May 8, 2008, at 3:37 PM, "John Lam (IRONRUBY)" wrote: tfpt review /shelveset:bugfixes-7;REDMOND\jflam Ruby only This shelveset fixes a number of open bugs on Rubyforge and adds some features that we need to get the latest rubinius specs running. MatchDataOps: - we used to alias MatchData to System.Text.RegularExpressions.Match. However, to fully implement MatchData we need to also hold onto a reference to the original string that we matched against. A new MatchData type was created (MatchData.cs) which wraps the existing .NET Match object. This also touches MutableStringOps.cs, RubyOps.cs, RubyScope.cs, SpecialGlobalVariableInfo.cs - finished implementing all methods. 16 out of 16 specs pass - implemented to_a which closes bug #19903 RegexpOps: - added ctor overload to close bug #19927 - made some changes to return MatchData objects instead of Match objects - made some changes to return boxed integers via RuntimeHelpers.Int32ToObject() instead of explicit boxing. This also touches MutableStringOps.cs TimeOps: - removed overloaded constructors to close bug #19956. But this exposes a new problem about Type aliasing that is described by bug 20035 (referencing a System::DateTime explicitly does not allow you to call the .NET constructors - only the Ruby-defined constructors). - fixed Time#- bug - #19955 ModuleOps: - fixed some very old bugs #15996, #15995 related to including non-sensible things (include 1, include nil). RequireNonClasses() method now throws the correct Ruby exceptions. This also touches SingletonOps.cs MutableStringOps: - added an implementation of String#rindex which closes #19904. We pass all specs except for 4 which fail because of differences between .NET regex and Ruby regex. Dir.cs: - cleaned up some code here, was about to work on glob implementation (bugs #19843 #19950, but handed off to Curt) FileOps.cs: - added an implementation of File#basename which closes #19905. passes all specs except for one which is wrong, and one which is unix-specific. These things are likely bugs in Ruby. #File.basename('baz.rb', 'z.rb').should == 'ba' -- bad test #File.basename("bar.txt.exe", ".txt.exe").should == "bar" - unix-only, should be wrapped in platform - added an implementation of File.file? to close #19949 MutableString.cs: - added a static Empty MutableString - added delegation thunks to LastIndexOf() - fixed our Equals() implementation to correctly distinguish between different types of strings (CLR vs. MutableString) File.cs: - fixes a bug related to what "w+" means in .NET. - its FileMode.OpenOrCreate Thanks, -John _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From dinov at exchange.microsoft.com Thu May 8 20:11:32 2008 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Thu, 8 May 2008 17:11:32 -0700 Subject: [Ironruby-core] Code Review: Reflection In-Reply-To: References: Message-ID: <7AD436E4270DD54A94238001769C2227012B2805DDC0@DF-GRTDANE-MSG.exchange.corp.microsoft.com> I think you also need to check for ci.IsFamilyAndAssembly in RubyTypeBuilder.MakeClass (when checking for private) but otherwise it looks good. -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek Sent: Thursday, May 08, 2008 11:57 AM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: [Ironruby-core] Code Review: Reflection tfpt review /shelveset:Reflection;REDMOND\tomat Removes singleton classes from Module#ancestors return value to match MRI. Implements Kernel#extend, Kernel#singleton_methods, Module#extended and Module#extend_object. Fixes [#20002] singleton_methods not implemented. Fixes [#19972] Module::module_function assertion error. The assertion was incorrect. Fixes [#20011] Can't subclass module. Added protected constructors to allow inheriting in Ruby. Includes adjusted Wayne Kelly's patch. Tomas From Tomas.Matousek at microsoft.com Thu May 8 20:28:10 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Thu, 8 May 2008 17:28:10 -0700 Subject: [Ironruby-core] Code Review: Reflection In-Reply-To: <7AD436E4270DD54A94238001769C2227012B2805DDC0@DF-GRTDANE-MSG.exchange.corp.microsoft.com> References: <7AD436E4270DD54A94238001769C2227012B2805DDC0@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: Thanks, forgot about that one. Tomas -----Original Message----- From: Dino Viehland Sent: Thursday, May 08, 2008 5:12 PM To: ironruby-core at rubyforge.org; IronRuby External Code Reviewers Subject: RE: Code Review: Reflection I think you also need to check for ci.IsFamilyAndAssembly in RubyTypeBuilder.MakeClass (when checking for private) but otherwise it looks good. -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek Sent: Thursday, May 08, 2008 11:57 AM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: [Ironruby-core] Code Review: Reflection tfpt review /shelveset:Reflection;REDMOND\tomat Removes singleton classes from Module#ancestors return value to match MRI. Implements Kernel#extend, Kernel#singleton_methods, Module#extended and Module#extend_object. Fixes [#20002] singleton_methods not implemented. Fixes [#19972] Module::module_function assertion error. The assertion was incorrect. Fixes [#20011] Can't subclass module. Added protected constructors to allow inheriting in Ruby. Includes adjusted Wayne Kelly's patch. Tomas From rbazinet at gmail.com Thu May 8 22:09:33 2008 From: rbazinet at gmail.com (Robert Bazinet) Date: Thu, 8 May 2008 22:09:33 -0400 Subject: [Ironruby-core] IronRuby r100 on Mono In-Reply-To: <5b0248170805062015h5a2212cg2e6457ea73e3a1bc@mail.gmail.com> References: <5b0248170805062015h5a2212cg2e6457ea73e3a1bc@mail.gmail.com> Message-ID: I am attempting to build r100 on Mono on my Mac and getting an error I have not seen before. I have followed the instructions and used the provided patch. Here is what I get: rbazinet: ~$ rake --trace compile mono=1 rake aborted! No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb) /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:2143:in `raw_load_rakefile' /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1897:in `load_rakefile' /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in `standard_exception_handling' /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1896:in `load_rakefile' /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1880:in `run' /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in `standard_exception_handling' /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1878:in `run' /Library/Ruby/Gems/1.8/gems/rake-0.8.1/bin/rake:31 /usr/bin/rake:19:in `load' /usr/bin/rake:19 Is this just some dumb I am missing? Thanks, Rob Bazinet On Tue, May 6, 2008 at 11:15 PM, Sanghyeon Seo wrote: > WARNING: This is against revision 100. Revision 101 will compile, but > will not run on Mono at the time. I am still working on it. In case > you didn't know, you can use "svn update -r 100" to "update" to > not-the-latest version. > > Stuffs are in the usual place: > http://sparcs.kaist.ac.kr/~tinuviel/download/IronRuby/ > > patch-mono-r100 consists of four different things: > > 1. One-line case-sensitivity patch to Rakefile. > 2. Workaround for long-standing console problem. > 3. Workaround for Mono bug #387040, by changing explicit interface > implementations to implicit one. > 4. Workaround for Mono bug #387502, by rewriting ?? operator with if > statement. This is a SVN regression and you don't need it if you are > using Mono 1.9. > > Links to Mono bugs: > https://bugzilla.novell.com/show_bug.cgi?id=387040 > https://bugzilla.novell.com/show_bug.cgi?id=387502 > > P.S. DLR, IronPython, IronRuby team should create C# compiler test > suite! You guys have the talent! > > -- > Seo Sanghyeon > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -- Rob Bazinet InfoQ Ruby and .NET Editor http://www.accidentaltechnologist.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Thu May 8 22:54:24 2008 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Fri, 9 May 2008 14:54:24 +1200 Subject: [Ironruby-core] IronRuby r100 on Mono In-Reply-To: References: <5b0248170805062015h5a2212cg2e6457ea73e3a1bc@mail.gmail.com> Message-ID: Did you download the sources into your home drive. It looks like you need to navigate into the folder where you downloaded the ironruby source and then call rake :) On 9/05/2008, at 2:09 PM, Robert Bazinet wrote: > I am attempting to build r100 on Mono on my Mac and getting an error > I have not seen before. I have followed the instructions and used > the provided patch. Here is what I get: > > rbazinet: ~$ rake --trace compile mono=1 > rake aborted! > No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, > Rakefile.rb) > /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:2143:in > `raw_load_rakefile' > /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1897:in > `load_rakefile' > /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in > `standard_exception_handling' > /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1896:in > `load_rakefile' > /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1880:in `run' > /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in > `standard_exception_handling' > /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1878:in `run' > /Library/Ruby/Gems/1.8/gems/rake-0.8.1/bin/rake:31 > /usr/bin/rake:19:in `load' > /usr/bin/rake:19 > > Is this just some dumb I am missing? > > Thanks, > Rob Bazinet > > > On Tue, May 6, 2008 at 11:15 PM, Sanghyeon Seo > wrote: > WARNING: This is against revision 100. Revision 101 will compile, but > will not run on Mono at the time. I am still working on it. In case > you didn't know, you can use "svn update -r 100" to "update" to > not-the-latest version. > > Stuffs are in the usual place: > http://sparcs.kaist.ac.kr/~tinuviel/download/IronRuby/ > > patch-mono-r100 consists of four different things: > > 1. One-line case-sensitivity patch to Rakefile. > 2. Workaround for long-standing console problem. > 3. Workaround for Mono bug #387040, by changing explicit interface > implementations to implicit one. > 4. Workaround for Mono bug #387502, by rewriting ?? operator with if > statement. This is a SVN regression and you don't need it if you are > using Mono 1.9. > > Links to Mono bugs: > https://bugzilla.novell.com/show_bug.cgi?id=387040 > https://bugzilla.novell.com/show_bug.cgi?id=387502 > > P.S. DLR, IronPython, IronRuby team should create C# compiler test > suite! You guys have the talent! > > -- > Seo Sanghyeon > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > -- > Rob Bazinet > InfoQ Ruby and .NET Editor > http://www.accidentaltechnologist.com > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: From rbazinet at gmail.com Thu May 8 22:59:25 2008 From: rbazinet at gmail.com (Robert Bazinet) Date: Thu, 8 May 2008 22:59:25 -0400 Subject: [Ironruby-core] IronRuby r100 on Mono In-Reply-To: References: <5b0248170805062015h5a2212cg2e6457ea73e3a1bc@mail.gmail.com> Message-ID: Yes, the source is on my home drive in a subdir named IronRuby, and yes, I navigated to the folder. Thanks. -Rob On Thu, May 8, 2008 at 10:54 PM, Ivan Porto Carrero wrote: > Did you download the sources into your home drive. It looks like you need > to navigate into the folder where you downloaded the ironruby source and > then call rake :) > > On 9/05/2008, at 2:09 PM, Robert Bazinet wrote: > > I am attempting to build r100 on Mono on my Mac and getting an error I have > not seen before. I have followed the instructions and used the provided > patch. Here is what I get: > > rbazinet: ~$ rake --trace compile mono=1 > rake aborted! > No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, > Rakefile.rb) > /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:2143:in > `raw_load_rakefile' > /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1897:in `load_rakefile' > /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in > `standard_exception_handling' > /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1896:in `load_rakefile' > /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1880:in `run' > /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in > `standard_exception_handling' > /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1878:in `run' > /Library/Ruby/Gems/1.8/gems/rake-0.8.1/bin/rake:31 > /usr/bin/rake:19:in `load' > /usr/bin/rake:19 > > Is this just some dumb I am missing? > > Thanks, > Rob Bazinet > > > On Tue, May 6, 2008 at 11:15 PM, Sanghyeon Seo wrote: > >> WARNING: This is against revision 100. Revision 101 will compile, but >> will not run on Mono at the time. I am still working on it. In case >> you didn't know, you can use "svn update -r 100" to "update" to >> not-the-latest version. >> >> Stuffs are in the usual place: >> http://sparcs.kaist.ac.kr/~tinuviel/download/IronRuby/ >> >> patch-mono-r100 consists of four different things: >> >> 1. One-line case-sensitivity patch to Rakefile. >> 2. Workaround for long-standing console problem. >> 3. Workaround for Mono bug #387040, by changing explicit interface >> implementations to implicit one. >> 4. Workaround for Mono bug #387502, by rewriting ?? operator with if >> statement. This is a SVN regression and you don't need it if you are >> using Mono 1.9. >> >> Links to Mono bugs: >> https://bugzilla.novell.com/show_bug.cgi?id=387040 >> https://bugzilla.novell.com/show_bug.cgi?id=387502 >> >> P.S. DLR, IronPython, IronRuby team should create C# compiler test >> suite! You guys have the talent! >> >> -- >> Seo Sanghyeon >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core >> > > > > -- > Rob Bazinet > InfoQ Ruby and .NET Editor > http://www.accidentaltechnologist.com > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -- Rob Bazinet InfoQ Ruby and .NET Editor http://www.accidentaltechnologist.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Thu May 8 23:06:41 2008 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Fri, 9 May 2008 15:06:41 +1200 Subject: [Ironruby-core] IronRuby r100 on Mono In-Reply-To: References: <5b0248170805062015h5a2212cg2e6457ea73e3a1bc@mail.gmail.com> Message-ID: This happens to me sometimes but isn't related to ironruby in my case. if you do ls Rake* does something show up? Rake is complaining about the fact that it can't find its instruction set (Rakefile). From the output I see, it doesn't even start to build I merely suggested navigating to the folder because of he prompt I see rbazinet:~$ which would indicate you tried to run the rake command in your home drive instead of in rbazinet:~/ironruby $ But of course I'm making the assumption that your prompt indicates in which folder you are. From rbazinet at gmail.com Thu May 8 23:20:11 2008 From: rbazinet at gmail.com (Robert Bazinet) Date: Thu, 8 May 2008 23:20:11 -0400 Subject: [Ironruby-core] IronRuby r100 on Mono In-Reply-To: References: <5b0248170805062015h5a2212cg2e6457ea73e3a1bc@mail.gmail.com> Message-ID: Ivan, I wanted to see if you were paying attention..yes, what I sent over shows the command from the WRONG directory. I was in that directory and just used the command history to run the command so I could send it over to the group. The command is failing and I am sending the right one now. You can see I am not nuts, just copying and pasting the wrong info. So, here it is: rbazinet: ~/ironruby$ rake compile mono=1 (in /Users/rbazinet/ironruby) rake aborted! Could not find RubyGem pathname2 (>= 0) /Users/rbazinet/ironruby/rakefile:5 (See full trace by running task with --trace) rbazinet: ~/ironruby$ rake --trace compile mono=1 (in /Users/rbazinet/ironruby) rake aborted! Could not find RubyGem pathname2 (>= 0) /Library/Ruby/Site/1.8/rubygems.rb:523:in `report_activate_error' /Library/Ruby/Site/1.8/rubygems.rb:131:in `activate' /Library/Ruby/Site/1.8/rubygems.rb:49:in `gem' /Users/rbazinet/ironruby/rakefile:5 /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:2149:in `load' /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:2149:in `raw_load_rakefile' /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1897:in `load_rakefile' /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in `standard_exception_handling' /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1896:in `load_rakefile' /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1880:in `run' /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in `standard_exception_handling' /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1878:in `run' /Library/Ruby/Gems/1.8/gems/rake-0.8.1/bin/rake:31 /usr/bin/rake:19:in `load' /usr/bin/rake:19 Does this make more sense?? Thanks, Rob On Thu, May 8, 2008 at 11:06 PM, Ivan Porto Carrero wrote: > This happens to me sometimes but isn't related to ironruby in my case. > > if you do ls Rake* does something show up? Rake is complaining about the > fact that it can't find its instruction set (Rakefile). From the output I > see, it doesn't even start to build > > I merely suggested navigating to the folder because of he prompt I see > > rbazinet:~$ which would indicate you tried to run the rake command in your > home drive instead of in > rbazinet:~/ironruby $ > > But of course I'm making the assumption that your prompt indicates in which > folder you are. > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -- Rob Bazinet InfoQ Ruby and .NET Editor http://www.accidentaltechnologist.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Thu May 8 23:26:38 2008 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Fri, 9 May 2008 15:26:38 +1200 Subject: [Ironruby-core] IronRuby r100 on Mono In-Reply-To: References: <5b0248170805062015h5a2212cg2e6457ea73e3a1bc@mail.gmail.com> Message-ID: <681FA823-5602-48C5-B959-7FFDE9510790@flanders.co.nz> ok looks like you need the gem pathname2 sudo gem install pathname2 (might be pathname my memory fails me) On 9/05/2008, at 3:20 PM, Robert Bazinet wrote: > Ivan, I wanted to see if you were paying attention..yes, what I sent > over shows the command from the WRONG directory. I was in that > directory and just used the command history to run the command so I > could send it over to the group. The command is failing and I am > sending the right one now. You can see I am not nuts, just copying > and pasting the wrong info. > > So, here it is: > > rbazinet: ~/ironruby$ rake compile mono=1 > (in /Users/rbazinet/ironruby) > rake aborted! > Could not find RubyGem pathname2 (>= 0) > /Users/rbazinet/ironruby/rakefile:5 > (See full trace by running task with --trace) > rbazinet: ~/ironruby$ rake --trace compile mono=1 > (in /Users/rbazinet/ironruby) > rake aborted! > Could not find RubyGem pathname2 (>= 0) > /Library/Ruby/Site/1.8/rubygems.rb:523:in `report_activate_error' > /Library/Ruby/Site/1.8/rubygems.rb:131:in `activate' > /Library/Ruby/Site/1.8/rubygems.rb:49:in `gem' > /Users/rbazinet/ironruby/rakefile:5 > /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:2149:in `load' > /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:2149:in > `raw_load_rakefile' > /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1897:in > `load_rakefile' > /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in > `standard_exception_handling' > /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1896:in > `load_rakefile' > /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1880:in `run' > /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in > `standard_exception_handling' > /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1878:in `run' > /Library/Ruby/Gems/1.8/gems/rake-0.8.1/bin/rake:31 > /usr/bin/rake:19:in `load' > /usr/bin/rake:19 > > Does this make more sense?? > > Thanks, > Rob > > > > On Thu, May 8, 2008 at 11:06 PM, Ivan Porto Carrero > wrote: > This happens to me sometimes but isn't related to ironruby in my case. > > if you do ls Rake* does something show up? Rake is complaining > about the fact that it can't find its instruction set (Rakefile). > From the output I see, it doesn't even start to build > > I merely suggested navigating to the folder because of he prompt I see > > rbazinet:~$ which would indicate you tried to run the rake command > in your home drive instead of in > rbazinet:~/ironruby $ > > But of course I'm making the assumption that your prompt indicates > in which folder you are. > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > -- > Rob Bazinet > InfoQ Ruby and .NET Editor > http://www.accidentaltechnologist.com > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: From chrisortman at gmail.com Fri May 9 01:29:23 2008 From: chrisortman at gmail.com (Chris Ortman) Date: Fri, 9 May 2008 00:29:23 -0500 Subject: [Ironruby-core] running tests on server 2008 In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D92F04C87@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <372109E149E8084D8E6C7D9CFD82E0632D92F04C87@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: I do get the same results if I run this from c:\ironruby. On Thu, May 8, 2008 at 11:20 AM, John Lam (IRONRUBY) wrote: > Chris Ortman: > >> Q:\ironruby>rake rspec >> (in Q:/ironruby) >> ./chdir_spec.rb:19: warning: conflicting chdir during another chdir >> block >> ... >> 499 examples, 99 failures >> rake aborted! >> Command failed with status (99): ["ruby.exe" spec_runner.rb - - >> summary...] Q:/ironruby/rakefile:234:in `invoke_spec' > > Using my psychic debugging skills, this might have something to do with the drive letter vs. it being a Win2K8 issue. We still have to spend some time thinking about how to deal with paths correctly in IronRuby. > > Thanks, > -John > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > From chrisortman at gmail.com Fri May 9 01:38:02 2008 From: chrisortman at gmail.com (Chris Ortman) Date: Fri, 9 May 2008 00:38:02 -0500 Subject: [Ironruby-core] running tests on server 2008 In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D92F04C87@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <372109E149E8084D8E6C7D9CFD82E0632D92F04C87@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: Sorry, didn't mean to send yet.... I am having the same behavior running from c:\ironruby I think that calling ruby.exe spec_runner.rb is returning the number of failures as the return code and that is causing the problem....that's the only thing I can think of the 99 coming from anyway. On Thu, May 8, 2008 at 11:20 AM, John Lam (IRONRUBY) wrote: > Chris Ortman: > >> Q:\ironruby>rake rspec >> (in Q:/ironruby) >> ./chdir_spec.rb:19: warning: conflicting chdir during another chdir >> block >> ... >> 499 examples, 99 failures >> rake aborted! >> Command failed with status (99): ["ruby.exe" spec_runner.rb - - >> summary...] Q:/ironruby/rakefile:234:in `invoke_spec' > > Using my psychic debugging skills, this might have something to do with the drive letter vs. it being a Win2K8 issue. We still have to spend some time thinking about how to deal with paths correctly in IronRuby. > > Thanks, > -John > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > From bacondarwin at googlemail.com Fri May 9 01:41:08 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Fri, 9 May 2008 06:41:08 +0100 Subject: [Ironruby-core] Forgetting MutableString In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D92F04C8B@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <003f01c8b109$9dced8e0$d96c8aa0$@com> <372109E149E8084D8E6C7D9CFD82E0632D92F04C8B@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <003601c8b197$48e0cfd0$daa26f70$@com> This actually makes my problem worse! Now there is no way of catching the times when I accidentally return a CLR string rather than a MutableString. It will only flag up when client code tries to call a MutableString method on the CLR string. Pete -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of John Lam (IRONRUBY) Sent: Thursday,08 May 08, 2008 17:23 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Forgetting MutableString Peter Bacon Darwin: > I keep forgetting to wrap up CLR strings in MutableStrings when > returning strings retrieved from calls to .NET Framework library > methods. I finally understand what this is ... is this what you're looking for? public override bool Equals(object other) { if (other is MutableString) return Equals(other as MutableString); else if (other is string) return Equals(other as string); else return false; } public bool Equals(string other) { if (other == null) return false; if (_data.Length != other.Length) return false; for (int i = 0; i < _data.Length; ++i) if (_data[i] != other[i]) return false; return true; } public bool Equals(MutableString other) { if (ReferenceEquals(this, other)) return true; if (other == null) return false; if (_data.Length != other.Length) return false; for (int i = 0; i < _data.Length; ++i) if (_data[i] != other.Chars[i]) return false; return true; } If so, it's coming in the next release. Thanks, -John _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From bacondarwin at googlemail.com Fri May 9 03:08:25 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Fri, 9 May 2008 08:08:25 +0100 Subject: [Ironruby-core] running tests on server 2008 In-Reply-To: References: <372109E149E8084D8E6C7D9CFD82E0632D92F04C87@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <003a01c8b1a3$7aabe390$7003aab0$@com> I get the same result on my XP Pro machine. I think it is just the way that it works. Pete -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Chris Ortman Sent: Friday,09 May 09, 2008 06:38 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] running tests on server 2008 Sorry, didn't mean to send yet.... I am having the same behavior running from c:\ironruby I think that calling ruby.exe spec_runner.rb is returning the number of failures as the return code and that is causing the problem....that's the only thing I can think of the 99 coming from anyway. On Thu, May 8, 2008 at 11:20 AM, John Lam (IRONRUBY) wrote: > Chris Ortman: > >> Q:\ironruby>rake rspec >> (in Q:/ironruby) >> ./chdir_spec.rb:19: warning: conflicting chdir during another chdir >> block >> ... >> 499 examples, 99 failures >> rake aborted! >> Command failed with status (99): ["ruby.exe" spec_runner.rb - - >> summary...] Q:/ironruby/rakefile:234:in `invoke_spec' > > Using my psychic debugging skills, this might have something to do with the drive letter vs. it being a Win2K8 issue. We still have to spend some time thinking about how to deal with paths correctly in IronRuby. > > 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 cjac at colliertech.org Fri May 9 07:18:29 2008 From: cjac at colliertech.org (C.J. Adams-Collier) Date: Fri, 9 May 2008 04:18:29 -0700 Subject: [Ironruby-core] Socket test Message-ID: <0D673119-2847-4B71-8A5F-4A97B7D11BE2@colliertech.org> Here's a test of the socket patch from Mono at r100: cjcollier at karma:/usr/src/svn/rubyforge.org/ironruby/trunk/tests/ ironruby$ cat socket-test.rb && echo '===' && ruby socket-test.rb require 'socket' streamSock = TCPSocket.new( "127.0.0.1", 20000 ) === IronRuby.Libraries:0:in `Require': Could not load file or assembly 'socket' or one of its dependencies. The system cannot find the file specified. (LoadError) Is this a user error? Should I add something to the MONO_PATH? From bacondarwin at googlemail.com Fri May 9 07:38:18 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Fri, 9 May 2008 12:38:18 +0100 Subject: [Ironruby-core] Socket test In-Reply-To: <0D673119-2847-4B71-8A5F-4A97B7D11BE2@colliertech.org> References: <0D673119-2847-4B71-8A5F-4A97B7D11BE2@colliertech.org> Message-ID: <004401c8b1c9$2ef462d0$8cdd2870$@com> Currently the Socket library is part of the IronRuby.Libraries.dll, which is all loaded up on start-up automatically. So you don't need to do a require 'socket' before the TCPSocket class is available. If you want to write a program that will work on both IronRuby and other flavours of Ruby then you can do the following at the top of your file. begin Socket rescue require 'socket' end which is what appears in my RSpec socket tests at the moment or perhaps more correctly begin require 'socket' rescue LoadError end Regards, Pete -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of C.J. Adams-Collier Sent: Friday,09 May 09, 2008 12:18 To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Socket test Here's a test of the socket patch from Mono at r100: cjcollier at karma:/usr/src/svn/rubyforge.org/ironruby/trunk/tests/ ironruby$ cat socket-test.rb && echo '===' && ruby socket-test.rb require 'socket' streamSock = TCPSocket.new( "127.0.0.1", 20000 ) === IronRuby.Libraries:0:in `Require': Could not load file or assembly 'socket' or one of its dependencies. The system cannot find the file specified. (LoadError) Is this a user error? Should I add something to the MONO_PATH? _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From rbazinet at gmail.com Fri May 9 08:30:52 2008 From: rbazinet at gmail.com (Robert Bazinet) Date: Fri, 9 May 2008 08:30:52 -0400 Subject: [Ironruby-core] IronRuby r100 on Mono In-Reply-To: <681FA823-5602-48C5-B959-7FFDE9510790@flanders.co.nz> References: <5b0248170805062015h5a2212cg2e6457ea73e3a1bc@mail.gmail.com> <681FA823-5602-48C5-B959-7FFDE9510790@flanders.co.nz> Message-ID: Yeah, that was that error. I was reading it as not needing a gem but the gem reporting an error in the path. I am now getting an error where it can find system.dll. I saw some postings on here about that and pkg-config. I installed Mono from the OSX package installer. I would expect these things to be set correctly. Is this a wrong assumption? Should I have installed from source instead? What is the correct setting if using the Mono package installer? Thanks, Rob On Thu, May 8, 2008 at 11:26 PM, Ivan Porto Carrero wrote: > ok looks like you need the gem pathname2 > sudo gem install pathname2 (might be pathname my memory fails me) > > > On 9/05/2008, at 3:20 PM, Robert Bazinet wrote: > > Ivan, I wanted to see if you were paying attention..yes, what I sent over > shows the command from the WRONG directory. I was in that directory and > just used the command history to run the command so I could send it over to > the group. The command is failing and I am sending the right one now. You > can see I am not nuts, just copying and pasting the wrong info. > > So, here it is: > > rbazinet: ~/ironruby$ rake compile mono=1 > (in /Users/rbazinet/ironruby) > rake aborted! > Could not find RubyGem pathname2 (>= 0) > /Users/rbazinet/ironruby/rakefile:5 > (See full trace by running task with --trace) > rbazinet: ~/ironruby$ rake --trace compile mono=1 > (in /Users/rbazinet/ironruby) > rake aborted! > Could not find RubyGem pathname2 (>= 0) > /Library/Ruby/Site/1.8/rubygems.rb:523:in `report_activate_error' > /Library/Ruby/Site/1.8/rubygems.rb:131:in `activate' > /Library/Ruby/Site/1.8/rubygems.rb:49:in `gem' > /Users/rbazinet/ironruby/rakefile:5 > /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:2149:in `load' > /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:2149:in > `raw_load_rakefile' > /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1897:in `load_rakefile' > /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in > `standard_exception_handling' > /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1896:in `load_rakefile' > /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1880:in `run' > /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in > `standard_exception_handling' > /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1878:in `run' > /Library/Ruby/Gems/1.8/gems/rake-0.8.1/bin/rake:31 > /usr/bin/rake:19:in `load' > /usr/bin/rake:19 > > Does this make more sense?? > > Thanks, > Rob > > > > On Thu, May 8, 2008 at 11:06 PM, Ivan Porto Carrero > wrote: > >> This happens to me sometimes but isn't related to ironruby in my case. >> >> if you do ls Rake* does something show up? Rake is complaining about the >> fact that it can't find its instruction set (Rakefile). From the output I >> see, it doesn't even start to build >> >> I merely suggested navigating to the folder because of he prompt I see >> >> rbazinet:~$ which would indicate you tried to run the rake command in your >> home drive instead of in >> rbazinet:~/ironruby $ >> >> But of course I'm making the assumption that your prompt indicates in >> which folder you are. >> >> >> >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core >> > > > > -- > Rob Bazinet > InfoQ Ruby and .NET Editor > http://www.accidentaltechnologist.com > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -- Rob Bazinet InfoQ Ruby and .NET Editor http://www.accidentaltechnologist.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jflam at microsoft.com Fri May 9 09:15:40 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Fri, 9 May 2008 06:15:40 -0700 Subject: [Ironruby-core] running tests on server 2008 In-Reply-To: References: <372109E149E8084D8E6C7D9CFD82E0632D92F04C87@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D92F0513A@NA-EXMSG-C115.redmond.corp.microsoft.com> Chris Ortman: > Sorry, didn't mean to send yet.... > I am having the same behavior running from c:\ironruby > > I think that calling ruby.exe spec_runner.rb is returning the number of > failures as the return code and that is causing the problem....that's > the only thing I can think of the 99 coming from anyway. Yes - that's what it's supposed to do. This is how we detect failure in our automated test suites. I was more worried about the chdir_spec warnings that you showed. In any event, we have the new spec suite up and running here. I hope we can ship those new bits out by the end of today so folks can hack on some new stuff over the weekend. Thanks, -John From cjac at colliertech.org Fri May 9 09:22:43 2008 From: cjac at colliertech.org (C.J. Adams-Collier) Date: Fri, 9 May 2008 06:22:43 -0700 Subject: [Ironruby-core] IronRuby r100 on Mono In-Reply-To: References: <5b0248170805062015h5a2212cg2e6457ea73e3a1bc@mail.gmail.com> <681FA823-5602-48C5-B959-7FFDE9510790@flanders.co.nz> Message-ID: <2411FE6B-B4C5-4225-A650-8EA4A45D851B@colliertech.org> I usually put mono=1 before the call to rake, but I haven't tried building on my darwin box yet... I'll try it now and see what happens... On May 9, 2008, at 5:30 AM, Robert Bazinet wrote: > Yeah, that was that error. I was reading it as not needing a gem > but the gem reporting an error in the path. > > I am now getting an error where it can find system.dll. I saw some > postings on here about that and pkg-config. I installed Mono from > the OSX package installer. I would expect these things to be set > correctly. Is this a wrong assumption? Should I have installed > from source instead? > > What is the correct setting if using the Mono package installer? > > Thanks, > Rob > > > On Thu, May 8, 2008 at 11:26 PM, Ivan Porto Carrero > wrote: > ok looks like you need the gem pathname2 > > sudo gem install pathname2 (might be pathname my memory fails me) > > > On 9/05/2008, at 3:20 PM, Robert Bazinet wrote: > >> Ivan, I wanted to see if you were paying attention..yes, what I >> sent over shows the command from the WRONG directory. I was in >> that directory and just used the command history to run the >> command so I could send it over to the group. The command is >> failing and I am sending the right one now. You can see I am not >> nuts, just copying and pasting the wrong info. >> >> So, here it is: >> >> rbazinet: ~/ironruby$ rake compile mono=1 >> (in /Users/rbazinet/ironruby) >> rake aborted! >> Could not find RubyGem pathname2 (>= 0) >> /Users/rbazinet/ironruby/rakefile:5 >> (See full trace by running task with --trace) >> rbazinet: ~/ironruby$ rake --trace compile mono=1 >> (in /Users/rbazinet/ironruby) >> rake aborted! >> Could not find RubyGem pathname2 (>= 0) >> /Library/Ruby/Site/1.8/rubygems.rb:523:in `report_activate_error' >> /Library/Ruby/Site/1.8/rubygems.rb:131:in `activate' >> /Library/Ruby/Site/1.8/rubygems.rb:49:in `gem' >> /Users/rbazinet/ironruby/rakefile:5 >> /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:2149:in `load' >> /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:2149:in >> `raw_load_rakefile' >> /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1897:in >> `load_rakefile' >> /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in >> `standard_exception_handling' >> /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1896:in >> `load_rakefile' >> /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1880:in `run' >> /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in >> `standard_exception_handling' >> /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1878:in `run' >> /Library/Ruby/Gems/1.8/gems/rake-0.8.1/bin/rake:31 >> /usr/bin/rake:19:in `load' >> /usr/bin/rake:19 >> >> Does this make more sense?? >> >> Thanks, >> Rob >> >> >> >> On Thu, May 8, 2008 at 11:06 PM, Ivan Porto Carrero >> wrote: >> This happens to me sometimes but isn't related to ironruby in my >> case. >> >> if you do ls Rake* does something show up? Rake is complaining >> about the fact that it can't find its instruction set (Rakefile). >> From the output I see, it doesn't even start to build >> >> I merely suggested navigating to the folder because of he prompt I >> see >> >> rbazinet:~$ which would indicate you tried to run the rake command >> in your home drive instead of in >> rbazinet:~/ironruby $ >> >> But of course I'm making the assumption that your prompt indicates >> in which folder you are. >> >> >> >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core >> >> >> >> -- >> Rob Bazinet >> InfoQ Ruby and .NET Editor >> http://www.accidentaltechnologist.com >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > > -- > Rob Bazinet > InfoQ Ruby and .NET Editor > http://www.accidentaltechnologist.com > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: From cjac at colliertech.org Fri May 9 09:56:44 2008 From: cjac at colliertech.org (C.J. Adams-Collier) Date: Fri, 9 May 2008 06:56:44 -0700 Subject: [Ironruby-core] IronRuby r100 on Mono In-Reply-To: <2411FE6B-B4C5-4225-A650-8EA4A45D851B@colliertech.org> References: <5b0248170805062015h5a2212cg2e6457ea73e3a1bc@mail.gmail.com> <681FA823-5602-48C5-B959-7FFDE9510790@flanders.co.nz> <2411FE6B-B4C5-4225-A650-8EA4A45D851B@colliertech.org> Message-ID: <7237794F-06E4-43B9-83FD-E7E7F1549A48@colliertech.org> Same problem here... I grabbed ruby from here: http://rubyosx.rubyforge.org/ I got the 1.9 mono dist from mono-project.org I installed the missing gem module: $ sudo gem install -b pathname then tried to build: cjac at beefy:/usr/src/svn/rubyforge.org/ironruby/trunk$ mono=1 rake -- trace compile (in /usr/src/svn/rubyforge.org/ironruby/trunk) ** Invoke compile (first_time) ** Invoke happy (first_time) ** Execute happy ** Invoke clean_build (first_time) ** Invoke happy ** Execute clean_build ** Invoke compile_dlr (first_time) ** Invoke clean_build ** Execute compile_dlr rake aborted! cannot resolve path System.dll ./context.rb:90:in `resolve_framework_path' ./context.rb:89:in `each' ./context.rb:89:in `resolve_framework_path' ./context.rb:130:in `resolve_framework_path' ./context.rb:405:in `resolve_framework_path' ./context.rb:420:in `references' ./context.rb:418:in `each' ./context.rb:418:in `references' ./context.rb:434:in `compile' ./context.rb:432:in `chdir' ./context.rb:432:in `compile' /usr/src/svn/rubyforge.org/ironruby/trunk/rakefile:137 ./context.rb:578:in `instance_eval' ./context.rb:578:in `source_context' /usr/src/svn/rubyforge.org/ironruby/trunk/rakefile:135 /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in `call' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in `execute' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in `each' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in `execute' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:362:in `invoke' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:355:in `synchronize' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:355:in `invoke' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:369:in `invoke_prerequisites' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1003:in `each' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1003:in `send' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1003:in `each' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:368:in `invoke_prerequisites' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:361:in `invoke' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:355:in `synchronize' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:355:in `invoke' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1739:in `top_level' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1739:in `each' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1739:in `top_level' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1761:in `standard_exception_handling' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1733:in `top_level' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1711:in `run' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1761:in `standard_exception_handling' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1708:in `run' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/bin/rake:7 /usr/local/bin/rake:16:in `load' /usr/local/bin/rake:16 cjac at beefy:/usr/src/svn/rubyforge.org/ironruby/trunk$ MONO_PATH= $MONO_PATH:/Library/Frameworks/Mono.framework/Versions/1.9/lib/mono/ 2.1/ mono=1 rake compile(in /usr/src/svn/rubyforge.org/ironruby/trunk) rake aborted! cannot resolve path System.dll /usr/src/svn/rubyforge.org/ironruby/trunk/rakefile:137 (See full trace by running task with --trace) On May 9, 2008, at 6:22 AM, C.J. Adams-Collier wrote: > I usually put mono=1 before the call to rake, but I haven't tried > building on my darwin box yet... I'll try it now and see what > happens... > > > On May 9, 2008, at 5:30 AM, Robert Bazinet wrote: > >> Yeah, that was that error. I was reading it as not needing a gem >> but the gem reporting an error in the path. >> >> I am now getting an error where it can find system.dll. I saw >> some postings on here about that and pkg-config. I installed Mono >> from the OSX package installer. I would expect these things to be >> set correctly. Is this a wrong assumption? Should I have >> installed from source instead? >> >> What is the correct setting if using the Mono package installer? >> >> Thanks, >> Rob >> >> >> On Thu, May 8, 2008 at 11:26 PM, Ivan Porto Carrero >> wrote: >> ok looks like you need the gem pathname2 >> >> sudo gem install pathname2 (might be pathname my memory fails me) >> >> >> On 9/05/2008, at 3:20 PM, Robert Bazinet wrote: >> >>> Ivan, I wanted to see if you were paying attention..yes, what I >>> sent over shows the command from the WRONG directory. I was in >>> that directory and just used the command history to run the >>> command so I could send it over to the group. The command is >>> failing and I am sending the right one now. You can see I am >>> not nuts, just copying and pasting the wrong info. >>> >>> So, here it is: >>> >>> rbazinet: ~/ironruby$ rake compile mono=1 >>> (in /Users/rbazinet/ironruby) >>> rake aborted! >>> Could not find RubyGem pathname2 (>= 0) >>> /Users/rbazinet/ironruby/rakefile:5 >>> (See full trace by running task with --trace) >>> rbazinet: ~/ironruby$ rake --trace compile mono=1 >>> (in /Users/rbazinet/ironruby) >>> rake aborted! >>> Could not find RubyGem pathname2 (>= 0) >>> /Library/Ruby/Site/1.8/rubygems.rb:523:in `report_activate_error' >>> /Library/Ruby/Site/1.8/rubygems.rb:131:in `activate' >>> /Library/Ruby/Site/1.8/rubygems.rb:49:in `gem' >>> /Users/rbazinet/ironruby/rakefile:5 >>> /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:2149:in `load' >>> /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:2149:in >>> `raw_load_rakefile' >>> /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1897:in >>> `load_rakefile' >>> /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in >>> `standard_exception_handling' >>> /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1896:in >>> `load_rakefile' >>> /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1880:in `run' >>> /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in >>> `standard_exception_handling' >>> /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1878:in `run' >>> /Library/Ruby/Gems/1.8/gems/rake-0.8.1/bin/rake:31 >>> /usr/bin/rake:19:in `load' >>> /usr/bin/rake:19 >>> >>> Does this make more sense?? >>> >>> Thanks, >>> Rob >>> >>> >>> >>> On Thu, May 8, 2008 at 11:06 PM, Ivan Porto Carrero >>> wrote: >>> This happens to me sometimes but isn't related to ironruby in my >>> case. >>> >>> if you do ls Rake* does something show up? Rake is complaining >>> about the fact that it can't find its instruction set (Rakefile). >>> From the output I see, it doesn't even start to build >>> >>> I merely suggested navigating to the folder because of he prompt >>> I see >>> >>> rbazinet:~$ which would indicate you tried to run the rake >>> command in your home drive instead of in >>> rbazinet:~/ironruby $ >>> >>> But of course I'm making the assumption that your prompt >>> indicates in which folder you are. >>> >>> >>> >>> _______________________________________________ >>> Ironruby-core mailing list >>> Ironruby-core at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/ironruby-core >>> >>> >>> >>> -- >>> Rob Bazinet >>> InfoQ Ruby and .NET Editor >>> http://www.accidentaltechnologist.com >>> _______________________________________________ >>> Ironruby-core mailing list >>> Ironruby-core at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/ironruby-core >> >> >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core >> >> >> >> >> -- >> Rob Bazinet >> InfoQ Ruby and .NET Editor >> http://www.accidentaltechnologist.com >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tomas.Matousek at microsoft.com Fri May 9 14:08:07 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Fri, 9 May 2008 11:08:07 -0700 Subject: [Ironruby-core] Code Review: MutableString5 Message-ID: tfpt review /shelveset:MutableString5;REDMOND\tomat A new implementation for Ruby MutableString and Ruby regular expression wrappers. This is just the first pass, w/o optimizations and w/o encodings (Default system encoding is used for all strings). Many improvements and adjustments will come in future, some hacks will be removed. Basic architecture: MutableString holds on Content and Encoding. Content is an abstract class that has three subclasses: 1) StringContent - Holds on an instance of System.String - an immutable .NET string. This is the default representation for strings coming from CLR methods and for Ruby string literals. - A textual write operation on the mutable string that has this content representation will cause implicit conversion of the representation to StringBuilderContent. - A binary read/write operation triggers a transition to BinaryContent using the Encoding stored on the owning MutableString. 2) StringBuilderContent - Holds on an instance of System.Text.StringBuilder - a mutable Unicode string. - A binary read/write operation transforms the content to BinaryContent representation. - StringBuilder is not optimal for some operations (requires unnecessary copying), we may consider to replace it with resizable char[]. 3) BinaryContent - A textual read/write operation transforms the content to StringBuilderContent representation. - List is currently used, but it doesn't fit many operations very well. We should replace it by resizable byte[]. The content representation is changed based upon operations that are performed on the mutable string. There is currently no limit on number of content type switches, so if one alternates binary and textual operations the conversion will take place for each one of them. Although this shouldn't be a common case we may consider to add some counters and keep the representation binary/textual based upon their values. The design assumes that the nature of operations implemented by library methods is of two kinds: textual and binary. And that data that are once treated as text are not usually treated as raw binary data later. Any text in the IronRuby runtime is represented as a sequence of 16bit Unicode characters (standard .NET representation). Each binary data treated as text is converted to this representation, regardless of the encoding used for storage representation in the file. The encoding is remembered in the MutableString instance and the original representation could be always recreated. Not all Unicode characters fit into 16 bits, therefore some exotic ones are represented by multiple characters (surrogates). If there is such a character in the string, some operations (e.g. indexing) might not be precise anymore - the n-th item in the char[] isn't the n-th Unicode character in the string (there might be escape characters). We believe this impreciseness is not a real world issue and is worth performance gain and implementation simplicity. Tomas -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: MutableString5.diff Type: application/octet-stream Size: 326215 bytes Desc: MutableString5.diff URL: From jflam at microsoft.com Fri May 9 14:27:00 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Fri, 9 May 2008 11:27:00 -0700 Subject: [Ironruby-core] Friday status update Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D92F05374@NA-EXMSG-C115.redmond.corp.microsoft.com> Lots of things are going on around here, and we have a few mutually interdependent changes that are causing a delay in getting a new update to SVN. We have a nasty blocking bug, #19971, that keeps us from running real programs (like the latest rubinius specs). It showed up on Monday as a result of a change to the DLR. The fix is on the way. Once it is checked in, we should be able to check in the latest rubinius specs that Jim has been working on, and show the results of running against them. http://rubyforge.org/tracker/index.php?func=detail&aid=19971&group_id=4359&atid=16798 Tomas has a new MutableString implementation that is being reviewed this morning. Once that is done and through SNAP, we'll be able to apply my bugfixes shelveset that fixes a number of issues that are preventing various apps from running. Curt Hagenlocher has recently joined our team and is on loan to IronRuby for a few weeks. He is working on getting Dir#glob and File#fnmatch up and running. He's also looking at getting Ruby marshaling up and running as well. Thanks, -John -------------- next part -------------- An HTML attachment was scrubbed... URL: From suppakilla at gmail.com Fri May 9 17:35:32 2008 From: suppakilla at gmail.com (Daniele Alessandri) Date: Fri, 9 May 2008 23:35:32 +0200 Subject: [Ironruby-core] IronRuby r100 on Mono In-Reply-To: <7237794F-06E4-43B9-83FD-E7E7F1549A48@colliertech.org> References: <5b0248170805062015h5a2212cg2e6457ea73e3a1bc@mail.gmail.com> <681FA823-5602-48C5-B959-7FFDE9510790@flanders.co.nz> <2411FE6B-B4C5-4225-A650-8EA4A45D851B@colliertech.org> <7237794F-06E4-43B9-83FD-E7E7F1549A48@colliertech.org> Message-ID: <3bf20550805091435p5beafbc2qd8b6d25622678b23@mail.gmail.com> On 5/9/08, C.J. Adams-Collier wrote: > Same problem here... I got a successful compilation by replacing line 161 of context.rb and hardcoding mono lib base directory just like this: libdir = "/Library/Frameworks/Mono.framework/Versions/1.9.1/lib/" instead of the original: libdir = IO.popen('pkg-config --variable=libdir mono').read.strip It's just a quick and dirty hack, but it works. Mono is not registered with pkg-config using the official dmg installer: adaniele at mugen:/ $ pkg-config --list-all | grep mono adaniele at mugen:/ $ -- Daniele Alessandri http://www.clorophilla.net/blog/ From Tomas.Matousek at microsoft.com Fri May 9 18:40:21 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Fri, 9 May 2008 15:40:21 -0700 Subject: [Ironruby-core] Code Review: Loader9 Message-ID: tfpt review /shelveset:Loader9;REDMOND\tomat DLR change: Adds IsAbsolutePath to PlatformAdaptationLayer. On Windows the options are: 1) "foo\bar" 2) "\foo\bar" 3) "X:foo\bar" 4) "X:\foo\bar" Of which only the last one is absolute. 1) is relative to the current directory, 2) and 3) are relative to the current drive. One Unix all paths starting with "/" are absolute. Ruby changes: A new implementation of file loader in Ruby. File loading works as follows: Argument path is 1. CLR long assembly name or qualified type name - Load .NET assembly or C# implemented Ruby library if the type of the library initializer is specified. The library initializer needs to derive from LibraryInitializer class and is called to load the library classes and modules. - The path is matched against pattern (,)? (, =)+, property names are arbitrary identifiers and property values arbitrary strings not containing '=' or ','. Exact CLR property names are not matched. 2. Absolute path switch (extension): * .rb -> load * .dll * MRI: load dll * IR: not supported * None * MRI: try load path + .rb, path + .dll * IR: try load path, path + extension for all registered extensions in runtime (.rb, .py, .js, ...) * If multiple files match exist an ambiguous match exception is thrown. 3. Relative path * For each dir in LoadPaths: Apply (2) on dir combined with path Notes: - Require checks $" variable for loaded files and appends the name of the loaded file with extension to it on success. - Load doesn't try to append extensions. Adds Kernel#load_assembly(assembly, type) for loading assemblies and C# implemented Ruby libraries. Tomas -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Loader9.diff Type: application/octet-stream Size: 49470 bytes Desc: Loader9.diff URL: From jflam at microsoft.com Sat May 10 04:00:04 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Sat, 10 May 2008 01:00:04 -0700 Subject: [Ironruby-core] IronRuby r102 is out Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D92F055DE@NA-EXMSG-C115.redmond.corp.microsoft.com> This is a fairly major update. Ruby-visible changes include: 1) A brand new MutableString implementation that supports byte, char, and immutable char strings. 2) Some wrappers for Regexp to support binding to the new MutableString implementation 3) Bug fixes for module_function, singleton_methods, subclassing of Module. 4) DebuggerProxyType This is the first of several changes that will be coming. I have a shelveset that will go out for code review after this mail goes out. It contains a large number of bug fixes for Rubyforge bugs. It passes all local tests, but the troll is getting his batteries replaced this weekend, so it won't go through until Monday. Next, we're waiting on John Messerly's DLR fix for the Tuple bug that is causing us to blow up on large, complex files. This will unblock Jim Deville's work on running the latest Rubinius spec suite. He has it running locally on his machine today. Oh yeah, this release can run erb too ... Thanks, -John -------------- next part -------------- An HTML attachment was scrubbed... URL: From jflam at microsoft.com Sat May 10 04:16:08 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Sat, 10 May 2008 01:16:08 -0700 Subject: [Ironruby-core] RubyForge bug fixes Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D92F055DF@NA-EXMSG-C115.redmond.corp.microsoft.com> tfpt review /shelveset:merge-3;REDMOND\jflam Ruby only This shelveset fixes a number of open bugs on Rubyforge and adds some features that we need to get the latest rubinius specs running. MatchDataOps: - we used to alias MatchData to System.Text.RegularExpressions.Match. However, to fully implement MatchData we need to also hold onto a reference to the original string that we matched against. A new MatchData type was created (MatchData.cs) which wraps the existing .NET Match object. This also touches MutableStringOps.cs, RubyOps.cs, RubyScope.cs, SpecialGlobalVariableInfo.cs - finished implementing all methods. 16 out of 16 specs pass - implemented to_a which closes bug #19903 RegexpOps: - added ctor overload to close bug #19927 - made some changes to return MatchData objects instead of Match objects - made some changes to return boxed integers via RuntimeHelpers.Int32ToObject() instead of explicit boxing. This also touches MutableStringOps.cs TimeOps: - removed overloaded constructors to close bug #19956. But this exposes a new problem about Type aliasing that is described by bug 20035 (referencing a System::DateTime explicitly does not allow you to call the .NET constructors - only the Ruby-defined constructors). - fixed Time#- bug - #19955 ModuleOps: - fixed some very old bugs #15996, #15995 related to including non-sensible things (include 1, include nil). RequireNonClasses() method now throws the correct Ruby exceptions. This also touches SingletonOps.cs MutableStringOps: - added an implementation of String#rindex which closes #19904. We pass all specs except for 4 which fail because of differences between .NET regex and Ruby regex. Dir.cs: - cleaned up some code here, was about to work on glob implementation (bugs #19843 #19950, but handed off to Curt) FileOps.cs: - added an implementation of File#basename which closes #19905. passes all specs except for one which is wrong, and one which is unix-specific. These things are likely bugs in Ruby. #File.basename('baz.rb', 'z.rb').should == 'ba' -- bad test #File.basename("bar.txt.exe", ".txt.exe").should == "bar" - unix-only, should be wrapped in platform - added an implementation of File.file? to close #19949 MutableString.cs: - added a static Empty MutableString - added delegation thunks to LastIndexOf() - fixed our Equals() implementation to correctly distinguish between different types of strings (CLR vs. MutableString) File.cs: - fixes a bug related to what "w+" means in .NET. - its FileMode.OpenOrCreate Fixed bug #19885 by adding the -I command line switch which lets you specify the library load path. I've redefined our internal alias.txt file to generate aliases for rbd and rbx that include a pointer to where the MRI libs are stored in our layout. Fixed bug #17810, which was a long-standing perf bug. Fixed bug #20007, by allowing users to pass nothing for attr_accessor/reader/writer. This is really a bug in Ruby, but the current implementations allow this behavior, and there are apps that actually depend on it (RbYAML). Thanks, -John -------------- next part -------------- A non-text attachment was scrubbed... Name: merge-3.diff Type: application/octet-stream Size: 355608 bytes Desc: merge-3.diff URL: From jflam at microsoft.com Sat May 10 04:20:18 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Sat, 10 May 2008 01:20:18 -0700 Subject: [Ironruby-core] PATCH: $KCODE global variable In-Reply-To: <771cfe010805051638n7134f8eex8b59a53b959881ea@mail.gmail.com> References: <771cfe010805051638n7134f8eex8b59a53b959881ea@mail.gmail.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D92F055E2@NA-EXMSG-C115.redmond.corp.microsoft.com> Andrew Peters: > I'm keen to help out the effort and so I started having a look at > implementing the nkf library. > > I'm about half done on nkf but it requires $KCODE so I thought I'd > contribute that first on it's own. > > Still finding my way around so all feedback appreciated :-) Hi Andrew, Will get to this patch on Monday ... thanks for sending it in! -John From bacondarwin at googlemail.com Sat May 10 05:27:28 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Sat, 10 May 2008 10:27:28 +0100 Subject: [Ironruby-core] Code Review: MutableString5 In-Reply-To: References: Message-ID: <001501c8b280$126005e0$372011a0$@com> This is a big old diff to search through. I couldn't work out a way of easily patching it onto my source at home due to the folder differences. I really like this hybrid idea and it looks like it will work well. I have one question with regards to encodings and KCODE. I appreciate that String is changing between Ruby 1.8 and 1.9. It appears that this MutableString implementation is leaning more toward the 1.9 implementation (i.e. holding on to an Encoding within the String itself). 1.8 does hold the encoding and as I understand it the implicit encoding of the bytes held in a String is driven off KCODE. Is that correct? If so you have a number of scenarios which I think could cause problems with MutableString holding on to its own Encoding, which stem from times when KCODE is changed at runtime. I'll try to describe a concrete example and you can tell me where I am going wrong... Assume that KCODE is set to UTF8. If you create a String from an array of bytes in Ruby, the bytes are just stored as-is. You can do stuff which is encoding dependent and UTF8 is assumed. If you now change KCODE to say EUC, then the bytes in the String are unchanged but now encoding dependent operations will possibly produce different results on the same string since they interpret the bytes differently. The worry I have with MutableString, is that if you create a string from bytes but then do an operation that requires it to be converted to a CLR string internally. What happens when you change KCODE? You can't simply change the Encoding value of the MutableString, since if you then access the bytes you will not get the same bytes back as were originally put in. I suppose, on changing KCODE, you could go through all the strings in memory, which have been converted from binary to CLR strings, and convert them (i.e. back to bytes via the old encoding and then to CLR strings via the new encoding). What would be the optimal solution in this case? Again, I am not talking from a position of deep knowledge here so I may be missing something really obvious. But I thought it was worth asking the question. Regards, Pete From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek Sent: Friday,09 May 09, 2008 19:08 To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: [Ironruby-core] Code Review: MutableString5 tfpt review /shelveset:MutableString5;REDMOND\tomat A new implementation for Ruby MutableString and Ruby regular expression wrappers. This is just the first pass, w/o optimizations and w/o encodings (Default system encoding is used for all strings). Many improvements and adjustments will come in future, some hacks will be removed. Basic architecture: MutableString holds on Content and Encoding. Content is an abstract class that has three subclasses: 1) StringContent - Holds on an instance of System.String - an immutable .NET string. This is the default representation for strings coming from CLR methods and for Ruby string literals. - A textual write operation on the mutable string that has this content representation will cause implicit conversion of the representation to StringBuilderContent. - A binary read/write operation triggers a transition to BinaryContent using the Encoding stored on the owning MutableString. 2) StringBuilderContent - Holds on an instance of System.Text.StringBuilder - a mutable Unicode string. - A binary read/write operation transforms the content to BinaryContent representation. - StringBuilder is not optimal for some operations (requires unnecessary copying), we may consider to replace it with resizable char[]. 3) BinaryContent - A textual read/write operation transforms the content to StringBuilderContent representation. - List is currently used, but it doesn't fit many operations very well. We should replace it by resizable byte[]. The content representation is changed based upon operations that are performed on the mutable string. There is currently no limit on number of content type switches, so if one alternates binary and textual operations the conversion will take place for each one of them. Although this shouldn't be a common case we may consider to add some counters and keep the representation binary/textual based upon their values. The design assumes that the nature of operations implemented by library methods is of two kinds: textual and binary. And that data that are once treated as text are not usually treated as raw binary data later. Any text in the IronRuby runtime is represented as a sequence of 16bit Unicode characters (standard .NET representation). Each binary data treated as text is converted to this representation, regardless of the encoding used for storage representation in the file. The encoding is remembered in the MutableString instance and the original representation could be always recreated. Not all Unicode characters fit into 16 bits, therefore some exotic ones are represented by multiple characters (surrogates). If there is such a character in the string, some operations (e.g. indexing) might not be precise anymore - the n-th item in the char[] isn't the n-th Unicode character in the string (there might be escape characters). We believe this impreciseness is not a real world issue and is worth performance gain and implementation simplicity. Tomas -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobias.michaelsen at gmail.com Sat May 10 07:36:57 2008 From: tobias.michaelsen at gmail.com (Tobias H. Michaelsen) Date: Sat, 10 May 2008 13:36:57 +0200 Subject: [Ironruby-core] IronRuby r100 on Mono In-Reply-To: <3bf20550805091435p5beafbc2qd8b6d25622678b23@mail.gmail.com> References: <5b0248170805062015h5a2212cg2e6457ea73e3a1bc@mail.gmail.com> <681FA823-5602-48C5-B959-7FFDE9510790@flanders.co.nz> <2411FE6B-B4C5-4225-A650-8EA4A45D851B@colliertech.org> <7237794F-06E4-43B9-83FD-E7E7F1549A48@colliertech.org> <3bf20550805091435p5beafbc2qd8b6d25622678b23@mail.gmail.com> Message-ID: <667d6e800805100436p596a6cc6kfb55f977de6b5af0@mail.gmail.com> You can add the following to your ~/.bash_profile (or equivalent): export PKG_CONFIG_PATH="/Library/Frameworks/Mono.framework/Libraries/pkgconfig/" That did it for me. # Tobias 2008/5/9 Daniele Alessandri : > On 5/9/08, C.J. Adams-Collier wrote: > >> Same problem here... > > I got a successful compilation by replacing line 161 of context.rb and > hardcoding mono lib base directory just like this: > > libdir = "/Library/Frameworks/Mono.framework/Versions/1.9.1/lib/" > > instead of the original: > > libdir = IO.popen('pkg-config --variable=libdir mono').read.strip > > It's just a quick and dirty hack, but it works. Mono is not registered > with pkg-config using the official dmg installer: > > adaniele at mugen:/ $ pkg-config --list-all | grep mono > adaniele at mugen:/ $ > > -- > Daniele Alessandri > http://www.clorophilla.net/blog/ > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > From ksunair at yahoo.com Sat May 10 16:01:27 2008 From: ksunair at yahoo.com (Unnikrishnan Nair) Date: Sat, 10 May 2008 13:01:27 -0700 (PDT) Subject: [Ironruby-core] RubyForge bug fixes Message-ID: <921398.60261.qm@web50603.mail.re2.yahoo.com> Quick question, are these following assertions are correct? ??? should_raise(TypeError){ File.basename(1) } ??? should_raise(TypeError){ File.basename("bar.txt", 1) } ??? should_raise(TypeError){ File.basename(true) } I was expecting all the above three should be ArgumentError than TypeError, until unless, you expect it to be TypeError, when I run the changes I have made for the all the above three by default you get the following error >>> File.basename(1) :0:in `Initialize##1': wrong number or type of arguments for `basename' (Argumen tError) let me know if you would like me to validate and force throw TypeError execption. Also, in the basename_spec the test setup has wrong parameter on File.open(@name, 'w+'), if I change it to 'w', the test runs fine otherwise none of the test works. Thanks, ----- Original Message ---- From: John Lam (IRONRUBY) To: IronRuby External Code Reviewers Cc: "ironruby-core at rubyforge.org" Sent: Saturday, May 10, 2008 3:16:08 AM Subject: [Ironruby-core] RubyForge bug fixes tfpt review /shelveset:merge-3;REDMOND\jflam Ruby only This shelveset fixes a number of open bugs on Rubyforge and adds some features that we need to get the latest rubinius specs running. MatchDataOps: -? ? ? we used to alias MatchData to System.Text.RegularExpressions.Match. However, to fully implement MatchData we need to also hold onto a reference to the original string that we matched against. A new MatchData type was created (MatchData.cs) which wraps the existing .NET Match object. This also touches MutableStringOps.cs, RubyOps.cs, RubyScope.cs, SpecialGlobalVariableInfo.cs -? ? ? finished implementing all methods. 16 out of 16 specs pass -? ? ? implemented to_a which closes bug #19903 RegexpOps: -? ? ? added ctor overload to close bug #19927 -? ? ? made some changes to return MatchData objects instead of Match objects -? ? ? made some changes to return boxed integers via RuntimeHelpers.Int32ToObject() instead of explicit boxing. This also touches MutableStringOps.cs TimeOps: -? ? ? removed overloaded constructors to close bug #19956. But this exposes a new problem about Type aliasing that is described by bug 20035 (referencing a System::DateTime explicitly does not allow you to call the .NET constructors - only the Ruby-defined constructors). -? ? ? fixed Time#- bug - #19955 ModuleOps: -? ? ? fixed some very old bugs #15996, #15995 related to including non-sensible things (include 1, include nil). RequireNonClasses() method now throws the correct Ruby exceptions. This also touches SingletonOps.cs MutableStringOps: -? ? ? added an implementation of String#rindex which closes #19904. We pass all specs except for 4 which fail because of differences between .NET regex and Ruby regex. Dir.cs: -? ? ? cleaned up some code here, was about to work on glob implementation (bugs #19843 #19950, but handed off to Curt) FileOps.cs: -? ? ? added an implementation of File#basename which closes #19905. passes all specs except for one which is wrong, and one which is unix-specific. These things are likely bugs in Ruby. ? ? #File.basename('baz.rb', 'z.rb').should == 'ba' -- bad test ? ? #File.basename("bar.txt.exe", ".txt.exe").should == "bar" - unix-only, should be wrapped in platform -? ? ? added an implementation of File.file? to close #19949 MutableString.cs: -? ? ? added a static Empty MutableString -? ? ? added delegation thunks to LastIndexOf() -? ? ? fixed our Equals() implementation to correctly distinguish between different types of strings (CLR vs. MutableString) File.cs: -? ? ? fixes a bug related to what "w+" means in .NET. - its FileMode.OpenOrCreate Fixed bug #19885 by adding the -I command line switch which lets you specify the library load path. I've redefined our internal alias.txt file to generate aliases for rbd and rbx that include a pointer to where the MRI libs are stored in our layout. Fixed bug #17810, which was a long-standing perf bug. Fixed bug #20007, by allowing users to pass nothing for attr_accessor/reader/writer. This is really a bug in Ruby, but the current implementations allow this behavior, and there are apps that actually depend on it (RbYAML). Thanks, -John -------------- next part -------------- An HTML attachment was scrubbed... URL: From jflam at microsoft.com Sat May 10 16:25:16 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Sat, 10 May 2008 13:25:16 -0700 Subject: [Ironruby-core] RubyForge bug fixes In-Reply-To: <921398.60261.qm@web50603.mail.re2.yahoo.com> References: <921398.60261.qm@web50603.mail.re2.yahoo.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D92F05638@NA-EXMSG-C115.redmond.corp.microsoft.com> Unnikrishnan Nair: > Quick question, are these following assertions are correct? > > should_raise(TypeError){ File.basename(1) } > should_raise(TypeError){ File.basename("bar.txt", 1) } > should_raise(TypeError){ File.basename(true) } Yes they are. You can easily verify this in MRI yourself. In first and third cases, it hits the overload that accepts a nullable object as the first parameter. The TypeError is raised via Protocols.CastToString(). In the second case, it also hits an overload that accepts a nullable object as its second parameter, which raises TypeError via Protocols.CastToString(). FYI, this is the implementation of #basename that I have in my shelveset. It passes all of the (valid) specs - there are some legitimate bugs in our old copy of the specs (I haven't checked with the latest version of the rubinius specs - I'll do that next week). I'm a bit worried about how I'm handling the special cases for Windows. [RubyMethod("basename", RubyMethodAttributes.PublicSingleton)] public static MutableString/*!*/ Basename(CodeContext/*!*/ context, object/*!*/ self, [NotNull]MutableString/*!*/ path, [NotNull]MutableString/*!*/ extensionFilter) { if (path.Length == 0) return path; MutableString trimmedPath = TrimTrailingSlashes(path); // Special cases of drive letters C:\\ or C:/ if (trimmedPath.Length == 2) if (Char.IsLetter(trimmedPath.GetChar(0)) && trimmedPath.GetChar(1) == ':') return Kernel.FlowTaint(context, path, (path.Length > 2 ? MutableString.Create(path.GetChar(2).ToString()) : MutableString.Create(String.Empty))); string trimmedPathAsString = trimmedPath.ConvertToString(); if (trimmedPathAsString == "/") return trimmedPath; string filename = System.IO.Path.GetFileName(trimmedPath.ConvertToString()); // Handle UNC host names correctly string root = System.IO.Path.GetPathRoot(trimmedPath.ConvertToString()); if (extensionFilter.Length == 0) return trimmedPathAsString == root ? MutableString.Create(root) : MutableString.Create(filename); string fileExtension = System.IO.Path.GetExtension(filename); string basename = System.IO.Path.GetFileNameWithoutExtension(filename); string result = WildcardExtensionMatch(fileExtension, extensionFilter.ConvertToString()) ? basename : filename; return Kernel.FlowTaint(context, self, (result.Equals(root) ? MutableString.Create(root) : MutableString.Create(result))); } [RubyMethod("basename", RubyMethodAttributes.PublicSingleton)] public static MutableString/*!*/ Basename(CodeContext/*!*/ context, object/*!*/ self, [NotNull]MutableString/*!*/ path) { return Basename(context, self, path, MutableString.Empty); } [RubyMethod("basename", RubyMethodAttributes.PublicSingleton)] public static MutableString/*!*/ Basename(CodeContext/*!*/ context, object/*!*/ self, object path, object extension) { return Basename(context, self, Protocols.CastToString(context, path), Protocols.CastToString(context, extension)); } [RubyMethod("basename", RubyMethodAttributes.PublicSingleton)] public static MutableString/*!*/ Basename(CodeContext/*!*/ context, object/*!*/ self, object path) { return Basename(context, self, Protocols.CastToString(context, path)); } > Also, in the basename_spec the test setup has wrong parameter on > File.open(@name, 'w+'), if I change it to 'w', the test runs fine > otherwise none of the test works. This is correct. There is a bug in how we map the semantics of 'w+' to .NET IO. It's fixed in my shelveset. Thanks, -John From Tomas.Matousek at microsoft.com Sat May 10 17:42:06 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Sat, 10 May 2008 14:42:06 -0700 Subject: [Ironruby-core] Code Review: MutableString5 In-Reply-To: <001501c8b280$126005e0$372011a0$@com> References: <001501c8b280$126005e0$372011a0$@com> Message-ID: $KCODE is orthogonal to the encoding in MutableString. $KCODE seems to be just a value that is used by some library methods that perform binary operations on textual data. MutableString.Encoding is encoding of the representation. If a MutableString instance is created from .NET string an encoding that is associated with it is used whenever the string is consumed by a binary data operation. We could represent all strings as byte[], but then you'd need to convert .NET strings to byte[] at the construction time. MutableString allows you to be lazy and perhaps not perform the conversion at all if not needed. Could you give some code sample that you think could be broken? Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Peter Bacon Darwin Sent: Saturday, May 10, 2008 2:27 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review: MutableString5 This is a big old diff to search through. I couldn't work out a way of easily patching it onto my source at home due to the folder differences. I really like this hybrid idea and it looks like it will work well. I have one question with regards to encodings and KCODE. I appreciate that String is changing between Ruby 1.8 and 1.9. It appears that this MutableString implementation is leaning more toward the 1.9 implementation (i.e. holding on to an Encoding within the String itself). 1.8 does hold the encoding and as I understand it the implicit encoding of the bytes held in a String is driven off KCODE. Is that correct? If so you have a number of scenarios which I think could cause problems with MutableString holding on to its own Encoding, which stem from times when KCODE is changed at runtime. I'll try to describe a concrete example and you can tell me where I am going wrong... Assume that KCODE is set to UTF8. If you create a String from an array of bytes in Ruby, the bytes are just stored as-is. You can do stuff which is encoding dependent and UTF8 is assumed. If you now change KCODE to say EUC, then the bytes in the String are unchanged but now encoding dependent operations will possibly produce different results on the same string since they interpret the bytes differently. The worry I have with MutableString, is that if you create a string from bytes but then do an operation that requires it to be converted to a CLR string internally. What happens when you change KCODE? You can't simply change the Encoding value of the MutableString, since if you then access the bytes you will not get the same bytes back as were originally put in. I suppose, on changing KCODE, you could go through all the strings in memory, which have been converted from binary to CLR strings, and convert them (i.e. back to bytes via the old encoding and then to CLR strings via the new encoding). What would be the optimal solution in this case? Again, I am not talking from a position of deep knowledge here so I may be missing something really obvious. But I thought it was worth asking the question. Regards, Pete From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek Sent: Friday,09 May 09, 2008 19:08 To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: [Ironruby-core] Code Review: MutableString5 tfpt review /shelveset:MutableString5;REDMOND\tomat A new implementation for Ruby MutableString and Ruby regular expression wrappers. This is just the first pass, w/o optimizations and w/o encodings (Default system encoding is used for all strings). Many improvements and adjustments will come in future, some hacks will be removed. Basic architecture: MutableString holds on Content and Encoding. Content is an abstract class that has three subclasses: 1) StringContent - Holds on an instance of System.String - an immutable .NET string. This is the default representation for strings coming from CLR methods and for Ruby string literals. - A textual write operation on the mutable string that has this content representation will cause implicit conversion of the representation to StringBuilderContent. - A binary read/write operation triggers a transition to BinaryContent using the Encoding stored on the owning MutableString. 2) StringBuilderContent - Holds on an instance of System.Text.StringBuilder - a mutable Unicode string. - A binary read/write operation transforms the content to BinaryContent representation. - StringBuilder is not optimal for some operations (requires unnecessary copying), we may consider to replace it with resizable char[]. 3) BinaryContent - A textual read/write operation transforms the content to StringBuilderContent representation. - List is currently used, but it doesn't fit many operations very well. We should replace it by resizable byte[]. The content representation is changed based upon operations that are performed on the mutable string. There is currently no limit on number of content type switches, so if one alternates binary and textual operations the conversion will take place for each one of them. Although this shouldn't be a common case we may consider to add some counters and keep the representation binary/textual based upon their values. The design assumes that the nature of operations implemented by library methods is of two kinds: textual and binary. And that data that are once treated as text are not usually treated as raw binary data later. Any text in the IronRuby runtime is represented as a sequence of 16bit Unicode characters (standard .NET representation). Each binary data treated as text is converted to this representation, regardless of the encoding used for storage representation in the file. The encoding is remembered in the MutableString instance and the original representation could be always recreated. Not all Unicode characters fit into 16 bits, therefore some exotic ones are represented by multiple characters (surrogates). If there is such a character in the string, some operations (e.g. indexing) might not be precise anymore - the n-th item in the char[] isn't the n-th Unicode character in the string (there might be escape characters). We believe this impreciseness is not a real world issue and is worth performance gain and implementation simplicity. Tomas -------------- next part -------------- An HTML attachment was scrubbed... URL: From ksunair at yahoo.com Sat May 10 17:59:19 2008 From: ksunair at yahoo.com (Unnikrishnan Nair) Date: Sat, 10 May 2008 14:59:19 -0700 (PDT) Subject: [Ironruby-core] RubyForge bug fixes Message-ID: <884300.27011.qm@web50612.mail.re2.yahoo.com> Hi John, Here is my code that I have, this is the first method I attemepted since this is one of the interesting logic. I thought I post my code for you to review as well. This passed most of the test as well[ { returnString = path; } [ { } [ {RubyMethod("basename", RubyMethodAttributes.PublicSingleton)]publicstaticMutableStringBasename(CodeContext/*!*/context, object/*!*/self, [NotNull]MutableString/*!*/path)MutableString[] tokens = path.Split(@"\/".ToCharArray(), Int32.MaxValue, StringSplitOptions.RemoveEmptyEntries);MutableStringreturnString = (tokens.GetLength(0) > 0) ? tokens[tokens.GetLength(0) - 1] : path; if((tokens.GetLength(0) > 0) && (returnString.GetChar(returnString.Length - 1).Equals(':')))returnreturnString;RubyMethod("basename", RubyMethodAttributes.PublicSingleton)]publicstaticMutableStringBasename(CodeContext/*!*/context, object/*!*/self, object/*!*/path)returnBasename(context, self, Protocols.CastToString(context, path));RubyMethod("basename", RubyMethodAttributes.PublicSingleton)]publicstaticMutableStringBasename(CodeContext/*!*/context, object/*!*/self, [NotNull]MutableString/*!*/path, [NotNull]MutableString/*!*/filter)MutableStringfilename = Basename(context, self, path);//Treat ? speciallyif(filter.IndexOf('?') >= 0)returnfilename;//Treat .* and exetions specially using regex{ filter.Clear(); filter.Append( }if(filter.Equals(MutableString.Create(".*")))@"(?x)(\.[^.]*$|$)");else{ filter.Append( } System.Text.RegularExpressions. filename.Replace(mat.Index, mat.Length, } [ { } Let me know what do you think? Yes, I found some problems with test spec as well, (bar.txt should be baz) Thanks."$");RubyRegexreg = newRubyRegex(filter, System.Text.RegularExpressions.RegexOptions.Singleline);Matchmat = reg.Match(filename);if(mat.Success)MutableString.Create(""));returnfilename;RubyMethod("basename", RubyMethodAttributes.PublicSingleton)]publicstaticMutableStringBasename(CodeContext/*!*/context, object/*!*/self, object/*!*/path, object/*!*/filter)returnBasename(context, self, Protocols.CastToString(context, path), Protocols.CastToString(context, filter)); ----- Original Message ---- From: John Lam (IRONRUBY) To: "ironruby-core at rubyforge.org" Sent: Saturday, May 10, 2008 3:25:16 PM Subject: Re: [Ironruby-core] RubyForge bug fixes Unnikrishnan Nair: > Quick question, are these following assertions are correct? > >? ? should_raise(TypeError){ File.basename(1) } >? ? should_raise(TypeError){ File.basename("bar.txt", 1) } >? ? should_raise(TypeError){ File.basename(true) } Yes they are. You can easily verify this in MRI yourself. In first and third cases, it hits the overload that accepts a nullable object as the first parameter. The TypeError is raised via Protocols.CastToString(). In the second case, it also hits an overload that accepts a nullable object as its second parameter, which raises TypeError via Protocols.CastToString(). FYI, this is the implementation of #basename that I have in my shelveset. It passes all of the (valid) specs - there are some legitimate bugs in our old copy of the specs (I haven't checked with the latest version of the rubinius specs - I'll do that next week). I'm a bit worried about how I'm handling the special cases for Windows. [RubyMethod("basename", RubyMethodAttributes.PublicSingleton)] public static MutableString/*!*/ Basename(CodeContext/*!*/ context, object/*!*/ self, [NotNull]MutableString/*!*/ path, [NotNull]MutableString/*!*/ extensionFilter) { ? ? if (path.Length == 0) ? ? ? ? return path; ? ? MutableString trimmedPath = TrimTrailingSlashes(path); ? ? // Special cases of drive letters C:\\ or C:/ ? ? if (trimmedPath.Length == 2) ? ? ? ? if (Char.IsLetter(trimmedPath.GetChar(0)) && trimmedPath.GetChar(1) == ':') ? ? ? ? ? ? return Kernel.FlowTaint(context, path, (path.Length > 2 ? MutableString.Create(path.GetChar(2).ToString()) : MutableString.Create(String.Empty))); ? ? string trimmedPathAsString = trimmedPath.ConvertToString(); ? ? if (trimmedPathAsString == "/") ? ? ? ? return trimmedPath; ? ? string filename = System.IO.Path.GetFileName(trimmedPath.ConvertToString()); ? ? // Handle UNC host names correctly ? ? string root = System.IO.Path.GetPathRoot(trimmedPath.ConvertToString()); ? ? if (extensionFilter.Length == 0) ? ? ? ? return trimmedPathAsString == root ? MutableString.Create(root) : MutableString.Create(filename); ? ? string fileExtension = System.IO.Path.GetExtension(filename); ? ? string basename = System.IO.Path.GetFileNameWithoutExtension(filename); ? ? string result = WildcardExtensionMatch(fileExtension, extensionFilter.ConvertToString()) ? basename : filename; ? ? return Kernel.FlowTaint(context, self, (result.Equals(root) ? MutableString.Create(root) : MutableString.Create(result))); } [RubyMethod("basename", RubyMethodAttributes.PublicSingleton)] public static MutableString/*!*/ Basename(CodeContext/*!*/ context, object/*!*/ self, [NotNull]MutableString/*!*/ path) { ? ? return Basename(context, self, path, MutableString.Empty); } [RubyMethod("basename", RubyMethodAttributes.PublicSingleton)] public static MutableString/*!*/ Basename(CodeContext/*!*/ context, object/*!*/ self, object path, object extension) { ? ? return Basename(context, self, Protocols.CastToString(context, path), Protocols.CastToString(context, extension)); } [RubyMethod("basename", RubyMethodAttributes.PublicSingleton)] public static MutableString/*!*/ Basename(CodeContext/*!*/ context, object/*!*/ self, object path) { ? ? return Basename(context, self, Protocols.CastToString(context, path)); } > Also, in the basename_spec the test setup has wrong parameter on > File.open(@name, 'w+'), if I change it to 'w', the test runs fine > otherwise none of the test works. This is correct. There is a bug in how we map the semantics of 'w+' to .NET IO. It's fixed in my shelveset. Thanks, -John _______________________________________________ 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 rbazinet at gmail.com Sat May 10 23:34:53 2008 From: rbazinet at gmail.com (Robert Bazinet) Date: Sat, 10 May 2008 23:34:53 -0400 Subject: [Ironruby-core] IronRuby r100 on Mono In-Reply-To: <667d6e800805100436p596a6cc6kfb55f977de6b5af0@mail.gmail.com> References: <5b0248170805062015h5a2212cg2e6457ea73e3a1bc@mail.gmail.com> <681FA823-5602-48C5-B959-7FFDE9510790@flanders.co.nz> <2411FE6B-B4C5-4225-A650-8EA4A45D851B@colliertech.org> <7237794F-06E4-43B9-83FD-E7E7F1549A48@colliertech.org> <3bf20550805091435p5beafbc2qd8b6d25622678b23@mail.gmail.com> <667d6e800805100436p596a6cc6kfb55f977de6b5af0@mail.gmail.com> Message-ID: Ah yes, work perfectly. Actually both the solution syou and Daniele worked great. Thanks. -Rob On Sat, May 10, 2008 at 7:36 AM, Tobias H. Michaelsen < tobias.michaelsen at gmail.com> wrote: > You can add the following to your ~/.bash_profile (or equivalent): > > export > PKG_CONFIG_PATH="/Library/Frameworks/Mono.framework/Libraries/pkgconfig/" > > That did it for me. > > # Tobias > > 2008/5/9 Daniele Alessandri : > > On 5/9/08, C.J. Adams-Collier wrote: > > > >> Same problem here... > > > > I got a successful compilation by replacing line 161 of context.rb and > > hardcoding mono lib base directory just like this: > > > > libdir = "/Library/Frameworks/Mono.framework/Versions/1.9.1/lib/" > > > > instead of the original: > > > > libdir = IO.popen('pkg-config --variable=libdir mono').read.strip > > > > It's just a quick and dirty hack, but it works. Mono is not registered > > with pkg-config using the official dmg installer: > > > > adaniele at mugen:/ $ pkg-config --list-all | grep mono > > adaniele at mugen:/ $ > > > > -- > > Daniele Alessandri > > http://www.clorophilla.net/blog/ > > _______________________________________________ > > 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 > -- Rob Bazinet InfoQ Ruby and .NET Editor http://www.accidentaltechnologist.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From bacondarwin at googlemail.com Sun May 11 08:14:48 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Sun, 11 May 2008 13:14:48 +0100 Subject: [Ironruby-core] RubyForge bug fixes In-Reply-To: <884300.27011.qm@web50612.mail.re2.yahoo.com> References: <884300.27011.qm@web50612.mail.re2.yahoo.com> Message-ID: <001801c8b360$9c5be6c0$d513b440$@com> Hi Unnikrishnan, Just a couple of points you might find useful: . A number of overloads have parameters like ..., object/*!*/ path, ... What you are saying to the Specsharp tool is that object should never be null. Is this what you want? Can you pass nil into the methods in MRI? If you can then you need to remove the /*!*/. If you can't then you probably need to add [NotNull] attribute or handle the case where the parameter is null within you method. Since you usually pass the value into CastToString, which handles the null case then probably removing the /*!*/ is what is required. . In Public Singleton methods I believe you can guarantee that the self parameter that gets passed in is actually the class that owns the method and so you can type this parameter to RubyClass/*!*/ if you want. Since the class is not being used in these methods it is not important, but it can save you a cast in other methods. . In some of the overloads you are using the Ruby regex classes. Do you know if MRI uses these and if so do they call the methods on them directly or via the Ruby method invocation process? If the latter then you need to use Dynamic Invocation to call the methods in your overloads [so that if someone monkey patches the Regex classes the behaviour shows up in the File class]. I suspect this is not the case but worth writing an RSpec for to check. . It might be worth pulling the MutableString objects that you use for comparison out into static readonly variables so that you don't have to keep instantiating them every call. Such as: private static readonly MutableString dotStar = MutableString.Create(".*"); and private static readonly MutableString empty = MutableString.CreateEmpty(); Hope that helps. Pete From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Unnikrishnan Nair Sent: Saturday,10 May 10, 2008 22:59 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] RubyForge bug fixes Hi John, Here is my code that I have, this is the first method I attemepted since this is one of the interesting logic. I thought I post my code for you to review as well. This passed most of the test as well [RubyMethod("basename", RubyMethodAttributes.PublicSingleton)] public static MutableString Basename(CodeContext/*!*/ context, object/*!*/ self, [NotNull]MutableString/*!*/ path) { MutableString[] tokens = path.Split(@"\/".ToCharArray(), Int32.MaxValue, StringSplitOptions.RemoveEmptyEntries); MutableString returnString = (tokens.GetLength(0) > 0) ? tokens[tokens.GetLength(0) - 1] : path; if ((tokens.GetLength(0) > 0) && (returnString.GetChar(returnString.Length - 1).Equals(':'))) returnString = path; return returnString; } [RubyMethod("basename", RubyMethodAttributes.PublicSingleton)] public static MutableString Basename(CodeContext/*!*/ context, object/*!*/ self, object/*!*/ path) { return Basename(context, self, Protocols.CastToString(context, path)); } [RubyMethod("basename", RubyMethodAttributes.PublicSingleton)] public static MutableString Basename(CodeContext/*!*/ context, object/*!*/ self, [NotNull]MutableString/*!*/ path, [NotNull]MutableString/*!*/ filter) { MutableString filename = Basename(context, self, path); //Treat ? specially if (filter.IndexOf('?') >= 0) return filename; //Treat .* and exetions specially using regex if (filter.Equals(MutableString.Create(".*"))) { filter.Clear(); filter.Append(@"(?x)(\.[^.]*$|$)"); } else { filter.Append("$"); } RubyRegex reg = new RubyRegex(filter, System.Text.RegularExpressions.RegexOptions.Singleline); System.Text.RegularExpressions.Match mat = reg.Match(filename); if (mat.Success) filename.Replace(mat.Index, mat.Length, MutableString.Create("")); return filename; } [RubyMethod("basename", RubyMethodAttributes.PublicSingleton)] public static MutableString Basename(CodeContext/*!*/ context, object/*!*/ self, object/*!*/ path, object/*!*/ filter) { return Basename(context, self, Protocols.CastToString(context, path), Protocols.CastToString(context, filter)); } Let me know what do you think? Yes, I found some problems with test spec as well, (bar.txt should be baz) Thanks. ----- Original Message ---- From: John Lam (IRONRUBY) To: "ironruby-core at rubyforge.org" Sent: Saturday, May 10, 2008 3:25:16 PM Subject: Re: [Ironruby-core] RubyForge bug fixes Unnikrishnan Nair: > Quick question, are these following assertions are correct? > > should_raise(TypeError){ File.basename(1) } > should_raise(TypeError){ File.basename("bar.txt", 1) } > should_raise(TypeError){ File.basename(true) } Yes they are. You can easily verify this in MRI yourself. In first and third cases, it hits the overload that accepts a nullable object as the first parameter. The TypeError is raised via Protocols.CastToString(). In the second case, it also hits an overload that accepts a nullable object as its second parameter, which raises TypeError via Protocols.CastToString(). FYI, this is the implementation of #basename that I have in my shelveset. It passes all of the (valid) specs - there are some legitimate bugs in our old copy of the specs (I haven't checked with the latest version of the rubinius specs - I'll do that next week). I'm a bit worried about how I'm handling the special cases for Windows. [RubyMethod("basename", RubyMethodAttributes.PublicSingleton)] public static MutableString/*!*/ Basename(CodeContext/*!*/ context, object/*!*/ self, [NotNull]MutableString/*!*/ path, [NotNull]MutableString/*!*/ extensionFilter) { if (path.Length == 0) return path; MutableString trimmedPath = TrimTrailingSlashes(path); // Special cases of drive letters C:\\ or C:/ if (trimmedPath.Length == 2) if (Char.IsLetter(trimmedPath.GetChar(0)) && trimmedPath.GetChar(1) == ':') return Kernel.FlowTaint(context, path, (path.Length > 2 ? MutableString.Create(path.GetChar(2).ToString()) : MutableString.Create(String.Empty))); string trimmedPathAsString = trimmedPath.ConvertToString(); if (trimmedPathAsString == "/") return trimmedPath; string filename = System.IO .Path.GetFileName(trimmedPath.ConvertToString()); // Handle UNC host names correctly string root = System.IO .Path.GetPathRoot(trimmedPath.ConvertToString()); if (extensionFilter.Length == 0) return trimmedPathAsString == root ? MutableString.Create(root) : MutableString.Create(filename); string fileExtension = System.IO .Path.GetExtension(filename); string basename = System.IO .Path.GetFileNameWithoutExtension(filename); string result = WildcardExtensionMatch(fileExtension, extensionFilter.ConvertToString()) ? basename : filename; return Kernel.FlowTaint(context, self, (result.Equals(root) ? MutableString.Create(root) : MutableString.Create(result))); } [RubyMethod("basename", RubyMethodAttributes.PublicSingleton)] public static MutableString/*!*/ Basename(CodeContext/*!*/ context, object/*!*/ self, [NotNull]MutableString/*!*/ path) { return Basename(context, self, path, MutableString.Empty); } [RubyMethod("basename", RubyMethodAttributes.PublicSingleton)] public static MutableString/*!*/ Basename(CodeContext/*!*/ context, object/*!*/ self, object path, object extension) { return Basename(context, self, Protocols.CastToString(context, path), Protocols.CastToString(context, extension)); } [RubyMethod("basename", RubyMethodAttributes.PublicSingleton)] public static MutableString/*!*/ Basename(CodeContext/*!*/ context, object/*!*/ self, object path) { return Basename(context, self, Protocols.CastToString(context, path)); } > Also, in the basename_spec the test setup has wrong parameter on > File.open(@name, 'w+'), if I change it to 'w', the test runs fine > otherwise none of the test works. This is correct. There is a bug in how we map the semantics of 'w+' to .NET IO. It's fixed in my shelveset. Thanks, -John _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: From bacondarwin at googlemail.com Sun May 11 08:22:38 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Sun, 11 May 2008 13:22:38 +0100 Subject: [Ironruby-core] Code Review: MutableString5 In-Reply-To: References: <001501c8b280$126005e0$372011a0$@com> Message-ID: <001d01c8b361$b4fc1c80$1ef45580$@com> One thing that MutableString could do with is public static MutableString/*!*/ CreateBinary(byte[]/*!*/ bytes, int start, int length) { At the moment you have to do something like: MutableString str = MutableString.CreateBinary(); str.Append(buffer, 0, received); Pete From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek Sent: Saturday,10 May 10, 2008 22:42 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review: MutableString5 $KCODE is orthogonal to the encoding in MutableString. $KCODE seems to be just a value that is used by some library methods that perform binary operations on textual data. MutableString.Encoding is encoding of the representation. If a MutableString instance is created from .NET string an encoding that is associated with it is used whenever the string is consumed by a binary data operation. We could represent all strings as byte[], but then you'd need to convert .NET strings to byte[] at the construction time. MutableString allows you to be lazy and perhaps not perform the conversion at all if not needed. Could you give some code sample that you think could be broken? Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Peter Bacon Darwin Sent: Saturday, May 10, 2008 2:27 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review: MutableString5 This is a big old diff to search through. I couldn't work out a way of easily patching it onto my source at home due to the folder differences. I really like this hybrid idea and it looks like it will work well. I have one question with regards to encodings and KCODE. I appreciate that String is changing between Ruby 1.8 and 1.9. It appears that this MutableString implementation is leaning more toward the 1.9 implementation (i.e. holding on to an Encoding within the String itself). 1.8 does hold the encoding and as I understand it the implicit encoding of the bytes held in a String is driven off KCODE. Is that correct? If so you have a number of scenarios which I think could cause problems with MutableString holding on to its own Encoding, which stem from times when KCODE is changed at runtime. I'll try to describe a concrete example and you can tell me where I am going wrong... Assume that KCODE is set to UTF8. If you create a String from an array of bytes in Ruby, the bytes are just stored as-is. You can do stuff which is encoding dependent and UTF8 is assumed. If you now change KCODE to say EUC, then the bytes in the String are unchanged but now encoding dependent operations will possibly produce different results on the same string since they interpret the bytes differently. The worry I have with MutableString, is that if you create a string from bytes but then do an operation that requires it to be converted to a CLR string internally. What happens when you change KCODE? You can't simply change the Encoding value of the MutableString, since if you then access the bytes you will not get the same bytes back as were originally put in. I suppose, on changing KCODE, you could go through all the strings in memory, which have been converted from binary to CLR strings, and convert them (i.e. back to bytes via the old encoding and then to CLR strings via the new encoding). What would be the optimal solution in this case? Again, I am not talking from a position of deep knowledge here so I may be missing something really obvious. But I thought it was worth asking the question. Regards, Pete From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek Sent: Friday,09 May 09, 2008 19:08 To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: [Ironruby-core] Code Review: MutableString5 tfpt review /shelveset:MutableString5;REDMOND\tomat A new implementation for Ruby MutableString and Ruby regular expression wrappers. This is just the first pass, w/o optimizations and w/o encodings (Default system encoding is used for all strings). Many improvements and adjustments will come in future, some hacks will be removed. Basic architecture: MutableString holds on Content and Encoding. Content is an abstract class that has three subclasses: 1) StringContent - Holds on an instance of System.String - an immutable .NET string. This is the default representation for strings coming from CLR methods and for Ruby string literals. - A textual write operation on the mutable string that has this content representation will cause implicit conversion of the representation to StringBuilderContent. - A binary read/write operation triggers a transition to BinaryContent using the Encoding stored on the owning MutableString. 2) StringBuilderContent - Holds on an instance of System.Text.StringBuilder - a mutable Unicode string. - A binary read/write operation transforms the content to BinaryContent representation. - StringBuilder is not optimal for some operations (requires unnecessary copying), we may consider to replace it with resizable char[]. 3) BinaryContent - A textual read/write operation transforms the content to StringBuilderContent representation. - List is currently used, but it doesn't fit many operations very well. We should replace it by resizable byte[]. The content representation is changed based upon operations that are performed on the mutable string. There is currently no limit on number of content type switches, so if one alternates binary and textual operations the conversion will take place for each one of them. Although this shouldn't be a common case we may consider to add some counters and keep the representation binary/textual based upon their values. The design assumes that the nature of operations implemented by library methods is of two kinds: textual and binary. And that data that are once treated as text are not usually treated as raw binary data later. Any text in the IronRuby runtime is represented as a sequence of 16bit Unicode characters (standard .NET representation). Each binary data treated as text is converted to this representation, regardless of the encoding used for storage representation in the file. The encoding is remembered in the MutableString instance and the original representation could be always recreated. Not all Unicode characters fit into 16 bits, therefore some exotic ones are represented by multiple characters (surrogates). If there is such a character in the string, some operations (e.g. indexing) might not be precise anymore - the n-th item in the char[] isn't the n-th Unicode character in the string (there might be escape characters). We believe this impreciseness is not a real world issue and is worth performance gain and implementation simplicity. Tomas -------------- next part -------------- An HTML attachment was scrubbed... URL: From bacondarwin at googlemail.com Sun May 11 08:34:14 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Sun, 11 May 2008 13:34:14 +0100 Subject: [Ironruby-core] (no subject) Message-ID: <002201c8b363$5375ea70$fa61bf50$@com> It would be useful to have a helper function to clean up this kind of code. Or is there one and I can't find it? RubyUtils.GetConstant(context, rubyClass, SymbolTable.StringToId(mutableString.ConvertToString()), true); -------------- next part -------------- An HTML attachment was scrubbed... URL: From curt at hagenlocher.org Sun May 11 08:38:16 2008 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Sun, 11 May 2008 05:38:16 -0700 Subject: [Ironruby-core] (no subject) In-Reply-To: <002201c8b363$5375ea70$fa61bf50$@com> References: <002201c8b363$5375ea70$fa61bf50$@com> Message-ID: MutableString.ToSymbol()? On Sun, May 11, 2008 at 5:34 AM, Peter Bacon Darwin < bacondarwin at googlemail.com> wrote: > It would be useful to have a helper function to clean up this kind of > code. Or is there one and I can't find it? > > > > RubyUtils.GetConstant(context, rubyClass, SymbolTable.StringToId(mutableString.ConvertToString()), > true); > > > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bacondarwin at googlemail.com Sun May 11 08:52:50 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Sun, 11 May 2008 13:52:50 +0100 Subject: [Ironruby-core] (no subject) In-Reply-To: References: <002201c8b363$5375ea70$fa61bf50$@com> Message-ID: <003301c8b365$ecd10810$c6731830$@com> Magic! Now the next question is should I be using: mutableString.ConvertToString() or mutableString.GetStringSlice(0) to get hold of a CLR string for passing to a .NET method. Both end up calling Content.GetStringSlice(...) anyway but the second one seems to go through slightly fewer method calls. My feeling is the former is more intuitive. Pete From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Curt Hagenlocher Sent: Sunday,11 May 11, 2008 13:38 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] (no subject) MutableString.ToSymbol()? On Sun, May 11, 2008 at 5:34 AM, Peter Bacon Darwin wrote: It would be useful to have a helper function to clean up this kind of code. Or is there one and I can't find it? RubyUtils.GetConstant(context, rubyClass, SymbolTable.StringToId(mutableString.ConvertToString()), true); _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: From bacondarwin at googlemail.com Sun May 11 09:17:46 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Sun, 11 May 2008 14:17:46 +0100 Subject: [Ironruby-core] running tests on server 2008 In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D92F0513A@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <372109E149E8084D8E6C7D9CFD82E0632D92F04C87@NA-EXMSG-C115.redmond.corp.microsoft.com> <372109E149E8084D8E6C7D9CFD82E0632D92F0513A@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <003801c8b369$68b4da80$3a1e8f80$@com> The chdir_spec warnings are to do with block-less calls to chdir within a block attached to another call to chdir. The following code does not raise a warning... irb(main):001:0> Dir.chdir("c:\\Windows") do irb(main):002:1* puts Dir.pwd irb(main):003:1> Dir.chdir("System32") do irb(main):004:2* puts Dir.pwd irb(main):005:2> end irb(main):006:1> puts Dir.pwd irb(main):007:1> end c:/Windows c:/Windows/System32 c:/Windows => nil But this code does... irb(main):008:0> Dir.chdir("c:\\Windows") do irb(main):009:1* puts Dir.pwd irb(main):010:1> Dir.chdir("System32") irb(main):011:1> puts Dir.pwd irb(main):012:1> end c:/Windows (irb):10: warning: conflicting chdir during another chdir block c:/Windows/System32 => nil It appears that the spec_runner is setting up a chdir block and that the chdir_spec is changing the directory explicitly (as you would expect) and Ruby gives a warning since, once the block exits, this new directory will be changed back to the one before the block began. Nothing to worry about, I think. Pete >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>> John Lam wrote: > Yes - that's what it's supposed to do. This is how we detect failure in our automated test > suites. I was more worried about the chdir_spec warnings that you showed. -------------- next part -------------- An HTML attachment was scrubbed... URL: From curt at hagenlocher.org Sun May 11 09:25:22 2008 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Sun, 11 May 2008 06:25:22 -0700 Subject: [Ironruby-core] (no subject) In-Reply-To: <003301c8b365$ecd10810$c6731830$@com> References: <002201c8b363$5375ea70$fa61bf50$@com> <003301c8b365$ecd10810$c6731830$@com> Message-ID: 1. ConvertToString is much more readable. 2. The JITter could theoretically eliminate one or more method calls anyway (though I can't say that I know for sure that it does). 3. We haven't done anything to optimize this new version of MutableString yet. In particular, we might find that getting a string from the same MutableString multiple times is a frequent enough operation that we'll cache the results after the first call. It's much less likely that such an optimization would be made for the output of Slice. My personal rule-of-thumb is that the code you write should clearly express your intent as cleanly as possible. We write code not just for the computer but also for other humans. Performance issues should be considered up front only when considering higher-level design, and for lower-level code are best identified later on through profiling. On Sun, May 11, 2008 at 5:52 AM, Peter Bacon Darwin < bacondarwin at googlemail.com> wrote: > Magic! > > > > Now the next question is should I be using: > > mutableString.ConvertToString() or mutableString.GetStringSlice(0) > > to get hold of a CLR string for passing to a .NET method. > > > > Both end up calling Content.GetStringSlice(...) anyway but the second one > seems to go through slightly fewer method calls. My feeling is the former > is more intuitive. > > > > Pete > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Curt Hagenlocher > *Sent:* Sunday,11 May 11, 2008 13:38 > *To:* ironruby-core at rubyforge.org > *Subject:* Re: [Ironruby-core] (no subject) > > > > MutableString.ToSymbol()? > > On Sun, May 11, 2008 at 5:34 AM, Peter Bacon Darwin < > bacondarwin at googlemail.com> wrote: > > It would be useful to have a helper function to clean up this kind of > code. Or is there one and I can't find it? > > > > RubyUtils.GetConstant(context, rubyClass, SymbolTable.StringToId(mutableString.ConvertToString()), > true); > > > > > > > _______________________________________________ > 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 ksunair at yahoo.com Sun May 11 10:14:38 2008 From: ksunair at yahoo.com (Unnikrishnan Nair) Date: Sun, 11 May 2008 07:14:38 -0700 (PDT) Subject: [Ironruby-core] RubyForge bug fixes Message-ID: <586871.33494.qm@web50611.mail.re2.yahoo.com> Hi Peter, Fantastic point, now that I am understanding the code, it makes perfect sense, I really appriciate the comments. Thanks. ----- Original Message ---- From: Peter Bacon Darwin To: ironruby-core at rubyforge.org Sent: Sunday, May 11, 2008 7:14:48 AM Subject: Re: [Ironruby-core] RubyForge bug fixes Hi Unnikrishnan, Just a couple of points you might find useful: ????????? A number of overloads have parameters like ..., object/*!*/ path, ... What you are saying to the Specsharp tool is that object should never be null.? Is this what you want?? Can you pass nil into the methods in MRI?? If you can then you need to remove the /*!*/.? If you can?t then you probably need to add [NotNull] attribute or handle the case where the parameter is null within you method.? Since you usually pass the value into CastToString, which handles the null case then probably removing the /*!*/ is what is required. ????????? In Public Singleton methods I believe you can guarantee that the self parameter that gets passed in is actually the class that owns the method and so you can type this parameter to RubyClass/*!*/ if you want.? Since the class is not being used in these methods it is not important, but it can save you a cast in other methods. ????????? In some of the overloads you are using the Ruby regex classes.? Do you know if MRI uses these and if so do they call the methods on them directly or via the Ruby method invocation process?? If the latter then you need to use Dynamic Invocation to call the methods in your overloads [so that if someone monkey patches the Regex classes the behaviour shows up in the File class].? I suspect this is not the case but worth writing an RSpec for to check. ????????? It might be worth pulling the MutableString objects that you use for comparison out into static readonly variables so that you don?t have to keep instantiating them every call.? Such as: private static readonly MutableString dotStar = MutableString.Create(".*"); and private static readonly MutableString empty = MutableString.CreateEmpty(); Hope that helps. Pete ? From:ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Unnikrishnan Nair Sent: Saturday,10 May 10, 2008 22:59 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] RubyForge bug fixes ? Hi John, ? Here is my code that I have, this is the first method I attemepted since this is one of the interesting logic. I thought I post my code for you to review as well. This passed most of the test as well ? [RubyMethod("basename", RubyMethodAttributes.PublicSingleton)] publicstatic MutableString Basename(CodeContext/*!*/ context, object/*!*/ self, [NotNull]MutableString/*!*/ path) { MutableString[] tokens = path.Split(@"\/".ToCharArray(), Int32.MaxValue, StringSplitOptions.RemoveEmptyEntries); MutableStringreturnString = (tokens.GetLength(0) > 0) ? tokens[tokens.GetLength(0) - 1] : path; if((tokens.GetLength(0) > 0) && (returnString.GetChar(returnString.Length - 1).Equals(':'))) returnString = path; returnreturnString; } [RubyMethod("basename", RubyMethodAttributes.PublicSingleton)] publicstatic MutableString Basename(CodeContext/*!*/ context, object/*!*/ self, object/*!*/ path) { returnBasename(context, self, Protocols.CastToString(context, path)); } [RubyMethod("basename", RubyMethodAttributes.PublicSingleton)] publicstatic MutableString Basename(CodeContext/*!*/ context, object/*!*/ self, [NotNull]MutableString/*!*/ path, [NotNull]MutableString/*!*/ filter) { MutableStringfilename = Basename(context, self, path); //Treat ? specially if(filter.IndexOf('?') >= 0) returnfilename; //Treat .* and exetions specially using regex if(filter.Equals(MutableString.Create(".*"))) { filter.Clear(); filter.Append(@"(?x)(\.[^.]*$|$)"); } else { filter.Append("$"); } RubyRegexreg = new RubyRegex(filter, System.Text.RegularExpressions.RegexOptions.Singleline); System.Text.RegularExpressions.Match mat = reg.Match(filename); if(mat.Success) filename.Replace(mat.Index, mat.Length, MutableString.Create("")); returnfilename; } [RubyMethod("basename", RubyMethodAttributes.PublicSingleton)] publicstatic MutableString Basename(CodeContext/*!*/ context, object/*!*/ self, object/*!*/ path, object/*!*/ filter) { returnBasename(context, self, Protocols.CastToString(context, path), Protocols.CastToString(context, filter)); } ? Let me know what do you think? Yes, I found some problems with test spec as well, (bar.txt should be baz) ? Thanks. ? ? ----- Original Message ---- From: John Lam (IRONRUBY) To: "ironruby-core at rubyforge.org" Sent: Saturday, May 10, 2008 3:25:16 PM Subject: Re: [Ironruby-core] RubyForge bug fixes Unnikrishnan Nair: > Quick question, are these following assertions are correct? > >? ? should_raise(TypeError){ File.basename(1) } >? ? should_raise(TypeError){ File.basename("bar.txt", 1) } >? ? should_raise(TypeError){ File.basename(true) } Yes they are. You can easily verify this in MRI yourself. In first and third cases, it hits the overload that accepts a nullable object as the first parameter. The TypeError is raised via Protocols.CastToString(). In the second case, it also hits an overload that accepts a nullable object as its second parameter, which raises TypeError via Protocols.CastToString(). FYI, this is the implementation of #basename that I have in my shelveset. It passes all of the (valid) specs - there are some legitimate bugs in our old copy of the specs (I haven't checked with the latest version of the rubinius specs - I'll do that next week). I'm a bit worried about how I'm handling the special cases for Windows. [RubyMethod("basename", RubyMethodAttributes.PublicSingleton)] public static MutableString/*!*/ Basename(CodeContext/*!*/ context, object/*!*/ self, [NotNull]MutableString/*!*/ path, [NotNull]MutableString/*!*/ extensionFilter) { ? ? if (path.Length == 0) ? ? ? ? return path; ? ? MutableString trimmedPath = TrimTrailingSlashes(path); ? ? // Special cases of drive letters C:\\ or C:/ ? ? if (trimmedPath.Length == 2) ? ? ? ? if (Char.IsLetter(trimmedPath.GetChar(0)) && trimmedPath.GetChar(1) == ':') ? ? ? ? ? ? return Kernel.FlowTaint(context, path, (path.Length > 2 ? MutableString.Create(path.GetChar(2).ToString()) : MutableString.Create(String.Empty))); ? ? string trimmedPathAsString = trimmedPath.ConvertToString(); ? ? if (trimmedPathAsString == "/") ? ? ? ? return trimmedPath; ? ? string filename = System.IO.Path.GetFileName(trimmedPath.ConvertToString()); ? ? // Handle UNC host names correctly ? ? string root = System.IO.Path.GetPathRoot(trimmedPath.ConvertToString()); ? ? if (extensionFilter.Length == 0) ? ? ? ? return trimmedPathAsString == root ? MutableString.Create(root) : MutableString.Create(filename); ? ? string fileExtension = System.IO.Path.GetExtension(filename); ? ? string basename = System.IO.Path.GetFileNameWithoutExtension(filename); ? ? string result = WildcardExtensionMatch(fileExtension, extensionFilter.ConvertToString()) ? basename : filename; ? ? return Kernel.FlowTaint(context, self, (result.Equals(root) ? MutableString.Create(root) : MutableString.Create(result))); } [RubyMethod("basename", RubyMethodAttributes.PublicSingleton)] public static MutableString/*!*/ Basename(CodeContext/*!*/ context, object/*!*/ self, [NotNull]MutableString/*!*/ path) { ? ? return Basename(context, self, path, MutableString.Empty); } [RubyMethod("basename", RubyMethodAttributes.PublicSingleton)] public static MutableString/*!*/ Basename(CodeContext/*!*/ context, object/*!*/ self, object path, object extension) { ? ? return Basename(context, self, Protocols.CastToString(context, path), Protocols.CastToString(context, extension)); } [RubyMethod("basename", RubyMethodAttributes.PublicSingleton)] public static MutableString/*!*/ Basename(CodeContext/*!*/ context, object/*!*/ self, object path) { ? ? return Basename(context, self, Protocols.CastToString(context, path)); } > Also, in the basename_spec the test setup has wrong parameter on > File.open(@name, 'w+'), if I change it to 'w', the test runs fine > otherwise none of the test works. This is correct. There is a bug in how we map the semantics of 'w+' to .NET IO. It's fixed in my shelveset. Thanks, -John _______________________________________________ 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 Sun May 11 13:10:05 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Sun, 11 May 2008 10:10:05 -0700 Subject: [Ironruby-core] Code Review: MutableString5 In-Reply-To: <001d01c8b361$b4fc1c80$1ef45580$@com> References: <001501c8b280$126005e0$372011a0$@com> <001d01c8b361$b4fc1c80$1ef45580$@com> Message-ID: I thought about that, but given that there are like 15 overloads for Append it might be an unnecessary code duplication to add them for constructors as well. You can do it on a single line too: MutableString str = MutableString.CreateBinary(received).Append(buffer, 0, received); Append returns the MutableString instance back and you can also specify estimated capacity to CreateBinary if you know it. Let's use this for now and if the patter is very often let's consider adding more overloads. Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Peter Bacon Darwin Sent: Sunday, May 11, 2008 5:23 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review: MutableString5 One thing that MutableString could do with is public static MutableString/*!*/ CreateBinary(byte[]/*!*/ bytes, int start, int length) { At the moment you have to do something like: MutableString str = MutableString.CreateBinary(); str.Append(buffer, 0, received); Pete From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek Sent: Saturday,10 May 10, 2008 22:42 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review: MutableString5 $KCODE is orthogonal to the encoding in MutableString. $KCODE seems to be just a value that is used by some library methods that perform binary operations on textual data. MutableString.Encoding is encoding of the representation. If a MutableString instance is created from .NET string an encoding that is associated with it is used whenever the string is consumed by a binary data operation. We could represent all strings as byte[], but then you'd need to convert .NET strings to byte[] at the construction time. MutableString allows you to be lazy and perhaps not perform the conversion at all if not needed. Could you give some code sample that you think could be broken? Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Peter Bacon Darwin Sent: Saturday, May 10, 2008 2:27 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review: MutableString5 This is a big old diff to search through. I couldn't work out a way of easily patching it onto my source at home due to the folder differences. I really like this hybrid idea and it looks like it will work well. I have one question with regards to encodings and KCODE. I appreciate that String is changing between Ruby 1.8 and 1.9. It appears that this MutableString implementation is leaning more toward the 1.9 implementation (i.e. holding on to an Encoding within the String itself). 1.8 does hold the encoding and as I understand it the implicit encoding of the bytes held in a String is driven off KCODE. Is that correct? If so you have a number of scenarios which I think could cause problems with MutableString holding on to its own Encoding, which stem from times when KCODE is changed at runtime. I'll try to describe a concrete example and you can tell me where I am going wrong... Assume that KCODE is set to UTF8. If you create a String from an array of bytes in Ruby, the bytes are just stored as-is. You can do stuff which is encoding dependent and UTF8 is assumed. If you now change KCODE to say EUC, then the bytes in the String are unchanged but now encoding dependent operations will possibly produce different results on the same string since they interpret the bytes differently. The worry I have with MutableString, is that if you create a string from bytes but then do an operation that requires it to be converted to a CLR string internally. What happens when you change KCODE? You can't simply change the Encoding value of the MutableString, since if you then access the bytes you will not get the same bytes back as were originally put in. I suppose, on changing KCODE, you could go through all the strings in memory, which have been converted from binary to CLR strings, and convert them (i.e. back to bytes via the old encoding and then to CLR strings via the new encoding). What would be the optimal solution in this case? Again, I am not talking from a position of deep knowledge here so I may be missing something really obvious. But I thought it was worth asking the question. Regards, Pete From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek Sent: Friday,09 May 09, 2008 19:08 To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: [Ironruby-core] Code Review: MutableString5 tfpt review /shelveset:MutableString5;REDMOND\tomat A new implementation for Ruby MutableString and Ruby regular expression wrappers. This is just the first pass, w/o optimizations and w/o encodings (Default system encoding is used for all strings). Many improvements and adjustments will come in future, some hacks will be removed. Basic architecture: MutableString holds on Content and Encoding. Content is an abstract class that has three subclasses: 1) StringContent - Holds on an instance of System.String - an immutable .NET string. This is the default representation for strings coming from CLR methods and for Ruby string literals. - A textual write operation on the mutable string that has this content representation will cause implicit conversion of the representation to StringBuilderContent. - A binary read/write operation triggers a transition to BinaryContent using the Encoding stored on the owning MutableString. 2) StringBuilderContent - Holds on an instance of System.Text.StringBuilder - a mutable Unicode string. - A binary read/write operation transforms the content to BinaryContent representation. - StringBuilder is not optimal for some operations (requires unnecessary copying), we may consider to replace it with resizable char[]. 3) BinaryContent - A textual read/write operation transforms the content to StringBuilderContent representation. - List is currently used, but it doesn't fit many operations very well. We should replace it by resizable byte[]. The content representation is changed based upon operations that are performed on the mutable string. There is currently no limit on number of content type switches, so if one alternates binary and textual operations the conversion will take place for each one of them. Although this shouldn't be a common case we may consider to add some counters and keep the representation binary/textual based upon their values. The design assumes that the nature of operations implemented by library methods is of two kinds: textual and binary. And that data that are once treated as text are not usually treated as raw binary data later. Any text in the IronRuby runtime is represented as a sequence of 16bit Unicode characters (standard .NET representation). Each binary data treated as text is converted to this representation, regardless of the encoding used for storage representation in the file. The encoding is remembered in the MutableString instance and the original representation could be always recreated. Not all Unicode characters fit into 16 bits, therefore some exotic ones are represented by multiple characters (surrogates). If there is such a character in the string, some operations (e.g. indexing) might not be precise anymore - the n-th item in the char[] isn't the n-th Unicode character in the string (there might be escape characters). We believe this impreciseness is not a real world issue and is worth performance gain and implementation simplicity. Tomas -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.david at xmlhacker.com Mon May 12 07:00:58 2008 From: m.david at xmlhacker.com (M. David Peterson) Date: Mon, 12 May 2008 05:00:58 -0600 Subject: [Ironruby-core] Interactive IronRuby "Try Ruby in Your Browser" Shell Message-ID: For those who haven't seen this, Oleg Tkachenko, one of the XML MVP's, hacked together a 0.first.hack version of the "Try Ruby in Your Browser" demo last night. > http://www.tkachenko.com/blog/archives/000742.html From what I can tell, this doesn't use Silverlight in any way, shape, or form > http://www.ironruby.info/ir/ < sending each command back to the server for processing. Not sure how he's handling state, but it certainly seems to be handling state management just fine. -- /M:D M. David Peterson Co-Founder & Chief Architect, 3rd&Urban, LLC Email: m.david at xmlhacker.com | m.david at amp.fm | Mobile: (206) 418-9027 Web: http://amp.fm/ | http://www.oreillynet.com/pub/au/2354 From lists at ruby-forum.com Mon May 12 07:42:30 2008 From: lists at ruby-forum.com (Softmind Technology) Date: Mon, 12 May 2008 13:42:30 +0200 Subject: [Ironruby-core] Interactive IronRuby "Try Ruby in Your Browser" Shell In-Reply-To: References: Message-ID: <990d7520857405e1dd9afe2c0b16ea5f@ruby-forum.com> Great News! It seems IronRuby is moving ahead now.. It was dull to see nothing happening with IronRuby since last few months. NOW... it seems, world around IronRuby is on Fast Track. -- Posted via http://www.ruby-forum.com/. From w.kelly at qut.edu.au Mon May 12 08:24:50 2008 From: w.kelly at qut.edu.au (Wayne Kelly) Date: Mon, 12 May 2008 22:24:50 +1000 Subject: [Ironruby-core] Standard library inventory Message-ID: Hi, I'd like to request a quick implementation status update on the Ruby standard libraries that contain native code ... If you are working on any of the following or know any additional information about any of the following, could you please post a followup email? The following standard libraries are implemented at least to some degree in the IronRuby.Libraries assembly (not sure which are totally complete): digest.so -> IronRuby.Libraries\Digest\Digest.cs digest\md5.so -> IronRuby.Libraries\Digest\Digest.cs openssl.so -> IronRuby.Libraries\OpenSSL\OpenSSL.cs socket.so -> IronRuby.Libraries\Builtin\Socket.cs strscan.so -> IronRuby.Libraries\Builtin\StringScanner.cs zlib.so -> IronRuby.Libraries\Zlib\zlib.cs The following libraries are used by the simple gem and rails use cases that I've been investigating, but don't yet have a checked implementation: digest/sha1.so bigdecimal.so enumerator.so etc.so fcntl.so nkf.so -> Andrew Peters? racc/cparse.so stringio.so -> Eduardo? syck.so -> John Messerly? thread.so -> can be replaced by original thread.rb? Win32API.so -> can be just deleted? The following libraries are not used in any of the simple gems and rails use cases that I've been considering. (please let us know if there are any in here that you think should be made a priority): curses.so dbm.so -> used by YAML? dl.so -> used by sqlite3 driver? gdbm.so iconv.so -> used by actionmailer? io.so pty.so readline -> used by debug.rb sdbm.so syslog.so tk.so win32ole.so Cheers, Wayne. From bacondarwin at googlemail.com Mon May 12 08:58:26 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Mon, 12 May 2008 13:58:26 +0100 Subject: [Ironruby-core] Standard library inventory In-Reply-To: References: Message-ID: <002501c8b42f$e0081db0$a0185910$@com> I have been working on the Socket library. John Lam, recently posted a code-review of a patch that I had submitted to RubyForge. I expect the modified patch to get pushed through the process soon. This patch hits most of the Socket classes but not Socket itself. Meanwhile, I have implemented the rest of the Socket class and started working on RSpecs for it. Once these changes are submitted and accepted into the fold then all the methods picked up by Wayne as being required for the specified Rails cases will be implemented. Pete From ksunair at yahoo.com Mon May 12 09:44:17 2008 From: ksunair at yahoo.com (Unnikrishnan Nair) Date: Mon, 12 May 2008 06:44:17 -0700 (PDT) Subject: [Ironruby-core] changes to basename_spec.rb Message-ID: <417406.20694.qm@web50605.mail.re2.yahoo.com> I found couple of problems with the basename spec and I am attaching the modified one for your review. I left the "w+" as it is, with your new changes, this should work. Also couple of places the checks for 'bar' against 'baz', I correct the spelling and one last thing, couple of places the assertion were read 'shoould' instead of 'should'. I fixed them as well. Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: basename_spec.rb Type: application/octet-stream Size: 5639 bytes Desc: not available URL: From jdeville at microsoft.com Mon May 12 12:20:41 2008 From: jdeville at microsoft.com (Jim Deville) Date: Mon, 12 May 2008 09:20:41 -0700 Subject: [Ironruby-core] changes to basename_spec.rb In-Reply-To: <417406.20694.qm@web50605.mail.re2.yahoo.com> References: <417406.20694.qm@web50605.mail.re2.yahoo.com> Message-ID: Cool, I'll take a look and incorporate them into the new specs. JD From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Unnikrishnan Nair Sent: Monday, May 12, 2008 6:44 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] changes to basename_spec.rb I found couple of problems with the basename spec and I am attaching the modified one for your review. I left the "w+" as it is, with your new changes, this should work. Also couple of places the checks for 'bar' against 'baz', I correct the spelling and one last thing, couple of places the assertion were read 'shoould' instead of 'should'. I fixed them as well. Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From oleg at tkachenko.com Mon May 12 12:46:59 2008 From: oleg at tkachenko.com (Oleg Tkachenko) Date: Mon, 12 May 2008 09:46:59 -0700 Subject: [Ironruby-core] Try IronRuby in your browser Message-ID: <48287483.3060509@tkachenko.com> Hello! I put together some simple version of IronRuby powered "Try Ruby" [1]. This is just night hack, I hope to improve it. Now, the problem is that anybody can crash it with "def f() f() end", "f()". I mean StackOverflowException, which is really bad on shared ASP.NET hosting. Any idea if IronRuby can prevent stack overflow? I'm volunteering to contribute an implementation if so. [1] http://www.ironruby.info/ir/ -- Oleg From jdeville at microsoft.com Mon May 12 12:49:44 2008 From: jdeville at microsoft.com (Jim Deville) Date: Mon, 12 May 2008 09:49:44 -0700 Subject: [Ironruby-core] Standard library inventory In-Reply-To: <002501c8b42f$e0081db0$a0185910$@com> References: <002501c8b42f$e0081db0$a0185910$@com> Message-ID: Just so you are aware, when we switch to the new spec suite (this week after the DLR tuple fix) we will have a location for those specs in /specs/ruby/1.8/core/library/socket. There are existing files in my shelveset, but not many of them have more than the requires. JD -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Peter Bacon Darwin Sent: Monday, May 12, 2008 5:58 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Standard library inventory I have been working on the Socket library. John Lam, recently posted a code-review of a patch that I had submitted to RubyForge. I expect the modified patch to get pushed through the process soon. This patch hits most of the Socket classes but not Socket itself. Meanwhile, I have implemented the rest of the Socket class and started working on RSpecs for it. Once these changes are submitted and accepted into the fold then all the methods picked up by Wayne as being required for the specified Rails cases will be implemented. Pete _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From bacondarwin at googlemail.com Mon May 12 13:12:27 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Mon, 12 May 2008 18:12:27 +0100 Subject: [Ironruby-core] Try IronRuby in your browser In-Reply-To: <48287483.3060509@tkachenko.com> References: <48287483.3060509@tkachenko.com> Message-ID: <005f01c8b453$5b8e5940$12ab0bc0$@com> You may want to check out Why's blog for other ways people have tried to crash his implementation of try Ruby: http://redhanded.hobix.com/inspect/205000LinesOfRubyCodeDonatedInTheTryRubyD rive.html Pete -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Oleg Tkachenko Sent: Monday,12 May 12, 2008 17:47 To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Try IronRuby in your browser Hello! I put together some simple version of IronRuby powered "Try Ruby" [1]. This is just night hack, I hope to improve it. Now, the problem is that anybody can crash it with "def f() f() end", "f()". I mean StackOverflowException, which is really bad on shared ASP.NET hosting. Any idea if IronRuby can prevent stack overflow? I'm volunteering to contribute an implementation if so. [1] http://www.ironruby.info/ir/ -- Oleg _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From curt at hagenlocher.org Mon May 12 13:18:35 2008 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Mon, 12 May 2008 10:18:35 -0700 Subject: [Ironruby-core] Try IronRuby in your browser In-Reply-To: <48287483.3060509@tkachenko.com> References: <48287483.3060509@tkachenko.com> Message-ID: You might want to change your blog entry to say "OSI-approved Open Source license" instead of "GPL-based license" so that you don't give our lawyers a collective heart attack ;). On Mon, May 12, 2008 at 9:46 AM, Oleg Tkachenko wrote: > Hello! > > I put together some simple version of IronRuby powered "Try Ruby" [1]. > This is just night hack, I hope to improve it. > > Now, the problem is that anybody can crash it with "def f() f() end", > "f()". I mean StackOverflowException, which is really bad on shared > ASP.NET hosting. > > Any idea if IronRuby can prevent stack overflow? I'm volunteering to > contribute an implementation if so. > > > [1] http://www.ironruby.info/ir/ > -- > Oleg > > > _______________________________________________ > 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 michael.letterle at gmail.com Mon May 12 13:38:12 2008 From: michael.letterle at gmail.com (Michael Letterle) Date: Mon, 12 May 2008 13:38:12 -0400 Subject: [Ironruby-core] Try IronRuby in your browser In-Reply-To: References: <48287483.3060509@tkachenko.com> Message-ID: "OSI-approved/GPL-inspired may be more appropriate" ;) On Mon, May 12, 2008 at 1:18 PM, Curt Hagenlocher wrote: > You might want to change your blog entry to say "OSI-approved Open Source > license" instead of "GPL-based license" so that you don't give our lawyers a > collective heart attack ;). > > > On Mon, May 12, 2008 at 9:46 AM, Oleg Tkachenko > wrote: > > > Hello! > > > > I put together some simple version of IronRuby powered "Try Ruby" [1]. > > This is just night hack, I hope to improve it. > > > > Now, the problem is that anybody can crash it with "def f() f() end", > > "f()". I mean StackOverflowException, which is really bad on shared > > ASP.NET hosting. > > > > Any idea if IronRuby can prevent stack overflow? I'm volunteering to > > contribute an implementation if so. > > > > > > [1] http://www.ironruby.info/ir/ > > -- > > Oleg > > > > > > _______________________________________________ > > Ironruby-core mailing list > > Ironruby-core at rubyforge.org > > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -- Michael Letterle [Polymath Prokrammer] http://blog.prokrams.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From Shri.Borde at microsoft.com Mon May 12 14:29:10 2008 From: Shri.Borde at microsoft.com (Shri Borde) Date: Mon, 12 May 2008 11:29:10 -0700 Subject: [Ironruby-core] Try IronRuby in your browser In-Reply-To: References: <48287483.3060509@tkachenko.com> Message-ID: <50B69702CA6E6D4E849D30CD4989AB8EE7AC60D16E@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Hi Oleg, You can prevent stack overflow by explicitly maintaining the recursion count. See http://lists.ironpython.com/pipermail/users-ironpython.com/2007-October/005694.html for a related thread about IronPython. However, such a fix in IronRuby would be in IronRuby.dll, and so we could not accept your patch. You could try patching it for your own version of IronRuby if wanted. Thanks, Shri Want to work on IronPython, IronRuby, F#? Visit http://blogs.msdn.com/ironpython From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Curt Hagenlocher Sent: Monday, May 12, 2008 10:19 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Try IronRuby in your browser You might want to change your blog entry to say "OSI-approved Open Source license" instead of "GPL-based license" so that you don't give our lawyers a collective heart attack ;). On Mon, May 12, 2008 at 9:46 AM, Oleg Tkachenko > wrote: Hello! I put together some simple version of IronRuby powered "Try Ruby" [1]. This is just night hack, I hope to improve it. Now, the problem is that anybody can crash it with "def f() f() end", "f()". I mean StackOverflowException, which is really bad on shared ASP.NET hosting. Any idea if IronRuby can prevent stack overflow? I'm volunteering to contribute an implementation if so. [1] http://www.ironruby.info/ir/ -- Oleg _______________________________________________ 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 oleg at tkachenko.com Mon May 12 14:28:01 2008 From: oleg at tkachenko.com (Oleg Tkachenko) Date: Mon, 12 May 2008 11:28:01 -0700 Subject: [Ironruby-core] Try IronRuby in your browser In-Reply-To: References: <48287483.3060509@tkachenko.com> Message-ID: <48288C31.50700@tkachenko.com> Ok, fixed license name. Lawyers can relax now :) I'm saving keystrokes too, should be fun to watch. I'm gonna share saved data after several days. Oleg Michael Letterle wrote: > "OSI-approved/GPL-inspired may be more appropriate" ;) > > On Mon, May 12, 2008 at 1:18 PM, Curt Hagenlocher > wrote: > > You might want to change your blog entry to say "OSI-approved Open > Source license" instead of "GPL-based license" so that you don't > give our lawyers a collective heart attack ;). > > > On Mon, May 12, 2008 at 9:46 AM, Oleg Tkachenko > wrote: > > Hello! > > I put together some simple version of IronRuby powered "Try > Ruby" [1]. > This is just night hack, I hope to improve it. > > Now, the problem is that anybody can crash it with "def f() f() > end", > "f()". I mean StackOverflowException, which is really bad on shared > ASP.NET hosting. > > Any idea if IronRuby can prevent stack overflow? I'm volunteering to > contribute an implementation if so. > > > [1] http://www.ironruby.info/ir/ > -- > Oleg > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > > -- > Michael Letterle > [Polymath Prokrammer] > http://blog.prokrams.com > > > ------------------------------------------------------------------------ > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From cjac at colliertech.org Mon May 12 16:01:25 2008 From: cjac at colliertech.org (C.J. Adams-Collier) Date: Mon, 12 May 2008 13:01:25 -0700 Subject: [Ironruby-core] Try IronRuby in your browser In-Reply-To: <50B69702CA6E6D4E849D30CD4989AB8EE7AC60D16E@DF-GRTDANE-MSG.exchange.corp.microsoft.com> References: <48287483.3060509@tkachenko.com> <50B69702CA6E6D4E849D30CD4989AB8EE7AC60D16E@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: <1210622485.23961.95.camel@cjac.intra.cardomain.com> Hey there Shri, Do you accept changes provided that the contributor has assigned copyright to Microsoft? http://lwn.net/Articles/272265/ http://www.copylaw.com/forms/copyassn.html http://www.update.uu.se/~ams/inetutils/gnulib/doc/Copyright/request-assign.changes Cheers, C.J. On Mon, 2008-05-12 at 11:29 -0700, Shri Borde wrote: > Hi Oleg, > > > > You can prevent stack overflow by explicitly maintaining the recursion > count. See > http://lists.ironpython.com/pipermail/users-ironpython.com/2007-October/005694.html for a related thread about IronPython. However, such a fix in IronRuby would be in IronRuby.dll, and so we could not accept your patch. You could try patching it for your own version of IronRuby if wanted. > > > > Thanks, > > Shri > > Want to work on IronPython, IronRuby, F#?Visit > http://blogs.msdn.com/ironpython > > > > From:ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Curt > Hagenlocher > Sent: Monday, May 12, 2008 10:19 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Try IronRuby in your browser > > > > > You might want to change your blog entry to say "OSI-approved Open > Source license" instead of "GPL-based license" so that you don't give > our lawyers a collective heart attack ;). > > On Mon, May 12, 2008 at 9:46 AM, Oleg Tkachenko > wrote: > > Hello! > > I put together some simple version of IronRuby powered "Try Ruby" [1]. > This is just night hack, I hope to improve it. > > Now, the problem is that anybody can crash it with "def f() f() end", > "f()". I mean StackOverflowException, which is really bad on shared > ASP.NET hosting. > > Any idea if IronRuby can prevent stack overflow? I'm volunteering to > contribute an implementation if so. > > > [1] http://www.ironruby.info/ir/ > -- > Oleg > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From jflam at microsoft.com Mon May 12 16:09:42 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Mon, 12 May 2008 13:09:42 -0700 Subject: [Ironruby-core] Try IronRuby in your browser In-Reply-To: <1210622485.23961.95.camel@cjac.intra.cardomain.com> References: <48287483.3060509@tkachenko.com> <50B69702CA6E6D4E849D30CD4989AB8EE7AC60D16E@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <1210622485.23961.95.camel@cjac.intra.cardomain.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D92F05A72@NA-EXMSG-C115.redmond.corp.microsoft.com> C.J. Adams-Collier: > Do you accept changes provided that the contributor has assigned > copyright to Microsoft? > > http://lwn.net/Articles/272265/ > http://www.copylaw.com/forms/copyassn.html > http://www.update.uu.se/~ams/inetutils/gnulib/doc/Copyright/request- > assign.changes We accept changes to the IronRuby.Libraries project only, and only if there's a signed contributor agreement. We will accept trivial patches to IronRuby.dll, but generally only things like a missed conditional etc. - no feature additions are accepted there. We will open things up fully once we get to a 1.0 release of the DLR. Thanks, -John From Jimmy.Schementi at microsoft.com Mon May 12 16:13:08 2008 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Mon, 12 May 2008 13:13:08 -0700 Subject: [Ironruby-core] Try IronRuby in your browser In-Reply-To: <48287483.3060509@tkachenko.com> References: <48287483.3060509@tkachenko.com> Message-ID: <5283CA0A4168DF4FBBD71AE9ECA5A32845804CAD61@NA-EXMSG-C116.redmond.corp.microsoft.com> Yeah, you can crash your browser if you execute something similar in Silverlight. Gets really hard to figure out when you've got a recursive method_missing call =P I was having *fun* with this last night: http://twitter.com/jschementi/statuses/809136066. But that's not as serious as stack overflowing a shared host =P ~js > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Oleg Tkachenko > Sent: Monday, May 12, 2008 9:47 AM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] Try IronRuby in your browser > > Hello! > > I put together some simple version of IronRuby powered "Try Ruby" [1]. > This is just night hack, I hope to improve it. > > Now, the problem is that anybody can crash it with "def f() f() end", > "f()". I mean StackOverflowException, which is really bad on shared > ASP.NET hosting. > > Any idea if IronRuby can prevent stack overflow? I'm volunteering to > contribute an implementation if so. > > > [1] http://www.ironruby.info/ir/ > -- > Oleg > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From blowmage at gmail.com Mon May 12 16:18:48 2008 From: blowmage at gmail.com (Mike Moore) Date: Mon, 12 May 2008 14:18:48 -0600 Subject: [Ironruby-core] Try IronRuby in your browser In-Reply-To: <1210622485.23961.95.camel@cjac.intra.cardomain.com> References: <48287483.3060509@tkachenko.com> <50B69702CA6E6D4E849D30CD4989AB8EE7AC60D16E@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <1210622485.23961.95.camel@cjac.intra.cardomain.com> Message-ID: I think the issue is vetting the contribution. Microsoft wants to protect itself and make sure that anything in the "core" hasn't violated an existing copyright. As I understand it, Microsoft considers it prohibitivly expensive to ensure that all contributions aren't already copywritten, which is why they don't accept patches to the core yet. Once the DLR is stabilized they will allow contributions to the IronRuby core because it can no longer influence the DLR core. On 5/12/08, C.J. Adams-Collier wrote: > > Hey there Shri, > > Do you accept changes provided that the contributor has assigned > copyright to Microsoft? > > http://lwn.net/Articles/272265/ > http://www.copylaw.com/forms/copyassn.html > > http://www.update.uu.se/~ams/inetutils/gnulib/doc/Copyright/request-assign.changes > > Cheers, > > C.J. > > > On Mon, 2008-05-12 at 11:29 -0700, Shri Borde wrote: > > Hi Oleg, > > > > > > > > You can prevent stack overflow by explicitly maintaining the recursion > > count. See > > > http://lists.ironpython.com/pipermail/users-ironpython.com/2007-October/005694.htmlfor a related thread about IronPython. However, such a fix in IronRuby would > be in IronRuby.dll, and so we could not accept your patch. You could try > patching it for your own version of IronRuby if wanted. > > > > > > > > Thanks, > > > > Shri > > > > Want to work on IronPython, IronRuby, F#?Visit > > http://blogs.msdn.com/ironpython > > > > > > > > From:ironruby-core-bounces at rubyforge.org > > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Curt > > Hagenlocher > > Sent: Monday, May 12, 2008 10:19 AM > > To: ironruby-core at rubyforge.org > > Subject: Re: [Ironruby-core] Try IronRuby in your browser > > > > > > > > > > You might want to change your blog entry to say "OSI-approved Open > > Source license" instead of "GPL-based license" so that you don't give > > our lawyers a collective heart attack ;). > > > > On Mon, May 12, 2008 at 9:46 AM, Oleg Tkachenko > > wrote: > > > > Hello! > > > > I put together some simple version of IronRuby powered "Try Ruby" [1]. > > This is just night hack, I hope to improve it. > > > > Now, the problem is that anybody can crash it with "def f() f() end", > > "f()". I mean StackOverflowException, which is really bad on shared > > ASP.NET hosting. > > > > Any idea if IronRuby can prevent stack overflow? I'm volunteering to > > contribute an implementation if so. > > > > > > [1] http://www.ironruby.info/ir/ > > -- > > Oleg > > > > > > _______________________________________________ > > Ironruby-core mailing list > > Ironruby-core at rubyforge.org > > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > > > > > > > > > _______________________________________________ > > Ironruby-core mailing list > > Ironruby-core at rubyforge.org > > http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From oleg at tkachenko.com Mon May 12 16:35:23 2008 From: oleg at tkachenko.com (Oleg Tkachenko) Date: Mon, 12 May 2008 13:35:23 -0700 Subject: [Ironruby-core] Interactive IronRuby "Try Ruby in Your Browser" Shell In-Reply-To: References: Message-ID: <4828AA0B.6000001@tkachenko.com> Thanks for posting it here. This is just ASP.NET page hosting Ruby runtime server side. Probably Silverlight would be a better fit here, at least then the worst you could do is to crash your browser instead of server. Hey, we can build complete Ruby IDE with Silverlight! Oleg M. David Peterson wrote: > For those who haven't seen this, Oleg Tkachenko, one of the XML MVP's, hacked together a 0.first.hack version of the "Try Ruby in Your Browser" demo last night. > http://www.tkachenko.com/blog/archives/000742.html > > From what I can tell, this doesn't use Silverlight in any way, shape, or form > http://www.ironruby.info/ir/ < sending each command back to the server for processing. Not sure how he's handling state, but it certainly seems to be handling state management just fine. > From m.david at xmlhacker.com Mon May 12 16:42:17 2008 From: m.david at xmlhacker.com (M. David Peterson) Date: Mon, 12 May 2008 14:42:17 -0600 Subject: [Ironruby-core] Interactive IronRuby "Try Ruby in Your Browser" Shell In-Reply-To: <4828AA0B.6000001@tkachenko.com> References: <4828AA0B.6000001@tkachenko.com> Message-ID: On Mon, 12 May 2008 14:35:23 -0600, Oleg Tkachenko wrote: > Hey, we can build complete Ruby IDE with Silverlight! I like the way you think, Oleg! Let's sync up offline about this very topic... -- /M:D M. David Peterson Co-Founder & Chief Architect, 3rd&Urban, LLC Email: m.david at xmlhacker.com | m.david at amp.fm | Mobile: (206) 418-9027 Web: http://amp.fm/ | http://www.oreillynet.com/pub/au/2354 From andrew at mindscape.co.nz Mon May 12 17:29:21 2008 From: andrew at mindscape.co.nz (Andrew Peters) Date: Tue, 13 May 2008 09:29:21 +1200 Subject: [Ironruby-core] Standard library inventory In-Reply-To: References: <002501c8b42f$e0081db0$a0185910$@com> Message-ID: <771cfe010805121429v5fb87427h920d1a018e441cb4@mail.gmail.com> I'm working on NKF which was the first blocker I encountered after I started looking at sqlite3-ruby. Is anyone else working on sqlite? Andrew. On Tue, May 13, 2008 at 4:49 AM, Jim Deville wrote: > Just so you are aware, when we switch to the new spec suite (this week > after the DLR tuple fix) we will have a location for those specs in > /specs/ruby/1.8/core/library/socket. There are existing files in my > shelveset, but not many of them have more than the requires. > > JD > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] On Behalf Of Peter Bacon Darwin > Sent: Monday, May 12, 2008 5:58 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Standard library inventory > > I have been working on the Socket library. John Lam, recently posted a > code-review of a patch that I had submitted to RubyForge. I expect the > modified patch to get pushed through the process soon. This patch hits > most > of the Socket classes but not Socket itself. > > Meanwhile, I have implemented the rest of the Socket class and started > working on RSpecs for it. > > Once these changes are submitted and accepted into the fold then all the > methods picked up by Wayne as being required for the specified Rails cases > will be implemented. > > Pete > > > _______________________________________________ > 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 ksunair at yahoo.com Mon May 12 17:56:25 2008 From: ksunair at yahoo.com (Unnikrishnan) Date: Mon, 12 May 2008 14:56:25 -0700 (PDT) Subject: [Ironruby-core] Interactive IronRuby "Try Ruby in Your Browser" Shell Message-ID: <474235.3985.qm@web50604.mail.re2.yahoo.com> Silver light and ironruby, I like that idea... Keep me posted ... I would love contribute .....2 On May 12, 2008, at 3:35 PM, Oleg Tkachenko wrote: Thanks for posting it here. This is just ASP.NET page hosting Ruby runtime server side. Probably Silverlight would be a better fit here, at least then the worst you could do is to crash your browser instead of server. Hey, we can build complete Ruby IDE with Silverlight! Oleg M. David Peterson wrote: For those who haven't seen this, Oleg Tkachenko, one of the XML MVP's, hacked together a 0.first.hack version of the "Try Ruby in Your Browser" demo last night. > http://www.tkachenko.com/blog/archives/000742.html >From what I can tell, this doesn't use Silverlight in any way, shape, or form > http://www.ironruby.info/ir/ < sending each command back to the server for processing. Not sure how he's handling state, but it certainly seems to be handling state management just fine. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From cjac at colliertech.org Mon May 12 18:07:37 2008 From: cjac at colliertech.org (C.J. Adams-Collier) Date: Mon, 12 May 2008 15:07:37 -0700 Subject: [Ironruby-core] Try IronRuby in your browser In-Reply-To: References: <48287483.3060509@tkachenko.com> <50B69702CA6E6D4E849D30CD4989AB8EE7AC60D16E@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <1210622485.23961.95.camel@cjac.intra.cardomain.com> Message-ID: <1210630057.23961.97.camel@cjac.intra.cardomain.com> Ah! Thanks for the clarification, Mike. On Mon, 2008-05-12 at 14:18 -0600, Mike Moore wrote: > I think the issue is vetting the contribution. Microsoft wants to > protect itself and make sure that anything in the "core" hasn't > violated an existing copyright. As I understand it, Microsoft > considers it prohibitivly expensive to ensure that all contributions > aren't already copywritten, which is why they don't accept patches to > the core yet. Once the DLR is stabilized they will allow contributions > to the IronRuby core because it can no longer influence the DLR core. > > On 5/12/08, C.J. Adams-Collier wrote: > Hey there Shri, > > Do you accept changes provided that the contributor has > assigned > copyright to Microsoft? > > http://lwn.net/Articles/272265/ > http://www.copylaw.com/forms/copyassn.html > http://www.update.uu.se/~ams/inetutils/gnulib/doc/Copyright/request-assign.changes > > Cheers, > > C.J. > > > On Mon, 2008-05-12 at 11:29 -0700, Shri Borde wrote: > > Hi Oleg, > > > > > > > > You can prevent stack overflow by explicitly maintaining the > recursion > > count. See > > > http://lists.ironpython.com/pipermail/users-ironpython.com/2007-October/005694.html for a related thread about IronPython. However, such a fix in IronRuby would be in IronRuby.dll, and so we could not accept your patch. You could try patching it for your own version of IronRuby if wanted. > > > > > > > > Thanks, > > > > Shri > > > > Want to work on IronPython, IronRuby, F#?Visit > > http://blogs.msdn.com/ironpython > > > > > > > > From:ironruby-core-bounces at rubyforge.org > > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of > Curt > > Hagenlocher > > Sent: Monday, May 12, 2008 10:19 AM > > To: ironruby-core at rubyforge.org > > Subject: Re: [Ironruby-core] Try IronRuby in your browser > > > > > > > > > > You might want to change your blog entry to say > "OSI-approved Open > > Source license" instead of "GPL-based license" so that you > don't give > > our lawyers a collective heart attack ;). > > > > On Mon, May 12, 2008 at 9:46 AM, Oleg Tkachenko > > > wrote: > > > > Hello! > > > > I put together some simple version of IronRuby powered "Try > Ruby" [1]. > > This is just night hack, I hope to improve it. > > > > Now, the problem is that anybody can crash it with "def f() > f() end", > > "f()". I mean StackOverflowException, which is really bad on > shared > > ASP.NET hosting. > > > > Any idea if IronRuby can prevent stack overflow? I'm > volunteering to > > contribute an implementation if so. > > > > > > [1] http://www.ironruby.info/ir/ > > -- > > Oleg > > > > > > _______________________________________________ > > Ironruby-core mailing list > > Ironruby-core at rubyforge.org > > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > > > > > > > > > _______________________________________________ > > Ironruby-core mailing list > > Ironruby-core at rubyforge.org > > http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From brianblackwell at realemail.net Mon May 12 22:17:29 2008 From: brianblackwell at realemail.net (Brian Blackwell) Date: Tue, 13 May 2008 12:17:29 +1000 Subject: [Ironruby-core] Standard library inventory In-Reply-To: References: Message-ID: <1210645049.10485.1252812557@webmail.messagingengine.com> Hi all, I can confirm that the ability to run some simple activerecord/activesupport use cases is currently blocked only by the absence of implementations of the libraries listed in Wayne's post, plus some major bugs like #19805 and #19971. If anyone is interested, I have also attached an implementation of enumerator in pure Ruby as a replacement for enumerator.so. Once I can get activerecord up and running I should be able to do some meaningful testing of the SQLite3 and MySQL drivers that I have been working on... Regards, Brian On Mon, 12 May 2008 22:24:50 +1000, "Wayne Kelly" said: > Hi, > > I'd like to request a quick implementation status update on the Ruby > standard libraries that contain native code ... > > If you are working on any of the following or know any additional > information about any of the following, could you please post a followup > email? > > The following standard libraries are implemented at least to some degree > in the IronRuby.Libraries assembly (not sure which are totally complete): > digest.so -> IronRuby.Libraries\Digest\Digest.cs > digest\md5.so -> IronRuby.Libraries\Digest\Digest.cs > openssl.so -> IronRuby.Libraries\OpenSSL\OpenSSL.cs > socket.so -> IronRuby.Libraries\Builtin\Socket.cs > strscan.so -> IronRuby.Libraries\Builtin\StringScanner.cs > zlib.so -> IronRuby.Libraries\Zlib\zlib.cs > > The following libraries are used by the simple gem and rails use cases > that I've been investigating, but don't yet have a checked > implementation: > digest/sha1.so > bigdecimal.so > enumerator.so > etc.so > fcntl.so > nkf.so -> Andrew Peters? > racc/cparse.so > stringio.so -> Eduardo? > syck.so -> John Messerly? > thread.so -> can be replaced by original thread.rb? > Win32API.so -> can be just deleted? > > The following libraries are not used in any of the simple gems and rails > use cases that I've been considering. (please let us know if there are > any in here that you think should be made a priority): > curses.so > dbm.so -> used by YAML? > dl.so -> used by sqlite3 driver? > gdbm.so > iconv.so -> used by actionmailer? > io.so > pty.so > readline -> used by debug.rb > sdbm.so > syslog.so > tk.so > win32ole.so > > Cheers, Wayne. > _______________________________________________ > 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: enumerator.rb Type: application/octet-stream Size: 1750 bytes Desc: not available URL: From jflam at microsoft.com Mon May 12 23:47:30 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Mon, 12 May 2008 20:47:30 -0700 Subject: [Ironruby-core] Standard library inventory In-Reply-To: <1210645049.10485.1252812557@webmail.messagingengine.com> References: <1210645049.10485.1252812557@webmail.messagingengine.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D92FB0164@NA-EXMSG-C115.redmond.corp.microsoft.com> Michael Letterle: > I can confirm that the ability to run some simple > activerecord/activesupport use cases is currently blocked only by the > absence of implementations of the libraries listed in Wayne's post, > plus some major bugs like #19805 and #19971. If anyone is interested, I > have also attached an implementation of enumerator in pure Ruby as a > replacement for enumerator.so. We have a fix for #19971 coming by Wednesday at the latest. #19805 is already fixed and will show up in the next release. Thanks, -John From lists at ruby-forum.com Tue May 13 00:57:08 2008 From: lists at ruby-forum.com (Web Reservoir) Date: Tue, 13 May 2008 06:57:08 +0200 Subject: [Ironruby-core] Is IronRuby avoided in .Net 3.5 SP1... No Mention at all Message-ID: <7270cdf526d6122de93176d80717ab2b@ruby-forum.com> Hi, I was keen to read the great support for Dynamic languages in the New and Most discussed .Net 3.5 SP1. It was strange to see that there was no discussion at all about Dynamic Languages. It was avoided in such a manner that IronRuby does not exist at all. When everything was discussed about... MVC Preview 3, Dynamic Scaffolding, Routing etc.. it was strange to see that How come IronRuby is not considered or discussed at all when all this Inspirations have started with Ruby and Rails and Just my views. -- Posted via http://www.ruby-forum.com/. From jflam at microsoft.com Tue May 13 01:06:05 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Mon, 12 May 2008 22:06:05 -0700 Subject: [Ironruby-core] Is IronRuby avoided in .Net 3.5 SP1... No Mention at all In-Reply-To: <7270cdf526d6122de93176d80717ab2b@ruby-forum.com> References: <7270cdf526d6122de93176d80717ab2b@ruby-forum.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D92FB017A@NA-EXMSG-C115.redmond.corp.microsoft.com> Web Reservoir: > I was keen to read the great support for Dynamic languages in the New > and Most discussed .Net 3.5 SP1. > > It was strange to see that there was no discussion at all about Dynamic > Languages. > It was avoided in such a manner that IronRuby does not exist at all. IronRuby will be part of the next major release of Visual Studio. It won't be part of the Service Pack. -John From lists at ruby-forum.com Tue May 13 01:23:32 2008 From: lists at ruby-forum.com (Web Reservoir) Date: Tue, 13 May 2008 07:23:32 +0200 Subject: [Ironruby-core] =?utf-8?q?Is_IronRuby_avoided_in_=2ENet_3=2E5_SP1?= =?utf-8?b?Li4uIE5vIE1lbnRpb24JYXQgYWxs?= In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D92FB017A@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <7270cdf526d6122de93176d80717ab2b@ruby-forum.com> <372109E149E8084D8E6C7D9CFD82E0632D92FB017A@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <74b0496816c648757bcd3f89328fa948@ruby-forum.com> John Lam (IRONRUBY) wrote: > IronRuby will be part of the next major release of Visual Studio. It > won't be part of the Service Pack. > > -John Hi, Visual Studio is updated every three years as per my knowledge. for example... (1) Visual Studio .net ---- (2001) (2) Visual Studio 2005 -----(2005) (3) Visual Studio 2008------(2008) You mean to say that IronRuby support with VS shall come now in 2011...? -- Posted via http://www.ruby-forum.com/. From w.kelly at qut.edu.au Tue May 13 01:54:25 2008 From: w.kelly at qut.edu.au (Wayne Kelly) Date: Tue, 13 May 2008 15:54:25 +1000 Subject: [Ironruby-core] ModuleOps::extended In-Reply-To: <74b0496816c648757bcd3f89328fa948@ruby-forum.com> References: <7270cdf526d6122de93176d80717ab2b@ruby-forum.com> <372109E149E8084D8E6C7D9CFD82E0632D92FB017A@NA-EXMSG-C115.redmond.corp.microsoft.com> <74b0496816c648757bcd3f89328fa948@ruby-forum.com> Message-ID: What's happened to ModuleOps::extended in revision 103? (it appears to have been removed) Kernel::extend calls "extended", so modules need a default implementation. Cheers, Wayne. From jflam at microsoft.com Tue May 13 09:24:56 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Tue, 13 May 2008 06:24:56 -0700 Subject: [Ironruby-core] ModuleOps::extended In-Reply-To: References: <7270cdf526d6122de93176d80717ab2b@ruby-forum.com> <372109E149E8084D8E6C7D9CFD82E0632D92FB017A@NA-EXMSG-C115.redmond.corp.microsoft.com> <74b0496816c648757bcd3f89328fa948@ruby-forum.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D92FB0207@NA-EXMSG-C115.redmond.corp.microsoft.com> I have no idea why ... maybe I screwed something up in a merge. In any event, I've put it back in the next release. Thanks, -John > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Wayne Kelly > Sent: Monday, May 12, 2008 10:54 PM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] ModuleOps::extended > > > What's happened to ModuleOps::extended in revision 103? > (it appears to have been removed) > > Kernel::extend calls "extended", so modules need a default > implementation. > > Cheers, Wayne. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From bacondarwin at googlemail.com Tue May 13 09:33:12 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Tue, 13 May 2008 14:33:12 +0100 Subject: [Ironruby-core] ModuleOps::extended In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D92FB0207@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <7270cdf526d6122de93176d80717ab2b@ruby-forum.com> <372109E149E8084D8E6C7D9CFD82E0632D92FB017A@NA-EXMSG-C115.redmond.corp.microsoft.com> <74b0496816c648757bcd3f89328fa948@ruby-forum.com> <372109E149E8084D8E6C7D9CFD82E0632D92FB0207@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <002f01c8b4fd$e565aab0$b0310010$@com> This is really something that the specs should pick up, no? -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of John Lam (IRONRUBY) Sent: Tuesday,13 May 13, 2008 14:25 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] ModuleOps::extended I have no idea why ... maybe I screwed something up in a merge. In any event, I've put it back in the next release. Thanks, -John > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Wayne Kelly > Sent: Monday, May 12, 2008 10:54 PM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] ModuleOps::extended > > > What's happened to ModuleOps::extended in revision 103? > (it appears to have been removed) > > Kernel::extend calls "extended", so modules need a default > implementation. > > Cheers, Wayne. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From jflam at microsoft.com Tue May 13 09:35:52 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Tue, 13 May 2008 06:35:52 -0700 Subject: [Ironruby-core] Is IronRuby avoided in .Net 3.5 SP1... No Mention at all In-Reply-To: <74b0496816c648757bcd3f89328fa948@ruby-forum.com> References: <7270cdf526d6122de93176d80717ab2b@ruby-forum.com> <372109E149E8084D8E6C7D9CFD82E0632D92FB017A@NA-EXMSG-C115.redmond.corp.microsoft.com> <74b0496816c648757bcd3f89328fa948@ruby-forum.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D92FB0215@NA-EXMSG-C115.redmond.corp.microsoft.com> We don't comment on future release dates. IronRuby 1.0 will ship before the next version of VS, but an updated version will ship in the next version of VS. Thanks, -John > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Web Reservoir > Sent: Monday, May 12, 2008 10:24 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Is IronRuby avoided in .Net 3.5 SP1... No > Mention at all > > John Lam (IRONRUBY) wrote: > > > > IronRuby will be part of the next major release of Visual Studio. It > > won't be part of the Service Pack. > > > > -John > > Hi, > > Visual Studio is updated every three years as per my knowledge. > for example... > (1) Visual Studio .net ---- (2001) > (2) Visual Studio 2005 -----(2005) > (3) Visual Studio 2008------(2008) > > You mean to say that IronRuby support with VS shall come now in > 2011...? > > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From jflam at microsoft.com Tue May 13 10:04:29 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Tue, 13 May 2008 07:04:29 -0700 Subject: [Ironruby-core] ModuleOps::extended In-Reply-To: <002f01c8b4fd$e565aab0$b0310010$@com> References: <7270cdf526d6122de93176d80717ab2b@ruby-forum.com> <372109E149E8084D8E6C7D9CFD82E0632D92FB017A@NA-EXMSG-C115.redmond.corp.microsoft.com> <74b0496816c648757bcd3f89328fa948@ruby-forum.com> <372109E149E8084D8E6C7D9CFD82E0632D92FB0207@NA-EXMSG-C115.redmond.corp.microsoft.com> <002f01c8b4fd$e565aab0$b0310010$@com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D92FB022F@NA-EXMSG-C115.redmond.corp.microsoft.com> Today we use the specs as a regression test mechanism. We generate a baseline 'clean' (all specs pass), and we use that to detect regressions. I suspect that we didn't enable the specs for #extend when they were checked in, so it didn't get picked up our baseline clean test pass. Thanks, -John > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Peter Bacon Darwin > Sent: Tuesday, May 13, 2008 6:33 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] ModuleOps::extended > > This is really something that the specs should pick up, no? > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of John Lam > (IRONRUBY) > Sent: Tuesday,13 May 13, 2008 14:25 > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] ModuleOps::extended > > I have no idea why ... maybe I screwed something up in a merge. In any > event, I've put it back in the next release. > > Thanks, > -John > > > > -----Original Message----- > > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > > bounces at rubyforge.org] On Behalf Of Wayne Kelly > > Sent: Monday, May 12, 2008 10:54 PM > > To: ironruby-core at rubyforge.org > > Subject: [Ironruby-core] ModuleOps::extended > > > > > > What's happened to ModuleOps::extended in revision 103? > > (it appears to have been removed) > > > > Kernel::extend calls "extended", so modules need a default > > implementation. > > > > Cheers, Wayne. > > _______________________________________________ > > Ironruby-core mailing list > > Ironruby-core at rubyforge.org > > http://rubyforge.org/mailman/listinfo/ironruby-core > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From Tomas.Matousek at microsoft.com Tue May 13 13:29:57 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 13 May 2008 10:29:57 -0700 Subject: [Ironruby-core] Code Review: RubyAstBugFixes Message-ID: tfpt review /shelveset:RubyAstBugFixes;REDMOND\tomat Fixes bug #20101: Can't chain method call's off of class definitions Fixes bug #20103: next and redo can't be the value in a ternary. Fixes bug #20110: Invalid result of an assignment Fixes bug #20082: MemberAssignmentExpression not implemented Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: RubyAstBugFixes.diff Type: application/octet-stream Size: 555107 bytes Desc: RubyAstBugFixes.diff URL: From jflam at microsoft.com Tue May 13 14:33:19 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Tue, 13 May 2008 11:33:19 -0700 Subject: [Ironruby-core] Code Review: sockets-1 Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D92FB0465@NA-EXMSG-C115.redmond.corp.microsoft.com> tfpt review /shelveset:sockets-1;REDMOND\jflam I've cleaned up Peter Bacon Darwin's socket patch from last week now that we have our new MutableString implementation in. I'm running a test only job through SNAP right now. There are a few nits that I have with some new conversion protocols, some missing overloads etc. in this shelveset, but I'd rather see this go through sooner rather than later. 1. Many methods and constructors don't have the strongly-typed overloads. Here's one in TCPSocket.cs: [RubyConstructor] public static TCPSocket/*!*/ CreateTCPSocket(CodeContext/*!*/ context, object remoteHost, object remotePort) { This is not critical since it will pass the tests correctly, but we really should resolve these things at some point. Not a high priority now (this is vastly preferable to having the strongly typed overload only, and missing the object overload) since we're in a bit of a time crunch. 2. Not sure what the status of the implementation is - but we can't create instances of Socket today since there isn't a ctor defined for it. 3. A large # of PortNames are statically created at start-up (in BasicSocket.cs). Would be nice to change "tcp"/"udp" to an enum since there are only 2 values. 4. ConvertToPortNum: consider a faster search than linear search for PortName. Also, the conversion protocol at the start (port is int) looks a bit strange? 5. // Ruby uses Little Endian whereas .NET uses Big Endian IP values byte[] bytes = new byte[4]; for (int i = 3; i >= 0; --i) { bytes[i] = (byte)(iHostname & 0xff); iHostname >>= 8; } Is this code platform-independent for MRI as well? Thanks, -John -------------- next part -------------- A non-text attachment was scrubbed... Name: sockets-1.diff Type: application/octet-stream Size: 163281 bytes Desc: sockets-1.diff URL: From jflam at microsoft.com Tue May 13 17:28:46 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Tue, 13 May 2008 14:28:46 -0700 Subject: [Ironruby-core] Revision 105 out on Rubyforge Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D92FB05E8@NA-EXMSG-C115.redmond.corp.microsoft.com> This update contains Peter Bacon Darwin's socket implementation and a set of bug fixes for bugs #20101, 20110, 20082, and 20103. I've also added Pete to the core team - he's done a lot of excellent work in helping us get our regular expression support, our numerical support, and now socket support up and running. Pete's the owner of all things under the sockets directory (this may move in the future, but for the time being we're going to keep it as a built-in and no-op out the require 'sockets'). Thanks, -John -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Tue May 13 18:32:11 2008 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Wed, 14 May 2008 10:32:11 +1200 Subject: [Ironruby-core] r105 broke assembly loading Message-ID: <5CEDF42C-66A5-423E-B460-78482D79CE20@flanders.co.nz> Hi I just updated to r105 and now I can't require assemblies anymore. >>> require 'bin/System.Net.dll' c:\tools\IronRuby\src\IronRuby.Libraries\Builtins\Kernel.cs:272:in `Require': Invalid character '?' in expression (Synta xError) from :0:in `Initialize##1' Do I submit a bug for that? Cheers Ivan From jflam at microsoft.com Tue May 13 18:40:41 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Tue, 13 May 2008 15:40:41 -0700 Subject: [Ironruby-core] r105 broke assembly loading In-Reply-To: <5CEDF42C-66A5-423E-B460-78482D79CE20@flanders.co.nz> References: <5CEDF42C-66A5-423E-B460-78482D79CE20@flanders.co.nz> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D92FB06A6@NA-EXMSG-C115.redmond.corp.microsoft.com> This is a feature and not a bug :) You'll need to specify the fully qualified assembly name: require "System.Net, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" However, you can also just put a file called system.net.rb in your search path and have it do the scary require which gets you back to require 'system.net' Thanks, -John -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Tuesday, May 13, 2008 3:32 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] r105 broke assembly loading Hi I just updated to r105 and now I can't require assemblies anymore. >>> require 'bin/System.Net.dll' c:\tools\IronRuby\src\IronRuby.Libraries\Builtins\Kernel.cs:272:in `Require': Invalid character '?' in expression (Synta xError) from :0:in `Initialize##1' Do I submit a bug for that? Cheers Ivan _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From jflam at microsoft.com Tue May 13 18:42:06 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Tue, 13 May 2008 15:42:06 -0700 Subject: [Ironruby-core] r105 broke assembly loading In-Reply-To: <5CEDF42C-66A5-423E-B460-78482D79CE20@flanders.co.nz> References: <5CEDF42C-66A5-423E-B460-78482D79CE20@flanders.co.nz> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D92FB06A9@NA-EXMSG-C115.redmond.corp.microsoft.com> One more thing, r105 adds support for the -I command line switch, so you can now: ir -I path-to-your-includes-directory yourapp.rb Thanks, -John -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Tuesday, May 13, 2008 3:32 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] r105 broke assembly loading Hi I just updated to r105 and now I can't require assemblies anymore. >>> require 'bin/System.Net.dll' c:\tools\IronRuby\src\IronRuby.Libraries\Builtins\Kernel.cs:272:in `Require': Invalid character '?' in expression (Synta xError) from :0:in `Initialize##1' Do I submit a bug for that? Cheers Ivan _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From ivan at flanders.co.nz Tue May 13 20:01:28 2008 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Wed, 14 May 2008 12:01:28 +1200 Subject: [Ironruby-core] r105 broke assembly loading In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D92FB06A9@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <5CEDF42C-66A5-423E-B460-78482D79CE20@flanders.co.nz> <372109E149E8084D8E6C7D9CFD82E0632D92FB06A9@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: maybe system.net was a bad example. I also have a compiled dll that contains my objects.. when I run my specs with r104 things work when I do it with r105 they don't anymore. They always fail on those require lines. and you're saying that now I don't have to go through a assemblies.each{|assembly| require assembly} anymore but can just do ir -l bin lib/main.rb to get my app going ? --- in the past I just had to do require path_to_my_own_assembly It seems that that has changed now? At this moment it doesn't seem to recognize a .dll as an assembly but rather wants to execute is as a ruby source file. Where before the LoadModule method would call GetFileKind at some point and correctly identify .dll as an assembly. --- I did some more investigating and it seems like File.dirname(__FILE__) doesn't report the correct directory in the console + C:\projects\lumpr\src\Sylvester.DesktopEdition\Sylvester.IronRuby ? ir IronRuby 1.0.0.0 on .NET 2.0.50727.1434 Copyright (c) Microsoft Corporation. All rights reserved. Note that local variables do not work today in the console. As a workaround, use globals instead (eg $x = 42 instead of x = 42). >>> File.dirname(__FILE__) => "C:\projects\lumpr\src\Sylvester.DesktopEdition" >>> I thought it would to return => "C:\projects\lumpr\src \Sylvester.DesktopyEdition\Sylvester.IronRuby" Thanks Ivan On 14/05/2008, at 10:42 AM, John Lam (IRONRUBY) wrote: > One more thing, r105 adds support for the -I command line switch, so > you can now: > > ir -I path-to-your-includes-directory yourapp.rb > > Thanks, > -John > > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org > ] On Behalf Of Ivan Porto Carrero > Sent: Tuesday, May 13, 2008 3:32 PM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] r105 broke assembly loading > > Hi > > I just updated to r105 and now I can't require assemblies anymore. > >>>> require 'bin/System.Net.dll' > c:\tools\IronRuby\src\IronRuby.Libraries\Builtins\Kernel.cs:272:in > `Require': Invalid character '?' in expression (Synta > xError) > from :0:in `Initialize##1' > > Do I submit a bug for that? > > Cheers > Ivan > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From ivan at flanders.co.nz Tue May 13 21:17:52 2008 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Wed, 14 May 2008 13:17:52 +1200 Subject: [Ironruby-core] r105 broke assembly loading In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D92FB06A9@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <5CEDF42C-66A5-423E-B460-78482D79CE20@flanders.co.nz> <372109E149E8084D8E6C7D9CFD82E0632D92FB06A9@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <7BD9F98D-8ADB-487D-9A60-2AADC4C4EC6D@flanders.co.nz> Ok I'm all for features but how do I now require my own homebaked dll because registering them in the GAC isn't the way to go IMHO :) I've tried a bunch of things to get to my dll but it boils down to that it doesn't know how to load it. When I copy my assembly into the ironruby build folder it does work. That just doesn't seem right to me. If there is a new an elegant way to load arbitrary assemblies then I'd love to know. In meantime I can hack my source to add assembly loading from a path as well Below the output from my various tries to get my assembly loaded without putting it in the ironruby binaries folder + C:\projects\lumpr\src\Sylvester.DesktopEdition\Sylvester.IronRuby ? ir -I C:\projects\lumpr\src\Sylvester.DesktopEdition \Sylvester.IronRuby\bin\Sylvester.Contracts.dll >>> include Twitter::Model c:\tools\IronRuby\src\IronRuby.Libraries\Builtins\ModuleOps.cs:642:in `ConstantMissing': uninitialized constant Object:: Twitter (NameError) from :0:in `Initialize##1' >>> exit + C:\projects\lumpr\src\Sylvester.DesktopEdition\Sylvester.IronRuby ? ir -I C:\projects\lumpr\src\Sylvester.DesktopEdition \Sylvester.IronRuby\bin >>> require 'Sylvester.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' c:\tools\IronRuby\src\IronRuby.Libraries\Builtins\Kernel.cs:272:in `Require': no such file to load -- Sylvester.Contract s, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null (LoadError) from :0:in `Initialize##1' >>> exit + C:\projects\lumpr\src\Sylvester.DesktopEdition\Sylvester.IronRuby ? ir >>> Dir.chdir('C:\projects\lumpr\src\Sylvester.DesktopEdition \Sylvester.IronRuby\bin') => 0 >>> require 'Sylvester.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' c:\tools\IronRuby\src\IronRuby.Libraries\Builtins\Kernel.cs:272:in `Require': no such file to load -- Sylvester.Contract s, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null (LoadError) from :0:in `Initialize##7' >>> exit + C:\projects\lumpr\src\Sylvester.DesktopEdition\Sylvester.IronRuby ? ir -I C:\projects\lumpr\src\Sylvester.DesktopEdition \Sylvester.IronRuby\bin >>> Dir.chdir('C:\projects\lumpr\src\Sylvester.DesktopEdition \Sylvester.IronRuby\bin') => 0 >>> require 'Sylvester.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' c:\tools\IronRuby\src\IronRuby.Libraries\Builtins\Kernel.cs:272:in `Require': no such file to load -- Sylvester.Contract s, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null (LoadError) from :0:in `Initialize##8' >>> Thanks Ivan On 14/05/2008, at 10:42 AM, John Lam (IRONRUBY) wrote: > One more thing, r105 adds support for the -I command line switch, so > you can now: > > ir -I path-to-your-includes-directory yourapp.rb > > Thanks, > -John > > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org > ] On Behalf Of Ivan Porto Carrero > Sent: Tuesday, May 13, 2008 3:32 PM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] r105 broke assembly loading > > Hi > > I just updated to r105 and now I can't require assemblies anymore. > >>>> require 'bin/System.Net.dll' > c:\tools\IronRuby\src\IronRuby.Libraries\Builtins\Kernel.cs:272:in > `Require': Invalid character '?' in expression (Synta > xError) > from :0:in `Initialize##1' > > Do I submit a bug for that? > > Cheers > Ivan > _______________________________________________ > 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 steve.eichert at gmail.com Tue May 13 21:27:35 2008 From: steve.eichert at gmail.com (Steve Eichert) Date: Tue, 13 May 2008 21:27:35 -0400 Subject: [Ironruby-core] r105 broke assembly loading In-Reply-To: <7BD9F98D-8ADB-487D-9A60-2AADC4C4EC6D@flanders.co.nz> References: <5CEDF42C-66A5-423E-B460-78482D79CE20@flanders.co.nz> <372109E149E8084D8E6C7D9CFD82E0632D92FB06A9@NA-EXMSG-C115.redmond.corp.microsoft.com> <7BD9F98D-8ADB-487D-9A60-2AADC4C4EC6D@flanders.co.nz> Message-ID: I haven't tried revision 105 to know if it still works but I've been using the /paths command line option to tell IronRuby where my assemblies are. ir.exe paths/:C:\paths\to\my\dlls my_ruby_script.rb Cheers, Steve On Tue, May 13, 2008 at 9:17 PM, Ivan Porto Carrero wrote: > Ok I'm all for features but how do I now require my own homebaked dll > because registering them in the GAC isn't the way to go IMHO :) > > I've tried a bunch of things to get to my dll but it boils down to that it > doesn't know how to load it. When I copy my assembly into the ironruby build > folder it does work. That just doesn't seem right to me. If there is a new > an elegant way to load arbitrary assemblies then I'd love to know. In > meantime I can hack my source to add assembly loading from a path as well > > Below the output from my various tries to get my assembly loaded without > putting it in the ironruby binaries folder > > + C:\projects\lumpr\src\Sylvester.DesktopEdition\Sylvester.IronRuby > ? ir -I > C:\projects\lumpr\src\Sylvester.DesktopEdition\Sylvester.IronRuby\bin\Sylvester.Contracts.dll > > >>> include Twitter::Model > c:\tools\IronRuby\src\IronRuby.Libraries\Builtins\ModuleOps.cs:642:in > `ConstantMissing': uninitialized constant Object:: > Twitter (NameError) > from :0:in `Initialize##1' > >>> exit > > + C:\projects\lumpr\src\Sylvester.DesktopEdition\Sylvester.IronRuby > ? ir -I > C:\projects\lumpr\src\Sylvester.DesktopEdition\Sylvester.IronRuby\bin > > >>> require 'Sylvester.Contracts, Version=1.0.0.0, Culture=neutral, > PublicKeyToken=null' > c:\tools\IronRuby\src\IronRuby.Libraries\Builtins\Kernel.cs:272:in > `Require': no such file to load -- Sylvester.Contract > s, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null (LoadError) > from :0:in `Initialize##1' > >>> exit > > + C:\projects\lumpr\src\Sylvester.DesktopEdition\Sylvester.IronRuby > ? ir > > >>> > Dir.chdir('C:\projects\lumpr\src\Sylvester.DesktopEdition\Sylvester.IronRuby\bin') > => 0 > >>> require 'Sylvester.Contracts, Version=1.0.0.0, Culture=neutral, > PublicKeyToken=null' > c:\tools\IronRuby\src\IronRuby.Libraries\Builtins\Kernel.cs:272:in > `Require': no such file to load -- Sylvester.Contract > s, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null (LoadError) > from :0:in `Initialize##7' > >>> exit > > + C:\projects\lumpr\src\Sylvester.DesktopEdition\Sylvester.IronRuby > ? ir -I > C:\projects\lumpr\src\Sylvester.DesktopEdition\Sylvester.IronRuby\bin > > >>> > Dir.chdir('C:\projects\lumpr\src\Sylvester.DesktopEdition\Sylvester.IronRuby\bin') > => 0 > >>> require 'Sylvester.Contracts, Version=1.0.0.0, Culture=neutral, > PublicKeyToken=null' > c:\tools\IronRuby\src\IronRuby.Libraries\Builtins\Kernel.cs:272:in > `Require': no such file to load -- Sylvester.Contract > s, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null (LoadError) > from :0:in `Initialize##8' > >>> > > Thanks > Ivan > > On 14/05/2008, at 10:42 AM, John Lam (IRONRUBY) wrote: > > One more thing, r105 adds support for the -I command line switch, so you > > can now: > > > > ir -I path-to-your-includes-directory yourapp.rb > > > > Thanks, > > -John > > > > > > -----Original Message----- > > From: ironruby-core-bounces at rubyforge.org [mailto: > > ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero > > Sent: Tuesday, May 13, 2008 3:32 PM > > To: ironruby-core at rubyforge.org > > Subject: [Ironruby-core] r105 broke assembly loading > > > > Hi > > > > I just updated to r105 and now I can't require assemblies anymore. > > > > require 'bin/System.Net.dll' > > > > > > > > > c:\tools\IronRuby\src\IronRuby.Libraries\Builtins\Kernel.cs:272:in > > `Require': Invalid character '?' in expression (Synta > > xError) > > from :0:in `Initialize##1' > > > > Do I submit a bug for that? > > > > Cheers > > Ivan > > _______________________________________________ > > Ironruby-core mailing list > > Ironruby-core at rubyforge.org > > http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > > Ironruby-core mailing list > > Ironruby-core at rubyforge.org > > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Tue May 13 21:49:40 2008 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Wed, 14 May 2008 13:49:40 +1200 Subject: [Ironruby-core] r105 broke assembly loading In-Reply-To: References: <5CEDF42C-66A5-423E-B460-78482D79CE20@flanders.co.nz> <372109E149E8084D8E6C7D9CFD82E0632D92FB06A9@NA-EXMSG-C115.redmond.corp.microsoft.com> <7BD9F98D-8ADB-487D-9A60-2AADC4C4EC6D@flanders.co.nz> Message-ID: That also isn't working for me. If I use /paths:full path here or -I "full path here" it still doesn't let me require that assembly . On 14/05/2008, at 1:27 PM, Steve Eichert wrote: > I haven't tried revision 105 to know if it still works but I've been > using the /paths command line option to tell IronRuby where my > assemblies are. > > ir.exe paths/:C:\paths\to\my\dlls my_ruby_script.rb > > Cheers, > Steve > > On Tue, May 13, 2008 at 9:17 PM, Ivan Porto Carrero > wrote: > Ok I'm all for features but how do I now require my own homebaked > dll because registering them in the GAC isn't the way to go IMHO :) > > I've tried a bunch of things to get to my dll but it boils down to > that it doesn't know how to load it. When I copy my assembly into > the ironruby build folder it does work. That just doesn't seem right > to me. If there is a new an elegant way to load arbitrary assemblies > then I'd love to know. In meantime I can hack my source to add > assembly loading from a path as well > > Below the output from my various tries to get my assembly loaded > without putting it in the ironruby binaries folder > > > + C:\projects\lumpr\src\Sylvester.DesktopEdition\Sylvester.IronRuby > ? ir -I C:\projects\lumpr\src\Sylvester.DesktopEdition > \Sylvester.IronRuby\bin\Sylvester.Contracts.dll > > >>> include Twitter::Model > c:\tools\IronRuby\src\IronRuby.Libraries\Builtins\ModuleOps.cs: > 642:in `ConstantMissing': uninitialized constant Object:: > Twitter (NameError) > > from :0:in `Initialize##1' > >>> exit > > > + C:\projects\lumpr\src\Sylvester.DesktopEdition\Sylvester.IronRuby > ? ir -I C:\projects\lumpr\src\Sylvester.DesktopEdition > \Sylvester.IronRuby\bin > > >>> require 'Sylvester.Contracts, Version=1.0.0.0, Culture=neutral, > PublicKeyToken=null' > c:\tools\IronRuby\src\IronRuby.Libraries\Builtins\Kernel.cs:272:in > `Require': no such file to load -- Sylvester.Contract > s, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null (LoadError) > > from :0:in `Initialize##1' > >>> exit > > > + C:\projects\lumpr\src\Sylvester.DesktopEdition\Sylvester.IronRuby > ? ir > > >>> Dir.chdir('C:\projects\lumpr\src\Sylvester.DesktopEdition > \Sylvester.IronRuby\bin') > => 0 > >>> require 'Sylvester.Contracts, Version=1.0.0.0, Culture=neutral, > PublicKeyToken=null' > c:\tools\IronRuby\src\IronRuby.Libraries\Builtins\Kernel.cs:272:in > `Require': no such file to load -- Sylvester.Contract > s, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null (LoadError) > from :0:in `Initialize##7' > >>> exit > > > + C:\projects\lumpr\src\Sylvester.DesktopEdition\Sylvester.IronRuby > ? ir -I C:\projects\lumpr\src\Sylvester.DesktopEdition > \Sylvester.IronRuby\bin > > >>> Dir.chdir('C:\projects\lumpr\src\Sylvester.DesktopEdition > \Sylvester.IronRuby\bin') > => 0 > >>> require 'Sylvester.Contracts, Version=1.0.0.0, Culture=neutral, > PublicKeyToken=null' > c:\tools\IronRuby\src\IronRuby.Libraries\Builtins\Kernel.cs:272:in > `Require': no such file to load -- Sylvester.Contract > s, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null (LoadError) > from :0:in `Initialize##8' > > >>> > > Thanks > Ivan > > On 14/05/2008, at 10:42 AM, John Lam (IRONRUBY) wrote: > > One more thing, r105 adds support for the -I command line switch, so > you can now: > > ir -I path-to-your-includes-directory yourapp.rb > > Thanks, > -John > > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org > ] On Behalf Of Ivan Porto Carrero > Sent: Tuesday, May 13, 2008 3:32 PM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] r105 broke assembly loading > > Hi > > I just updated to r105 and now I can't require assemblies anymore. > > require 'bin/System.Net.dll' > c:\tools\IronRuby\src\IronRuby.Libraries\Builtins\Kernel.cs:272:in > `Require': Invalid character '?' in expression (Synta > xError) > from :0:in `Initialize##1' > > Do I submit a bug for that? > > Cheers > Ivan > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: From w.kelly at qut.edu.au Tue May 13 22:47:01 2008 From: w.kelly at qut.edu.au (Wayne Kelly) Date: Wed, 14 May 2008 12:47:01 +1000 Subject: [Ironruby-core] IronRuby.dll strongly named? In-Reply-To: References: <5CEDF42C-66A5-423E-B460-78482D79CE20@flanders.co.nz> <372109E149E8084D8E6C7D9CFD82E0632D92FB06A9@NA-EXMSG-C115.redmond.corp.microsoft.com> <7BD9F98D-8ADB-487D-9A60-2AADC4C4EC6D@flanders.co.nz> Message-ID: I'm having trouble with strong names in the latest version. Is IronRuby.dll meant to be strongly named? The Microsoft.Scripting.Hosting.ScriptRuntimeSetup constructor has a hard coded dependence to: IronRuby, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 But building IronRuby.dll using IronRuby.csproj doesn't seem to produce a strongly named assembly. I also note that IronRuby.csproj doesn't set SIGNED but the other projects do. Cheers, Wayne. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ksunair at yahoo.com Tue May 13 23:27:29 2008 From: ksunair at yahoo.com (Unnikrishnan Nair) Date: Tue, 13 May 2008 20:27:29 -0700 (PDT) Subject: [Ironruby-core] changes to extname_spec.rb Message-ID: <78061.56601.qm@web50610.mail.re2.yahoo.com> One more spec change. Could you please review line 8 of this spec, it should read ??? File.extname(".bashrc").should == ".bashrc" instead of ??? File.extname(".bashrc").should == "" Please see the change in the attached spec file. Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: extname_spec.rb Type: application/octet-stream Size: 1466 bytes Desc: not available URL: From andrew at mindscape.co.nz Wed May 14 00:09:31 2008 From: andrew at mindscape.co.nz (Andrew Peters) Date: Wed, 14 May 2008 16:09:31 +1200 Subject: [Ironruby-core] rake test Message-ID: <771cfe010805132109h6a88103bufcfcd92aa0faf7ac@mail.gmail.com> Should I be able to run these? I'm currently getting this error: :0:in `do_generate': undefined local variable or method `methods' for main:Object (NoMethodError) from :0:in `#block162' from c:\Projects\IronRuby\trunk\src\IronRuby.Libraries\Extensions\IListOps.cs:785:in `Each' from :0:in `Initialize##1'rake aborted! Command failed with status (1): ["c:\projects\ironruby\trunk\build\debug\ir...] Cheers, Andrew. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ksunair at yahoo.com Wed May 14 00:40:59 2008 From: ksunair at yahoo.com (Unnikrishnan Nair) Date: Tue, 13 May 2008 21:40:59 -0700 (PDT) Subject: [Ironruby-core] rake test Message-ID: <823885.64920.qm@web50611.mail.re2.yahoo.com> In one of my rake test I ran into the same problem. It looks like one of the method was getting a null value even though the method signature had?? [NotNull] with /*!*/.?I added a code if the value is null return false and my rake test went through. It?happened for all but one test so?I am ok for now. It looks like it is not happening when you execute the same command in ir so I think it is specific to rake. I doubt, it has to do with ':each' in the teardown part of the rake test. Thanks. ----- Original Message ---- From: Andrew Peters To: ironruby-core at rubyforge.org Sent: Tuesday, May 13, 2008 11:09:31 PM Subject: [Ironruby-core] rake test Should I be able to run these? I'm currently getting this error: :0:in `do_generate': undefined local variable or method `methods' for main:Object (NoMethodError) ??????? from :0:in `#block162' ??????? from c:\Projects\IronRuby\trunk\src\IronRuby.Libraries\Extensions\IListOps.cs:785:in `Each' ??????? from :0:in `Initialize##1'rake aborted! Command failed with status (1): ["c:\projects\ironruby\trunk\build\debug\ir...] Cheers, Andrew. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tomas.Matousek at microsoft.com Wed May 14 01:03:58 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 13 May 2008 22:03:58 -0700 Subject: [Ironruby-core] rake test In-Reply-To: <823885.64920.qm@web50611.mail.re2.yahoo.com> References: <823885.64920.qm@web50611.mail.re2.yahoo.com> Message-ID: How does the method signature with [NotNull] look like? (Note that /*!*/ is just a comment that is understood by static verification tools, not used at runtime at all, the [NotNull] attribute should prevent null to go in if called from Ruby, however). Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Unnikrishnan Nair Sent: Tuesday, May 13, 2008 9:41 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] rake test In one of my rake test I ran into the same problem. It looks like one of the method was getting a null value even though the method signature had [NotNull] with /*!*/. I added a code if the value is null return false and my rake test went through. It happened for all but one test so I am ok for now. It looks like it is not happening when you execute the same command in ir so I think it is specific to rake. I doubt, it has to do with ':each' in the teardown part of the rake test. Thanks. ----- Original Message ---- From: Andrew Peters To: ironruby-core at rubyforge.org Sent: Tuesday, May 13, 2008 11:09:31 PM Subject: [Ironruby-core] rake test Should I be able to run these? I'm currently getting this error: :0:in `do_generate': undefined local variable or method `methods' for main:Object (NoMethodError) from :0:in `#block162' from c:\Projects\IronRuby\trunk\src\IronRuby.Libraries\Extensions\IListOps.cs:785:in `Each' from :0:in `Initialize##1'rake aborted! Command failed with status (1): ["c:\projects\ironruby\trunk\build\debug\ir...] Cheers, Andrew. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tomas.Matousek at microsoft.com Wed May 14 01:11:30 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 13 May 2008 22:11:30 -0700 Subject: [Ironruby-core] r105 broke assembly loading In-Reply-To: References: <5CEDF42C-66A5-423E-B460-78482D79CE20@flanders.co.nz> <372109E149E8084D8E6C7D9CFD82E0632D92FB06A9@NA-EXMSG-C115.redmond.corp.microsoft.com> <7BD9F98D-8ADB-487D-9A60-2AADC4C4EC6D@flanders.co.nz> Message-ID: I see. The problem is that an application that is written in a scripting language is not treated the same as a compiled .exe file in CLR's assembly loading mechanism. Executable file defines a directory from whose subdirectories could private assemblies be loaded. Since we have no .exe file for Ruby apps CLR loader doesn't consider the root of the app during the search for an assembly. I'll add support for loading from .dlls back. Framework assemblies should still be loaded either using Kernel#require(). Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Tuesday, May 13, 2008 6:50 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] r105 broke assembly loading That also isn't working for me. If I use /paths:full path here or -I "full path here" it still doesn't let me require that assembly . On 14/05/2008, at 1:27 PM, Steve Eichert wrote: I haven't tried revision 105 to know if it still works but I've been using the /paths command line option to tell IronRuby where my assemblies are. ir.exe paths/:C:\paths\to\my\dlls my_ruby_script.rb Cheers, Steve On Tue, May 13, 2008 at 9:17 PM, Ivan Porto Carrero > wrote: Ok I'm all for features but how do I now require my own homebaked dll because registering them in the GAC isn't the way to go IMHO :) I've tried a bunch of things to get to my dll but it boils down to that it doesn't know how to load it. When I copy my assembly into the ironruby build folder it does work. That just doesn't seem right to me. If there is a new an elegant way to load arbitrary assemblies then I'd love to know. In meantime I can hack my source to add assembly loading from a path as well Below the output from my various tries to get my assembly loaded without putting it in the ironruby binaries folder + C:\projects\lumpr\src\Sylvester.DesktopEdition\Sylvester.IronRuby > ir -I C:\projects\lumpr\src\Sylvester.DesktopEdition\Sylvester.IronRuby\bin\Sylvester.Contracts.dll >>> include Twitter::Model c:\tools\IronRuby\src\IronRuby.Libraries\Builtins\ModuleOps.cs:642:in `ConstantMissing': uninitialized constant Object:: Twitter (NameError) from :0:in `Initialize##1' >>> exit + C:\projects\lumpr\src\Sylvester.DesktopEdition\Sylvester.IronRuby > ir -I C:\projects\lumpr\src\Sylvester.DesktopEdition\Sylvester.IronRuby\bin >>> require 'Sylvester.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' c:\tools\IronRuby\src\IronRuby.Libraries\Builtins\Kernel.cs:272:in `Require': no such file to load -- Sylvester.Contract s, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null (LoadError) from :0:in `Initialize##1' >>> exit + C:\projects\lumpr\src\Sylvester.DesktopEdition\Sylvester.IronRuby > ir >>> Dir.chdir('C:\projects\lumpr\src\Sylvester.DesktopEdition\Sylvester.IronRuby\bin') => 0 >>> require 'Sylvester.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' c:\tools\IronRuby\src\IronRuby.Libraries\Builtins\Kernel.cs:272:in `Require': no such file to load -- Sylvester.Contract s, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null (LoadError) from :0:in `Initialize##7' >>> exit + C:\projects\lumpr\src\Sylvester.DesktopEdition\Sylvester.IronRuby > ir -I C:\projects\lumpr\src\Sylvester.DesktopEdition\Sylvester.IronRuby\bin >>> Dir.chdir('C:\projects\lumpr\src\Sylvester.DesktopEdition\Sylvester.IronRuby\bin') => 0 >>> require 'Sylvester.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' c:\tools\IronRuby\src\IronRuby.Libraries\Builtins\Kernel.cs:272:in `Require': no such file to load -- Sylvester.Contract s, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null (LoadError) from :0:in `Initialize##8' >>> Thanks Ivan On 14/05/2008, at 10:42 AM, John Lam (IRONRUBY) wrote: One more thing, r105 adds support for the -I command line switch, so you can now: ir -I path-to-your-includes-directory yourapp.rb Thanks, -John -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Tuesday, May 13, 2008 3:32 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] r105 broke assembly loading Hi I just updated to r105 and now I can't require assemblies anymore. require 'bin/System.Net.dll' c:\tools\IronRuby\src\IronRuby.Libraries\Builtins\Kernel.cs:272:in `Require': Invalid character '?' in expression (Synta xError) from :0:in `Initialize##1' Do I submit a bug for that? Cheers Ivan _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: From ksunair at yahoo.com Wed May 14 01:27:32 2008 From: ksunair at yahoo.com (Unnikrishnan Nair) Date: Tue, 13 May 2008 22:27:32 -0700 (PDT) Subject: [Ironruby-core] Some more spec changes! Message-ID: <948971.56607.qm@web50606.mail.re2.yahoo.com> As I was doing the test for FileOps, I ran into couple spec file problems. join_spec: changed: couple of places instead of comparison operator ==, it has assignment operator =. I changed it and is in the uploaded file. Need to change: Windows use \ for directory seperation, while linux uses /, all the test cases use / instead of \. We may need to change the rake to be more specific to the platform to make the test pass properly. utime_spec: There was no rspec for this method. I wrote one for testing based off of atime. Attached the one I used. zero_spec: In windows following is not valid File.zero?('NUL').should == true since NUL will be treated file, this will throw exception that file not found. Also the following is not a valid file name in windows environment file = '/tmp/i_exist' Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: join_spec.rb Type: application/octet-stream Size: 2773 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: utime_spec.rb Type: application/octet-stream Size: 1168 bytes Desc: not available URL: From w.kelly at qut.edu.au Wed May 14 01:23:18 2008 From: w.kelly at qut.edu.au (Wayne Kelly) Date: Wed, 14 May 2008 15:23:18 +1000 Subject: [Ironruby-core] require infinite loop Message-ID: With the latest version, if a ruby source file requires itself, or if there is a cyclic chain of requires so that the original source file is required again - it results in an infinite loop. This used to work correctly in the previous version - it simply requires marking the file as already loaded prior to executing it. Cheers, Wayne. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ruby-forum.com Wed May 14 02:08:58 2008 From: lists at ruby-forum.com (Web Reservoir) Date: Wed, 14 May 2008 08:08:58 +0200 Subject: [Ironruby-core] Interactive IronRuby "Try Ruby in Your Browser" Shell In-Reply-To: <474235.3985.qm@web50604.mail.re2.yahoo.com> References: <474235.3985.qm@web50604.mail.re2.yahoo.com> Message-ID: Hi Unni. I do not understand, why do you always want to start a new thread for an existing thread with a Re- Title Starting a thread for an existing thread does not make real sense. You will not fetch better results that way. It would be better to start a new thread for a new topic. I hope if not offended you, but it was required since you have started many threads with a Re-Title for existing threads Thanks -- Posted via http://www.ruby-forum.com/. From Tomas.Matousek at microsoft.com Wed May 14 02:13:14 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 13 May 2008 23:13:14 -0700 Subject: [Ironruby-core] require infinite loop In-Reply-To: References: Message-ID: Well, it is not so simple. Currently we check whether the file is already in $". But it doesn't get into the list until it's execution is successfully finished: x.rb: p $" require 'y.rb' p $" y.rb: p $" The output is: [] [] ["y.rb"] So we probably need another list/table of already loaded files. Besides, a single file could be required multiple times - if you do $".clear before calling require. I need to figure out what is exactly the condition under which Ruby doesn't load a file. Could you please file a bug? Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Wayne Kelly Sent: Tuesday, May 13, 2008 10:23 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] require infinite loop With the latest version, if a ruby source file requires itself, or if there is a cyclic chain of requires so that the original source file is required again - it results in an infinite loop. This used to work correctly in the previous version - it simply requires marking the file as already loaded prior to executing it. Cheers, Wayne. -------------- next part -------------- An HTML attachment was scrubbed... URL: From alex at blackkettle.org Wed May 14 06:43:59 2008 From: alex at blackkettle.org (Alex Young) Date: Wed, 14 May 2008 11:43:59 +0100 Subject: [Ironruby-core] changes to extname_spec.rb In-Reply-To: <78061.56601.qm@web50610.mail.re2.yahoo.com> References: <78061.56601.qm@web50610.mail.re2.yahoo.com> Message-ID: <482AC26F.4010703@blackkettle.org> Unnikrishnan Nair wrote: > One more spec change. Could you please review line 8 of this spec, it > should read > > File.extname(".bashrc").should == ".bashrc" > > instead of > > File.extname(".bashrc").should == "" Quick question: are the specs supposed to ensure that IronRuby matches MRI's behaviour, or just that it's internally consistent? I get this in MRI's IRB: irb(main):001:0> File.extname(".bashrc") => "" Also in YARV: irb(main):002:0> File.extname(".bashrc") => "" -- Alex From bacondarwin at googlemail.com Wed May 14 07:41:43 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Wed, 14 May 2008 12:41:43 +0100 Subject: [Ironruby-core] changes to extname_spec.rb In-Reply-To: <482AC26F.4010703@blackkettle.org> References: <78061.56601.qm@web50610.mail.re2.yahoo.com> <482AC26F.4010703@blackkettle.org> Message-ID: <004801c8b5b7$7ca43cc0$75ecb640$@com> I have been working on the basis that MRI is the reference implementation and so the specs should reflect that. If, on writing a spec, an obvious bug is exposed then we should be sending this on to the RubyLang lot and getting them to fix it. Otherwise if it's good enough for MRI its good enough for me. --- By the way, I had this idea of creating a small program that would help with regression testing against MRI. Instead of writing full RSpecs, we should write snippets of Ruby that work the classes. The program would then run the snippets against MRI and IronRuby (and any other implementation if you wanted) and compare the results. That way you could directly check how similar IR was to MRI without having to fix up the specs all the time. Also it would be much quicker and easier to write the specs since you wouldn't have to check what the correct result should be in each case. For instance, you could have the following snippets of code for the Fixnum#div method: 2.div(2) 1.div(2) 5.div(2) 8192.div(10) 8192.div(-10) (-8192).div(10) (-8192).div(-10) 1.div(0.2) 1.div(0.16) 1.div(0.169) -1.div(50.4) 1.div(0xffffffff) 0.div(0.0) 10.div(0.0) -10.div(0.0) 13.div(0) (obj = Object.new).should_receive(:to_int, :count => 0, :returning => 10) 13.div(obj) 5.div("2") Obviously with some description mechanism and possibly some way of specifying what should be considered in the output from Ruby: whether to check the class and value of results returned; type and fields of objects passed in; if errors are raised the type and message of the error. Anyone fancy knocking this up? Pete -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Alex Young Sent: Wednesday,14 May 14, 2008 11:44 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] changes to extname_spec.rb Unnikrishnan Nair wrote: > One more spec change. Could you please review line 8 of this spec, it > should read > > File.extname(".bashrc").should == ".bashrc" > > instead of > > File.extname(".bashrc").should == "" Quick question: are the specs supposed to ensure that IronRuby matches MRI's behaviour, or just that it's internally consistent? I get this in MRI's IRB: irb(main):001:0> File.extname(".bashrc") => "" Also in YARV: irb(main):002:0> File.extname(".bashrc") => "" -- Alex _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From michael.letterle at gmail.com Wed May 14 09:09:37 2008 From: michael.letterle at gmail.com (Michael Letterle) Date: Wed, 14 May 2008 09:09:37 -0400 Subject: [Ironruby-core] IronRuby.dll strongly named? In-Reply-To: References: <5CEDF42C-66A5-423E-B460-78482D79CE20@flanders.co.nz> <372109E149E8084D8E6C7D9CFD82E0632D92FB06A9@NA-EXMSG-C115.redmond.corp.microsoft.com> <7BD9F98D-8ADB-487D-9A60-2AADC4C4EC6D@flanders.co.nz> Message-ID: My understanding is that when IronRuby is officially released it /will/ be signed, going through and removing the "SIGNED" variable from the other projects should allow it to build correctly. The hard coded dependence below is in an #if. It's always been like this, in fact I had to reference removing the SIGNED in my quick start which was back in rev75 (or thereabouts). On Tue, May 13, 2008 at 10:47 PM, Wayne Kelly wrote: > I'm having trouble with strong names in the latest version. > > Is IronRuby.dll meant to be strongly named? > > The Microsoft.Scripting.Hosting.ScriptRuntimeSetup constructor has a hard > coded dependence to: > > IronRuby, Version=1.0.0.0, Culture=neutral, > PublicKeyToken=31bf3856ad364e35 > > But building IronRuby.dll using IronRuby.csproj doesn't seem to produce a > strongly named assembly. > > I also note that IronRuby.csproj doesn't set SIGNED but the other projects > do. > > Cheers, Wayne. > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -- Michael Letterle [Polymath Prokrammer] http://blog.prokrams.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.letterle at gmail.com Wed May 14 09:13:17 2008 From: michael.letterle at gmail.com (Michael Letterle) Date: Wed, 14 May 2008 09:13:17 -0400 Subject: [Ironruby-core] Interactive IronRuby "Try Ruby in Your Browser" Shell In-Reply-To: References: <474235.3985.qm@web50604.mail.re2.yahoo.com> Message-ID: Ironically, I haven't noticed since GMail has continued to thread the posts properly... Out of curiosity what reader are you using? On Wed, May 14, 2008 at 2:08 AM, Web Reservoir wrote: > Hi Unni. > > I do not understand, why do you always want to start a new thread for an > existing thread with a Re- Title > > Starting a thread for an existing thread does not make real sense. You > will not fetch better results that way. > > It would be better to start a new thread for a new topic. > > I hope if not offended you, but it was required since you have started > many threads with a Re-Title for existing threads > > Thanks > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -- Michael Letterle [Polymath Prokrammer] http://blog.prokrams.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From ksunair at yahoo.com Wed May 14 09:15:17 2008 From: ksunair at yahoo.com (Unnikrishnan Nair) Date: Wed, 14 May 2008 06:15:17 -0700 (PDT) Subject: [Ironruby-core] Interactive IronRuby "Try Ruby in Your Browser" Shell Message-ID: <7156.65197.qm@web50601.mail.re2.yahoo.com> I am really sorry about that. I will make sure it does not happen. it is just to get the group e-mail id. I better add the email to my contact and start new thread when required. Thanks. ----- Original Message ---- From: Web Reservoir To: ironruby-core at rubyforge.org Sent: Wednesday, May 14, 2008 1:08:58 AM Subject: Re: [Ironruby-core] Interactive IronRuby "Try Ruby in Your Browser" Shell Hi Unni. I do not understand, why do you always want to start a new thread for an existing thread with a Re- Title Starting a thread for an existing thread does not make real sense. You will not fetch better results that way. It would be better to start a new thread for a new topic. I hope if not offended you, but it was required since you have started many threads with a Re-Title for existing threads Thanks -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: From ksunair at yahoo.com Wed May 14 09:34:32 2008 From: ksunair at yahoo.com (Unnikrishnan Nair) Date: Wed, 14 May 2008 06:34:32 -0700 (PDT) Subject: [Ironruby-core] changes to extname_spec.rb Message-ID: <442310.56535.qm@web50611.mail.re2.yahoo.com> You are right, when I ran against MRI I got the "". In my case I?always use _why's web page to test the results and unfortunatly the result was ".bashrc", you see I trust _why :) So if this has to match MRI, yes, then I need to change the code. Let me know. Thanks. ----- Original Message ---- From: Alex Young To: ironruby-core at rubyforge.org Sent: Wednesday, May 14, 2008 5:43:59 AM Subject: Re: [Ironruby-core] changes to extname_spec.rb Unnikrishnan Nair wrote: > One more spec change. Could you please review line 8 of this spec, it > should read > >? ? File.extname(".bashrc").should == ".bashrc" > > instead of > >? ? File.extname(".bashrc").should == "" Quick question:? are the specs supposed to ensure that IronRuby matches MRI's behaviour, or just that it's internally consistent?? I get this in MRI's IRB: irb(main):001:0> File.extname(".bashrc") => "" Also in YARV: irb(main):002:0> File.extname(".bashrc") => "" -- Alex _______________________________________________ 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 ksunair at yahoo.com Wed May 14 09:55:29 2008 From: ksunair at yahoo.com (Unnikrishnan Nair) Date: Wed, 14 May 2008 06:55:29 -0700 (PDT) Subject: [Ironruby-core] changes to extname_spec.rb Message-ID: <144184.76882.qm@web50609.mail.re2.yahoo.com> Hi Pete, I was kind of doing what you are saying but manually though. But after seeing the specs, I stopped doing it altogether. I wrote down the test and display the result on the console with puts. Now run the script with 'ruby' on console and redirect the output to a file (not MRI, I need to change based on what I hear) and then run the same code against ir and do the same. After that I run my file compare program and see the differences. So it is possible to automate what you are suggesting, but don't you think the spec was already written to cover all the cases? Wouldn't it be a duplicate work? Just curious... Thanks. ----- Original Message ---- From: Peter Bacon Darwin To: ironruby-core at rubyforge.org Sent: Wednesday, May 14, 2008 6:41:43 AM Subject: Re: [Ironruby-core] changes to extname_spec.rb I have been working on the basis that MRI is the reference implementation and so the specs should reflect that. If, on writing a spec, an obvious bug is exposed then we should be sending this on to the RubyLang lot and getting them to fix it. Otherwise if it's good enough for MRI its good enough for me. --- By the way, I had this idea of creating a small program that would help with regression testing against MRI. Instead of writing full RSpecs, we should write snippets of Ruby that work the classes. The program would then run the snippets against MRI and IronRuby (and any other implementation if you wanted) and compare the results. That way you could directly check how similar IR was to MRI without having to fix up the specs all the time. Also it would be much quicker and easier to write the specs since you wouldn't have to check what the correct result should be in each case. For instance, you could have the following snippets of code for the Fixnum#div method: 2.div(2) 1.div(2) 5.div(2) 8192.div(10) 8192.div(-10) (-8192).div(10) (-8192).div(-10) 1.div(0.2) 1.div(0.16) 1.div(0.169) -1.div(50.4) 1.div(0xffffffff) 0.div(0.0) 10.div(0.0) -10.div(0.0) 13.div(0) (obj = Object.new).should_receive(:to_int, :count => 0, :returning => 10) 13.div(obj) 5.div("2") Obviously with some description mechanism and possibly some way of specifying what should be considered in the output from Ruby: whether to check the class and value of results returned; type and fields of objects passed in; if errors are raised the type and message of the error. Anyone fancy knocking this up? Pete -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Alex Young Sent: Wednesday,14 May 14, 2008 11:44 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] changes to extname_spec.rb Unnikrishnan Nair wrote: > One more spec change. Could you please review line 8 of this spec, it > should read > > File.extname(".bashrc").should == ".bashrc" > > instead of > > File.extname(".bashrc").should == "" Quick question: are the specs supposed to ensure that IronRuby matches MRI's behaviour, or just that it's internally consistent? I get this in MRI's IRB: irb(main):001:0> File.extname(".bashrc") => "" Also in YARV: irb(main):002:0> File.extname(".bashrc") => "" -- Alex _______________________________________________ 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 michael.letterle at gmail.com Wed May 14 10:11:43 2008 From: michael.letterle at gmail.com (Michael Letterle) Date: Wed, 14 May 2008 10:11:43 -0400 Subject: [Ironruby-core] changes to extname_spec.rb In-Reply-To: <144184.76882.qm@web50609.mail.re2.yahoo.com> References: <144184.76882.qm@web50609.mail.re2.yahoo.com> Message-ID: Aren't we running (or going to be running) the official spec suite ( http://rubyspec.org) ? These specs are already written on the assumption that MRI /is/ THE implementation of Ruby. On Wed, May 14, 2008 at 9:55 AM, Unnikrishnan Nair wrote: > Hi Pete, > > I was kind of doing what you are saying but manually though. But after > seeing the specs, I stopped doing it altogether. > > I wrote down the test and display the result on the console with puts. Now > run the script with 'ruby' on console and redirect the output to a file (not > MRI, I need to change based on what I hear) and then run the same code > against ir and do the same. After that I run my file compare program and see > the differences. > > So it is possible to automate what you are suggesting, but don't you think > the spec was already written to cover all the cases? Wouldn't it be a > duplicate work? Just curious... > > Thanks. > > ----- Original Message ---- > From: Peter Bacon Darwin > To: ironruby-core at rubyforge.org > Sent: Wednesday, May 14, 2008 6:41:43 AM > Subject: Re: [Ironruby-core] changes to extname_spec.rb > > I have been working on the basis that MRI is the reference implementation > and so the specs should reflect that. If, on writing a spec, an obvious > bug > is exposed then we should be sending this on to the RubyLang lot and > getting > them to fix it. > > Otherwise if it's good enough for MRI its good enough for me. > > --- > > By the way, I had this idea of creating a small program that would help > with > regression testing against MRI. Instead of writing full RSpecs, we should > write snippets of Ruby that work the classes. The program would then run > the snippets against MRI and IronRuby (and any other implementation if you > wanted) and compare the results. That way you could directly check how > similar IR was to MRI without having to fix up the specs all the time. > Also > it would be much quicker and easier to write the specs since you wouldn't > have to check what the correct result should be in each case. > > For instance, you could have the following snippets of code for the > Fixnum#div method: > > 2.div(2) > 1.div(2) > 5.div(2) > > 8192.div(10) > 8192.div(-10) > (-8192).div(10) > (-8192).div(-10) > > 1.div(0.2) > 1.div(0.16) > 1.div(0.169) > -1.div(50.4) > 1.div(0xffffffff) > > 0.div(0.0) > 10.div(0.0) > -10.div(0.0) > 13.div(0) > (obj = Object.new).should_receive(:to_int, :count => 0, :returning => > 10) > 13.div(obj) > 5.div("2") > > Obviously with some description mechanism and possibly some way of > specifying what should be considered in the output from Ruby: whether to > check the class and value of results returned; type and fields of objects > passed in; if errors are raised the type and message of the error. > > Anyone fancy knocking this up? > Pete > > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Alex Young > Sent: Wednesday,14 May 14, 2008 11:44 > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] changes to extname_spec.rb > > Unnikrishnan Nair wrote: > > One more spec change. Could you please review line 8 of this spec, it > > should read > > > > File.extname(".bashrc").should == ".bashrc" > > > > instead of > > > > File.extname(".bashrc").should == "" > Quick question: are the specs supposed to ensure that IronRuby matches > MRI's behaviour, or just that it's internally consistent? I get this in > MRI's IRB: > > irb(main):001:0> File.extname(".bashrc") > => "" > > Also in YARV: > > irb(main):002:0> File.extname(".bashrc") > => "" > > -- > Alex > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -- Michael Letterle [Polymath Prokrammer] http://blog.prokrams.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jflam at microsoft.com Wed May 14 10:19:54 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Wed, 14 May 2008 07:19:54 -0700 Subject: [Ironruby-core] changes to extname_spec.rb In-Reply-To: <004801c8b5b7$7ca43cc0$75ecb640$@com> References: <78061.56601.qm@web50610.mail.re2.yahoo.com> <482AC26F.4010703@blackkettle.org> <004801c8b5b7$7ca43cc0$75ecb640$@com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D92FB08BD@NA-EXMSG-C115.redmond.corp.microsoft.com> Peter Bacon Darwin: > By the way, I had this idea of creating a small program that would help > with regression testing against MRI. Instead of writing full RSpecs, > we should write snippets of Ruby that work the classes. The program > would then run the snippets against MRI and IronRuby (and any other > implementation if you > wanted) and compare the results. That way you could directly check how > similar IR was to MRI without having to fix up the specs all the time. > Also it would be much quicker and easier to write the specs since you > wouldn't have to check what the correct result should be in each case. This is a great idea. We already do something similar with the suite of check-in tests that we wrote (I need to fix these so they run on the external layout). But if you look at the code inside of run.rb and friends inside of the tests directory you'll see us doing exactly this between MRI, desktop CLR and Silverlight CLR. Thanks, -John From jflam at microsoft.com Wed May 14 10:21:59 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Wed, 14 May 2008 07:21:59 -0700 Subject: [Ironruby-core] changes to extname_spec.rb In-Reply-To: References: <144184.76882.qm@web50609.mail.re2.yahoo.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D92FB08C1@NA-EXMSG-C115.redmond.corp.microsoft.com> Michael Letterle: > Aren't we running (or going to be running) the official spec suite > (http://rubyspec.org) ? We are going to be checking in the rubyspec suite later this week. I just got the fix for the DLR tuple bug last night and I'll push it out later this morning. That was the major thing that was blocking us from checking in rubyspec earlier. Thanks, -John From jflam at microsoft.com Wed May 14 10:23:40 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Wed, 14 May 2008 07:23:40 -0700 Subject: [Ironruby-core] changes to extname_spec.rb In-Reply-To: <144184.76882.qm@web50609.mail.re2.yahoo.com> References: <144184.76882.qm@web50609.mail.re2.yahoo.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D92FB08C2@NA-EXMSG-C115.redmond.corp.microsoft.com> Unnikrishnan Nair: > I wrote down the test and display the result on the console with puts. A meta-level note: beware of running things via irb. Things like __FILE__ don't behave the way you would expect them to because irb is a Ruby program. If in doubt, write your code in a file and run it via ruby.exe. Thanks, -John From jflam at microsoft.com Wed May 14 11:43:54 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Wed, 14 May 2008 08:43:54 -0700 Subject: [Ironruby-core] IronRuby r106 is out Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D92FB0955@NA-EXMSG-C115.redmond.corp.microsoft.com> This fixes the DLR Tuple bug #19971. This, along with Tomas' shelveset later today should fix most of the reported blocking issues. We should be able to check in the latest Ruby specs later today as well. Thanks, -John -------------- next part -------------- An HTML attachment was scrubbed... URL: From jflam at microsoft.com Wed May 14 12:11:49 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Wed, 14 May 2008 09:11:49 -0700 Subject: [Ironruby-core] IronRuby r106 is out In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D92FB0955@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <372109E149E8084D8E6C7D9CFD82E0632D92FB0955@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D92FB09B1@NA-EXMSG-C115.redmond.corp.microsoft.com> Whoops ... some files didn't actually get committed on the last checkin. Strange. You'll need to update to r107 to compile successfully. Thanks, -John From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of John Lam (IRONRUBY) Sent: Wednesday, May 14, 2008 8:44 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] IronRuby r106 is out This fixes the DLR Tuple bug #19971. This, along with Tomas' shelveset later today should fix most of the reported blocking issues. We should be able to check in the latest Ruby specs later today as well. Thanks, -John -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tomas.Matousek at microsoft.com Wed May 14 18:48:05 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Wed, 14 May 2008 15:48:05 -0700 Subject: [Ironruby-core] Code Review: Various5 Message-ID: tfpt review /shelveset:Various5;REDMOND\tomat Reviewed F2F by Dino and John. - Implements $KCODE global variable. - Implements ToString() and ToByteArray() methods on MutableString - they create a copy of the content converted to System.String or byte[] preserving the content representation. - Fixes bug #19309: double should be parsed using an invariant culture - Fixes bug #19867: $0 and $: not initialized correctly - initializes $0. - Fixes bug #15982: re-opening the class "Class" need update version? * Incorrect tests were emitted when dispatching on modules/classes - Makes method dispatch multi-runtime safe (the missing check caused sharing of the rule across runtimes) - Improves and fixes bugs in MutableString construction from literals and by concatenation of embedded expressions ("foo #{x} bar"): * to_s string conversion protocol needs to be applied * "#{x}" was broken - to_s wasn't called on x * Optimizes concatenation: * Where possible the compiler performs the concatenation (like x = "foo" "bar"). * Special-cases concatenation helpers for all combinations of at most two literal and variable arguments. * Some more optimizations are still possible. - Implements Regex#to_s, Regex#inspect, Regex#options * Fixes bug #19756: Regular expression substitution - Changes instantiation of Ruby classes defined in libraries * C.new doesn't invoke "initialize" method anymore if C is a library class. * "initialize" can therefore be invoked only via send, from subclasses (directly or using super) and when instantiating a subclass that has no "initialize" method. In these cases the call is reinitializing an existing object. - Fixes one of the Array#initialize overloads * This didn't work previously: Array.new(class C; def to_int; 5; end; self; end.new) { 'foo' } - Implements parameterless Proc#new * This overload searches the lexical scope chain for a method scope and picks its block parameter. - Fixes #19805: Wrong number of type of arguments for Class * Implements Class constructor that creates an anonymous class - Fixes #19953: class_eval adds methods to the wrong class - Fixes EqualityComparer: it shouldn't call 'eql?' if the values being compared are reference-equal. - Refactors Struct#new and fixes some issues there. - Fixes some specs. Tomas -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Various5.diff Type: application/octet-stream Size: 221585 bytes Desc: Various5.diff URL: From m.david at xmlhacker.com Wed May 14 20:07:08 2008 From: m.david at xmlhacker.com (M. David Peterson) Date: Wed, 14 May 2008 18:07:08 -0600 Subject: [Ironruby-core] Is IronRuby avoided in .Net 3.5 SP1... No Mention at all In-Reply-To: <74b0496816c648757bcd3f89328fa948@ruby-forum.com> References: <7270cdf526d6122de93176d80717ab2b@ruby-forum.com> <372109E149E8084D8E6C7D9CFD82E0632D92FB017A@NA-EXMSG-C115.redmond.corp.microsoft.com> <74b0496816c648757bcd3f89328fa948@ruby-forum.com> Message-ID: On Mon, 12 May 2008 23:23:32 -0600, Web Reservoir wrote: > (1) Visual Studio .net ---- (2001) += Visual Studio 2003 (the original was Visual Studio 2002, if not mistaken) > (2) Visual Studio 2005 -----(2005) Released in November of 2005, so really should have been called Visual Studio 2006 > (3) Visual Studio 2008------(2008) Released in November of 2007, so was accurately called Visual Studio 2008, though the release came two years after Visual Studio 2005, not three, so from what I can tell the .NET series of Visual Studio is on a two year release cycle. Of course, no one at MSFT will comment on such things, but history seems to back it up. -- /M:D M. David Peterson Co-Founder & Chief Architect, 3rd&Urban, LLC Email: m.david at xmlhacker.com | m.david at amp.fm | Mobile: (206) 418-9027 Web: http://amp.fm/ | http://www.oreillynet.com/pub/au/2354 From bacondarwin at googlemail.com Thu May 15 09:12:04 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Thu, 15 May 2008 14:12:04 +0100 Subject: [Ironruby-core] tests\ironruby\Builtin\test_dir.rb Message-ID: <001e01c8b68d$4631c550$d2954ff0$@com> I don't know if this file is obsolete yet but currently it gets executed if you do rake test. The following test in this file fails if neither HOME or LOGDIR are set in the environment: describe "Dir#chdir" do it "changes the current directory to HOME or LOGDIR if set" do Dir.chdir #should_raise(ArgumentError) { Dir.chdir } -- works correctly today end ... It looks like this used to raise the ArgumentError (correctly) but then perhaps whoever was running the tests added in a HOME item to their environment and it broke the test. So really the test should check to see if the environment variable has been set before calling Dir.chdir. But I expect that this test is going to be very obsolete once the full RSpecs are up and running. Pete -------------- next part -------------- An HTML attachment was scrubbed... URL: From bacondarwin at googlemail.com Thu May 15 09:14:03 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Thu, 15 May 2008 14:14:03 +0100 Subject: [Ironruby-core] rake test Message-ID: <002301c8b68d$8cfe5020$a6faf060$@com> Should I even be running "rake test" at all? It is now failing further on in the tests: :0:in `do_generate': undefined local variable or method `methods' for main:Object (NoMethodError) from :0:in `#block162' from d:\dev\ruby\ironruby\new\src\IronRuby.Libraries\Extensions\IListOps.cs:785:i n `Each' -------------- next part -------------- An HTML attachment was scrubbed... URL: From robert.brotherus at napa.fi Thu May 15 09:25:44 2008 From: robert.brotherus at napa.fi (Robert Brotherus) Date: Thu, 15 May 2008 16:25:44 +0300 Subject: [Ironruby-core] IR SVN 107 changes behavior of 'require' (compared to SVN 103) References: <372109E149E8084D8E6C7D9CFD82E0632D92FB0955@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <53194650933664488F3F0C3A0AB5683245CC9B@nw60.napa.fi> IR 103 -> IR 107 update broke my program that relies on execution of "require '...'" strings. I don't know wether this is bug in IR 107 (or incorrect behaviour on IR 103 and earlier), so I did not file a bug report yet. I made a simplified version of my program that exposes this difference with minimal amount of code (this is a fully contained functional program): ------------------------------------------------------------------------ --- using System; using Microsoft.Scripting; using Microsoft.Scripting.Hosting; using Ruby.Runtime; class Program { static void Main(string[] args) { try { new Program().Run(); } catch (Exception ex) { Console.WriteLine(ex.ToString()); } } private void Run() { System.IO.File.WriteAllText("f.rb", @" module F def F.hello puts 'F:Hello' end end "); ExecuteStr("require 'f.rb'"); ExecuteStr("F.hello"); // IR SVN 107 fails here: "uninitialized constant Object::F" } private ScriptRuntime _scriptRuntime; private ScriptScope _sharedScope; public ScriptRuntime ScriptRuntime { get { if (_scriptRuntime == null) { _scriptRuntime = ScriptRuntime.Create(); _scriptRuntime.GlobalOptions.DebugMode = true; } return _scriptRuntime; } } public ScriptEngine Engine { get { return ScriptRuntime.GetEngine(typeof(RubyContext)); } } public ScriptScope SharedScope { get { if (_sharedScope == null) _sharedScope = Engine.CreateScope(); return _sharedScope; } } public object ExecuteStr(string code) { return Engine.CreateScriptSourceFromString(code).Execute(SharedScope); } } // class ------------------------------------------------------------------------ --- Program behaves in following way in IR SVN 103 / 107: SVN 103 F:Hello Press any key to continue . . . SVN 107: System.MemberAccessException: uninitialized constant Object::F at Ruby.Builtins.ModuleOps.ConstantMissing(RubyModule self, SymbolId name) in C:\programs\IronRuby\trunk\src\IronRuby.Libraries\Builtins\ModuleOps.cs: line 642 at _stub_##6(Closure , CallSite , CodeContext , RubyModule , SymbolId ) at Microsoft.Scripting.Utils.InvokeHelper`6.Invoke(Object arg0, Object arg1, Object arg2, Object arg3, Object arg4) in C:\programs\IronRuby\trunk\src\Microsoft.Scripting.Core\Utils\ReflectedC aller.Generated.cs:line 374 at Microsoft.Scripting.Utils.ReflectedCaller.InvokeInstance(Object instance, Object[] args) in C:\programs\IronRuby\trunk\src\Microsoft.Scripting.Core\Utils\ReflectedC aller.Generated.cs:line 38 ... at Microsoft.Scripting.Hosting.ScriptSource.Execute[T](ScriptScope scope) in C:\programs\IronRuby\trunk\src\Microsoft.Scripting\Hosting\ScriptSource. cs:line153 at IronRubyTest1.Program.ExecuteStr[T](String code, Object[] par) in C:\DATA\IronRubyTest1\Program.cs:line 92 at IronRubyTest1.Program.ExecuteStr(String code, Object[] par) in C:\DATA\IronRubyTest1\Program.cs:line 86 at IronRubyTest1.Program.Run() in C:\DATA\IronRubyTest1\Program.cs:line 40 at IronRubyTest1.Program.Main(String[] args) in C:\DATA\IronRubyTest1\Program.cs:line 19 Press any key to continue . . . ------------------- I will continue to use SVN 103 for now. If it turns out that SVN 107 behavior is "as designed" (and SVN 103 behavior that I relied on faulty), I will change my client code to deal with it. Robert Brotherus Software architect Napa Ltd Tammasaarenkatu 3, Helsinki FI-00180 P.O.Box 470, Helsinki FI-00181 Tel. +358 9 22 813 1 Direct. +358 9 22 813 611 GSM +358 45 11 456 02 Fax. +358 9 22 813 800 Email: Robert.Brotherus at napa.fi www.napa.fi From jflam at microsoft.com Thu May 15 09:49:38 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Thu, 15 May 2008 06:49:38 -0700 Subject: [Ironruby-core] tests\ironruby\Builtin\test_dir.rb In-Reply-To: <001e01c8b68d$4631c550$d2954ff0$@com> References: <001e01c8b68d$4631c550$d2954ff0$@com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D92FB0F43@NA-EXMSG-C115.redmond.corp.microsoft.com> Peter Bacon Darwin: > The following test in this file fails if neither HOME or LOGDIR are > set in the environment: Hi Pete, Yep - this is a known issue. I have a shelveset that fixes this and some other bugs in the specs going through SNAP now. We're hoping to make the move soon to Ruby Specs - ETA should be today since the most recent big change just got checked in last night (will push out soon). Thanks, -John From jflam at microsoft.com Thu May 15 10:14:13 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Thu, 15 May 2008 07:14:13 -0700 Subject: [Ironruby-core] Code Review: testfixes-1 Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D92FB0F64@NA-EXMSG-C115.redmond.corp.microsoft.com> tfpt review /shelveset:testfixes-1;REDMOND\jflam This fixes a broken test in run0 (test_dir.rb) which had a dependency on the existence of environment variables that may not exist on local developer machines. It fixes the performance degredation in spec_runner.rb It also fixes a number of specs that broke when we changed how directories were traversed by spec_runner. Thanks, -John -------------- next part -------------- A non-text attachment was scrubbed... Name: testfixes-1.diff Type: application/octet-stream Size: 5154 bytes Desc: testfixes-1.diff URL: From curth at microsoft.com Thu May 15 10:15:37 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Thu, 15 May 2008 07:15:37 -0700 Subject: [Ironruby-core] Code Review: RubyMarshal Message-ID: tfpt review /shelveset:RubyMarshal;REDMOND\curth Reviewed face-to-face by Tomas. This is a complete implementation of the Marshal class and a nearly-complete implementation of the StringIO class, along with changes to the IronRuby core needed to support the library changes. Implemented StringIO class as a subclass of RubyIO Moved "magic number" for console descriptor range to RubyIO class. Exposed RubyIO._stream to derived classes by making it protected. Implemented MutableStringStream to expose a MutableString as a CLR stream Implemented Marshal module Exposed regex options on RubyRegex Added ISerializable support to Range and RubyTypeBuilder Added method File.fnmatch -- Curt Hagenlocher curth at microsoft.com -------------- next part -------------- A non-text attachment was scrubbed... Name: RubyMarshal.diff Type: application/octet-stream Size: 97477 bytes Desc: RubyMarshal.diff URL: From jflam at microsoft.com Thu May 15 11:59:53 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Thu, 15 May 2008 08:59:53 -0700 Subject: [Ironruby-core] IronRuby r109 is out Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D92FB0FFF@NA-EXMSG-C115.redmond.corp.microsoft.com> This one should unblock almost all major known bugs. Next steps are to start looking at running some simple Rails unit tests to see what missing APIs fall out of that investigation. Thanks, -John -------------- next part -------------- An HTML attachment was scrubbed... URL: From jflam at microsoft.com Thu May 15 12:04:48 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Thu, 15 May 2008 09:04:48 -0700 Subject: [Ironruby-core] IR SVN 107 changes behavior of 'require' (compared to SVN 103) In-Reply-To: <53194650933664488F3F0C3A0AB5683245CC9B@nw60.napa.fi> References: <372109E149E8084D8E6C7D9CFD82E0632D92FB0955@NA-EXMSG-C115.redmond.corp.microsoft.com> <53194650933664488F3F0C3A0AB5683245CC9B@nw60.napa.fi> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D92FB1006@NA-EXMSG-C115.redmond.corp.microsoft.com> Hi Robert, I just tried and it didn't repro here with 108/109. Can you grab 109 and see if this repros on your machine? I hope this isn't some strange locale thing again ... Thanks, -John -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Robert Brotherus Sent: Thursday, May 15, 2008 6:26 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] IR SVN 107 changes behavior of 'require' (compared to SVN 103) IR 103 -> IR 107 update broke my program that relies on execution of "require '...'" strings. I don't know wether this is bug in IR 107 (or incorrect behaviour on IR 103 and earlier), so I did not file a bug report yet. I made a simplified version of my program that exposes this difference with minimal amount of code (this is a fully contained functional program): ------------------------------------------------------------------------ --- using System; using Microsoft.Scripting; using Microsoft.Scripting.Hosting; using Ruby.Runtime; class Program { static void Main(string[] args) { try { new Program().Run(); } catch (Exception ex) { Console.WriteLine(ex.ToString()); } } private void Run() { System.IO.File.WriteAllText("f.rb", @" module F def F.hello puts 'F:Hello' end end "); ExecuteStr("require 'f.rb'"); ExecuteStr("F.hello"); // IR SVN 107 fails here: "uninitialized constant Object::F" } private ScriptRuntime _scriptRuntime; private ScriptScope _sharedScope; public ScriptRuntime ScriptRuntime { get { if (_scriptRuntime == null) { _scriptRuntime = ScriptRuntime.Create(); _scriptRuntime.GlobalOptions.DebugMode = true; } return _scriptRuntime; } } public ScriptEngine Engine { get { return ScriptRuntime.GetEngine(typeof(RubyContext)); } } public ScriptScope SharedScope { get { if (_sharedScope == null) _sharedScope = Engine.CreateScope(); return _sharedScope; } } public object ExecuteStr(string code) { return Engine.CreateScriptSourceFromString(code).Execute(SharedScope); } } // class ------------------------------------------------------------------------ --- Program behaves in following way in IR SVN 103 / 107: SVN 103 F:Hello Press any key to continue . . . SVN 107: System.MemberAccessException: uninitialized constant Object::F at Ruby.Builtins.ModuleOps.ConstantMissing(RubyModule self, SymbolId name) in C:\programs\IronRuby\trunk\src\IronRuby.Libraries\Builtins\ModuleOps.cs: line 642 at _stub_##6(Closure , CallSite , CodeContext , RubyModule , SymbolId ) at Microsoft.Scripting.Utils.InvokeHelper`6.Invoke(Object arg0, Object arg1, Object arg2, Object arg3, Object arg4) in C:\programs\IronRuby\trunk\src\Microsoft.Scripting.Core\Utils\ReflectedC aller.Generated.cs:line 374 at Microsoft.Scripting.Utils.ReflectedCaller.InvokeInstance(Object instance, Object[] args) in C:\programs\IronRuby\trunk\src\Microsoft.Scripting.Core\Utils\ReflectedC aller.Generated.cs:line 38 ... at Microsoft.Scripting.Hosting.ScriptSource.Execute[T](ScriptScope scope) in C:\programs\IronRuby\trunk\src\Microsoft.Scripting\Hosting\ScriptSource. cs:line153 at IronRubyTest1.Program.ExecuteStr[T](String code, Object[] par) in C:\DATA\IronRubyTest1\Program.cs:line 92 at IronRubyTest1.Program.ExecuteStr(String code, Object[] par) in C:\DATA\IronRubyTest1\Program.cs:line 86 at IronRubyTest1.Program.Run() in C:\DATA\IronRubyTest1\Program.cs:line 40 at IronRubyTest1.Program.Main(String[] args) in C:\DATA\IronRubyTest1\Program.cs:line 19 Press any key to continue . . . ------------------- I will continue to use SVN 103 for now. If it turns out that SVN 107 behavior is "as designed" (and SVN 103 behavior that I relied on faulty), I will change my client code to deal with it. Robert Brotherus Software architect Napa Ltd Tammasaarenkatu 3, Helsinki FI-00180 P.O.Box 470, Helsinki FI-00181 Tel. +358 9 22 813 1 Direct. +358 9 22 813 611 GSM +358 45 11 456 02 Fax. +358 9 22 813 800 Email: Robert.Brotherus at napa.fi www.napa.fi _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From bacondarwin at googlemail.com Thu May 15 14:12:54 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Thu, 15 May 2008 19:12:54 +0100 Subject: [Ironruby-core] IR SVN 107 changes behavior of 'require' (compared to SVN 103) In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D92FB1006@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <372109E149E8084D8E6C7D9CFD82E0632D92FB0955@NA-EXMSG-C115.redmond.corp.microsoft.com> <53194650933664488F3F0C3A0AB5683245CC9B@nw60.napa.fi> <372109E149E8084D8E6C7D9CFD82E0632D92FB1006@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <003f01c8b6b7$4e124630$ea36d290$@com> I can reproduce this bug on r109. First I had to remove the SIGNED compilation symbol otherwise the program couldn't load the IronRuby assembly. I wonder if this is relevant and has some bearing on why John couldn't reproduce it? Pete -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of John Lam (IRONRUBY) Sent: Thursday,15 May 15, 2008 17:05 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] IR SVN 107 changes behavior of 'require' (compared to SVN 103) Hi Robert, I just tried and it didn't repro here with 108/109. Can you grab 109 and see if this repros on your machine? I hope this isn't some strange locale thing again ... Thanks, -John -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Robert Brotherus Sent: Thursday, May 15, 2008 6:26 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] IR SVN 107 changes behavior of 'require' (compared to SVN 103) IR 103 -> IR 107 update broke my program that relies on execution of "require '...'" strings. I don't know wether this is bug in IR 107 (or incorrect behaviour on IR 103 and earlier), so I did not file a bug report yet. I made a simplified version of my program that exposes this difference with minimal amount of code (this is a fully contained functional program): ------------------------------------------------------------------------ --- using System; using Microsoft.Scripting; using Microsoft.Scripting.Hosting; using Ruby.Runtime; class Program { static void Main(string[] args) { try { new Program().Run(); } catch (Exception ex) { Console.WriteLine(ex.ToString()); } } private void Run() { System.IO.File.WriteAllText("f.rb", @" module F def F.hello puts 'F:Hello' end end "); ExecuteStr("require 'f.rb'"); ExecuteStr("F.hello"); // IR SVN 107 fails here: "uninitialized constant Object::F" } private ScriptRuntime _scriptRuntime; private ScriptScope _sharedScope; public ScriptRuntime ScriptRuntime { get { if (_scriptRuntime == null) { _scriptRuntime = ScriptRuntime.Create(); _scriptRuntime.GlobalOptions.DebugMode = true; } return _scriptRuntime; } } public ScriptEngine Engine { get { return ScriptRuntime.GetEngine(typeof(RubyContext)); } } public ScriptScope SharedScope { get { if (_sharedScope == null) _sharedScope = Engine.CreateScope(); return _sharedScope; } } public object ExecuteStr(string code) { return Engine.CreateScriptSourceFromString(code).Execute(SharedScope); } } // class ------------------------------------------------------------------------ --- Program behaves in following way in IR SVN 103 / 107: SVN 103 F:Hello Press any key to continue . . . SVN 107: System.MemberAccessException: uninitialized constant Object::F at Ruby.Builtins.ModuleOps.ConstantMissing(RubyModule self, SymbolId name) in C:\programs\IronRuby\trunk\src\IronRuby.Libraries\Builtins\ModuleOps.cs: line 642 at _stub_##6(Closure , CallSite , CodeContext , RubyModule , SymbolId ) at Microsoft.Scripting.Utils.InvokeHelper`6.Invoke(Object arg0, Object arg1, Object arg2, Object arg3, Object arg4) in C:\programs\IronRuby\trunk\src\Microsoft.Scripting.Core\Utils\ReflectedC aller.Generated.cs:line 374 at Microsoft.Scripting.Utils.ReflectedCaller.InvokeInstance(Object instance, Object[] args) in C:\programs\IronRuby\trunk\src\Microsoft.Scripting.Core\Utils\ReflectedC aller.Generated.cs:line 38 ... at Microsoft.Scripting.Hosting.ScriptSource.Execute[T](ScriptScope scope) in C:\programs\IronRuby\trunk\src\Microsoft.Scripting\Hosting\ScriptSource. cs:line153 at IronRubyTest1.Program.ExecuteStr[T](String code, Object[] par) in C:\DATA\IronRubyTest1\Program.cs:line 92 at IronRubyTest1.Program.ExecuteStr(String code, Object[] par) in C:\DATA\IronRubyTest1\Program.cs:line 86 at IronRubyTest1.Program.Run() in C:\DATA\IronRubyTest1\Program.cs:line 40 at IronRubyTest1.Program.Main(String[] args) in C:\DATA\IronRubyTest1\Program.cs:line 19 Press any key to continue . . . ------------------- I will continue to use SVN 103 for now. If it turns out that SVN 107 behavior is "as designed" (and SVN 103 behavior that I relied on faulty), I will change my client code to deal with it. Robert Brotherus Software architect Napa Ltd Tammasaarenkatu 3, Helsinki FI-00180 P.O.Box 470, Helsinki FI-00181 Tel. +358 9 22 813 1 Direct. +358 9 22 813 611 GSM +358 45 11 456 02 Fax. +358 9 22 813 800 Email: Robert.Brotherus at napa.fi www.napa.fi _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From ivan at flanders.co.nz Thu May 15 16:56:25 2008 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Fri, 16 May 2008 08:56:25 +1200 Subject: [Ironruby-core] ironruby in action is available in EAP Message-ID: <1B96D00D-B207-4413-A188-AB94A3C639AD@flanders.co.nz> Hi My book for manning went into EAP. http://manning.com/carrero Cheers Ivan From Tomas.Matousek at microsoft.com Thu May 15 18:46:39 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Thu, 15 May 2008 15:46:39 -0700 Subject: [Ironruby-core] Code Review: RubyBugFixesII Message-ID: tfpt review /shelveset:RubyBugFixesII;REDMOND\tomat Fixes bug #20139: MemberAssignmentExpression computes lhs expression twice - It's still not precise (arguments to ArrayItemAccess are evaluated twice now), will fix that later. Fixes bug #20140: MemberAssignmentExpression not special cased for &&= and ||= Fixes bug #20131: require infinite loop Fixed bug #19901: Class variable with ||= Adds support for loading assemblies from a path. Should work the same way as MRI loads dlls. Implements Kernel#methods. Implements String#reverse. Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: RubyBugFixesII.diff Type: application/octet-stream Size: 75723 bytes Desc: RubyBugFixesII.diff URL: From michael.letterle at gmail.com Thu May 15 18:56:43 2008 From: michael.letterle at gmail.com (Michael Letterle) Date: Thu, 15 May 2008 18:56:43 -0400 Subject: [Ironruby-core] Ruby Design Meeting Tonight Message-ID: Tonight is the 3rd Ruby Design Meeting at #ruby-core on freenode. http://ruby-design.pbwiki.com/Design20080515 It'd be nice to have some additional IronRuby representation, especially from the core team :) Hope to see some of you there! -- Michael Letterle [Polymath Prokrammer] http://blog.prokrams.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From w.kelly at qut.edu.au Fri May 16 01:33:59 2008 From: w.kelly at qut.edu.au (Wayne Kelly) Date: Fri, 16 May 2008 15:33:59 +1000 Subject: [Ironruby-core] IronRuby r109 is out In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D92FB0FFF@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <372109E149E8084D8E6C7D9CFD82E0632D92FB0FFF@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: > From: John Lam (IRONRUBY) [jflam at microsoft.com] > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] IronRuby r109 is out > > Next steps are to start looking at running some simple Rails unit tests to see what > missing APIs fall out of that investigation. I haven't had a chance to investigate this in detail, but my preliminary tests show the following results: (after applying the latest version, plus a number of my own patches) Of the 365 test files required by my gems and rails use case: 315 load successfully The rest fail for the following reasons: 13 - Regexp.new overloads not implemented 11 - Socket::gethostname not implemented 8 - gsub $n bug [#20137] 7 - YAML::Syck::Resolver::use_types_at not implemented 3 - OpenSSL::Digest::OPENSSL_VERSION_NUMBER not defined 2 - Thread::critical= not implemented 1 - trap not implemented 1 - catch not implemented 1 - DATA global variable not defined 1 - IO::sync not implemented 1 - File::writable? not implemented The gsub bug is what's currently preventing gems setup.rb from executing correctly. Cheers, Wayne. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bacondarwin at googlemail.com Fri May 16 02:01:33 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Fri, 16 May 2008 07:01:33 +0100 Subject: [Ironruby-core] IronRuby r109 is out In-Reply-To: References: <372109E149E8084D8E6C7D9CFD82E0632D92FB0FFF@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <001201c8b71a$4c432280$e4c96780$@com> Hi Wayne, Socket.gethostname is now implemented (as of r108). Have you regenerated the Initializer.Generated.cs class? My update to r108 did not touch that file and that may be the reason it is not picking it up. Pete From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Wayne Kelly Sent: Friday,16 May 16, 2008 06:34 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] IronRuby r109 is out > From: John Lam (IRONRUBY) [jflam at microsoft.com] > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] IronRuby r109 is out > > Next steps are to start looking at running some simple Rails unit tests to see what > missing APIs fall out of that investigation. I haven't had a chance to investigate this in detail, but my preliminary tests show the following results: (after applying the latest version, plus a number of my own patches) Of the 365 test files required by my gems and rails use case: 315 load successfully The rest fail for the following reasons: 13 - Regexp.new overloads not implemented 11 - Socket::gethostname not implemented 8 - gsub $n bug [#20137] 7 - YAML::Syck::Resolver::use_types_at not implemented 3 - OpenSSL::Digest::OPENSSL_VERSION_NUMBER not defined 2 - Thread::critical= not implemented 1 - trap not implemented 1 - catch not implemented 1 - DATA global variable not defined 1 - IO::sync not implemented 1 - File::writable? not implemented The gsub bug is what's currently preventing gems setup.rb from executing correctly. Cheers, Wayne. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bacondarwin at googlemail.com Fri May 16 02:02:45 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Fri, 16 May 2008 07:02:45 +0100 Subject: [Ironruby-core] IR SVN 107 changes behavior of 'require' (compared to SVN 103) In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D92FB1006@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <372109E149E8084D8E6C7D9CFD82E0632D92FB0955@NA-EXMSG-C115.redmond.corp.microsoft.com> <53194650933664488F3F0C3A0AB5683245CC9B@nw60.napa.fi> <372109E149E8084D8E6C7D9CFD82E0632D92FB1006@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <001701c8b71a$777024d0$66506e70$@com> I believe the problem is that a two engines are being created. One by the call to ScriptRuntime.GetEngine(typeof(RubyContext)); inside Robert's code and another one inside Kernel#require. Pete -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of John Lam (IRONRUBY) Sent: Thursday,15 May 15, 2008 17:05 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] IR SVN 107 changes behavior of 'require' (compared to SVN 103) Hi Robert, I just tried and it didn't repro here with 108/109. Can you grab 109 and see if this repros on your machine? I hope this isn't some strange locale thing again ... Thanks, -John -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Robert Brotherus Sent: Thursday, May 15, 2008 6:26 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] IR SVN 107 changes behavior of 'require' (compared to SVN 103) IR 103 -> IR 107 update broke my program that relies on execution of "require '...'" strings. I don't know wether this is bug in IR 107 (or incorrect behaviour on IR 103 and earlier), so I did not file a bug report yet. I made a simplified version of my program that exposes this difference with minimal amount of code (this is a fully contained functional program): ------------------------------------------------------------------------ --- using System; using Microsoft.Scripting; using Microsoft.Scripting.Hosting; using Ruby.Runtime; class Program { static void Main(string[] args) { try { new Program().Run(); } catch (Exception ex) { Console.WriteLine(ex.ToString()); } } private void Run() { System.IO.File.WriteAllText("f.rb", @" module F def F.hello puts 'F:Hello' end end "); ExecuteStr("require 'f.rb'"); ExecuteStr("F.hello"); // IR SVN 107 fails here: "uninitialized constant Object::F" } private ScriptRuntime _scriptRuntime; private ScriptScope _sharedScope; public ScriptRuntime ScriptRuntime { get { if (_scriptRuntime == null) { _scriptRuntime = ScriptRuntime.Create(); _scriptRuntime.GlobalOptions.DebugMode = true; } return _scriptRuntime; } } public ScriptEngine Engine { get { return ScriptRuntime.GetEngine(typeof(RubyContext)); } } public ScriptScope SharedScope { get { if (_sharedScope == null) _sharedScope = Engine.CreateScope(); return _sharedScope; } } public object ExecuteStr(string code) { return Engine.CreateScriptSourceFromString(code).Execute(SharedScope); } } // class ------------------------------------------------------------------------ --- Program behaves in following way in IR SVN 103 / 107: SVN 103 F:Hello Press any key to continue . . . SVN 107: System.MemberAccessException: uninitialized constant Object::F at Ruby.Builtins.ModuleOps.ConstantMissing(RubyModule self, SymbolId name) in C:\programs\IronRuby\trunk\src\IronRuby.Libraries\Builtins\ModuleOps.cs: line 642 at _stub_##6(Closure , CallSite , CodeContext , RubyModule , SymbolId ) at Microsoft.Scripting.Utils.InvokeHelper`6.Invoke(Object arg0, Object arg1, Object arg2, Object arg3, Object arg4) in C:\programs\IronRuby\trunk\src\Microsoft.Scripting.Core\Utils\ReflectedC aller.Generated.cs:line 374 at Microsoft.Scripting.Utils.ReflectedCaller.InvokeInstance(Object instance, Object[] args) in C:\programs\IronRuby\trunk\src\Microsoft.Scripting.Core\Utils\ReflectedC aller.Generated.cs:line 38 ... at Microsoft.Scripting.Hosting.ScriptSource.Execute[T](ScriptScope scope) in C:\programs\IronRuby\trunk\src\Microsoft.Scripting\Hosting\ScriptSource. cs:line153 at IronRubyTest1.Program.ExecuteStr[T](String code, Object[] par) in C:\DATA\IronRubyTest1\Program.cs:line 92 at IronRubyTest1.Program.ExecuteStr(String code, Object[] par) in C:\DATA\IronRubyTest1\Program.cs:line 86 at IronRubyTest1.Program.Run() in C:\DATA\IronRubyTest1\Program.cs:line 40 at IronRubyTest1.Program.Main(String[] args) in C:\DATA\IronRubyTest1\Program.cs:line 19 Press any key to continue . . . ------------------- I will continue to use SVN 103 for now. If it turns out that SVN 107 behavior is "as designed" (and SVN 103 behavior that I relied on faulty), I will change my client code to deal with it. Robert Brotherus Software architect Napa Ltd Tammasaarenkatu 3, Helsinki FI-00180 P.O.Box 470, Helsinki FI-00181 Tel. +358 9 22 813 1 Direct. +358 9 22 813 611 GSM +358 45 11 456 02 Fax. +358 9 22 813 800 Email: Robert.Brotherus at napa.fi www.napa.fi _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From lists at ruby-forum.com Fri May 16 02:31:09 2008 From: lists at ruby-forum.com (Web Reservoir) Date: Fri, 16 May 2008 08:31:09 +0200 Subject: [Ironruby-core] ironruby in action is available in EAP In-Reply-To: <1B96D00D-B207-4413-A188-AB94A3C639AD@flanders.co.nz> References: <1B96D00D-B207-4413-A188-AB94A3C639AD@flanders.co.nz> Message-ID: Hi Ivan, Nice to see your First Book on IronRuby. I have downloaded the FREE Chapter and really enjoyed it. If I am not wrong, you were supposed to give few Tutorials on IronRuby with Active Record. What happened to it... ? I hope its coming soon for us. Thanks -- Posted via http://www.ruby-forum.com/. From robert.brotherus at napa.fi Fri May 16 03:26:23 2008 From: robert.brotherus at napa.fi (Robert Brotherus) Date: Fri, 16 May 2008 10:26:23 +0300 Subject: [Ironruby-core] IR SVN 107 changes behavior of 'require'(compared to SVN 103) References: <372109E149E8084D8E6C7D9CFD82E0632D92FB0955@NA-EXMSG-C115.redmond.corp.microsoft.com> <53194650933664488F3F0C3A0AB5683245CC9B@nw60.napa.fi><372109E149E8084D8E6C7D9CFD82E0632D92FB1006@NA-EXMSG-C115.redmond.corp.microsoft.com> <003f01c8b6b7$4e124630$ea36d290$@com> Message-ID: <53194650933664488F3F0C3A0AB5683245CD50@nw60.napa.fi> From: Peter Bacon Darwin > I can reproduce this bug on r109. > First I had to remove the SIGNED compilation symbol otherwise the program couldn't load the IronRuby assembly. > I wonder if this is relevant and has some bearing on why John couldn't reproduce it? Yes, I had to remove the 'SIGNED' compilation symbols as well. This has to do with what Wayne Kelly was already earlier commenting about: On Tue, May 13, 2008 at 10:47 PM, Wayne Kelly wrote: > I'm having trouble with strong names in the latest version. > Is IronRuby.dll meant to be strongly named? > The Microsoft.Scripting.Hosting.ScriptRuntimeSetup constructor has a hard coded dependence to: > IronRuby, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 > But building IronRuby.dll using IronRuby.csproj doesn't seem to produce a strongly named assembly. > I also note that IronRuby.csproj doesn't set SIGNED but the other projects do. If someone can provide instructions on how to compile the simple program I sent without removing the SIGNED symbols from the libraries, then I can see if I get it working. The SIGNED symbols appeared somewhere around SVN 103 and broke my program as well but at that time removing the SIGNED allowed working again (even with the 'require'). Robert Brotherus Software architect Napa Ltd Email: Robert.Brotherus at napa.fi www.napa.fi From robert.brotherus at napa.fi Fri May 16 03:46:42 2008 From: robert.brotherus at napa.fi (Robert Brotherus) Date: Fri, 16 May 2008 10:46:42 +0300 Subject: [Ironruby-core] IR SVN 107 changes behavior of'require'(compared to SVN 103) References: <372109E149E8084D8E6C7D9CFD82E0632D92FB0955@NA-EXMSG-C115.redmond.corp.microsoft.com> <53194650933664488F3F0C3A0AB5683245CC9B@nw60.napa.fi><372109E149E8084D8E6C7D9CFD82E0632D92FB1006@NA-EXMSG-C115.redmond.corp.microsoft.com><003f01c8b6b7$4e124630$ea36d290$@com> <53194650933664488F3F0C3A0AB5683245CD50@nw60.napa.fi> Message-ID: <53194650933664488F3F0C3A0AB568324CE340@nw60.napa.fi> Robert Brotherus > If someone can provide instructions on how to compile the simple program I sent without removing the > SIGNED symbols from the libraries, then I can see if I get it working. The SIGNED symbols appeared > somewhere around SVN 103 and broke my program as well but at that time removing the SIGNED allowed > working again (even with the 'require'). I must correct myself: The simple program (attached here again) does COMPILE against all these IR versions but with IR 103+ that are compiled with the default "SIGNED" symbol, it fails runtime: Microsoft.Scripting.Runtime.MissingTypeException: Type 'IronRuby, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, Ruby.Runtime.RubyContext' is missing or cannot be loaded. ---> System.IO.FileLoadException: Could not load file or assembly 'IronRuby, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) File name: 'IronRuby, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.Load(String assemblyString) at Microsoft.Scripting.PlatformAdaptationLayer.LoadAssembly(String name) in C:\programs\IronRuby\trunk\src\Microsoft.Scripting.Core\PlatformAdaptati onLayer.cs:line 125 at Microsoft.Scripting.Runtime.ScriptDomainManager.LanguageRegistration.Loa dLanguageContext() in C:\programs\IronRuby\trunk\src\Microsoft.Scripting.Core\Runtime\ScriptDo mainManager.cs:line 165 ... at Microsoft.Scripting.Hosting.ScriptSource.Execute(ScriptScope scope) in C:\programs\IronRuby\trunk\src\Microsoft.Scripting\Hosting\ScriptSource. cs:line 146 at Program.ExecuteStr(String code) in C:\DATA\IronRubyTest1\Program.cs:line 49 at Program.Run() in C:\DATA\IronRubyTest1\Program.cs:line 21 at Program.Main(String[] args) in C:\DATA\IronRubyTest1\Program.cs:line 9 Press any key to continue . . . ---------------- When SIGNED is turned off, then the programs works correctly at IR 103, but fails at IR 107+ to the reported earlier "System.MemberAccessException: uninitialized constant Object::F". I have now submitted bug (20167) about this. Robert Brotherus Software architect Napa Ltd Email: Robert.Brotherus at napa.fi www.napa.fi _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- A non-text attachment was scrubbed... Name: Program.cs Type: application/octet-stream Size: 1468 bytes Desc: Program.cs URL: From Tomas.Matousek at microsoft.com Fri May 16 00:03:13 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Thu, 15 May 2008 21:03:13 -0700 Subject: [Ironruby-core] Code Review: ThreadLib Message-ID: atfpt review /shelveset:ThreadLib;REDMOND\tomat A rough implementation of thread.so. Ignores differences of Ruby Mutex and .NET Monitor for now: - Ruby Mutex.lock in not reentrant by the same thread - it could be locked/unlocked from non-owning thread (.NET Monitor throws an exception in that case) Also IronRuby runtime itself is not hardened against race conditions yet. Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: ThreadLib.diff Type: application/octet-stream Size: 41477 bytes Desc: ThreadLib.diff URL: From bacondarwin at googlemail.com Fri May 16 04:51:30 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Fri, 16 May 2008 09:51:30 +0100 Subject: [Ironruby-core] IR SVN 107 changes behavior of'require'(compared to SVN 103) In-Reply-To: <53194650933664488F3F0C3A0AB568324CE340@nw60.napa.fi> References: <372109E149E8084D8E6C7D9CFD82E0632D92FB0955@NA-EXMSG-C115.redmond.corp.microsoft.com> <53194650933664488F3F0C3A0AB5683245CC9B@nw60.napa.fi><372109E149E8084D8E6C7D9CFD82E0632D92FB1006@NA-EXMSG-C115.redmond.corp.microsoft.com><003f01c8b6b7$4e124630$ea36d290$@com> <53194650933664488F3F0C3A0AB5683245CD50@nw60.napa.fi> <53194650933664488F3F0C3A0AB568324CE340@nw60.napa.fi> Message-ID: <001e01c8b732$0a2f50e0$1e8df2a0$@com> Yes, in the previous versions, the external projects had the option of a build configuration which did not have the SIGNED compilation symbol. This seems to have disappeared. The significance of this is that when you try to create the Ruby runtime it tries to look up the assembly for the language. If SIGNED is set then it looks them up with fully named assemblies (and so expects the assembly to be signed correctly). Obviously we are not provided with the private key to sign the assemblies and so the lookup fails. For some reason the RubyConsole project stills works even with this compilation symbol set. But if you create your own app then it fails. All you have to do is remove this symbol from the build for the Microsoft.Scripting project and the program will run. The runtime bug you reported is a bug somehow, although I am not sure if there is some other way of creating the Engine that stops multiple engines from being created. It seems to me that the engine is looked up using the language context as a key - in this case a RubyContext object. If you step through the code there are two of these objects and they do not have equivalent HashCodes so that triggers the creation of a new Engine. Either the object comparison for these objects needs to be fixed or the use of multiple RubyContexts needs to be fixed. Pete -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Robert Brotherus Sent: Friday,16 May 16, 2008 08:47 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] IR SVN 107 changes behavior of'require'(compared to SVN 103) Robert Brotherus > If someone can provide instructions on how to compile the simple program I sent without removing the > SIGNED symbols from the libraries, then I can see if I get it working. The SIGNED symbols appeared > somewhere around SVN 103 and broke my program as well but at that time removing the SIGNED allowed > working again (even with the 'require'). I must correct myself: The simple program (attached here again) does COMPILE against all these IR versions but with IR 103+ that are compiled with the default "SIGNED" symbol, it fails runtime: Microsoft.Scripting.Runtime.MissingTypeException: Type 'IronRuby, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, Ruby.Runtime.RubyContext' is missing or cannot be loaded. ---> System.IO.FileLoadException: Could not load file or assembly 'IronRuby, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) File name: 'IronRuby, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.Load(String assemblyString) at Microsoft.Scripting.PlatformAdaptationLayer.LoadAssembly(String name) in C:\programs\IronRuby\trunk\src\Microsoft.Scripting.Core\PlatformAdaptati onLayer.cs:line 125 at Microsoft.Scripting.Runtime.ScriptDomainManager.LanguageRegistration.Loa dLanguageContext() in C:\programs\IronRuby\trunk\src\Microsoft.Scripting.Core\Runtime\ScriptDo mainManager.cs:line 165 ... at Microsoft.Scripting.Hosting.ScriptSource.Execute(ScriptScope scope) in C:\programs\IronRuby\trunk\src\Microsoft.Scripting\Hosting\ScriptSource. cs:line 146 at Program.ExecuteStr(String code) in C:\DATA\IronRubyTest1\Program.cs:line 49 at Program.Run() in C:\DATA\IronRubyTest1\Program.cs:line 21 at Program.Main(String[] args) in C:\DATA\IronRubyTest1\Program.cs:line 9 Press any key to continue . . . ---------------- When SIGNED is turned off, then the programs works correctly at IR 103, but fails at IR 107+ to the reported earlier "System.MemberAccessException: uninitialized constant Object::F". I have now submitted bug (20167) about this. Robert Brotherus Software architect Napa Ltd Email: Robert.Brotherus at napa.fi www.napa.fi _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From ivan at flanders.co.nz Fri May 16 06:17:42 2008 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Fri, 16 May 2008 22:17:42 +1200 Subject: [Ironruby-core] ironruby in action is available in EAP In-Reply-To: References: <1B96D00D-B207-4413-A188-AB94A3C639AD@flanders.co.nz> Message-ID: <24CDF9D1-D300-4BA7-A1F4-D6F88B7793EE@flanders.co.nz> Hi As you can see in the TOC that is in chapter 8. I can't write about something that can not work yet, can I. Thanks Ivan Sent from my iPhone On 16/05/2008, at 6:31 PM, Web Reservoir wrote: > Hi Ivan, > > Nice to see your First Book on IronRuby. > > I have downloaded the FREE Chapter and really enjoyed it. > > If I am not wrong, you were supposed to give few Tutorials on IronRuby > with Active Record. What happened to it... ? > > I hope its coming soon for us. > > Thanks > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From w.kelly at qut.edu.au Fri May 16 07:14:37 2008 From: w.kelly at qut.edu.au (Wayne Kelly) Date: Fri, 16 May 2008 21:14:37 +1000 Subject: [Ironruby-core] IronRuby r109 is out In-Reply-To: <001201c8b71a$4c432280$e4c96780$@com> References: <372109E149E8084D8E6C7D9CFD82E0632D92FB0FFF@NA-EXMSG-C115.redmond.corp.microsoft.com> , <001201c8b71a$4c432280$e4c96780$@com> Message-ID: It seems that a number of socket methods were implemented in r108 but deleted in r109! (not sure what else has gone missing) Cheers, Wayne. ________________________________ From: ironruby-core-bounces at rubyforge.org [ironruby-core-bounces at rubyforge.org] On Behalf Of Peter Bacon Darwin [bacondarwin at googlemail.com] Sent: Friday, 16 May 2008 4:01 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] IronRuby r109 is out Hi Wayne, Socket.gethostname is now implemented (as of r108). Have you regenerated the Initializer.Generated.cs class? My update to r108 did not touch that file and that may be the reason it is not picking it up. Pete From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Wayne Kelly Sent: Friday,16 May 16, 2008 06:34 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] IronRuby r109 is out > From: John Lam (IRONRUBY) [jflam at microsoft.com] > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] IronRuby r109 is out > > Next steps are to start looking at running some simple Rails unit tests to see what > missing APIs fall out of that investigation. I haven't had a chance to investigate this in detail, but my preliminary tests show the following results: (after applying the latest version, plus a number of my own patches) Of the 365 test files required by my gems and rails use case: 315 load successfully The rest fail for the following reasons: 13 - Regexp.new overloads not implemented 11 - Socket::gethostname not implemented 8 - gsub $n bug [#20137] 7 - YAML::Syck::Resolver::use_types_at not implemented 3 - OpenSSL::Digest::OPENSSL_VERSION_NUMBER not defined 2 - Thread::critical= not implemented 1 - trap not implemented 1 - catch not implemented 1 - DATA global variable not defined 1 - IO::sync not implemented 1 - File::writable? not implemented The gsub bug is what's currently preventing gems setup.rb from executing correctly. Cheers, Wayne. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bacondarwin at googlemail.com Fri May 16 07:27:21 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Fri, 16 May 2008 12:27:21 +0100 Subject: [Ironruby-core] IronRuby r109 is out In-Reply-To: References: <372109E149E8084D8E6C7D9CFD82E0632D92FB0FFF@NA-EXMSG-C115.redmond.corp.microsoft.com> , <001201c8b71a$4c432280$e4c96780$@com> Message-ID: <002b01c8b747$d0052be0$700f83a0$@com> Looks like we are going to have to think about how the backwards sync works, since it appears that when John pushes out a new version from TFS it wipes out anything that I have committed. I'll push my files out again today. Pete From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Wayne Kelly Sent: Friday,16 May 16, 2008 12:15 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] IronRuby r109 is out It seems that a number of socket methods were implemented in r108 but deleted in r109! (not sure what else has gone missing) Cheers, Wayne. _____ From: ironruby-core-bounces at rubyforge.org [ironruby-core-bounces at rubyforge.org] On Behalf Of Peter Bacon Darwin [bacondarwin at googlemail.com] Sent: Friday, 16 May 2008 4:01 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] IronRuby r109 is out Hi Wayne, Socket.gethostname is now implemented (as of r108). Have you regenerated the Initializer.Generated.cs class? My update to r108 did not touch that file and that may be the reason it is not picking it up. Pete From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Wayne Kelly Sent: Friday,16 May 16, 2008 06:34 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] IronRuby r109 is out > From: John Lam (IRONRUBY) [jflam at microsoft.com] > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] IronRuby r109 is out > > Next steps are to start looking at running some simple Rails unit tests to see what > missing APIs fall out of that investigation. I haven't had a chance to investigate this in detail, but my preliminary tests show the following results: (after applying the latest version, plus a number of my own patches) Of the 365 test files required by my gems and rails use case: 315 load successfully The rest fail for the following reasons: 13 - Regexp.new overloads not implemented 11 - Socket::gethostname not implemented 8 - gsub $n bug [#20137] 7 - YAML::Syck::Resolver::use_types_at not implemented 3 - OpenSSL::Digest::OPENSSL_VERSION_NUMBER not defined 2 - Thread::critical= not implemented 1 - trap not implemented 1 - catch not implemented 1 - DATA global variable not defined 1 - IO::sync not implemented 1 - File::writable? not implemented The gsub bug is what's currently preventing gems setup.rb from executing correctly. Cheers, Wayne. -------------- next part -------------- An HTML attachment was scrubbed... URL: From w.kelly at qut.edu.au Fri May 16 08:28:09 2008 From: w.kelly at qut.edu.au (Wayne Kelly) Date: Fri, 16 May 2008 22:28:09 +1000 Subject: [Ironruby-core] Regexp.new overload Message-ID: > From: Wayne Kelly [w.kelly at qut.edu.au] > Sent: Friday, 16 May 2008 3:33 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] IronRuby r109 is out > > ... > > The rest fail for the following reasons: > 13 - Regexp.new overloads not implemented > ... The missing overload for Regexp.new is the one that takes two string parameters, the second parameter represents the options and need not be an integer, if the options is not false then the regexp will be case insensitive. The required patch is something like: [RubyConstructor] public static RubyRegex/*!*/ Create([NotNull]MutableString/*!*/ str, object options) { return new RubyRegex(str, RubyRegex.ToClrOptions(Protocols.IsTrue(options) ? RegExOptions.IGNORECASE : RegExOptions.NONE)); } Cheers, Wayne. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jflam at microsoft.com Fri May 16 09:25:11 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Fri, 16 May 2008 06:25:11 -0700 Subject: [Ironruby-core] IronRuby r109 is out In-Reply-To: <002b01c8b747$d0052be0$700f83a0$@com> References: <372109E149E8084D8E6C7D9CFD82E0632D92FB0FFF@NA-EXMSG-C115.redmond.corp.microsoft.com> , <001201c8b71a$4c432280$e4c96780$@com> <002b01c8b747$d0052be0$700f83a0$@com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D9305FF56@NA-EXMSG-C115.redmond.corp.microsoft.com> Peter Bacon Darwin: > Looks like we are going to have to think about how the backwards sync > works, since it appears that when John pushes out a new version from > TFS it wipes out anything that I have committed. > > I'll push my files out again today. Yikes. Sorry about that. After thinking about it more on the commute into work today, I've realized that we're going to have to do the full RI/FI thing against the two trees. I suspect that we're going to have to enforce a policy that says that check-ins against the SVN tree are allowed at all times *except* for a daily synchronization window. This also means that there will be exactly one daily sync of the trees due to the overhead associated with doing so. Jim - this means that there will be real work associated with this. There's no way to fully automate this since essentially you're merging two branches on a daily basis. As long as folks are working in different parts of the tree, there shouldn't be an enormous amount of work that goes into the sync. That said, a redesign in something like the binder would cause a lot of work to happen during the merge process. Let's think about this some more and come up with a plan. BUT, in the interests of deferring work until after RailsConf - can you (Pete) revert to submitting patches against sockets again? I'll run through the full SNAP checkin thing on our side until we figure out a way to make things more free-flowing on the SVN side. Thanks! -John From w.kelly at qut.edu.au Fri May 16 09:59:05 2008 From: w.kelly at qut.edu.au (Wayne Kelly) Date: Fri, 16 May 2008 23:59:05 +1000 Subject: [Ironruby-core] r109 - Rails progress Message-ID: After a few more patches (for Regexp, Socket, Sha1 and OpenSSL), the load failures are reduced to: Builtin libraries: 8 - gsub $n bug [#20137] 2 - Thread::critical= not implemented 1 - trap not implemented 1 - catch not implemented 1 - open not implemented 1 - DATA global variable not defined 1 - IO::sync not implemented 1 - File::writable? not implemented Standard Native libraries: 8 - YAML::Syck not implemented 2 - OpenSSL::PKey not defined Is there a prototype implementation for YAML yet? Cheers, Wayne. From jflam at microsoft.com Fri May 16 10:02:18 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Fri, 16 May 2008 07:02:18 -0700 Subject: [Ironruby-core] r109 - Rails progress In-Reply-To: References: Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D9305FF86@NA-EXMSG-C115.redmond.corp.microsoft.com> Looking good! We have a fairly complete implementation of YAML that's waiting to be integrated. I'll work through the patch backlog now. Thanks, -John > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Wayne Kelly > Sent: Friday, May 16, 2008 6:59 AM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] r109 - Rails progress > > After a few more patches (for Regexp, Socket, Sha1 and OpenSSL), the > load failures are reduced to: > > Builtin libraries: > 8 - gsub $n bug [#20137] > 2 - Thread::critical= not implemented > 1 - trap not implemented > 1 - catch not implemented > 1 - open not implemented > 1 - DATA global variable not defined > 1 - IO::sync not implemented > 1 - File::writable? not implemented > > Standard Native libraries: > 8 - YAML::Syck not implemented > 2 - OpenSSL::PKey not defined > > Is there a prototype implementation for YAML yet? > > Cheers, Wayne. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From cjac at colliertech.org Fri May 16 10:40:21 2008 From: cjac at colliertech.org (C.J. Adams-Collier) Date: Fri, 16 May 2008 07:40:21 -0700 Subject: [Ironruby-core] [Fwd: Bug#481431: Acknowledgement (ITP: ironruby -- ruby on the dlr)] Message-ID: <1210948821.5398.15.camel@lappy> FYI, I've opened an "intent to package" bug for ironruby for Debian. Cheers, C.J. -------------- next part -------------- An embedded message was scrubbed... From: owner at bugs.debian.org (Debian Bug Tracking System) Subject: Bug#481431: Acknowledgement (ITP: ironruby -- ruby on the dlr) Date: Thu, 15 May 2008 23:39:08 +0000 Size: 2427 URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From Tomas.Matousek at microsoft.com Fri May 16 11:40:08 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Fri, 16 May 2008 08:40:08 -0700 Subject: [Ironruby-core] IR SVN 107 changes behavior of 'require' (compared to SVN 103) In-Reply-To: <001701c8b71a$777024d0$66506e70$@com> References: <372109E149E8084D8E6C7D9CFD82E0632D92FB0955@NA-EXMSG-C115.redmond.corp.microsoft.com> <53194650933664488F3F0C3A0AB5683245CC9B@nw60.napa.fi> <372109E149E8084D8E6C7D9CFD82E0632D92FB1006@NA-EXMSG-C115.redmond.corp.microsoft.com> <001701c8b71a$777024d0$66506e70$@com> Message-ID: That shouldn't be the case. There can be at most one engine per language per ScriptRuntime. The program seems to work on my machine. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Peter Bacon Darwin Sent: Thursday, May 15, 2008 11:03 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] IR SVN 107 changes behavior of 'require' (compared to SVN 103) I believe the problem is that a two engines are being created. One by the call to ScriptRuntime.GetEngine(typeof(RubyContext)); inside Robert's code and another one inside Kernel#require. Pete -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of John Lam (IRONRUBY) Sent: Thursday,15 May 15, 2008 17:05 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] IR SVN 107 changes behavior of 'require' (compared to SVN 103) Hi Robert, I just tried and it didn't repro here with 108/109. Can you grab 109 and see if this repros on your machine? I hope this isn't some strange locale thing again ... Thanks, -John -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Robert Brotherus Sent: Thursday, May 15, 2008 6:26 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] IR SVN 107 changes behavior of 'require' (compared to SVN 103) IR 103 -> IR 107 update broke my program that relies on execution of "require '...'" strings. I don't know wether this is bug in IR 107 (or incorrect behaviour on IR 103 and earlier), so I did not file a bug report yet. I made a simplified version of my program that exposes this difference with minimal amount of code (this is a fully contained functional program): ------------------------------------------------------------------------ --- using System; using Microsoft.Scripting; using Microsoft.Scripting.Hosting; using Ruby.Runtime; class Program { static void Main(string[] args) { try { new Program().Run(); } catch (Exception ex) { Console.WriteLine(ex.ToString()); } } private void Run() { System.IO.File.WriteAllText("f.rb", @" module F def F.hello puts 'F:Hello' end end "); ExecuteStr("require 'f.rb'"); ExecuteStr("F.hello"); // IR SVN 107 fails here: "uninitialized constant Object::F" } private ScriptRuntime _scriptRuntime; private ScriptScope _sharedScope; public ScriptRuntime ScriptRuntime { get { if (_scriptRuntime == null) { _scriptRuntime = ScriptRuntime.Create(); _scriptRuntime.GlobalOptions.DebugMode = true; } return _scriptRuntime; } } public ScriptEngine Engine { get { return ScriptRuntime.GetEngine(typeof(RubyContext)); } } public ScriptScope SharedScope { get { if (_sharedScope == null) _sharedScope = Engine.CreateScope(); return _sharedScope; } } public object ExecuteStr(string code) { return Engine.CreateScriptSourceFromString(code).Execute(SharedScope); } } // class ------------------------------------------------------------------------ --- Program behaves in following way in IR SVN 103 / 107: SVN 103 F:Hello Press any key to continue . . . SVN 107: System.MemberAccessException: uninitialized constant Object::F at Ruby.Builtins.ModuleOps.ConstantMissing(RubyModule self, SymbolId name) in C:\programs\IronRuby\trunk\src\IronRuby.Libraries\Builtins\ModuleOps.cs: line 642 at _stub_##6(Closure , CallSite , CodeContext , RubyModule , SymbolId ) at Microsoft.Scripting.Utils.InvokeHelper`6.Invoke(Object arg0, Object arg1, Object arg2, Object arg3, Object arg4) in C:\programs\IronRuby\trunk\src\Microsoft.Scripting.Core\Utils\ReflectedC aller.Generated.cs:line 374 at Microsoft.Scripting.Utils.ReflectedCaller.InvokeInstance(Object instance, Object[] args) in C:\programs\IronRuby\trunk\src\Microsoft.Scripting.Core\Utils\ReflectedC aller.Generated.cs:line 38 ... at Microsoft.Scripting.Hosting.ScriptSource.Execute[T](ScriptScope scope) in C:\programs\IronRuby\trunk\src\Microsoft.Scripting\Hosting\ScriptSource. cs:line153 at IronRubyTest1.Program.ExecuteStr[T](String code, Object[] par) in C:\DATA\IronRubyTest1\Program.cs:line 92 at IronRubyTest1.Program.ExecuteStr(String code, Object[] par) in C:\DATA\IronRubyTest1\Program.cs:line 86 at IronRubyTest1.Program.Run() in C:\DATA\IronRubyTest1\Program.cs:line 40 at IronRubyTest1.Program.Main(String[] args) in C:\DATA\IronRubyTest1\Program.cs:line 19 Press any key to continue . . . ------------------- I will continue to use SVN 103 for now. If it turns out that SVN 107 behavior is "as designed" (and SVN 103 behavior that I relied on faulty), I will change my client code to deal with it. Robert Brotherus Software architect Napa Ltd Tammasaarenkatu 3, Helsinki FI-00180 P.O.Box 470, Helsinki FI-00181 Tel. +358 9 22 813 1 Direct. +358 9 22 813 611 GSM +358 45 11 456 02 Fax. +358 9 22 813 800 Email: Robert.Brotherus at napa.fi www.napa.fi _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From Tomas.Matousek at microsoft.com Fri May 16 11:43:46 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Fri, 16 May 2008 08:43:46 -0700 Subject: [Ironruby-core] r109 - Rails progress In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D9305FF86@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <372109E149E8084D8E6C7D9CFD82E0632D9305FF86@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: I'm working on some Ruby module loader improvements that are necessary to load Yaml lib. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of John Lam (IRONRUBY) Sent: Friday, May 16, 2008 7:02 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] r109 - Rails progress Looking good! We have a fairly complete implementation of YAML that's waiting to be integrated. I'll work through the patch backlog now. Thanks, -John > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Wayne Kelly > Sent: Friday, May 16, 2008 6:59 AM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] r109 - Rails progress > > After a few more patches (for Regexp, Socket, Sha1 and OpenSSL), the > load failures are reduced to: > > Builtin libraries: > 8 - gsub $n bug [#20137] > 2 - Thread::critical= not implemented > 1 - trap not implemented > 1 - catch not implemented > 1 - open not implemented > 1 - DATA global variable not defined > 1 - IO::sync not implemented > 1 - File::writable? not implemented > > Standard Native libraries: > 8 - YAML::Syck not implemented > 2 - OpenSSL::PKey not defined > > Is there a prototype implementation for YAML yet? > > Cheers, Wayne. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From curth at microsoft.com Fri May 16 11:45:23 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Fri, 16 May 2008 08:45:23 -0700 Subject: [Ironruby-core] Code Review: RubyLibTweaks1 Message-ID: tfpt review /shelveset:RubyLibTweaks1;REDMOND\curth Implemented minor changes for library support: Very basic Dir.glob (just enough for Rails test case) Enumerable::Enumerator Fcntl constants Thread.current Added temporary code to loader to report modules as loaded if built into IronRuby but external to Matz -- Curt Hagenlocher curth at microsoft.com -------------- next part -------------- A non-text attachment was scrubbed... Name: RubyLibTweaks1.diff Type: application/octet-stream Size: 92087 bytes Desc: RubyLibTweaks1.diff URL: From bacondarwin at googlemail.com Fri May 16 13:01:18 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Fri, 16 May 2008 18:01:18 +0100 Subject: [Ironruby-core] IR SVN 107 changes behavior of 'require' (compared to SVN 103) In-Reply-To: References: <372109E149E8084D8E6C7D9CFD82E0632D92FB0955@NA-EXMSG-C115.redmond.corp.microsoft.com> <53194650933664488F3F0C3A0AB5683245CC9B@nw60.napa.fi> <372109E149E8084D8E6C7D9CFD82E0632D92FB1006@NA-EXMSG-C115.redmond.corp.microsoft.com> <001701c8b71a$777024d0$66506e70$@com> Message-ID: <005301c8b776$7764d560$662e8020$@com> When I step through the code, I can see that the Engines dictionary has 3 entries. One is the InvariantLanguage and two are keyed on RubyContext. It appears that the comparison of the RubyContext object that is already in the dictionary and the new one (the one passed in by the Kernel#require method) are not "equal" and so the code creates a new entry in the dictionary for the second RubyContext object. I am not exactly sure what comparison algorithm is being used but certainly if you look at the two RubyContext objects they have different HashCodes. I did briefly try overriding GetHashCode on RubyContext to see if this made any difference but it didn't appear to. Pete -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek Sent: Friday,16 May 16, 2008 16:40 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] IR SVN 107 changes behavior of 'require' (compared to SVN 103) That shouldn't be the case. There can be at most one engine per language per ScriptRuntime. The program seems to work on my machine. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Peter Bacon Darwin Sent: Thursday, May 15, 2008 11:03 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] IR SVN 107 changes behavior of 'require' (compared to SVN 103) I believe the problem is that a two engines are being created. One by the call to ScriptRuntime.GetEngine(typeof(RubyContext)); inside Robert's code and another one inside Kernel#require. Pete -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of John Lam (IRONRUBY) Sent: Thursday,15 May 15, 2008 17:05 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] IR SVN 107 changes behavior of 'require' (compared to SVN 103) Hi Robert, I just tried and it didn't repro here with 108/109. Can you grab 109 and see if this repros on your machine? I hope this isn't some strange locale thing again ... Thanks, -John -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Robert Brotherus Sent: Thursday, May 15, 2008 6:26 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] IR SVN 107 changes behavior of 'require' (compared to SVN 103) IR 103 -> IR 107 update broke my program that relies on execution of "require '...'" strings. I don't know wether this is bug in IR 107 (or incorrect behaviour on IR 103 and earlier), so I did not file a bug report yet. I made a simplified version of my program that exposes this difference with minimal amount of code (this is a fully contained functional program): ------------------------------------------------------------------------ --- using System; using Microsoft.Scripting; using Microsoft.Scripting.Hosting; using Ruby.Runtime; class Program { static void Main(string[] args) { try { new Program().Run(); } catch (Exception ex) { Console.WriteLine(ex.ToString()); } } private void Run() { System.IO.File.WriteAllText("f.rb", @" module F def F.hello puts 'F:Hello' end end "); ExecuteStr("require 'f.rb'"); ExecuteStr("F.hello"); // IR SVN 107 fails here: "uninitialized constant Object::F" } private ScriptRuntime _scriptRuntime; private ScriptScope _sharedScope; public ScriptRuntime ScriptRuntime { get { if (_scriptRuntime == null) { _scriptRuntime = ScriptRuntime.Create(); _scriptRuntime.GlobalOptions.DebugMode = true; } return _scriptRuntime; } } public ScriptEngine Engine { get { return ScriptRuntime.GetEngine(typeof(RubyContext)); } } public ScriptScope SharedScope { get { if (_sharedScope == null) _sharedScope = Engine.CreateScope(); return _sharedScope; } } public object ExecuteStr(string code) { return Engine.CreateScriptSourceFromString(code).Execute(SharedScope); } } // class ------------------------------------------------------------------------ --- Program behaves in following way in IR SVN 103 / 107: SVN 103 F:Hello Press any key to continue . . . SVN 107: System.MemberAccessException: uninitialized constant Object::F at Ruby.Builtins.ModuleOps.ConstantMissing(RubyModule self, SymbolId name) in C:\programs\IronRuby\trunk\src\IronRuby.Libraries\Builtins\ModuleOps.cs: line 642 at _stub_##6(Closure , CallSite , CodeContext , RubyModule , SymbolId ) at Microsoft.Scripting.Utils.InvokeHelper`6.Invoke(Object arg0, Object arg1, Object arg2, Object arg3, Object arg4) in C:\programs\IronRuby\trunk\src\Microsoft.Scripting.Core\Utils\ReflectedC aller.Generated.cs:line 374 at Microsoft.Scripting.Utils.ReflectedCaller.InvokeInstance(Object instance, Object[] args) in C:\programs\IronRuby\trunk\src\Microsoft.Scripting.Core\Utils\ReflectedC aller.Generated.cs:line 38 ... at Microsoft.Scripting.Hosting.ScriptSource.Execute[T](ScriptScope scope) in C:\programs\IronRuby\trunk\src\Microsoft.Scripting\Hosting\ScriptSource. cs:line153 at IronRubyTest1.Program.ExecuteStr[T](String code, Object[] par) in C:\DATA\IronRubyTest1\Program.cs:line 92 at IronRubyTest1.Program.ExecuteStr(String code, Object[] par) in C:\DATA\IronRubyTest1\Program.cs:line 86 at IronRubyTest1.Program.Run() in C:\DATA\IronRubyTest1\Program.cs:line 40 at IronRubyTest1.Program.Main(String[] args) in C:\DATA\IronRubyTest1\Program.cs:line 19 Press any key to continue . . . ------------------- I will continue to use SVN 103 for now. If it turns out that SVN 107 behavior is "as designed" (and SVN 103 behavior that I relied on faulty), I will change my client code to deal with it. Robert Brotherus Software architect Napa Ltd Tammasaarenkatu 3, Helsinki FI-00180 P.O.Box 470, Helsinki FI-00181 Tel. +358 9 22 813 1 Direct. +358 9 22 813 611 GSM +358 45 11 456 02 Fax. +358 9 22 813 800 Email: Robert.Brotherus at napa.fi www.napa.fi _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From brianblackwell at realemail.net Fri May 16 15:03:03 2008 From: brianblackwell at realemail.net (Brian Blackwell) Date: Sat, 17 May 2008 05:03:03 +1000 Subject: [Ironruby-core] activerecord status with r110 Message-ID: <1210964583.24335.1253577967@webmail.messagingengine.com> As a supplement to Wayne's work with "gems setup.rb", here is a quick status update with "require 'active_record'" with r110. The following bugs or unimplemented features are currently blocking active_record from loading correctly: (1) define_method overload not implemented - bug #20119 (2) Thread.critical= not implemented (3) Regexp.new overloads not implemented (see Wayne's email) (4) require infinite loop - bug #20131 (5) Kernel.caller not implemented (6) Dir.glob pattern bug #19843, #19950 (7) Array.pack not implemented (8) Class variable assignment expression bug (e.g. @@x ||= 123) - bug #19901 (9) bigdecimal not implemented I have managed to get "require 'active_record'" to work by applying my own patches and workarounds for the above issues. I will try to get some simple activerecord use cases up and running shortly... -Brian From jflam at microsoft.com Fri May 16 16:26:49 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Fri, 16 May 2008 13:26:49 -0700 Subject: [Ironruby-core] Bug reports - can you please include where you found them? Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D93060321@NA-EXMSG-C115.redmond.corp.microsoft.com> We're trying to reduce the amount of work that we need to do before RailsConf, so if you're submitting bugs, can you please tell us where you found them? IOW bugs that aren't on the critical path towards Rails will be punted to post-RailsConf. Thanks! -John -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.letterle at gmail.com Fri May 16 16:59:55 2008 From: michael.letterle at gmail.com (Michael Letterle) Date: Fri, 16 May 2008 16:59:55 -0400 Subject: [Ironruby-core] Toward MSpec Message-ID: Just the end of the week update. I haven't been as active these last few months due to Cleveland Day of .NET planning, but that's this Saturday so hopefully soon I can get back in full swing. Right now I'm playing with getting MSpec (the RubySpec runner), running under IronRuby. The major hurdle right now seems to be that catch/throw isn't implemented. Bug #19888 was also an issue, which I submitted a patch for today. -- Michael Letterle [Polymath Prokrammer] http://blog.prokrams.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From curth at microsoft.com Fri May 16 17:54:32 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Fri, 16 May 2008 14:54:32 -0700 Subject: [Ironruby-core] activerecord status with r110 In-Reply-To: <1210964583.24335.1253577967@webmail.messagingengine.com> References: <1210964583.24335.1253577967@webmail.messagingengine.com> Message-ID: Do you have any feeling for how these programs are using thread.critical=? -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Brian Blackwell Sent: Friday, May 16, 2008 12:03 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] activerecord status with r110 As a supplement to Wayne's work with "gems setup.rb", here is a quick status update with "require 'active_record'" with r110. The following bugs or unimplemented features are currently blocking active_record from loading correctly: (1) define_method overload not implemented - bug #20119 (2) Thread.critical= not implemented (3) Regexp.new overloads not implemented (see Wayne's email) (4) require infinite loop - bug #20131 (5) Kernel.caller not implemented (6) Dir.glob pattern bug #19843, #19950 (7) Array.pack not implemented (8) Class variable assignment expression bug (e.g. @@x ||= 123) - bug #19901 (9) bigdecimal not implemented I have managed to get "require 'active_record'" to work by applying my own patches and workarounds for the above issues. I will try to get some simple activerecord use cases up and running shortly... -Brian _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From michael.letterle at gmail.com Fri May 16 18:15:49 2008 From: michael.letterle at gmail.com (Michael Letterle) Date: Fri, 16 May 2008 18:15:49 -0400 Subject: [Ironruby-core] Toward MSpec In-Reply-To: References: Message-ID: I made it this far :) C:\Mike\VS08Proj\IronRuby\trunk\build\debug>ir -D "c:\Mike\Dev\rubyspec\mspec\bin\mspec" -h mspec [COMMAND] [options] (FILE|DIRECTORY|GLOB)+ The mspec command sets up and invokes the sub-commands (see below) to enable, for instance, running the specs with different implementations like ruby, jruby, rbx, etc. I produced a pretty naive implementation of catch/throw that seems pretty functional for the moment, I think the sticking point now is regex's actually.. On Fri, May 16, 2008 at 4:59 PM, Michael Letterle < michael.letterle at gmail.com> wrote: > Just the end of the week update. I haven't been as active these last few > months due to Cleveland Day of .NET planning, but that's this Saturday so > hopefully soon I can get back in full swing. Right now I'm playing with > getting MSpec (the RubySpec runner), running under IronRuby. The major > hurdle right now seems to be that catch/throw isn't implemented. Bug #19888 > was also an issue, which I submitted a patch for today. > -- > Michael Letterle > [Polymath Prokrammer] > http://blog.prokrams.com > > -- Michael Letterle [Polymath Prokrammer] http://blog.prokrams.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Fri May 16 18:18:56 2008 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Sat, 17 May 2008 10:18:56 +1200 Subject: [Ironruby-core] r105 broke assembly loading In-Reply-To: References: <5CEDF42C-66A5-423E-B460-78482D79CE20@flanders.co.nz> <372109E149E8084D8E6C7D9CFD82E0632D92FB06A9@NA-EXMSG-C115.redmond.corp.microsoft.com> <7BD9F98D-8ADB-487D-9A60-2AADC4C4EC6D@flanders.co.nz> Message-ID: Hi, I submitted a patch that restores that original behavior. Cheers Ivan On Wed, May 14, 2008 at 5:11 PM, Tomas Matousek < Tomas.Matousek at microsoft.com> wrote: > I see. The problem is that an application that is written in a scripting > language is not treated the same as a compiled .exe file in CLR's assembly > loading mechanism. Executable file defines a directory from whose > subdirectories could private assemblies be loaded. Since we have no .exe > file for Ruby apps CLR loader doesn't consider the root of the app during > the search for an assembly. > > I'll add support for loading from .dlls back. Framework assemblies should > still be loaded either using Kernel#require(). > > > > Tomas > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Ivan Porto Carrero > *Sent:* Tuesday, May 13, 2008 6:50 PM > *To:* ironruby-core at rubyforge.org > *Subject:* Re: [Ironruby-core] r105 broke assembly loading > > > > That also isn't working for me. > > If I use /paths:full path here or -I "full path here" it still doesn't let > me require that assembly . > > > > > > > > > > > > On 14/05/2008, at 1:27 PM, Steve Eichert wrote: > > > > I haven't tried revision 105 to know if it still works but I've been > using the /paths command line option to tell IronRuby where my assemblies > are. > > ir.exe paths/:C:\paths\to\my\dlls my_ruby_script.rb > > Cheers, > Steve > > On Tue, May 13, 2008 at 9:17 PM, Ivan Porto Carrero > wrote: > > Ok I'm all for features but how do I now require my own homebaked dll > because registering them in the GAC isn't the way to go IMHO :) > > I've tried a bunch of things to get to my dll but it boils down to that it > doesn't know how to load it. When I copy my assembly into the ironruby build > folder it does work. That just doesn't seem right to me. If there is a new > an elegant way to load arbitrary assemblies then I'd love to know. In > meantime I can hack my source to add assembly loading from a path as well > > Below the output from my various tries to get my assembly loaded without > putting it in the ironruby binaries folder > > > > + C:\projects\lumpr\src\Sylvester.DesktopEdition\Sylvester.IronRuby > > ? ir -I > C:\projects\lumpr\src\Sylvester.DesktopEdition\Sylvester.IronRuby\bin\Sylvester.Contracts.dll > > >>> include Twitter::Model > c:\tools\IronRuby\src\IronRuby.Libraries\Builtins\ModuleOps.cs:642:in > `ConstantMissing': uninitialized constant Object:: > Twitter (NameError) > > > from :0:in `Initialize##1' > > >>> exit > > > > + C:\projects\lumpr\src\Sylvester.DesktopEdition\Sylvester.IronRuby > > ? ir -I > C:\projects\lumpr\src\Sylvester.DesktopEdition\Sylvester.IronRuby\bin > > >>> require 'Sylvester.Contracts, Version=1.0.0.0, Culture=neutral, > PublicKeyToken=null' > c:\tools\IronRuby\src\IronRuby.Libraries\Builtins\Kernel.cs:272:in > `Require': no such file to load -- Sylvester.Contract > s, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null (LoadError) > > > from :0:in `Initialize##1' > > >>> exit > > > > + C:\projects\lumpr\src\Sylvester.DesktopEdition\Sylvester.IronRuby > ? ir > > >>> > Dir.chdir('C:\projects\lumpr\src\Sylvester.DesktopEdition\Sylvester.IronRuby\bin') > => 0 > >>> require 'Sylvester.Contracts, Version=1.0.0.0, Culture=neutral, > PublicKeyToken=null' > c:\tools\IronRuby\src\IronRuby.Libraries\Builtins\Kernel.cs:272:in > `Require': no such file to load -- Sylvester.Contract > s, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null (LoadError) > from :0:in `Initialize##7' > >>> exit > > > > + C:\projects\lumpr\src\Sylvester.DesktopEdition\Sylvester.IronRuby > > ? ir -I > C:\projects\lumpr\src\Sylvester.DesktopEdition\Sylvester.IronRuby\bin > > >>> > Dir.chdir('C:\projects\lumpr\src\Sylvester.DesktopEdition\Sylvester.IronRuby\bin') > => 0 > >>> require 'Sylvester.Contracts, Version=1.0.0.0, Culture=neutral, > PublicKeyToken=null' > c:\tools\IronRuby\src\IronRuby.Libraries\Builtins\Kernel.cs:272:in > `Require': no such file to load -- Sylvester.Contract > s, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null (LoadError) > from :0:in `Initialize##8' > > > >>> > > Thanks > Ivan > > On 14/05/2008, at 10:42 AM, John Lam (IRONRUBY) wrote: > > One more thing, r105 adds support for the -I command line switch, so you > can now: > > ir -I path-to-your-includes-directory yourapp.rb > > Thanks, > -John > > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero > Sent: Tuesday, May 13, 2008 3:32 PM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] r105 broke assembly loading > > Hi > > I just updated to r105 and now I can't require assemblies anymore. > > require 'bin/System.Net.dll' > > c:\tools\IronRuby\src\IronRuby.Libraries\Builtins\Kernel.cs:272:in > `Require': Invalid character '?' in expression (Synta > xError) > from :0:in `Initialize##1' > > Do I submit a bug for that? > > Cheers > Ivan > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From brianblackwell at realemail.net Fri May 16 20:01:12 2008 From: brianblackwell at realemail.net (Brian Blackwell) Date: Sat, 17 May 2008 10:01:12 +1000 Subject: [Ironruby-core] activerecord status with r110 In-Reply-To: References: <1210964583.24335.1253577967@webmail.messagingengine.com> Message-ID: <1210982472.21076.1253615047@webmail.messagingengine.com> On Fri, 16 May 2008 14:54:32 -0700, "Curt Hagenlocher" said: > Do you have any feeling for how these programs are using > thread.critical=? It's used by just one method in activesupport, instance_exec (which seems to be a built-in method in Ruby 1.9). Here is the method from active_support\core_ext\object\extending.rb: unless defined? instance_exec # 1.9 module InstanceExecMethods #:nodoc: end include InstanceExecMethods # Evaluate the block with the given arguments within the context of # this object, so self is set to the method receiver. # # From Mauricio's http://eigenclass.org/hiki/bounded+space+instance_exec def instance_exec(*args, &block) begin old_critical, Thread.critical = Thread.critical, true n = 0 n += 1 while respond_to?(method_name = "__instance_exec#{n}") InstanceExecMethods.module_eval { define_method(method_name, &block) } ensure Thread.critical = old_critical end begin send(method_name, *args) ensure InstanceExecMethods.module_eval { remove_method(method_name) } rescue nil end end end Cheers, Brian From Tomas.Matousek at microsoft.com Fri May 16 22:21:16 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Fri, 16 May 2008 19:21:16 -0700 Subject: [Ironruby-core] Code Review: RubyLibs Message-ID: tfpt review /shelveset:RubyLibs;REDMOND\tomat Enables reopening of classes and modules defined in a C# library. Comments out extension type on RubyModule - CLR interop needs to be better designed first. Merges type to interface/module/class mapping dictionaries into a single one. We now remember the mapping for non-interface modules as well to enable reopening of library defined modules. Changes library initializer helpers to allow reopening. Reviewed F2F by John. Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: RubyLibs.diff Type: application/octet-stream Size: 75218 bytes Desc: RubyLibs.diff URL: From jdeville at microsoft.com Fri May 16 23:24:19 2008 From: jdeville at microsoft.com (Jim Deville) Date: Fri, 16 May 2008 20:24:19 -0700 Subject: [Ironruby-core] Toward MSpec In-Reply-To: References: , Message-ID: I've actually already got Optparse and MSpec working. That's the new spec runner that I'm almost ready to commit. I sent it through our internal checkin troll tonight, and if all goes well I will send a code review first thing Monday if not sooner. I would like to see your catch parse implementation and any other patches to the mspec runner you have. Thanks, Jim D ________________________________ From: ironruby-core-bounces at rubyforge.org [ironruby-core-bounces at rubyforge.org] On Behalf Of Michael Letterle [michael.letterle at gmail.com] Sent: Friday, May 16, 2008 3:15 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Toward MSpec I made it this far :) C:\Mike\VS08Proj\IronRuby\trunk\build\debug>ir -D "c:\Mike\Dev\rubyspec\mspec\bin\mspec" -h mspec [COMMAND] [options] (FILE|DIRECTORY|GLOB)+ The mspec command sets up and invokes the sub-commands (see below) to enable, for instance, running the specs with different implementations like ruby, jruby, rbx, etc. I produced a pretty naive implementation of catch/throw that seems pretty functional for the moment, I think the sticking point now is regex's actually.. On Fri, May 16, 2008 at 4:59 PM, Michael Letterle > wrote: Just the end of the week update. I haven't been as active these last few months due to Cleveland Day of .NET planning, but that's this Saturday so hopefully soon I can get back in full swing. Right now I'm playing with getting MSpec (the RubySpec runner), running under IronRuby. The major hurdle right now seems to be that catch/throw isn't implemented. Bug #19888 was also an issue, which I submitted a patch for today. -- Michael Letterle [Polymath Prokrammer] http://blog.prokrams.com -- Michael Letterle [Polymath Prokrammer] http://blog.prokrams.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew at mindscape.co.nz Fri May 16 23:45:25 2008 From: andrew at mindscape.co.nz (Andrew Peters) Date: Sat, 17 May 2008 15:45:25 +1200 Subject: [Ironruby-core] NKF Platform Dependencies & Mono Message-ID: <771cfe010805162045va97ccbdybd11c25b216ee0d3@mail.gmail.com> Hi All, I've got NKF up and running and passing the (very few) standard unit tests that come with it. I've got a problem however. My implementation currently relies on the Win32 platform API DetectInputCodepage to perform character encoding detection (there seems to be no managed equivalent) which is likely a problem for Mono. The options seem to be: - Conditionally compile in an alternative API under Mono. - Implement the DetectInputCodepage functionality natively. Advice appreciated. Cheers, Andrew. -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.letterle at gmail.com Sat May 17 09:14:53 2008 From: michael.letterle at gmail.com (Michael Letterle) Date: Sat, 17 May 2008 09:14:53 -0400 Subject: [Ironruby-core] Toward MSpec In-Reply-To: References: Message-ID: I haven't patched MSpec at all, the catch/throw is extremely naive, I can send you my current patch off-list :) On Fri, May 16, 2008 at 11:24 PM, Jim Deville wrote: > I've actually already got Optparse and MSpec working. That's the new spec > runner that I'm almost ready to commit. I sent it through our internal > checkin troll tonight, and if all goes well I will send a code review first > thing Monday if not sooner. > > I would like to see your catch parse implementation and any other patches > to the mspec runner you have. > > Thanks, > > Jim D > ------------------------------ > *From:* ironruby-core-bounces at rubyforge.org [ > ironruby-core-bounces at rubyforge.org] On Behalf Of Michael Letterle [ > michael.letterle at gmail.com] > *Sent:* Friday, May 16, 2008 3:15 PM > *To:* ironruby-core at rubyforge.org > *Subject:* Re: [Ironruby-core] Toward MSpec > > I made it this far :) > > C:\Mike\VS08Proj\IronRuby\trunk\build\debug>ir -D > "c:\Mike\Dev\rubyspec\mspec\bin\mspec" -h > mspec [COMMAND] [options] (FILE|DIRECTORY|GLOB)+ > > > The mspec command sets up and invokes the sub-commands > (see below) to enable, for instance, running the specs > with different implementations like ruby, jruby, rbx, etc. > > I produced a pretty naive implementation of catch/throw that seems pretty > functional for the moment, I think the sticking point now is regex's > actually.. > > On Fri, May 16, 2008 at 4:59 PM, Michael Letterle < > michael.letterle at gmail.com> wrote: > >> Just the end of the week update. I haven't been as active these last few >> months due to Cleveland Day of .NET planning, but that's this Saturday so >> hopefully soon I can get back in full swing. Right now I'm playing with >> getting MSpec (the RubySpec runner), running under IronRuby. The major >> hurdle right now seems to be that catch/throw isn't implemented. Bug #19888 >> was also an issue, which I submitted a patch for today. >> -- >> Michael Letterle >> [Polymath Prokrammer] >> http://blog.prokrams.com >> >> > > > -- > Michael Letterle > [Polymath Prokrammer] > http://blog.prokrams.com > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -- Michael Letterle [Polymath Prokrammer] http://blog.prokrams.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tomas.Matousek at microsoft.com Sun May 18 00:47:13 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Sat, 17 May 2008 21:47:13 -0700 Subject: [Ironruby-core] Code Review: RubyLibsAndYaml Message-ID: tfpt review /shelveset:RubyLibsAndYaml;REDMOND\tomat Adjusts class-initializer generator to enable generating initializers for multiple libraries within a single assembly. Also enables extending existing Ruby modules and classes that are defined in C# libraries (previously only CLR classes could have been extended). For example, the following class adds additional methods on Kernel module: [RubyModule(Extends = typeof(Kernel))] public static class MyKernelOps { [RubyMethod("foo")] public static void Foo() { ... } } The type specified in Extends parameter is the C# class defining the module/class. Enables to group C# classes and modules into Ruby libraries (e.g. thread, socket, openssl, yaml, etc.). Each library is identified by a root namespace. All Ruby classes and modules of the assembly defined within the namespace are considered parts of the library. The shelveset updates namespaces in IronRuby.Libraries.dll to group classes by library: Ruby.Builtins Ruby.StandardLibrary.Threading Ruby.StandardLibrary.Sockets Ruby.StandardLibrary.OpenSsl Ruby.StandardLibrary.Digest Ruby.StandardLibrary.Zlib The list of namespaces that define libraries within an assembly is passed to the generator: ClassInitGenerator IronRuby.Libraries.dll /libraries:Ruby.Builtins;Ruby.StandardLibrary.Threading;Ruby.StandardLibrary.Sockets;Ruby.StandardLibrary.OpenSsl;Ruby.StandardLibrary.Digest;Ruby.StandardLibrary.Zlib /out:Initializers.Generated.cs The mapping from Ruby library name to the assembly and namespace is established via .rb files: thread.rb: load_assembly 'IronRuby.Libraries', 'Ruby.StandardLibrary.Threading' openssl.rb: load_assembly 'IronRuby.Libraries', 'Ruby.StandardLibrary.OpenSsl' etc. (Kernel#load_assembly now takes an optional second argument identifying the library to load by its root namespace). The files are included in the solution and their build action is set to "copy if new", which means they are copied to the output directory during the build. ir.exe includes the directory it is located in into the load paths list ($:), so the .rb files copied there are found by the standard Ruby require/load mechanism. Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: RubyLibsAndYaml.diff Type: application/octet-stream Size: 709321 bytes Desc: RubyLibsAndYaml.diff URL: From w.kelly at qut.edu.au Sun May 18 08:04:14 2008 From: w.kelly at qut.edu.au (Wayne Kelly) Date: Sun, 18 May 2008 22:04:14 +1000 Subject: [Ironruby-core] Code Review: RubyLibsAndYaml In-Reply-To: References: Message-ID: > From: Tomas Matousek [Tomas.Matousek at microsoft.com] > Sent: Sunday, 18 May 2008 2:47 PM > To: IronRuby External Code Reviewers > Subject: [Ironruby-core] Code Review: RubyLibsAndYaml > > The mapping from Ruby library name to the assembly and namespace is established via .rb files: > > thread.rb: > load_assembly 'IronRuby.Libraries', 'Ruby.StandardLibrary.Threading' > > openssl.rb: > load_assembly 'IronRuby.Libraries', 'Ruby.StandardLibrary.OpenSsl' > > The files are included in the solution and their build action is set to "copy if new", which means they > are copied to the output directory during the build. ir.exe includes the directory it is located in into the > load paths list ($:), so the .rb files copied there are found by the standard Ruby require/load mechanism. So what if some legacy code requires 'thread.so' or 'opensll.so'? Can we set it up so that it automatically loads the corresponding library? From w.kelly at qut.edu.au Sun May 18 08:23:02 2008 From: w.kelly at qut.edu.au (Wayne Kelly) Date: Sun, 18 May 2008 22:23:02 +1000 Subject: [Ironruby-core] Signal.trap Message-ID: After various workarounds, I can now run the rails app to the point that it gets through all of the gems infrastructure and starts running actual rails specific code. Unfortunately the first thing that it calls is Signal.trap which is currently unimplemented. I have an implementation of Signal.trap from Ruby.NET but it relies on Pinvoke to call functions in msvcrt How do you feel about this kind of code in IronRuby? Cheers, Wayne. From michael.letterle at gmail.com Sun May 18 10:41:34 2008 From: michael.letterle at gmail.com (Michael Letterle) Date: Sun, 18 May 2008 10:41:34 -0400 Subject: [Ironruby-core] Signal.trap In-Reply-To: References: Message-ID: PInvokes would, of course, make it non-portable to mono...or silverlight for that matter. So no, I don't think it's a good idea :) On Sun, May 18, 2008 at 8:23 AM, Wayne Kelly wrote: > After various workarounds, I can now run the rails app to the point that it > gets through all of the gems infrastructure and starts running actual rails > specific code. > > Unfortunately the first thing that it calls is Signal.trap which is > currently unimplemented. > > I have an implementation of Signal.trap from Ruby.NET but it relies on > Pinvoke to call functions in msvcrt > > How do you feel about this kind of code in IronRuby? > > Cheers, Wayne. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -- Michael Letterle [Polymath Prokrammer] http://blog.prokrams.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From sanxiyn at gmail.com Sun May 18 12:31:46 2008 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Mon, 19 May 2008 01:31:46 +0900 Subject: [Ironruby-core] Signal.trap In-Reply-To: References: Message-ID: <5b0248170805180931n57b4675ekc46ff2ca18097abd@mail.gmail.com> 2008/5/18 Michael Letterle : > PInvokes would, of course, make it non-portable to mono...or silverlight for > that matter. So no, I don't think it's a good idea :) Well, Mono supports P/Invoke, and Ruby.NET's Signal code actually worked fine on Mono. (In this case, signal() function is portable between Windows and Unix.) Silverlight would be problematic indeed. But then, why would Ruby code in Silverlight use methods in Signal module? -- Seo Sanghyeon From jflam at microsoft.com Sun May 18 16:20:38 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Sun, 18 May 2008 13:20:38 -0700 Subject: [Ironruby-core] Code Review: RubyLibsAndYaml In-Reply-To: References: Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D930605DB@NA-EXMSG-C115.redmond.corp.microsoft.com> Wayne Kelly: > > The mapping from Ruby library name to the assembly and namespace is > established via .rb files: > > > > thread.rb: > > load_assembly 'IronRuby.Libraries', 'Ruby.StandardLibrary.Threading' > > > > openssl.rb: > > load_assembly 'IronRuby.Libraries', 'Ruby.StandardLibrary.OpenSsl' > > > > The files are included in the solution and their build action is set > > to "copy if new", which means they are copied to the output directory > > during the build. ir.exe includes the directory it is located in into > the load paths list ($:), so the .rb files copied there are found by > the standard Ruby require/load mechanism. > > So what if some legacy code requires 'thread.so' or 'opensll.so'? Can > we set it up so that it automatically loads the corresponding library? I'm not sure what the best solution to this problem is here - we should probably throw an exception if *.so/.dll does not refer to a .NET assembly. It's unlikely that existing code will require thread.so rather than thread.rb. Charlie - what does JRuby do in this case? Thanks, -John From charles.nutter at sun.com Sun May 18 19:26:40 2008 From: charles.nutter at sun.com (Charles Oliver Nutter) Date: Sun, 18 May 2008 18:26:40 -0500 Subject: [Ironruby-core] Code Review: RubyLibsAndYaml In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D930605DB@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <372109E149E8084D8E6C7D9CFD82E0632D930605DB@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <4830BB30.1000506@sun.com> John Lam (IRONRUBY) wrote: > Wayne Kelly: > >>> The mapping from Ruby library name to the assembly and namespace is >> established via .rb files: >>> thread.rb: >>> load_assembly 'IronRuby.Libraries', 'Ruby.StandardLibrary.Threading' >>> >>> openssl.rb: >>> load_assembly 'IronRuby.Libraries', 'Ruby.StandardLibrary.OpenSsl' >>> >>> The files are included in the solution and their build action is set >>> to "copy if new", which means they are copied to the output directory >>> during the build. ir.exe includes the directory it is located in into >> the load paths list ($:), so the .rb files copied there are found by >> the standard Ruby require/load mechanism. >> >> So what if some legacy code requires 'thread.so' or 'opensll.so'? Can >> we set it up so that it automatically loads the corresponding library? > > I'm not sure what the best solution to this problem is here - we should probably throw an exception if *.so/.dll does not refer to a .NET assembly. It's unlikely that existing code will require thread.so rather than thread.rb. Charlie - what does JRuby do in this case? In Ruby, load path searching is partially determined by the extension. If you try to require a file with no extension, it looks first for that file with a .rb extension, then for that filename as a .so library (or .dll, or whatever the library extension is). If you try to load a file with no extension, it will only ever search for exactly that file with no extension. In JRuby, we just use the .so/.dll as a marker for searching for extensions, skipping the search for .rb. And in the cases of thread.rb/thread.so, we just have a very small thread.rb file that loads our actual extension, thread.so. In fact, most of the code extensions we have defined to be .so, .rb, or sometimes both so that any load will find them. - Charlie From Tomas.Matousek at microsoft.com Sun May 18 19:55:46 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Sun, 18 May 2008 16:55:46 -0700 Subject: [Ironruby-core] Code Review: RubyLibsAndYaml In-Reply-To: References: Message-ID: For that case, we may need to add file called 'thread.so.rb'. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Wayne Kelly Sent: Sunday, May 18, 2008 5:04 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review: RubyLibsAndYaml > From: Tomas Matousek [Tomas.Matousek at microsoft.com] > Sent: Sunday, 18 May 2008 2:47 PM > To: IronRuby External Code Reviewers > Subject: [Ironruby-core] Code Review: RubyLibsAndYaml > > The mapping from Ruby library name to the assembly and namespace is established via .rb files: > > thread.rb: > load_assembly 'IronRuby.Libraries', 'Ruby.StandardLibrary.Threading' > > openssl.rb: > load_assembly 'IronRuby.Libraries', 'Ruby.StandardLibrary.OpenSsl' > > The files are included in the solution and their build action is set to "copy if new", which means they > are copied to the output directory during the build. ir.exe includes the directory it is located in into the > load paths list ($:), so the .rb files copied there are found by the standard Ruby require/load mechanism. So what if some legacy code requires 'thread.so' or 'opensll.so'? Can we set it up so that it automatically loads the corresponding library? _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From w.kelly at qut.edu.au Sun May 18 19:56:50 2008 From: w.kelly at qut.edu.au (Wayne Kelly) Date: Mon, 19 May 2008 09:56:50 +1000 Subject: [Ironruby-core] .so files and library paths In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D930605DB@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <372109E149E8084D8E6C7D9CFD82E0632D930605DB@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: > -----Original Message----- > From: John Lam (IRONRUBY) > Sent: Monday, 19 May 2008 6:21 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Code Review: RubyLibsAndYaml > > I'm not sure what the best solution to this problem is here - > we should probably throw an exception if *.so/.dll does not > refer to a .NET assembly. It's unlikely that existing code > will require thread.so rather than thread.rb. I was primarily referring to: ruby\lib\ruby\1.8\thread.rb which explicitly loads thread.so ruby\lib\ruby\1.8\openssl.rb which explicitly loads openssl.so ruby\lib\ruby\1.8\digest.rb which explicilty loads digest.so ruby\lib\ruby\1.8\pp.rb which explicitly loads etc.so These are all part of the Windows One click installer distribution. The .so files reside in ruby\lib\ruby\1.8\i386-mswin32 I've been assuming that it is OK to alter files in this i386-mswin32 directory as they are intended to be platform specific implementations. As IronRuby is effectively a different platform, I've been assuming that we will rename this directory 'ironruby'. I was also assuming, however, that in the long run, it would be "cheating" to modify any of the other ruby source files in the standard libraries in order to get IronRuby to work correctly. So, what are the ground rules for altering these libraries? I assume we don't want to get into the business of packaging and distributing the ruby source files in these standard libraries ourselves. Charles, to what extent does JRuby stick with the existing MRI ruby library directory hierarchy? On a related issue - MRI automatically includes a number of relative library paths into its load search path. Currently in IronRuby we need to explicitly list each of these libraries in the command line using the /paths command line option (and it's really painfull when there's half a dozen long paths included on your command line). Is there any plan to add any of these search paths automatically, or at least semi automatically? We may want to provide a mechanism for specifying the standard library root (eg "c:\ruby\lib") rather than assuming that it is relative to the ruby interpreter executable, but couldn't we then automatically add other "standard" paths relative to that? There is of course also the possibility of creating a new (additional) IronRuby console front end that behaves more like MRI in terms of command line options. Cheers, Wayne. From Tomas.Matousek at microsoft.com Sun May 18 20:00:02 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Sun, 18 May 2008 17:00:02 -0700 Subject: [Ironruby-core] Signal.trap In-Reply-To: <5b0248170805180931n57b4675ekc46ff2ca18097abd@mail.gmail.com> References: <5b0248170805180931n57b4675ekc46ff2ca18097abd@mail.gmail.com> Message-ID: What signals are used in Rails and what for? Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Sanghyeon Seo Sent: Sunday, May 18, 2008 9:32 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Signal.trap 2008/5/18 Michael Letterle : > PInvokes would, of course, make it non-portable to mono...or silverlight for > that matter. So no, I don't think it's a good idea :) Well, Mono supports P/Invoke, and Ruby.NET's Signal code actually worked fine on Mono. (In this case, signal() function is portable between Windows and Unix.) Silverlight would be problematic indeed. But then, why would Ruby code in Silverlight use methods in Signal module? -- Seo Sanghyeon _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From w.kelly at qut.edu.au Sun May 18 20:11:41 2008 From: w.kelly at qut.edu.au (Wayne Kelly) Date: Mon, 19 May 2008 10:11:41 +1000 Subject: [Ironruby-core] Signal.trap In-Reply-To: References: <5b0248170805180931n57b4675ekc46ff2ca18097abd@mail.gmail.com> Message-ID: I'm not sure I can answer that question in it's totality as I'm not familiar with much of the Rails framework. But the examples that I've seen so far have been trapping the SIGINT and/or TERM signals in order to perform a graceful controlled shutdown. Cheers, Wayne. > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of > Tomas Matousek > Sent: Monday, 19 May 2008 10:00 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Signal.trap > > What signals are used in Rails and what for? > > Tomas > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of > Sanghyeon Seo > Sent: Sunday, May 18, 2008 9:32 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Signal.trap > > 2008/5/18 Michael Letterle : > > PInvokes would, of course, make it non-portable to mono...or > > silverlight for that matter. So no, I don't think it's a > good idea :) > > Well, Mono supports P/Invoke, and Ruby.NET's Signal code > actually worked fine on Mono. (In this case, signal() > function is portable between Windows and Unix.) > > Silverlight would be problematic indeed. But then, why would > Ruby code in Silverlight use methods in Signal module? > > -- > Seo Sanghyeon > _______________________________________________ > 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 charles.nutter at sun.com Sun May 18 20:30:28 2008 From: charles.nutter at sun.com (Charles Oliver Nutter) Date: Sun, 18 May 2008 19:30:28 -0500 Subject: [Ironruby-core] .so files and library paths In-Reply-To: References: <372109E149E8084D8E6C7D9CFD82E0632D930605DB@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <4830CA24.3000308@sun.com> Wayne Kelly wrote: > Charles, to what extent does JRuby stick with the existing MRI ruby library directory hierarchy? We use the basic structure for .rb files, but we do not put extensions on the filesystem anywhere since all of them are bundled into JRuby's main JAR file. We have hooks in the loading process to find extensions, however, and gem-based extensions can load their own libraries from within the unpacked gem location through a number of mechanisms. - Charlie From ivan at flanders.co.nz Sun May 18 20:39:12 2008 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Mon, 19 May 2008 12:39:12 +1200 Subject: [Ironruby-core] Signal.trap In-Reply-To: References: <5b0248170805180931n57b4675ekc46ff2ca18097abd@mail.gmail.com> Message-ID: AFAICT they use INT, TERM, HUP, USR1, USR2 (most of them in the fastcgi handler, but mongrel and thin use them as well) thin also uses QUIT That's what i got from quickly running grep over my rails gems I've asked koz if I left some out and if I did I'll let you know which ones are missing. On Mon, May 19, 2008 at 12:11 PM, Wayne Kelly wrote: > > I'm not sure I can answer that question in it's totality as I'm not > familiar with much of the Rails framework. But the examples that I've seen > so far have been trapping the SIGINT and/or TERM signals in order to perform > a graceful controlled shutdown. > > Cheers, Wayne. > > > > -----Original Message----- > > From: ironruby-core-bounces at rubyforge.org > > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of > > Tomas Matousek > > Sent: Monday, 19 May 2008 10:00 AM > > To: ironruby-core at rubyforge.org > > Subject: Re: [Ironruby-core] Signal.trap > > > > What signals are used in Rails and what for? > > > > Tomas > > > > -----Original Message----- > > From: ironruby-core-bounces at rubyforge.org > > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of > > Sanghyeon Seo > > Sent: Sunday, May 18, 2008 9:32 AM > > To: ironruby-core at rubyforge.org > > Subject: Re: [Ironruby-core] Signal.trap > > > > 2008/5/18 Michael Letterle : > > > PInvokes would, of course, make it non-portable to mono...or > > > silverlight for that matter. So no, I don't think it's a > > good idea :) > > > > Well, Mono supports P/Invoke, and Ruby.NET's Signal code > > actually worked fine on Mono. (In this case, signal() > > function is portable between Windows and Unix.) > > > > Silverlight would be problematic indeed. But then, why would > > Ruby code in Silverlight use methods in Signal module? > > > > -- > > Seo Sanghyeon > > _______________________________________________ > > Ironruby-core mailing list > > Ironruby-core at rubyforge.org > > http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > > Ironruby-core mailing list > > Ironruby-core at rubyforge.org > > http://rubyforge.org/mailman/listinfo/ironruby-core > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cjac at colliertech.org Sun May 18 13:44:28 2008 From: cjac at colliertech.org (C.J. Adams-Collier) Date: Sun, 18 May 2008 17:44:28 +0000 Subject: [Ironruby-core] Playing around with www.ironruby.net In-Reply-To: <5283CA0A4168DF4FBBD71AE9ECA5A328458044387B@NA-EXMSG-C116.redmond.corp.microsoft.com> References: <5283CA0A4168DF4FBBD71AE9ECA5A328458044387B@NA-EXMSG-C116.redmond.corp.microsoft.com> Message-ID: <1211132668.4502.17.camel@norseth> Heh, you'll need some help from the web server, not just the DNS registrar. This is how I once told Apache to redirect all HTTP URIs to HTTPS: RedirectMatch permanent (.*) https://mail.colliertech.org$1 So you may want to do something like this: RedirectMatch permanent https?://ironruby.net(.*) http://www.ironruby.net$1 If they're both on the same web server, you can do something like this: ServerName www.ironruby.net ServerAlias ironruby.net This all assumes you're using apache with mod_alias, of course :) I'm sure there's something quite similar for IIS, though. Cheers, C.J. On Thu, 2008-05-08 at 14:59 -0700, Jimmy Schementi wrote: > I?m trying to make http://ironruby.net take you to the same page as > http://www.ironruby.net, but in the meantime both might be broken. If > so, just go to http://ironruby.rubyforge.org. > > > > PS. Anyone know how to do this on GoDaddy? Extremely confusing! > > > > ~js > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From cjac at colliertech.org Sun May 18 14:13:57 2008 From: cjac at colliertech.org (C.J. Adams-Collier) Date: Sun, 18 May 2008 18:13:57 +0000 Subject: [Ironruby-core] Code Review: RubyLibsAndYaml In-Reply-To: References: Message-ID: <1211134437.4502.34.camel@norseth> Hey folks, Does there exist a formal code review process for the Iron* languages and/or the DLR? Have you considered using a tool to ease gathering of review feedback? http://www.review-board.org/ - VMWare, Christian Hammond http://reviews.review-board.org/dashboard/ svn checkout http://reviewboard.googlecode.com/svn/trunk/reviewboard http://codereview.appspot.com/ - Google, Guido van Rossum Cheers, C.J. On Sat, 2008-05-17 at 21:47 -0700, Tomas Matousek wrote: > tfpt review /shelveset:RubyLibsAndYaml;REDMOND\tomat > > Adjusts class-initializer generator to enable generating initializers for multiple libraries within a single assembly. > Also enables extending existing Ruby modules and classes that are defined in C# libraries (previously only CLR classes could have been extended). For example, the following class adds additional methods on Kernel module: > > [RubyModule(Extends = typeof(Kernel))] > public static class MyKernelOps { > [RubyMethod("foo")] > public static void Foo() { ... } > } > > The type specified in Extends parameter is the C# class defining the module/class. > > Enables to group C# classes and modules into Ruby libraries (e.g. thread, socket, openssl, yaml, etc.). Each library is identified by a root namespace. All Ruby classes and modules of the assembly defined within the namespace are considered parts of the library. The shelveset updates namespaces in IronRuby.Libraries.dll to group classes by library: > > Ruby.Builtins > Ruby.StandardLibrary.Threading > Ruby.StandardLibrary.Sockets > Ruby.StandardLibrary.OpenSsl > Ruby.StandardLibrary.Digest > Ruby.StandardLibrary.Zlib > > The list of namespaces that define libraries within an assembly is passed to the generator: > > ClassInitGenerator IronRuby.Libraries.dll /libraries:Ruby.Builtins;Ruby.StandardLibrary.Threading;Ruby.StandardLibrary.Sockets;Ruby.StandardLibrary.OpenSsl;Ruby.StandardLibrary.Digest;Ruby.StandardLibrary.Zlib /out:Initializers.Generated.cs > > The mapping from Ruby library name to the assembly and namespace is established via .rb files: > > thread.rb: > load_assembly 'IronRuby.Libraries', 'Ruby.StandardLibrary.Threading' > > openssl.rb: > load_assembly 'IronRuby.Libraries', 'Ruby.StandardLibrary.OpenSsl' > > etc. > > (Kernel#load_assembly now takes an optional second argument identifying the library to load by its root namespace). > > The files are included in the solution and their build action is set to "copy if new", which means they are copied to the output directory during the build. ir.exe includes the directory it is located in into the load paths list ($:), so the .rb files copied there are found by the standard Ruby require/load mechanism. > > Tomas > _______________________________________________ > 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: This is a digitally signed message part URL: From brianblackwell at realemail.net Sun May 18 21:21:19 2008 From: brianblackwell at realemail.net (Brian Blackwell) Date: Mon, 19 May 2008 11:21:19 +1000 Subject: [Ironruby-core] More on running activerecord In-Reply-To: References: Message-ID: <1211160079.9402.1253834859@webmail.messagingengine.com> I can also report that after applying patches and other workarounds, I have been able to get "require 'active_record'" to work, and that I have started playing with a simple activerecord use case. Here are some issues that I have encountered so far: (1) Bug #20222: super call in initialize method of a module throws an exception - This bug crops up in the Ruby library 'logger.rb' (2) Ruby library 'Process' not implemented - - Is anyone working on this? More specifically, the method Process::times() is called by the Ruby library 'benchmark.rb'. Implementing this would also require an implementation of Struct::Tms. (3) Missing method Signal.trap - Wayne has also encountered this issue. In my case Signal.trap is needed by active_record/transactions.rb. More will be coming soon as I apply patches and workarounds... Cheers, Brian On Sun, 18 May 2008 22:23:02 +1000, "Wayne Kelly" said: > After various workarounds, I can now run the rails app to the point that > it gets through all of the gems infrastructure and starts running actual > rails specific code. > > Unfortunately the first thing that it calls is Signal.trap which is > currently unimplemented. > > I have an implementation of Signal.trap from Ruby.NET but it relies on > Pinvoke to call functions in msvcrt > > How do you feel about this kind of code in IronRuby? > > Cheers, Wayne. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From Tomas.Matousek at microsoft.com Mon May 19 03:39:31 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Mon, 19 May 2008 00:39:31 -0700 Subject: [Ironruby-core] Signal.trap In-Reply-To: References: Message-ID: Could you please file bugs for all the workarounds you've needed (if they are not filed yet)? I'll take a look at Signal#trap tomorrow. Thanks, Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Wayne Kelly Sent: Sunday, May 18, 2008 5:23 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Signal.trap After various workarounds, I can now run the rails app to the point that it gets through all of the gems infrastructure and starts running actual rails specific code. Unfortunately the first thing that it calls is Signal.trap which is currently unimplemented. I have an implementation of Signal.trap from Ruby.NET but it relies on Pinvoke to call functions in msvcrt How do you feel about this kind of code in IronRuby? Cheers, Wayne. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From w.kelly at qut.edu.au Mon May 19 05:04:57 2008 From: w.kelly at qut.edu.au (Wayne Kelly) Date: Mon, 19 May 2008 19:04:57 +1000 Subject: [Ironruby-core] Signal.trap In-Reply-To: References: , Message-ID: > From: Tomas Matousek [Tomas.Matousek at microsoft.com] > Sent: Monday, 19 May 2008 5:39 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Signal.trap > Could you please file bugs for all the workarounds you've needed (if they are not filed yet)? I've submitted all that make sense to submit at this stage. Others that result from patches on top of uncomfirmed patches are best not to submit yet as it's not always clear where the bug actually lies. The most pressing issue for me at this stage is that of internal file path representation '/' vs '\' (from my previous email). Any initial thoughts? I suspect we will find less resistence if we go with '/' as there's a lot of gems code that explicitly uses '/' Cheers, Wayne. From jflam at microsoft.com Mon May 19 11:45:28 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Mon, 19 May 2008 08:45:28 -0700 Subject: [Ironruby-core] Playing around with www.ironruby.net In-Reply-To: <1211132668.4502.17.camel@norseth> References: <5283CA0A4168DF4FBBD71AE9ECA5A328458044387B@NA-EXMSG-C116.redmond.corp.microsoft.com> <1211132668.4502.17.camel@norseth> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D93060784@NA-EXMSG-C115.redmond.corp.microsoft.com> This is all running on Rubyforge ? not sure what they're using. Jimmy ? perhaps you could ping Tom Copeland (tom at infoether.com) about this? Thanks, -John From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of C.J. Adams-Collier Sent: Sunday, May 18, 2008 10:44 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Playing around with www.ironruby.net Heh, you'll need some help from the web server, not just the DNS registrar. This is how I once told Apache to redirect all HTTP URIs to HTTPS: RedirectMatch permanent (.*) https://mail.colliertech.org$1 So you may want to do something like this: RedirectMatch permanent https?://ironruby.net(.*) http://www.ironruby.net$1 If they're both on the same web server, you can do something like this: ServerName www.ironruby.net ServerAlias ironruby.net This all assumes you're using apache with mod_alias, of course :) I'm sure there's something quite similar for IIS, though. Cheers, C.J. On Thu, 2008-05-08 at 14:59 -0700, Jimmy Schementi wrote: I?m trying to make http://ironruby.net take you to the same page as http://www.ironruby.net, but in the meantime both might be broken. If so, just go to http://ironruby.rubyforge.org. PS. Anyone know how to do this on GoDaddy? Extremely confusing! ~js _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdeville at microsoft.com Mon May 19 11:49:08 2008 From: jdeville at microsoft.com (Jim Deville) Date: Mon, 19 May 2008 08:49:08 -0700 Subject: [Ironruby-core] Playing around with www.ironruby.net In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D93060784@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <5283CA0A4168DF4FBBD71AE9ECA5A328458044387B@NA-EXMSG-C116.redmond.corp.microsoft.com> <1211132668.4502.17.camel@norseth> <372109E149E8084D8E6C7D9CFD82E0632D93060784@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: This shouldn?t need, and shouldn?t be done via a rewrite. DNS provides CNAME?s for it, as someone else brought it up earlier in the thread. Rewrite?s are good however for things like the https redirect mentioned earlier, although I believe there is a HTTP header that redirects to ssl. JD From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of John Lam (IRONRUBY) Sent: Monday, May 19, 2008 8:45 AM To: cjac at colliertech.org; ironruby-core at rubyforge.org Cc: Jimmy Schementi Subject: Re: [Ironruby-core] Playing around with www.ironruby.net This is all running on Rubyforge ? not sure what they're using. Jimmy ? perhaps you could ping Tom Copeland (tom at infoether.com) about this? Thanks, -John From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of C.J. Adams-Collier Sent: Sunday, May 18, 2008 10:44 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Playing around with www.ironruby.net Heh, you'll need some help from the web server, not just the DNS registrar. This is how I once told Apache to redirect all HTTP URIs to HTTPS: RedirectMatch permanent (.*) https://mail.colliertech.org$1 So you may want to do something like this: RedirectMatch permanent https?://ironruby.net(.*) http://www.ironruby.net$1 If they're both on the same web server, you can do something like this: ServerName www.ironruby.net ServerAlias ironruby.net This all assumes you're using apache with mod_alias, of course :) I'm sure there's something quite similar for IIS, though. Cheers, C.J. On Thu, 2008-05-08 at 14:59 -0700, Jimmy Schementi wrote: I?m trying to make http://ironruby.net take you to the same page as http://www.ironruby.net, but in the meantime both might be broken. If so, just go to http://ironruby.rubyforge.org. PS. Anyone know how to do this on GoDaddy? Extremely confusing! ~js _______________________________________________ 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 Mon May 19 12:12:01 2008 From: cjac at colliertech.org (C.J. Adams-Collier) Date: Mon, 19 May 2008 09:12:01 -0700 Subject: [Ironruby-core] [IronPython] Code Review: RubyLibsAndYaml In-Reply-To: <1211134437.4502.34.camel@norseth> References: <1211134437.4502.34.camel@norseth> Message-ID: <1211213521.23961.136.camel@cjac.intra.cardomain.com> I couldn't find the source for Rietveld before sending the first mail. Guido was kind enough to point me to it, though: http://code.google.com/p/rietveld/source Cheers, C.J. On Sun, 2008-05-18 at 18:13 +0000, C.J. Adams-Collier wrote: > Hey folks, > > Does there exist a formal code review process for the Iron* languages > and/or the DLR? Have you considered using a tool to ease gathering of > review feedback? > > http://www.review-board.org/ - VMWare, Christian Hammond > http://reviews.review-board.org/dashboard/ > > svn checkout http://reviewboard.googlecode.com/svn/trunk/reviewboard > > http://codereview.appspot.com/ - Google, Guido van Rossum > > Cheers, > > C.J. > > > > On Sat, 2008-05-17 at 21:47 -0700, Tomas Matousek wrote: > > tfpt review /shelveset:RubyLibsAndYaml;REDMOND\tomat > > > > Adjusts class-initializer generator to enable generating initializers for multiple libraries within a single assembly. > > Also enables extending existing Ruby modules and classes that are defined in C# libraries (previously only CLR classes could have been extended). For example, the following class adds additional methods on Kernel module: > > > > [RubyModule(Extends = typeof(Kernel))] > > public static class MyKernelOps { > > [RubyMethod("foo")] > > public static void Foo() { ... } > > } > > > > The type specified in Extends parameter is the C# class defining the module/class. > > > > Enables to group C# classes and modules into Ruby libraries (e.g. thread, socket, openssl, yaml, etc.). Each library is identified by a root namespace. All Ruby classes and modules of the assembly defined within the namespace are considered parts of the library. The shelveset updates namespaces in IronRuby.Libraries.dll to group classes by library: > > > > Ruby.Builtins > > Ruby.StandardLibrary.Threading > > Ruby.StandardLibrary.Sockets > > Ruby.StandardLibrary.OpenSsl > > Ruby.StandardLibrary.Digest > > Ruby.StandardLibrary.Zlib > > > > The list of namespaces that define libraries within an assembly is passed to the generator: > > > > ClassInitGenerator IronRuby.Libraries.dll /libraries:Ruby.Builtins;Ruby.StandardLibrary.Threading;Ruby.StandardLibrary.Sockets;Ruby.StandardLibrary.OpenSsl;Ruby.StandardLibrary.Digest;Ruby.StandardLibrary.Zlib /out:Initializers.Generated.cs > > > > The mapping from Ruby library name to the assembly and namespace is established via .rb files: > > > > thread.rb: > > load_assembly 'IronRuby.Libraries', 'Ruby.StandardLibrary.Threading' > > > > openssl.rb: > > load_assembly 'IronRuby.Libraries', 'Ruby.StandardLibrary.OpenSsl' > > > > etc. > > > > (Kernel#load_assembly now takes an optional second argument identifying the library to load by its root namespace). > > > > The files are included in the solution and their build action is set to "copy if new", which means they are copied to the output directory during the build. ir.exe includes the directory it is located in into the load paths list ($:), so the .rb files copied there are found by the standard Ruby require/load mechanism. > > > > Tomas > > _______________________________________________ > > Ironruby-core mailing list > > Ironruby-core at rubyforge.org > > http://rubyforge.org/mailman/listinfo/ironruby-core > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From jflam at microsoft.com Mon May 19 13:27:21 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Mon, 19 May 2008 10:27:21 -0700 Subject: [Ironruby-core] .so files and library paths In-Reply-To: References: <372109E149E8084D8E6C7D9CFD82E0632D930605DB@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D93060858@NA-EXMSG-C115.redmond.corp.microsoft.com> Wayne Kelly: > ruby\lib\ruby\1.8\thread.rb which explicitly loads thread.so > ruby\lib\ruby\1.8\openssl.rb which explicitly loads openssl.so > ruby\lib\ruby\1.8\digest.rb which explicilty loads digest.so > ruby\lib\ruby\1.8\pp.rb which explicitly loads etc.so > > These are all part of the Windows One click installer distribution. > > The .so files reside in ruby\lib\ruby\1.8\i386-mswin32 > > I've been assuming that it is OK to alter files in this i386-mswin32 > directory as they are intended to be platform specific implementations. > As IronRuby is effectively a different platform, I've been assuming > that we will rename this directory 'ironruby'. I was also assuming, > however, that in the long run, it would be "cheating" to modify any of > the other ruby source files in the standard libraries in order to get > IronRuby to work correctly. > > So, what are the ground rules for altering these libraries? I have no idea right now. That said, I think we're going to need a process for filtering out a bunch of libraries that don't make sense for our implementation. For example, the various Tcl related libraries are a reasonable candidate to remove. So we're already going down the path of modifying the sate of lib\ruby\1.8. Since those libraries you referenced above are nothing more than just wrappers around loading native libraries, I don't see the harm in changing them. We could also use Tomas' hack around creating a thread.so.rb file to thunk to loading thread.so as well ... > On a related issue - MRI automatically includes a number of relative > library paths into its load search path. Currently in IronRuby we need > to explicitly list each of these libraries in the command line using > the /paths command line option (and it's really painfull when there's > half a dozen long paths included on your command line). Is there any > plan to add any of these search paths automatically, or at least semi > automatically? We may want to provide a mechanism for specifying the > standard library root (eg "c:\ruby\lib") rather than assuming that it > is relative to the ruby interpreter executable, but couldn't we then > automatically add other "standard" paths relative to that? I added some time ago an implementation for -I on the Ruby command line. I have the following PowerShell alias defined: function rbd { cmd /C "${env:MERLIN_ROOT}\Bin\Debug\ir.exe -I ${env:MERLIN_ROOT}\..\External\Languages\Ruby\ruby-1.8.6\lib\ruby\1.8;${env:MERLIN_ROOT}\..\External\Languages\Ruby\ruby-1.8.6\lib\ruby\site_ruby\1.8;${env:MERLIN_ROOT}\..\External\Languages\Ruby\ruby-1.8.6\lib\ruby\1.8\i386-mswin32 -D $args"} You should be able to do the same with your local copy. > There is of course also the possibility of creating a new (additional) > IronRuby console front end that behaves more like MRI in terms of > command line options. The goal is to make ir.exe do exactly that. We just haven't invested beyond -I today. Thanks, -John From jflam at microsoft.com Mon May 19 13:30:41 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Mon, 19 May 2008 10:30:41 -0700 Subject: [Ironruby-core] More on running activerecord In-Reply-To: <1211160079.9402.1253834859@webmail.messagingengine.com> References: <1211160079.9402.1253834859@webmail.messagingengine.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D93060860@NA-EXMSG-C115.redmond.corp.microsoft.com> Brian Blackwell: > I can also report that after applying patches and other workarounds, I > have been able to get "require 'active_record'" to work, and that I > have started playing with a simple activerecord use case. Here are some > issues that I have encountered so far: > > (1) Bug #20222: super call in initialize method of a module throws an > exception > - This bug crops up in the Ruby library 'logger.rb' > (2) Ruby library 'Process' not implemented - > - Is anyone working on this? More specifically, the method > Process::times() is called by the Ruby library 'benchmark.rb'. > Implementing this would also require an implementation of > Struct::Tms. > (3) Missing method Signal.trap > - Wayne has also encountered this issue. In my case Signal.trap is > needed by active_record/transactions.rb. 1) I believe that 20222 is fixed in the next release 2) Curt is working on an implementation of Struct#tms this morning. 3) Tomas will work on Signal#trap. We're running behind in getting a new release out since we had a few interdependent shelvesets that we had to get past the troll. Once we review Tomas' latest changes (Yaml) this morning we'll post a new release that should fix most known issues. Thanks, -John From jflam at microsoft.com Mon May 19 13:32:35 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Mon, 19 May 2008 10:32:35 -0700 Subject: [Ironruby-core] Code Review: RubyLibsAndYaml In-Reply-To: <1211134437.4502.34.camel@norseth> References: <1211134437.4502.34.camel@norseth> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D93060864@NA-EXMSG-C115.redmond.corp.microsoft.com> C.J. Adams-Collier: > Does there exist a formal code review process for the Iron* languages > and/or the DLR? Have you considered using a tool to ease gathering of > review feedback? > > http://www.review-board.org/ - VMWare, Christian Hammond > http://reviews.review-board.org/dashboard/ > > svn checkout http://reviewboard.googlecode.com/svn/trunk/reviewboard > > http://codereview.appspot.com/ - Google, Guido van Rossum We really should do this - the existing method of patches is definitely sub-optimal. But we have a problem with folks using two completely different environments to do their coding. We'll fix this problem post-RailsConf/Tech-Ed. Thanks, -John From Tomas.Matousek at microsoft.com Mon May 19 16:26:22 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Mon, 19 May 2008 13:26:22 -0700 Subject: [Ironruby-core] Code Review: gsub_classdup Message-ID: tfpt review /shelveset:gsub_classdup;REDMOND\tomat Fixes bug #20199: Getting metaclass for nil causes a .NET exception Fixes bug #20137: gsub $n bug Fixes bug #19902: Regex global matching vars are not nil when they don't match Fixes bug #20222: super call in initialize method of a module Fixes bug #20011: Can't subclass module - Also implements Module#initialize, Module#initialize_copy. Reviewed F2F by John. Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: gsub_classdup.diff Type: application/octet-stream Size: 50466 bytes Desc: gsub_classdup.diff URL: From Tomas.Matousek at microsoft.com Mon May 19 16:37:00 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Mon, 19 May 2008 13:37:00 -0700 Subject: [Ironruby-core] Code Review: DlrAstChanges Message-ID: tfpt review /shelveset:DlrAstChanges;REDMOND\tomat Using new DLR AST factories: Ast.Property, Ast.Field, Ast.NewArrayInit. Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: DlrAstChanges.diff Type: application/octet-stream Size: 18776 bytes Desc: DlrAstChanges.diff URL: From Tomas.Matousek at microsoft.com Tue May 20 01:06:01 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Mon, 19 May 2008 22:06:01 -0700 Subject: [Ironruby-core] Code Review: RegexOptions Message-ID: tfpt review /shelveset:RegexOptions;REDMOND\tomat We need to use RubyRegexOptions instead of BCL RegexOptions as they are incompatible with each other. Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: RegexOptions.diff Type: application/octet-stream Size: 80533 bytes Desc: RegexOptions.diff URL: From w.kelly at qut.edu.au Tue May 20 10:40:28 2008 From: w.kelly at qut.edu.au (Wayne Kelly) Date: Wed, 21 May 2008 00:40:28 +1000 Subject: [Ironruby-core] Gems and Rails use cases Message-ID: Now that most of the files required by rails are loading successfully, I'm now trying to actually run a number of gems/rails use cases: ir.exe c:\rubygems-1.1.1\setup.rb ir.exe c:\ruby\bin\gem -h ir.exe c:\ruby\bin\gem -list ir.exe c:\ruby\bin\gem install rails ir.exe c:\ruby\bin\rails -h ir.exe c:\ruby\bin\rails my_rails_app ir.exe c:\my_rails_app\script\server ir.exe c:\my_rails_app\public\dispatch.cgi I installed the MRI windows one click installer and replaced the i386-mswin32 directory with an ironruby directory that contains stubs for: thread.so, etc.so, socket.so, stringio.so, syck.so, zlib.so, digest.so, digest/sha2.so, openssl.so, enumerator.so, bigdecimal.so, nkf.so, strscan.so The following lists the problems that I encountered (and in some cases worked around) for these use cases: gems setup.rb: - Mutex class not declared (from Thread.so) - gsub $n bug [bug #20137] - Hash modified during iteration [bug #20198] - require infinite loop [bug #20131] - Time::gmt_offset not implemented [patch #20175] - Dir.glob unexpected character [bug #19843] - define_method overload missing [bug #20119?] - Mutex::synchronize method not implemented - File::stat, lstat & unlink methods not implemented [bug #20252] gem -h: gem list: gem install rails: - Interrupt class not declared - Regexp.new(string, string) method not implemented - YAML::Syck::Resolver class not declared - YAML::Syck::DefaultResolver constant not defined - YAML::Syck::Resolver::use_types_at method not implemented - YAML::Syck:GenericResolver constant not defined - YAML::Syck:Parser class not declared - YAML::Syck:Emitter class not declared - Digest::SHA256 not defined - Module::define_method(:symbol) { block} overload not implemented rails generate myapp: - ResolveSourceUnit load source with no extension [bug #20206] - Signal.trap method not implemented rails runtime (webrick): rails runtime (dispatch.cgi): - ENV::each method not implemented - Regexp unrecognized escape sequence \_ [bug #20205] - File::SEPARATOR = '/' rather than '\' ??? - Module::method_added method not implemented - Thread::critical= method not implemented - NKF class not implemented (from nkf.so) - send attr_accessor [bug #20242] From steve.eichert at gmail.com Tue May 20 11:03:53 2008 From: steve.eichert at gmail.com (Steve Eichert) Date: Tue, 20 May 2008 11:03:53 -0400 Subject: [Ironruby-core] Gems and Rails use cases In-Reply-To: References: Message-ID: Wayne, How are you going about creating the list of problems as you try and load things? Are you just using trial and error or are you using something else to uncover the missing pieces? Thanks, Steve On Tue, May 20, 2008 at 10:40 AM, Wayne Kelly wrote: > Now that most of the files required by rails are loading successfully, I'm > now trying to actually run a number of gems/rails use cases: > > ir.exe c:\rubygems-1.1.1\setup.rb > ir.exe c:\ruby\bin\gem -h > ir.exe c:\ruby\bin\gem -list > ir.exe c:\ruby\bin\gem install rails > ir.exe c:\ruby\bin\rails -h > ir.exe c:\ruby\bin\rails my_rails_app > ir.exe c:\my_rails_app\script\server > ir.exe c:\my_rails_app\public\dispatch.cgi > > I installed the MRI windows one click installer and replaced the > i386-mswin32 directory with an ironruby directory that contains stubs for: > thread.so, etc.so, socket.so, stringio.so, syck.so, zlib.so, digest.so, > digest/sha2.so, openssl.so, enumerator.so, bigdecimal.so, nkf.so, strscan.so > > The following lists the problems that I encountered (and in some cases > worked around) for these use cases: > > gems setup.rb: > - Mutex class not declared (from Thread.so) > - gsub $n bug [bug #20137] > - Hash modified during iteration [bug #20198] > - require infinite loop [bug #20131] > - Time::gmt_offset not implemented [patch #20175] > - Dir.glob unexpected character [bug #19843] > - define_method overload missing [bug #20119?] > - Mutex::synchronize method not implemented > - File::stat, lstat & unlink methods not implemented [bug #20252] > > gem -h: > gem list: > gem install rails: > - Interrupt class not declared > - Regexp.new(string, string) method not implemented > - YAML::Syck::Resolver class not declared > - YAML::Syck::DefaultResolver constant not defined > - YAML::Syck::Resolver::use_types_at method not implemented > - YAML::Syck:GenericResolver constant not defined > - YAML::Syck:Parser class not declared > - YAML::Syck:Emitter class not declared > - Digest::SHA256 not defined > - Module::define_method(:symbol) { block} overload not implemented > > rails generate myapp: > - ResolveSourceUnit load source with no extension [bug #20206] > - Signal.trap method not implemented > > rails runtime (webrick): > rails runtime (dispatch.cgi): > - ENV::each method not implemented > - Regexp unrecognized escape sequence \_ [bug #20205] > - File::SEPARATOR = '/' rather than '\' ??? > - Module::method_added method not implemented > - Thread::critical= method not implemented > - NKF class not implemented (from nkf.so) > - send attr_accessor [bug #20242] > _______________________________________________ > 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 josh.charles at gmail.com Tue May 20 12:04:01 2008 From: josh.charles at gmail.com (Josh Charles) Date: Tue, 20 May 2008 11:04:01 -0500 Subject: [Ironruby-core] IronRuby / Rails Question Message-ID: It looks like you're getting very close to getting rails to run on IronRuby. What is the endgame for this? Is the goal to eventually be able to run a rails app on IIS, so deployment is just as simple as deploying an ASP.NET web application? I've been looking at several different ways this could happen (especially if you can modify rails to take advantage of some windoes / .net specific features), but would like to get your thoughts on this. Josh From jflam at microsoft.com Tue May 20 17:17:30 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Tue, 20 May 2008 14:17:30 -0700 Subject: [Ironruby-core] IronRuby r111 is out Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D930F8799@NA-EXMSG-C115.redmond.corp.microsoft.com> This is a really big change that fixes most of the known issues that are blocking us from running Rails. We're not there yet, but we're getting closer. This change incorporates the latest Ruby specs, which you can test drive via "rake mspec - - fail" for a baseline test. Note that the number of specs passing falls significantly because of some changes to the way some of the specs are run. This is a low-pri issue for us now since we're only fixing things that block us from running Rails for the time being. Once again, if you're reporting bugs, please let us know in the bug report *where* you found the bug so we can prioritize our investigations appropriately. Thanks! -John - Fixes bug #20139: MemberAssignmentExpression computes lhs expression twice - It's still not precise (arguments to ArrayItemAccess are evaluated twice now), will fix that later. - Fixes bug #20140: MemberAssignmentExpression not special cased for &&= and ||= - - Fixes bug #20131: require infinite loop - Fixed bug #19901: Class variable with ||= Ignores differences of Ruby Mutex and .NET Monitor for now: - Ruby Mutex.lock in not reentrant by the same thread - it could be locked/unlocked from non-owning thread (.NET Monitor throws an exception in that case) Also IronRuby runtime itself is not hardened against race conditions yet. Comments out extension type on RubyModule - CLR interop needs to be better designed first. Merges type to interface/module/class mapping dictionaries into a single one. We now remember the mapping for non-interface modules as well to enable reopening of library defined modules. Changes library initializer helpers to allow reopening. - Fixes bug #20199: Getting metaclass for nil causes a .NET exception - Fixes bug #20137: gsub $n bug - Fixes bug #19902: Regex global matching vars are not nil when they don't match - Fixes bug #20222: super call in initialize method of a module - Fixes bug #20011: Can't subclass module - Fixed Thread.new so that it won't crash when no block is present - Also implements Module#initialize, Module#initialize_copy, IO#sync. - Using new DLR AST factories: Ast.Property, Ast.Field, Ast.NewArrayInit. Applying patches: #19991 - adding implementation of Interrupt and SignalException exceptions #20028 - adding default implementation of Kernel#=~ #20173 - adding default stub implementation of SHA1 #20174 - defining string / integer constants in OpenSSL #20175 - implementation of Time#gmt_offset - Added the Ruby specs suite. You can run a baseline test against these via ruby mspec - - fail. The old rubinius specs still run via rake spec - - fail, but they are deprecated and will be removed in a future release. It is highly likely that we will redirect rake spec to rake mspec at that time. - Fixes for the very basic Dir.glob - Implemented IO::sync, Struct::Tms, Process.times - Fixed Thread.new so that it won't crash when no block is present, or when the block throws an exception - Skip threading spec tests that don't work - Fixes to mspec to remove extraneous dumps during rake mspec - - fail - Adds some more baseline excludes that were missing in mspec - Fixes Yaml test harness to reflect changes in namespace for the YAML lib - Adds configuration to Rakefile to push out yaml parser from merlin external and yaml tests - Adds a test_yaml task to Rakefile - Updated IronRuby.sln external .sln file to reflect new YAML libs Thanks, -John From Tomas.Matousek at microsoft.com Tue May 20 18:25:35 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 20 May 2008 15:25:35 -0700 Subject: [Ironruby-core] Code Review: events Message-ID: tfpt review /shelveset:events;REDMOND\tomat Reviewed F2F with John. Implements Module#method_added, method_removed, method_undefined. Pulls non-built-in libraries out of built-ins. Fixes bug #20206: ResolveSourceUnit("rails") - Kernel#load should handle files w/o extension. Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: Events.diff Type: application/octet-stream Size: 598684 bytes Desc: Events.diff URL: From Tomas.Matousek at microsoft.com Tue May 20 22:14:29 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 20 May 2008 19:14:29 -0700 Subject: [Ironruby-core] Code Review: Accessors Message-ID: tfpt review /shelveset:Accessors;REDMOND\tomat Fixes bug #20242: send attr_accessor. Uses rule generators to implement attribute accessors. Previously both used RubyMethodGroupInfo that was hacked to make them work. The hack is not needed anymore. Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: Accessors.diff Type: application/octet-stream Size: 18491 bytes Desc: Accessors.diff URL: From w.kelly at qut.edu.au Tue May 20 22:44:12 2008 From: w.kelly at qut.edu.au (Wayne Kelly) Date: Wed, 21 May 2008 12:44:12 +1000 Subject: [Ironruby-core] IronRuby r111 is out In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D930F8799@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <372109E149E8084D8E6C7D9CFD82E0632D930F8799@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: I notice there's one line of C# 3.0 syntax in the YAML implementation (yamlMultiAdapter). I'm going to have to get a new version of Visual Studio. Cheers, Wayne. From jflam at microsoft.com Tue May 20 23:06:07 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Tue, 20 May 2008 20:06:07 -0700 Subject: [Ironruby-core] IronRuby r111 is out In-Reply-To: References: <372109E149E8084D8E6C7D9CFD82E0632D930F8799@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D930F8990@NA-EXMSG-C115.redmond.corp.microsoft.com> We can fix that. Can you point me to the file & line #? Thanks, -John > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Wayne Kelly > Sent: Tuesday, May 20, 2008 7:44 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] IronRuby r111 is out > > > I notice there's one line of C# 3.0 syntax in the YAML implementation > (yamlMultiAdapter). > > I'm going to have to get a new version of Visual Studio. > > Cheers, Wayne. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From w.kelly at qut.edu.au Tue May 20 23:11:27 2008 From: w.kelly at qut.edu.au (Wayne Kelly) Date: Wed, 21 May 2008 13:11:27 +1000 Subject: [Ironruby-core] IronRuby r111 is out In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D930F8990@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <372109E149E8084D8E6C7D9CFD82E0632D930F8799@NA-EXMSG-C115.redmond.corp.microsoft.com> <372109E149E8084D8E6C7D9CFD82E0632D930F8990@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: Yaml\Engine\BaseConstructor.cs:121 It's about time I upgraded anyway, but I just wanted to check if this was a conscious decision to introduce C# 3.0 features into the code base. Cheers, Wayne. > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of > John Lam (IRONRUBY) > Sent: Wednesday, 21 May 2008 1:06 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] IronRuby r111 is out > > We can fix that. Can you point me to the file & line #? > > Thanks, > -John From curth at microsoft.com Wed May 21 01:02:55 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Tue, 20 May 2008 22:02:55 -0700 Subject: [Ironruby-core] Code Review: RubyLibTweaks3 Message-ID: tfpt review /shelveset:RubyLibTweaks3;REDMOND\curth Implemented more minor changes for library support: Fixes for RubyForge #20263, #20252 Implemented File::Stat and all its methods Implemented File.unlink, File.rename, File.stat and all the File methods that mirror the methods on File::Stat Implemented all the methods on ENV Implemented Hash.inspect Implemented Kernel.open for normal files -- Curt Hagenlocher curth at microsoft.com -------------- next part -------------- A non-text attachment was scrubbed... Name: RubyLibTweaks3.diff Type: application/octet-stream Size: 141474 bytes Desc: RubyLibTweaks3.diff URL: From jflam at microsoft.com Wed May 21 01:04:32 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Tue, 20 May 2008 22:04:32 -0700 Subject: [Ironruby-core] Code Review: Accessors In-Reply-To: References: Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D930F89D0@NA-EXMSG-C115.redmond.corp.microsoft.com> I'm wondering why SetInstanceVariable() has the funny signature: public static object SetInstanceVariable(object self, object value, CodeContext/*!*/ context, SymbolId name) { which is quite unlike other method signatures that we're used to seeing. Otherwise, looks good! -John > -----Original Message----- > From: Tomas Matousek > Sent: Tuesday, May 20, 2008 7:14 PM > To: IronRuby External Code Reviewers > Cc: ironruby-core at rubyforge.org > Subject: Code Review: Accessors > > tfpt review /shelveset:Accessors;REDMOND\tomat > > Fixes bug #20242: send attr_accessor. > Uses rule generators to implement attribute accessors. Previously both > used RubyMethodGroupInfo that was hacked to make them work. The hack is > not needed anymore. > > Tomas From Tomas.Matousek at microsoft.com Wed May 21 01:24:04 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 20 May 2008 22:24:04 -0700 Subject: [Ironruby-core] Code Review: Accessors In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D930F89D0@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <372109E149E8084D8E6C7D9CFD82E0632D930F89D0@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: To optimize stack allocation. Maybe even better would be to take value first. If the self or value argument is calculated as a result of try-catch/try-finally block (something like @x = begin 1; rescue; end, we need to save previous parameters to locals and enter the try-block with an empty IL stack. The less parameters before the less allocated variables on stack. Tomas -----Original Message----- From: John Lam (IRONRUBY) Sent: Tuesday, May 20, 2008 10:05 PM To: Tomas Matousek; IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: RE: Code Review: Accessors I'm wondering why SetInstanceVariable() has the funny signature: public static object SetInstanceVariable(object self, object value, CodeContext/*!*/ context, SymbolId name) { which is quite unlike other method signatures that we're used to seeing. Otherwise, looks good! -John > -----Original Message----- > From: Tomas Matousek > Sent: Tuesday, May 20, 2008 7:14 PM > To: IronRuby External Code Reviewers > Cc: ironruby-core at rubyforge.org > Subject: Code Review: Accessors > > tfpt review /shelveset:Accessors;REDMOND\tomat > > Fixes bug #20242: send attr_accessor. > Uses rule generators to implement attribute accessors. Previously both > used RubyMethodGroupInfo that was hacked to make them work. The hack is > not needed anymore. > > Tomas From oleg at tkachenko.com Wed May 21 01:22:19 2008 From: oleg at tkachenko.com (Oleg Tkachenko) Date: Tue, 20 May 2008 22:22:19 -0700 Subject: [Ironruby-core] IronRuby r111 is out In-Reply-To: References: <372109E149E8084D8E6C7D9CFD82E0632D930F8799@NA-EXMSG-C115.redmond.corp.microsoft.com> <372109E149E8084D8E6C7D9CFD82E0632D930F8990@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <4833B18B.5010703@tkachenko.com> Btw, just curious, why *not* moving to C# 3.0? Oleg Wayne Kelly wrote: > Yaml\Engine\BaseConstructor.cs:121 > > It's about time I upgraded anyway, but I just wanted to check if this was a conscious decision to introduce C# 3.0 features into the code base. > > Cheers, Wayne. > >> -----Original Message----- >> From: ironruby-core-bounces at rubyforge.org >> [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of >> John Lam (IRONRUBY) >> Sent: Wednesday, 21 May 2008 1:06 PM >> To: ironruby-core at rubyforge.org >> Subject: Re: [Ironruby-core] IronRuby r111 is out >> >> We can fix that. Can you point me to the file & line #? >> >> Thanks, >> -John > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From lists at ruby-forum.com Wed May 21 02:40:24 2008 From: lists at ruby-forum.com (Sunny Bogawat) Date: Wed, 21 May 2008 08:40:24 +0200 Subject: [Ironruby-core] download code for application Message-ID: <768a733f1597a6f0264f685a0527fd8c@ruby-forum.com> Hi, i want a such code which helps me download a csv file to each client machine when he click on download link, for this i am tried lots thing but it working for IE, but not for mac, Mozilla, safari. i want a optimum solution which works for all situation when i click on link, it give me pop up saying where to download file. i need help that what changes i do in controller on rhtml. please reply. -- Posted via http://www.ruby-forum.com/. From w.kelly at qut.edu.au Wed May 21 02:42:34 2008 From: w.kelly at qut.edu.au (Wayne Kelly) Date: Wed, 21 May 2008 16:42:34 +1000 Subject: [Ironruby-core] Gems and Rails use cases In-Reply-To: References: Message-ID: I was using an automation script to generate the tally of different types of known errors back when I was attempting to load the 100s of different ruby source files required by rails. Now, I'm pretty much just running the different use cases and seeing where it crashes. Cheers, Wayne. ________________________________ From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Steve Eichert Sent: Wednesday, 21 May 2008 1:04 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Gems and Rails use cases Wayne, How are you going about creating the list of problems as you try and load things? Are you just using trial and error or are you using something else to uncover the missing pieces? Thanks, Steve On Tue, May 20, 2008 at 10:40 AM, Wayne Kelly > wrote: Now that most of the files required by rails are loading successfully, I'm now trying to actually run a number of gems/rails use cases: ir.exe c:\rubygems-1.1.1\setup.rb ir.exe c:\ruby\bin\gem -h ir.exe c:\ruby\bin\gem -list ir.exe c:\ruby\bin\gem install rails ir.exe c:\ruby\bin\rails -h ir.exe c:\ruby\bin\rails my_rails_app ir.exe c:\my_rails_app\script\server ir.exe c:\my_rails_app\public\dispatch.cgi I installed the MRI windows one click installer and replaced the i386-mswin32 directory with an ironruby directory that contains stubs for: thread.so, etc.so, socket.so, stringio.so, syck.so, zlib.so, digest.so, digest/sha2.so, openssl.so, enumerator.so, bigdecimal.so, nkf.so, strscan.so The following lists the problems that I encountered (and in some cases worked around) for these use cases: gems setup.rb: - Mutex class not declared (from Thread.so) - gsub $n bug [bug #20137] - Hash modified during iteration [bug #20198] - require infinite loop [bug #20131] - Time::gmt_offset not implemented [patch #20175] - Dir.glob unexpected character [bug #19843] - define_method overload missing [bug #20119?] - Mutex::synchronize method not implemented - File::stat, lstat & unlink methods not implemented [bug #20252] gem -h: gem list: gem install rails: - Interrupt class not declared - Regexp.new(string, string) method not implemented - YAML::Syck::Resolver class not declared - YAML::Syck::DefaultResolver constant not defined - YAML::Syck::Resolver::use_types_at method not implemented - YAML::Syck:GenericResolver constant not defined - YAML::Syck:Parser class not declared - YAML::Syck:Emitter class not declared - Digest::SHA256 not defined - Module::define_method(:symbol) { block} overload not implemented rails generate myapp: - ResolveSourceUnit load source with no extension [bug #20206] - Signal.trap method not implemented rails runtime (webrick): rails runtime (dispatch.cgi): - ENV::each method not implemented - Regexp unrecognized escape sequence \_ [bug #20205] - File::SEPARATOR = '/' rather than '\' ??? - Module::method_added method not implemented - Thread::critical= method not implemented - NKF class not implemented (from nkf.so) - send attr_accessor [bug #20242] _______________________________________________ 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 Wed May 21 03:38:43 2008 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Wed, 21 May 2008 19:38:43 +1200 Subject: [Ironruby-core] download code for application In-Reply-To: <768a733f1597a6f0264f685a0527fd8c@ruby-forum.com> References: <768a733f1597a6f0264f685a0527fd8c@ruby-forum.com> Message-ID: This is the wrong list to ask that question but in your controller action that responds to the link you have to call send file and probably the mimetype def get_readme send_file("files/README.txt", :filename => 'yo_readme.txt') end Try googling that for more options Cheers Ivan On Wed, May 21, 2008 at 6:40 PM, Sunny Bogawat wrote: > Hi, > i want a such code which helps me download a csv file to each client > machine when he click on download link, for this i am tried lots thing > but it working for IE, but not for mac, Mozilla, safari. > i want a optimum solution which works for all situation when i click on > link, it give me pop up saying where to download file. i need help that > what changes i do in controller on rhtml. > please reply. > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: From w.kelly at qut.edu.au Wed May 21 10:39:07 2008 From: w.kelly at qut.edu.au (Wayne Kelly) Date: Thu, 22 May 2008 00:39:07 +1000 Subject: [Ironruby-core] IronRuby r111 is out In-Reply-To: <4833B18B.5010703@tkachenko.com> References: <372109E149E8084D8E6C7D9CFD82E0632D930F8799@NA-EXMSG-C115.redmond.corp.microsoft.com> <372109E149E8084D8E6C7D9CFD82E0632D930F8990@NA-EXMSG-C115.redmond.corp.microsoft.com> , <4833B18B.5010703@tkachenko.com> Message-ID: With just a few more relatively minor patches, we can now successfully run our first trivial use case: gem --help A small milestone :) Cheers, Wayne. From curth at microsoft.com Wed May 21 12:43:31 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Wed, 21 May 2008 09:43:31 -0700 Subject: [Ironruby-core] Code Review: RubySHA Message-ID: tfpt review /shelveset:RubySHA;REDMOND\curth Enough of Digest::SHA.* to pass current blockages -- Curt Hagenlocher curth at microsoft.com -------------- next part -------------- A non-text attachment was scrubbed... Name: RubySHA.diff Type: application/octet-stream Size: 17063 bytes Desc: RubySHA.diff URL: From cjac at colliertech.org Wed May 21 13:33:05 2008 From: cjac at colliertech.org (C.J. Adams-Collier) Date: Wed, 21 May 2008 10:33:05 -0700 Subject: [Ironruby-core] prebuild.xml file for ironruby Message-ID: <1211391185.23961.194.camel@cjac.intra.cardomain.com> Hey folks, I worked a bit on creating a prebuild.xml file for ironruby yesterday on the bus. I haven't completed it, and it's on my laptop (which is offline while I'm at work), but I thought I'd let you know it's on its way. When complete, it will make creating ironruby-x.y.z.tgz distributions easier (via autotools), provide a story for building with MonoDevelop, XCode, NAnt and older versions of visual studio. None of these stories is terribly good, but it will at least increase the codebase's accessibility. Should I maintain a diff against the current trunk like Seo, learn how to use git to provide a patched branch view, figure out this svk stuff, or submit the code to all Tomas and have the file committed? Shri indicated some interest in using prebuild to increase developer accessibility, but is this something that the devs even want to maintain in the code? Cheers, C.J. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From Shri.Borde at microsoft.com Wed May 21 14:59:57 2008 From: Shri.Borde at microsoft.com (Shri Borde) Date: Wed, 21 May 2008 11:59:57 -0700 Subject: [Ironruby-core] Signal.trap In-Reply-To: References: <5b0248170805180931n57b4675ekc46ff2ca18097abd@mail.gmail.com> Message-ID: <50B69702CA6E6D4E849D30CD4989AB8EE802FD8172@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Do signals work well with managed code? When a signal is raised, the OS freezes whatever the thread was doing and runs the handler. http://msdn.microsoft.com/en-us/library/xdkz3x12(VS.71).aspx lists a number of restrictions that the handler needs to follow. It does not say anything about managed code specifically. But you are not supposed to use heap routines, and running IronRuby code will almost definitely allocate objects under the hood. Also, if the managed handler triggers a GC or a stack-walk for some other reason, it could lead to problems if the thread was originally in an uninterruptible state. Wayne, did Ruby.Net have good tests around Signal? I wonder if Signal can actually be well supported in IronRuby, or if its going to be a fragile API. The same problems would apply to MRI or other runtimes where the user is not in full control of the actual processor instructions that get executed as part of the handler. However, MRI is probably a simpler system than the CLR and less susceptible to the kinds of problems mentioned above. We could support some of the well-known signals by mapping them directly to .NET paradigms. SIGNINT can be handled by using Console.CancelKeyPress (http://msdn.microsoft.com/en-us/library/system.console.cancelkeypress.aspx). SIGTERM can be built on top of AppDomain.ProcessExit (http://msdn.microsoft.com/en-us/library/system.appdomain.processexit.aspx) or AppDomain.DomainUnload (http://msdn.microsoft.com/en-us/library/system.appdomain.domainunload.aspx). For other signals like USR1 and USR2, we can implement stub functions for Signal#trap that does no real work. So Ruby code that calls Signal#trap will not fail right away, and things will work as long as no one calls Process.kill. IronRuby may end up not using fastcgi, and so we may not need all of these handlers anyway. For RailsConf, I think we should just stub out Signal#trap, and then later discuss a real plan for signals. John, Tomas, does this sound like a reasonable plan? Thanks, Shri Want to work on IronPython, IronRuby, F#? Visit http://blogs.msdn.com/ironpython/ From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Sunday, May 18, 2008 5:39 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Signal.trap AFAICT they use INT, TERM, HUP, USR1, USR2 (most of them in the fastcgi handler, but mongrel and thin use them as well) thin also uses QUIT That's what i got from quickly running grep over my rails gems I've asked koz if I left some out and if I did I'll let you know which ones are missing. On Mon, May 19, 2008 at 12:11 PM, Wayne Kelly > wrote: I'm not sure I can answer that question in it's totality as I'm not familiar with much of the Rails framework. But the examples that I've seen so far have been trapping the SIGINT and/or TERM signals in order to perform a graceful controlled shutdown. Cheers, Wayne. > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of > Tomas Matousek > Sent: Monday, 19 May 2008 10:00 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Signal.trap > > What signals are used in Rails and what for? > > Tomas > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of > Sanghyeon Seo > Sent: Sunday, May 18, 2008 9:32 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Signal.trap > > 2008/5/18 Michael Letterle >: > > PInvokes would, of course, make it non-portable to mono...or > > silverlight for that matter. So no, I don't think it's a > good idea :) > > Well, Mono supports P/Invoke, and Ruby.NET's Signal code > actually worked fine on Mono. (In this case, signal() > function is portable between Windows and Unix.) > > Silverlight would be problematic indeed. But then, why would > Ruby code in Silverlight use methods in Signal module? > > -- > Seo Sanghyeon > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: From Shri.Borde at microsoft.com Wed May 21 15:39:42 2008 From: Shri.Borde at microsoft.com (Shri Borde) Date: Wed, 21 May 2008 12:39:42 -0700 Subject: [Ironruby-core] Signal.trap In-Reply-To: <50B69702CA6E6D4E849D30CD4989AB8EE802FD8172@DF-GRTDANE-MSG.exchange.corp.microsoft.com> References: <5b0248170805180931n57b4675ekc46ff2ca18097abd@mail.gmail.com> <50B69702CA6E6D4E849D30CD4989AB8EE802FD8172@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: <50B69702CA6E6D4E849D30CD4989AB8EE802FD81A2@DF-GRTDANE-MSG.exchange.corp.microsoft.com> I think the right way to implement Ruby signals is as follows: ? Signal#trap results in a low level handler in IronRuby being registered for the signal. IronRuby remembers the block argument and the signal number in a side-table. ? When the signal is raised, the low level handler will get fired. This handler might need to be a Constrained Execution Region (http://msdn.microsoft.com/en-us/library/ms228973(VS.85).aspx) ? The handler will need to set up a new thread, just like ?Win32 operating systems generate a new thread to specifically handle that interrupt? as described at http://msdn.microsoft.com/en-us/library/xdkz3x12(VS.71).aspx for SIGINT. ? When the new thread runs, it can look up the side-table and run the corresponding block. At that point, there are no restrictions on what the block can do. Basically, just like Console.CancelKeyPress provides a safe way to handle SIGINT, we will need to build a general mechanism for processing arbitrary signals in a safe way. Ideally, the CLR would do this for us. Something like a ?Process.OnSignalRaised?. Clearly, this is a lot of work. So stubbing out Signal#trap for now sounds like the way to go. Thanks, Shri Want to work on IronPython, IronRuby, F#? Visit http://blogs.msdn.com/ironpython/ From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Shri Borde Sent: Wednesday, May 21, 2008 12:00 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Signal.trap Do signals work well with managed code? When a signal is raised, the OS freezes whatever the thread was doing and runs the handler. http://msdn.microsoft.com/en-us/library/xdkz3x12(VS.71).aspx lists a number of restrictions that the handler needs to follow. It does not say anything about managed code specifically. But you are not supposed to use heap routines, and running IronRuby code will almost definitely allocate objects under the hood. Also, if the managed handler triggers a GC or a stack-walk for some other reason, it could lead to problems if the thread was originally in an uninterruptible state. Wayne, did Ruby.Net have good tests around Signal? I wonder if Signal can actually be well supported in IronRuby, or if its going to be a fragile API. The same problems would apply to MRI or other runtimes where the user is not in full control of the actual processor instructions that get executed as part of the handler. However, MRI is probably a simpler system than the CLR and less susceptible to the kinds of problems mentioned above. We could support some of the well-known signals by mapping them directly to .NET paradigms. SIGNINT can be handled by using Console.CancelKeyPress (http://msdn.microsoft.com/en-us/library/system.console.cancelkeypress.aspx). SIGTERM can be built on top of AppDomain.ProcessExit (http://msdn.microsoft.com/en-us/library/system.appdomain.processexit.aspx) or AppDomain.DomainUnload (http://msdn.microsoft.com/en-us/library/system.appdomain.domainunload.aspx). For other signals like USR1 and USR2, we can implement stub functions for Signal#trap that does no real work. So Ruby code that calls Signal#trap will not fail right away, and things will work as long as no one calls Process.kill. IronRuby may end up not using fastcgi, and so we may not need all of these handlers anyway. For RailsConf, I think we should just stub out Signal#trap, and then later discuss a real plan for signals. John, Tomas, does this sound like a reasonable plan? Thanks, Shri Want to work on IronPython, IronRuby, F#? Visit http://blogs.msdn.com/ironpython/ From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Sunday, May 18, 2008 5:39 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Signal.trap AFAICT they use INT, TERM, HUP, USR1, USR2 (most of them in the fastcgi handler, but mongrel and thin use them as well) thin also uses QUIT That's what i got from quickly running grep over my rails gems I've asked koz if I left some out and if I did I'll let you know which ones are missing. On Mon, May 19, 2008 at 12:11 PM, Wayne Kelly > wrote: I'm not sure I can answer that question in it's totality as I'm not familiar with much of the Rails framework. But the examples that I've seen so far have been trapping the SIGINT and/or TERM signals in order to perform a graceful controlled shutdown. Cheers, Wayne. > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of > Tomas Matousek > Sent: Monday, 19 May 2008 10:00 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Signal.trap > > What signals are used in Rails and what for? > > Tomas > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of > Sanghyeon Seo > Sent: Sunday, May 18, 2008 9:32 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Signal.trap > > 2008/5/18 Michael Letterle >: > > PInvokes would, of course, make it non-portable to mono...or > > silverlight for that matter. So no, I don't think it's a > good idea :) > > Well, Mono supports P/Invoke, and Ruby.NET's Signal code > actually worked fine on Mono. (In this case, signal() > function is portable between Windows and Unix.) > > Silverlight would be problematic indeed. But then, why would > Ruby code in Silverlight use methods in Signal module? > > -- > Seo Sanghyeon > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tomas.Matousek at microsoft.com Wed May 21 17:55:45 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Wed, 21 May 2008 14:55:45 -0700 Subject: [Ironruby-core] Code Review: Caller1 Message-ID: tfpt review /shelveset:Caller1;REDMOND\tomat Implements Kernel#caller. Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: Caller1.diff Type: application/octet-stream Size: 19015 bytes Desc: Caller1.diff URL: From jflam at microsoft.com Wed May 21 18:06:24 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Wed, 21 May 2008 15:06:24 -0700 Subject: [Ironruby-core] Code Review: rails-2 Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D941F2ECE@NA-EXMSG-C115.redmond.corp.microsoft.com> tfpt review /shelveset:rails-2;REDMOND\jflam This shelveset introduces fixes that are blocking us from - Added missing define_method overload for Proc - Adding missing default constructors to StringIO and StringScanner - We canonicalize paths returned from a few key File methods (\ -> /) - Introducing new Ruby\Libs directory to hold our redirect .rb files and hacks - Modifying aliases and checking in ir.cmd - Removing .EXE directory from $: search path Thanks, -John -------------- next part -------------- A non-text attachment was scrubbed... Name: rails-2.diff Type: application/octet-stream Size: 27404 bytes Desc: rails-2.diff URL: From jflam at microsoft.com Wed May 21 18:06:40 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Wed, 21 May 2008 15:06:40 -0700 Subject: [Ironruby-core] Code Review: Caller1 In-Reply-To: References: Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D941F2ECF@NA-EXMSG-C115.redmond.corp.microsoft.com> Looks good! Thanks, -John -----Original Message----- From: Tomas Matousek Sent: Wednesday, May 21, 2008 2:56 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: Caller1 tfpt review /shelveset:Caller1;REDMOND\tomat Implements Kernel#caller. Tomas From curth at microsoft.com Wed May 21 18:15:03 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Wed, 21 May 2008 15:15:03 -0700 Subject: [Ironruby-core] Code Review: RubyArrayPack Message-ID: tfpt review /shelveset:RubyArrayPack;REDMOND\curth Significant subset of Array.pack and String.unpack -- Curt Hagenlocher curth at microsoft.com -------------- next part -------------- A non-text attachment was scrubbed... Name: RubyArrayPack.diff Type: application/octet-stream Size: 36190 bytes Desc: RubyArrayPack.diff URL: From Tomas.Matousek at microsoft.com Wed May 21 18:24:27 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Wed, 21 May 2008 15:24:27 -0700 Subject: [Ironruby-core] Code Review: RubyArrayPack In-Reply-To: References: Message-ID: What is MRI behavior if I return a number that doesn't fit in sbyte? writer.Write((sbyte)Protocols.CastToFixnum(context, self[i + j])); Does it silently overflow? If so, we should use unchecked() region. Other than that looks good. Tomas -----Original Message----- From: Curt Hagenlocher Sent: Wednesday, May 21, 2008 3:15 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: RubyArrayPack tfpt review /shelveset:RubyArrayPack;REDMOND\curth Significant subset of Array.pack and String.unpack -- Curt Hagenlocher curth at microsoft.com From curth at microsoft.com Wed May 21 18:27:40 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Wed, 21 May 2008 15:27:40 -0700 Subject: [Ironruby-core] Code Review: RubyArrayPack In-Reply-To: References: Message-ID: Is the "unchecked" just a formality under C#? It's not currently throwing an exception. IronRuby: >>> [1000].pack('c') => "\350" Matz: irb(main):012:0> [1000].pack('c') => "\350" -----Original Message----- From: Tomas Matousek Sent: Wednesday, May 21, 2008 3:24 PM To: Curt Hagenlocher; IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: RE: Code Review: RubyArrayPack What is MRI behavior if I return a number that doesn't fit in sbyte? writer.Write((sbyte)Protocols.CastToFixnum(context, self[i + j])); Does it silently overflow? If so, we should use unchecked() region. Other than that looks good. Tomas -----Original Message----- From: Curt Hagenlocher Sent: Wednesday, May 21, 2008 3:15 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: RubyArrayPack tfpt review /shelveset:RubyArrayPack;REDMOND\curth Significant subset of Array.pack and String.unpack -- Curt Hagenlocher curth at microsoft.com From jflam at microsoft.com Wed May 21 18:30:38 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Wed, 21 May 2008 15:30:38 -0700 Subject: [Ironruby-core] Running activerecord In-Reply-To: <1208551582.7898.1248680957@webmail.messagingengine.com> References: <1208551582.7898.1248680957@webmail.messagingengine.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D941F2F0E@NA-EXMSG-C115.redmond.corp.microsoft.com> Hey Brian - can you share your prototype ADO.NET wrappers for SQLite? We're at the point where we need a DB to boot Rails. Thanks, -John -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Brian Blackwell Sent: Friday, April 18, 2008 1:46 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Running activerecord I wanted to test my prototype ADO.NET database wrappers for SQLite and MySQL, so I thought I would see how far I could get in an attempt to run activerecord. Running activerecord is of course a necessary step in the path to running Rails. At this point I'm simply trying to get "require 'active_record.rb'" to work, which in turn requires activesupport. Here are some issues I've come across thus far: From Tomas.Matousek at microsoft.com Wed May 21 18:45:29 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Wed, 21 May 2008 15:45:29 -0700 Subject: [Ironruby-core] Code Review: RubyArrayPack In-Reply-To: References: Message-ID: More or less. But you can also compile with /checked option and then it wouldn't work. It's better to mark places where you expect the overflow, because you usually don't expect it. Tomas -----Original Message----- From: Curt Hagenlocher Sent: Wednesday, May 21, 2008 3:28 PM To: Tomas Matousek; IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: RE: Code Review: RubyArrayPack Is the "unchecked" just a formality under C#? It's not currently throwing an exception. IronRuby: >>> [1000].pack('c') => "\350" Matz: irb(main):012:0> [1000].pack('c') => "\350" -----Original Message----- From: Tomas Matousek Sent: Wednesday, May 21, 2008 3:24 PM To: Curt Hagenlocher; IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: RE: Code Review: RubyArrayPack What is MRI behavior if I return a number that doesn't fit in sbyte? writer.Write((sbyte)Protocols.CastToFixnum(context, self[i + j])); Does it silently overflow? If so, we should use unchecked() region. Other than that looks good. Tomas -----Original Message----- From: Curt Hagenlocher Sent: Wednesday, May 21, 2008 3:15 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: RubyArrayPack tfpt review /shelveset:RubyArrayPack;REDMOND\curth Significant subset of Array.pack and String.unpack -- Curt Hagenlocher curth at microsoft.com From Tomas.Matousek at microsoft.com Wed May 21 20:19:14 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Wed, 21 May 2008 17:19:14 -0700 Subject: [Ironruby-core] Code Review: LoadCache Message-ID: tfpt review /shelveset:LoadCache;REDMOND\tomat Implements a simple load cache. Kernel#require uses relative paths to determine whether a file has already been loaded. One file required from multiple different directories using relative paths may therefore run multiple times. We still need to run it multiple times but we need to compile it only once unless the file content changed. This shelveset introduces a very simple load cache. It doesn't check timestamps of the files for now, so if the file is modified it won't load the new content. The cache is also not using weak references, so it leaks memory. Will revisit both issues post RailsConf. Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: LoadCache.diff Type: application/octet-stream Size: 4326 bytes Desc: LoadCache.diff URL: From w.kelly at qut.edu.au Wed May 21 21:08:24 2008 From: w.kelly at qut.edu.au (Wayne Kelly) Date: Thu, 22 May 2008 11:08:24 +1000 Subject: [Ironruby-core] Code Review: rails-2 In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D941F2ECE@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <372109E149E8084D8E6C7D9CFD82E0632D941F2ECE@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: In rbconfig.rb: TOPDIR = File.dirname(__FILE__).chomp!("/lib/ruby/1.8/i386-mswin32") the path "/lib/ruby/1.8/i386-mswin32" needs to be replaced by the tail of the directory path where rbconfig.rb resides. (otherwise chomp! will return nil) Cheers, Wayne. > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of > John Lam (IRONRUBY) > Sent: Thursday, 22 May 2008 8:06 AM > To: IronRuby External Code Reviewers > Cc: ironruby-core at rubyforge.org > Subject: [Ironruby-core] Code Review: rails-2 > > tfpt review /shelveset:rails-2;REDMOND\jflam > > This shelveset introduces fixes that are blocking us from > > - Added missing define_method overload for Proc > - Adding missing default constructors to StringIO and StringScanner > - We canonicalize paths returned from a few key File methods (\ -> /) > - Introducing new Ruby\Libs directory to hold our redirect > .rb files and hacks > - Modifying aliases and checking in ir.cmd > - Removing .EXE directory from $: search path > > Thanks, > -John > > From jdeville at microsoft.com Wed May 21 21:15:44 2008 From: jdeville at microsoft.com (Jim Deville) Date: Wed, 21 May 2008 18:15:44 -0700 Subject: [Ironruby-core] Running activerecord Message-ID: For the time being, we can remove AR from the loaded frameworks in config/environment.rb That will stop AR from being loaded and allow us to run without a db. JD -----Original Message----- From: "John Lam (IRONRUBY)" To: "ironruby-core at rubyforge.org" Sent: 5/21/08 3:31 PM Subject: Re: [Ironruby-core] Running activerecord Hey Brian - can you share your prototype ADO.NET wrappers for SQLite? We're at the point where we need a DB to boot Rails. Thanks, -John -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Brian Blackwell Sent: Friday, April 18, 2008 1:46 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Running activerecord I wanted to test my prototype ADO.NET database wrappers for SQLite and MySQL, so I thought I would see how far I could get in an attempt to run activerecord. Running activerecord is of course a necessary step in the path to running Rails. At this point I'm simply trying to get "require 'active_record.rb'" to work, which in turn requires activesupport. Here are some issues I've come across thus far: _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From jflam at microsoft.com Wed May 21 21:58:38 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Wed, 21 May 2008 18:58:38 -0700 Subject: [Ironruby-core] Running activerecord In-Reply-To: References: Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D941F306F@NA-EXMSG-C115.redmond.corp.microsoft.com> We're doing that already - we get past all of the initialization code in Rails now. Thanks, -John -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jim Deville Sent: Wednesday, May 21, 2008 6:16 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Running activerecord For the time being, we can remove AR from the loaded frameworks in config/environment.rb That will stop AR from being loaded and allow us to run without a db. JD -----Original Message----- From: "John Lam (IRONRUBY)" To: "ironruby-core at rubyforge.org" Sent: 5/21/08 3:31 PM Subject: Re: [Ironruby-core] Running activerecord Hey Brian - can you share your prototype ADO.NET wrappers for SQLite? We're at the point where we need a DB to boot Rails. Thanks, -John -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Brian Blackwell Sent: Friday, April 18, 2008 1:46 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Running activerecord I wanted to test my prototype ADO.NET database wrappers for SQLite and MySQL, so I thought I would see how far I could get in an attempt to run activerecord. Running activerecord is of course a necessary step in the path to running Rails. At this point I'm simply trying to get "require 'active_record.rb'" to work, which in turn requires activesupport. Here are some issues I've come across thus far: _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From jflam at microsoft.com Wed May 21 21:59:08 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Wed, 21 May 2008 18:59:08 -0700 Subject: [Ironruby-core] Code Review: rails-2 In-Reply-To: References: <372109E149E8084D8E6C7D9CFD82E0632D941F2ECE@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D941F3070@NA-EXMSG-C115.redmond.corp.microsoft.com> Nice catch! Thanks! Thanks, -John -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Wayne Kelly Sent: Wednesday, May 21, 2008 6:08 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review: rails-2 In rbconfig.rb: TOPDIR = File.dirname(__FILE__).chomp!("/lib/ruby/1.8/i386-mswin32") the path "/lib/ruby/1.8/i386-mswin32" needs to be replaced by the tail of the directory path where rbconfig.rb resides. (otherwise chomp! will return nil) Cheers, Wayne. > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of > John Lam (IRONRUBY) > Sent: Thursday, 22 May 2008 8:06 AM > To: IronRuby External Code Reviewers > Cc: ironruby-core at rubyforge.org > Subject: [Ironruby-core] Code Review: rails-2 > > tfpt review /shelveset:rails-2;REDMOND\jflam > > This shelveset introduces fixes that are blocking us from > > - Added missing define_method overload for Proc > - Adding missing default constructors to StringIO and StringScanner > - We canonicalize paths returned from a few key File methods (\ -> /) > - Introducing new Ruby\Libs directory to hold our redirect > .rb files and hacks > - Modifying aliases and checking in ir.cmd > - Removing .EXE directory from $: search path > > Thanks, > -John > > _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From brianblackwell at realemail.net Thu May 22 00:18:48 2008 From: brianblackwell at realemail.net (Brian Blackwell) Date: Thu, 22 May 2008 14:18:48 +1000 Subject: [Ironruby-core] Running activerecord In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D941F2F0E@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <1208551582.7898.1248680957@webmail.messagingengine.com> <372109E149E8084D8E6C7D9CFD82E0632D941F2F0E@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <1211429928.3895.1254478531@webmail.messagingengine.com> Hi John, No worries - see the attached zip file which contains the Ruby SQLite3 driver with a couple of minor modifications (in particular the modified database.rb loads the ADO.NET wrapper instead of the native driver). The ADO.NET wrapper itself can be found in the directory 'sqlite3\driver\ironruby'. Although it is still very much a prototype, I have been able to get a simple activerecord use case up and running (with a few workarounds for remaining IronRuby bugs) which creates tables and performs queries. The required SQLite3 ADO.NET DLL can be found at http://sqlite.phxsoftware.com. Cheers, Brian On Wed, 21 May 2008 15:30:38 -0700, "John Lam (IRONRUBY)" said: > Hey Brian - can you share your prototype ADO.NET wrappers for SQLite? > We're at the point where we need a DB to boot Rails. > > Thanks, > -John > > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Brian Blackwell > Sent: Friday, April 18, 2008 1:46 PM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] Running activerecord > > I wanted to test my prototype ADO.NET database wrappers for SQLite and > MySQL, so I thought I would see how far I could get in an attempt to run > activerecord. Running activerecord is of course a necessary step in the > path to running Rails. At this point I'm simply trying to get "require > 'active_record.rb'" to work, which in turn requires activesupport. Here > are some issues I've come across thus far: > _______________________________________________ > 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: sqlite3-ironruby-20080521.zip Type: application/zip Size: 34482 bytes Desc: not available URL: From jflam at microsoft.com Thu May 22 14:27:20 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Thu, 22 May 2008 11:27:20 -0700 Subject: [Ironruby-core] Running activerecord In-Reply-To: <1211429928.3895.1254478531@webmail.messagingengine.com> References: <1208551582.7898.1248680957@webmail.messagingengine.com> <372109E149E8084D8E6C7D9CFD82E0632D941F2F0E@NA-EXMSG-C115.redmond.corp.microsoft.com> <1211429928.3895.1254478531@webmail.messagingengine.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D941F332B@NA-EXMSG-C115.redmond.corp.microsoft.com> Brian Blackwell: > No worries - see the attached zip file which contains the Ruby SQLite3 > driver with a couple of minor modifications (in particular the > modified database.rb loads the ADO.NET wrapper instead of the native driver). > The ADO.NET wrapper itself can be found in the directory > 'sqlite3\driver\ironruby'. Although it is still very much a prototype, > I have been able to get a simple activerecord use case up and running > (with a few workarounds for remaining IronRuby bugs) which creates > tables and performs queries. The required SQLite3 ADO.NET DLL can be > found at http://sqlite.phxsoftware.com. Cool. Thanks! -John From Tomas.Matousek at microsoft.com Thu May 22 17:14:20 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Thu, 22 May 2008 14:14:20 -0700 Subject: [Ironruby-core] Code Review: MoreEvents Message-ID: tfpt review /shelveset:MoreEvents;REDMOND\tomat Implements Kernel#singleton_method_(added|removed|undefined) and Class#inherited events. Also moves some fields from RubyBlockInfo to Proc in a preparation for to_proc implementation. Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: MoreEvents.diff Type: application/octet-stream Size: 37262 bytes Desc: MoreEvents.diff URL: From Tomas.Matousek at microsoft.com Thu May 22 20:20:54 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Thu, 22 May 2008 17:20:54 -0700 Subject: [Ironruby-core] Code Review: InstanceEval Message-ID: tfpt review /shelveset:InstanceEval;REDMOND\tomat Implements Kernel#instance_eval and fixes local variables lookup bugs in eval. Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: InstanceEval.diff Type: application/octet-stream Size: 23224 bytes Desc: InstanceEval.diff URL: From curth at microsoft.com Fri May 23 00:09:32 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Thu, 22 May 2008 21:09:32 -0700 Subject: [Ironruby-core] Code Review: ItsAboutTime Message-ID: tfpt review /shelveset:ItsAboutTime;REDMOND\curth As part of bringing up ActiveRecord, implemented Time.strftime and fixed various issues with Time.local and Time.gm -- Curt Hagenlocher curth at microsoft.com -------------- next part -------------- A non-text attachment was scrubbed... Name: ItsAboutTime.diff Type: application/octet-stream Size: 27707 bytes Desc: ItsAboutTime.diff URL: From Tomas.Matousek at microsoft.com Fri May 23 16:01:20 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Fri, 23 May 2008 13:01:20 -0700 Subject: [Ironruby-core] Code Review: CatchThrow Message-ID: tfpt review /shelveset:CatchThrow;REDMOND\tomat Implements Kernel#catch and Kernel#throw. Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: CatchThrow.diff Type: application/octet-stream Size: 13283 bytes Desc: CatchThrow.diff URL: From jflam at microsoft.com Fri May 23 17:44:31 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Fri, 23 May 2008 14:44:31 -0700 Subject: [Ironruby-core] Code Review: CatchThrow In-Reply-To: References: Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D945327DE@NA-EXMSG-C115.redmond.corp.microsoft.com> Looks good! Thanks, -John -----Original Message----- From: Tomas Matousek Sent: Friday, May 23, 2008 1:01 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: CatchThrow tfpt review /shelveset:CatchThrow;REDMOND\tomat Implements Kernel#catch and Kernel#throw. Tomas From Shri.Borde at microsoft.com Fri May 23 19:08:24 2008 From: Shri.Borde at microsoft.com (Shri Borde) Date: Fri, 23 May 2008 16:08:24 -0700 Subject: [Ironruby-core] Signal.trap In-Reply-To: <50B69702CA6E6D4E849D30CD4989AB8EE802FD81A2@DF-GRTDANE-MSG.exchange.corp.microsoft.com> References: <5b0248170805180931n57b4675ekc46ff2ca18097abd@mail.gmail.com> <50B69702CA6E6D4E849D30CD4989AB8EE802FD8172@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <50B69702CA6E6D4E849D30CD4989AB8EE802FD81A2@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: <50B69702CA6E6D4E849D30CD4989AB8EE80C9BF752@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Some more followup. On Windows, raise (http://msdn.microsoft.com/en-us/library/dwwzkt4c(VS.71).aspx) can only send a signal to the same process synchrously on the same thread. If you do ?Process.kill? with MRI running on Windows, it only works if you send a signal to the same process. It does not work if you try to send a signal to a different process. Python signals also only work on *nix. ?os.kill? is only available on *nix according to http://www.python.org/doc/2.4/lib/os-process.html. So the only way signals could be used in IronRuby in a portable fashion is to use them to deal with Ctrl-C as that is the only useful subset that will work on Windows. I have attached sample code at http://blogs.msdn.com/shrib/archive/2008/05/23/signals-on-windows.aspx if anyone wants to play with it. Thanks, Shri Want to work on IronRuby? http://members.microsoft.com/careers/search/details.aspx?JobID=7C2E33E8-5A9C-44F3-A1CE-DA2D66DC3C8B From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Shri Borde Sent: Wednesday, May 21, 2008 12:40 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Signal.trap I think the right way to implement Ruby signals is as follows: ? Signal#trap results in a low level handler in IronRuby being registered for the signal. IronRuby remembers the block argument and the signal number in a side-table. ? When the signal is raised, the low level handler will get fired. This handler might need to be a Constrained Execution Region (http://msdn.microsoft.com/en-us/library/ms228973(VS.85).aspx) ? The handler will need to set up a new thread, just like ?Win32 operating systems generate a new thread to specifically handle that interrupt? as described at http://msdn.microsoft.com/en-us/library/xdkz3x12(VS.71).aspx for SIGINT. ? When the new thread runs, it can look up the side-table and run the corresponding block. At that point, there are no restrictions on what the block can do. Basically, just like Console.CancelKeyPress provides a safe way to handle SIGINT, we will need to build a general mechanism for processing arbitrary signals in a safe way. Ideally, the CLR would do this for us. Something like a ?Process.OnSignalRaised?. Clearly, this is a lot of work. So stubbing out Signal#trap for now sounds like the way to go. Thanks, Shri Want to work on IronPython, IronRuby, F#? Visit http://blogs.msdn.com/ironpython/ From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Shri Borde Sent: Wednesday, May 21, 2008 12:00 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Signal.trap Do signals work well with managed code? When a signal is raised, the OS freezes whatever the thread was doing and runs the handler. http://msdn.microsoft.com/en-us/library/xdkz3x12(VS.71).aspx lists a number of restrictions that the handler needs to follow. It does not say anything about managed code specifically. But you are not supposed to use heap routines, and running IronRuby code will almost definitely allocate objects under the hood. Also, if the managed handler triggers a GC or a stack-walk for some other reason, it could lead to problems if the thread was originally in an uninterruptible state. Wayne, did Ruby.Net have good tests around Signal? I wonder if Signal can actually be well supported in IronRuby, or if its going to be a fragile API. The same problems would apply to MRI or other runtimes where the user is not in full control of the actual processor instructions that get executed as part of the handler. However, MRI is probably a simpler system than the CLR and less susceptible to the kinds of problems mentioned above. We could support some of the well-known signals by mapping them directly to .NET paradigms. SIGNINT can be handled by using Console.CancelKeyPress (http://msdn.microsoft.com/en-us/library/system.console.cancelkeypress.aspx). SIGTERM can be built on top of AppDomain.ProcessExit (http://msdn.microsoft.com/en-us/library/system.appdomain.processexit.aspx) or AppDomain.DomainUnload (http://msdn.microsoft.com/en-us/library/system.appdomain.domainunload.aspx). For other signals like USR1 and USR2, we can implement stub functions for Signal#trap that does no real work. So Ruby code that calls Signal#trap will not fail right away, and things will work as long as no one calls Process.kill. IronRuby may end up not using fastcgi, and so we may not need all of these handlers anyway. For RailsConf, I think we should just stub out Signal#trap, and then later discuss a real plan for signals. John, Tomas, does this sound like a reasonable plan? Thanks, Shri Want to work on IronPython, IronRuby, F#? Visit http://blogs.msdn.com/ironpython/ From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Sunday, May 18, 2008 5:39 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Signal.trap AFAICT they use INT, TERM, HUP, USR1, USR2 (most of them in the fastcgi handler, but mongrel and thin use them as well) thin also uses QUIT That's what i got from quickly running grep over my rails gems I've asked koz if I left some out and if I did I'll let you know which ones are missing. On Mon, May 19, 2008 at 12:11 PM, Wayne Kelly > wrote: I'm not sure I can answer that question in it's totality as I'm not familiar with much of the Rails framework. But the examples that I've seen so far have been trapping the SIGINT and/or TERM signals in order to perform a graceful controlled shutdown. Cheers, Wayne. > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of > Tomas Matousek > Sent: Monday, 19 May 2008 10:00 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Signal.trap > > What signals are used in Rails and what for? > > Tomas > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of > Sanghyeon Seo > Sent: Sunday, May 18, 2008 9:32 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Signal.trap > > 2008/5/18 Michael Letterle >: > > PInvokes would, of course, make it non-portable to mono...or > > silverlight for that matter. So no, I don't think it's a > good idea :) > > Well, Mono supports P/Invoke, and Ruby.NET's Signal code > actually worked fine on Mono. (In this case, signal() > function is portable between Windows and Unix.) > > Silverlight would be problematic indeed. But then, why would > Ruby code in Silverlight use methods in Signal module? > > -- > Seo Sanghyeon > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tomas.Matousek at microsoft.com Fri May 23 19:17:04 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Fri, 23 May 2008 16:17:04 -0700 Subject: [Ironruby-core] Code Review: miscfixes2 Message-ID: tfpt review /shelveset:miscfixes2;REDMOND\tomat Adds Signal class, Kernel#trap, Process#kill stubs. The functionality is not implemented. Fixes attr accessors aliasing. Fixes sockets to deal with 0.0.0.0 IP address. Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: miscfixes2.diff Type: application/octet-stream Size: 36059 bytes Desc: miscfixes2.diff URL: From jflam at microsoft.com Fri May 23 21:56:29 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Fri, 23 May 2008 18:56:29 -0700 Subject: [Ironruby-core] IronRuby r112 is out Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D945328DB@NA-EXMSG-C115.redmond.corp.microsoft.com> This is the release that we used to run the Rails functional test this afternoon. I had to modify two files in Rails to work around some missing functionality in IronRuby today. I've attached these files to this mail. They are: activesupport\lib\active_support\inflector.rb railties\lib\initializer.rb There were three reasons to make these changes. 1) In inflector.rb, we have a workaround around a missing feature in String#gsub (replacement via \1 and \2) 2) In initializer.rb, we have a workaround around a missing feature in Dir#glob (we don't handle [_a-z] correctly) 3) In initializer.rb, we're commenting out the call to initialize_database since we don't have our .NET ActiveRecord adapter working yet (it's in progress). I've attached these two files to this mail if you want to try it out yourself. Note that when creating the Rails app, I've also frozen the copy of rails via: rake rails:freeze:gems Note that there is a new svn\trunk\libs directory in this build. You'll need to create an alias that uses the -I command line switch to IronRuby to correctly include this path *AHEAD* of other paths (such as the path to your MRI installations' lib\ruby\1.8 and lib\site_ruby\1.8\ Here's a sample ir.cmd file that we use internally. %MERLIN_ROOT%\bin\debug\ir.exe -I %MERLIN_ROOT%\..\External\Languages\Ruby\ruby-1.8.6\lib\ruby\1.8;%MERLIN_ROOT%\..\External\Languages\Ruby\ruby-1.8.6\lib\ruby\site_ruby\1.8;%MERLIN_ROOT%\Languages\Ruby\Libs %* Note that the new Ruby\Libs directory shows up at the end of the list (this is a bug in how we parse -I). The order is important. Thanks, -John -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: initializer.rb Type: application/octet-stream Size: 24934 bytes Desc: initializer.rb URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: inflector.rb Type: application/octet-stream Size: 10577 bytes Desc: inflector.rb URL: From jflam at microsoft.com Sat May 24 00:56:51 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Fri, 23 May 2008 21:56:51 -0700 Subject: [Ironruby-core] Got a slightly more ambitious Rails functional test running Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D94532905@NA-EXMSG-C115.redmond.corp.microsoft.com> Here's the controller: class SayController < ApplicationController def hello @name = 'john' end end Here's the view template: Say Hello

Hello, <%= @name%>

Here's the functional test: require File.dirname(__FILE__) + '/../test_helper' class SayControllerTest < ActionController::TestCase def test_hello get :hello assert_template "say/hello" assert_response :success assert_tag :tag => "h1", :child => /john/ end end It hits a case where Rail uses Kernel#loop, so I implemented it. It uncovered a couple of problems with how we implemented Hash#each*. Ruby hashes can be modified from within the blocks that we yield to, but we were using foreach () to iterate over the underlying Dictionary. Both of these fixes are on my machine, and I'll submit later once I get a connection back to corpnet. We have WEBrick nearly running now. We are currently blocking on IO#select. Thanks, -John From ksunair at yahoo.com Sat May 24 00:57:24 2008 From: ksunair at yahoo.com (Unnikrishnan Nair) Date: Fri, 23 May 2008 21:57:24 -0700 (PDT) Subject: [Ironruby-core] IronRuby r112 is out Message-ID: <457872.92535.qm@web50609.mail.re2.yahoo.com> John, I saw 112 has FileOps implemented so please discard the patch I send in earlier. Let me know if there are any other area you would like me to help with? Thanks. ----- Original Message ---- From: John Lam (IRONRUBY) To: "ironruby-core at rubyforge.org" Sent: Friday, May 23, 2008 8:56:29 PM Subject: [Ironruby-core] IronRuby r112 is out This is the release that we used to run the Rails functional test this afternoon. ? I had to modify two files in Rails to work around some missing functionality in IronRuby today. I?ve attached these files to this mail. They are: ? activesupport\lib\active_support\inflector.rb railties\lib\initializer.rb ? There were three reasons to make these changes. ? 1)????? In inflector.rb, we have a workaround around a missing feature in String#gsub (replacement via \1 and \2) 2)????? In initializer.rb, we have a workaround around a missing feature in Dir#glob (we don?t handle [_a-z] correctly) 3)????? In initializer.rb, we?re commenting out the call to initialize_database since we don?t have our .NET ActiveRecord adapter working yet (it?s in progress). ? I?ve attached these two files to this mail if you want to try it out yourself. Note that when creating the Rails app, I?ve also frozen the copy of rails via: ? rake rails:freeze:gems ? Note that there is a new svn\trunk\libs directory in this build. You?ll need to create an alias that uses the ?I command line switch to IronRuby to correctly include this path *AHEAD* of other paths (such as the path to your MRI installations? lib\ruby\1.8 and lib\site_ruby\1.8\ ? Here?s a sample ir.cmd file that we use internally. ? %MERLIN_ROOT%\bin\debug\ir.exe -I %MERLIN_ROOT%\..\External\Languages\Ruby\ruby-1.8.6\lib\ruby\1.8;%MERLIN_ROOT%\..\External\Languages\Ruby\ruby-1.8.6\lib\ruby\site_ruby\1.8;%MERLIN_ROOT%\Languages\Ruby\Libs %* ? Note that the new Ruby\Libs directory shows up at the end of the list (this is a bug in how we parse ?I). The order is important. ? Thanks, -John -------------- next part -------------- An HTML attachment was scrubbed... URL: From jflam at microsoft.com Sat May 24 01:18:44 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Fri, 23 May 2008 22:18:44 -0700 Subject: [Ironruby-core] IronRuby / Rails Question In-Reply-To: References: Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D9453290A@NA-EXMSG-C115.redmond.corp.microsoft.com> Josh Charles: > It looks like you're getting very close to getting rails to run on > IronRuby. What is the endgame for this? Is the goal to eventually be > able to run a rails app on IIS, so deployment is just as simple as > deploying an ASP.NET web application? I've been looking at several > different ways this could happen (especially if you can modify rails > to take advantage of some windoes / .net specific features), but would > like to get your thoughts on this. I don't think we're near the end game yet :) We're barely able to run Rails functional tests now, and there's a lot more library work to be done before we can start thinking about deployment etc. That said, this is something we would love to have folks in the community help us out with. Do you have any specific thoughts in mind? Thanks, -John From jflam at microsoft.com Sat May 24 13:30:51 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Sat, 24 May 2008 10:30:51 -0700 Subject: [Ironruby-core] Code Review: rails-6 Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D9453292B@NA-EXMSG-C115.redmond.corp.microsoft.com> tfpt review "/shelveset:rails-6;REDMOND\jflam" Two changes in this shelveset: - Implemented Kernel#loop - all specs pass. - Fixed implementation of IDictionaryOps#each* where we incorrectly used foreach() to iterate over a hash whose values could be mutated by code in the blocks. Thanks, -John -------------- next part -------------- A non-text attachment was scrubbed... Name: rails-6.diff Type: application/octet-stream Size: 25622 bytes Desc: rails-6.diff URL: From jflam at microsoft.com Sat May 24 16:47:03 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Sat, 24 May 2008 13:47:03 -0700 Subject: [Ironruby-core] IronRuby r112 is out In-Reply-To: <457872.92535.qm@web50609.mail.re2.yahoo.com> References: <457872.92535.qm@web50609.mail.re2.yahoo.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D9453294F@NA-EXMSG-C115.redmond.corp.microsoft.com> Thanks for sending in your patch - we really do appreciate the effort that you put into it! We're just in a big time crunch before RailsConf so we're pretty well implementing anything that we need to in order to get Rails to run. Did we implement all of the methods in your patch? Perhaps you could update and re-submit? Thanks, -John > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Unnikrishnan Nair > Sent: Friday, May 23, 2008 9:57 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] IronRuby r112 is out > > John, > > > > I saw 112 has FileOps implemented so please discard the patch I send > in earlier. Let me know if there are any other area you would like me > to help with? > > > > Thanks. > > > > ----- Original Message ---- > From: John Lam (IRONRUBY) > To: "ironruby-core at rubyforge.org" > Sent: Friday, May 23, 2008 8:56:29 PM > Subject: [Ironruby-core] IronRuby r112 is out > > > > This is the release that we used to run the Rails functional test this > afternoon. > > > > I had to modify two files in Rails to work around some missing > functionality in IronRuby today. I've attached these files to this > mail. > They are: > > > > activesupport\lib\active_support\inflector.rb > > railties\lib\initializer.rb > > > > There were three reasons to make these changes. > > > > 1) In inflector.rb, we have a workaround around a missing feature > in String#gsub (replacement via \1 and \2) > > 2) In initializer.rb, we have a workaround around a missing > feature > in Dir#glob (we don't handle [_a-z] correctly) > > 3) In initializer.rb, we're commenting out the call to > initialize_database since we don't have our .NET ActiveRecord adapter > working yet (it's in progress). > > > > I've attached these two files to this mail if you want to try it out > yourself. Note that when creating the Rails app, I've also frozen the > copy of rails via: > > > > rake rails:freeze:gems > > > > Note that there is a new svn\trunk\libs directory in this build. > You'll need to create an alias that uses the -I command line switch to > IronRuby to correctly include this path *AHEAD* of other paths (such > as the path to your MRI installations' lib\ruby\1.8 and > lib\site_ruby\1.8\ > > > > Here's a sample ir.cmd file that we use internally. > > > > %MERLIN_ROOT%\bin\debug\ir.exe -I > %MERLIN_ROOT%\..\External\Languages\Ruby\ruby- > 1.8.6\lib\ruby\1.8;%MERLIN > _ROOT%\..\External\Languages\Ruby\ruby- > 1.8.6\lib\ruby\site_ruby\1.8;%MER > LIN_ROOT%\Languages\Ruby\Libs %* > > > > Note that the new Ruby\Libs directory shows up at the end of the list > (this is a bug in how we parse -I). The order is important. > > > > Thanks, > > -John > > From Tomas.Matousek at microsoft.com Sat May 24 19:18:59 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Sat, 24 May 2008 16:18:59 -0700 Subject: [Ironruby-core] Code Review: WEBrick Message-ID: tfpt review "/shelveset:WEBrick;REDMOND\tomat" Implements IO.select, String#to_f, Thread#kill, Thread#start, Thread#inspect, fixes TCPServer, File::Constants, and some other minor fixes. Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: WEBrick.diff Type: application/octet-stream Size: 109839 bytes Desc: WEBrick.diff URL: From Tomas.Matousek at microsoft.com Sat May 24 21:51:36 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Sat, 24 May 2008 18:51:36 -0700 Subject: [Ironruby-core] Code Review: RangeFixes Message-ID: tfpt review "/shelveset:RangeFixes;REDMOND\tomat" Refactors Array#[] and fixes MatchData#[] and Strign#to_i. Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: RangeFixes.diff Type: application/octet-stream Size: 8171 bytes Desc: RangeFixes.diff URL: From Tomas.Matousek at microsoft.com Sat May 24 23:17:36 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Sat, 24 May 2008 20:17:36 -0700 Subject: [Ironruby-core] Code Review: RegexGroupValues Message-ID: tfpt review "/shelveset:RegexGroupValues;REDMOND\tomat" Fixes group values - should be nil not an empty string on unsuccessful match. Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: RegexGroupValues.diff Type: application/octet-stream Size: 9694 bytes Desc: RegexGroupValues.diff URL: From Tomas.Matousek at microsoft.com Sat May 24 23:43:11 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Sat, 24 May 2008 20:43:11 -0700 Subject: [Ironruby-core] Code Review: Time Message-ID: tfpt review "/shelveset:Time;REDMOND\tomat" Implements missing methods of Time class. Quick fixes hash code calculation for binary data. Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: Time.diff Type: application/octet-stream Size: 49353 bytes Desc: Time.diff URL: From bacondarwin at googlemail.com Sun May 25 08:25:35 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Sun, 25 May 2008 13:25:35 +0100 Subject: [Ironruby-core] Code Review: WEBrick In-Reply-To: References: Message-ID: <000001c8be62$707de370$5179aa50$@com> Hi Tomas, What happens if someone calls TCPServer.Accept() without calling TCPServer#CreateReadWaitHandle() first? [The new implementation of Accept method needs a WaitHandle to have been created. It seems that the only time this occurs is when RubyIO.Select() is called.] Pete -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek Sent: Sunday,25 May 25, 2008 00:19 To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: [Ironruby-core] Code Review: WEBrick tfpt review "/shelveset:WEBrick;REDMOND\tomat" Implements IO.select, String#to_f, Thread#kill, Thread#start, Thread#inspect, fixes TCPServer, File::Constants, and some other minor fixes. Tomas From Tomas.Matousek at microsoft.com Sun May 25 12:28:28 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Sun, 25 May 2008 09:28:28 -0700 Subject: [Ironruby-core] Code Review: WEBrick In-Reply-To: <000001c8be62$707de370$5179aa50$@com> References: <000001c8be62$707de370$5179aa50$@com> Message-ID: I forgot to check the result, will fix that. Thanks for finding this. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Peter Bacon Darwin Sent: Sunday, May 25, 2008 5:26 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review: WEBrick Hi Tomas, What happens if someone calls TCPServer.Accept() without calling TCPServer#CreateReadWaitHandle() first? [The new implementation of Accept method needs a WaitHandle to have been created. It seems that the only time this occurs is when RubyIO.Select() is called.] Pete -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek Sent: Sunday,25 May 25, 2008 00:19 To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: [Ironruby-core] Code Review: WEBrick tfpt review "/shelveset:WEBrick;REDMOND\tomat" Implements IO.select, String#to_f, Thread#kill, Thread#start, Thread#inspect, fixes TCPServer, File::Constants, and some other minor fixes. Tomas _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From ben2004uk at googlemail.com Sun May 25 16:09:41 2008 From: ben2004uk at googlemail.com (Ben Hall) Date: Sun, 25 May 2008 21:09:41 +0100 Subject: [Ironruby-core] IronRuby Binaries and Known DLR build Message-ID: Hello, Scenario. I want to host the DLR within my application, as such I reference MS.Scripting and MS.Scripting.Core. I can then happily reference IP2 because it was compiled against the same version. However, the same can't be said for IronRuby. Because there aren't any binaries available to download (Unless I am mistaken, I read they were going to be added to the repos but I couldn't them) and because you are building from the DLR source instead of known releases it looks like i'm going to need two copies of the DLR assemblies within my application. An example of where this is a problem, TokenizerService is within the DLR for IronRuby but not for IronPython. At some point, I take it the DLR will merge into a single release and known assembly for other language providers and hosts to use instead of multiple different versions? Thanks Ben Blog.BenHall.me.uk From Tomas.Matousek at microsoft.com Sun May 25 16:12:25 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Sun, 25 May 2008 13:12:25 -0700 Subject: [Ironruby-core] Code Review: Regex2 Message-ID: tfpt review "/shelveset:Regex2;REDMOND\tomat" Implements regex pattern rewriter: some escape sequences that are valid in Ruby are not valid in .NET regex and need to fixed in the pattern. Rough implementation of Regexp::union, will finish it next checkin. Fixes bugs: [ ironruby-Bugs-20205 ] Regexp - unexpected escape sequence \_ [ ironruby-Bugs-20275 ] raise vararg overloads not implemented Fixes TCPServer to allow accept w/o previous select. Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: Regex2.diff Type: application/octet-stream Size: 40727 bytes Desc: Regex2.diff URL: From Tomas.Matousek at microsoft.com Sun May 25 17:35:06 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Sun, 25 May 2008 14:35:06 -0700 Subject: [Ironruby-core] Code Review: regex3 Message-ID: tfpt review "/shelveset:regex3;REDMOND\tomat" Improves Regexp#union, implements Regexp#eql?, Regexp#==, Regexp#hash. Fixes Regexp#escape to match MRI. Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: regex3.diff Type: application/octet-stream Size: 21127 bytes Desc: regex3.diff URL: From jdeville at microsoft.com Sun May 25 17:51:21 2008 From: jdeville at microsoft.com (Jim Deville) Date: Sun, 25 May 2008 14:51:21 -0700 Subject: [Ironruby-core] IronRuby Binaries and Known DLR build In-Reply-To: References: Message-ID: We don't currently host binaries, in part because it hasn't been set up, and in part because IR is such a fast moving target right now. After RailsConf we can figure out what and where to host some stuff. Jim Deville ________________________________________ From: ironruby-core-bounces at rubyforge.org [ironruby-core-bounces at rubyforge.org] On Behalf Of Ben Hall [ben2004uk at googlemail.com] Sent: Sunday, May 25, 2008 1:09 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] IronRuby Binaries and Known DLR build Hello, Scenario. I want to host the DLR within my application, as such I reference MS.Scripting and MS.Scripting.Core. I can then happily reference IP2 because it was compiled against the same version. However, the same can't be said for IronRuby. Because there aren't any binaries available to download (Unless I am mistaken, I read they were going to be added to the repos but I couldn't them) and because you are building from the DLR source instead of known releases it looks like i'm going to need two copies of the DLR assemblies within my application. An example of where this is a problem, TokenizerService is within the DLR for IronRuby but not for IronPython. At some point, I take it the DLR will merge into a single release and known assembly for other language providers and hosts to use instead of multiple different versions? Thanks Ben Blog.BenHall.me.uk _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From bacondarwin at googlemail.com Mon May 26 05:54:14 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Mon, 26 May 2008 10:54:14 +0100 Subject: [Ironruby-core] Code Review: WEBrick In-Reply-To: References: <000001c8be62$707de370$5179aa50$@com> Message-ID: <000c01c8bf16$7bf1a980$73d4fc80$@com> Hi Tomas, I noticed in the diff for BasicSocket.cs that you added a TODO comment, saying that static variables cannot be used (the variable in question was: private static bool _doNotReverseLookup;). I had wondered about this and was not sure how to handle it. Should I have registered a singleton variable instead? What is actually the problem with using a static value? Is it that the sharing of singleton variables has different thread semantics to .NET static variables? Cheers, Pete From Tomas.Matousek at microsoft.com Mon May 26 13:02:01 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Mon, 26 May 2008 10:02:01 -0700 Subject: [Ironruby-core] Code Review: WEBrick In-Reply-To: <000c01c8bf16$7bf1a980$73d4fc80$@com> References: <000001c8be62$707de370$5179aa50$@com> <000c01c8bf16$7bf1a980$73d4fc80$@com> Message-ID: We need to run multiple isolated IronRuby engines in the same app-domain. Entire state that the runtime and libraries need should be per RubyExecutionContext, which can be retrieved by calling RubyUtils.GetExecutionContext(CodeContext) in library methods. Currently you need to create e.g. a hash from RubyExecutionContext -> data that would be thread safe and static. We'll probably make it easier for libraries and will provide a hash on RubyExecutionContext where you can put stuff. You don't need to change it now, you can wait for the hash to be available. Correct functionality of the socket library and tests are more important now. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Peter Bacon Darwin Sent: Monday, May 26, 2008 2:54 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review: WEBrick Hi Tomas, I noticed in the diff for BasicSocket.cs that you added a TODO comment, saying that static variables cannot be used (the variable in question was: private static bool _doNotReverseLookup;). I had wondered about this and was not sure how to handle it. Should I have registered a singleton variable instead? What is actually the problem with using a static value? Is it that the sharing of singleton variables has different thread semantics to .NET static variables? Cheers, Pete _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From mental at rydia.net Mon May 26 13:45:57 2008 From: mental at rydia.net (MenTaLguY) Date: Mon, 26 May 2008 13:45:57 -0400 Subject: [Ironruby-core] Code Review: ThreadLib In-Reply-To: References: Message-ID: <1211823957.18895.41.camel@localhost> On Thu, 2008-05-15 at 21:03 -0700, Tomas Matousek wrote: > - it could be locked/unlocked from non-owning thread (.NET Monitor > throws an exception in that case) Don't worry about supporting that case. Most of the people who abused Mutex by trying to use it like a semaphore have been weeded out since I modified fastthread to raise an exception for unlocks by non-owners. (I believe the latest 1.8.6 patchlevels also throw an exception, if you're using the C Mutex implementation which is based on fastthread.) -mental -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From jflam at microsoft.com Mon May 26 20:08:38 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Mon, 26 May 2008 17:08:38 -0700 Subject: [Ironruby-core] Code Review: rails-12 Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D94532AEB@NA-EXMSG-C115.redmond.corp.microsoft.com> tfpt review "/shelveset:rails-12;REDMOND\jflam" - Adds an implementation of Kernel#rand. Passes all specs - Fixes bug where you are matching a regex against a nil (both #match and #=~) - Fixes glob for matching directory names (paths that end with / are assumed to refer to dirs and not files) - Fixes bug in constructing Digest objects in OpenSSL Thanks, -John -------------- next part -------------- A non-text attachment was scrubbed... Name: rails-12.diff Type: application/octet-stream Size: 15938 bytes Desc: rails-12.diff URL: From Tomas.Matousek at microsoft.com Tue May 27 00:08:35 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Mon, 26 May 2008 21:08:35 -0700 Subject: [Ironruby-core] Code Review: rails-12 In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D94532AEB@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <372109E149E8084D8E6C7D9CFD82E0632D94532AEB@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: Looks good. The final "rand" implementation would need to use a "srand"-seeded generator associated with RubyExecutionContext though. Tomas -----Original Message----- From: John Lam (IRONRUBY) Sent: Monday, May 26, 2008 5:09 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: rails-12 tfpt review "/shelveset:rails-12;REDMOND\jflam" - Adds an implementation of Kernel#rand. Passes all specs - Fixes bug where you are matching a regex against a nil (both #match and #=~) - Fixes glob for matching directory names (paths that end with / are assumed to refer to dirs and not files) - Fixes bug in constructing Digest objects in OpenSSL Thanks, -John From Tomas.Matousek at microsoft.com Tue May 27 03:18:58 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 27 May 2008 00:18:58 -0700 Subject: [Ironruby-core] Code Review: PackInteger Message-ID: tfpt review "/shelveset:PackInteger;REDMOND\tomat" Implements integer packing directives. Tomas From Tomas.Matousek at microsoft.com Tue May 27 03:20:37 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 27 May 2008 00:20:37 -0700 Subject: [Ironruby-core] Code Review: PackIntegers Message-ID: tfpt review "/shelveset:PackIntegers;REDMOND\tomat" Implements integer packing directives. (Typo in shelveset name in the previous email.) Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: PackIntegers.diff Type: application/octet-stream Size: 12234 bytes Desc: PackIntegers.diff URL: From bacondarwin at googlemail.com Tue May 27 05:25:23 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Tue, 27 May 2008 10:25:23 +0100 Subject: [Ironruby-core] Code Review: WEBrick In-Reply-To: References: <000001c8be62$707de370$5179aa50$@com> <000c01c8bf16$7bf1a980$73d4fc80$@com> Message-ID: <001201c8bfdb$9bc4fb20$d34ef160$@com> So what you are saying is the RubyExecutionContext in between threads and AppDomains when it comes to scope? We can't use statics because they are scoped to AppDomains and there may be more than one RubyExecutionContext in a single AppDomain. We can't use [ThreadStatic] attributes on our statics, to limit their scope to a single Thread, because there can be multiple threads in a RubyExecutionContext and we need the static value to be shared amongst all the threads in the RubyExecutionContext. Is that right? Pete -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek Sent: Monday,26 May 26, 2008 18:02 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review: WEBrick We need to run multiple isolated IronRuby engines in the same app-domain. Entire state that the runtime and libraries need should be per RubyExecutionContext, which can be retrieved by calling RubyUtils.GetExecutionContext(CodeContext) in library methods. Currently you need to create e.g. a hash from RubyExecutionContext -> data that would be thread safe and static. We'll probably make it easier for libraries and will provide a hash on RubyExecutionContext where you can put stuff. You don't need to change it now, you can wait for the hash to be available. Correct functionality of the socket library and tests are more important now. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Peter Bacon Darwin Sent: Monday, May 26, 2008 2:54 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review: WEBrick Hi Tomas, I noticed in the diff for BasicSocket.cs that you added a TODO comment, saying that static variables cannot be used (the variable in question was: private static bool _doNotReverseLookup;). I had wondered about this and was not sure how to handle it. Should I have registered a singleton variable instead? What is actually the problem with using a static value? Is it that the sharing of singleton variables has different thread semantics to .NET static variables? Cheers, Pete _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From Tomas.Matousek at microsoft.com Tue May 27 12:22:12 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 27 May 2008 09:22:12 -0700 Subject: [Ironruby-core] Code Review: WEBrick In-Reply-To: <001201c8bfdb$9bc4fb20$d34ef160$@com> References: <000001c8be62$707de370$5179aa50$@com> <000c01c8bf16$7bf1a980$73d4fc80$@com> <001201c8bfdb$9bc4fb20$d34ef160$@com> Message-ID: Yes. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Peter Bacon Darwin Sent: Tuesday, May 27, 2008 2:25 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review: WEBrick So what you are saying is the RubyExecutionContext in between threads and AppDomains when it comes to scope? We can't use statics because they are scoped to AppDomains and there may be more than one RubyExecutionContext in a single AppDomain. We can't use [ThreadStatic] attributes on our statics, to limit their scope to a single Thread, because there can be multiple threads in a RubyExecutionContext and we need the static value to be shared amongst all the threads in the RubyExecutionContext. Is that right? Pete -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek Sent: Monday,26 May 26, 2008 18:02 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review: WEBrick We need to run multiple isolated IronRuby engines in the same app-domain. Entire state that the runtime and libraries need should be per RubyExecutionContext, which can be retrieved by calling RubyUtils.GetExecutionContext(CodeContext) in library methods. Currently you need to create e.g. a hash from RubyExecutionContext -> data that would be thread safe and static. We'll probably make it easier for libraries and will provide a hash on RubyExecutionContext where you can put stuff. You don't need to change it now, you can wait for the hash to be available. Correct functionality of the socket library and tests are more important now. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Peter Bacon Darwin Sent: Monday, May 26, 2008 2:54 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review: WEBrick Hi Tomas, I noticed in the diff for BasicSocket.cs that you added a TODO comment, saying that static variables cannot be used (the variable in question was: private static bool _doNotReverseLookup;). I had wondered about this and was not sure how to handle it. Should I have registered a singleton variable instead? What is actually the problem with using a static value? Is it that the sharing of singleton variables has different thread semantics to .NET static variables? Cheers, Pete _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From curth at microsoft.com Tue May 27 18:03:28 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Tue, 27 May 2008 15:03:28 -0700 Subject: [Ironruby-core] Code Review: RubyGlob Message-ID: tfpt review "/shelveset:RubyGlob;REDMOND\curth" Complete(?) implementation of Dir.glob. Passes all the pertinent specs. -- Curt Hagenlocher curth at microsoft.com -------------- next part -------------- A non-text attachment was scrubbed... Name: RubyGlob.diff Type: application/octet-stream Size: 11790 bytes Desc: RubyGlob.diff URL: From Tomas.Matousek at microsoft.com Tue May 27 21:36:23 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 27 May 2008 18:36:23 -0700 Subject: [Ironruby-core] Code Review: Regex6 Message-ID: tfpt review "/shelveset:Regex6;REDMOND\tomat" Regexp fixes: - Implements Regexp.initialize - Fixes Regexp.new and compile signatures. - Regexp.new does no escaping, it just takes whatever string is given and makes up Regexp - Regexp.to_s returns "(?{enabled-options}-{disabled-options}:{pattern-with-forward-slash-escaped})" - Regexp.inspect returs "/{pattern-with-forward-slash-escaped}/" - Regexp.union does Regexp.escape (w/o calling it) on given strings (and objects converted using to_str ) and does Regexp.to_s (w/o calling it) on given regexes, concatenates all results using | as separator and calls Regexp.new(, nil, nil) on the result. Fixes escaping of strings (String#inspect). Fixes chr, IO.write to honor current encoding. Makes ConsoleStreams host-redirectable. Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: Regex6.diff Type: application/octet-stream Size: 62071 bytes Desc: Regex6.diff URL: From curth at microsoft.com Tue May 27 21:51:41 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Tue, 27 May 2008 18:51:41 -0700 Subject: [Ironruby-core] Code Review: RubyMarshalFix2 Message-ID: tfpt review "/shelveset:RubyMarshalFix2;REDMOND\curth" Fixed Marshal.load to work correctly with user-defined types not scoped to the global namespace -- Curt Hagenlocher curth at microsoft.com -------------- next part -------------- A non-text attachment was scrubbed... Name: RubyMarshalFix2.diff Type: application/octet-stream Size: 3193 bytes Desc: RubyMarshalFix2.diff URL: From Tomas.Matousek at microsoft.com Tue May 27 22:12:02 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 27 May 2008 19:12:02 -0700 Subject: [Ironruby-core] Code Review: RubyMarshalFix2 In-Reply-To: References: Message-ID: Looks good. Tomas -----Original Message----- From: Curt Hagenlocher Sent: Tuesday, May 27, 2008 6:52 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: RubyMarshalFix2 tfpt review "/shelveset:RubyMarshalFix2;REDMOND\curth" Fixed Marshal.load to work correctly with user-defined types not scoped to the global namespace -- Curt Hagenlocher curth at microsoft.com From Tomas.Matousek at microsoft.com Wed May 28 01:21:20 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 27 May 2008 22:21:20 -0700 Subject: [Ironruby-core] Code Review: GeneriTypes Message-ID: tfpt review "/shelveset:GeneriTypes;REDMOND\tomat" Fixes bug #15060 - it wasn't possible to access a generic type if a non-generic one of the same name was in the same namespace. Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: GeneriTypes.diff Type: application/octet-stream Size: 36515 bytes Desc: GeneriTypes.diff URL: From curth at microsoft.com Wed May 28 11:43:22 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Wed, 28 May 2008 08:43:22 -0700 Subject: [Ironruby-core] Code Review: FastFixes1 Message-ID: tfpt review "/shelveset:FastFixes1;REDMOND\curth" Fixed critical error in Dir.glob Added File.split Added stub for BigDecimal class -- Curt Hagenlocher curth at microsoft.com -------------- next part -------------- A non-text attachment was scrubbed... Name: FastFixes1.diff Type: application/octet-stream Size: 19690 bytes Desc: FastFixes1.diff URL: From jflam at microsoft.com Wed May 28 12:04:08 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Wed, 28 May 2008 09:04:08 -0700 Subject: [Ironruby-core] Code Review: FastFixes1 In-Reply-To: References: Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D956B8C2B@NA-EXMSG-C115.redmond.corp.microsoft.com> Missing a few method return bangs in BigDecimalOps.cs I guess you're going to implement Kernel#BigDecimal eventually ... Otherwise looks good! Thanks, -John -----Original Message----- From: Curt Hagenlocher Sent: Wednesday, May 28, 2008 8:43 AM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: FastFixes1 tfpt review "/shelveset:FastFixes1;REDMOND\curth" Fixed critical error in Dir.glob Added File.split Added stub for BigDecimal class -- Curt Hagenlocher curth at microsoft.com From Tomas.Matousek at microsoft.com Wed May 28 14:38:09 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Wed, 28 May 2008 11:38:09 -0700 Subject: [Ironruby-core] Code Review: Kernel Message-ID: tfpt review "/shelveset:Kernel;REDMOND\tomat" Defines Kernel type stub in Core and renames Kernel type in libraries to KernelOps. This way, the Kernel module could be identified in both Core and libraries by the Kernel type. Enables libraries to monkey-patch Kernel - the type wasn't stored in module cache and therefore wasn't available for monkey-patching from libraries. Also moves FlowTaint to RubyUtils. Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: Kernel.diff Type: application/octet-stream Size: 169100 bytes Desc: Kernel.diff URL: From Tomas.Matousek at microsoft.com Wed May 28 20:19:07 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Wed, 28 May 2008 17:19:07 -0700 Subject: [Ironruby-core] Code Review: Trace Message-ID: tfpt review "/shelveset:Trace;REDMOND\tomat" Basic implementation of Kernel#set_trace_func that allows to trace Ruby method calls. Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: Trace.diff Type: application/octet-stream Size: 16100 bytes Desc: Trace.diff URL: From curth at microsoft.com Wed May 28 20:32:17 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Wed, 28 May 2008 17:32:17 -0700 Subject: [Ironruby-core] Code Review: YamlChanges1 Message-ID: tfpt review "/shelveset:YamlChanges1;REDMOND\curth" Make YAML use RubyArray, Hash and MutableString instead of CLR native types. -- Curt Hagenlocher curth at microsoft.com From curth at microsoft.com Wed May 28 20:36:37 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Wed, 28 May 2008 17:36:37 -0700 Subject: [Ironruby-core] Code Review: YamlChanges1 In-Reply-To: References: Message-ID: Sorry... I have no idea why that diff turned up empty, but I don't seem to be able to generate a correct one right now :(. -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Curt Hagenlocher Sent: Wednesday, May 28, 2008 5:32 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: [Ironruby-core] Code Review: YamlChanges1 tfpt review "/shelveset:YamlChanges1;REDMOND\curth" Make YAML use RubyArray, Hash and MutableString instead of CLR native types. -- Curt Hagenlocher curth at microsoft.com From bacondarwin at googlemail.com Thu May 29 16:21:36 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Thu, 29 May 2008 21:21:36 +0100 Subject: [Ironruby-core] Code Review: FastFixes1 In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D956B8C2B@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <372109E149E8084D8E6C7D9CFD82E0632D956B8C2B@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <001501c8c1c9$9a4d3ec0$cee7bc40$@com> This bit doesn't work: + [RubyModule(Extends = typeof(Kernel))] + public static class KernelOps { + [RubyMethod("BigDecimal", RubyMethodAttributes.PrivateInstance)] + [RubyMethod("BigDecimal", RubyMethodAttributes.PublicSingleton)] + public static object CreateBigDecimal(CodeContext/*!*/ context, object self, [NotNull]MutableString/*!*/ value) { + return BigDecimalOps.Create(context, value); + } + + [RubyMethod("BigDecimal", RubyMethodAttributes.PrivateInstance)] + [RubyMethod("BigDecimal", RubyMethodAttributes.PublicSingleton)] + public static object CreateBigDecimal(CodeContext/*!*/ context, object self, object value) { + return BigDecimalOps.Create(context, value); + } + } +} The initializer code builds up the methods nicely but the "Kernel" module is not in RubyExecutionContext._moduleCache, so the methods don't get added to Kernel (but instead added to a Module called Ruby::Builtins::Kernel. Any help here? Cheers, Pete -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of John Lam (IRONRUBY) Sent: Wednesday,28 May 28, 2008 17:04 To: Curt Hagenlocher; IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review: FastFixes1 Missing a few method return bangs in BigDecimalOps.cs I guess you're going to implement Kernel#BigDecimal eventually ... Otherwise looks good! Thanks, -John -----Original Message----- From: Curt Hagenlocher Sent: Wednesday, May 28, 2008 8:43 AM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: FastFixes1 tfpt review "/shelveset:FastFixes1;REDMOND\curth" Fixed critical error in Dir.glob Added File.split Added stub for BigDecimal class -- Curt Hagenlocher curth at microsoft.com _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From curth at microsoft.com Thu May 29 16:31:40 2008 From: curth at microsoft.com (Curt Hagenlocher) Date: Thu, 29 May 2008 13:31:40 -0700 Subject: [Ironruby-core] Code Review: FastFixes1 In-Reply-To: <001501c8c1c9$9a4d3ec0$cee7bc40$@com> References: <372109E149E8084D8E6C7D9CFD82E0632D956B8C2B@NA-EXMSG-C115.redmond.corp.microsoft.com> <001501c8c1c9$9a4d3ec0$cee7bc40$@com> Message-ID: Tomas has already fixed that here :(. As you might imagine, our desire to astound and amaze the audience at RailsConf has led to some shortcuts getting taken with respect to the code reviews going out to this list. This will certainly not be the case post-conference once we start fixing the "community" part of this "community project". Disclaimer: by "astound and amaze" I mean "keep from getting laughed out of the room". -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Peter Bacon Darwin Sent: Thursday, May 29, 2008 1:22 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review: FastFixes1 This bit doesn't work: + [RubyModule(Extends = typeof(Kernel))] + public static class KernelOps { + [RubyMethod("BigDecimal", RubyMethodAttributes.PrivateInstance)] + [RubyMethod("BigDecimal", RubyMethodAttributes.PublicSingleton)] + public static object CreateBigDecimal(CodeContext/*!*/ context, object self, [NotNull]MutableString/*!*/ value) { + return BigDecimalOps.Create(context, value); + } + + [RubyMethod("BigDecimal", RubyMethodAttributes.PrivateInstance)] + [RubyMethod("BigDecimal", RubyMethodAttributes.PublicSingleton)] + public static object CreateBigDecimal(CodeContext/*!*/ context, object self, object value) { + return BigDecimalOps.Create(context, value); + } + } +} The initializer code builds up the methods nicely but the "Kernel" module is not in RubyExecutionContext._moduleCache, so the methods don't get added to Kernel (but instead added to a Module called Ruby::Builtins::Kernel. Any help here? Cheers, Pete -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of John Lam (IRONRUBY) Sent: Wednesday,28 May 28, 2008 17:04 To: Curt Hagenlocher; IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review: FastFixes1 Missing a few method return bangs in BigDecimalOps.cs I guess you're going to implement Kernel#BigDecimal eventually ... Otherwise looks good! Thanks, -John -----Original Message----- From: Curt Hagenlocher Sent: Wednesday, May 28, 2008 8:43 AM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: FastFixes1 tfpt review "/shelveset:FastFixes1;REDMOND\curth" Fixed critical error in Dir.glob Added File.split Added stub for BigDecimal class -- Curt Hagenlocher curth at microsoft.com _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From bacondarwin at googlemail.com Thu May 29 16:53:00 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Thu, 29 May 2008 21:53:00 +0100 Subject: [Ironruby-core] Code Review: FastFixes1 In-Reply-To: References: <372109E149E8084D8E6C7D9CFD82E0632D956B8C2B@NA-EXMSG-C115.redmond.corp.microsoft.com> <001501c8c1c9$9a4d3ec0$cee7bc40$@com> Message-ID: <001601c8c1cd$fc3a8850$f4af98f0$@com> Great! No problem. (I appreciate that this is not a big deal at the moment but I thought I was missing something.) I am continually "astounded and amazed". Keep up the hard work. These code reviews, if nothing else, really give us a feeling that there is loads of graft going on. Hopefully that will keep some of the moaners off your back... Ta Pete -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Curt Hagenlocher Sent: Thursday,29 May 29, 2008 21:32 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review: FastFixes1 Tomas has already fixed that here :(. As you might imagine, our desire to astound and amaze the audience at RailsConf has led to some shortcuts getting taken with respect to the code reviews going out to this list. This will certainly not be the case post-conference once we start fixing the "community" part of this "community project". Disclaimer: by "astound and amaze" I mean "keep from getting laughed out of the room". -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Peter Bacon Darwin Sent: Thursday, May 29, 2008 1:22 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review: FastFixes1 This bit doesn't work: + [RubyModule(Extends = typeof(Kernel))] + public static class KernelOps { + [RubyMethod("BigDecimal", RubyMethodAttributes.PrivateInstance)] + [RubyMethod("BigDecimal", RubyMethodAttributes.PublicSingleton)] + public static object CreateBigDecimal(CodeContext/*!*/ context, object self, [NotNull]MutableString/*!*/ value) { + return BigDecimalOps.Create(context, value); + } + + [RubyMethod("BigDecimal", RubyMethodAttributes.PrivateInstance)] + [RubyMethod("BigDecimal", RubyMethodAttributes.PublicSingleton)] + public static object CreateBigDecimal(CodeContext/*!*/ context, object self, object value) { + return BigDecimalOps.Create(context, value); + } + } +} The initializer code builds up the methods nicely but the "Kernel" module is not in RubyExecutionContext._moduleCache, so the methods don't get added to Kernel (but instead added to a Module called Ruby::Builtins::Kernel. Any help here? Cheers, Pete -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of John Lam (IRONRUBY) Sent: Wednesday,28 May 28, 2008 17:04 To: Curt Hagenlocher; IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review: FastFixes1 Missing a few method return bangs in BigDecimalOps.cs I guess you're going to implement Kernel#BigDecimal eventually ... Otherwise looks good! Thanks, -John -----Original Message----- From: Curt Hagenlocher Sent: Wednesday, May 28, 2008 8:43 AM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: FastFixes1 tfpt review "/shelveset:FastFixes1;REDMOND\curth" Fixed critical error in Dir.glob Added File.split Added stub for BigDecimal class -- Curt Hagenlocher curth at microsoft.com _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From jdeville at microsoft.com Thu May 29 17:47:09 2008 From: jdeville at microsoft.com (Jim Deville) Date: Thu, 29 May 2008 14:47:09 -0700 Subject: [Ironruby-core] Code Review: FastFixes1 In-Reply-To: <001601c8c1cd$fc3a8850$f4af98f0$@com> References: <372109E149E8084D8E6C7D9CFD82E0632D956B8C2B@NA-EXMSG-C115.redmond.corp.microsoft.com> <001501c8c1c9$9a4d3ec0$cee7bc40$@com> <001601c8c1cd$fc3a8850$f4af98f0$@com> Message-ID: Hopefully after RailsConf (this weekend) and TechEd (next week). We can do some work on automating the repository syncing, and setting up a binary drop. We'll have to discuss some of those details at that time. JD -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Peter Bacon Darwin Sent: Thursday, May 29, 2008 1:53 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review: FastFixes1 Great! No problem. (I appreciate that this is not a big deal at the moment but I thought I was missing something.) I am continually "astounded and amazed". Keep up the hard work. These code reviews, if nothing else, really give us a feeling that there is loads of graft going on. Hopefully that will keep some of the moaners off your back... Ta Pete -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Curt Hagenlocher Sent: Thursday,29 May 29, 2008 21:32 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review: FastFixes1 Tomas has already fixed that here :(. As you might imagine, our desire to astound and amaze the audience at RailsConf has led to some shortcuts getting taken with respect to the code reviews going out to this list. This will certainly not be the case post-conference once we start fixing the "community" part of this "community project". Disclaimer: by "astound and amaze" I mean "keep from getting laughed out of the room". -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Peter Bacon Darwin Sent: Thursday, May 29, 2008 1:22 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review: FastFixes1 This bit doesn't work: + [RubyModule(Extends = typeof(Kernel))] + public static class KernelOps { + [RubyMethod("BigDecimal", RubyMethodAttributes.PrivateInstance)] + [RubyMethod("BigDecimal", RubyMethodAttributes.PublicSingleton)] + public static object CreateBigDecimal(CodeContext/*!*/ context, object self, [NotNull]MutableString/*!*/ value) { + return BigDecimalOps.Create(context, value); + } + + [RubyMethod("BigDecimal", RubyMethodAttributes.PrivateInstance)] + [RubyMethod("BigDecimal", RubyMethodAttributes.PublicSingleton)] + public static object CreateBigDecimal(CodeContext/*!*/ context, object self, object value) { + return BigDecimalOps.Create(context, value); + } + } +} The initializer code builds up the methods nicely but the "Kernel" module is not in RubyExecutionContext._moduleCache, so the methods don't get added to Kernel (but instead added to a Module called Ruby::Builtins::Kernel. Any help here? Cheers, Pete -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of John Lam (IRONRUBY) Sent: Wednesday,28 May 28, 2008 17:04 To: Curt Hagenlocher; IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Code Review: FastFixes1 Missing a few method return bangs in BigDecimalOps.cs I guess you're going to implement Kernel#BigDecimal eventually ... Otherwise looks good! Thanks, -John -----Original Message----- From: Curt Hagenlocher Sent: Wednesday, May 28, 2008 8:43 AM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: FastFixes1 tfpt review "/shelveset:FastFixes1;REDMOND\curth" Fixed critical error in Dir.glob Added File.split Added stub for BigDecimal class -- Curt Hagenlocher curth at microsoft.com _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From jflam at microsoft.com Fri May 30 09:03:29 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Fri, 30 May 2008 06:03:29 -0700 Subject: [Ironruby-core] Just announced that we're running unmodified Rails on my blog Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D956B9942@NA-EXMSG-C115.redmond.corp.microsoft.com> http://www.iunknown.com/2008/05/ironruby-and-rails.html Thanks all for your help and support of IronRuby! -John -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.letterle at gmail.com Fri May 30 09:14:19 2008 From: michael.letterle at gmail.com (Michael Letterle) Date: Fri, 30 May 2008 09:14:19 -0400 Subject: [Ironruby-core] Just announced that we're running unmodified Rails on my blog In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D956B9942@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <372109E149E8084D8E6C7D9CFD82E0632D956B9942@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: Sweet googly moogly.... when we getting our hands on that there code? :) On Fri, May 30, 2008 at 9:03 AM, John Lam (IRONRUBY) wrote: > http://www.iunknown.com/2008/05/ironruby-and-rails.html > > > > Thanks all for your help and support of IronRuby! > > -John > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -- Michael Letterle [Polymath Prokrammer] http://blog.prokrams.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jflam at microsoft.com Fri May 30 09:18:52 2008 From: jflam at microsoft.com (John Lam (IRONRUBY)) Date: Fri, 30 May 2008 06:18:52 -0700 Subject: [Ironruby-core] Just announced that we're running unmodified Rails on my blog In-Reply-To: References: <372109E149E8084D8E6C7D9CFD82E0632D956B9942@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D956B9952@NA-EXMSG-C115.redmond.corp.microsoft.com> What we have here is a frankenbuild with code literally transferred using USB keys, typed in from emails etc since we couldn't get access to our VPN last night. It's going to take some cleanup, but after our talk it will be a high priority to make a shelveset from what's on my computer and check it in. Thanks, -John From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Michael Letterle Sent: Friday, May 30, 2008 6:14 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Just announced that we're running unmodified Rails on my blog Sweet googly moogly.... when we getting our hands on that there code? :) On Fri, May 30, 2008 at 9:03 AM, John Lam (IRONRUBY) > wrote: http://www.iunknown.com/2008/05/ironruby-and-rails.html Thanks all for your help and support of IronRuby! -John _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -- Michael Letterle [Polymath Prokrammer] http://blog.prokrams.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.letterle at gmail.com Fri May 30 09:22:25 2008 From: michael.letterle at gmail.com (Michael Letterle) Date: Fri, 30 May 2008 09:22:25 -0400 Subject: [Ironruby-core] Just announced that we're running unmodified Rails on my blog In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D956B9952@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <372109E149E8084D8E6C7D9CFD82E0632D956B9942@NA-EXMSG-C115.redmond.corp.microsoft.com> <372109E149E8084D8E6C7D9CFD82E0632D956B9952@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: Wow, sounds like you guys had fun. Good luck with the session! Look forward to an influx of interested parties :) On Fri, May 30, 2008 at 9:18 AM, John Lam (IRONRUBY) wrote: > What we have here is a frankenbuild with code literally transferred using > USB keys, typed in from emails etc since we couldn't get access to our VPN > last night. It's going to take some cleanup, but after our talk it will be a > high priority to make a shelveset from what's on my computer and check it > in. > > > > Thanks, > > -John > > > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Michael Letterle > *Sent:* Friday, May 30, 2008 6:14 AM > *To:* ironruby-core at rubyforge.org > *Subject:* Re: [Ironruby-core] Just announced that we're running > unmodified Rails on my blog > > > > Sweet googly moogly.... when we getting our hands on that there code? :) > > On Fri, May 30, 2008 at 9:03 AM, John Lam (IRONRUBY) > wrote: > > http://www.iunknown.com/2008/05/ironruby-and-rails.html > > > > Thanks all for your help and support of IronRuby! > > -John > > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > > -- > Michael Letterle > [Polymath Prokrammer] > http://blog.prokrams.com > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -- Michael Letterle [Polymath Prokrammer] http://blog.prokrams.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From ksunair at yahoo.com Fri May 30 16:02:22 2008 From: ksunair at yahoo.com (Unnikrishnan Nair) Date: Fri, 30 May 2008 13:02:22 -0700 (PDT) Subject: [Ironruby-core] Just announced that we're running unmodified Rails on my blog In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D956B9942@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <554011.77879.qm@web50604.mail.re2.yahoo.com> Can't wait to play with it. Good luck on the presentation as well. Will you be posting the slides and demo code in your web site? Thanks. --- On Fri, 5/30/08, John Lam (IRONRUBY) <jflam at microsoft.com> wrote: From: John Lam (IRONRUBY) <jflam at microsoft.com> Subject: [Ironruby-core] Just announced that we're running unmodified Rails on my blog To: "ironruby-core at rubyforge.org" <ironruby-core at rubyforge.org> Date: Friday, May 30, 2008, 7:03 AM http://www.iunknown.com/2008/05/ironruby-and-rails.html   Thanks all for your help and support of IronRuby! -John  _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ruby-forum.com Sat May 31 00:19:19 2008 From: lists at ruby-forum.com (Web Reservoir) Date: Sat, 31 May 2008 06:19:19 +0200 Subject: [Ironruby-core] Just announced that we're running unmodified Rails on my In-Reply-To: <554011.77879.qm@web50604.mail.re2.yahoo.com> References: <372109E149E8084D8E6C7D9CFD82E0632D956B9942@NA-EXMSG-C115.redmond.corp.microsoft.com> <554011.77879.qm@web50604.mail.re2.yahoo.com> Message-ID: <8790b60d7519a1a0daff6b327ea8e162@ruby-forum.com> Hi, Best Wishes to IronRuby Team and OSS Community for their great contribution. Microsoft has proved that it supports Open Source, and finally all the rumors of Microsoft neglecting Ruby gets vanished. I can't wait for a day when I can deploy my Rails apps to IIS 7 and MS Sql 2008. That would be a great day of my life. Cheers. -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Sat May 31 04:15:10 2008 From: lists at ruby-forum.com (Softmind Technology) Date: Sat, 31 May 2008 10:15:10 +0200 Subject: [Ironruby-core] Just announced that we're running unmodified Rails on my In-Reply-To: <8790b60d7519a1a0daff6b327ea8e162@ruby-forum.com> References: <372109E149E8084D8E6C7D9CFD82E0632D956B9942@NA-EXMSG-C115.redmond.corp.microsoft.com> <554011.77879.qm@web50604.mail.re2.yahoo.com> <8790b60d7519a1a0daff6b327ea8e162@ruby-forum.com> Message-ID: Hi John Lam, Great News! Keep it going. How about blogging more about this, with Slides/Snaps from Rails Conference and a working solution for a trial. Things have moved much faster after Mix 2008 and now Rails is running at RailsConf. Since much is in order, except few things mentioned on your blog... What time frame do you plan do you think IronRuby 1.0 will be out ( RTM ) Thanks -- Posted via http://www.ruby-forum.com/. From m.david at xmlhacker.com Sat May 31 22:06:12 2008 From: m.david at xmlhacker.com (M. David Peterson) Date: Sat, 31 May 2008 20:06:12 -0600 Subject: [Ironruby-core] Just announced that we're running unmodified Rails on my blog In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D956B9942@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <372109E149E8084D8E6C7D9CFD82E0632D956B9942@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: On Fri, 30 May 2008 07:03:29 -0600, John Lam (IRONRUBY) wrote: > Thanks all for your help and support of IronRuby! Thank you, John! > "What IronRuby Running Rails *REALLY* Means and Why Miguel de Icaza Deserves The Credit" > http://www.oreillynet.com/xml/blog/2008/05/what_ironruby_running_rails_re.html -- /M:D M. David Peterson Co-Founder & Chief Architect, 3rd&Urban, LLC Email: m.david at 3rdandUrban.com | m.david at amp.fm Mobile: (206) 999-0588 http://3rdandUrban.com | http://amp.fm | http://www.oreillynet.com/pub/au/2354