From sanxiyn at gmail.com Thu Nov 1 06:06:10 2007 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Thu, 1 Nov 2007 19:06:10 +0900 Subject: [Ironruby-core] Catch and throw Message-ID: <5b0248170711010306m6a0e30f8i36e47985811222e6@mail.gmail.com> I did a quick implementation of Kernel#catch and Kernel#throw. http://sparcs.kaist.ac.kr/~tinuviel/download/IronRuby/patch-catch-throw Hopefully it is quick but not dirty. -- Seo Sanghyeon From sanxiyn at gmail.com Thu Nov 1 06:15:48 2007 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Thu, 1 Nov 2007 19:15:48 +0900 Subject: [Ironruby-core] Avoiding excessive newline diff in Initializer.Generated.cs Message-ID: <5b0248170711010315w3045175dk62c8c499613cf5f@mail.gmail.com> The goal of this one-line fix is to avoid excessive newline diff in Initializer.Generated.cs when one runs ClassInitGenerator on non-Windows platforms. http://sparcs.kaist.ac.kr/~tinuviel/download/IronRuby/patch-gen-newline Since the canonical newline character in the IronRuby repository is \r\n, it makes sense to explicitly use it when generating in-repository source file. -- Seo Sanghyeon From jflam at microsoft.com Fri Nov 2 01:35:14 2007 From: jflam at microsoft.com (John Lam (DLR)) Date: Thu, 1 Nov 2007 22:35:14 -0700 Subject: [Ironruby-core] IronRuby Visual Form Designer (preview) In-Reply-To: References: Message-ID: <372109E149E8084D8E6C7D9CFD82E06329DA49B5C3@NA-EXMSG-C115.redmond.corp.microsoft.com> Huw Collingbourne: > > I've just put online a short walkthrough demo of our form designer for > IronRuby. I thought people might be interested to take a look... > > http://www.sapphiresteel.com/IronRuby-Visual-Form-Designer > Hi Huw, This looks awesome! Can't wait to try it out. BTW, are you here at RubyConf this weekend? -John From lists at ruby-forum.com Fri Nov 2 06:20:04 2007 From: lists at ruby-forum.com (Huw Collingbourne) Date: Fri, 2 Nov 2007 11:20:04 +0100 Subject: [Ironruby-core] IronRuby Visual Form Designer (preview) In-Reply-To: <372109E149E8084D8E6C7D9CFD82E06329DA49B5C3@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <372109E149E8084D8E6C7D9CFD82E06329DA49B5C3@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <93061f6a2bf4c585e15ac004524c2689@ruby-forum.com> John Lam (DLR) wrote: > Huw Collingbourne: >> >> I've just put online a short walkthrough demo of our form designer for >> IronRuby. I thought people might be interested to take a look... >> >> http://www.sapphiresteel.com/IronRuby-Visual-Form-Designer >> > > Hi Huw, > > This looks awesome! Can't wait to try it out. BTW, are you here at > RubyConf this weekend? > I wish! Nope, I shall be sweating over a hot keyboard as usual, I'm afraid. That's the bad news. The good news is that we are now making good progress with our IronRuby support! If you can just get those delegate/event-handlers sorted out we'd be really happy :-) There also are one or two other issues that either you or we need to smooth out (e.g. we are having problems with a few properties such as docking). It's probably a bit too early to worry about those sorts of details but, a bit later on, perhaps we can get you a beta version and go through any thingss we need to do to smooth off any rough edges? best wishes Huw -- Posted via http://www.ruby-forum.com/. From jflam at microsoft.com Mon Nov 5 16:37:44 2007 From: jflam at microsoft.com (John Lam (DLR)) Date: Mon, 5 Nov 2007 13:37:44 -0800 Subject: [Ironruby-core] IronRuby Visual Form Designer (preview) In-Reply-To: <93061f6a2bf4c585e15ac004524c2689@ruby-forum.com> References: <372109E149E8084D8E6C7D9CFD82E06329DA49B5C3@NA-EXMSG-C115.redmond.corp.microsoft.com> <93061f6a2bf4c585e15ac004524c2689@ruby-forum.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E06329DA7DC6D0@NA-EXMSG-C115.redmond.corp.microsoft.com> Huw Collingbourne: > If you can just get those delegate/event-handlers sorted out we'd be > really happy :-) There also are one or two other issues that either you > or we need to smooth out (e.g. we are having problems with a few > properties such as docking). It's probably a bit too early to worry > about those sorts of details but, a bit later on, perhaps we can get > you > a beta version and go through any thingss we need to do to smooth off > any rough edges? Please feel free to send it along. We'll definitely see what we can do to help make it easier for you to integrate with us. Keep in mind though that the DLR hosting interfaces are still in flux, so it will likely be Jan before we finalize what those look like. Thanks! -John From jflam at microsoft.com Tue Nov 6 20:10:55 2007 From: jflam at microsoft.com (John Lam (DLR)) Date: Tue, 6 Nov 2007 17:10:55 -0800 Subject: [Ironruby-core] test - please ignore Message-ID: <372109E149E8084D8E6C7D9CFD82E06329DA7DCF60@NA-EXMSG-C115.redmond.corp.microsoft.com> Testing the list server. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20071106/dfdffa70/attachment-0001.html From sanxiyn at gmail.com Tue Nov 6 21:30:44 2007 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Wed, 7 Nov 2007 11:30:44 +0900 Subject: [Ironruby-core] IronRuby example codes for image processing Message-ID: <5b0248170711061830q3a596e46u25bd8c09ec916935@mail.gmail.com> I found these interesting example codes in IronRuby for image processing. http://d.hatena.ne.jp/arikui/20070918/1190050541 http://d.hatena.ne.jp/arikui/20071107/1194367856 Unfortunately, codes won't run out of the box because of name mangling differences. Above codes use mixedCase instead of lower_case_with_underscore. -- Seo Sanghyeon From miguel at ximian.com Wed Nov 7 16:47:04 2007 From: miguel at ximian.com (Miguel de Icaza) Date: Wed, 07 Nov 2007 16:47:04 -0500 Subject: [Ironruby-core] IronRuby and Dictionaries. In-Reply-To: <372109E149E8084D8E6C7D9CFD82E06329DA49BA42@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <372109E149E8084D8E6C7D9CFD82E06329DA49BA42@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <1194472024.23908.26.camel@erandi.boston.ximian.com> Hello John, First the simple problem: I have been investigating some of the failures in the IronRuby test suite while running on Mono. Some of the problems in the tests depend on the order that Dictionary<>'s GetEnumerator will return the data. But Dictionaries do not have any sorting order specified. The order of the results is implementation specific, and I bet they also depend on the number of elements in the Dictionary as well as the hashcodes of the elements for the order. A simple case of this problem is: module M C = 1 class D end end M.constants.each { |x| puts x } In this test, when you call M.constants.each sometimes we return D,C and sometimes we return C,D. If the order is important, maybe the code should switch to use SortedDictionary instead of using a plain Dictionary? The second problem is with Hash, some of the tests are failing on Mono, again because the code assumes that code will be returned in sorted order by the Dictionary, for example consider: >>> puts 'Q' => 'W', 'E' => 'R', 'T' => 'Y' In IronRuby/Mono this returns: TYERQW In IronRuby/.NET this return: QWERTY In Ruby this returns; QWERTY But Ruby and IronRuby seem to disagree on another simple example: >>> puts 'a' => 'A', 'A' => 'a' In IronRuby/.NET this return: aAAa In irb this returns: AaaA In IronRuby/Mono this returns: aAAa The change here is a bit elaborate than just changing class Hash to derive from SortedDictionary, it is also necessary to proxy this code to RubyOps not to the existing Equal method, but to a Compare method that can return an int to identify less, equal or bigger. miguel From leculver at microsoft.com Wed Nov 7 17:40:28 2007 From: leculver at microsoft.com (Lee Culver) Date: Wed, 7 Nov 2007 14:40:28 -0800 Subject: [Ironruby-core] Implementation plan and a string question... Message-ID: <6512F99DEFF77C418E6738CE6E12FD4E5BC5EBFA3B@NA-EXMSG-C105.redmond.corp.microsoft.com> I've been playing with IronRuby a bit today, and I notice that the reflection methods are not yet implemented (e.g. running "".methods in the interpreter does not produce the expected result). This is not surprising, given the early stages of development. Is there a plan in place as to which features currently have the highest priority for implementation, and if so what is the priority of reflection? IMO, reflection methods should probably be a moderately high priority, as this would help with implementing most other features. For example, I was trying to see what string functions were missing from the implementation from within the IronRuby interpreter, but got an error when trying to get the methods for strings... Of course I can pull up the source (and did), but I think implementing some of these things would be easier with reflection in place. Just a suggestion... My second question is related to strings... You are currently StringBuilder to implement your MutableString class, though there is a comment about eventually replacing this with byte[]. Is there any ETA on when that might happen? I had wanted to work on implementing some of the string functions to get myself acquainted with the codebase, but I see that the string class is in a state where it might not be the best of ideas to try to add new functionality... Or, if you are willing to accept a patch for it, I may try the StringBuilder -> byte[] conversion myself. Lastly, I see the following in the code base: /*!*/. For example: public MutableString/*!*/ Append(string/*!*/ str, int startIndex, int charCount) { What does this mean? Is there a coding standards document which describes this? I don't see any documentation in the codebase about it, but I assume that it means roughly the same as it does in ruby (that the method is destructive or somehow changing the object), but I can't reconcile that with some things I see in the code base...(for example, why the ! on the str parameter?). Thanks for your time, -Lee Culver -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20071107/0dbf1c79/attachment.html From Tomas.Matousek at microsoft.com Wed Nov 7 18:04:23 2007 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Wed, 7 Nov 2007 15:04:23 -0800 Subject: [Ironruby-core] IronRuby and Dictionaries. In-Reply-To: <1194472024.23908.26.camel@erandi.boston.ximian.com> References: <372109E149E8084D8E6C7D9CFD82E06329DA49BA42@NA-EXMSG-C115.redmond.corp.microsoft.com> <1194472024.23908.26.camel@erandi.boston.ximian.com> Message-ID: My fault. The tests are bad. Thanks! Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Miguel de Icaza Sent: Wednesday, November 07, 2007 1:47 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] IronRuby and Dictionaries. Hello John, First the simple problem: I have been investigating some of the failures in the IronRuby test suite while running on Mono. Some of the problems in the tests depend on the order that Dictionary<>'s GetEnumerator will return the data. But Dictionaries do not have any sorting order specified. The order of the results is implementation specific, and I bet they also depend on the number of elements in the Dictionary as well as the hashcodes of the elements for the order. A simple case of this problem is: module M C = 1 class D end end M.constants.each { |x| puts x } In this test, when you call M.constants.each sometimes we return D,C and sometimes we return C,D. If the order is important, maybe the code should switch to use SortedDictionary instead of using a plain Dictionary? The second problem is with Hash, some of the tests are failing on Mono, again because the code assumes that code will be returned in sorted order by the Dictionary, for example consider: >>> puts 'Q' => 'W', 'E' => 'R', 'T' => 'Y' In IronRuby/Mono this returns: TYERQW In IronRuby/.NET this return: QWERTY In Ruby this returns; QWERTY But Ruby and IronRuby seem to disagree on another simple example: >>> puts 'a' => 'A', 'A' => 'a' In IronRuby/.NET this return: aAAa In irb this returns: AaaA In IronRuby/Mono this returns: aAAa The change here is a bit elaborate than just changing class Hash to derive from SortedDictionary, it is also necessary to proxy this code to RubyOps not to the existing Equal method, but to a Compare method that can return an int to identify less, equal or bigger. miguel _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From lists at ruby-forum.com Wed Nov 7 18:35:45 2007 From: lists at ruby-forum.com (Joe Chung) Date: Thu, 8 Nov 2007 00:35:45 +0100 Subject: [Ironruby-core] Implementation plan and a string question... In-Reply-To: <6512F99DEFF77C418E6738CE6E12FD4E5BC5EBFA3B@NA-EXMSG-C105.redmond.corp.microsoft.com> References: <6512F99DEFF77C418E6738CE6E12FD4E5BC5EBFA3B@NA-EXMSG-C105.redmond.corp.microsoft.com> Message-ID: <82ee247f37ec6cbaec50e531854544cb@ruby-forum.com> Lee Culver wrote: > Lastly, I see the following in the code base: /*!*/. For example: > public MutableString/*!*/ Append(string/*!*/ str, int > startIndex, int charCount) { > What does this mean? Is there a coding standards document which > describes this? I don't see any documentation in the codebase about it, > but I assume that it means roughly the same as it does in ruby (that the > method is destructive or somehow changing the object), but I can't > reconcile that with some things I see in the code base...(for example, > why the ! on the str parameter?). This is only a guess, but one thing I've noticed that was missing in C# is the ability to specify that a nullable type (like string) should never be null. So: string! foo = null; would result in a compiler error, and you would be required to cast a nullable string explicitly to a non-nullable string like: string bar; string! foo = (string!)bar; One gotcha with my guess is that "as" semantics wouldn't work well with this: string bar = null; string! foo = bar as string!; would fail unless the "as" operator is able to set foo to default(string!), which might be String.Empty. This is just a guess though. -- Posted via http://www.ruby-forum.com/. From sanxiyn at gmail.com Wed Nov 7 18:43:31 2007 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Thu, 8 Nov 2007 08:43:31 +0900 Subject: [Ironruby-core] Implementation plan and a string question... In-Reply-To: <6512F99DEFF77C418E6738CE6E12FD4E5BC5EBFA3B@NA-EXMSG-C105.redmond.corp.microsoft.com> References: <6512F99DEFF77C418E6738CE6E12FD4E5BC5EBFA3B@NA-EXMSG-C105.redmond.corp.microsoft.com> Message-ID: <5b0248170711071543wb764528x6abeaf52170b4ddd@mail.gmail.com> 2007/11/8, Lee Culver : > Lastly, I see the following in the code base: /*!*/. For example: > > public MutableString/*!*/ Append(string/*!*/ str, int startIndex, > int charCount) { > > What does this mean? That the parameters marked are assumed to be non-null. It's used by Spec#. Full answer here: http://rubyforge.org/pipermail/ironruby-core/2007-October/000258.html -- Seo Sanghyeon From tomas at winterdom.com Wed Nov 7 18:44:27 2007 From: tomas at winterdom.com (Tomas Restrepo) Date: Wed, 7 Nov 2007 18:44:27 -0500 Subject: [Ironruby-core] Hosting the DLR and passing data to scripts Message-ID: I've been playing with the DLR hosting interfaces and running ruby code this way; it's a really, really nifty feature that I'm already loving! I can see a lot of cool scenarios this will be useful, such as providing a good way to provide custom scripting support on applications and so on. I have had some problems, however, in particularly trying to connect the host with the scripts being executed inside the DLR. In my infinite ignorance, I assume you would be able to use Script.SetVariable() (or one of the longer, but equal alternatives to it) to introduce global variables into the scope before executing or evaluating a script, but for the life of me I can't seem to get it to work. Am I just completely of the mark? or is it just not working at this time? -- Tomas Restrepo http://www.winterdom.com/weblog/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20071107/9a52b7ba/attachment.html From Tomas.Matousek at microsoft.com Wed Nov 7 22:54:22 2007 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Wed, 7 Nov 2007 19:54:22 -0800 Subject: [Ironruby-core] Hosting the DLR and passing data to scripts In-Reply-To: References: Message-ID: We?re going to improve hosting API in DLR next month ? there will be several major changes and many minor ones. IronRuby will also plug better to DLR due to these changes. For the time being, use only globals (via RubyEngine.CurrentEngine.ExecutionContext.GlobalVariables dictionary) for passing data from and to Ruby scripts. Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Restrepo Sent: Wednesday, November 07, 2007 3:44 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Hosting the DLR and passing data to scripts I've been playing with the DLR hosting interfaces and running ruby code this way; it's a really, really nifty feature that I'm already loving! I can see a lot of cool scenarios this will be useful, such as providing a good way to provide custom scripting support on applications and so on. I have had some problems, however, in particularly trying to connect the host with the scripts being executed inside the DLR. In my infinite ignorance, I assume you would be able to use Script.SetVariable() (or one of the longer, but equal alternatives to it) to introduce global variables into the scope before executing or evaluating a script, but for the life of me I can't seem to get it to work. Am I just completely of the mark? or is it just not working at this time? -- Tomas Restrepo http://www.winterdom.com/weblog/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20071107/5494fc83/attachment-0001.html From tomas at winterdom.com Thu Nov 8 07:43:06 2007 From: tomas at winterdom.com (Tomas Restrepo) Date: Thu, 8 Nov 2007 07:43:06 -0500 Subject: [Ironruby-core] Hosting the DLR and passing data to scripts In-Reply-To: References: Message-ID: <00f501c82204$eae726d0$c0b57470$@com> Hi Tomas, << We?re going to improve hosting API in DLR next month ? there will be several major changes and many minor ones. IronRuby will also plug better to DLR due to these changes. For the time being, use only globals (via RubyEngine.CurrentEngine.ExecutionContext.GlobalVariables dictionary) for passing data from and to Ruby scripts. >> Thanks for the answer; I'll keep my eyes on the DLR updates. I did try using the GlobalVariables dictionary and that did work fine. Any particular reason why the global variables are stored in the GlobalVariables dictionary instead of the GlobalScope dictionary? (just trying to understand better how it works) Tomas Restrepo http://www.winterdom.com/weblog/ From jflam at microsoft.com Thu Nov 8 10:27:23 2007 From: jflam at microsoft.com (John Lam (DLR)) Date: Thu, 8 Nov 2007 07:27:23 -0800 Subject: [Ironruby-core] Range#=== operator Message-ID: <372109E149E8084D8E6C7D9CFD82E06329DA8CAC48@NA-EXMSG-C115.redmond.corp.microsoft.com> Forwarding this onto the list for Peter who's having mail problems ... From: Peter Bacon Darwin [mailto:peterbacon at bacondarwin.com] Sent: Thursday, November 08, 2007 2:35 AM To: John Lam (DLR) Subject: FW: Range#=== operator I have noticed an interesting feature in the current snapshot. If you test a numeric range against a non-numeric value, such as a string you get a System.ArgumentException whereas other Ruby implentations return false. E.g. IronRuby: (1..5) === 'x' gives System.ArgumentException: wrong number or type of arguments for `<=>' CRuby: (1..5) === 'x' gives false There are two interesting points here: The first is that debugging code with lightweight code generation is really difficult; tracking down what actually causes the exception to be thrown is hidden by the DynamicSite layer. If you break on the exception being thrown you have already lost the trace back to the original problem. This is because the exception is not thrown directly but via binding to an invocation site. Only by trawling through the code and putting break points all over the place was I able to ascertain that the problem is that when you apply the === operator to the Range the begin and end attributes of Range have the <=> operator applied to the argument (in this case you have something like FixNum <=> MutableString) and the current system is unable to find a suitable method to invoke. See RubyMethodGroupInfo.SetInvocationRuleInternal() and RubyMethodGroupInfo.GetMethodCandidate(). I.E. There is no implicit conversion between FixNum and MutableString. How do you guys debug situations like this? The second point is to do with this result itself. Are you aiming to produce identical results to other Ruby implementations or are there other criteria for correctness. Arguably the expression given above is invalid as there is no correct type conversion. Equally false would seem a reasonable result; certainly it is false that 'x' is in the range of (1..5). If false is what you want, what is the accepted way of dealing with the situation? Do you want to fiddle with the protocols for type conversions? I imagine not. Is Range a specific case, in which case you would code a specific version of <=> operator for it? Interestingly the following code returns false as expected: 1 == 'x' gives false The difference here is that the == operator is being used directly to test equality whereas early the <=> operator was being used to compare the values previously. Of interest, both IronRuby and CRuby throw argument exceptions/errors for the following comparisons. 1 > 'x' and 1 < 'x' What are the correct semantics here? What do you think should be done to deal with this discrepancy? Regards, Pet -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20071108/8de30a5c/attachment.html From dinov at exchange.microsoft.com Thu Nov 8 11:50:40 2007 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Thu, 8 Nov 2007 08:50:40 -0800 Subject: [Ironruby-core] Range#=== operator In-Reply-To: <372109E149E8084D8E6C7D9CFD82E06329DA8CAC48@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <372109E149E8084D8E6C7D9CFD82E06329DA8CAC48@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <7AD436E4270DD54A94238001769C2227DF52E08F30@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Here's a couple of debugging tips: -X:SaveAssemblies -X:StaticMethods command line options, use these when you need to see into a DynamicMethod. Instead of DynamicMethod's we'll create methods via Reflection.Emit and we'll save them to disk at process exit as snippets???.dll (where ??? is a number, usually 1). You can then open the assembly w/ reflector or ildasm to see what's going on in the generated code. This is especially useful if you have a small repro snippet like the one here as snippets will be pretty easy to dig through and find the particular piece of generated code you want. When debugging rules in general the best place to put a break point is either the language's RubyActionBinder.MakeRule - where you'll see all language specific binding kick in (and boy does Ruby have a lot of language specific bindings currently :)!) or you can look at ActionBinder.GetRule to see the whole process take place. Unfortunately I don't know the ruby code base well enough to give you better hints than that (but if you want know how to debug IronPython comparisons...) A final useful one is -X:ExceptionDetail - this will cause the CLR exception to get printed instead of a more filtered language exception. Also if the exception comes from a DynamicSite I'll usually try and find the exceptions message somewhere in the source code which usually is in some rule generation code. Hopefully that's helpful on the debugging side of things - and maybe some of this you've figured out but it might be useful for other people as well. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of John Lam (DLR) Sent: Thursday, November 08, 2007 7:27 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Range#=== operator Forwarding this onto the list for Peter who's having mail problems ... From: Peter Bacon Darwin [mailto:peterbacon at bacondarwin.com] Sent: Thursday, November 08, 2007 2:35 AM To: John Lam (DLR) Subject: FW: Range#=== operator I have noticed an interesting feature in the current snapshot. If you test a numeric range against a non-numeric value, such as a string you get a System.ArgumentException whereas other Ruby implentations return false. E.g. IronRuby: (1..5) === 'x' gives System.ArgumentException: wrong number or type of arguments for `<=>' CRuby: (1..5) === 'x' gives false There are two interesting points here: The first is that debugging code with lightweight code generation is really difficult; tracking down what actually causes the exception to be thrown is hidden by the DynamicSite layer. If you break on the exception being thrown you have already lost the trace back to the original problem. This is because the exception is not thrown directly but via binding to an invocation site. Only by trawling through the code and putting break points all over the place was I able to ascertain that the problem is that when you apply the === operator to the Range the begin and end attributes of Range have the <=> operator applied to the argument (in this case you have something like FixNum <=> MutableString) and the current system is unable to find a suitable method to invoke. See RubyMethodGroupInfo.SetInvocationRuleInternal() and RubyMethodGroupInfo.GetMethodCandidate(). I.E. There is no implicit conversion between FixNum and MutableString. How do you guys debug situations like this? The second point is to do with this result itself. Are you aiming to produce identical results to other Ruby implementations or are there other criteria for correctness. Arguably the expression given above is invalid as there is no correct type conversion. Equally false would seem a reasonable result; certainly it is false that 'x' is in the range of (1..5). If false is what you want, what is the accepted way of dealing with the situation? Do you want to fiddle with the protocols for type conversions? I imagine not. Is Range a specific case, in which case you would code a specific version of <=> operator for it? Interestingly the following code returns false as expected: 1 == 'x' gives false The difference here is that the == operator is being used directly to test equality whereas early the <=> operator was being used to compare the values previously. Of interest, both IronRuby and CRuby throw argument exceptions/errors for the following comparisons. 1 > 'x' and 1 < 'x' What are the correct semantics here? What do you think should be done to deal with this discrepancy? Regards, Pet -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20071108/725bf380/attachment-0001.html From bacondarwin at googlemail.com Thu Nov 8 16:33:29 2007 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Thu, 8 Nov 2007 21:33:29 -0000 Subject: [Ironruby-core] Range#=== operator In-Reply-To: <7AD436E4270DD54A94238001769C2227DF52E08F30@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: <000001c8224f$02e63060$ca0aa8c0@hobbiton> Thanks Dino, I did use the SaveAssemblies and StaticMethods options ? cribbed from one of John?s blog postings, I think. From the look of it (the exception is pretty comprehensive) there is no filtered language exception going on in IronRuby at this stage. Or is this just when in debug? I haven?t tried release. The trouble with the generated code was that it appeared that the exception had already been flagged for execution at generation time; One of the snippets was an action to create and throw the ArgumentException [See RubyOps.MakeInvalidArgumentTypesError]. The way I debugged it, as you mention toward the bottom of your mail, was to search the code that creates the specific ArgumentException dynamic action (searching for the error string) and then find which bits of code use it. I also experimented with placing break points at various places around the DLR in the AST generation and action binding code. I guess it just requires a bit of getting used to and knowing where to look. Trawling through the RubyOnRails code generation (e.g. ActiveRecord) is also really hard work too. One other question though: How do you decide whether to use dynamic sites to trigger code rather than calling code directly when in coding in C#. For instance, why does Protocols.Compare invoke _CompareSharedSite rather than call a C# function directly? Sorry if I am being dumb. By the way, a simple way to get the desired results for the case equality issue mentioned before is to put a try/catch around the Compare and return false if an ArgumentException is thrown. See the attached patch. Is this too much of a hack or acceptable? Pete -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Dino Viehland Sent: 08 November 2007 16:51 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Range#=== operator Here?s a couple of debugging tips: -X:SaveAssemblies ?X:StaticMethods command line options, use these when you need to see into a DynamicMethod. Instead of DynamicMethod?s we?ll create methods via Reflection.Emit and we?ll save them to disk at process exit as snippets???.dll (where ??? is a number, usually 1). You can then open the assembly w/ reflector or ildasm to see what?s going on in the generated code. This is especially useful if you have a small repro snippet like the one here as snippets will be pretty easy to dig through and find the particular piece of generated code you want. When debugging rules in general the best place to put a break point is either the language?s RubyActionBinder.MakeRule ? where you?ll see all language specific binding kick in (and boy does Ruby have a lot of language specific bindings currently :-)!) or you can look at ActionBinder.GetRule to see the whole process take place. Unfortunately I don?t know the ruby code base well enough to give you better hints than that (but if you want know how to debug IronPython comparisons?) A final useful one is ?X:ExceptionDetail ? this will cause the CLR exception to get printed instead of a more filtered language exception. Also if the exception comes from a DynamicSite I?ll usually try and find the exceptions message somewhere in the source code which usually is in some rule generation code. Hopefully that?s helpful on the debugging side of things ? and maybe some of this you?ve figured out but it might be useful for other people as well. No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.15.24/1117 - Release Date: 07/11/2007 22:52 No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.15.24/1117 - Release Date: 07/11/2007 22:52 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20071108/8077bc4f/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: RangeOpsCaseEquality.patch Type: application/octet-stream Size: 1251 bytes Desc: not available Url : http://rubyforge.org/pipermail/ironruby-core/attachments/20071108/8077bc4f/attachment.obj From curt at hagenlocher.org Thu Nov 8 16:40:22 2007 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Thu, 8 Nov 2007 13:40:22 -0800 Subject: [Ironruby-core] Range#=== operator In-Reply-To: <000001c8224f$02e63060$ca0aa8c0@hobbiton> References: <7AD436E4270DD54A94238001769C2227DF52E08F30@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <000001c8224f$02e63060$ca0aa8c0@hobbiton> Message-ID: On 11/8/07, Peter Bacon Darwin wrote: > > One other question though: How do you decide whether to use dynamic > sites to trigger code rather than calling code directly when in coding in > C#. For instance, why does Protocols.Compare invoke _CompareSharedSite > rather than call a C# function directly? Sorry if I am being dumb. > Even builtins like the String or Range classes can have their comparison functions overridden by user code. So you really need to perform the comparison "in Ruby". -- Curt Hagenlocher curt at hagenlocher.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20071108/e75b8fed/attachment.html From bacondarwin at googlemail.com Thu Nov 8 16:49:59 2007 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Thu, 8 Nov 2007 21:49:59 -0000 Subject: [Ironruby-core] Range#=== operator In-Reply-To: Message-ID: <000b01c82251$52793670$ca0aa8c0@hobbiton> Of course, you are quite right. Thanks for that. -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Curt Hagenlocher Sent: 08 November 2007 21:40 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Range#=== operator On 11/8/07, Peter Bacon Darwin wrote: One other question though: How do you decide whether to use dynamic sites to trigger code rather than calling code directly when in coding in C#. For instance, why does Protocols.Compare invoke _CompareSharedSite rather than call a C# function directly? Sorry if I am being dumb. Even builtins like the String or Range classes can have their comparison functions overridden by user code. So you really need to perform the comparison "in Ruby". -- Curt Hagenlocher HYPERLINK "mailto:curt at hagenlocher.org"curt at hagenlocher.org No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.15.24/1117 - Release Date: 07/11/2007 22:52 No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.15.24/1117 - Release Date: 07/11/2007 22:52 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20071108/5f63aed4/attachment-0001.html From jomes at microsoft.com Thu Nov 8 16:55:15 2007 From: jomes at microsoft.com (John Messerly) Date: Thu, 8 Nov 2007 13:55:15 -0800 Subject: [Ironruby-core] Range#=== operator In-Reply-To: References: <7AD436E4270DD54A94238001769C2227DF52E08F30@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <000001c8224f$02e63060$ca0aa8c0@hobbiton> Message-ID: <918705E903F4714CB713D89AB5F1857D738D69B3C8@NA-EXMSG-C116.redmond.corp.microsoft.com> Curt Hagenlocher wrote: > On 11/8/07, Peter Bacon Darwin wrote: > >> One other question though: How do you decide whether to use dynamic >> sites to trigger code rather than calling code directly when in coding >> in C#. For instance, why does Protocols.Compare invoke >> _CompareSharedSite rather than call a C# function directly? Sorry if >> I am being dumb. > > Even builtins like the String or Range classes can have their > comparison functions overridden by user code. So you really need to > perform the comparison "in Ruby". Exactly. The trick with library methods is to figure out what pattern MRI uses. Typically, they do a method lookup on the type, which in our world translates into a DynamicSite. However there are some places where they just call some library method directly and bypass any overridden/monkeypatched method. So it requires some experimentation :). Protocols.Compare is one of the stranger things I've discovered. MRI will call <=>, and then call < and > on the result object... which of course can be overridden to do whatever you want. Because Compare is kind of crazy I'm not surprised we get it slightly wrong. Peter Bacon Darwin wrote: > By the way, a simple way to get the desired results for the case > equality issue mentioned before is to put a try/catch around the > Compare and return false if an ArgumentException is thrown. See the > attached patch. Is this too much of a hack or acceptable? Peter, I think the right fix here is for Fixnum <=> to return nil if it gets passed a non-comparable object. That seems to be the standard MRI behavior for <=>: irb(main):013:0> (1..5) === 'x' => false And then I think our Protocols.Compare needs to check if <=> returned null, and not call > or < if that was the case. Indeed, if you define '<' and '>' on NilClass it doesn't change the compare behavior: irb(main):014:0> class NilClass irb(main):015:1> def < x; puts '<'; 0; end irb(main):016:1> def > x; puts '>'; 0; end irb(main):017:1> end => nil irb(main):018:0> (1..5) === 'x' => false Of course, it might require more experiments to get it exactly right for all cases. - John From jomes at microsoft.com Thu Nov 8 16:59:14 2007 From: jomes at microsoft.com (John Messerly) Date: Thu, 8 Nov 2007 13:59:14 -0800 Subject: [Ironruby-core] Range#=== operator In-Reply-To: <918705E903F4714CB713D89AB5F1857D738D69B3C8@NA-EXMSG-C116.redmond.corp.microsoft.com> References: <7AD436E4270DD54A94238001769C2227DF52E08F30@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <000001c8224f$02e63060$ca0aa8c0@hobbiton> <918705E903F4714CB713D89AB5F1857D738D69B3C8@NA-EXMSG-C116.redmond.corp.microsoft.com> Message-ID: <918705E903F4714CB713D89AB5F1857D738D69B3D2@NA-EXMSG-C116.redmond.corp.microsoft.com> John Messerly wrote: > Peter, I think the right fix here is for Fixnum <=> to return nil if it > gets passed a non-comparable object. That seems to be the standard MRI > behavior for <=>: > > irb(main):013:0> (1..5) === 'x' > => false > Oops, my example is wrong, it should be: irb(main):001:0> 1 <=> 'x' => nil IronRuby: >>> 1 <=> 'x' System.ArgumentException: wrong number or type of arguments for `<=>' So we definitely need another overload for Fixnum#<=>, and possibly other places as well that implement <=>. - John From jflam at microsoft.com Fri Nov 9 20:24:15 2007 From: jflam at microsoft.com (John Lam (DLR)) Date: Fri, 9 Nov 2007 17:24:15 -0800 Subject: [Ironruby-core] Implementation plan and a string question... In-Reply-To: <6512F99DEFF77C418E6738CE6E12FD4E5BC5EBFA3B@NA-EXMSG-C105.redmond.corp.microsoft.com> References: <6512F99DEFF77C418E6738CE6E12FD4E5BC5EBFA3B@NA-EXMSG-C105.redmond.corp.microsoft.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E06329DA8CB6AF@NA-EXMSG-C115.redmond.corp.microsoft.com> Lee Culver: > Is there a plan in place as to which features currently have the > highest priority for implementation, and if so what is the priority of > reflection? IMO, reflection methods should probably be a moderately > high priority, as this would help with implementing most other > features. > For example, I was trying to see what string functions were missing > from the implementation from within the IronRuby interpreter, but got > an error when trying to get the methods for strings... Of course I can > pull up the source (and did), but I think implementing some of these > things would be easier with reflection in place. Just a suggestion... As we refactor stuff after our RubyConf hacks, we're adding the method reflection methods. This should show up either early next week when we resync our tree with SVN. > My second question is related to strings... You are currently > StringBuilder to implement your MutableString class, though there is a > comment about eventually replacing this with byte[]. Is there any ETA > on when that might happen? I had wanted to work on implementing some > of the string functions to get myself acquainted with the codebase, > but I see that the string class is in a state where it might not be > the best of ideas to try to add new functionality... Or, if you are > willing to accept a patch for it, I may try the StringBuilder -> > byte[] conversion myself. If you want to try the byte[] conversion, please go for it. You could also take the approach of implementing additional instance methods on String since the interface to StringBuilder should be mostly compatible. > Lastly, I see the following in the code base: /*!*/. For example: > > public MutableString/*!*/ Append(string/*!*/ str, int > startIndex, int charCount) { > These are the Spec# annotations. There is a wiki with some info on Spec#: http://channel9.msdn.com/wiki/default.aspx/SpecSharp.HomePage http://channel9.msdn.com/wiki/default.aspx/SpecSharp.SpecSharpAttributes Research papers are available on http://research.microsoft.com/specsharp. Thanks, -John From jomes at microsoft.com Fri Nov 9 20:53:10 2007 From: jomes at microsoft.com (John Messerly) Date: Fri, 9 Nov 2007 17:53:10 -0800 Subject: [Ironruby-core] Implementation plan and a string question... In-Reply-To: <372109E149E8084D8E6C7D9CFD82E06329DA8CB6AF@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <6512F99DEFF77C418E6738CE6E12FD4E5BC5EBFA3B@NA-EXMSG-C105.redmond.corp.microsoft.com> <372109E149E8084D8E6C7D9CFD82E06329DA8CB6AF@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <918705E903F4714CB713D89AB5F1857D738D69B8D7@NA-EXMSG-C116.redmond.corp.microsoft.com> John Lam: > > Lee Culver: > > > Lastly, I see the following in the code base: /*!*/. For example: > > > > public MutableString/*!*/ Append(string/*!*/ str, int > > startIndex, int charCount) { > > > > These are the Spec# annotations. There is a wiki with some info on > Spec#: > > http://channel9.msdn.com/wiki/default.aspx/SpecSharp.HomePage > http://channel9.msdn.com/wiki/default.aspx/SpecSharp.SpecSharpAttribute > s > > Research papers are available on > http://research.microsoft.com/specsharp. > And, in particular, the /*!*/ means "should never be null". Common things that can't be null are CodeContext arguments, and the "self" argument in most library methods (however if you're implementing a Module, self can be null, e.g. class NilClass; include MyModule; end; nil.my_module_method) The /*!*/ is only processed by Spec#, and should not be confused with the [NotNull] attribute that you can use to tell the DLR MethodBinder that null isn't allowed for that argument. - John From bacondarwin at googlemail.com Mon Nov 12 06:53:24 2007 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Mon, 12 Nov 2007 11:53:24 -0000 Subject: [Ironruby-core] Compare Patch Message-ID: <000801c82522$a2aa3a80$ca0aa8c0@hobbiton> Following on from the discussions about the <=> operator and the Range === operator. The situation in the MRI is not consistent. There are some cases where an exception is thrown and some where nil is returned and in those cases sometimes this is converted to false. Matz accepted this a while back (HYPERLINK "http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/165155"http://b lade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/165155) and I don?t see any change in the later releases. Here is a quick patch I knocked up that tries to map to the MRI behaviour. The FixnumOps now has an overload on Compare that can take an object on the rhs and returns an object rather than int. This allows it to return null if the value is not compatible. The Protocols.Compare now can return null if the comparison was not valid. There is a new Protocols.CheckedCompare that will return an int (as before) or throw an ArgumentException otherwise. The RangeOps.CaseEquals now checks for null from the <=> operator and returns false in that case. This had a knock on effect across a number of classes including Comparable, IListOps, ArrayOps and Enumerable, which have been changed either to explicitly cast to int (since it is guaranteed that it will be compartible) or to call CheckedCompare instead of Compare. Pete No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.15.29/1124 - Release Date: 11/11/2007 10:12 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20071112/3d4c6c60/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: ComparePatch.patch Type: application/octet-stream Size: 12385 bytes Desc: not available Url : http://rubyforge.org/pipermail/ironruby-core/attachments/20071112/3d4c6c60/attachment-0001.obj From bacondarwin at googlemail.com Mon Nov 12 08:54:56 2007 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Mon, 12 Nov 2007 13:54:56 -0000 Subject: [Ironruby-core] Compare Patch Message-ID: <002101c82533$9d085d30$ca0aa8c0@hobbiton> I have just realised that the overload I created in FixnumOps is nonsense, sorry: [RubyMethod("<=>")] public static object Compare(int lhs, int rhs) { return Compare(lhs, (int)rhs); } [RubyMethod("<=>")] public static object Compare(int lhs, object rhs) { if (rhs is int) { return Compare(lhs, (int)rhs); } return null; } Since there is already an overload that takes int rhs then the second overload will never get called with an int. Therefore the first three lines of the method are never needed. That leaves this method looking like: [RubyMethod("<=>")] public static object Compare(int lhs, object rhs) { return null; } This then begs the question of is there a better way to pick up default cases like this at binding time? There is also a need for other overloads such as [RubyMethod("<=>")] public static int Compare(int lhs, double rhs) { return Convert.ToDouble(lhs).CompareTo(rhs); } But again is there a more generic method of coercion for these types. The binder already attempts to do convert parameters but in this case the conversion is the reverse (in effect converting the value of self rather than rhs). Other implementations talk about a coerce framework but this is offered due to a lack of method overloading based on types in Ruby. I assume that the way the binding works actually encourages such overloads in IronRuby. Again sorry if I am being dumb. Pete No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.15.29/1124 - Release Date: 11/11/2007 10:12 No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.15.29/1124 - Release Date: 11/11/2007 10:12 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20071112/cfc9cc3d/attachment.html From lists at ruby-forum.com Mon Nov 12 11:15:15 2007 From: lists at ruby-forum.com (Huw Collingbourne) Date: Mon, 12 Nov 2007 17:15:15 +0100 Subject: [Ironruby-core] IronRuby Visual Form Designer (preview) In-Reply-To: <372109E149E8084D8E6C7D9CFD82E06329DA7DC6D0@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <372109E149E8084D8E6C7D9CFD82E06329DA49B5C3@NA-EXMSG-C115.redmond.corp.microsoft.com> <93061f6a2bf4c585e15ac004524c2689@ruby-forum.com> <372109E149E8084D8E6C7D9CFD82E06329DA7DC6D0@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <3a01d9302f3924fe20e15ef2739e1e96@ruby-forum.com> I've just uploaded a short screencast showing our IronRuby form designer in action... http://www.sapphiresteel.com/IronRuby-Visual-Designer best wishes Huw -- Posted via http://www.ruby-forum.com/. From jflam at microsoft.com Mon Nov 12 11:22:18 2007 From: jflam at microsoft.com (John Lam (DLR)) Date: Mon, 12 Nov 2007 08:22:18 -0800 Subject: [Ironruby-core] IronRuby Visual Form Designer (preview) In-Reply-To: <3a01d9302f3924fe20e15ef2739e1e96@ruby-forum.com> References: <372109E149E8084D8E6C7D9CFD82E06329DA49B5C3@NA-EXMSG-C115.redmond.corp.microsoft.com> <93061f6a2bf4c585e15ac004524c2689@ruby-forum.com> <372109E149E8084D8E6C7D9CFD82E06329DA7DC6D0@NA-EXMSG-C115.redmond.corp.microsoft.com> <3a01d9302f3924fe20e15ef2739e1e96@ruby-forum.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E06329DA98BC16@NA-EXMSG-C115.redmond.corp.microsoft.com> Huw Collingbourne: > I've just uploaded a short screencast showing our IronRuby form > designer > in action... > > http://www.sapphiresteel.com/IronRuby-Visual-Designer Just watched it. Great job! It looks like you've got syntax coloring working already. Do you have an ETA for Intellisense support for the native .NET types? Thanks, -John From lists at ruby-forum.com Mon Nov 12 11:50:55 2007 From: lists at ruby-forum.com (Huw Collingbourne) Date: Mon, 12 Nov 2007 17:50:55 +0100 Subject: [Ironruby-core] IronRuby Visual Form Designer (preview) In-Reply-To: <372109E149E8084D8E6C7D9CFD82E06329DA98BC16@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <372109E149E8084D8E6C7D9CFD82E06329DA49B5C3@NA-EXMSG-C115.redmond.corp.microsoft.com> <93061f6a2bf4c585e15ac004524c2689@ruby-forum.com> <372109E149E8084D8E6C7D9CFD82E06329DA7DC6D0@NA-EXMSG-C115.redmond.corp.microsoft.com> <3a01d9302f3924fe20e15ef2739e1e96@ruby-forum.com> <372109E149E8084D8E6C7D9CFD82E06329DA98BC16@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: John Lam (DLR) wrote: > Huw Collingbourne: > >> I've just uploaded a short screencast showing our IronRuby form >> designer >> in action... >> >> http://www.sapphiresteel.com/IronRuby-Visual-Designer > > Just watched it. Great job! > > It looks like you've got syntax coloring working already. Do you have an > ETA for Intellisense support for the native .NET types? The syntax coloring, code folding etc is already in place as we have it all for our current Ruby environment. None of this depends on information supplied by the Ruby interpreter, so moving it over to IronRuby was very simple. We've been looking at .NET IntelliSense and this will be a *lot* easier to implement than Ruby IntelliSense was. Naturally we can do Ruby IntelliSense today as we already have Ruby IntelliSense in Ruby In Steel. Once again, none of our Intellisense depends on ruby.exe - we've implemented the entire code analysis system ourselves - so it is easy for us to move it into our IronRuby IDE. We think we'll be able to demo a system that has both .NET and Ruby code completion for IronRuby pretty soon now. Can't give you an exact date but it's going to be weeks, not months ;-) best wishes Huw -- Posted via http://www.ruby-forum.com/. From charles.nutter at sun.com Mon Nov 12 12:55:51 2007 From: charles.nutter at sun.com (Charles Oliver Nutter) Date: Mon, 12 Nov 2007 09:55:51 -0800 Subject: [Ironruby-core] Compare Patch In-Reply-To: <000801c82522$a2aa3a80$ca0aa8c0@hobbiton> References: <000801c82522$a2aa3a80$ca0aa8c0@hobbiton> Message-ID: <473893A7.1030101@sun.com> Peter Bacon Darwin wrote: > Following on from the discussions about the <=> operator and the Range > === operator. The situation in the MRI is not consistent. There are > some cases where an exception is thrown and some where nil is returned > and in those cases sometimes this is converted to false. Matz accepted > this a while back > (http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/165155) and > I don?t see any change in the later releases. If you're going through the effort of finding all cases, please also try to update either the Rubinius specs or RubySpec (www.headius.com/rubyspec) so the information is not lost (or buried in code). This goes for other discoveries...please try to capture it through one of the community-based mechanisms. - Charlie From jflam at microsoft.com Mon Nov 12 14:08:28 2007 From: jflam at microsoft.com (John Lam (DLR)) Date: Mon, 12 Nov 2007 11:08:28 -0800 Subject: [Ironruby-core] FW: Quick update on IronRuby status Message-ID: <372109E149E8084D8E6C7D9CFD82E06329DA98BDB3@NA-EXMSG-C115.redmond.corp.microsoft.com> Whoops ... sent this out to ruby-talk by accident :( -John > -----Original Message----- > From: John Lam (DLR) [mailto:jflam at microsoft.com] > Sent: Friday, November 09, 2007 11:44 AM > To: ruby-talk ML > Subject: Quick update on IronRuby status > > I know we haven't pushed out some new sources in a while now. My > apologies. > > We were hacking a lot of things into IronRuby for our RubyConf demo, > and we're now spending the time here to make sure that they're > implemented the right way. We're now back to a clean state in our > internal repository and we're working on integrating the new features > that we showed into the codebase. It might take a few more days before > we get to another known good state, at which point we'll push out a new > source code drop to SVN. > > Thanks, > -John From bacondarwin at googlemail.com Mon Nov 12 14:29:15 2007 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Mon, 12 Nov 2007 19:29:15 -0000 Subject: [Ironruby-core] Compare Patch In-Reply-To: <473893A7.1030101@sun.com> Message-ID: <004401c82562$50ad5a60$ca0aa8c0@hobbiton> Will do. Can anyone explain the relationship between Rubinius and RubySpec and the stuff in the test folder of IronRuby. There is clearly overlap but is one regularly updated from the other or what? Pete -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Charles Oliver Nutter Sent: 12 November 2007 17:56 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Compare Patch If you're going through the effort of finding all cases, please also try to update either the Rubinius specs or RubySpec (www.headius.com/rubyspec) so the information is not lost (or buried in code). This goes for other discoveries...please try to capture it through one of the community-based mechanisms. - Charlie No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.15.29/1124 - Release Date: 11/11/2007 10:12 From jflam at microsoft.com Mon Nov 12 14:32:44 2007 From: jflam at microsoft.com (John Lam (DLR)) Date: Mon, 12 Nov 2007 11:32:44 -0800 Subject: [Ironruby-core] Compare Patch In-Reply-To: <004401c82562$50ad5a60$ca0aa8c0@hobbiton> References: <473893A7.1030101@sun.com> <004401c82562$50ad5a60$ca0aa8c0@hobbiton> Message-ID: <372109E149E8084D8E6C7D9CFD82E06329DA98BDEE@NA-EXMSG-C115.redmond.corp.microsoft.com> Peter Bacon Darwin: > Will do. Can anyone explain the relationship between Rubinius and > RubySpec > and the stuff in the test folder of IronRuby. There is clearly overlap > but > is one regularly updated from the other or what? There is a directory in the Rubinius distribution called spec. That's where the RSpec tests live today. I did an early integration into our tests directory, but they're mixed in with other tests which makes it hard to sync regularly with Rubinius. This week I'm going to move those tests into their own directory (\tests\specs). After that we'll rendezvous with Rubinius specs on a regular basis. -John From Tomas.Matousek at microsoft.com Mon Nov 12 17:46:06 2007 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Mon, 12 Nov 2007 14:46:06 -0800 Subject: [Ironruby-core] Compare Patch In-Reply-To: <002101c82533$9d085d30$ca0aa8c0@hobbiton> References: <002101c82533$9d085d30$ca0aa8c0@hobbiton> Message-ID: For now, use overloads for method specialization on parameter type. We might do some implicit conversions (e.g. MutableString <-> CLR string) in the binder but such conversions need to be general, not specific to any operator/method. I'm also thinking about adding support for "overloading by type and protocol" (as opposed to type only). I.e. instead of this public static void Foo(object obj) { if (RubySites.RespondsTo(obj, "bar") { ... 1 ...} else if (RubySites.RespondsTo(obj, "baz") {... 2 ...} else { ... 3 ...} } one would just write (declaratively): public static void FooForBar([HasMethod("bar")]object obj) { ... 1 ... } public static void FooForBaz([HasMethod("baz")]object obj) { ... 2 ... } public static void Foo(object obj) { ... 3 ... } But it's not a priority right now. We'll see. Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Peter Bacon Darwin Sent: Monday, November 12, 2007 5:55 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Compare Patch I have just realised that the overload I created in FixnumOps is nonsense, sorry: [RubyMethod("<=>")] public static object Compare(int lhs, int rhs) { return Compare(lhs, (int)rhs); } [RubyMethod("<=>")] public static object Compare(int lhs, object rhs) { if (rhs is int) { return Compare(lhs, (int)rhs); } return null; } Since there is already an overload that takes int rhs then the second overload will never get called with an int. Therefore the first three lines of the method are never needed. That leaves this method looking like: [RubyMethod("<=>")] public static object Compare(int lhs, object rhs) { return null; } This then begs the question of is there a better way to pick up default cases like this at binding time? There is also a need for other overloads such as [RubyMethod("<=>")] public static int Compare(int lhs, double rhs) { return Convert.ToDouble(lhs).CompareTo(rhs); } But again is there a more generic method of coercion for these types. The binder already attempts to do convert parameters but in this case the conversion is the reverse (in effect converting the value of self rather than rhs). Other implementations talk about a coerce framework but this is offered due to a lack of method overloading based on types in Ruby. I assume that the way the binding works actually encourages such overloads in IronRuby. Again sorry if I am being dumb. Pete No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.15.29/1124 - Release Date: 11/11/2007 10:12 No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.15.29/1124 - Release Date: 11/11/2007 10:12 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20071112/6c945431/attachment-0001.html From bacondarwin at googlemail.com Tue Nov 13 01:21:56 2007 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Tue, 13 Nov 2007 06:21:56 -0000 Subject: [Ironruby-core] Compare Patch In-Reply-To: Message-ID: <000501c825bd$7efbd8a0$ca0aa8c0@hobbiton> That would be interesting and very duck-like. From looking at ruby doc it appears that the Numeric class implements <=> such that it either returns 0 (if both sides are equal) or nil. Pushing my method up to Numeric and implementing it properly makes more sense. Pete -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek Sent: 12 November 2007 22:46 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Compare Patch For now, use overloads for method specialization on parameter type. We might do some implicit conversions (e.g. MutableString <-> CLR string) in the binder but such conversions need to be general, not specific to any operator/method. I?m also thinking about adding support for ?overloading by type and protocol? (as opposed to type only). I.e. instead of this public static void Foo(object obj) { if (RubySites.RespondsTo(obj, ?bar?) { ? 1 ?} else if (RubySites.RespondsTo(obj, ?baz?) {? 2 ?} else { ? 3 ?} } one would just write (declaratively): public static void FooForBar([HasMethod(?bar?)]object obj) { ? 1 ? } public static void FooForBaz([HasMethod(?baz?)]object obj) { ? 2 ? } public static void Foo(object obj) { ? 3 ? } But it?s not a priority right now. We?ll see. Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Peter Bacon Darwin Sent: Monday, November 12, 2007 5:55 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Compare Patch Since there is already an overload that takes int rhs then the second overload will never get called with an int. Therefore the first three lines of the method are never needed. That leaves this method looking like: [RubyMethod("<=>")] public static object Compare(int lhs, object rhs) { return null; } This then begs the question of is there a better way to pick up default cases like this at binding time? No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.15.29/1124 - Release Date: 11/11/2007 10:12 No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.15.29/1124 - Release Date: 11/11/2007 10:12 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20071113/01a2a735/attachment.html From bacondarwin at googlemail.com Tue Nov 13 01:24:20 2007 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Tue, 13 Nov 2007 06:24:20 -0000 Subject: [Ironruby-core] Range#=== operator In-Reply-To: <918705E903F4714CB713D89AB5F1857D738D69B3C8@NA-EXMSG-C116.redmond.corp.microsoft.com> Message-ID: <000a01c825bd$d42377c0$ca0aa8c0@hobbiton> Would it be fair to follow this as a general rule: when coding Ruby methods in C#, if you are calling code that is exposed as a method or operator in a Ruby class or module then invoke it via a DynamicSite, if it is purely private code to the C# method then call it directly? Pete -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of John Messerly Sent: 08 November 2007 21:55 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Range#=== operator Curt Hagenlocher wrote: > > Even builtins like the String or Range classes can have their > comparison functions overridden by user code. So you really need to > perform the comparison "in Ruby". Exactly. The trick with library methods is to figure out what pattern MRI uses. Typically, they do a method lookup on the type, which in our world translates into a DynamicSite. However there are some places where they just call some library method directly and bypass any overridden/monkeypatched method. So it requires some experimentation :). No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.15.29/1124 - Release Date: 11/11/2007 10:12 From bacondarwin at googlemail.com Tue Nov 13 05:23:24 2007 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Tue, 13 Nov 2007 10:23:24 -0000 Subject: [Ironruby-core] RubySites Message-ID: <002001c825df$39b7f130$ca0aa8c0@hobbiton> Is there any rule for when you should put DynamicSite instances into Ruby.Builtins.RubySites rather than local to the class that uses them? As an example, Numeric has a method called coerce that is used quite a lot inside Numeric but occasionally used in other classes. Should the DynamicSite for this be inside Ruby.Builtins.Numeric or Ruby.Builtins.Sites? Pete No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.15.30/1127 - Release Date: 12/11/2007 21:19 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20071113/d33f1568/attachment.html From jflam at microsoft.com Tue Nov 13 14:48:31 2007 From: jflam at microsoft.com (John Lam (DLR)) Date: Tue, 13 Nov 2007 11:48:31 -0800 Subject: [Ironruby-core] RubySites In-Reply-To: <002001c825df$39b7f130$ca0aa8c0@hobbiton> References: <002001c825df$39b7f130$ca0aa8c0@hobbiton> Message-ID: <372109E149E8084D8E6C7D9CFD82E06329DA98C3EB@NA-EXMSG-C115.redmond.corp.microsoft.com> Peter Bacon Darwin: > Is there any rule for when you should put DynamicSite instances into > Ruby.Builtins.RubySites rather than local to the class that uses them? > > As an example, Numeric has a method called coerce that is used quite a > lot inside Numeric but occasionally used in other classes. Should the > DynamicSite for this be inside Ruby.Builtins.Numeric or > Ruby.Builtins.Sites? We don't have any hard and fast rules about this. The general rule is if you believe that the site is useful across more than a single type, then it's OK to move into Builtins.Sites since your locality of reference is already pooched. -John From sanxiyn at gmail.com Tue Nov 13 18:54:50 2007 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Wed, 14 Nov 2007 08:54:50 +0900 Subject: [Ironruby-core] Catch and throw In-Reply-To: <5b0248170711010306m6a0e30f8i36e47985811222e6@mail.gmail.com> References: <5b0248170711010306m6a0e30f8i36e47985811222e6@mail.gmail.com> Message-ID: <5b0248170711131554h31bce01cj9456208a9d98de1d@mail.gmail.com> 2007/11/1, Sanghyeon Seo : > I did a quick implementation of Kernel#catch and Kernel#throw. > http://sparcs.kaist.ac.kr/~tinuviel/download/IronRuby/patch-catch-throw Ping? -- Seo Sanghyeon From Tomas.Matousek at microsoft.com Tue Nov 13 20:30:32 2007 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 13 Nov 2007 17:30:32 -0800 Subject: [Ironruby-core] Catch and throw In-Reply-To: <5b0248170711131554h31bce01cj9456208a9d98de1d@mail.gmail.com> References: <5b0248170711010306m6a0e30f8i36e47985811222e6@mail.gmail.com> <5b0248170711131554h31bce01cj9456208a9d98de1d@mail.gmail.com> Message-ID: Sorry, I didn't get to this yet. Basically, your implementation doesn't target several corner cases. I'll send an explanation with the correct implementation later. Stay tuned. Thanks anyway! Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Sanghyeon Seo Sent: Tuesday, November 13, 2007 3:55 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Catch and throw 2007/11/1, Sanghyeon Seo : > I did a quick implementation of Kernel#catch and Kernel#throw. > http://sparcs.kaist.ac.kr/~tinuviel/download/IronRuby/patch-catch-throw Ping? -- Seo Sanghyeon _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From jflam at microsoft.com Wed Nov 14 11:42:46 2007 From: jflam at microsoft.com (John Lam (DLR)) Date: Wed, 14 Nov 2007 08:42:46 -0800 Subject: [Ironruby-core] Range#=== operator In-Reply-To: <000a01c825bd$d42377c0$ca0aa8c0@hobbiton> References: <918705E903F4714CB713D89AB5F1857D738D69B3C8@NA-EXMSG-C116.redmond.corp.microsoft.com> <000a01c825bd$d42377c0$ca0aa8c0@hobbiton> Message-ID: <372109E149E8084D8E6C7D9CFD82E06329DA98C8AF@NA-EXMSG-C115.redmond.corp.microsoft.com> Peter Bacon Darwin: > Would it be fair to follow this as a general rule: when coding Ruby > methods > in C#, if you are calling code that is exposed as a method or operator > in a > Ruby class or module then invoke it via a DynamicSite, if it is purely > private code to the C# method then call it directly? Yes. But since we alias types it's sometimes not blindingly obvious that you'll need a site. The good news is that the specs do a very good job at catching cases where there's some observable behavior. -John From charles.nutter at sun.com Wed Nov 14 12:10:54 2007 From: charles.nutter at sun.com (Charles Oliver Nutter) Date: Wed, 14 Nov 2007 11:10:54 -0600 Subject: [Ironruby-core] Range#=== operator In-Reply-To: <000a01c825bd$d42377c0$ca0aa8c0@hobbiton> References: <000a01c825bd$d42377c0$ca0aa8c0@hobbiton> Message-ID: <473B2C1E.7020706@sun.com> Peter Bacon Darwin wrote: > Would it be fair to follow this as a general rule: when coding Ruby methods > in C#, if you are calling code that is exposed as a method or operator in a > Ruby class or module then invoke it via a DynamicSite, if it is purely > private code to the C# method then call it directly? > Pete This rule won't hold for all cases, since frequently Ruby's of two minds on whether you can override some method X used by method Y such that Y will see it. Sometimes Y will do a full dynamic dispatch and sometimes it will do a direct call, even to the same piece of code that's bound to external (i.e. in-script) calls to X. - Charlie From charles.nutter at sun.com Tue Nov 13 07:57:34 2007 From: charles.nutter at sun.com (Charles Oliver Nutter) Date: Tue, 13 Nov 2007 04:57:34 -0800 Subject: [Ironruby-core] Range#=== operator In-Reply-To: <000a01c825bd$d42377c0$ca0aa8c0@hobbiton> References: <000a01c825bd$d42377c0$ca0aa8c0@hobbiton> Message-ID: <47399F3E.6010203@sun.com> Peter Bacon Darwin wrote: > Would it be fair to follow this as a general rule: when coding Ruby methods > in C#, if you are calling code that is exposed as a method or operator in a > Ruby class or module then invoke it via a DynamicSite, if it is purely > private code to the C# method then call it directly? > Pete There is no hard rule for Ruby; sometimes you are supposed to dispatch for functionality, sometimes you call directly. There's no one true way unfortunately. Of course, as you figure out how different methods work, document that :) - Charlie From charles.nutter at sun.com Wed Nov 14 18:22:16 2007 From: charles.nutter at sun.com (Charles Oliver Nutter) Date: Wed, 14 Nov 2007 17:22:16 -0600 Subject: [Ironruby-core] Range#=== operator In-Reply-To: <473B2C1E.7020706@sun.com> References: <000a01c825bd$d42377c0$ca0aa8c0@hobbiton> <473B2C1E.7020706@sun.com> Message-ID: <473B8328.8070004@sun.com> Charles Oliver Nutter wrote: > Peter Bacon Darwin wrote: >> Would it be fair to follow this as a general rule: when coding Ruby methods >> in C#, if you are calling code that is exposed as a method or operator in a >> Ruby class or module then invoke it via a DynamicSite, if it is purely >> private code to the C# method then call it directly? >> Pete > > This rule won't hold for all cases, since frequently Ruby's of two minds > on whether you can override some method X used by method Y such that Y > will see it. Sometimes Y will do a full dynamic dispatch and sometimes > it will do a direct call, even to the same piece of code that's bound to > external (i.e. in-script) calls to X. Pardon the duplication; the other mail must have gotten delayed... - Charlie From mjarosch at sbcglobal.net Thu Nov 15 21:30:58 2007 From: mjarosch at sbcglobal.net (Mike Jarosch) Date: Thu, 15 Nov 2007 20:30:58 -0600 Subject: [Ironruby-core] Where is help needed? In-Reply-To: <473B8328.8070004@sun.com> References: <000a01c825bd$d42377c0$ca0aa8c0@hobbiton> <473B2C1E.7020706@sun.com> <473B8328.8070004@sun.com> Message-ID: <473D00E2.5070802@sbcglobal.net> Hello, Where is help needed? Reading through the list archive, it looks like people are working on the zlib and yaml implementation. Is there help needed there still? Where would my time spent working be most beneficial? Thanks, Mike From eduardo at fusionmxsoftware.com Thu Nov 15 21:40:49 2007 From: eduardo at fusionmxsoftware.com (Eduardo A. Flores Verduzco) Date: Thu, 15 Nov 2007 20:40:49 -0600 Subject: [Ironruby-core] Where is help needed? In-Reply-To: <473D00E2.5070802@sbcglobal.net> References: <000a01c825bd$d42377c0$ca0aa8c0@hobbiton> <473B2C1E.7020706@sun.com> <473B8328.8070004@sun.com> <473D00E2.5070802@sbcglobal.net> Message-ID: <57ad48f30711151840m46cfd24ag2acf28c2df43ca26@mail.gmail.com> As I've seen there's plenty of things to do! By the way, I started to work on StringIO but never asked if someone else is already on that... is there anyone? Eduardo Flores On Nov 15, 2007 8:30 PM, Mike Jarosch wrote: > Hello, > > Where is help needed? Reading through the list archive, it looks like > people are working on the zlib and yaml implementation. Is there help > needed there still? Where would my time spent working be most beneficial? > > Thanks, > Mike > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > From bacondarwin at googlemail.com Fri Nov 16 08:06:19 2007 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Fri, 16 Nov 2007 13:06:19 -0000 Subject: [Ironruby-core] Where is help needed? In-Reply-To: <57ad48f30711151840m46cfd24ag2acf28c2df43ca26@mail.gmail.com> References: <000a01c825bd$d42377c0$ca0aa8c0@hobbiton> <473B2C1E.7020706@sun.com> <473B8328.8070004@sun.com> <473D00E2.5070802@sbcglobal.net> <57ad48f30711151840m46cfd24ag2acf28c2df43ca26@mail.gmail.com> Message-ID: <000e01c82851$7c082630$74187290$@com> I was thinking about this issue last night. I am interested in working on the number stuff (Numeric, BigNum, FixedNum, Float, etc) but I am concerned that a) Someone internally is already doing this and just as I am about to send in a patch a new splat of code gets popped across from the internal source control to SVN and all has been wasted; b) The quality/style/efficiency is not accepted by the maintainers and my code goes to waste. It is a shame that the code is not being developed directly against the RubyForge repository as this definitely gives a feeling of them and us and makes it difficult to see what is being done, what progress is being made and it creates extra work for the maintainers ensuring that the internal and external repositories are synched up - there have been a number of issues recently about dodgy file paths and project references. Some kind of work tracking tool would be beneficial, even if it was just a priority list of things that needed to be done so that people out here could pick up something. I suppose the problem is also that, for instance, no one knows who I am and what quality of code I can produce and so it would be risky to allocate work to me. How could this be solved. My personal aim is to send in a few patches and hopefully, get enough feedback so that I am capable of producing code that is acceptable and fits in with the way the internal developers are working. Then may be the risk of me putting time in would be reduced for me and the risk of the maintainers accepting that I am going to take on a task is reduced. My 2 pence Pete -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Eduardo A. Flores Verduzco Sent: Friday,16 November 16, 2007 02:41 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Where is help needed? As I've seen there's plenty of things to do! By the way, I started to work on StringIO but never asked if someone else is already on that... is there anyone? Eduardo Flores From jflam at microsoft.com Fri Nov 16 11:29:36 2007 From: jflam at microsoft.com (John Lam (DLR)) Date: Fri, 16 Nov 2007 08:29:36 -0800 Subject: [Ironruby-core] Where is help needed? In-Reply-To: <000e01c82851$7c082630$74187290$@com> References: <000a01c825bd$d42377c0$ca0aa8c0@hobbiton> <473B2C1E.7020706@sun.com> <473B8328.8070004@sun.com> <473D00E2.5070802@sbcglobal.net> <57ad48f30711151840m46cfd24ag2acf28c2df43ca26@mail.gmail.com> <000e01c82851$7c082630$74187290$@com> Message-ID: <372109E149E8084D8E6C7D9CFD82E06329DAA18932@NA-EXMSG-C115.redmond.corp.microsoft.com> Peter Bacon Darwin: > It is a shame that the code is not being developed directly against the > RubyForge repository as this definitely gives a feeling of them and us > and > makes it difficult to see what is being done, what progress is being > made > and it creates extra work for the maintainers ensuring that the > internal and > external repositories are synched up - there have been a number of > issues > recently about dodgy file paths and project references. Unfortunately, as much as we would love to make the "two repository" problem go away, the reality is that too much of our internal testing infrastructure (our SNAP queue, which is a lab of 20+ computers which run our check-in, sign-off, performance tests among others) is tightly coupled to TFS. There's also another problem that isn't visible to external folks: the DLR is undergoing a massive refactoring. Internally, all of the projects that depend on DLR (including some unannounced projects) live inside of the same TFS repository. What this means is that if a DLR change breaks something, we have to fix it otherwise SNAP won't allow the check-in. This forcing function lets us keep all of our code sync'd with DLR changes which is goodness. It also helps us understand in real time the impact that DLR changes have on consumers. Think about this as "real time continuous integration". The latter case explains why we haven't sync'd the SVN repository in two weeks. We had a large change (the stuff in the demos we had for RubyConf) that included some DLR changes that broke all sorts of stuff in, um, interesting ways. It's taken us this long to get the check-in through the queue (it went in yesterday), so we're preparing to push a new set of sources out today. > Some kind of work tracking tool would be beneficial, even if it was > just a > priority list of things that needed to be done so that people out here > could > pick up something. I suppose the problem is also that, for instance, > no one > knows who I am and what quality of code I can produce and so it would > be > risky to allocate work to me. How could this be solved. I think what we can do is get together at the beginning of each week with a quick 'scrum' via email (probably better since we work across all sorts of different time zones). This way we can announce the things that we're working on, so that we're sure that we're not stepping on other folks' toes. Sound reasonable? I'll kick off a scrum mail on Monday. > b) The > quality/style/efficiency is not accepted by the maintainers and my code > goes > to waste. If this were to happen, I don't think that your code goes to waste. You've learned something valuable and the best way of improving is to get continuous, critical feedback on the progress of your work. Like so many other things, it's about confidence - and there's no better way of building confidence (in both directions) by submitting code that you've thought about, receiving / incorporating feedback and repeating. Thanks, -John From jomes at microsoft.com Fri Nov 16 17:08:18 2007 From: jomes at microsoft.com (John Messerly) Date: Fri, 16 Nov 2007 14:08:18 -0800 Subject: [Ironruby-core] Where is help needed? In-Reply-To: <000e01c82851$7c082630$74187290$@com> References: <000a01c825bd$d42377c0$ca0aa8c0@hobbiton> <473B2C1E.7020706@sun.com> <473B8328.8070004@sun.com> <473D00E2.5070802@sbcglobal.net> <57ad48f30711151840m46cfd24ag2acf28c2df43ca26@mail.gmail.com> <000e01c82851$7c082630$74187290$@com> Message-ID: <918705E903F4714CB713D89AB5F1857D738D892471@NA-EXMSG-C116.redmond.corp.microsoft.com> Peter Bacon Darwin: > I was thinking about this issue last night. I am interested in working > on the number stuff (Numeric, BigNum, FixedNum, Float, etc) but I am > concerned that a) Someone internally is already doing this and just as > I am about to send in a patch a new splat of code gets popped across > from the internal source control to SVN and all has been wasted; b) The > quality/style/efficiency is not accepted by the maintainers and my code > goes to waste. If you want to look at numeric stuff, go for it. Our numeric classes could really use some love. I know Tomas & I aren't working on those. Regarding quality/style/efficiency--hey, my code gets rejected too sometimes :) > It is a shame that the code is not being developed directly against the > RubyForge repository as this definitely gives a feeling of them and us > and makes it difficult to see what is being done, what progress is > being made and it creates extra work for the maintainers ensuring that > the internal and external repositories are synched up - there have been > a number of issues recently about dodgy file paths and project > references. For what it's worth, I do a lot of my work against the SVN layout, so I feel that pain too. The rakefile is still not perfect yet, but John is working on it. Well, at least I complain to him when it's not working :) > Some kind of work tracking tool would be beneficial, even if it was > just a priority list of things that needed to be done so that people > out here could pick up something. I suppose the problem is also that, > for instance, no one knows who I am and what quality of code I can > produce and so it would be risky to allocate work to me. How could > this be solved. I really liked what Evan Phoenix said at RubyConf about "free flowing commit bit". We can't implement it quite like Rubinius but I think the idea is anyone that does a good patch is trusted as someone who can do good quality work. > My personal aim is to send in a few patches and hopefully, get enough > feedback so that I am capable of producing code that is acceptable and > fits in with the way the internal developers are working. Then may be > the risk of me putting time in would be reduced for me and the risk of > the maintainers accepting that I am going to take on a task is reduced. I look forward to reviewing your patches! Also, keep in mind some of the feedback is just because there's a lot of details to learn about, that no one could be expected to know without some experience with the system. I had a decent ramp-up period myself to get familiar with all of the stuff that goes in IronRuby. Cheers, John From jflam at microsoft.com Fri Nov 16 20:44:39 2007 From: jflam at microsoft.com (John Lam (DLR)) Date: Fri, 16 Nov 2007 17:44:39 -0800 Subject: [Ironruby-core] New update on SVN! Message-ID: <372109E149E8084D8E6C7D9CFD82E06329DAA18D5D@NA-EXMSG-C115.redmond.corp.microsoft.com> Tomas finally got the big checkin from RubyConf into TFS this week. I'm pushing out an update to SVN now, and I'll follow up with another giant mail that will detail all DLR changes in the last 3 weeks since our last update. See attached email (HTML) if you want to see the pretty picture for 3). Enjoy! -John 1) Introduces RubyScope - a local runtime scope to be created for methods, class/module declarations and blocks (though this shelveset doesn't create scope for blocks yet). RubyScope holds on various flags and self object. It's lexically chained. Added LocalScope to DLR - it's an empty for now, will implement local scopes in DLR this or next week. LocalScope is available on CodeContext. There are also few hacks on CodeContext that will be gone after LocalScopes will be finished. 2) Fixes Ruby method definitions, class variable access, constant access and method visibility settings - to use lexical lookup via scopes. 3) Refactors class structure and method tables to match Ruby semantics. S(w) means singleton/virtual class of w; x and y are instances of C, y has a singleton class defined. 4) Fixes method lookup: follow one s-arrow and then b-arrows until Object is reached. 5) Unifies methods implementing member enumeration. Implements reflection methods on Module (e.g. get_const, set_const, instance_methods, ...). 6) Implements undef and alias keywords (alias doesn't work for globals yet, just for methods). 7) Adds support for method removal and undef, including CLR methods removal (though CLR method removal is not implemented completely). Added attribute (RemoveMethodAttribute) that enables to remove a CLR method declaratively in an extension class in library. 8) Refactors and fixes CLR method, field and event lookup. 9) Refactors Ruby library attributes: [RubyClass], [RubyModule], [Includes]. Removed extension attributes as they are not needed any more. Added Copy flag on IncludesAttribute that will copy members of included module into the including class instead of adding the module into the including class's mixin list. This enables to transparently hoist RubyArray and RubyHash methods that are implemented on IList and IDictionary interfaces to these interfaces' extensions. 10) Refactors CLR interface interop. CLR interfaces are treated as empty Ruby modules. A CLR type that implements an interface includes it in its mixin list. They can be opened in Ruby code and methods could be added. Interfaces can be opened also from library code, in fact several interfaces (IEnumerable, IList, Icollection, IDictionary). 11) Refactors ClassInitGenerator, adapts it to the new attributes. -------------- next part -------------- An embedded message was scrubbed... From: Tomas Matousek Subject: Code Review: Ruby Scopes and Member Lookup Date: Mon, 12 Nov 2007 17:03:27 -0800 Size: 42255 Url: http://rubyforge.org/pipermail/ironruby-core/attachments/20071116/342c6e69/attachment-0001.mht From sanxiyn at gmail.com Fri Nov 16 22:22:27 2007 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Sat, 17 Nov 2007 12:22:27 +0900 Subject: [Ironruby-core] SVN r56: binary files in the repository Message-ID: <5b0248170711161922i55f855cu3adbb406de55ef0@mail.gmail.com> A lot of binary files were introduced to the repository under tests/ironruby in SVN r56. Is this intentional? -- Seo Sanghyeon From jomes at microsoft.com Fri Nov 16 23:01:00 2007 From: jomes at microsoft.com (John Messerly) Date: Fri, 16 Nov 2007 20:01:00 -0800 Subject: [Ironruby-core] SVN r56: binary files in the repository In-Reply-To: <5b0248170711161922i55f855cu3adbb406de55ef0@mail.gmail.com> References: <5b0248170711161922i55f855cu3adbb406de55ef0@mail.gmail.com> Message-ID: <918705E903F4714CB713D89AB5F1857D738D8925AB@NA-EXMSG-C116.redmond.corp.microsoft.com> Seo Sanghyeon: > A lot of binary files were introduced to the repository under > tests/ironruby in SVN r56. Is this intentional? Not intentional--I'm guessing that the rakefile to_svn command picked up some junk lying around in the enlistment used to sync. (Although I thought we had SVN configured to exclude dlls/exes/pdbs...) Our tests run in two modes, one of which causes IronRuby to dump the IL to disk as *.exe & *.dll, so we can run PE verify (http://msdn2.microsoft.com/en-us/library/62bwd2yd(VS.80).aspx) over the output to ensure that we are generating clean IL. So after running the tests you end up with a bunch of binaries lying around. - John From jflam at microsoft.com Fri Nov 16 23:15:06 2007 From: jflam at microsoft.com (John Lam (DLR)) Date: Fri, 16 Nov 2007 20:15:06 -0800 Subject: [Ironruby-core] SVN r56: binary files in the repository In-Reply-To: <5b0248170711161922i55f855cu3adbb406de55ef0@mail.gmail.com> References: <5b0248170711161922i55f855cu3adbb406de55ef0@mail.gmail.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E06329DAA18D92@NA-EXMSG-C115.redmond.corp.microsoft.com> Sanghyeon Seo: > A lot of binary files were introduced to the repository under > tests/ironruby in SVN r56. Is this intentional? Whoops. My fault. I was rushing out the door to have dinner with the kids (at a place called Ruby's :) I'll fix and re-submit. Thanks, -John From jflam at microsoft.com Sat Nov 17 00:07:56 2007 From: jflam at microsoft.com (John Lam (DLR)) Date: Fri, 16 Nov 2007 21:07:56 -0800 Subject: [Ironruby-core] SVN r56: binary files in the repository In-Reply-To: <372109E149E8084D8E6C7D9CFD82E06329DAA18D92@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <5b0248170711161922i55f855cu3adbb406de55ef0@mail.gmail.com> <372109E149E8084D8E6C7D9CFD82E06329DAA18D92@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E06329DAA18D93@NA-EXMSG-C115.redmond.corp.microsoft.com> John Lam (DLR): > Whoops. My fault. I was rushing out the door to have dinner with the > kids (at a place called Ruby's :) > > I'll fix and re-submit. Fixed in r57 now. From jflam at microsoft.com Sat Nov 17 00:13:11 2007 From: jflam at microsoft.com (John Lam (DLR)) Date: Fri, 16 Nov 2007 21:13:11 -0800 Subject: [Ironruby-core] Where is help needed? In-Reply-To: <57ad48f30711151840m46cfd24ag2acf28c2df43ca26@mail.gmail.com> References: <000a01c825bd$d42377c0$ca0aa8c0@hobbiton> <473B2C1E.7020706@sun.com> <473B8328.8070004@sun.com> <473D00E2.5070802@sbcglobal.net> <57ad48f30711151840m46cfd24ag2acf28c2df43ca26@mail.gmail.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E06329DAA18D96@NA-EXMSG-C115.redmond.corp.microsoft.com> Eduardo A. Flores Verduzco: > As I've seen there's plenty of things to do! > > By the way, I started to work on StringIO but never asked if someone > else is already on that... is there anyone? Nobody is working on StringIO to my knowledge. If you want to stake a claim to it, please add your name and the class in the wiki page: http://ironruby.rubyforge.org/wiki/wiki.pl?Core Thanks! -John From jflam at microsoft.com Sat Nov 17 00:14:46 2007 From: jflam at microsoft.com (John Lam (DLR)) Date: Fri, 16 Nov 2007 21:14:46 -0800 Subject: [Ironruby-core] Where is help needed? In-Reply-To: <473D00E2.5070802@sbcglobal.net> References: <000a01c825bd$d42377c0$ca0aa8c0@hobbiton> <473B2C1E.7020706@sun.com> <473B8328.8070004@sun.com> <473D00E2.5070802@sbcglobal.net> Message-ID: <372109E149E8084D8E6C7D9CFD82E06329DAA18D97@NA-EXMSG-C115.redmond.corp.microsoft.com> Mike Jarosch: > Where is help needed? Reading through the list archive, it looks like > people are working on the zlib and yaml implementation. Is there help > needed there still? Where would my time spent working be most > beneficial? I believe that Michael Moore started to look at yaml, but then got busy with other things. Feel free to take a look, Mike - I believe that folks who have looked at yaml have been converging on porting JvYaml as a good starting point. Thanks, -John From sanxiyn at gmail.com Sat Nov 17 09:54:23 2007 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Sat, 17 Nov 2007 23:54:23 +0900 Subject: [Ironruby-core] Patches updated Message-ID: <5b0248170711170654g3be6b846tb77eefe047c74eb1@mail.gmail.com> I updated patches and Mono HOWTO against SVN r57. http://sparcs.kaist.ac.kr/~tinuviel/download/IronRuby/ patch-rakefile -- please apply 1. Detect Mono path using pkg-config. 2. Define exec_net method for running .NET executables. 3. Case sensitivity for IronRubyTestHost. patch-dlr -- not intended for inclusion 1. Color console workaround. 2. SignatureHelper.AddArguments is currently missing. (new in r56) 3. Backspace key fix and assert fix no more needed. patch-catch-throw -- please review 1. Implement Kernel#catch and Kernel#throw. 2. Tomas said he will send explanations with the correct implementation. patch-gen-newline -- please apply 1. Always use \r\n in ClassInitGenerator to avoid huge diff. -- Seo Sanghyeon From sanxiyn at gmail.com Sat Nov 17 10:19:25 2007 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Sun, 18 Nov 2007 00:19:25 +0900 Subject: [Ironruby-core] IronRuby on Mono test log Message-ID: <5b0248170711170719s7c49de82q7e8d6bd328861529@mail.gmail.com> I uploaded test log for IronRuby on Mono, specifically output of "rake test_compiler mono=1". http://sparcs.kaist.ac.kr/~tinuviel/download/IronRuby/test_compiler.log Following scenarios fail; others pass: Scenario_RubyReturnValues2 Scenario_RubyReturnValues3 Scenario_RubyReturnValues4 -- Seo Sanghyeon From sanxiyn at gmail.com Sat Nov 17 10:41:41 2007 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Sun, 18 Nov 2007 00:41:41 +0900 Subject: [Ironruby-core] IronRuby on Mono test log In-Reply-To: <5b0248170711170719s7c49de82q7e8d6bd328861529@mail.gmail.com> References: <5b0248170711170719s7c49de82q7e8d6bd328861529@mail.gmail.com> Message-ID: <5b0248170711170741r3ddbd0fcj6dd979c8b253256c@mail.gmail.com> 2007/11/18, Sanghyeon Seo : > Following scenarios fail; others pass: > Scenario_RubyReturnValues2 > Scenario_RubyReturnValues3 > Scenario_RubyReturnValues4 These failures are bogus. Tests rely on dictionary ordering. "1 => 2, 3 => 4" prints as "3421" on Mono. Please fix. -- Seo Sanghyeon From sanxiyn at gmail.com Sat Nov 17 10:46:01 2007 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Sun, 18 Nov 2007 00:46:01 +0900 Subject: [Ironruby-core] IronRuby on Mono test log In-Reply-To: <5b0248170711170719s7c49de82q7e8d6bd328861529@mail.gmail.com> References: <5b0248170711170719s7c49de82q7e8d6bd328861529@mail.gmail.com> Message-ID: <5b0248170711170746l5794d7aeid7eceb44bd0f82a3@mail.gmail.com> Here's specs run. http://sparcs.kaist.ac.kr/~tinuviel/download/IronRuby/specs.log Note that I used MONO_IOMAP=case to avoid case sensitivity problems. This is a good interim workaround. -- Seo Sanghyeon From jb at nurv.fr Sat Nov 17 10:53:13 2007 From: jb at nurv.fr (Jb Evain) Date: Sat, 17 Nov 2007 16:53:13 +0100 Subject: [Ironruby-core] DLR test suite Message-ID: <69f7d8470711170753x71089af1y86b0bc49310f68ff@mail.gmail.com> Hey, I was talking with Seo on #mono about his efforts to test IR and IP on Mono. For now, we rely only on tests provided for IP and IR. I was thinking, you guys must have a dedicated DLR test suite? If so, it would really be nice to open it as well. Not only to help making us IP and IR first class citizens on Mono, but also for folks building stuff on the top of the DLR already. -- Jb Evain From jflam at microsoft.com Sat Nov 17 12:11:10 2007 From: jflam at microsoft.com (John Lam (DLR)) Date: Sat, 17 Nov 2007 09:11:10 -0800 Subject: [Ironruby-core] Known IronRuby bugs in Rv56: WAS: IronRuby on Mono test log In-Reply-To: <5b0248170711170746l5794d7aeid7eceb44bd0f82a3@mail.gmail.com> References: <5b0248170711170719s7c49de82q7e8d6bd328861529@mail.gmail.com> <5b0248170711170746l5794d7aeid7eceb44bd0f82a3@mail.gmail.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E06329DAA18DB5@NA-EXMSG-C115.redmond.corp.microsoft.com> Sanghyeon Seo:? > Here's specs run. > > http://sparcs.kaist.ac.kr/~tinuviel/download/IronRuby/specs.log > > Note that I used MONO_IOMAP=case to avoid case sensitivity problems. > This is a good interim workaround. Thanks for the bug report. I forgot to include this in our release notes. 1. Spec stack trace reporting is broken in this release. The specs run (as you can see by the log, but there's something busted in the reporting - we'll investigate). 2. Local variables are broken in the console only - they work fine in your programs. This is by design as the next major work item on our plate is to fix hosting in DLR, which will fix hosting in IronRuby, which will enable eval* to work. Thanks, -John From jflam at microsoft.com Sat Nov 17 12:14:27 2007 From: jflam at microsoft.com (John Lam (DLR)) Date: Sat, 17 Nov 2007 09:14:27 -0800 Subject: [Ironruby-core] DLR test suite In-Reply-To: <69f7d8470711170753x71089af1y86b0bc49310f68ff@mail.gmail.com> References: <69f7d8470711170753x71089af1y86b0bc49310f68ff@mail.gmail.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E06329DAA18DB6@NA-EXMSG-C115.redmond.corp.microsoft.com> Jb Evain: > I was talking with Seo on #mono about his efforts to test IR and IP on > Mono. > > For now, we rely only on tests provided for IP and IR. I was thinking, > you guys must have a dedicated DLR test suite? If so, it would really > be nice to open it as well. Not only to help making us IP and IR first > class citizens on Mono, but also for folks building stuff on the top > of the DLR already. Yes - we do have a big set of tests for DLR. Let me spin up a thread with the test team next week (those who are around ... :) and we'll look at how much work it is to drop DLR tests with IronRuby. FWIW, the plan has always been to spin up a separate DLR project on some repository somewhere. But of course the plan turns into one of 'ship DLR with Ruby, with Python, and by itself'. Which means the DLR sources get duplicated in 3 places and will be out of sync based on when those sources get pushed. Suggestions on how to deal with this would be welcome. Thanks, -John From jflam at microsoft.com Sat Nov 17 12:15:16 2007 From: jflam at microsoft.com (John Lam (DLR)) Date: Sat, 17 Nov 2007 09:15:16 -0800 Subject: [Ironruby-core] IronRuby on Mono test log In-Reply-To: <5b0248170711170741r3ddbd0fcj6dd979c8b253256c@mail.gmail.com> References: <5b0248170711170719s7c49de82q7e8d6bd328861529@mail.gmail.com> <5b0248170711170741r3ddbd0fcj6dd979c8b253256c@mail.gmail.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E06329DAA18DB7@NA-EXMSG-C115.redmond.corp.microsoft.com> Sanghyeon Seo: > > Following scenarios fail; others pass: > > Scenario_RubyReturnValues2 > > Scenario_RubyReturnValues3 > > Scenario_RubyReturnValues4 > > These failures are bogus. Tests rely on dictionary ordering. "1 => 2, > 3 => 4" prints as "3421" on Mono. Will do. Thanks for the bugrep. -John From jflam at microsoft.com Sat Nov 17 12:22:32 2007 From: jflam at microsoft.com (John Lam (DLR)) Date: Sat, 17 Nov 2007 09:22:32 -0800 Subject: [Ironruby-core] Patches updated In-Reply-To: <5b0248170711170654g3be6b846tb77eefe047c74eb1@mail.gmail.com> References: <5b0248170711170654g3be6b846tb77eefe047c74eb1@mail.gmail.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E06329DAA18DBA@NA-EXMSG-C115.redmond.corp.microsoft.com> Sanghyeon Seo: > I updated patches and Mono HOWTO against SVN r57. > http://sparcs.kaist.ac.kr/~tinuviel/download/IronRuby/ > > patch-rakefile -- please apply > 1. Detect Mono path using pkg-config. > 2. Define exec_net method for running .NET executables. > 3. Case sensitivity for IronRubyTestHost. > > patch-dlr -- not intended for inclusion > 1. Color console workaround. > 2. SignatureHelper.AddArguments is currently missing. (new in r56) > 3. Backspace key fix and assert fix no more needed. > > patch-catch-throw -- please review > 1. Implement Kernel#catch and Kernel#throw. > 2. Tomas said he will send explanations with the correct > implementation. > > patch-gen-newline -- please apply > 1. Always use \r\n in ClassInitGenerator to avoid huge diff. In the queue. Thanks for updating your patches! -John From miguel at ximian.com Sat Nov 17 15:15:32 2007 From: miguel at ximian.com (Miguel de Icaza) Date: Sat, 17 Nov 2007 15:15:32 -0500 Subject: [Ironruby-core] Patches updated In-Reply-To: <372109E149E8084D8E6C7D9CFD82E06329DAA18DBA@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <5b0248170711170654g3be6b846tb77eefe047c74eb1@mail.gmail.com> <372109E149E8084D8E6C7D9CFD82E06329DAA18DBA@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <1195330532.8373.33.camel@erandi.boston.ximian.com> > > 2. SignatureHelper.AddArguments is currently missing. (new in r56) Mono SVN has a fix for this, and the official 1.2.6 will have this implemented, so this should not be necessary. Miguel. From bacondarwin at googlemail.com Mon Nov 19 04:26:57 2007 From: bacondarwin at googlemail.com (Pete Bacon Darwin) Date: Mon, 19 Nov 2007 09:26:57 +0000 Subject: [Ironruby-core] Fwd: BigInteger.ToString(int radix) In-Reply-To: <000d01c82962$e7aa9870$b6ffc950$@com> References: <000d01c82962$e7aa9870$b6ffc950$@com> Message-ID: <6e6a6e390711190126s78535488t27d510b641ddb4ca@mail.gmail.com> This never seemed to appear on the list... ---------- Forwarded message ---------- From: Peter Bacon Darwin Date: 17 Nov 2007 21:43 Subject: BigInteger.ToString(int radix) To: ironruby-core at rubyforge.org Hi, Just a quick question. When BigInteger converts a string in a specific base, the letters it outputs are upper case. In MRI the letters are in lower case. Is there a specific reason for them to be in uppercase in BigInteger - for instance does IronPython use uppercase? Would it be acceptable to change the private static void AppendRadix(uint rem, uint radix, char[] tmp, StringBuilder buf, bool leadingZeros) { const string symbols = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; to private static void AppendRadix(uint rem, uint radix, char[] tmp, StringBuilder buf, bool leadingZeros) { const string symbols = "0123456789abcdefghijklmnopqrstuvwxyz"; Alternatively, the down casing could be done in the Bignum.to_s(radix) method but this seems wasteful. Pete -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20071119/c4ce2fe3/attachment.html From bacondarwin at googlemail.com Mon Nov 19 08:56:41 2007 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Mon, 19 Nov 2007 13:56:41 -0000 Subject: [Ironruby-core] FW: Bignum Parsing Message-ID: <000001c82ab4$051066e0$0f3134a0$@com> And neither did this. Pete From: Peter Bacon Darwin [mailto:bacondarwin at googlemail.com] Sent: Sunday,18 November 18, 2007 06:56 To: 'ironruby-core at rubyforge.org' Subject: Bignum Parsing A simple patch that gets the parsing of Bignums by the Ruby Tokenizer up and running. A new Create method in BigInteger uses the same algorithm, more or less, as IronPython so I assume that this is OK; clearly it could be optimized but then how often are Bignums parsed in anyway? Patched up the Tokenizer too so that it calls this method and you can now write really big numbers into rbx, like >>> 88888888888888888888888888. => # Pete -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20071119/066ff69b/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: BigIntegerParsing.patch Type: application/octet-stream Size: 2328 bytes Desc: not available Url : http://rubyforge.org/pipermail/ironruby-core/attachments/20071119/066ff69b/attachment.obj From lists at ruby-forum.com Mon Nov 19 17:38:34 2007 From: lists at ruby-forum.com (Huw Collingbourne) Date: Mon, 19 Nov 2007 23:38:34 +0100 Subject: [Ironruby-core] Ruby IntelliSense Message-ID: <83c6c917950ed6c1d6dd17fbba497ced@ruby-forum.com> Just a taster of the work we are doing on IntelliSense... http://www.sapphiresteel.com/IronRuby-and-IntelliSense This relates specifically to .NET IntelliSense. We already have a fast and pretty complete IntelliSense engine for Ruby (which we wrote from the ground up which means that it has no reliance on ruby.exe and will work just as well with IronRuby). There are still quite a few things we need to hammer out in our .NET IntelliSense - in particular, we need to clarify a few details of precisely how the two class hierarchies (.NET and Ruby) will co-exist. Still, this is a promising first step, I think ;-) best wishes Huw Collingbourne SapphireSteel Software http://www.sapphiresteel.com -- Posted via http://www.ruby-forum.com/. From eduardo at fusionmxsoftware.com Tue Nov 20 17:06:41 2007 From: eduardo at fusionmxsoftware.com (Eduardo A. Flores Verduzco) Date: Tue, 20 Nov 2007 16:06:41 -0600 Subject: [Ironruby-core] Microsoft.Scripting missing from VS Solution? Message-ID: <57ad48f30711201406t39a75128wd2bc23b59d308d87@mail.gmail.com> Hi, is the Microsoft.Scripting project missing from the current svn revision? (I've just downloaded it and it's missing from the vs solution, although it compiles correctly from rake) From eduardo at fusionmxsoftware.com Tue Nov 20 17:13:06 2007 From: eduardo at fusionmxsoftware.com (Eduardo A. Flores Verduzco) Date: Tue, 20 Nov 2007 16:13:06 -0600 Subject: [Ironruby-core] Microsoft.Scripting missing from VS Solution? In-Reply-To: <57ad48f30711201406t39a75128wd2bc23b59d308d87@mail.gmail.com> References: <57ad48f30711201406t39a75128wd2bc23b59d308d87@mail.gmail.com> Message-ID: <57ad48f30711201413h16aaf791j262514170abd2f2@mail.gmail.com> It seems its SpecSharp.targets what's missing... On Nov 20, 2007 4:06 PM, Eduardo A. Flores Verduzco wrote: > Hi, is the Microsoft.Scripting project missing from the current svn > revision? (I've just downloaded it and it's missing from the vs > solution, although it compiles correctly from rake) > From jflam at microsoft.com Tue Nov 20 20:07:51 2007 From: jflam at microsoft.com (John Lam (DLR)) Date: Tue, 20 Nov 2007 17:07:51 -0800 Subject: [Ironruby-core] Patches updated In-Reply-To: <5b0248170711170654g3be6b846tb77eefe047c74eb1@mail.gmail.com> References: <5b0248170711170654g3be6b846tb77eefe047c74eb1@mail.gmail.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E06329DAAC439C@NA-EXMSG-C115.redmond.corp.microsoft.com> Sanghyeon Seo: > I updated patches and Mono HOWTO against SVN r57. > http://sparcs.kaist.ac.kr/~tinuviel/download/IronRuby/ > > patch-rakefile -- please apply > 1. Detect Mono path using pkg-config. > 2. Define exec_net method for running .NET executables. > 3. Case sensitivity for IronRubyTestHost. > > patch-dlr -- not intended for inclusion > 1. Color console workaround. > 2. SignatureHelper.AddArguments is currently missing. (new in r56) > 3. Backspace key fix and assert fix no more needed. > > patch-catch-throw -- please review > 1. Implement Kernel#catch and Kernel#throw. > 2. Tomas said he will send explanations with the correct > implementation. > > patch-gen-newline -- please apply > 1. Always use \r\n in ClassInitGenerator to avoid huge diff. Hi Seo, Just applied your Rakefile and ClassInitGenerator patches in Revision 59. I'll let Tomas comment on #catch and #throw. Thanks! -John From jflam at microsoft.com Tue Nov 20 21:20:24 2007 From: jflam at microsoft.com (John Lam (DLR)) Date: Tue, 20 Nov 2007 18:20:24 -0800 Subject: [Ironruby-core] Ruby IntelliSense In-Reply-To: <83c6c917950ed6c1d6dd17fbba497ced@ruby-forum.com> References: <83c6c917950ed6c1d6dd17fbba497ced@ruby-forum.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E06329DAAC43E1@NA-EXMSG-C115.redmond.corp.microsoft.com> Huw Collingbourne: > Just a taster of the work we are doing on IntelliSense... > > http://www.sapphiresteel.com/IronRuby-and-IntelliSense > > This relates specifically to .NET IntelliSense. We already have a fast > and pretty complete IntelliSense engine for Ruby (which we wrote from > the ground up which means that it has no reliance on ruby.exe and will > work just as well with IronRuby). > > There are still quite a few things we need to hammer out in our .NET > IntelliSense - in particular, we need to clarify a few details of > precisely how the two class hierarchies (.NET and Ruby) will co-exist. > Still, this is a promising first step, I think ;-) Looks good, Huw! Maybe we should have delayed VS 2008 / slowed down the install a bit more so that you guys could have gotten more done :) -John From sanxiyn at gmail.com Tue Nov 20 22:20:23 2007 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Wed, 21 Nov 2007 12:20:23 +0900 Subject: [Ironruby-core] Compile error Message-ID: <5b0248170711201920m5397b4adv5853845ccd7548d6@mail.gmail.com> IronRuby SVN doesn't compile for me. $ rake compile mono=1 (snip) /home/tinuviel/svn/ironruby/src/microsoft.scripting/Ast/Compiler.cs(40,30): error CS1501: No overload for method `EmitBranchFalse' takes `2' arguments /home/tinuviel/svn/ironruby/src/microsoft.scripting/Ast/Compiler.Statements.cs(187,17): error CS1501: No overload for method `EmitBranchFalse' takes `2' arguments /home/tinuviel/svn/ironruby/src/microsoft.scripting/Ast/Compiler.Expressions.cs(200,13): error CS1501: No overload for method `EmitBranchFalse' takes `2' arguments -- Seo Sanghyeon From ivan at flanders.co.nz Tue Nov 20 22:22:26 2007 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Wed, 21 Nov 2007 16:22:26 +1300 Subject: [Ironruby-core] Compile error In-Reply-To: <5b0248170711201920m5397b4adv5853845ccd7548d6@mail.gmail.com> References: <5b0248170711201920m5397b4adv5853845ccd7548d6@mail.gmail.com> Message-ID: I can confirm that it doesn't compile for me either On 11/21/07, Sanghyeon Seo wrote: > > IronRuby SVN doesn't compile for me. > > $ rake compile mono=1 > (snip) > > /home/tinuviel/svn/ironruby/src/microsoft.scripting/Ast/Compiler.cs(40,30): > error CS1501: No overload for method `EmitBranchFalse' takes `2' > arguments > > /home/tinuviel/svn/ironruby/src/microsoft.scripting/Ast/Compiler.Statements.cs(187,17): > error CS1501: No overload for method `EmitBranchFalse' takes `2' > arguments > > /home/tinuviel/svn/ironruby/src/microsoft.scripting/Ast/Compiler.Expressions.cs(200,13): > error CS1501: No overload for method `EmitBranchFalse' takes `2' > arguments > > -- > 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: http://rubyforge.org/pipermail/ironruby-core/attachments/20071121/c75a746e/attachment.html From jflam at microsoft.com Tue Nov 20 22:23:57 2007 From: jflam at microsoft.com (John Lam (DLR)) Date: Tue, 20 Nov 2007 19:23:57 -0800 Subject: [Ironruby-core] Compile error In-Reply-To: <5b0248170711201920m5397b4adv5853845ccd7548d6@mail.gmail.com> References: <5b0248170711201920m5397b4adv5853845ccd7548d6@mail.gmail.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E06329DAAC4403@NA-EXMSG-C115.redmond.corp.microsoft.com> Yes - we're missing a file. It's because of stupid xcopy semantics. I'm working on it now. Thanks, -John > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Sanghyeon Seo > Sent: Tuesday, November 20, 2007 7:20 PM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] Compile error > > IronRuby SVN doesn't compile for me. > > $ rake compile mono=1 > (snip) > /home/tinuviel/svn/ironruby/src/microsoft.scripting/Ast/Compiler.cs(40, > 30): > error CS1501: No overload for method `EmitBranchFalse' takes `2' > arguments > /home/tinuviel/svn/ironruby/src/microsoft.scripting/Ast/Compiler.Statem > ents.cs(187,17): > error CS1501: No overload for method `EmitBranchFalse' takes `2' > arguments > /home/tinuviel/svn/ironruby/src/microsoft.scripting/Ast/Compiler.Expres > sions.cs(200,13): > error CS1501: No overload for method `EmitBranchFalse' takes `2' > arguments > > -- > Seo Sanghyeon > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From jflam at microsoft.com Tue Nov 20 22:45:16 2007 From: jflam at microsoft.com (John Lam (DLR)) Date: Tue, 20 Nov 2007 19:45:16 -0800 Subject: [Ironruby-core] Compile error In-Reply-To: <372109E149E8084D8E6C7D9CFD82E06329DAAC4403@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <5b0248170711201920m5397b4adv5853845ccd7548d6@mail.gmail.com> <372109E149E8084D8E6C7D9CFD82E06329DAAC4403@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E06329DAAC4405@NA-EXMSG-C115.redmond.corp.microsoft.com> Fixed in Revision 60. > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of John Lam (DLR) > Sent: Tuesday, November 20, 2007 7:24 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Compile error > > Yes - we're missing a file. It's because of stupid xcopy semantics. I'm > working on it now. > > Thanks, > -John From sanxiyn at gmail.com Tue Nov 20 23:18:56 2007 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Wed, 21 Nov 2007 13:18:56 +0900 Subject: [Ironruby-core] Compile error In-Reply-To: <372109E149E8084D8E6C7D9CFD82E06329DAAC4405@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <5b0248170711201920m5397b4adv5853845ccd7548d6@mail.gmail.com> <372109E149E8084D8E6C7D9CFD82E06329DAAC4403@NA-EXMSG-C115.redmond.corp.microsoft.com> <372109E149E8084D8E6C7D9CFD82E06329DAAC4405@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <5b0248170711202018n6a939eabl8a9bc67ade219f73@mail.gmail.com> 2007/11/21, John Lam (DLR) : > Fixed in Revision 60. Thanks, but r60 effectively reverted r59 which applied my Rakefile and ClassInitGenerator changes. -- Seo Sanghyeon From jflam at microsoft.com Wed Nov 21 14:39:21 2007 From: jflam at microsoft.com (John Lam (DLR)) Date: Wed, 21 Nov 2007 11:39:21 -0800 Subject: [Ironruby-core] Compile error In-Reply-To: <5b0248170711202018n6a939eabl8a9bc67ade219f73@mail.gmail.com> References: <5b0248170711201920m5397b4adv5853845ccd7548d6@mail.gmail.com> <372109E149E8084D8E6C7D9CFD82E06329DAAC4403@NA-EXMSG-C115.redmond.corp.microsoft.com> <372109E149E8084D8E6C7D9CFD82E06329DAAC4405@NA-EXMSG-C115.redmond.corp.microsoft.com> <5b0248170711202018n6a939eabl8a9bc67ade219f73@mail.gmail.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E06329DAAC4667@NA-EXMSG-C115.redmond.corp.microsoft.com> Sanghyeon Seo: > Thanks, but r60 effectively reverted r59 which applied my Rakefile and > ClassInitGenerator changes. Fixed in r61. Thanks! -John From myreply at gmail.com Fri Nov 23 07:15:43 2007 From: myreply at gmail.com (myreply) Date: Fri, 23 Nov 2007 17:45:43 +0530 Subject: [Ironruby-core] Final Release date and CTP/BETA for IronRuby Message-ID: Hi, I Just read the comments by John Lam on his blog explaining the approximate date for IronRuby 1.0 release. He says IronRuby 1.0 ( RTM) ) will not be available before the first half of next year. ( That clearly means, not before june 2008 ). Can some one clarify what would be the approximate date for CTP/BETA or IronRuby 1.0 Will IronPython come before IronRuby or everything depends on the Final DLR. Whats the exact reason for delay. Is it slow progress at DLR or any other particular reason. I hope some one explains about CTP or BETA. Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20071123/31c46af6/attachment.html From sanxiyn at gmail.com Fri Nov 23 07:36:56 2007 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Fri, 23 Nov 2007 21:36:56 +0900 Subject: [Ironruby-core] Final Release date and CTP/BETA for IronRuby In-Reply-To: References: Message-ID: <5b0248170711230436l68bc5f4cubd3a86f41c44c1c8@mail.gmail.com> 2007/11/23, myreply : > Will IronPython come before IronRuby or everything depends on the Final DLR. IronPython is already there! It runs wonderfully. So yes, IronPython came before IronRuby. -- Seo Sanghyeon From lists at ruby-forum.com Fri Nov 23 19:41:54 2007 From: lists at ruby-forum.com (N. F.) Date: Sat, 24 Nov 2007 01:41:54 +0100 Subject: [Ironruby-core] unable to load 'System.Windows.Forms' Message-ID: <093ecb1aaf2501e7d9bb96d8f9fbcb53@ruby-forum.com> Hi, After building IronRuby with the 'rake compile config=release' option (according to http://ironruby.rubyforge.org/wiki/wiki.pl?BuildingIronRuby), I am having problems with >>> require 'System.Windows.Forms'...this is what I get from the interpreter: Ruby.Runtime.LoadError: Could not load file or assembly 'System.Windows.Forms' o r one of its dependencies. The system cannot find the file specified. ---> Syste m.IO.FileNotFoundException: Could not load file or assembly 'System.Windows.Form s' or one of its dependencies. The system cannot find the file specified. File name: 'System.Windows.Forms' at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, E vidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Bool ean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence as semblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.Load(String assemblyString) at Microsoft.Scripting.Hosting.PlatformAdaptationLayer.LoadAssembly(String na me) at Ruby.Runtime.Loader.InternalLoadModule(String path, LoadFlags loadFlags, F ileKind& kind, SourceUnit& sourceUnit, Assembly& assembly) at Ruby.Runtime.Loader.LoadModule(CodeContext context, Object self, String pa th, LoadFlags flags) I ran IronRubyTestHost.exe without problems but when I run 'rake test', I get the following: ** Invoke test (first_time) ** Invoke happy (first_time) ** Execute happy ** Invoke test_libs (first_time) ** Execute test_libs "C:\NETPrj\IronRuby\build\debug\rbx.exe" "test_dir.rb" rake aborted! undefined method `exitstatus' for nil:NilClass c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:730:in `sh' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:737:in `call' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:737:in `sh' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:816:in `sh' C:/NETPrj/IronRuby/rakefile:195:in `exec' C:/NETPrj/IronRuby/rakefile:201:in `exec_net' C:/NETPrj/IronRuby/rakefile:556 C:/NETPrj/IronRuby/rakefile:556:in `each' C:/NETPrj/IronRuby/rakefile:556 C:/NETPrj/IronRuby/rakefile:554:in `chdir' C:/NETPrj/IronRuby/rakefile:554 C:/NETPrj/IronRuby/rakefile:553:in `each' C:/NETPrj/IronRuby/rakefile:553 c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:399:in `call' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:399:in `execute' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:399:in `each' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:399:in `execute' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:369:in `invoke' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:362:in `synchronize' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:362:in `invoke' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:376:in `invoke_prerequisit es' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1021:in `each' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1021:in `send' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1021:in `each' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:375:in `invoke_prerequisit es' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:368:in `invoke' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:362:in `synchronize' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:362:in `invoke' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1935:in `run' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1935:in `each' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1935:in `run' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/bin/rake:7 c:/ruby/bin/rake.bat:20:in `load' c:/ruby/bin/rake.bat:20 Sorry for the long email...but can someone help? Thanks! nfe -- Posted via http://www.ruby-forum.com/. From myreply at gmail.com Sat Nov 24 07:23:20 2007 From: myreply at gmail.com (myreply) Date: Sat, 24 Nov 2007 17:53:20 +0530 Subject: [Ironruby-core] Final Release date and CTP/BETA for IronRuby In-Reply-To: <5b0248170711230436l68bc5f4cubd3a86f41c44c1c8@mail.gmail.com> References: <5b0248170711230436l68bc5f4cubd3a86f41c44c1c8@mail.gmail.com> Message-ID: Thanks Seo, I think you are talking about Python 1.0 which works currently only on CLR. I am willing to work with IronRuby, which works on DLR. Can you be more specific about the CTP/BETA dates for IronRuby. Thanks IronRuby --------------------------------------------------------------------- On Nov 23, 2007 6:06 PM, Sanghyeon Seo wrote: > 2007/11/23, myreply : > > Will IronPython come before IronRuby or everything depends on the Final > DLR. > > IronPython is already there! It runs wonderfully. So yes, IronPython > came before IronRuby. > > -- > 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: http://rubyforge.org/pipermail/ironruby-core/attachments/20071124/ac000f82/attachment.html From luy at zlsoft.cn Mon Nov 26 02:48:43 2007 From: luy at zlsoft.cn (=?gb2312?B?wqzR5Q==?=) Date: Mon, 26 Nov 2007 15:48:43 +0800 Subject: [Ironruby-core] I can't get starting! Message-ID: <355DE70239689F4EAA5782352282003F3B6362@mail.zlsoft.cn> Sorry for I?m a newbie of IronRuby. I just want to do a most simple thing in IronRuby: a = 10 puts a then I got a lots of exception message, said that the ?a? is a undefined local variable. But I can do this in ruby. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20071126/6f2a01cd/attachment.html From sanxiyn at gmail.com Mon Nov 26 03:40:02 2007 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Mon, 26 Nov 2007 17:40:02 +0900 Subject: [Ironruby-core] I can't get starting! In-Reply-To: <355DE70239689F4EAA5782352282003F3B6362@mail.zlsoft.cn> References: <355DE70239689F4EAA5782352282003F3B6362@mail.zlsoft.cn> Message-ID: <5b0248170711260040n12678629g9ece8bebeff68d3d@mail.gmail.com> > I just want to do a most simple thing in IronRuby: > > a = 10 > puts a > > then I got a lots of exception message, said that the "a" is a undefined > local variable. I can confirm this behaviour, but only when run from the interactive console. It runs fine from file. -- Seo Sanghyeon From ivan at flanders.co.nz Mon Nov 26 04:24:52 2007 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Mon, 26 Nov 2007 22:24:52 +1300 Subject: [Ironruby-core] I can't get starting! In-Reply-To: <5b0248170711260040n12678629g9ece8bebeff68d3d@mail.gmail.com> References: <355DE70239689F4EAA5782352282003F3B6362@mail.zlsoft.cn> <5b0248170711260040n12678629g9ece8bebeff68d3d@mail.gmail.com> Message-ID: I can confirm this behavior too. But when i run the interactive console in powershell I can use the interactive console and I get no error On 11/26/07, Sanghyeon Seo wrote: > > > I just want to do a most simple thing in IronRuby: > > > > a = 10 > > puts a > > > > then I got a lots of exception message, said that the "a" is a undefined > > local variable. > > I can confirm this behaviour, but only when run from the interactive > console. It runs fine from file. > > -- > 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: http://rubyforge.org/pipermail/ironruby-core/attachments/20071126/cdefcab5/attachment.html From bacondarwin at googlemail.com Mon Nov 26 06:40:09 2007 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Mon, 26 Nov 2007 11:40:09 -0000 Subject: [Ironruby-core] I can't get starting! In-Reply-To: References: <355DE70239689F4EAA5782352282003F3B6362@mail.zlsoft.cn> <5b0248170711260040n12678629g9ece8bebeff68d3d@mail.gmail.com> Message-ID: <001e01c83021$1a6cefa0$4f46cee0$@com> This is a recognised bug in the current snapshot. Pete John Lam wrote: >> Thanks for the bug report. I forgot to include this in our release notes. >> >> 1. Spec stack trace reporting is broken in this release. The specs run (as you can see by the log, but there's something busted in the reporting - we'll investigate). >> >> 2. Local variables are broken in the console only - they work fine in your programs. This is by design as the next major work item on our plate is to fix hosting in DLR, which will fix hosting in IronRuby, which will enable eval* to work. >> >> Thanks, >> -John From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Monday,26 November 26, 2007 09:25 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] I can't get starting! I can confirm this behavior too. But when i run the interactive console in powershell I can use the interactive console and I get no error On 11/26/07, Sanghyeon Seo wrote: > I just want to do a most simple thing in IronRuby: > > a = 10 > puts a > > then I got a lots of exception message, said that the "a" is a undefined > local variable. I can confirm this behaviour, but only when run from the interactive console. It runs fine from file. -- 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: http://rubyforge.org/pipermail/ironruby-core/attachments/20071126/ad731626/attachment.html From Tomas.Matousek at microsoft.com Mon Nov 26 11:47:04 2007 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Mon, 26 Nov 2007 08:47:04 -0800 Subject: [Ironruby-core] I can't get starting! In-Reply-To: <001e01c83021$1a6cefa0$4f46cee0$@com> References: <355DE70239689F4EAA5782352282003F3B6362@mail.zlsoft.cn> <5b0248170711260040n12678629g9ece8bebeff68d3d@mail.gmail.com> <001e01c83021$1a6cefa0$4f46cee0$@com> Message-ID: Yes, this is expected for the time being. Only interactive console is affected. Please, use globals as a workaround until it gets fixed. Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Peter Bacon Darwin Sent: Monday, November 26, 2007 3:40 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] I can't get starting! This is a recognised bug in the current snapshot. Pete John Lam wrote: >> Thanks for the bug report. I forgot to include this in our release notes. >> >> 1. Spec stack trace reporting is broken in this release. The specs run (as you can see by the log, but there's something busted in the reporting - we'll investigate). >> >> 2. Local variables are broken in the console only - they work fine in your programs. This is by design as the next major work item on our plate is to fix hosting in DLR, which will fix hosting in IronRuby, which will enable eval* to work. >> >> Thanks, >> -John From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Monday,26 November 26, 2007 09:25 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] I can't get starting! I can confirm this behavior too. But when i run the interactive console in powershell I can use the interactive console and I get no error On 11/26/07, Sanghyeon Seo > wrote: > I just want to do a most simple thing in IronRuby: > > a = 10 > puts a > > then I got a lots of exception message, said that the "a" is a undefined > local variable. I can confirm this behaviour, but only when run from the interactive console. It runs fine from file. -- 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: http://rubyforge.org/pipermail/ironruby-core/attachments/20071126/9ce9e6e3/attachment-0001.html From luy at live.com Tue Nov 27 05:48:19 2007 From: luy at live.com (=?gb2312?B?wqzR5Q==?=) Date: Tue, 27 Nov 2007 10:48:19 +0000 Subject: [Ironruby-core] I can't get starting! In-Reply-To: References: <355DE70239689F4EAA5782352282003F3B6362@mail.zlsoft.cn> <5b0248170711260040n12678629g9ece8bebeff68d3d@mail.gmail.com> <001e01c83021$1a6cefa0$4f46cee0$@com> Message-ID: OK, I've got. thank you all From: Tomas.Matousek at microsoft.comTo: ironruby-core at rubyforge.orgDate: Mon, 26 Nov 2007 08:47:04 -0800Subject: Re: [Ironruby-core] I can't get starting! Yes, this is expected for the time being. Only interactive console is affected. Please, use globals as a workaround until it gets fixed. Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Peter Bacon DarwinSent: Monday, November 26, 2007 3:40 AMTo: ironruby-core at rubyforge.orgSubject: Re: [Ironruby-core] I can't get starting! This is a recognised bug in the current snapshot. Pete John Lam wrote: >> Thanks for the bug report. I forgot to include this in our release notes. >> >> 1. Spec stack trace reporting is broken in this release. The specs run (as you can see by the log, but there's something busted in the reporting - we'll investigate). >> >> 2. Local variables are broken in the console only - they work fine in your programs. This is by design as the next major work item on our plate is to fix hosting in DLR, which will fix hosting in IronRuby, which will enable eval* to work. >> >> Thanks, >> -John From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto CarreroSent: Monday,26 November 26, 2007 09:25To: ironruby-core at rubyforge.orgSubject: Re: [Ironruby-core] I can't get starting! I can confirm this behavior too. But when i run the interactive console in powershell I can use the interactive console and I get no error On 11/26/07, Sanghyeon Seo wrote: > I just want to do a most simple thing in IronRuby: >> a = 10> puts a>> then I got a lots of exception message, said that the "a" is a undefined> local variable.I can confirm this behaviour, but only when run from the interactive console. It runs fine from file.--Seo Sanghyeon_______________________________________________Ironruby-core mailing listIronruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core _________________________________________________________________ MSN ???????????????????? http://cn.msn.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20071127/154a0efd/attachment.html From Cory.Foy at microsoft.com Tue Nov 27 17:06:08 2007 From: Cory.Foy at microsoft.com (Cory Foy) Date: Tue, 27 Nov 2007 14:06:08 -0800 Subject: [Ironruby-core] unable to load 'System.Windows.Forms' In-Reply-To: <093ecb1aaf2501e7d9bb96d8f9fbcb53@ruby-forum.com> References: <093ecb1aaf2501e7d9bb96d8f9fbcb53@ruby-forum.com> Message-ID: <1AC17FAF2165B641AC2AF42BBEED58CF3BFB725225@NA-EXMSG-C110.redmond.corp.microsoft.com> Try using the strong name: C:\lang\IronRuby\Build\Release>rbx IronRuby Pre-Alpha (1.0.0.0) on .NET 2.0.50727.1378 Copyright (c) Microsoft Corporation. All rights reserved. >>> require 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' => true >>> I got that info from C:\Windows\Assembly (if you don't already have it memorized. ;)) Cory -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of N. F. Sent: Friday, November 23, 2007 7:42 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] unable to load 'System.Windows.Forms' Hi, After building IronRuby with the 'rake compile config=release' option (according to http://ironruby.rubyforge.org/wiki/wiki.pl?BuildingIronRuby), I am having problems with >>> require 'System.Windows.Forms'...this is what I get from the interpreter: Ruby.Runtime.LoadError: Could not load file or assembly 'System.Windows.Forms' o r one of its dependencies. The system cannot find the file specified. ---> Syste m.IO.FileNotFoundException: Could not load file or assembly 'System.Windows.Form s' or one of its dependencies. The system cannot find the file specified. File name: 'System.Windows.Forms' at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, E vidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Bool ean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence as semblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.Load(String assemblyString) at Microsoft.Scripting.Hosting.PlatformAdaptationLayer.LoadAssembly(String na me) at Ruby.Runtime.Loader.InternalLoadModule(String path, LoadFlags loadFlags, F ileKind& kind, SourceUnit& sourceUnit, Assembly& assembly) at Ruby.Runtime.Loader.LoadModule(CodeContext context, Object self, String pa th, LoadFlags flags) I ran IronRubyTestHost.exe without problems but when I run 'rake test', I get the following: ** Invoke test (first_time) ** Invoke happy (first_time) ** Execute happy ** Invoke test_libs (first_time) ** Execute test_libs "C:\NETPrj\IronRuby\build\debug\rbx.exe" "test_dir.rb" rake aborted! undefined method `exitstatus' for nil:NilClass c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:730:in `sh' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:737:in `call' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:737:in `sh' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:816:in `sh' C:/NETPrj/IronRuby/rakefile:195:in `exec' C:/NETPrj/IronRuby/rakefile:201:in `exec_net' C:/NETPrj/IronRuby/rakefile:556 C:/NETPrj/IronRuby/rakefile:556:in `each' C:/NETPrj/IronRuby/rakefile:556 C:/NETPrj/IronRuby/rakefile:554:in `chdir' C:/NETPrj/IronRuby/rakefile:554 C:/NETPrj/IronRuby/rakefile:553:in `each' C:/NETPrj/IronRuby/rakefile:553 c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:399:in `call' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:399:in `execute' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:399:in `each' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:399:in `execute' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:369:in `invoke' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:362:in `synchronize' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:362:in `invoke' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:376:in `invoke_prerequisit es' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1021:in `each' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1021:in `send' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1021:in `each' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:375:in `invoke_prerequisit es' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:368:in `invoke' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:362:in `synchronize' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:362:in `invoke' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1935:in `run' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1935:in `each' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1935:in `run' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/bin/rake:7 c:/ruby/bin/rake.bat:20:in `load' c:/ruby/bin/rake.bat:20 Sorry for the long email...but can someone help? Thanks! nfe -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From lists at ruby-forum.com Tue Nov 27 22:37:56 2007 From: lists at ruby-forum.com (N. F.) Date: Wed, 28 Nov 2007 04:37:56 +0100 Subject: [Ironruby-core] unable to load 'System.Windows.Forms' In-Reply-To: <1AC17FAF2165B641AC2AF42BBEED58CF3BFB725225@NA-EXMSG-C110.redmond.corp.microsoft.com> References: <093ecb1aaf2501e7d9bb96d8f9fbcb53@ruby-forum.com> <1AC17FAF2165B641AC2AF42BBEED58CF3BFB725225@NA-EXMSG-C110.redmond.corp.microsoft.com> Message-ID: <144bcf160ae7fa68e7e515854059c93f@ruby-forum.com> Cory Foy wrote: > Try using the strong name: > > C:\lang\IronRuby\Build\Release>rbx > IronRuby Pre-Alpha (1.0.0.0) on .NET 2.0.50727.1378 > Copyright (c) Microsoft Corporation. All rights reserved. >>>> require 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' > => true >>>> > > I got that info from C:\Windows\Assembly (if you don't already have it > memorized. ;)) > > Cory Thanks Cory! That did the trick...now to memorize or resort to the good ole cut and paste when using the interactive console... -- Posted via http://www.ruby-forum.com/. From dinov at exchange.microsoft.com Tue Nov 27 22:39:50 2007 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Tue, 27 Nov 2007 19:39:50 -0800 Subject: [Ironruby-core] unable to load 'System.Windows.Forms' In-Reply-To: <144bcf160ae7fa68e7e515854059c93f@ruby-forum.com> References: <093ecb1aaf2501e7d9bb96d8f9fbcb53@ruby-forum.com> <1AC17FAF2165B641AC2AF42BBEED58CF3BFB725225@NA-EXMSG-C110.redmond.corp.microsoft.com>, <144bcf160ae7fa68e7e515854059c93f@ruby-forum.com> Message-ID: <7AD436E4270DD54A94238001769C2227E453C89BC5@DF-GRTDANE-MSG.exchange.corp.microsoft.com> In IronPython we'll fall back to LoadWithPartialName which allows clr.AddReference('System.Windows.Forms') to work. Maybe IronRuby should consider doing the same thing? ________________________________________ From: ironruby-core-bounces at rubyforge.org [ironruby-core-bounces at rubyforge.org] On Behalf Of N. F. [lists at ruby-forum.com] Sent: Tuesday, November 27, 2007 7:37 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] unable to load 'System.Windows.Forms' Cory Foy wrote: > Try using the strong name: > > C:\lang\IronRuby\Build\Release>rbx > IronRuby Pre-Alpha (1.0.0.0) on .NET 2.0.50727.1378 > Copyright (c) Microsoft Corporation. All rights reserved. >>>> require 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' > => true >>>> > > I got that info from C:\Windows\Assembly (if you don't already have it > memorized. ;)) > > Cory Thanks Cory! That did the trick...now to memorize or resort to the good ole cut and paste when using the interactive console... -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From lists at ruby-forum.com Wed Nov 28 08:31:49 2007 From: lists at ruby-forum.com (N. F.) Date: Wed, 28 Nov 2007 14:31:49 +0100 Subject: [Ironruby-core] System::URI not implemented? Message-ID: <072e4f9ed02b75434948cb8359369226@ruby-forum.com> Hi, I think I have seen a list somewhere with the stuff that is not yet implemented in IronRuby...so, sorry if I ask this...I just couldn't find the list. Here is the code: >>> require 'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' >>> require "c:\\xcc\\net\\dll\\MarklogicXcc.dll" >>> $uri = System::Uri('xcc://adm:adm at localhost:9009') Here is what i get from the interpreter: System.MissingMethodException: undefined local variable or method `Uri' for Syst em:Ruby.Builtins.RubyClass at Ruby.Builtins.Kernel.MethodMissing(CodeContext context, Object self, Block Param block, SymbolId name, Object[] args) thanks! -- Posted via http://www.ruby-forum.com/. From jflam at microsoft.com Wed Nov 28 13:48:13 2007 From: jflam at microsoft.com (John Lam (DLR)) Date: Wed, 28 Nov 2007 10:48:13 -0800 Subject: [Ironruby-core] System::URI not implemented? In-Reply-To: <072e4f9ed02b75434948cb8359369226@ruby-forum.com> References: <072e4f9ed02b75434948cb8359369226@ruby-forum.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E06329DB3230E0@NA-EXMSG-C115.redmond.corp.microsoft.com> N. F.: > Here is the code: > >>> require 'System, Version=2.0.0.0, Culture=neutral, > PublicKeyToken=b77a5c561934e089' > >>> require "c:\\xcc\\net\\dll\\MarklogicXcc.dll" > >>> $uri = System::Uri('xcc://adm:adm at localhost:9009') You forgot the new ... $uri = System::Uri.new('xcc://adm:adm at localhost:9009') -John From jflam at microsoft.com Wed Nov 28 20:30:38 2007 From: jflam at microsoft.com (John Lam (DLR)) Date: Wed, 28 Nov 2007 17:30:38 -0800 Subject: [Ironruby-core] Final Release date and CTP/BETA for IronRuby In-Reply-To: References: <5b0248170711230436l68bc5f4cubd3a86f41c44c1c8@mail.gmail.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E06329DB6230D7@NA-EXMSG-C115.redmond.corp.microsoft.com> You can certainly just download the sources anytime and use IronRuby. We will not have anything that resembles a CTP for IronRuby. We will have betas once we have stabilized the language more. But it's way too early to speculate on dates for a beta release. Please do download the sources and provide us with specific feedback (bugs, features to prioritize etc). Thanks, -John > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of myreply > Sent: Saturday, November 24, 2007 4:23 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Final Release date and CTP/BETA for > IronRuby > > Thanks Seo, > > I think you are talking about Python 1.0 which works currently only on > CLR. > > I am willing to work with IronRuby, which works on DLR. > > Can you be more specific about the CTP/BETA dates for IronRuby. > > Thanks > > IronRuby > --------------------------------------------------------------------- > > > On Nov 23, 2007 6:06 PM, Sanghyeon Seo wrote: > > > 2007/11/23, myreply : > > > Will IronPython come before IronRuby or everything depends on the > Final DLR. > > > IronPython is already there! It runs wonderfully. So yes, IronPython > came before IronRuby. > > -- > Seo Sanghyeon > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > > From lists at ruby-forum.com Thu Nov 29 10:00:19 2007 From: lists at ruby-forum.com (N. F.) Date: Thu, 29 Nov 2007 16:00:19 +0100 Subject: [Ironruby-core] IronRuby and MarkLogic Message-ID: Hi, I have used IronPython to successfully connect and issue an xquery to a MarkLogic database (native XML database) using the following script: import clr clr.AddReferenceToFile("MarklogicXcc.dll") import Marklogic.Xcc import System print 'connecting to db...' uri = System.Uri('xcc://adm:adm at localhost:9003') contentSource = Marklogic.Xcc.ContentSourceFactory.NewContentSource(uri) print 'creating session...' session = contentSource.NewSession() print 'submitting query...' query = 'let $r := //Record[@UID eq "20069812"] return $r' request = session.NewAdhocQuery(query) resultSequence = session.SubmitRequest(request) print 'printing results...' results = resultSequence.AsString() print results Now, I am trying the same thing with IronRuby and here is how far I got: require 'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' require "c:\\IronRuby\\build\\release\\MarklogicXcc.dll" # all xcc dlls have to be in the same dir as ironruby (except for MarklogicXcc.dll) puts 'connecting to db...' $uri = System::Uri.new('xcc://admin:admin at localhost:9003') # help from John Lam here...thanks! $content_source = Marklogic::Xcc::ContentSourceFactory::NewContentSource($uri) puts 'creating session...' $session = $content_source::NewSession() For some reason, NewSession is not seen as a valid method. Here is part of the interpreter's output: System.MissingMethodException: undefined local variable or method `NewSession' for #:Ruby.Builtins.RubyClass at Ruby.Builtins.Kernel.MethodMissing(CodeContext context, Object self, Block Param block, SymbolId name, Object[] args) at Microsoft.Scripting.Utils.InvokeHelper`6.Invoke(Object arg0, Object arg1, Object arg2, Object arg3, Object arg4) The NewSession method is certainly part of the Marklogic DLL. I see it with Object Browser in Visual Studio, I used it successfully with IronPython above and with the production code I have, which is in C#. To make sure that I am not getting anything funny returning to $content_source, I tried this: $session = Marklogic::Xcc::ContentSource::NewSession("someId") But, still got the same error message... Any thoughts??? Thanks! -- Posted via http://www.ruby-forum.com/. From enicholson at gmail.com Thu Nov 29 11:29:56 2007 From: enicholson at gmail.com (Eric Nicholson) Date: Thu, 29 Nov 2007 11:29:56 -0500 Subject: [Ironruby-core] IronRuby and MarkLogic In-Reply-To: References: Message-ID: I think instead of $content_source::NewSession() you want $content_source.NewSession() :: is a scoping operator. -Eric On Nov 29, 2007 10:00 AM, N. F. wrote: > Hi, > > I have used IronPython to successfully connect and issue an xquery to a > MarkLogic database (native XML database) using the following script: > > import clr > clr.AddReferenceToFile("MarklogicXcc.dll") > import Marklogic.Xcc > import System > print 'connecting to db...' > uri = System.Uri('xcc://adm:adm at localhost:9003') > contentSource = Marklogic.Xcc.ContentSourceFactory.NewContentSource(uri) > print 'creating session...' > session = contentSource.NewSession() > print 'submitting query...' > query = 'let $r := //Record[@UID eq "20069812"] return $r' > request = session.NewAdhocQuery(query) > resultSequence = session.SubmitRequest(request) > print 'printing results...' > results = resultSequence.AsString() > print results > > Now, I am trying the same thing with IronRuby and here is how far I got: > > require 'System, Version=2.0.0.0, Culture=neutral, > PublicKeyToken=b77a5c561934e089' > require "c:\\IronRuby\\build\\release\\MarklogicXcc.dll" > # all xcc dlls have to be in the same dir as ironruby (except for > MarklogicXcc.dll) > puts 'connecting to db...' > $uri = System::Uri.new('xcc://admin:admin at localhost:9003') # help from > John Lam here...thanks! > $content_source = > Marklogic::Xcc::ContentSourceFactory::NewContentSource($uri) > puts 'creating session...' > $session = $content_source::NewSession() > > For some reason, NewSession is not seen as a valid method. Here is part > of the interpreter's output: > > System.MissingMethodException: undefined local variable or method > `NewSession' for > #: > Ruby.Builtins.RubyClass > at Ruby.Builtins.Kernel.MethodMissing(CodeContext context, Object > self, Block > Param block, SymbolId name, Object[] args) > at Microsoft.Scripting.Utils.InvokeHelper`6.Invoke(Object arg0, > Object arg1, > Object arg2, Object arg3, Object arg4) > > The NewSession method is certainly part of the Marklogic DLL. I see it > with Object Browser in Visual Studio, I used it successfully with > IronPython above and with the production code I have, which is in C#. > > To make sure that I am not getting anything funny returning to > $content_source, I tried this: > $session = Marklogic::Xcc::ContentSource::NewSession("someId") > But, still got the same error message... > > Any thoughts??? > > 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: http://rubyforge.org/pipermail/ironruby-core/attachments/20071129/1e2c19c7/attachment.html From lists at ruby-forum.com Thu Nov 29 11:43:29 2007 From: lists at ruby-forum.com (N. F.) Date: Thu, 29 Nov 2007 17:43:29 +0100 Subject: [Ironruby-core] IronRuby and MarkLogic In-Reply-To: References: Message-ID: <4a40f7c78576c3353ae8af75385c60b6@ruby-forum.com> Eric Nicholson wrote: > I think instead of > $content_source::NewSession() > > you want > $content_source.NewSession() > > :: is a scoping operator. > > -Eric Thanks Eric...but still the same error. Here is the whole error output: System.MissingMethodException: undefined local variable or method `NewSession' f or #:Ruby.Builtins.RubyClass at Ruby.Builtins.Kernel.MethodMissing(CodeContext context, Object self, Block Param block, SymbolId name, Object[] args) at Microsoft.Scripting.Utils.InvokeHelper`6.Invoke(Object arg0, Object arg1, Object arg2, Object arg3, Object arg4) at Microsoft.Scripting.Utils.ReflectedCaller.Invoke(Object[] args) at Microsoft.Scripting.Ast.MethodCallExpression.InvokeMethod(Object instance, Object[] parameters) at Microsoft.Scripting.Ast.MethodCallExpression.DoEvaluate(CodeContext contex t) at Microsoft.Scripting.Ast.ReturnStatement.DoExecute(CodeContext context) at Microsoft.Scripting.Ast.Statement.Execute(CodeContext context) at Microsoft.Scripting.Actions.StandardRule`1.ExecuteTarget(Object site, Code Context context, Object[] args) at Microsoft.Scripting.Actions.ActionBinder.UpdateSiteAndExecute[T](CodeConte xt callerContext, DynamicAction action, Object[] args, Object site, T& target, R uleSet`1& rules) at Microsoft.Scripting.Actions.FastDynamicSite`2.UpdateBindingAndInvoke(T0 ar g0) at Microsoft.Scripting.Actions.DynamicSiteHelpers.UninitializedTargetHelper`7 .FastInvoke1(FastDynamicSite`2 site, T0 arg0) at Microsoft.Scripting.Actions.FastDynamicSite`2.Invoke(T0 arg0) at helloml$mod_1.main$1() in helloml.rb:line 0 at Ruby.Runtime.RubyOps.RunMain(CodeContext context, Object main) at helloml$mod_1.Initialize(CodeContext ) in helloml.rb:line 0 at Microsoft.Scripting.ScriptCode.Run(CodeContext codeContext, Boolean tryEva luate) at Microsoft.Scripting.ScriptScope.Execute() at Ruby.Hosting.RubyCommandLine.RunFile(String path) -- Posted via http://www.ruby-forum.com/. From charles.nutter at sun.com Thu Nov 29 12:35:01 2007 From: charles.nutter at sun.com (Charles Oliver Nutter) Date: Thu, 29 Nov 2007 11:35:01 -0600 Subject: [Ironruby-core] IronRuby and MarkLogic In-Reply-To: References: Message-ID: <474EF845.1070806@sun.com> Eric Nicholson wrote: > I think instead of > $content_source::NewSession() > > you want > $content_source.NewSession() > > :: is a scoping operator. :: can be used to invoke methods just as well: 'foo'::reverse # => 'oof' It just has additional functionality for locating constants in a given namespace. - Charlie From jflam at microsoft.com Thu Nov 29 17:13:29 2007 From: jflam at microsoft.com (John Lam (DLR)) Date: Thu, 29 Nov 2007 14:13:29 -0800 Subject: [Ironruby-core] FW: Can someone do a review of Pete's patch so that we can submit? Message-ID: <372109E149E8084D8E6C7D9CFD82E06329DB62357D@NA-EXMSG-C115.redmond.corp.microsoft.com> Review from Tomas From: Tomas Matousek Sent: Thursday, November 29, 2007 12:32 PM To: John Lam (DLR); IronRuby Team Subject: RE: Can someone do a review of Pete's patch so that we can submit? Few issues: - Fixnum.Abs is incorrect: abs(Int32.MinValue) will blow up, it should overlflow to BigInteger. - Why FloatOps.ToInteger doesn't just do try { return (int)self; } catch (...) {...} ? Flooring is actually incorrect: (-0.4).to_i gives 0 in Ruby while -1 in IronRuby. A test for this is apparently missing. - Why FloatOps.Divmod doesn't use Math.IEEEReminder? There might be some precision peculiarity involved. Tomas -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20071129/4fb0de73/attachment.html From jflam at microsoft.com Thu Nov 29 19:35:17 2007 From: jflam at microsoft.com (John Lam (DLR)) Date: Thu, 29 Nov 2007 16:35:17 -0800 Subject: [Ironruby-core] IronRuby and MarkLogic In-Reply-To: References: Message-ID: <372109E149E8084D8E6C7D9CFD82E06329DB623698@NA-EXMSG-C115.redmond.corp.microsoft.com> N. F.: > Now, I am trying the same thing with IronRuby and here is how far I > got: > > require 'System, Version=2.0.0.0, Culture=neutral, > PublicKeyToken=b77a5c561934e089' > require "c:\\IronRuby\\build\\release\\MarklogicXcc.dll" > # all xcc dlls have to be in the same dir as ironruby (except for > MarklogicXcc.dll) > puts 'connecting to db...' > $uri = System::Uri.new('xcc://admin:admin at localhost:9003') # help from > John Lam here...thanks! > $content_source = > Marklogic::Xcc::ContentSourceFactory::NewContentSource($uri) > puts 'creating session...' > $session = $content_source::NewSession() > > For some reason, NewSession is not seen as a valid method. Here is part > of the interpreter's output: > > System.MissingMethodException: undefined local variable or method > `NewSession' for > #:Ruby.Builtins.Ruby > Class What's the visibility of ContentSourceImpl type and the NewSession method? If you could do a quick dump via Reflector that would help. Thanks, -John From lists at ruby-forum.com Thu Nov 29 22:35:58 2007 From: lists at ruby-forum.com (N. F.) Date: Fri, 30 Nov 2007 04:35:58 +0100 Subject: [Ironruby-core] IronRuby and MarkLogic In-Reply-To: <372109E149E8084D8E6C7D9CFD82E06329DB623698@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <372109E149E8084D8E6C7D9CFD82E06329DB623698@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <75f192a57ebd31511ac864d1101e95aa@ruby-forum.com> John Lam (DLR) wrote: > N. F.: > >> John Lam here...thanks! >> #:Ruby.Builtins.Ruby >> Class > > What's the visibility of ContentSourceImpl type and the NewSession > method? If you could do a quick dump via Reflector that would help. > > Thanks, > -John Thanks again John. Here is a dump via Reflector: internal class ContentSourceImpl : ContentSource { // Fields private readonly ContentSource source; // Methods internal ContentSourceImpl(ContentSource source); public Session NewSession(); public Session NewSession(string contentbaseId); public Session NewSession(string userName, string password); public Session NewSession(string userName, string password, string contentbaseId); } So, this is what I get from the call to... $content_source = Marklogic::Xcc::ContentSourceFactory::NewContentSource($uri) ...and here is the dump of that: public static ContentSource NewContentSource(Uri uri) { ContentSource source; try { source = new ContentSourceImpl(ContentSourceFactory.newContentSource(new URI(uri.ToString()))); } catch (XccConfigException exception) { throw new XccConfigException(exception); } return source; } Thanks for the help. -- Posted via http://www.ruby-forum.com/. From jomes at microsoft.com Thu Nov 29 23:41:23 2007 From: jomes at microsoft.com (John Messerly) Date: Thu, 29 Nov 2007 20:41:23 -0800 Subject: [Ironruby-core] IronRuby and MarkLogic In-Reply-To: <75f192a57ebd31511ac864d1101e95aa@ruby-forum.com> References: <372109E149E8084D8E6C7D9CFD82E06329DB623698@NA-EXMSG-C115.redmond.corp.microsoft.com> <75f192a57ebd31511ac864d1101e95aa@ruby-forum.com> Message-ID: <918705E903F4714CB713D89AB5F1857D738E8C6137@NA-EXMSG-C116.redmond.corp.microsoft.com> N.F.: > Thanks again John. Here is a dump via Reflector: > > internal class ContentSourceImpl : ContentSource { > Pure speculation, but we might be deciding that the method isn't callable because it's on an internal type. We need to search the class hierarchy to find the visible type so we can emit the call to the method on the visible type. Maybe there's a spot where we don't do that correctly. If you're up for diving into IronRuby's method binding logic, the place to put a breakpoint is in ironruby/runtime/RubyActionBinder.cs, MakeRuleForInvokeMember, in particular the line: RubyMethodBase method = ec.ResolveMethod(target, action.Name); At some point we'll hit that with action.Name == "NewSession". Then step into ResolveMethod and see what happens. It should eventually get to RubyClass.TryGetClrMember with name == "NewSession". But maybe it gets lost somewhere along the way... - John From bacondarwin at googlemail.com Fri Nov 30 03:20:19 2007 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Fri, 30 Nov 2007 08:20:19 -0000 Subject: [Ironruby-core] FW: Can someone do a review of Pete's patch so that we can submit? In-Reply-To: <372109E149E8084D8E6C7D9CFD82E06329DB62357D@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <372109E149E8084D8E6C7D9CFD82E06329DB62357D@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <000901c83329$d978d6b0$8c6a8410$@com> Hi Tomas, I was only focussing on Bignum methods. The other ones in Fixnum and Float were hacked together to support getting the specs to pass. I was going to look at Fixnum and Float next. Unfortunately, due to the coercion functionality in Ruby, it is not possible to completely isolate any of the numeric types from each other to unit test. Pete From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of John Lam (DLR) Sent: Thursday,29 November 29, 2007 22:13 To: ironruby-core at rubyforge.org Subject: [Ironruby-core] FW: Can someone do a review of Pete's patch so that we can submit? Review from Tomas From: Tomas Matousek Sent: Thursday, November 29, 2007 12:32 PM To: John Lam (DLR); IronRuby Team Subject: RE: Can someone do a review of Pete's patch so that we can submit? Few issues: - Fixnum.Abs is incorrect: abs(Int32.MinValue) will blow up, it should overlflow to BigInteger. - Why FloatOps.ToInteger doesn't just do try { return (int)self; } catch (.) {.} ? Flooring is actually incorrect: (-0.4).to_i gives 0 in Ruby while -1 in IronRuby. A test for this is apparently missing. - Why FloatOps.Divmod doesn't use Math.IEEEReminder? There might be some precision peculiarity involved. Tomas -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20071130/f653459e/attachment.html From lists at ruby-forum.com Fri Nov 30 09:30:25 2007 From: lists at ruby-forum.com (N. F.) Date: Fri, 30 Nov 2007 15:30:25 +0100 Subject: [Ironruby-core] IronRuby and MarkLogic In-Reply-To: <918705E903F4714CB713D89AB5F1857D738E8C6137@NA-EXMSG-C116.redmond.corp.microsoft.com> References: <372109E149E8084D8E6C7D9CFD82E06329DB623698@NA-EXMSG-C115.redmond.corp.microsoft.com> <75f192a57ebd31511ac864d1101e95aa@ruby-forum.com> <918705E903F4714CB713D89AB5F1857D738E8C6137@NA-EXMSG-C116.redmond.corp.microsoft.com> Message-ID: <13f5089658d136717f882cf693cf5a89@ruby-forum.com> John Messerly wrote: > > If you're up for diving into IronRuby's method binding logic, the place > to put a breakpoint is in ironruby/runtime/RubyActionBinder.cs, > MakeRuleForInvokeMember, in particular the line: > > RubyMethodBase method = ec.ResolveMethod(target, action.Name); > > At some point we'll hit that with action.Name == "NewSession". Then step > into ResolveMethod and see what happens. It should eventually get to > RubyClass.TryGetClrMember with name == "NewSession". But maybe it gets > lost somewhere along the way... > > - John Thanks John...I took up the task and here is what I found out (the most important point is the last one - in uppercase - see below: - calls GetImmediateClassOf(target).ResolveInstanceMethod(name); - target has only non-public members - module is null, so it calls RubyClass result = TryGetInstanceSingletonOf(obj, out data); - calls data = TryGetInstanceData(obj); - obj (Marklogic.Xcc.Impl.ContentSourceImpl) is null inside of that - calls TryGetData(object key) -eventually returns from TryGetInstanceData with result = null - calls GetClassOf(obj, data); - AND HERE IS THE PROBLEM...I think... - inside RubyModule.cs (line 481): // skip lookup on types that are not visible or interfaces: if (_tracker != null && _tracker.Type.IsVisible && !_tracker.Type.IsInterface) { return TryGetClrMember(_tracker.Type, name, out method); } ...this if returns false and it never calls TryGetClrMember! - Nivaldo -- Posted via http://www.ruby-forum.com/. From jomes at microsoft.com Fri Nov 30 21:21:40 2007 From: jomes at microsoft.com (John Messerly) Date: Fri, 30 Nov 2007 18:21:40 -0800 Subject: [Ironruby-core] IronRuby and MarkLogic In-Reply-To: <13f5089658d136717f882cf693cf5a89@ruby-forum.com> References: <372109E149E8084D8E6C7D9CFD82E06329DB623698@NA-EXMSG-C115.redmond.corp.microsoft.com> <75f192a57ebd31511ac864d1101e95aa@ruby-forum.com> <918705E903F4714CB713D89AB5F1857D738E8C6137@NA-EXMSG-C116.redmond.corp.microsoft.com> <13f5089658d136717f882cf693cf5a89@ruby-forum.com> Message-ID: <918705E903F4714CB713D89AB5F1857D738E8C6586@NA-EXMSG-C116.redmond.corp.microsoft.com> N.F.: > - AND HERE IS THE PROBLEM...I think... > - inside RubyModule.cs (line 481): > // skip lookup on types that are not visible or interfaces: > if (_tracker != null && _tracker.Type.IsVisible && > !_tracker.Type.IsInterface) { > return TryGetClrMember(_tracker.Type, name, out method); } ...this if > returns false and it never calls TryGetClrMember! > Yup, I think you found the problem. I didn't get a chance to look at it today, but I'll take a look at it Monday (unless I can get Tomas to fix it :) ). Hopefully it's an easy fix - John