From lists at ruby-forum.com Tue May 3 01:23:56 2011 From: lists at ruby-forum.com (Sundhari Bala) Date: Tue, 03 May 2011 07:23:56 +0200 Subject: [Ironruby-core] IronRuby + actionmailer: uninitialized constant Net::InternetMessageIO::TCPsocket In-Reply-To: <77d6ff59bf9b745d95b65b32f0c6be2f@ruby-forum.com> References: <77d6ff59bf9b745d95b65b32f0c6be2f@ruby-forum.com> Message-ID: <1ee7d811d64254e8759a6b8ea2f344d5@ruby-forum.com> Hi, I am using 'tlsmail' in rails 2.3.5.I configured gmail its working fine. Now I modify the below domain: #setup tlsmail so we can send email through SSLed SMTP require 'tlsmail' Net::SMTP.enable_tls(OpenSSL::SSL::VERIFY_NONE) ActionMailer::Base.delivery_method = :smtp ActionMailer::Base.perform_deliveries = true ActionMailer::Base.default_charset = "utf-8" ActionMailer::Base.raise_delivery_errors = true ActionMailer::Base.smtp_settings = { #:enable_starttls_auto => true, :address => 'mail.ghabit.com', :port => 25, :domain => 'ghabit.com', :authentication => :plain, :user_name => 'notification at ghabit.com', :password => 'password' } I got the below error. Please anyone solve this issue help me. Net::SMTPSyntaxError in UserController#signup 502 Unimplemented command. RAILS_ROOT: E:/openwire/ghabit_app Application Trace | Framework Trace | Full Trace c:/ruby/lib/ruby/gems/1.8/gems/tlsmail-0.0.1/lib/net/smtp.rb:787:in `check_response' c:/ruby/lib/ruby/gems/1.8/gems/tlsmail-0.0.1/lib/net/smtp.rb:760:in `getok' c:/ruby/lib/ruby/gems/1.8/gems/tlsmail-0.0.1/lib/net/smtp.rb:747:in `starttls' c:/ruby/lib/ruby/gems/1.8/gems/tlsmail-0.0.1/lib/net/smtp.rb:478:in `do_start' c:/ruby/lib/ruby/gems/1.8/gems/tlsmail-0.0.1/lib/net/smtp.rb:440:in `start' c:/ruby/lib/ruby/gems/1.8/gems/actionmailer-2.3.5/lib/action_mailer/base.rb:682:in `perform_delivery_smtp' c:/ruby/lib/ruby/gems/1.8/gems/actionmailer-2.3.5/lib/action_mailer/base.rb:523:in `__send__' c:/ruby/lib/ruby/gems/1.8/gems/actionmailer-2.3.5/lib/action_mailer/base.rb:523:in `deliver!' c:/ruby/lib/ruby/gems/1.8/gems/actionmailer-2.3.5/lib/action_mailer/base.rb:429:in `deliver' E:/openwire/ghabit_app/app/controllers/user_controller.rb:1949:in `signup_email' E:/openwire/ghabit_app/app/controllers/user_controller.rb:203:in `signup' Request Parameters: {"user"=>{"date_of_birth(2i)"=>"5", "date_of_birth(3i)"=>"3", "country"=>"United States", "agree"=>"1", "sex"=>"Female", "first_name"=>"Sundhari", "last_name"=>"Bala", "user_name"=>"sundhari", "password"=>"sundhari", "email"=>"sundhari1979 at gmail.com", "date_of_birth(1i)"=>"1973"}, "commit"=>""} Show session dump Response Headers: {"Content-Type"=>"", "Cache-Control"=>"no-cache"} Regards, B.Sundhari -- Posted via http://www.ruby-forum.com/. From nik at terminaldischarge.net Tue May 3 16:30:53 2011 From: nik at terminaldischarge.net (Nicholas Radford) Date: Tue, 3 May 2011 21:30:53 +0100 Subject: [Ironruby-core] Hi guys Message-ID: hi guys, just wondering if this is still the right list to post to as I wish to start contributing to the project. -- Nik Radford From Tomas.Matousek at microsoft.com Tue May 3 18:10:39 2011 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 3 May 2011 22:10:39 +0000 Subject: [Ironruby-core] Hi guys In-Reply-To: References: Message-ID: <9597F4A19BFDB342B6E90963100C330824C37C@SN2PRD0302MB113.namprd03.prod.outlook.com> It is. Feel free to send start discussion on features you want to work on. See https://github.com/IronLanguages/main/wiki for useful info. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Nicholas Radford Sent: Tuesday, May 03, 2011 1:31 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Hi guys hi guys, just wondering if this is still the right list to post to as I wish to start contributing to the project. -- Nik Radford _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From ryan.riley at panesofglass.org Tue May 3 18:43:02 2011 From: ryan.riley at panesofglass.org (Ryan Riley) Date: Tue, 3 May 2011 15:43:02 -0700 Subject: [Ironruby-core] Hi guys In-Reply-To: References: Message-ID: On Tue, May 3, 2011 at 1:30 PM, Nicholas Radford wrote: > hi guys, > > just wondering if this is still the right list to post to as I wish > to start contributing to the project. > Absolutely! -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ruby-forum.com Wed May 4 02:17:06 2011 From: lists at ruby-forum.com (sridharans sivamurugan) Date: Wed, 04 May 2011 08:17:06 +0200 Subject: [Ironruby-core] Getting value of IronRuby object's property using reflections In-Reply-To: <18d3aa069bc9ba1b0baba05773ff098a@ruby-forum.com> References: <18d3aa069bc9ba1b0baba05773ff098a@ruby-forum.com> Message-ID: <4a5bd910a74e28d82f944bf4d0ed2e1c@ruby-forum.com> Hi Charles, I'm trying to get the value of the Iron Ruby objects using reflection(using Property Descriptor). This is my ultimate need. -Sri. -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Wed May 4 02:23:07 2011 From: lists at ruby-forum.com (sridharans sivamurugan) Date: Wed, 04 May 2011 08:23:07 +0200 Subject: [Ironruby-core] How to acces the Application's control in Iron Ruby script Message-ID: <4c14ae8176724a974601070e95091b22@ruby-forum.com> Hi All, I'm trying to do the same in IronRuby that I have done in IronPython script, but its throwing some exception as undefine constant. I dont know how to achieve it Iron Ruby. In Puthon I will access the control that is placed in the applicatoin and set its source in the Script itself. But in Ruby I dont know how to do it. Can any one help me to achieve this. -Sri. Python Code : grid = Application.FindName('MyListBox') grid.ItemsSource = MyObject While using the same in IronRuby its throwing exception as undefined constant "Application". -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Wed May 4 08:11:11 2011 From: lists at ruby-forum.com (Eduardo Blumenfeld) Date: Wed, 04 May 2011 14:11:11 +0200 Subject: [Ironruby-core] How to acces the Application's control in Iron Ruby script In-Reply-To: <4c14ae8176724a974601070e95091b22@ruby-forum.com> References: <4c14ae8176724a974601070e95091b22@ruby-forum.com> Message-ID: <48b7b7fb938fd4644a5eef3374c0f443@ruby-forum.com> Hi Sri, I assume that you are trying to work from a wpf application... in Ruby, variables that start in upper case are interpreted as constants... Did you try? list = self.FindName('MyListBox') list.ItemsSource = myObject (note the lower case names)... Regards, Eduardo Blumenfeld Sridharan Sivamurugan wrote in post #996532: > Hi All, > > I'm trying to do the same in IronRuby that I have done in IronPython > script, but its throwing some exception as undefine constant. I dont > know how to achieve it Iron Ruby. > > In Puthon I will access the control that is placed in the applicatoin > and set its source in the Script itself. But in Ruby I dont know how to > do it. > Can any one help me to achieve this. > > -Sri. > > Python Code : > > List = Application.FindName('MyListBox') > List.ItemsSource = MyObject > > While using the same in IronRuby its throwing exception as undefined > constant "Application". -- Posted via http://www.ruby-forum.com/. From nik at terminaldischarge.net Wed May 4 17:02:17 2011 From: nik at terminaldischarge.net (Nicholas Radford) Date: Wed, 4 May 2011 22:02:17 +0100 Subject: [Ironruby-core] Fwd: WorkItem Issue #6095 - "IronRuby 1.1.3 Can't count" In-Reply-To: References: Message-ID: Hey all, ? ?I thought I'd look at issue #6095 on codeplex (http://ironruby.codeplex.com/workitem/6095) as my first contribution. ? ?Having a dig through the code lead me to ArrayOps which then lead me IListOps in the IronRuby.Libraries project. ? ?I noticed IListOps.Length had the [RubyMethod("count")] attribute method which only returned the arrays count. Have to some digging (and unneeded code writing then reverting) ? ?I looked at the ruby doc and saw Array mixed in Enumerable, looked around and found that IListOps was indeed marked to include Enumerable and sure enough found the 3 count methods. ? ?One for no parameters, one with, and one with a block that did all they were supposed to do. ? ?So ?the RubyMethod declaration for count in IListOps was overriding the method declarations in Enumerable once the ruby class was put together at runtime. ? ?I removed the RubyMethod declaration on IListOps compiled and ran the IronRuby console, tried out all three versions of count and they all worked. ? ?Now, I can see why the count declaration on IListOps was put there, because accessing the internal count property on RubyArray is much quicker than counting and iterating over the collection, however, the ruby methods length and size for quick access to the number of elements in the RubyArray. ? I see two ways of fixing the bug, ? ? ?1. removing the [RubyMethod("count")] declaration from IListOps.Length which would make count inefficent on IList's. ? ? ?2. reimplementing the object and block variations of count in IListOps In my humble opinion, 1 would be best, but since this is my first change I'd thought I'd get some input. Cheers, -- Nik Radford Mobile: 07884 254 866 Email: nikradford at googlemail.com -- Nik Radford Mobile: 07884 254 866 Email: nikradford at googlemail.com From ryan.riley at panesofglass.org Wed May 4 18:20:12 2011 From: ryan.riley at panesofglass.org (Ryan Riley) Date: Wed, 4 May 2011 15:20:12 -0700 Subject: [Ironruby-core] Fwd: WorkItem Issue #6095 - "IronRuby 1.1.3 Can't count" In-Reply-To: References: Message-ID: On Wed, May 4, 2011 at 2:02 PM, Nicholas Radford wrote: > Hey all, > > I thought I'd look at issue #6095 on codeplex > (http://ironruby.codeplex.com/workitem/6095) as my first contribution. > > I see two ways of fixing the bug, > 1. removing the [RubyMethod("count")] declaration from > IListOps.Length which would make count inefficent on IList's. > 2. reimplementing the object and block variations of count in IListOps > > In my humble opinion, 1 would be best, but since this is my first > change I'd thought I'd get some input. > I'm partial to option 2. As Ruby is already a slow language, we should try to optimize it wherever possible. In addition, 2 keeps to the trend in other .NET languages. For example, I believe LINQ takes advantage of existing methods on Lists when it can. Ryan -------------- next part -------------- An HTML attachment was scrubbed... URL: From orion.edwards at gmail.com Wed May 4 22:14:14 2011 From: orion.edwards at gmail.com (Orion Edwards) Date: Thu, 5 May 2011 14:14:14 +1200 Subject: [Ironruby-core] Fwd: WorkItem Issue #6095 - "IronRuby 1.1.3 Can't count" In-Reply-To: References: Message-ID: > > I see two ways of fixing the bug, >> >> 1. removing the [RubyMethod("count")] declaration from >> IListOps.Length which would make count inefficent on IList's. >> 2. reimplementing the object and block variations of count in >> IListOps >> >> In my humble opinion, 1 would be best, but since this is my first >> change I'd thought I'd get some input. >> >> > I'm partial to option 2. As Ruby is already a slow language, we should try > to optimize it wherever possible. In addition, 2 keeps to the trend in other > .NET languages. For example, I believe LINQ takes advantage of existing > methods on Lists when it can. > Likewise. Because arrays are used absolutely everywhere in ruby, making a common method like count slower will have a whole lot of hidden performance penalties... Anything we can do to make these core classes faster is a win for everyone -------------- next part -------------- An HTML attachment was scrubbed... URL: From nik at terminaldischarge.net Thu May 5 04:32:36 2011 From: nik at terminaldischarge.net (Nicholas Radford) Date: Thu, 5 May 2011 09:32:36 +0100 Subject: [Ironruby-core] Fwd: WorkItem Issue #6095 - "IronRuby 1.1.3 Can't count" In-Reply-To: References: Message-ID: >> I'm partial to?option 2. As Ruby is already a slow language, we should try >> to optimize it wherever possible. In addition, 2 keeps to the trend in other >> .NET languages. For example, I believe LINQ takes advantage of existing >> methods on Lists when it can. > > Likewise. Because arrays are used absolutely everywhere in ruby, making a > common method like count slower will have a whole lot of hidden performance > penalties... Anything we can do to make these core classes faster is a win > for everyone Alright, I'll get onto doing option 2 when I get home this evening. Thanks guys. From nik at terminaldischarge.net Sat May 7 03:46:22 2011 From: nik at terminaldischarge.net (Nicholas Radford) Date: Sat, 7 May 2011 08:46:22 +0100 Subject: [Ironruby-core] Fwd: WorkItem Issue #6095 - "IronRuby 1.1.3 Can't count" In-Reply-To: References: Message-ID: On 5 May 2011 09:32, Nicholas Radford wrote: >>> I'm partial to?option 2. As Ruby is already a slow language, we should try >>> to optimize it wherever possible. In addition, 2 keeps to the trend in other >>> .NET languages. For example, I believe LINQ takes advantage of existing >>> methods on Lists when it can. >> >> Likewise. Because arrays are used absolutely everywhere in ruby, making a >> common method like count slower will have a whole lot of hidden performance >> penalties... Anything we can do to make these core classes faster is a win >> for everyone > > Alright, I'll get onto doing option 2 when I get home this evening. > > Thanks guys. > Quick question guys, when pushing this to my repo on github, should I push to a topic branch or push to master? -- Nik Radford Mobile: 07884 254 866 Email: nikradford at googlemail.com From nik at terminaldischarge.net Sat May 7 04:12:51 2011 From: nik at terminaldischarge.net (Nicholas Radford) Date: Sat, 7 May 2011 09:12:51 +0100 Subject: [Ironruby-core] Fwd: WorkItem Issue #6095 - "IronRuby 1.1.3 Can't count" In-Reply-To: References: Message-ID: > > Quick question guys, when pushing this to my repo on github, should I > push to a topic branch or push to master? > Well I pushed it to a topic branch, just in case you guys required changes :) As the contributing documentation says, would someone mind giving me a code review? Code can be found at https://github.com/sekhat/main/tree/bugfix/issue-6095 Cheers. From Tomas.Matousek at microsoft.com Sat May 7 21:17:43 2011 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Sun, 8 May 2011 01:17:43 +0000 Subject: [Ironruby-core] Fwd: WorkItem Issue #6095 - "IronRuby 1.1.3 Can't count" In-Reply-To: References: Message-ID: <9597F4A19BFDB342B6E90963100C330827ED60@SN2PRD0302MB113.namprd03.prod.outlook.com> Yes, this is the right process - fix it in a branch and send a pull request. The change looks great! Merged into main and closed the bug. Thanks, Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Nicholas Radford Sent: Saturday, May 07, 2011 1:13 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Fwd: WorkItem Issue #6095 - "IronRuby 1.1.3 Can't count" > > Quick question guys, when pushing this to my repo on github, should I > push to a topic branch or push to master? > Well I pushed it to a topic branch, just in case you guys required changes :) As the contributing documentation says, would someone mind giving me a code review? Code can be found at https://github.com/sekhat/main/tree/bugfix/issue-6095 Cheers. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From lists at ruby-forum.com Wed May 11 02:37:16 2011 From: lists at ruby-forum.com (Dave Lilley) Date: Wed, 11 May 2011 08:37:16 +0200 Subject: [Ironruby-core] mysql + sequel Message-ID: <66fa5782b932cf86db641b97ba672d4c@ruby-forum.com> Installed sequel gem okay but mysql throws up this error when i try to install. C:\Documents and Settings\Owner\My Documents\ruby_test\rub y_test>igem install mysql Building native extensions. This could take a while... ERROR: Error installing mysql: ERROR: Failed to build gem native extension. "C:/Program Files/IronRuby 1.1/bin/ir.exe" extconf.rb extconf.rb:99: syntax error, unexpected end of file, expecting `end' Gem files will remain installed in C:/Program Files/IronRuby 1.1/Lib/ruby/gems/1 .9.1/gems/mysql-2.8.1 for inspection. Results logged to C:/Program Files/IronRuby 1.1/Lib/ruby/gems/1.9.1/gems/mysql-2 .8.1/ext/mysql_api/gem_make.out C:\Documents and Settings\Owner\My Documents\ruby_test\rub y_test> any help ? TiA -- Posted via http://www.ruby-forum.com/. From robj.perez at gmail.com Wed May 11 06:55:32 2011 From: robj.perez at gmail.com (Roberto Perez) Date: Wed, 11 May 2011 12:55:32 +0200 Subject: [Ironruby-core] Commit to solve bug: String.delete gives a wrong result (http://ironruby.codeplex.com/workitem/5426) Message-ID: Hi, I committed in my fork a very small change to solve the bug which is in http://ironruby.codeplex.com/workitem/5426 The commit is in: https://github.com/robjperez/main/commit/7d94882990bc80504a78c7ed9ea989e31b8e19ed The problem was inside the range detector in the delete method. When it finds a '-' character, it assumes that the string is a range, but when you use the \ before the '-' you are telling that the '-' char is a literal. The change was in the File MutableStringOps.cs in the Delete Method. This is my first contribution to IronRuby, so I don't know if i'm following all the steps in the right order :), so, forgive me if i'm doing wrong but I followed the guides written in github wiki. Shall I proceed with the pull request to main repository, or are you going to review the commit before? Regards. Roberto -- http://zbutton.wordpress.com/ blog sobre programaci?n y tecnolog?a -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tomas.Matousek at microsoft.com Wed May 11 12:23:11 2011 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Wed, 11 May 2011 16:23:11 +0000 Subject: [Ironruby-core] Commit to solve bug: String.delete gives a wrong result (http://ironruby.codeplex.com/workitem/5426) In-Reply-To: References: Message-ID: <9597F4A19BFDB342B6E90963100C33082813E2@SN2PRD0302MB113.namprd03.prod.outlook.com> I'll take a look. Could you add some tests to the specs, unless there already are some? Let me know if you have any questions. Thanks, Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Roberto Perez Sent: Wednesday, May 11, 2011 3:56 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Commit to solve bug: String.delete gives a wrong result (http://ironruby.codeplex.com/workitem/5426) Hi, I committed in my fork a very small change to solve the bug which is in http://ironruby.codeplex.com/workitem/5426 The commit is in: https://github.com/robjperez/main/commit/7d94882990bc80504a78c7ed9ea989e31b8e19ed The problem was inside the range detector in the delete method. When it finds a '-' character, it assumes that the string is a range, but when you use the \ before the '-' you are telling that the '-' char is a literal. The change was in the File MutableStringOps.cs in the Delete Method. This is my first contribution to IronRuby, so I don't know if i'm following all the steps in the right order :), so, forgive me if i'm doing wrong but I followed the guides written in github wiki. Shall I proceed with the pull request to main repository, or are you going to review the commit before? Regards. Roberto -- http://zbutton.wordpress.com/ blog sobre programaci?n y tecnolog?a -------------- next part -------------- An HTML attachment was scrubbed... URL: From robj.perez at gmail.com Wed May 11 18:26:47 2011 From: robj.perez at gmail.com (Roberto Perez) Date: Thu, 12 May 2011 00:26:47 +0200 Subject: [Ironruby-core] Commit to solve bug: String.delete gives a wrong result (http://ironruby.codeplex.com/workitem/5426) In-Reply-To: <9597F4A19BFDB342B6E90963100C33082813E2@SN2PRD0302MB113.namprd03.prod.outlook.com> References: <9597F4A19BFDB342B6E90963100C33082813E2@SN2PRD0302MB113.namprd03.prod.outlook.com> Message-ID: Ok I'll add some tests to check the functionality of this commit. I was trying to add one, but i'm having some problems passing the same "pattern string" due to the difference between ruby syntax and c# one. (As the tests are written in c#) I'll tell you as soon as I have the test done. Cheers On Wed, May 11, 2011 at 6:23 PM, Tomas Matousek < Tomas.Matousek at microsoft.com> wrote: > I?ll take a look. Could you add some tests to the specs, unless there > already are some? Let me know if you have any questions. > > > > Thanks, > > Tomas > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Roberto Perez > *Sent:* Wednesday, May 11, 2011 3:56 AM > *To:* ironruby-core at rubyforge.org > *Subject:* [Ironruby-core] Commit to solve bug: String.delete gives a > wrong result (http://ironruby.codeplex.com/workitem/5426) > > > > Hi, > > > > I committed in my fork a very small change to solve the bug which is in > http://ironruby.codeplex.com/workitem/5426 > > The commit is in: > https://github.com/robjperez/main/commit/7d94882990bc80504a78c7ed9ea989e31b8e19ed > > > > The problem was inside the range detector in the delete method. > > When it finds a '-' character, it assumes that the string is a range, but > when you use the \ before the '-' you are telling that the '-' char is a > literal. > > > > The change was in the File MutableStringOps.cs in the Delete Method. > > > > This is my first contribution to IronRuby, so I don't know if i'm following > all the steps in the right order :), so, forgive me if i'm doing wrong but I > followed the guides written in github wiki. > > > > Shall I proceed with the pull request to main repository, or are you going > to review the commit before? > > > > Regards. > > Roberto > > > -- > http://zbutton.wordpress.com/ > blog sobre programaci?n y tecnolog?a > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -- http://zbutton.wordpress.com/ blog sobre programaci?n y tecnolog?a -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tomas.Matousek at microsoft.com Wed May 11 18:54:42 2011 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Wed, 11 May 2011 22:54:42 +0000 Subject: [Ironruby-core] Commit to solve bug: String.delete gives a wrong result (http://ironruby.codeplex.com/workitem/5426) In-Reply-To: References: <9597F4A19BFDB342B6E90963100C33082813E2@SN2PRD0302MB113.namprd03.prod.outlook.com> Message-ID: <9597F4A19BFDB342B6E90963100C330828295D@SN2PRD0302MB113.namprd03.prod.outlook.com> I meant Ruby mspec tests located in Languages\Ruby\Tests\mspec\rubyspec\core\string (for strings). You might find they are already written but disabled. In that case remove the corresponding entries from tags: Languages\Ruby\Tests\mspec\ironruby-tags-19\core\string You can find more on mspec here: https://github.com/rubyspec/mspec Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Roberto Perez Sent: Wednesday, May 11, 2011 3:27 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Commit to solve bug: String.delete gives a wrong result (http://ironruby.codeplex.com/workitem/5426) Ok I'll add some tests to check the functionality of this commit. I was trying to add one, but i'm having some problems passing the same "pattern string" due to the difference between ruby syntax and c# one. (As the tests are written in c#) I'll tell you as soon as I have the test done. Cheers On Wed, May 11, 2011 at 6:23 PM, Tomas Matousek > wrote: I'll take a look. Could you add some tests to the specs, unless there already are some? Let me know if you have any questions. Thanks, Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Roberto Perez Sent: Wednesday, May 11, 2011 3:56 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Commit to solve bug: String.delete gives a wrong result (http://ironruby.codeplex.com/workitem/5426) Hi, I committed in my fork a very small change to solve the bug which is in http://ironruby.codeplex.com/workitem/5426 The commit is in: https://github.com/robjperez/main/commit/7d94882990bc80504a78c7ed9ea989e31b8e19ed The problem was inside the range detector in the delete method. When it finds a '-' character, it assumes that the string is a range, but when you use the \ before the '-' you are telling that the '-' char is a literal. The change was in the File MutableStringOps.cs in the Delete Method. This is my first contribution to IronRuby, so I don't know if i'm following all the steps in the right order :), so, forgive me if i'm doing wrong but I followed the guides written in github wiki. Shall I proceed with the pull request to main repository, or are you going to review the commit before? Regards. Roberto -- http://zbutton.wordpress.com/ blog sobre programaci?n y tecnolog?a _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -- http://zbutton.wordpress.com/ blog sobre programaci?n y tecnolog?a -------------- next part -------------- An HTML attachment was scrubbed... URL: From robj.perez at gmail.com Fri May 13 15:41:02 2011 From: robj.perez at gmail.com (Roberto Perez) Date: Fri, 13 May 2011 21:41:02 +0200 Subject: [Ironruby-core] Commit to solve bug: String.delete gives a wrong result (http://ironruby.codeplex.com/workitem/5426) In-Reply-To: <9597F4A19BFDB342B6E90963100C330828295D@SN2PRD0302MB113.namprd03.prod.outlook.com> References: <9597F4A19BFDB342B6E90963100C33082813E2@SN2PRD0302MB113.namprd03.prod.outlook.com> <9597F4A19BFDB342B6E90963100C330828295D@SN2PRD0302MB113.namprd03.prod.outlook.com> Message-ID: Hi! There was no test to check this problem so i added it to the spec file in this commit: https://github.com/robjperez/main/commit/83f87a4ab1573511bb4de00a7b57c10ea441c5ee I added this: "he-lo".delete('\-\'').should == "helo" which fails in current version but is fixed in the commit I mailed before. In the tags file, there was no tag regarding this issue. There is a tag regarding another excepcion with ranges, but I think it is not about this one. Cheers Roberto. On Thu, May 12, 2011 at 12:54 AM, Tomas Matousek < Tomas.Matousek at microsoft.com> wrote: > I meant Ruby mspec tests located in > Languages\Ruby\Tests\mspec\rubyspec\core\string (for strings). > > You might find they are already written but disabled. In that case remove > the corresponding entries from tags: > > Languages\Ruby\Tests\mspec\ironruby-tags-19\core\string > > > > You can find more on mspec here: https://github.com/rubyspec/mspec > > > > Tomas > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Roberto Perez > *Sent:* Wednesday, May 11, 2011 3:27 PM > > *To:* ironruby-core at rubyforge.org > *Subject:* Re: [Ironruby-core] Commit to solve bug: String.delete gives a > wrong result (http://ironruby.codeplex.com/workitem/5426) > > > > Ok I'll add some tests to check the functionality of this commit. > > > > I was trying to add one, but i'm having some problems passing the same > "pattern string" due to the difference between ruby syntax and c# one. (As > the tests are written in c#) > > > > I'll tell you as soon as I have the test done. > > > > Cheers > > > > On Wed, May 11, 2011 at 6:23 PM, Tomas Matousek < > Tomas.Matousek at microsoft.com> wrote: > > I?ll take a look. Could you add some tests to the specs, unless there > already are some? Let me know if you have any questions. > > > > Thanks, > > Tomas > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Roberto Perez > *Sent:* Wednesday, May 11, 2011 3:56 AM > *To:* ironruby-core at rubyforge.org > *Subject:* [Ironruby-core] Commit to solve bug: String.delete gives a > wrong result (http://ironruby.codeplex.com/workitem/5426) > > > > Hi, > > > > I committed in my fork a very small change to solve the bug which is in > http://ironruby.codeplex.com/workitem/5426 > > The commit is in: > https://github.com/robjperez/main/commit/7d94882990bc80504a78c7ed9ea989e31b8e19ed > > > > The problem was inside the range detector in the delete method. > > When it finds a '-' character, it assumes that the string is a range, but > when you use the \ before the '-' you are telling that the '-' char is a > literal. > > > > The change was in the File MutableStringOps.cs in the Delete Method. > > > > This is my first contribution to IronRuby, so I don't know if i'm following > all the steps in the right order :), so, forgive me if i'm doing wrong but I > followed the guides written in github wiki. > > > > Shall I proceed with the pull request to main repository, or are you going > to review the commit before? > > > > Regards. > > Roberto > > > -- > http://zbutton.wordpress.com/ > blog sobre programaci?n y tecnolog?a > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > > -- > http://zbutton.wordpress.com/ > blog sobre programaci?n y tecnolog?a > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -- http://zbutton.wordpress.com/ blog sobre programaci?n y tecnolog?a -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ruby-forum.com Fri May 20 15:36:08 2011 From: lists at ruby-forum.com (Ramesh N.) Date: Fri, 20 May 2011 21:36:08 +0200 Subject: [Ironruby-core] Setting up global variables when hosting IronRuby in CLR Message-ID: How to setup global variables in CLR that could be accessed by scripts running in Iron Ruby engine hosted in CLR. Some posts referred to the API Runtime.GetCurrentExecutionContext and then setting up global variables there but in IronRuby version 1.1.3 this API is missing. Ruby Script code (Test.rb): class Test def DoSomething() puts "Value of global variable is #{$gVar}" end end C# code: // setup runtime etc engine = runtime.GetEngine("IronRuby"); // setup global variables // something like gVar = "Hello IronRuby" scriptSource = engine.CreateScriptSourceFromFile(scriptFile) scriptSource.Execute() object myType = engine.Runtime.Globals.GetVariable(?Test?); // Create a class instance object myTypeObj = engine.Operations.CreateInstance(myType); // Execute method object result = engine.Operations.InvokeMember(myTypeObj, ?doSomething?); Any help is greatly appreciated. Thank you, Ramesh -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Fri May 20 22:30:57 2011 From: lists at ruby-forum.com (John Cawley III) Date: Sat, 21 May 2011 04:30:57 +0200 Subject: [Ironruby-core] Trying to call interface method for a C# class Message-ID: I am attempting to call an interface method for a .net class and am having difficulty. I'm using IronRuby v1.1.2 and working with ScintillaNet, a .net wrapper for the Scintilla control. A portion of the ScintillaNet::Scintilla class is below: namespace ScintillaNet { ... public partial class Scintilla : Control, INativeScintilla, ISupportInitialize { ... } } And a portion of the ScintillaNet::INativeScintilla interface is below: namespace ScintillaNet { public interface INativeScintilla { ... void BackTab(); ... } } I came across another forum discussion http://rubyforge.org/pipermail/ironruby-core/2009-January/003520.html, which seems to fall along the lines of what I'm trying to do, but I'm not sure the features discussed there are implemented yet. I've reduced the troublesome code to a relatively short length to play with alternative approaches: require "bin/ScintillaNet" class ScintillaNet::Scintilla include ScintillaNet::INativeScintilla def self.ztest2() z = ScintillaNet::Scintilla.new() puts "z[#{z}]" #; z.BackTab() # undefined method `BackTab' for ScintillaNet.Scintilla:ScintillaNet::Scintilla (NoMethodError) #; ScintillaNet::INativeScintilla(z).BackTab() # undefined method `INativeScintilla' for ScintillaNet:Module (NoMethodError) #; ScintillaNet::INativeScintilla.BackTab() # undefined method `BackTab' for ScintillaNet::INativeScintilla:Module (NoMethodError) puts "fence" end end ScintillaNet::Scintilla.ztest2() puts "done" The three approaches above yield the errors to the right of each line. Thanks in advance for any assistance you might be able to provide. --John -- Posted via http://www.ruby-forum.com/. From jschementi at gmail.com Sat May 21 14:39:53 2011 From: jschementi at gmail.com (Jimmy Schementi) Date: Sat, 21 May 2011 14:39:53 -0400 Subject: [Ironruby-core] Trying to call interface method for a C# class In-Reply-To: References: Message-ID: On Fri, May 20, 2011 at 10:30 PM, John Cawley III wrote: > I am attempting to call an interface method for a .net class and am > having difficulty. I'm using IronRuby v1.1.2 and working with > ScintillaNet, a .net wrapper for the Scintilla control. John, I'm a little unclear about the problem you're trying to solve ... I've got some questions inline: > A portion of the ScintillaNet::Scintilla class is below: > > ?namespace ScintillaNet > ?{ > ? ?... > ? ?public partial class Scintilla : Control, INativeScintilla, > ISupportInitialize > ? ?{ > ? ? ?... Is BackTab implemented in any other partial C# class of Scintilla? If not, than you should be getting a compiler error ... > ? ?} > ?} > > And a portion of the ScintillaNet::INativeScintilla interface is below: > > ?namespace ScintillaNet > ?{ > ? ?public interface INativeScintilla > ? ?{ > ? ? ?... > ? ? ?void BackTab(); > ? ? ?... > ? ?} > ?} > > I came across another forum discussion > http://rubyforge.org/pipermail/ironruby-core/2009-January/003520.html, > which seems to fall along the lines of what I'm trying to do, but I'm > not sure the features discussed there are implemented yet. That thread is about calling *explicit* interface methods, which we do now support, though the API needs some work: http://ironruby.codeplex.com/workitem/1594. > I've reduced the troublesome code to a relatively short length to play > with alternative approaches: > > ?require "bin/ScintillaNet" > ?class ScintillaNet::Scintilla > ? ?include ScintillaNet::INativeScintilla How come your including this interface here? In C# this class already implements INativeScintilla ... > ? ?def self.ztest2() > ? ? ?z = ScintillaNet::Scintilla.new() > ? ? ?puts "z[#{z}]" > ? ? ?#; z.BackTab() # undefined method `BackTab' for > ScintillaNet.Scintilla:ScintillaNet::Scintilla (NoMethodError) This works if I implement BackTab in this class, but again not sure if that's what you're trying to do... > ? ? ?#; ScintillaNet::INativeScintilla(z).BackTab() # undefined method > `INativeScintilla' for ScintillaNet:Module (NoMethodError) This is invalid IronRuby; .NET interfaces are exposed to IronRuby as ruby modules, and here you're using a module as a method. > ? ? ?#; ScintillaNet::INativeScintilla.BackTab() # undefined method > `BackTab' for ScintillaNet::INativeScintilla:Module (NoMethodError) Also invalid as INativeScintilla is basically a module without any actual methods implemented on it, as a .NET interface doesn't have method implementations. > ? ? ?puts "fence" > ? ?end > ?end > > ?ScintillaNet::Scintilla.ztest2() > ?puts "done" > > The three approaches above yield the errors to the right of each line. > > Thanks in advance for any assistance you might be able to provide. > --John Let me know if you can clear those things up ... ~Jimmy From jschementi at gmail.com Sat May 21 17:50:05 2011 From: jschementi at gmail.com (Jimmy Schementi) Date: Sat, 21 May 2011 17:50:05 -0400 Subject: [Ironruby-core] Setting up global variables when hosting IronRuby in CLR In-Reply-To: References: Message-ID: Ramesh, You can still access RubyContext through Microsoft.Scripting.Hosting.Providers.HostingHelpers.GetLanguageContext. The following extension method adds the old API back ... if you need it: public static class IronRubyExtensions { public static RubyContext GetExecutionContext(this ScriptEngine engine) { return HostingHelpers.GetLanguageContext(engine) as RubyContext; } } Then setting a global variable from C# is: engine.GetExecutionContext().DefineGlobalVariable("gVar", 42); That being said, this API isn't final and may change in future versions of the DLR. If you rather use an API that is more final, and you still *really* need to set a global variable, you could do it by actually executing Ruby code: dynamic scope = engine.CreateScope(); scope.gVar = 42 engine.Execute("$gVar = gVar", scope); Now to the address my "if you need it" comments: Ruby.GetExecutionContext(ScriptEngine) was removed from IronRuby 1.0 as we didn't want to promote an hosting-level API that is language-specific. Also, because it's main usage is for setting global variables (since there is no DLR-level API for Ruby globals), we felt comfortable about introducing this breaking change as using Ruby global variables is not a recommended practice (see http://www.rubyist.net/~slagell/ruby/globalvars.html). ~Jimmy On Fri, May 20, 2011 at 3:36 PM, Ramesh N. wrote: > How to setup global variables in CLR that could be accessed by scripts > running in Iron Ruby engine hosted in CLR. > > Some posts referred to the API Runtime.GetCurrentExecutionContext and > then setting up global variables there but in IronRuby version 1.1.3 > this API is missing. > > Ruby Script code (Test.rb): > class Test > ?def DoSomething() > ? ?puts "Value of global variable is #{$gVar}" > ?end > end > > C# code: > // setup runtime etc > engine = runtime.GetEngine("IronRuby"); > > // setup global variables > // something like gVar = "Hello IronRuby" > scriptSource = engine.CreateScriptSourceFromFile(scriptFile) > scriptSource.Execute() > > object myType = engine.Runtime.Globals.GetVariable(?Test?); > // Create a class instance > object myTypeObj = engine.Operations.CreateInstance(myType); > // Execute method > object result = engine.Operations.InvokeMember(myTypeObj, > ?doSomething?); > > Any help is greatly appreciated. > > Thank you, > Ramesh > > -- > 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 Sun May 22 09:24:38 2011 From: lists at ruby-forum.com (John Cawley III) Date: Sun, 22 May 2011 15:24:38 +0200 Subject: [Ironruby-core] Trying to call interface method for a C# class In-Reply-To: References: Message-ID: <43224903e67f3247eee01f21768555b3@ruby-forum.com> And that does it! Thank you, Jimmy! Summarizing: I was trying to use the ScintillaNet control from IronRuby. The main class in the ScintillaNet DLL is ScintillaNet::Scintilla, and I'd been able to invoke its methods and work with its properties from IronRuby just fine. That class also implements the INativeScintilla interface, but I was having difficulty working with the methods and properties of that interface from IronRuby. Accessing those was the goal. >From .net, you should be able to access those with code like this: ((INativeScintilla)scintilla).BackTab() The equivelent in IronRuby (thanks to your reference to Work Item 1594, http://ironruby.codeplex.com/workitem/1594) is: scintilla.clr_member( ScintillaNet::INativeScintilla, :BackTab ).call That was the mechanism I was reaching around for. Thanks again, --John -- Posted via http://www.ruby-forum.com/. From OrionE at gallagher.co.nz Sun May 22 17:17:20 2011 From: OrionE at gallagher.co.nz (Orion Edwards) Date: Mon, 23 May 2011 09:17:20 +1200 Subject: [Ironruby-core] Building and Deploying IronRuby tools In-Reply-To: <43224903e67f3247eee01f21768555b3@ruby-forum.com> References: <43224903e67f3247eee01f21768555b3@ruby-forum.com> Message-ID: I'm hoping to do some work to fix some of the bugs in IronRuby's visual studio integration, but I'm having a few issues getting a dev environment up and running. - I can build IronStudio.sln from the Solutions folder, and my modified version of the IronRuby tools loads in the visual studio experimental instance and is fine. - I can build the full IronRuby installer, and when I install it, my modified version of IronRuby tools loads in the normal visual studio instance. But, I can't figure out how I can build a modified version of IronRuby tools and run it in a normal instance without doing the full MSI release build. Simply building the tools and then launching a normal visual studio instance produces this error message when I open any solution: --------------------------- Microsoft Visual Studio --------------------------- The 'Microsoft.IronRubyTools.IronRubyToolsPackage, IronRubyTools, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7f709c5b713576e1' package did not load correctly. The problem may have been caused by a configuration change or by the installation of another extension. You can get more information by running the application together with the /log parameter on the command line, and then examining the file 'C:\Users\orione\AppData\Roaming\Microsoft\VisualStudio\10.0\ActivityLog.xml'. Continue to show this error message? --------------------------- Yes No --------------------------- If I click Yes, then the projects load, but this dialog reappears whenever I launch VS or load any solutions. If I click no, VS disables the IronRuby addin, and I have to run devenv /ResetSkipPkgs to put it back (and then the error messages come back). The only way to "fix" the issue is to uninstall/reinstall the IronRuby tools MSI itself. Is there a way to get the non-experimental instance of visual studio to load IronRuby tools without having to do a full build if the MSI in release mode? Thanks, Orion ########################################################################### This e-mail is confidential and may contain information subject to legal privilege. If you are not the intended recipient please advise us of our error by return e-mail then delete this e-mail and any attached files. You may not copy, disclose or use the contents in any way. The views expressed in this e-mail may not be those of Gallagher Group Ltd or subsidiary companies thereof. ########################################################################### -------------- next part -------------- An HTML attachment was scrubbed... URL: From OrionE at gallagher.co.nz Mon May 23 16:28:12 2011 From: OrionE at gallagher.co.nz (Orion Edwards) Date: Tue, 24 May 2011 08:28:12 +1200 Subject: [Ironruby-core] Working on IronRuby visual studio tools Message-ID: Re-post of this email as it accidentally was sent as a reply to someone else's... Oops ------------------------------------------------- I'm hoping to do some work to fix some of the bugs in IronRuby's visual studio integration, but I'm having a few issues getting a dev environment up and running. - I can build IronStudio.sln from the Solutions folder, and my modified version of the IronRuby tools loads in the visual studio experimental instance and is fine. - I can build the full IronRuby installer, and when I install it, my modified version of IronRuby tools loads in the normal visual studio instance. But, I can't figure out how I can build a modified version of IronRuby tools and run it in a normal instance without doing the full MSI release build. Simply building the tools and then launching a normal visual studio instance produces this error message when I open any solution: --------------------------- Microsoft Visual Studio --------------------------- The 'Microsoft.IronRubyTools.IronRubyToolsPackage, IronRubyTools, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7f709c5b713576e1' package did not load correctly. The problem may have been caused by a configuration change or by the installation of another extension. You can get more information by running the application together with the /log parameter on the command line, and then examining the file 'C:\Users\orione\AppData\Roaming\Microsoft\VisualStudio\10.0\ActivityLog.xml'. Continue to show this error message? --------------------------- Yes No --------------------------- If I click Yes, then the projects load, but this dialog reappears whenever I launch VS or load any solutions. If I click no, VS disables the IronRuby addin, and I have to run devenv /ResetSkipPkgs to put it back (and then the error messages come back). The only way to "fix" the issue is to uninstall/reinstall the IronRuby tools MSI itself. Is there a way to get the non-experimental instance of visual studio to load IronRuby tools without having to do a full build if the MSI in release mode? Thanks, Orion ########################################################################### This e-mail is confidential and may contain information subject to legal privilege. If you are not the intended recipient please advise us of our error by return e-mail then delete this e-mail and any attached files. You may not copy, disclose or use the contents in any way. The views expressed in this e-mail may not be those of Gallagher Group Ltd or subsidiary companies thereof. ########################################################################### -------------- next part -------------- An HTML attachment was scrubbed... URL: From doug.blank at gmail.com Tue May 24 08:41:46 2011 From: doug.blank at gmail.com (Doug Blank) Date: Tue, 24 May 2011 08:41:46 -0400 Subject: [Ironruby-core] How to iterate through a C# IEnumerable from IronRuby? Message-ID: Apologies if this is a basic Ruby question. I have a C# method: public class Myro { ... public static IEnumerator getPixels(Picture picture) { for (int x=0; x < picture.width; x++) { for (int y=0; y < picture.height; y++) { yield return picture.getPixel(x, y); } } } } I can call this fine in IronPython: for pixel in getPixels(pic): r, g, b = getRGB(pixel) gray = (r + g + b)/3 setRGB(pixel, gray, gray, gray) But I don't see how to call this from IronRuby: Myro::getPixels(pic) do |pixel| r, g, b = Myro::getRGB pixel gray = (r + g + b)/3 Myro::setRGB(pixel, gray, gray, gray) end All I get back is Myro+c__Iterator0. What do I need to do to actually get each pixel in IronRuby and process it? Do I need an extension method, perhaps called "each"? If so, can someone point me to some code? Thanks in advance for any help, -Doug From jschementi at gmail.com Tue May 24 12:13:25 2011 From: jschementi at gmail.com (Jimmy Schementi) Date: Tue, 24 May 2011 12:13:25 -0400 Subject: [Ironruby-core] How to iterate through a C# IEnumerable from IronRuby? In-Reply-To: References: Message-ID: Doug, If you change the return type of getPixels to IEnumerable, then this works: Myro::getPixels(pic).each do |pixel| ... end And arguably it should be IEnumerable rather than IEnumerator, as an IEnumerable.GetEnumerator() gives you an IEnumerator. Your code example passes a closure to the getPixels method, which just gets ignored (all Ruby methods syntactically accept a block/closure, and they can choose to use it), and returns the IEnumerator. IronRuby today doesn't support mapping Ruby's Enumerable module to IEnumerator objects, since it's kind awkward to return an IEnumerator rather than an IEnumerable from a public API, but since IronPython sets a precedence for supporting it we should look into it. Opened http://ironruby.codeplex.com/workitem/6154. ~Jimmy On Tue, May 24, 2011 at 8:41 AM, Doug Blank wrote: > Apologies if this is a basic Ruby question. I have a C# method: > > public class Myro { > ?... > ?public static IEnumerator getPixels(Picture picture) { > ? ?for (int x=0; x < picture.width; x++) { > ? ? ?for (int y=0; y < picture.height; y++) { > ? ? ? ? ?yield return picture.getPixel(x, y); > ? ? ?} > ? ?} > ?} > } > > I can call this fine in IronPython: > > for pixel in getPixels(pic): > ? ?r, g, b = getRGB(pixel) > ? ?gray = (r + g + b)/3 > ? ?setRGB(pixel, gray, gray, gray) > > But I don't see how to call this from IronRuby: > > Myro::getPixels(pic) do |pixel| > ? ?r, g, b = Myro::getRGB pixel > ? ?gray = (r + g + b)/3 > ? ?Myro::setRGB(pixel, gray, gray, gray) > end > > All I get back is Myro+c__Iterator0. > > What do I need to do to actually get each pixel in IronRuby and > process it? Do I need an extension method, perhaps called "each"? If > so, can someone point me to some code? > > Thanks in advance for any help, > > -Doug > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > From OrionE at gallagher.co.nz Tue May 24 23:51:59 2011 From: OrionE at gallagher.co.nz (Orion Edwards) Date: Wed, 25 May 2011 15:51:59 +1200 Subject: [Ironruby-core] Codeplex workitem 6118: Requesting Code Review Message-ID: As mentioned in the bug http://ironruby.codeplex.com/workitem/6118 , IronRuby .rbproj files have some severe problems when working with source-controlled projects. I discovered that one of the major causes of this was the way that the DLR's DirectoryBasedProjectNode was handling add/rename/delete operations from the filesystem. When it would get one of these notifications, it would immediately add/remove/rename the file. If the project was bound to source control, this would pend a correpsonding add/remove/rename change to the source control provider. Unfortunately, some external editors, diff/merge tools, and source control providers (in particular the Team Foundation Server one) implement "atomic saves" by writing to a .tmp file, deleting the original file, and then moving the .tmp file into place. This causes visual studio to pend an "add" on a .tmp file which doesn't exist, pend a "rename" on that file, and then pend a "delete" on the original file. The first two operations seem to get ignored by the TFS source control provider, but the delete does not. This leads to the bizarre circumstance where performing a TFS "get-latest" operation will pend deletes on any files that have been updated. The following commit fixes this issue by implementing a "throttle" mechanism. - When a file system operation occurs, it queues a "file update" operation keyed by the file path and kicks an 0.2 second dispatcher timer. - Subsequent operations push back this timer so it will only fire after 0.2 seconds of idle time - When the timer fires, it runs each "file update" operation, but only if it would still be valid (eg: an "add" operation will only be run if the file still actually exists after the 0.2 seconds) I have been using this modified code for a week now and while it certainly doesn't fix all the issues with .rbproj files, it does fix the "pend deletes" problem, and overall the project is much more stable. It does not seem to have caused any adverse effects. Link: https://github.com/gglresearchanddevelopment/ironlanguages-main/commit/674aa76aa7d90b64214003f50e1b01c4c6d02188 ########################################################################### This e-mail is confidential and may contain information subject to legal privilege. If you are not the intended recipient please advise us of our error by return e-mail then delete this e-mail and any attached files. You may not copy, disclose or use the contents in any way. The views expressed in this e-mail may not be those of Gallagher Group Ltd or subsidiary companies thereof. ########################################################################### -------------- next part -------------- An HTML attachment was scrubbed... URL: From jschementi at gmail.com Wed May 25 09:21:43 2011 From: jschementi at gmail.com (Jimmy Schementi) Date: Wed, 25 May 2011 09:21:43 -0400 Subject: [Ironruby-core] Working on IronRuby visual studio tools In-Reply-To: References: Message-ID: <31B8F466-9B97-4DF1-8C74-8E9F9F7098C7@gmail.com> Orion, what can't you accomplish with the experimental hive which you think you can do by installing a non-MSI'd IronRuby tools? The non-MSI installation is not supported as we use the GAC for resolving dependencies of "IronStudio" components between Ruby and Python. A non-MSI installation using VSIX has no dependency management, so things could break easily. ~Jimmy On May 23, 2011, at 4:28 PM, Orion Edwards wrote: > Re-post of this email as it accidentally was sent as a reply to someone else's... Oops > ------------------------------------------------- > I'm hoping to do some work to fix some of the bugs in IronRuby's visual studio integration, but I'm having a few issues getting a dev environment up and running. > > - I can build IronStudio.sln from the Solutions folder, and my modified version of the IronRuby tools loads in the visual studio experimental instance and is fine. > - I can build the full IronRuby installer, and when I install it, my modified version of IronRuby tools loads in the normal visual studio instance. > > But, I can't figure out how I can build a modified version of IronRuby tools and run it in a normal instance without doing the full MSI release build. > Simply building the tools and then launching a normal visual studio instance produces this error message when I open any solution: > > --------------------------- > Microsoft Visual Studio > --------------------------- > The 'Microsoft.IronRubyTools.IronRubyToolsPackage, IronRubyTools, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7f709c5b713576e1' package did not load correctly. > > > > The problem may have been caused by a configuration change or by the installation of another extension. You can get more information by running the application together with the /log parameter on the command line, and then examining the file 'C:\Users\orione\AppData\Roaming\Microsoft\VisualStudio\10.0\ActivityLog.xml'. > > > > Continue to show this error message? > --------------------------- > Yes No > --------------------------- > > If I click Yes, then the projects load, but this dialog reappears whenever I launch VS or load any solutions. If I click no, VS disables the IronRuby addin, and I have to run devenv /ResetSkipPkgs to put it back (and then the error messages come back). The only way to "fix" the issue is to uninstall/reinstall the IronRuby tools MSI itself. > > Is there a way to get the non-experimental instance of visual studio to load IronRuby tools without having to do a full build if the MSI in release mode? > > Thanks, Orion > > This e-mail is confidential and may contain information subject to legal privilege. If you are not the intended recipient please advise us of our error by return e-mail then delete this e-mail and any attached files. You may not copy, disclose or use the contents in any way. > > The views expressed in this e-mail may not be those of Gallagher Group Ltd or subsidiary companies thereof. > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: From jschementi at gmail.com Wed May 25 09:23:01 2011 From: jschementi at gmail.com (Jimmy Schementi) Date: Wed, 25 May 2011 09:23:01 -0400 Subject: [Ironruby-core] Codeplex workitem 6118: Requesting Code Review In-Reply-To: References: Message-ID: <5B8F6A57-550C-436E-B4B9-883261518CB5@gmail.com> Orion, I'll review this change shortly and let you know if I have any feedback. ~Jimmy On May 24, 2011, at 11:51 PM, Orion Edwards wrote: > As mentioned in the bug http://ironruby.codeplex.com/workitem/6118 , IronRuby .rbproj files have some severe problems when working with source-controlled projects. > > I discovered that one of the major causes of this was the way that the DLR's DirectoryBasedProjectNode was handling add/rename/delete operations from the filesystem. > When it would get one of these notifications, it would immediately add/remove/rename the file. If the project was bound to source control, this would pend a correpsonding add/remove/rename change to the source control provider. > > Unfortunately, some external editors, diff/merge tools, and source control providers (in particular the Team Foundation Server one) implement "atomic saves" by writing to a .tmp file, deleting the original file, and then moving the .tmp file into place. > This causes visual studio to pend an "add" on a .tmp file which doesn't exist, pend a "rename" on that file, and then pend a "delete" on the original file. The first two operations seem to get ignored by the TFS source control provider, but the delete does not. > > This leads to the bizarre circumstance where performing a TFS "get-latest" operation will pend deletes on any files that have been updated. > > The following commit fixes this issue by implementing a "throttle" mechanism. > - When a file system operation occurs, it queues a "file update" operation keyed by the file path and kicks an 0.2 second dispatcher timer. > - Subsequent operations push back this timer so it will only fire after 0.2 seconds of idle time > - When the timer fires, it runs each "file update" operation, but only if it would still be valid > (eg: an "add" operation will only be run if the file still actually exists after the 0.2 seconds) > > I have been using this modified code for a week now and while it certainly doesn't fix all the issues with .rbproj files, it does fix the "pend deletes" problem, and overall the project is much more stable. It does not seem to have caused any adverse effects. > > Link: > > https://github.com/gglresearchanddevelopment/ironlanguages-main/commit/674aa76aa7d90b64214003f50e1b01c4c6d02188 > > This e-mail is confidential and may contain information subject to legal privilege. If you are not the intended recipient please advise us of our error by return e-mail then delete this e-mail and any attached files. You may not copy, disclose or use the contents in any way. > > The views expressed in this e-mail may not be those of Gallagher Group Ltd or subsidiary companies thereof. > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: From OrionE at gallagher.co.nz Wed May 25 16:04:27 2011 From: OrionE at gallagher.co.nz (Orion Edwards) Date: Thu, 26 May 2011 08:04:27 +1200 Subject: [Ironruby-core] Working on IronRuby visual studio tools In-Reply-To: <31B8F466-9B97-4DF1-8C74-8E9F9F7098C7@gmail.com> References: <31B8F466-9B97-4DF1-8C74-8E9F9F7098C7@gmail.com> Message-ID: The experimental instance works well for development. After making a change to the VS tools I'd like to use it "in anger" in the production instance working on real code, and rebuilding/reinstalling the release MSI is just an extra step requiring more time. If it's difficult to resolve or likely to cause issues then it's no big deal, I was mainly just curious. Is there a wiki page which explains this? I could add one? Thanks, Orion From: Jimmy Schementi To: "ironruby-core at rubyforge.org" Date: 26/05/2011 01:51 a.m. Subject: Re: [Ironruby-core] Working on IronRuby visual studio tools Sent by: ironruby-core-bounces at rubyforge.org Orion, what can't you accomplish with the experimental hive which you think you can do by installing a non-MSI'd IronRuby tools? The non-MSI installation is not supported as we use the GAC for resolving dependencies of "IronStudio" components between Ruby and Python. A non-MSI installation using VSIX has no dependency management, so things could break easily. ~Jimmy On May 23, 2011, at 4:28 PM, Orion Edwards wrote: Re-post of this email as it accidentally was sent as a reply to someone else's... Oops ------------------------------------------------- I'm hoping to do some work to fix some of the bugs in IronRuby's visual studio integration, but I'm having a few issues getting a dev environment up and running. - I can build IronStudio.sln from the Solutions folder, and my modified version of the IronRuby tools loads in the visual studio experimental instance and is fine. - I can build the full IronRuby installer, and when I install it, my modified version of IronRuby tools loads in the normal visual studio instance. But, I can't figure out how I can build a modified version of IronRuby tools and run it in a normal instance without doing the full MSI release build. Simply building the tools and then launching a normal visual studio instance produces this error message when I open any solution: --------------------------- Microsoft Visual Studio --------------------------- The 'Microsoft.IronRubyTools.IronRubyToolsPackage, IronRubyTools, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7f709c5b713576e1' package did not load correctly. The problem may have been caused by a configuration change or by the installation of another extension. You can get more information by running the application together with the /log parameter on the command line, and then examining the file 'C:\Users\orione\AppData\Roaming\Microsoft\VisualStudio\10.0\ActivityLog.xml'. Continue to show this error message? --------------------------- Yes No --------------------------- If I click Yes, then the projects load, but this dialog reappears whenever I launch VS or load any solutions. If I click no, VS disables the IronRuby addin, and I have to run devenv /ResetSkipPkgs to put it back (and then the error messages come back). The only way to "fix" the issue is to uninstall/reinstall the IronRuby tools MSI itself. Is there a way to get the non-experimental instance of visual studio to load IronRuby tools without having to do a full build if the MSI in release mode? Thanks, Orion This e-mail is confidential and may contain information subject to legal privilege. If you are not the intended recipient please advise us of our error by return e-mail then delete this e-mail and any attached files. You may not copy, disclose or use the contents in any way. The views expressed in this e-mail may not be those of Gallagher Group Ltd or subsidiary companies thereof. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tomas.Matousek at microsoft.com Wed May 25 16:18:10 2011 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Wed, 25 May 2011 20:18:10 +0000 Subject: [Ironruby-core] Working on IronRuby visual studio tools In-Reply-To: References: <31B8F466-9B97-4DF1-8C74-8E9F9F7098C7@gmail.com> Message-ID: <9597F4A19BFDB342B6E90963100C33080AF19206@SN2PRD0302MB113.namprd03.prod.outlook.com> If you need it for "in production" testing definitely use the MSI. That's the way how users will install it. Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards Sent: Wednesday, May 25, 2011 1:04 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Working on IronRuby visual studio tools The experimental instance works well for development. After making a change to the VS tools I'd like to use it "in anger" in the production instance working on real code, and rebuilding/reinstalling the release MSI is just an extra step requiring more time. If it's difficult to resolve or likely to cause issues then it's no big deal, I was mainly just curious. Is there a wiki page which explains this? I could add one? Thanks, Orion From: Jimmy Schementi > To: "ironruby-core at rubyforge.org" > Date: 26/05/2011 01:51 a.m. Subject: Re: [Ironruby-core] Working on IronRuby visual studio tools Sent by: ironruby-core-bounces at rubyforge.org ________________________________ Orion, what can't you accomplish with the experimental hive which you think you can do by installing a non-MSI'd IronRuby tools? The non-MSI installation is not supported as we use the GAC for resolving dependencies of "IronStudio" components between Ruby and Python. A non-MSI installation using VSIX has no dependency management, so things could break easily. ~Jimmy On May 23, 2011, at 4:28 PM, Orion Edwards > wrote: Re-post of this email as it accidentally was sent as a reply to someone else's... Oops ------------------------------------------------- I'm hoping to do some work to fix some of the bugs in IronRuby's visual studio integration, but I'm having a few issues getting a dev environment up and running. - I can build IronStudio.sln from the Solutions folder, and my modified version of the IronRuby tools loads in the visual studio experimental instance and is fine. - I can build the full IronRuby installer, and when I install it, my modified version of IronRuby tools loads in the normal visual studio instance. But, I can't figure out how I can build a modified version of IronRuby tools and run it in a normal instance without doing the full MSI release build. Simply building the tools and then launching a normal visual studio instance produces this error message when I open any solution: --------------------------- Microsoft Visual Studio --------------------------- The 'Microsoft.IronRubyTools.IronRubyToolsPackage, IronRubyTools, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7f709c5b713576e1' package did not load correctly. The problem may have been caused by a configuration change or by the installation of another extension. You can get more information by running the application together with the /log parameter on the command line, and then examining the file 'C:\Users\orione\AppData\Roaming\Microsoft\VisualStudio\10.0\ActivityLog.xml'. Continue to show this error message? --------------------------- Yes No --------------------------- If I click Yes, then the projects load, but this dialog reappears whenever I launch VS or load any solutions. If I click no, VS disables the IronRuby addin, and I have to run devenv /ResetSkipPkgs to put it back (and then the error messages come back). The only way to "fix" the issue is to uninstall/reinstall the IronRuby tools MSI itself. Is there a way to get the non-experimental instance of visual studio to load IronRuby tools without having to do a full build if the MSI in release mode? Thanks, Orion ________________________________ This e-mail is confidential and may contain information subject to legal privilege. If you are not the intended recipient please advise us of our error by return e-mail then delete this e-mail and any attached files. You may not copy, disclose or use the contents in any way. The views expressed in this e-mail may not be those of Gallagher Group Ltd or subsidiary companies thereof. ________________________________ _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core_______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: From OrionE at gallagher.co.nz Sun May 29 18:37:57 2011 From: OrionE at gallagher.co.nz (Orion Edwards) Date: Mon, 30 May 2011 10:37:57 +1200 Subject: [Ironruby-core] Codeplex workitem 6117 "solution" Message-ID: Summary: No matter what settings you change, "Operators" in IronRuby are always green (hex 008080). I put a few hours into investigating this ( http://ironruby.codeplex.com/workitem/6117 ) and as far as I can tell, it's a bug in visual studio. The language classifier used by IronRuby (DlrClassifier) is classifying operators using PredefinedClassificationTypeNames.Operator - this is apparently the correct thing to do, but when you do this, the text always comes out green and completely ignores the IDE fonts and colors settings. Tweaking the classifier to use anything other than PredefinedClassificationTypeNames.Operator works, and allows you to change the color in the IDE settings, but for some reason that I cannot figure out, using Operator always produces the same green. Commenting out all logic other than the core classification logic (brace matcher, etc) doesn't affect this, and it is also reproducible using the microsoft Ook language sample from here: http://code.msdn.microsoft.com/ookLanguage Given that I can't seem to affect it, and it is reproducible in the ook integration, this leads me to believe that it's visual studio itself? I tried to figure out what the C# language does (as you can change "operator" colors in C#), but I couldn't find any classification stuff when running reflector over any of the standard visual studio libraries, so I can't figure out what it's doing differently to make "operator" work. At any rate, I have a small patch which switches the classifier from using "operator" to "script operator". With this patch you can change the colors for "script operator" in the IDE and have them affect operators in IronRuby code https://github.com/gglresearchanddevelopment/ironlanguages-main/commit/4d8554cf2329ce5dba74e1e2c37e7e1019b7d285 If anyone has more knowledge about VS integration and may be able to help with why the standard "operator" coloring is not working, I'd really appreciate it. If this is a bug in VS, do I need to file something somewhere? I'm not sure where to go with it. Thanks, Orion ########################################################################### This e-mail is confidential and may contain information subject to legal privilege. If you are not the intended recipient please advise us of our error by return e-mail then delete this e-mail and any attached files. You may not copy, disclose or use the contents in any way. The views expressed in this e-mail may not be those of Gallagher Group Ltd or subsidiary companies thereof. ########################################################################### -------------- next part -------------- An HTML attachment was scrubbed... URL: