From bacondarwin at googlemail.com Fri Feb 1 03:07:21 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Fri, 1 Feb 2008 08:07:21 -0000 Subject: [Ironruby-core] YAML for .NET Message-ID: <000601c864a9$7a8471d0$6f8d5570$@com> Has anyone made any progress with creating a YAML processor for .NET? I know that some people made some noise about it last Autumn. Since there hasn't been any more info I thought I would take it on and set up an open source project for it (http://code.google.com/p/yaml-dot-net/). It uses the Gnu Lesser Public License, which should be OK for use in IronRuby, etc. Let me know if you are already doing something similar or would like to participate. Pete -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20080201/ea6a5ec0/attachment.html From slavof at gmail.com Fri Feb 1 04:08:24 2008 From: slavof at gmail.com (Slavo Furman) Date: Fri, 1 Feb 2008 10:08:24 +0100 Subject: [Ironruby-core] YAML for .NET In-Reply-To: <000601c864a9$7a8471d0$6f8d5570$@com> References: <000601c864a9$7a8471d0$6f8d5570$@com> Message-ID: <24e27e560802010108j1f2a1593s6f47fe5e946efa46@mail.gmail.com> hi Pete! There already is a .NET YAML implementation under Gnu Lesser Public License on sourceforge.net -> http://yaml-net-parser.sourceforge.net/. I do not know in what state it is, but you can take a look. regards, Slavo. On Feb 1, 2008 9:07 AM, Peter Bacon Darwin wrote: > Has anyone made any progress with creating a YAML processor for .NET? I > know that some people made some noise about it last Autumn. > > Since there hasn't been any more info I thought I would take it on and set > up an open source project for it (http://code.google.com/p/yaml-dot-net/). > It uses the Gnu Lesser Public License, which should be OK for use in > IronRuby, etc. > > Let me know if you are already doing something similar or would like to > participate. > > Pete > > _______________________________________________ > 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/20080201/5b02be32/attachment.html From m.david at xmlhacker.com Fri Feb 1 04:16:13 2008 From: m.david at xmlhacker.com (M. David Peterson) Date: Fri, 01 Feb 2008 02:16:13 -0700 Subject: [Ironruby-core] YAML for .NET In-Reply-To: <000601c864a9$7a8471d0$6f8d5570$@com> References: <000601c864a9$7a8471d0$6f8d5570$@com> Message-ID: On Fri, 01 Feb 2008 01:07:21 -0700, Peter Bacon Darwin wrote: > Has anyone made any progress with creating a YAML processor for .NET? If not mistaken, we** decided to forego YAML all together and advance the state-of-the-Ruby-art by by using XML instead. Anyone care to clarify? ** By "we" what I mean is that I followed-up[1] Charlie's suggested project name with a "suggestion" to use XML instead, and no one responded. Using the generalized rule of "No response is an automatic check in the 'yes' column" and given that it's been a few weeks since that thread came into existence, I can only assume that yes, in fact, XML is now the defacto replacement for YAML. Of course, I could be wrong. ;-) [1] http://rubyforge.org/pipermail/ironruby-core/2008-January/000611.html -- /M:D M. David Peterson Co-Founder & Chief Architect, 3rd&Urban, LLC Email: m.david at 3rdandUrban.com | m.david at amp.fm Mobile: (206) 418-9027 http://3rdandUrban.com | http://amp.fm | http://www.oreillynet.com/pub/au/2354 From bacondarwin at googlemail.com Fri Feb 1 04:24:30 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Fri, 1 Feb 2008 09:24:30 -0000 Subject: [Ironruby-core] YAML for .NET In-Reply-To: References: <000601c864a9$7a8471d0$6f8d5570$@com> Message-ID: <000e01c864b4$40af4ba0$c20de2e0$@com> Right :-) Now all we need to do is get the Rails guys to forego YAML too and we are sorted! -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of M. David Peterson Sent: Friday,01 February 01, 2008 09:16 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] YAML for .NET On Fri, 01 Feb 2008 01:07:21 -0700, Peter Bacon Darwin wrote: > Has anyone made any progress with creating a YAML processor for .NET? If not mistaken, we** decided to forego YAML all together and advance the state-of-the-Ruby-art by by using XML instead. Anyone care to clarify? ** By "we" what I mean is that I followed-up[1] Charlie's suggested project name with a "suggestion" to use XML instead, and no one responded. Using the generalized rule of "No response is an automatic check in the 'yes' column" and given that it's been a few weeks since that thread came into existence, I can only assume that yes, in fact, XML is now the defacto replacement for YAML. Of course, I could be wrong. ;-) [1] http://rubyforge.org/pipermail/ironruby-core/2008-January/000611.html -- /M:D M. David Peterson Co-Founder & Chief Architect, 3rd&Urban, LLC Email: m.david at 3rdandUrban.com | m.david at amp.fm Mobile: (206) 418-9027 http://3rdandUrban.com | http://amp.fm | http://www.oreillynet.com/pub/au/2354 _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From myles at madpilot.com.au Fri Feb 1 04:28:11 2008 From: myles at madpilot.com.au (Myles Eftos) Date: Fri, 1 Feb 2008 18:28:11 +0900 Subject: [Ironruby-core] YAML for .NET In-Reply-To: Message-ID: <20080201092846.AF12118586DA@rubyforge.org> > If not mistaken, we** decided to forego YAML all together and > advance the state-of-the-Ruby-art by by using XML instead. If IronRuby is going to eventually run rails, you'll need YAML, not only for the small amount of configuration, but also for stuff like HAML and SAS, serialisation (Pstore) and the test suite. I would suggest that it would be a good idea to implement it. Besides, what harm is there in implementing it? ---------------------------------------------- Myles Eftos Mobile: +61-409-293-183 MadPilot Productions URL: http://www.madpilot.com.au Phone: +618-9467-7651 Fax: +618-9467-6289 Try our time tracking system: 88 Miles! http://www.88miles.net From bacondarwin at googlemail.com Fri Feb 1 04:47:11 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Fri, 1 Feb 2008 09:47:11 -0000 Subject: [Ironruby-core] YAML for .NET In-Reply-To: <24e27e560802010108j1f2a1593s6f47fe5e946efa46@mail.gmail.com> References: <000601c864a9$7a8471d0$6f8d5570$@com> <24e27e560802010108j1f2a1593s6f47fe5e946efa46@mail.gmail.com> Message-ID: <001501c864b7$6c389760$44a9c620$@com> Yep I did take a look at that project. It is only partially complete and doesn't show any signs of further development; it was written by some CompSci students as a project for their course and they are now busy with other stuff. They probably weren't allowed to use the reference implementations for their work so their implementation is rather different from the standard model and I also had some concerns about their use of exceptions in the everyday logic. So I thought it best to start from scratch and try to stick more closely, algorithmically, to the PyYaml reference. What do people think? I don't expect to do all the implementation myself so would appreciate if anyone else wanted to get involved. Pete From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Slavo Furman Sent: Friday,01 February 01, 2008 09:08 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] YAML for .NET hi Pete! There already is a .NET YAML implementation under Gnu Lesser Public License on sourceforge.net -> http://yaml-net-parser.sourceforge.net/. I do not know in what state it is, but you can take a look. regards, Slavo. On Feb 1, 2008 9:07 AM, Peter Bacon Darwin wrote: Has anyone made any progress with creating a YAML processor for .NET? I know that some people made some noise about it last Autumn. Since there hasn't been any more info I thought I would take it on and set up an open source project for it (http://code.google.com/p/yaml-dot-net/). It uses the Gnu Lesser Public License, which should be OK for use in IronRuby, etc. Let me know if you are already doing something similar or would like to participate. Pete _______________________________________________ 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/20080201/c4103bd4/attachment.html From myles at madpilot.com.au Fri Feb 1 05:10:43 2008 From: myles at madpilot.com.au (Myles Eftos) Date: Fri, 1 Feb 2008 19:10:43 +0900 Subject: [Ironruby-core] YAML for .NET In-Reply-To: <001501c864b7$6c389760$44a9c620$@com> Message-ID: <20080201101120.26B9218586E8@rubyforge.org> Can we look at https://jvyaml.dev.java.net/ (which is a port from http://pyyaml.org/wiki/PyYAML)? As a side note, what does the license say about basing the implementation of other projects code? ---------------------------------------------- Myles Eftos Mobile: +61-409-293-183 MadPilot Productions URL: http://www.madpilot.com.au Phone: +618-9467-7651 Fax: +618-9467-6289 Try our time tracking system: 88 Miles! http://www.88miles.net _____ From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Peter Bacon Darwin Sent: Friday, 1 February 2008 18:47 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] YAML for .NET Yep I did take a look at that project. It is only partially complete and doesn't show any signs of further development; it was written by some CompSci students as a project for their course and they are now busy with other stuff. They probably weren't allowed to use the reference implementations for their work so their implementation is rather different from the standard model and I also had some concerns about their use of exceptions in the everyday logic. So I thought it best to start from scratch and try to stick more closely, algorithmically, to the PyYaml reference. What do people think? I don't expect to do all the implementation myself so would appreciate if anyone else wanted to get involved. Pete From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Slavo Furman Sent: Friday,01 February 01, 2008 09:08 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] YAML for .NET hi Pete! There already is a .NET YAML implementation under Gnu Lesser Public License on sourceforge.net -> http://yaml-net-parser.sourceforge.net/. I do not know in what state it is, but you can take a look. regards, Slavo. On Feb 1, 2008 9:07 AM, Peter Bacon Darwin wrote: Has anyone made any progress with creating a YAML processor for .NET? I know that some people made some noise about it last Autumn. Since there hasn't been any more info I thought I would take it on and set up an open source project for it (http://code.google.com/p/yaml-dot-net/). It uses the Gnu Lesser Public License, which should be OK for use in IronRuby, etc. Let me know if you are already doing something similar or would like to participate. Pete _______________________________________________ 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/20080201/7dacf424/attachment.html From m.david at xmlhacker.com Fri Feb 1 05:14:18 2008 From: m.david at xmlhacker.com (M. David Peterson) Date: Fri, 01 Feb 2008 03:14:18 -0700 Subject: [Ironruby-core] YAML for .NET In-Reply-To: <000e01c864b4$40af4ba0$c20de2e0$@com> References: <000601c864a9$7a8471d0$6f8d5570$@com> <000e01c864b4$40af4ba0$c20de2e0$@com> Message-ID: On Fri, 01 Feb 2008 02:24:30 -0700, Peter Bacon Darwin wrote: > Now all we need to do is get the Rails guys to forego YAML too and > we are sorted! That shouldn't be a problem: I hear DHH has a secret obsession with XML and is just dieing for a reason to come out of the closet. ;-) -- /M:D M. David Peterson Co-Founder & Chief Architect, 3rd&Urban, LLC Email: m.david at 3rdandUrban.com | m.david at amp.fm Mobile: (206) 418-9027 http://3rdandUrban.com | http://amp.fm | http://www.oreillynet.com/pub/au/2354 From m.david at xmlhacker.com Fri Feb 1 05:17:25 2008 From: m.david at xmlhacker.com (M. David Peterson) Date: Fri, 01 Feb 2008 03:17:25 -0700 Subject: [Ironruby-core] YAML for .NET In-Reply-To: <20080201092846.AF12118586DA@rubyforge.org> References: <20080201092846.AF12118586DA@rubyforge.org> Message-ID: On Fri, 01 Feb 2008 02:28:11 -0700, Myles Eftos wrote: > Besides, what harm is there in implementing it? I was kidding. YAML gets the job done and in most cases it's easier to read *ESPECIALLY* as it relates to configuration files. I just like to poke fun at YAML from time-to-time due to it's generalized roots stemming from XML-haters from yesteryear. -- /M:D M. David Peterson Co-Founder & Chief Architect, 3rd&Urban, LLC Email: m.david at 3rdandUrban.com | m.david at amp.fm Mobile: (206) 418-9027 http://3rdandUrban.com | http://amp.fm | http://www.oreillynet.com/pub/au/2354 From m.david at xmlhacker.com Fri Feb 1 05:18:55 2008 From: m.david at xmlhacker.com (M. David Peterson) Date: Fri, 01 Feb 2008 03:18:55 -0700 Subject: [Ironruby-core] YAML for .NET In-Reply-To: <20080201101120.26B9218586E8@rubyforge.org> References: <20080201101120.26B9218586E8@rubyforge.org> Message-ID: On Fri, 01 Feb 2008 03:10:43 -0700, Myles Eftos wrote: > As a side note, what does the license say about basing the > implementation of other projects code? I think this conversation has already come up. /me is looking for the link to the archived thread. -- /M:D M. David Peterson Co-Founder & Chief Architect, 3rd&Urban, LLC Email: m.david at 3rdandUrban.com | m.david at amp.fm Mobile: (206) 418-9027 http://3rdandUrban.com | http://amp.fm | http://www.oreillynet.com/pub/au/2354 From m.david at xmlhacker.com Fri Feb 1 05:23:56 2008 From: m.david at xmlhacker.com (M. David Peterson) Date: Fri, 01 Feb 2008 03:23:56 -0700 Subject: [Ironruby-core] YAML for .NET In-Reply-To: References: <20080201101120.26B9218586E8@rubyforge.org> Message-ID: On Fri, 01 Feb 2008 03:18:55 -0700, M. David Peterson wrote: > /me is looking for the link to the archived thread. Thread starts @ http://rubyforge.org/pipermail/ironruby-core/2007-September/000039.html -- /M:D M. David Peterson Co-Founder & Chief Architect, 3rd&Urban, LLC Email: m.david at 3rdandUrban.com | m.david at amp.fm Mobile: (206) 418-9027 http://3rdandUrban.com | http://amp.fm | http://www.oreillynet.com/pub/au/2354 From myles at madpilot.com.au Fri Feb 1 05:29:47 2008 From: myles at madpilot.com.au (Myles Eftos) Date: Fri, 1 Feb 2008 19:29:47 +0900 Subject: [Ironruby-core] YAML for .NET In-Reply-To: Message-ID: <20080201103023.87DD018585F0@rubyforge.org> > I was kidding. YAML gets the job done and in most cases it's > easier to read *ESPECIALLY* as it relates to configuration > files. I just like to poke fun at YAML from time-to-time due > to it's generalized roots stemming from XML-haters from yesteryear. Heh, fair enough :) ---------------------------------------------- Myles Eftos Mobile: +61-409-293-183 MadPilot Productions URL: http://www.madpilot.com.au Phone: +618-9467-7651 Fax: +618-9467-6289 Try our time tracking system: 88 Miles! http://www.88miles.net From m.david at xmlhacker.com Fri Feb 1 05:42:21 2008 From: m.david at xmlhacker.com (M. David Peterson) Date: Fri, 01 Feb 2008 03:42:21 -0700 Subject: [Ironruby-core] YAML for .NET In-Reply-To: References: <20080201101120.26B9218586E8@rubyforge.org> Message-ID: On Fri, 01 Feb 2008 03:23:56 -0700, M. David Peterson wrote: > Thread starts @ > http://rubyforge.org/pipermail/ironruby-core/2007-September/000039.html Actually, reading back through that thread I am realizing now that it might be worth considering writing the YAML parser in F# which already has full support for lex/yacc as part of the core distribution. +, F# is wicked fast. http://research.microsoft.com/fsharp/fsharp.aspx I would also take a look @, http://blogs.msdn.com/dsyme/archive/2007/09/14/jason-hogg-implements-the-secpal-for-simplified-english-grammar-in-f.aspx ... and ... http://blogs.msdn.com/dsyme/archive/2008/01/05/the-fparsec-library-by-stephan-tolksdorf.aspx ... both of which provide good examples of writing parsers in F#. -- /M:D M. David Peterson Co-Founder & Chief Architect, 3rd&Urban, LLC Email: m.david at 3rdandUrban.com | m.david at amp.fm Mobile: (206) 418-9027 http://3rdandUrban.com | http://amp.fm | http://www.oreillynet.com/pub/au/2354 From myles at madpilot.com.au Fri Feb 1 05:53:07 2008 From: myles at madpilot.com.au (Myles Eftos) Date: Fri, 1 Feb 2008 19:53:07 +0900 Subject: [Ironruby-core] YAML for .NET In-Reply-To: Message-ID: <20080201105344.8210E18586D9@rubyforge.org> > Actually, reading back through that thread I am realizing now > that it might be worth considering writing the YAML parser in > F# which already has full support for lex/yacc as part of the > core distribution. +, F# is wicked fast. Hey, if that would work, then cool. In regards to the license, from that thread you posted: "We have an issue here that we want to drive through legal, which is releasing IronRuby under multiple licenses. This shouldn't be a problem, but it is an issue if we are going to try and package IronRuby for release ourselves (which we should do). Like a lot of things that we do around here, it's always simpler if we could take one step at a time. I suspect that MsPL + MIT as a start would be nice. MsPL + CPL would be fine too. But MsPL + GPL + LGPL would be a much harder sell." And from the source files from jvYamlb: /***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C) 2007 Ola Bini * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/ So does that mean it can be release under JUST the CPL? Because in that case, we should be sweet? ---------------------------------------------- Myles Eftos Mobile: +61-409-293-183 MadPilot Productions URL: http://www.madpilot.com.au Phone: +618-9467-7651 Fax: +618-9467-6289 Try our time tracking system: 88 Miles! http://www.88miles.net From m.david at xmlhacker.com Fri Feb 1 06:09:06 2008 From: m.david at xmlhacker.com (M. David Peterson) Date: Fri, 01 Feb 2008 04:09:06 -0700 Subject: [Ironruby-core] YAML for .NET In-Reply-To: <20080201105344.8210E18586D9@rubyforge.org> References: <20080201105344.8210E18586D9@rubyforge.org> Message-ID: On Fri, 01 Feb 2008 03:53:07 -0700, Myles Eftos wrote: > So does that mean it can be release under JUST the CPL? It seems to me that somewhere buried in that thread is the answer, and I believe that answer is yes. But it's obviously best to clarify. Also, while a direct port of Java to C# (or from Java to F#) is obviously best, to get things up and running quickly I would consider using IKVM.NET to compile a .NET accessible assembly directly from the jar. -- /M:D M. David Peterson Co-Founder & Chief Architect, 3rd&Urban, LLC Email: m.david at 3rdandUrban.com | m.david at amp.fm Mobile: (206) 418-9027 http://3rdandUrban.com | http://amp.fm | http://www.oreillynet.com/pub/au/2354 From bacondarwin at googlemail.com Fri Feb 1 07:21:39 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Fri, 1 Feb 2008 12:21:39 -0000 Subject: [Ironruby-core] YAML for .NET In-Reply-To: References: <20080201101120.26B9218586E8@rubyforge.org> Message-ID: <002301c864cc$ffe2aa90$ffa7ffb0$@com> I knew there was a reason I bought that F# book last year. Could be a goer. There is already a Haskell YAML implementation that takes a similar approach: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/YamlReference. Perhaps this could provide guidance, although it is released under the LGPL. Pete > Actually, reading back through that thread I am realizing now that it > might be worth considering writing the YAML parser in F# which already has > full support for lex/yacc as part of the core distribution. +, F# is > wicked fast. From bacondarwin at googlemail.com Fri Feb 1 07:38:07 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Fri, 1 Feb 2008 12:38:07 -0000 Subject: [Ironruby-core] YAML for .NET In-Reply-To: References: <20080201105344.8210E18586D9@rubyforge.org> Message-ID: <002401c864cf$4d543030$e7fc9090$@com> The PyYaml processor is MIT licensed and the implantation is fairly straightforward to follow. I have modified the google Yaml.NET project to be MIT licensed too. It appears from John Lam's posts last September that MS permissive + MIT would be acceptable. In the meantime, if no one else objects I will begin to port PyYaml to C#; starting with the Parsing and Presenting processes. The other layers, in particular Construction, will need more thought as to how they will integrate with .NET generally and IronRuby specifically. As far as F# goes, I think this is very interesting but I am not up to speed with the language to say how much better it would be than a straight OO port. I think it would be good to get a C# port up and running and then look at F# and how it could fit in/replace bits. There are of course Silverlight issues - do the F# libraries run on it? Again let me know if you think I should stop and do something else or if you want to get involved. Pete From drhent at hotmail.com Fri Feb 1 07:48:37 2008 From: drhent at hotmail.com (drh) Date: Fri, 1 Feb 2008 06:48:37 -0600 Subject: [Ironruby-core] YAML for .NET In-Reply-To: <20080201101120.26B9218586E8@rubyforge.org> References: <20080201101120.26B9218586E8@rubyforge.org> Message-ID: Interesting as Harry Pierson gave a talk at Lang.net about using F# to write a parser. http://www.devhawk.net and looking through my copy of expert f# there is a chapter on writing parsers and lexers. Douglas -------------------------------------------------- From: "M. David Peterson" Sent: Friday, February 01, 2008 4:42 AM To: "M. David Peterson" ; Subject: Re: [Ironruby-core] YAML for .NET > On Fri, 01 Feb 2008 03:23:56 -0700, M. David Peterson > wrote: > >> Thread starts @ >> http://rubyforge.org/pipermail/ironruby-core/2007-September/000039.html > > Actually, reading back through that thread I am realizing now that it > might be worth considering writing the YAML parser in F# which already has > full support for lex/yacc as part of the core distribution. +, F# is > wicked fast. > > http://research.microsoft.com/fsharp/fsharp.aspx > > I would also take a look @, > > http://blogs.msdn.com/dsyme/archive/2007/09/14/jason-hogg-implements-the-secpal-for-simplified-english-grammar-in-f.aspx > > ... and ... > > http://blogs.msdn.com/dsyme/archive/2008/01/05/the-fparsec-library-by-stephan-tolksdorf.aspx > > ... both of which provide good examples of writing parsers in F#. > > -- > /M:D > > M. David Peterson > Co-Founder & Chief Architect, 3rd&Urban, LLC > Email: m.david at 3rdandUrban.com | m.david at amp.fm > Mobile: (206) 418-9027 > http://3rdandUrban.com | http://amp.fm | > http://www.oreillynet.com/pub/au/2354 > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > From m.david at xmlhacker.com Fri Feb 1 07:56:54 2008 From: m.david at xmlhacker.com (M. David Peterson) Date: Fri, 01 Feb 2008 05:56:54 -0700 Subject: [Ironruby-core] YAML for .NET In-Reply-To: <002401c864cf$4d543030$e7fc9090$@com> References: <20080201105344.8210E18586D9@rubyforge.org> <002401c864cf$4d543030$e7fc9090$@com> Message-ID: On Fri, 01 Feb 2008 05:38:07 -0700, Peter Bacon Darwin wrote: > The PyYaml processor is MIT licensed and the implantation is fairly > straightforward to follow. I have modified the google Yaml.NET project > to > be MIT licensed too. It appears from John Lam's posts last September > that > MS permissive + MIT would be acceptable. Right on. Will PyYaml run via IronPython? If yes, then why not just place focus on using PyYaml directly via the DLR? > I think it would be good to get a C# port up and running and then > look at F# and how it could fit in/replace bits. Good idea. For runtime reference I've created an IKVM'd version of JRuby > http://mdavid.googlecode.com/svn/trunk/jruby/. You can reference the code in any C# source file via adding reference to the jruby.dll file contained in the above directory and then adding whichever from the following list you might need, using org.jvyamlb; using org.jvyamlb.events; using org.jvyamlb.nodes; using org.jvyamlb.tokens; using org.jvyamlb.utils; > There are of course > Silverlight issues - do the F# libraries run on it? I believe so, yes > http://strangelights.com/blog/archive/2007/05/25/1584.aspx > Again let me know if you think I should stop and do something else or if > you > want to get involved. Looks like you're on the right track to me :-) -- /M:D M. David Peterson Co-Founder & Chief Architect, 3rd&Urban, LLC Email: m.david at 3rdandUrban.com | m.david at amp.fm Mobile: (206) 418-9027 http://3rdandUrban.com | http://amp.fm | http://www.oreillynet.com/pub/au/2354 From m.david at xmlhacker.com Fri Feb 1 07:59:14 2008 From: m.david at xmlhacker.com (M. David Peterson) Date: Fri, 01 Feb 2008 05:59:14 -0700 Subject: [Ironruby-core] YAML for .NET In-Reply-To: References: <20080201101120.26B9218586E8@rubyforge.org> Message-ID: On Fri, 01 Feb 2008 05:48:37 -0700, drh wrote: > Interesting as Harry Pierson gave a talk at Lang.net about using F# to > write a parser. > http://www.devhawk.net Nice find! Thanks for the link! -- /M:D M. David Peterson Co-Founder & Chief Architect, 3rd&Urban, LLC Email: m.david at 3rdandUrban.com | m.david at amp.fm Mobile: (206) 418-9027 http://3rdandUrban.com | http://amp.fm | http://www.oreillynet.com/pub/au/2354 From m.david at xmlhacker.com Fri Feb 1 08:02:52 2008 From: m.david at xmlhacker.com (M. David Peterson) Date: Fri, 01 Feb 2008 06:02:52 -0700 Subject: [Ironruby-core] YAML for .NET In-Reply-To: References: <20080201105344.8210E18586D9@rubyforge.org> <002401c864cf$4d543030$e7fc9090$@com> Message-ID: On Fri, 01 Feb 2008 05:56:54 -0700, M. David Peterson wrote: > Good idea. For runtime reference I've created an IKVM'd version of JRuby >> http://mdavid.googlecode.com/svn/trunk/jruby/. Forgot to add the IVKM.* dependencies to the above directory. That's now fixed. -- /M:D M. David Peterson Co-Founder & Chief Architect, 3rd&Urban, LLC Email: m.david at 3rdandUrban.com | m.david at amp.fm Mobile: (206) 418-9027 http://3rdandUrban.com | http://amp.fm | http://www.oreillynet.com/pub/au/2354 From jflam at microsoft.com Fri Feb 1 09:41:34 2008 From: jflam at microsoft.com (John Lam (DLR)) Date: Fri, 1 Feb 2008 06:41:34 -0800 Subject: [Ironruby-core] YAML for .NET In-Reply-To: <002401c864cf$4d543030$e7fc9090$@com> References: <20080201105344.8210E18586D9@rubyforge.org> <002401c864cf$4d543030$e7fc9090$@com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D8FE627E5@NA-EXMSG-C115.redmond.corp.microsoft.com> Peter Bacon Darwin: > Again let me know if you think I should stop and do something else or > if you want to get involved. John Messerly has been working in his spare time on porting Ola's JvYAML parser to .NET and he's made quite a lot of progress already. It's probably the best direct port that is out there. That said, we're running into problems with our MutableString implementation that we have to address first since the next major sets of things that we're looking to get working are Regex and YAML. If you're looking for things to work on, porting JRuby's Regex engine would be awesome ... we're meeting today to hash out some details about our string implementation and I'll post later on how we're proceeding with that. Thanks! -John From m.david at xmlhacker.com Fri Feb 1 10:30:51 2008 From: m.david at xmlhacker.com (M. David Peterson) Date: Fri, 01 Feb 2008 08:30:51 -0700 Subject: [Ironruby-core] YAML for .NET In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D8FE627E5@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <20080201105344.8210E18586D9@rubyforge.org> <002401c864cf$4d543030$e7fc9090$@com> <372109E149E8084D8E6C7D9CFD82E0632D8FE627E5@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: On Fri, 01 Feb 2008 07:41:34 -0700, John Lam (DLR) wrote: > John Messerly has been working in his spare time on porting Ola's JvYAML > parser to .NET and he's made quite a lot of progress already. It's > probably the best direct port that is out there. So I was about to ask the following: "Does a list exist somewhere, preferably on a wiki (though handwritten on a napkin would work for the time being ;-), that provides a simple TODO:, TODONE:, and TODONOTTOUCHTHISSPACE: list of project pieces?" And then I decided "Before you make a fool of yourself, look on the wiki!" Apparently yes :D, Core: http://ironruby.rubyforge.org/wiki/wiki.pl?Core StdLib: http://ironruby.rubyforge.org/wiki/wiki.pl?StdLib I wonder if it wouldn't be such a bad idea to append to the mailing list signature something like, "Want to contribute? Look @ http://ironruby.rubyforge.org/wiki/wiki.pl?Core and http://ironruby.rubyforge.org/wiki/wiki.pl?StdLib to get some ideas." ... or something to that effect? If nothing else, it would advertise the fact that these pages exists, and while it's never going to be 100% up-to-date, something is better than nothing. Thoughts? -- /M:D M. David Peterson Co-Founder & Chief Architect, 3rd&Urban, LLC Email: m.david at 3rdandUrban.com | m.david at amp.fm Mobile: (206) 418-9027 http://3rdandUrban.com | http://amp.fm | http://www.oreillynet.com/pub/au/2354 From bacondarwin at googlemail.com Fri Feb 1 11:07:52 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Fri, 1 Feb 2008 16:07:52 -0000 Subject: [Ironruby-core] YAML for .NET In-Reply-To: References: <20080201105344.8210E18586D9@rubyforge.org> <002401c864cf$4d543030$e7fc9090$@com> <372109E149E8084D8E6C7D9CFD82E0632D8FE627E5@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <003501c864ec$9adccc00$d0966400$@com> And of course to update the wiki - way down at the bottom of the StdLib page is a lonely little Yaml? with no name attached. John M would you like to open source your Yaml port or stick it into the project I created? I think there are lots of .NET users out there who are not going to use Ruby or Python but might benefit from a decent Yaml processor. I will probably dump what I have done so far into the SVN at http://code.google.com/p/yaml-dot-net for the time being and see what happens. Pete -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of M. David Peterson Sent: Friday,01 February 01, 2008 15:31 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] YAML for .NET On Fri, 01 Feb 2008 07:41:34 -0700, John Lam (DLR) wrote: > John Messerly has been working in his spare time on porting Ola's JvYAML > parser to .NET and he's made quite a lot of progress already. It's > probably the best direct port that is out there. So I was about to ask the following: "Does a list exist somewhere, preferably on a wiki (though handwritten on a napkin would work for the time being ;-), that provides a simple TODO:, TODONE:, and TODONOTTOUCHTHISSPACE: list of project pieces?" And then I decided "Before you make a fool of yourself, look on the wiki!" Apparently yes :D, Core: http://ironruby.rubyforge.org/wiki/wiki.pl?Core StdLib: http://ironruby.rubyforge.org/wiki/wiki.pl?StdLib I wonder if it wouldn't be such a bad idea to append to the mailing list signature something like, "Want to contribute? Look @ http://ironruby.rubyforge.org/wiki/wiki.pl?Core and http://ironruby.rubyforge.org/wiki/wiki.pl?StdLib to get some ideas." ... or something to that effect? If nothing else, it would advertise the fact that these pages exists, and while it's never going to be 100% up-to-date, something is better than nothing. Thoughts? -- /M:D M. David Peterson Co-Founder & Chief Architect, 3rd&Urban, LLC Email: m.david at 3rdandUrban.com | m.david at amp.fm Mobile: (206) 418-9027 http://3rdandUrban.com | http://amp.fm | http://www.oreillynet.com/pub/au/2354 _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From jflam at microsoft.com Fri Feb 1 11:15:26 2008 From: jflam at microsoft.com (John Lam (DLR)) Date: Fri, 1 Feb 2008 08:15:26 -0800 Subject: [Ironruby-core] YAML for .NET In-Reply-To: <003501c864ec$9adccc00$d0966400$@com> References: <20080201105344.8210E18586D9@rubyforge.org> <002401c864cf$4d543030$e7fc9090$@com> <372109E149E8084D8E6C7D9CFD82E0632D8FE627E5@NA-EXMSG-C115.redmond.corp.microsoft.com> <003501c864ec$9adccc00$d0966400$@com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D8FE62825@NA-EXMSG-C115.redmond.corp.microsoft.com> Peter Bacon Darwin: > And of course to update the wiki - way down at the bottom of the StdLib > page is a lonely little Yaml? with no name attached. Yikes. Will fix that. > John M would you like to open source your Yaml port or stick it into > the project I created? I think there are lots of .NET users out there > who are not going to use Ruby or Python but might benefit from a decent > Yaml processor. This makes sense if when we refactor the parser from the API. I suspect it's probably factored that way in JvYAML today, but jomes knows for sure. > I will probably dump what I have done so far into the SVN at > http://code.google.com/p/yaml-dot-net for the time being and see what > happens. Cool. Thanks! BTW, do you want to sign up for porting the JRuby regex engine (which is itself a port of the Oniguruma engine). -John From bacondarwin at googlemail.com Fri Feb 1 11:55:03 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Fri, 1 Feb 2008 16:55:03 -0000 Subject: [Ironruby-core] YAML for .NET In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D8FE62825@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <20080201105344.8210E18586D9@rubyforge.org> <002401c864cf$4d543030$e7fc9090$@com> <372109E149E8084D8E6C7D9CFD82E0632D8FE627E5@NA-EXMSG-C115.redmond.corp.microsoft.com> <003501c864ec$9adccc00$d0966400$@com> <372109E149E8084D8E6C7D9CFD82E0632D8FE62825@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <003f01c864f3$32510460$96f30d20$@com> Source uploaded => http://code.google.com/p/yaml-dot-net/source/browse > I will probably dump what I have done so far into the SVN at > http://code.google.com/p/yaml-dot-net for the time being and see what > happens. From m.david at xmlhacker.com Fri Feb 1 12:16:15 2008 From: m.david at xmlhacker.com (M. David Peterson) Date: Fri, 01 Feb 2008 10:16:15 -0700 Subject: [Ironruby-core] YAML for .NET In-Reply-To: <003f01c864f3$32510460$96f30d20$@com> References: <20080201105344.8210E18586D9@rubyforge.org> <002401c864cf$4d543030$e7fc9090$@com> <372109E149E8084D8E6C7D9CFD82E0632D8FE627E5@NA-EXMSG-C115.redmond.corp.microsoft.com> <003501c864ec$9adccc00$d0966400$@com> <372109E149E8084D8E6C7D9CFD82E0632D8FE62825@NA-EXMSG-C115.redmond.corp.microsoft.com> <003f01c864f3$32510460$96f30d20$@com> Message-ID: On Fri, 01 Feb 2008 09:55:03 -0700, Peter Bacon Darwin wrote: > Source uploaded => http://code.google.com/p/yaml-dot-net/source/browse When did Google Code at the source viewer? -- /M:D M. David Peterson Co-Founder & Chief Architect, 3rd&Urban, LLC Email: m.david at 3rdandUrban.com | m.david at amp.fm Mobile: (206) 418-9027 http://3rdandUrban.com | http://amp.fm | http://www.oreillynet.com/pub/au/2354 From blowmage at gmail.com Fri Feb 1 12:18:21 2008 From: blowmage at gmail.com (Mike Moore) Date: Fri, 1 Feb 2008 10:18:21 -0700 Subject: [Ironruby-core] YAML for .NET In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D8FE627E5@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <20080201105344.8210E18586D9@rubyforge.org> <002401c864cf$4d543030$e7fc9090$@com> <372109E149E8084D8E6C7D9CFD82E0632D8FE627E5@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: Sorry to be so late to the YAML party. I started working on a port of JvYAML to C# last fall, but the absence of a byte-based MutableString makes it very hard to get it right. I eventually made my own MutableString as a placeholder, but there are still alot of holes and issues and bugs and issues with the code I ended up with. I'm excited to hear that John M is working on a port. How can I best help? ~Mike On Feb 1, 2008 7:41 AM, John Lam (DLR) wrote: > Peter Bacon Darwin: > > > Again let me know if you think I should stop and do something else or > > if you want to get involved. > > John Messerly has been working in his spare time on porting Ola's JvYAML > parser to .NET and he's made quite a lot of progress already. It's probably > the best direct port that is out there. > > That said, we're running into problems with our MutableString > implementation that we have to address first since the next major sets of > things that we're looking to get working are Regex and YAML. > > If you're looking for things to work on, porting JRuby's Regex engine > would be awesome ... we're meeting today to hash out some details about our > string implementation and I'll post later on how we're proceeding with that. > > Thanks! > -John > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20080201/7697aff2/attachment.html From lists at ruby-forum.com Fri Feb 1 22:33:01 2008 From: lists at ruby-forum.com (Lawrence Lee) Date: Sat, 2 Feb 2008 04:33:01 +0100 Subject: [Ironruby-core] How can I download IronRuby alpha 2 version? Message-ID: <859290b8ee6b4cca93a83a490e3836f1@ruby-forum.com> Hi, everyone. Someone can tell me the URL that the IronRuby alpa2. thanks. -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Sat Feb 2 04:49:40 2008 From: lists at ruby-forum.com (Softmind Technology) Date: Sat, 2 Feb 2008 10:49:40 +0100 Subject: [Ironruby-core] IronRuby (Without MVC ) and ActiveRecord... Is it Possib In-Reply-To: <5b0c6acc1ee9a93b90e8c1d238280971@ruby-forum.com> References: <5b0c6acc1ee9a93b90e8c1d238280971@ruby-forum.com> Message-ID: <19893d51e2b11623238211584410a98d@ruby-forum.com> Hi, I just visted... http://www.datamapper.org/ I think DataMapper is in strong competition with ActiveRecord, written in Pure Ruby code. Merb an another framework like Rails shall be offering this ORM support along with Active Record. Prado is an another framework based PHP with Asp.Net like webform features, is also offering Active Record support and its available on their website as a tutorial. I think IronRuby should also think of offering this both ORM support. Thanks -- Posted via http://www.ruby-forum.com/. From michael.letterle at gmail.com Sat Feb 2 11:57:18 2008 From: michael.letterle at gmail.com (Michael Letterle) Date: Sat, 2 Feb 2008 11:57:18 -0500 Subject: [Ironruby-core] IronRuby (Without MVC ) and ActiveRecord... Is it Possib In-Reply-To: <19893d51e2b11623238211584410a98d@ruby-forum.com> References: <5b0c6acc1ee9a93b90e8c1d238280971@ruby-forum.com> <19893d51e2b11623238211584410a98d@ruby-forum.com> Message-ID: I believe the end goal of IronRuby (and someone correct me if I'm wrong), is to fully support the Ruby language, meaning things like DataMapper, ActiveRecord, Rails, et. al. will "just work" Of course some of the C components may need to be ported, but that would be outside of the scope of the IronRuby project. >On Sat, Feb 2, 2008 at 4:49 AM, Softmind Technology wrote: > Hi, > > I just visted... > > http://www.datamapper.org/ > > I think DataMapper is in strong competition with ActiveRecord, written > in Pure Ruby code. > > Merb an another framework like Rails shall be offering this ORM support > along with Active Record. > > Prado is an another framework based PHP with Asp.Net like webform > features, is also offering Active Record support and its available on > their website as a tutorial. > > I think IronRuby should also think of offering this both ORM support. > > Thanks > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -- Michael Letterle [Polymath Programmer] http://michaeldotnet.blogspot.com From enicholson at gmail.com Sat Feb 2 14:12:58 2008 From: enicholson at gmail.com (Eric Nicholson) Date: Sat, 2 Feb 2008 14:12:58 -0500 Subject: [Ironruby-core] How can I download IronRuby alpha 2 version? In-Reply-To: <859290b8ee6b4cca93a83a490e3836f1@ruby-forum.com> References: <859290b8ee6b4cca93a83a490e3836f1@ruby-forum.com> Message-ID: I'm not sure that there has been an official alpha yet... But you can grab the source. Michael Letterle has a really good write up: http://michaeldotnet.blogspot.com/2008/01/ironruby-quick-start.html On Feb 1, 2008 10:33 PM, Lawrence Lee wrote: > Hi, everyone. > Someone can tell me the URL that the IronRuby alpa2. > > 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/20080202/036aab32/attachment.html From blowmage at gmail.com Sat Feb 2 16:36:40 2008 From: blowmage at gmail.com (Mike Moore) Date: Sat, 2 Feb 2008 14:36:40 -0700 Subject: [Ironruby-core] IronRuby (Without MVC ) and ActiveRecord... Is it Possib In-Reply-To: References: <5b0c6acc1ee9a93b90e8c1d238280971@ruby-forum.com> <19893d51e2b11623238211584410a98d@ruby-forum.com> Message-ID: Yes, that is the goal. And the plan is for all the C components in the standard library to be ported as well. On Feb 2, 2008 9:57 AM, Michael Letterle wrote: > I believe the end goal of IronRuby (and someone correct me if I'm > wrong), is to fully support the Ruby language, meaning things like > DataMapper, ActiveRecord, Rails, et. al. will "just work" Of course > some of the C components may need to be ported, but that would be > outside of the scope of the IronRuby project. > > >On Sat, Feb 2, 2008 at 4:49 AM, Softmind Technology > wrote: > > Hi, > > > > I just visted... > > > > http://www.datamapper.org/ > > > > I think DataMapper is in strong competition with ActiveRecord, written > > in Pure Ruby code. > > > > Merb an another framework like Rails shall be offering this ORM support > > along with Active Record. > > > > Prado is an another framework based PHP with Asp.Net like webform > > features, is also offering Active Record support and its available on > > their website as a tutorial. > > > > I think IronRuby should also think of offering this both ORM support. > > > > Thanks > > > > -- > > Posted via http://www.ruby-forum.com/. > > _______________________________________________ > > Ironruby-core mailing list > > Ironruby-core at rubyforge.org > > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > > > -- > Michael Letterle > [Polymath Programmer] > http://michaeldotnet.blogspot.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/20080202/932a1e60/attachment.html From sanxiyn at gmail.com Sat Feb 2 22:02:08 2008 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Sun, 3 Feb 2008 12:02:08 +0900 Subject: [Ironruby-core] YAML for .NET In-Reply-To: References: <20080201105344.8210E18586D9@rubyforge.org> <002401c864cf$4d543030$e7fc9090$@com> Message-ID: <5b0248170802021902w7ddec6f4wa8804770153bb299@mail.gmail.com> 2008/2/1, M. David Peterson : > Right on. Will PyYaml run via IronPython? If yes, then why not just place > focus on using PyYaml directly via the DLR? 1. Will PyYaml run via IronPython? Yes. 2. If yes, why not focus on using PyYaml? I believe this is a separate question from having a good YAML parser on .NET. -- Seo Sanghyeon From m.david at xmlhacker.com Sun Feb 3 05:09:01 2008 From: m.david at xmlhacker.com (M. David Peterson) Date: Sun, 03 Feb 2008 03:09:01 -0700 Subject: [Ironruby-core] YAML for .NET In-Reply-To: <5b0248170802021902w7ddec6f4wa8804770153bb299@mail.gmail.com> References: <20080201105344.8210E18586D9@rubyforge.org> <002401c864cf$4d543030$e7fc9090$@com> <5b0248170802021902w7ddec6f4wa8804770153bb299@mail.gmail.com> Message-ID: On Sat, 02 Feb 2008 20:02:08 -0700, Sanghyeon Seo wrote: > 1. Will PyYaml run via IronPython? > Yes. Nice! > 2. If yes, why not focus on using PyYaml? > I believe this is a separate question from having a good YAML parser on > .NET. By "on .NET" I assume you are referring to a good YAML parser that is available to more than just Iron* languages? -- /M:D M. David Peterson Co-Founder & Chief Architect, 3rd&Urban, LLC Email: m.david at 3rdandUrban.com | m.david at amp.fm Mobile: (206) 418-9027 http://3rdandUrban.com | http://amp.fm | http://www.oreillynet.com/pub/au/2354 From blowmage at gmail.com Sun Feb 3 10:37:01 2008 From: blowmage at gmail.com (Mike Moore) Date: Sun, 3 Feb 2008 08:37:01 -0700 Subject: [Ironruby-core] YAML for .NET In-Reply-To: References: <20080201105344.8210E18586D9@rubyforge.org> <002401c864cf$4d543030$e7fc9090$@com> <5b0248170802021902w7ddec6f4wa8804770153bb299@mail.gmail.com> Message-ID: IronRuby's YAML library needs to more than just be a YAML lib available to .NET. It needs to match the API that the Ruby lib implemented with Syck has. It has a particular API, which is why Ola wrote RbYAML in the first place. We could use RbYAML (which is written entirely in Ruby) for the yaml lib in IronRuby, but the JRuby guys found that the performance wasn't there. YAML is used in lots of apps, and having it be an order of magnitude slower on one platform vs. the other isn't good. So Ola wrote JvYAML, which follows the Syck API but is written in Java. That's the port I started on, and that's what John M is currently working on. I understand there are other YAML libs out there. Personally, I'd love to experiment with F# to get one written. But unless they follow Syck then they won't match what Ruby already has. I know there was an effort at a university somewhere to write a C# port of Syck, but I don't think it was ever released. And I seem to remember the JRuby guys saying that it was simpler to write it in Java than port Syck. Also, I seem to recall Syck isn't going to be worked on anymore. On Feb 3, 2008 3:09 AM, M. David Peterson wrote: > On Sat, 02 Feb 2008 20:02:08 -0700, Sanghyeon Seo > wrote: > > > 1. Will PyYaml run via IronPython? > > Yes. > > Nice! > > > 2. If yes, why not focus on using PyYaml? > > I believe this is a separate question from having a good YAML parser on > > .NET. > > By "on .NET" I assume you are referring to a good YAML parser that is > available to more than just Iron* languages? > > -- > /M:D > > M. David Peterson > Co-Founder & Chief Architect, 3rd&Urban, LLC > Email: m.david at 3rdandUrban.com | m.david at amp.fm > Mobile: (206) 418-9027 > http://3rdandUrban.com | http://amp.fm | > http://www.oreillynet.com/pub/au/2354 > _______________________________________________ > 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/20080203/9eb08878/attachment.html From lists at ruby-forum.com Sun Feb 3 12:12:22 2008 From: lists at ruby-forum.com (Kim Byung seok) Date: Sun, 3 Feb 2008 18:12:22 +0100 Subject: [Ironruby-core] delegate Message-ID: <3adad22e80c66a8d6b13d6b6cf485896@ruby-forum.com> Hellow I worte code this code d = System::EventHandler.new { |sender,e| puts "1" } i run code dispay this error wrong number or type of arguments for `System::EventHandler' (ArgumentError) The delegate to inform a direction for use -- Posted via http://www.ruby-forum.com/. From michael.letterle at gmail.com Sun Feb 3 13:21:20 2008 From: michael.letterle at gmail.com (Michael Letterle) Date: Sun, 3 Feb 2008 13:21:20 -0500 Subject: [Ironruby-core] delegate In-Reply-To: <3adad22e80c66a8d6b13d6b6cf485896@ruby-forum.com> References: <3adad22e80c66a8d6b13d6b6cf485896@ruby-forum.com> Message-ID: I don't think you'd generally want to be initializing an event handler like that, normally you just want to respond to an event. For instance, let's say you have a System::Windows::Forms::Button called rbutton, you would do something like the following: rbutton.Click { |sender,e| puts "Clicked!"} Why do you feel the need to new up an EventHandler directly? On Feb 3, 2008 12:12 PM, Kim Byung seok wrote: > Hellow > I worte code this code > > d = System::EventHandler.new { |sender,e| puts "1" } > > i run code dispay this error > wrong number or type of arguments for `System::EventHandler' > (ArgumentError) > > The delegate to inform a direction for use > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -- Michael Letterle [Polymath Programmer] http://michaeldotnet.blogspot.com From lists at ruby-forum.com Sun Feb 3 14:48:28 2008 From: lists at ruby-forum.com (Huw Collingbourne) Date: Sun, 3 Feb 2008 20:48:28 +0100 Subject: [Ironruby-core] delegate In-Reply-To: References: <3adad22e80c66a8d6b13d6b6cf485896@ruby-forum.com> Message-ID: <925d311d9c135b9a1e2eae410c2d7395@ruby-forum.com> Michael Letterle wrote: > rbutton.Click { |sender,e| puts "Clicked!"} > > Why do you feel the need to new up an EventHandler directly? The problem is that this does not providee the ability (as in all other .NET languages) to do true delegation. In C#, for example, it is perfectly posssible to delegate the same event handling method to large numbers of different controls. We have already 'faked' delegation in a similar way to your suggestion (attaching blocks to specific Control.events) in our current form designer for IronRuby: http://www.sapphiresteel.com/IronRuby-Visual-Form-Designer http://www.sapphiresteel.com/IronRuby-Visual-Designer For a production system, however, this is less than desirable. What we really need is the normal .NET type of delegate chaining using the += and -= operators. best wishes Huw SapphireSteel Software Ruby and Rails In Visual Studio http://www.sapphiresteel.com -- Posted via http://www.ruby-forum.com/. From ivan at flanders.co.nz Sun Feb 3 14:54:53 2008 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Mon, 4 Feb 2008 08:54:53 +1300 Subject: [Ironruby-core] building on OSX Message-ID: Hi I have a hard time getting ironruby to build on OSX I first tried with the dmg image I can download from the mono-project. After I tried with building mono from subversion. Am I missing something obvious ? ivan-mbp:ironruby ivan$ rake compile mono=1 (in /Users/ivan/tools/ironruby) Read in 47 resources from '/Users/ivan/tools/ironruby/src/microsoft.scripting/Resources.resx' Writing resource file... Done. Read in 17 resources from '/Users/ivan/tools/ironruby/src/microsoft.scripting/Math/MathResources.resx' Writing resource file... Done. error CS0006: cannot find metadata file `mono/2.0/System.Configuration.dll' error CS0006: cannot find metadata file `mono/2.0/System.dll' Compilation failed: 2 error(s), 0 warnings rake aborted! Command failed with status (1): [/opt/local/mono/bin/gmcs /nologo /noconfig...] /Users/ivan/tools/ironruby/rakefile:197:in `exec' (See full trace by running task with --trace) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20080204/69a56a40/attachment.html From jflam at microsoft.com Sun Feb 3 14:59:17 2008 From: jflam at microsoft.com (John Lam (DLR)) Date: Sun, 3 Feb 2008 11:59:17 -0800 Subject: [Ironruby-core] building on OSX In-Reply-To: References: Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D8FF0373A@NA-EXMSG-C115.redmond.corp.microsoft.com> Ivan Porto Carrero: > I have a hard time getting ironruby to build on OSX I first tried with > the dmg image I can download from the mono-project. > After I tried with building mono from subversion. > Am I missing something obvious ? The last time I built IronRuby on a OS X I grabbed Mono from the SVN trunk - the dmg was really out of date. -John From ivan at flanders.co.nz Sun Feb 3 15:14:28 2008 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Mon, 4 Feb 2008 09:14:28 +1300 Subject: [Ironruby-core] building on OSX In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D8FF0373A@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <372109E149E8084D8E6C7D9CFD82E0632D8FF0373A@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: I did i'm trying to compile it against the mono version i got from trunk from yesterday ivan-mbp:ironruby ivan$ mono -V Mono JIT compiler version 1.9 (/trunk/ r94512) Copyright (C) 2002-2007 Novell, Inc and Contributors. www.mono-project.com TLS: normal GC: Included Boehm (with typed GC) SIGSEGV: normal Notification: Thread + polling Architecture: x86 Disabled: none ok .. I'll keep trying then until I get a working mono version. Haven't done much testing with mono but I did run the minimal test suite before installing. If I compile on windows and use the binaries there is no problem. Thanks Ivan On Feb 4, 2008 8:59 AM, John Lam (DLR) wrote: > Ivan Porto Carrero: > > > I have a hard time getting ironruby to build on OSX I first tried with > > the dmg image I can download from the mono-project. > > After I tried with building mono from subversion. > > Am I missing something obvious ? > > The last time I built IronRuby on a OS X I grabbed Mono from the SVN trunk > - the dmg was really out of date. > > -John > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20080204/908a13bf/attachment.html From angrygreg at gmail.com Sun Feb 3 17:11:57 2008 From: angrygreg at gmail.com (Greg Akins) Date: Sun, 3 Feb 2008 17:11:57 -0500 Subject: [Ironruby-core] Still plugging away at some simple IronRuby stuff In-Reply-To: <8526685f0801271730q4c6e9e26l38c37731af14502c@mail.gmail.com> References: <8526685f0801271730q4c6e9e26l38c37731af14502c@mail.gmail.com> Message-ID: <8526685f0802031411q2fdf1b04tb55892701c376c9b@mail.gmail.com> On Jan 27, 2008 8:30 PM, Greg Akins wrote: > > > I am following the example at > http://ironruby.rubyforge.org/wiki/wiki.pl?ExecutingIronRubyFromCSharp > > NOTE: I tried to be helpful and update that page with the examples > that were just posted to the list, but now the page includes this the > IScriptModule().SetVariable code - which doesn't appear to be valid > anymore) FYI, I just updated this page to fix the problem I caused last weekend. -- Greg Akins Software Development Manager SSI Services http://kc.vanadium.com http://www.pghcodingdojo.org http://www.insomnia-consulting.org/monologue From michael.letterle at gmail.com Sun Feb 3 17:28:57 2008 From: michael.letterle at gmail.com (Michael Letterle) Date: Sun, 3 Feb 2008 17:28:57 -0500 Subject: [Ironruby-core] delegate In-Reply-To: <925d311d9c135b9a1e2eae410c2d7395@ruby-forum.com> References: <3adad22e80c66a8d6b13d6b6cf485896@ruby-forum.com> <925d311d9c135b9a1e2eae410c2d7395@ruby-forum.com> Message-ID: Well, it seems like the event stuff is only half done, let's say you add two additional blocks to the Click event. You'll actually fire three methods, except it will only be the first one you defined (ie It'll say "Clicked!" three times). It seems to have something to do with the way SetInvocationRule is currently implemented in RubyEventInfo. I'm sure this'll be fixed eventually :) What I'm saying is eventually you'll be able to something like rbutton.Click{|sender, e| puts "Clicked!"} rbutton.Click{|sender, e| puts "Also Clicked!"} and it'll work like +=ing to two seperate functions. On Feb 3, 2008 2:48 PM, Huw Collingbourne wrote: > Michael Letterle wrote: > > > rbutton.Click { |sender,e| puts "Clicked!"} > > > > Why do you feel the need to new up an EventHandler directly? > > The problem is that this does not providee the ability (as in all other > .NET languages) to do true delegation. In C#, for example, it is > perfectly posssible to delegate the same event handling method to large > numbers of different controls. We have already 'faked' delegation in a > similar way to your suggestion (attaching blocks to specific > Control.events) in our current form designer for IronRuby: > > http://www.sapphiresteel.com/IronRuby-Visual-Form-Designer > http://www.sapphiresteel.com/IronRuby-Visual-Designer > > > For a production system, however, this is less than desirable. What we > really need is the normal .NET type of delegate chaining using the += > and -= operators. > > best wishes > Huw > > SapphireSteel Software > Ruby and Rails In Visual Studio > http://www.sapphiresteel.com > -- > > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -- Michael Letterle [Polymath Programmer] http://michaeldotnet.blogspot.com From lists at ruby-forum.com Sun Feb 3 20:18:20 2008 From: lists at ruby-forum.com (Kim Byung seok) Date: Mon, 4 Feb 2008 02:18:20 +0100 Subject: [Ironruby-core] delegate In-Reply-To: References: <3adad22e80c66a8d6b13d6b6cf485896@ruby-forum.com> Message-ID: Michael Letterle wrote: > I don't think you'd generally want to be initializing an event handler > like that, normally you just want to respond to an event. For > instance, let's say you have a System::Windows::Forms::Button called > rbutton, you would do something like the following: > > rbutton.Click { |sender,e| puts "Clicked!"} > > Why do you feel the need to new up an EventHandler directly? > > > > On Feb 3, 2008 12:12 PM, Kim Byung seok wrote: >> -- >> Posted via http://www.ruby-forum.com/. >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core >> > > > > -- > Michael Letterle > [Polymath Programmer] > http://michaeldotnet.blogspot.com ^^; The use is necessary because this code System::ThreadPool.QueueUserWorItem and System::Windows::Threading::Dispatcher.BeginInvoke Above two cords total delegate connection necessary so i wan't directly delegate -- Posted via http://www.ruby-forum.com/. From Tomas.Matousek at microsoft.com Mon Feb 4 00:40:32 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Sun, 3 Feb 2008 21:40:32 -0800 Subject: [Ironruby-core] delegate In-Reply-To: References: <3adad22e80c66a8d6b13d6b6cf485896@ruby-forum.com> <925d311d9c135b9a1e2eae410c2d7395@ruby-forum.com> Message-ID: Yes, it's half done and will be fixed. All scenarios that are available in other .NET languages will be doable in Ruby as well. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Michael Letterle Sent: Sunday, February 03, 2008 2:29 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] delegate Well, it seems like the event stuff is only half done, let's say you add two additional blocks to the Click event. You'll actually fire three methods, except it will only be the first one you defined (ie It'll say "Clicked!" three times). It seems to have something to do with the way SetInvocationRule is currently implemented in RubyEventInfo. I'm sure this'll be fixed eventually :) What I'm saying is eventually you'll be able to something like rbutton.Click{|sender, e| puts "Clicked!"} rbutton.Click{|sender, e| puts "Also Clicked!"} and it'll work like +=ing to two seperate functions. On Feb 3, 2008 2:48 PM, Huw Collingbourne wrote: > Michael Letterle wrote: > > > rbutton.Click { |sender,e| puts "Clicked!"} > > > > Why do you feel the need to new up an EventHandler directly? > > The problem is that this does not providee the ability (as in all other > .NET languages) to do true delegation. In C#, for example, it is > perfectly posssible to delegate the same event handling method to large > numbers of different controls. We have already 'faked' delegation in a > similar way to your suggestion (attaching blocks to specific > Control.events) in our current form designer for IronRuby: > > http://www.sapphiresteel.com/IronRuby-Visual-Form-Designer > http://www.sapphiresteel.com/IronRuby-Visual-Designer > > > For a production system, however, this is less than desirable. What we > really need is the normal .NET type of delegate chaining using the += > and -= operators. > > best wishes > Huw > > SapphireSteel Software > Ruby and Rails In Visual Studio > http://www.sapphiresteel.com > -- > > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -- Michael Letterle [Polymath Programmer] http://michaeldotnet.blogspot.com _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From lists at ruby-forum.com Mon Feb 4 05:56:56 2008 From: lists at ruby-forum.com (Huw Collingbourne) Date: Mon, 4 Feb 2008 11:56:56 +0100 Subject: [Ironruby-core] delegate In-Reply-To: References: <3adad22e80c66a8d6b13d6b6cf485896@ruby-forum.com> <925d311d9c135b9a1e2eae410c2d7395@ruby-forum.com> Message-ID: Michael Letterle wrote: > What I'm saying is eventually you'll be able to something like > > rbutton.Click{|sender, e| puts "Clicked!"} > rbutton.Click{|sender, e| puts "Also Clicked!"} > That's still not quite delegation in the usual sense. What if we have: def onClick( sender ) # do something end ...then have this single method 'wired up' to the Click events on, say, the 50+ buttons of a scientific calculator? In short, the delegated methods need to be detached from specific objects. I'm sure the IronRuby team will provide this in time. It makes a big difference when it comes to implementing code+form integration ;-) best wishes Huw SapphireSteel Software Ruby and Rails In Visual Studio http://www.sapphiresteel.com -- Posted via http://www.ruby-forum.com/. From michael.letterle at gmail.com Mon Feb 4 07:28:58 2008 From: michael.letterle at gmail.com (Michael Letterle) Date: Mon, 4 Feb 2008 07:28:58 -0500 Subject: [Ironruby-core] delegate In-Reply-To: References: <3adad22e80c66a8d6b13d6b6cf485896@ruby-forum.com> <925d311d9c135b9a1e2eae410c2d7395@ruby-forum.com> Message-ID: You /could/ do: rbutton.Click {|sender, e| onClick sender} rbutton2.Click {|sender, e| onClick sender} Though that's still not "true" delegation :) On Feb 4, 2008 5:56 AM, Huw Collingbourne wrote: > Michael Letterle wrote: > > What I'm saying is eventually you'll be able to something like > > > > rbutton.Click{|sender, e| puts "Clicked!"} > > rbutton.Click{|sender, e| puts "Also Clicked!"} > > > > That's still not quite delegation in the usual sense. What if we have: > > def onClick( sender ) > # do something > end > > ...then have this single method 'wired up' to the Click events on, say, > the 50+ buttons of a scientific calculator? In short, the delegated > methods need to be detached from specific objects. I'm sure the IronRuby > team will provide this in time. It makes a big difference when it comes > to implementing code+form integration ;-) > > > best wishes > Huw > > SapphireSteel Software > Ruby and Rails In Visual Studio > http://www.sapphiresteel.com > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -- Michael Letterle [Polymath Programmer] http://michaeldotnet.blogspot.com From Mike.Plavsky at quest.com Mon Feb 4 07:30:27 2008 From: Mike.Plavsky at quest.com (Mike Plavsky) Date: Mon, 4 Feb 2008 12:30:27 +0000 Subject: [Ironruby-core] delegate In-Reply-To: References: <3adad22e80c66a8d6b13d6b6cf485896@ruby-forum.com> <925d311d9c135b9a1e2eae410c2d7395@ruby-forum.com> Message-ID: Does IronRuby work with rspec? -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Michael Letterle Sent: Monday, February 04, 2008 3:29 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] delegate You /could/ do: rbutton.Click {|sender, e| onClick sender} rbutton2.Click {|sender, e| onClick sender} Though that's still not "true" delegation :) On Feb 4, 2008 5:56 AM, Huw Collingbourne wrote: > Michael Letterle wrote: > > What I'm saying is eventually you'll be able to something like > > > > rbutton.Click{|sender, e| puts "Clicked!"} > > rbutton.Click{|sender, e| puts "Also Clicked!"} > > > > That's still not quite delegation in the usual sense. What if we have: > > def onClick( sender ) > # do something > end > > ...then have this single method 'wired up' to the Click events on, say, > the 50+ buttons of a scientific calculator? In short, the delegated > methods need to be detached from specific objects. I'm sure the IronRuby > team will provide this in time. It makes a big difference when it comes > to implementing code+form integration ;-) > > > best wishes > Huw > > SapphireSteel Software > Ruby and Rails In Visual Studio > http://www.sapphiresteel.com > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -- Michael Letterle [Polymath Programmer] http://michaeldotnet.blogspot.com _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From m.david at xmlhacker.com Mon Feb 4 08:39:35 2008 From: m.david at xmlhacker.com (M. David Peterson) Date: Mon, 04 Feb 2008 06:39:35 -0700 Subject: [Ironruby-core] building on OSX In-Reply-To: References: <372109E149E8084D8E6C7D9CFD82E0632D8FF0373A@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: On Sun, 03 Feb 2008 13:14:28 -0700, Ivan Porto Carrero wrote: > ok .. I'll keep trying then until I get a working mono version. Haven't > done much testing with mono but I did run the minimal test suite before > installing. > If I compile on windows and use the binaries there is no problem. Are you compiling with both --with-preview=yes and --with-moonlight=yes ? Actually, I think they both are set to yet by default, but if you're building from SVN you'll need to checkout not only the mono directory but olive, moon, mcs, and (possibly) gtk-sharp as well. You've already got mono checked out, so if you enter the same directory that the mono directory is contained in and run, svn co svn://anonsvn.mono-project.com/source/trunk/{mcs,moon,olive,gtk-sharp} ... to then svn up mono you can then enter the mono directory and run, ./autogen.sh --with-preview=yes --with-moonlight=yes [additional options (such as --prefix)] NOTE: I realize I mentioned that I believe both of these values are yes by default, but it doesn't hurt so it's worth adding them just in case. If that script finishes without erroring out then run, make; sudo make install If it does error out there's a good chance it's going to be one of several things, 1) The existing DMG-based installation is getting in the way. I would move /Library/Frameworks/Mono.framework (if you don't see it there, try ~/Library/Frameworks/Mono.framework) to another directory to ensure you're not running into a problem with the build process linking against the wrong libraries. 2) The generated ./configure file will have a few lines that autotools will claim to be invalid syntax. If you see this problem, just open the ./configure file, go to the specified line, and comment it out. IMPORTANT!: Don't rerun ./autogen.sh at this point. It will write over the previous generated ./configure file and cause the same error to occur. At this stage of the game you'll then want to run, ./configure --with-preview=yes --with-moonlight=yes [additional options (such as --prefix)]; make; sudo make install At this point you're system should be completely up-to-date with all of the latest code that is specific to the needs of the DLR and DLR-based languages. That doesn't mean it's guaranteed to compile and work, but I've yet to find a situation unrelated to System.Windows.Forms that didn't work on OS X if it worked on Linux. It sometimes takes a bit of hacking the build process, but it usually works out in the end. :D That said, given the IronRuby and the DLR are moving targets, there's no guarantee you're not going to run into issues. But in my own experience, the Mono team places an extremely high importance on bugs related to the Iron* projects and the DLR. Often times there's a fix checked into SVN within a few hours of filing the report. Hope this helps! -- /M:D M. David Peterson Co-Founder & Chief Architect, 3rd&Urban, LLC Email: m.david at 3rdandUrban.com | m.david at amp.fm Mobile: (206) 418-9027 http://3rdandUrban.com | http://amp.fm | http://www.oreillynet.com/pub/au/2354 From alex at blackkettle.org Mon Feb 4 08:47:01 2008 From: alex at blackkettle.org (Alex Young) Date: Mon, 04 Feb 2008 13:47:01 +0000 Subject: [Ironruby-core] delegate In-Reply-To: References: <3adad22e80c66a8d6b13d6b6cf485896@ruby-forum.com> <925d311d9c135b9a1e2eae410c2d7395@ruby-forum.com> Message-ID: <1202132821.27218.13.camel@shaxam0001> On Mon, 2008-02-04 at 07:28 -0500, Michael Letterle wrote: > You /could/ do: > > rbutton.Click {|sender, e| onClick sender} > rbutton2.Click {|sender, e| onClick sender} > > Though that's still not "true" delegation :) > Surely: on_click_handler = Proc.new {|sender, e| puts "Clicked"} rbutton.Click &on_click_handler lbutton.Click &on_click_handler would do the trick here? Have I missed something? It's not impossible to also have: rbutton.Click -= on_click_handler later, if you want... -- Alex > On Feb 4, 2008 5:56 AM, Huw Collingbourne wrote: > > Michael Letterle wrote: > > > What I'm saying is eventually you'll be able to something like > > > > > > rbutton.Click{|sender, e| puts "Clicked!"} > > > rbutton.Click{|sender, e| puts "Also Clicked!"} > > > > > > > That's still not quite delegation in the usual sense. What if we have: > > > > def onClick( sender ) > > # do something > > end > > > > ...then have this single method 'wired up' to the Click events on, say, > > the 50+ buttons of a scientific calculator? In short, the delegated > > methods need to be detached from specific objects. I'm sure the IronRuby > > team will provide this in time. It makes a big difference when it comes > > to implementing code+form integration ;-) > > > > > > best wishes > > Huw > > > > SapphireSteel Software > > Ruby and Rails In Visual Studio > > http://www.sapphiresteel.com > > -- > > Posted via http://www.ruby-forum.com/. > > _______________________________________________ > > Ironruby-core mailing list > > Ironruby-core at rubyforge.org > > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > > From michael.letterle at gmail.com Mon Feb 4 10:00:18 2008 From: michael.letterle at gmail.com (Michael Letterle) Date: Mon, 4 Feb 2008 10:00:18 -0500 Subject: [Ironruby-core] delegate In-Reply-To: <1202132821.27218.13.camel@shaxam0001> References: <3adad22e80c66a8d6b13d6b6cf485896@ruby-forum.com> <925d311d9c135b9a1e2eae410c2d7395@ruby-forum.com> <1202132821.27218.13.camel@shaxam0001> Message-ID: That's a bit closer to "true" delegation, in that the same method is called rather then two seperate methods, but the event handling still doesn't work because of the way it generates the AST Rule. Try the following: onClick = Proc.new {|sender, e| puts "Called OnClick!" } onClick2 = Proc.new {sender, e| puts "Called OnClick2!"} rbutton.Click &onClick rbutton.Click &onClick2 On Feb 4, 2008 8:47 AM, Alex Young wrote: > > On Mon, 2008-02-04 at 07:28 -0500, Michael Letterle wrote: > > You /could/ do: > > > > rbutton.Click {|sender, e| onClick sender} > > rbutton2.Click {|sender, e| onClick sender} > > > > Though that's still not "true" delegation :) > > > > Surely: > > on_click_handler = Proc.new {|sender, e| puts "Clicked"} > > rbutton.Click &on_click_handler > lbutton.Click &on_click_handler > > would do the trick here? Have I missed something? It's not impossible > to also have: > > rbutton.Click -= on_click_handler > > later, if you want... > > -- > Alex > > > > On Feb 4, 2008 5:56 AM, Huw Collingbourne wrote: > > > Michael Letterle wrote: > > > > What I'm saying is eventually you'll be able to something like > > > > > > > > rbutton.Click{|sender, e| puts "Clicked!"} > > > > rbutton.Click{|sender, e| puts "Also Clicked!"} > > > > > > > > > > That's still not quite delegation in the usual sense. What if we have: > > > > > > def onClick( sender ) > > > # do something > > > end > > > > > > ...then have this single method 'wired up' to the Click events on, say, > > > the 50+ buttons of a scientific calculator? In short, the delegated > > > methods need to be detached from specific objects. I'm sure the IronRuby > > > team will provide this in time. It makes a big difference when it comes > > > to implementing code+form integration ;-) > > > > > > > > > best wishes > > > Huw > > > > > > SapphireSteel Software > > > Ruby and Rails In Visual Studio > > > http://www.sapphiresteel.com > > > -- > > > Posted via http://www.ruby-forum.com/. > > > _______________________________________________ > > > Ironruby-core mailing list > > > Ironruby-core at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > > > > > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -- Michael Letterle [Polymath Programmer] http://michaeldotnet.blogspot.com From alex at blackkettle.org Mon Feb 4 10:30:58 2008 From: alex at blackkettle.org (Alex Young) Date: Mon, 04 Feb 2008 15:30:58 +0000 Subject: [Ironruby-core] delegate In-Reply-To: References: <3adad22e80c66a8d6b13d6b6cf485896@ruby-forum.com> <925d311d9c135b9a1e2eae410c2d7395@ruby-forum.com> <1202132821.27218.13.camel@shaxam0001> Message-ID: <1202139058.27218.22.camel@shaxam0001> On Mon, 2008-02-04 at 10:00 -0500, Michael Letterle wrote: > That's a bit closer to "true" delegation, in that the same method is > called rather then two seperate methods, but the event handling still > doesn't work because of the way it generates the AST Rule. Try the > following: > > onClick = Proc.new {|sender, e| puts "Called OnClick!" } > onClick2 = Proc.new {sender, e| puts "Called OnClick2!"} > > rbutton.Click &onClick > rbutton.Click &onClick2 > Agreed - it's one step closer, though :-) -- Alex > On Feb 4, 2008 8:47 AM, Alex Young wrote: > > > > On Mon, 2008-02-04 at 07:28 -0500, Michael Letterle wrote: > > > You /could/ do: > > > > > > rbutton.Click {|sender, e| onClick sender} > > > rbutton2.Click {|sender, e| onClick sender} > > > > > > Though that's still not "true" delegation :) > > > > > > > Surely: > > > > on_click_handler = Proc.new {|sender, e| puts "Clicked"} > > > > rbutton.Click &on_click_handler > > lbutton.Click &on_click_handler > > > > would do the trick here? Have I missed something? It's not impossible > > to also have: > > > > rbutton.Click -= on_click_handler > > > > later, if you want... > > > > -- > > Alex > > > > > > > On Feb 4, 2008 5:56 AM, Huw Collingbourne wrote: > > > > Michael Letterle wrote: > > > > > What I'm saying is eventually you'll be able to something like > > > > > > > > > > rbutton.Click{|sender, e| puts "Clicked!"} > > > > > rbutton.Click{|sender, e| puts "Also Clicked!"} > > > > > > > > > > > > > That's still not quite delegation in the usual sense. What if we have: > > > > > > > > def onClick( sender ) > > > > # do something > > > > end > > > > > > > > ...then have this single method 'wired up' to the Click events on, say, > > > > the 50+ buttons of a scientific calculator? In short, the delegated > > > > methods need to be detached from specific objects. I'm sure the IronRuby > > > > team will provide this in time. It makes a big difference when it comes > > > > to implementing code+form integration ;-) > > > > > > > > > > > > best wishes > > > > Huw > > > > > > > > SapphireSteel Software > > > > Ruby and Rails In Visual Studio > > > > http://www.sapphiresteel.com > > > > -- > > > > Posted via http://www.ruby-forum.com/. > > > > _______________________________________________ > > > > Ironruby-core mailing list > > > > Ironruby-core at rubyforge.org > > > > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > > > > > > > > > > > > > > _______________________________________________ > > Ironruby-core mailing list > > Ironruby-core at rubyforge.org > > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > > From jflam at microsoft.com Mon Feb 4 10:33:08 2008 From: jflam at microsoft.com (John Lam (DLR)) Date: Mon, 4 Feb 2008 07:33:08 -0800 Subject: [Ironruby-core] delegate In-Reply-To: References: <3adad22e80c66a8d6b13d6b6cf485896@ruby-forum.com> <925d311d9c135b9a1e2eae410c2d7395@ruby-forum.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D8FF03800@NA-EXMSG-C115.redmond.corp.microsoft.com> Mike Plavsky: > Does IronRuby work with rspec? Not yet. But we do run our specs through mini_rspec, which uses a subset of rspec features. -John From Mike.Plavsky at quest.com Mon Feb 4 10:51:15 2008 From: Mike.Plavsky at quest.com (Mike Plavsky) Date: Mon, 4 Feb 2008 15:51:15 +0000 Subject: [Ironruby-core] delegate In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D8FF03800@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <3adad22e80c66a8d6b13d6b6cf485896@ruby-forum.com> <925d311d9c135b9a1e2eae410c2d7395@ruby-forum.com> <372109E149E8084D8E6C7D9CFD82E0632D8FF03800@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: Wow interesting, is mini_rspec part of IronRuby? Regards, Mike -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of John Lam (DLR) Sent: Monday, February 04, 2008 6:33 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] delegate Mike Plavsky: > Does IronRuby work with rspec? Not yet. But we do run our specs through mini_rspec, which uses a subset of rspec features. -John _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From jflam at microsoft.com Mon Feb 4 11:43:19 2008 From: jflam at microsoft.com (John Lam (DLR)) Date: Mon, 4 Feb 2008 08:43:19 -0800 Subject: [Ironruby-core] delegate In-Reply-To: References: <3adad22e80c66a8d6b13d6b6cf485896@ruby-forum.com> <925d311d9c135b9a1e2eae410c2d7395@ruby-forum.com> <372109E149E8084D8E6C7D9CFD82E0632D8FF03800@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D8FF0384E@NA-EXMSG-C115.redmond.corp.microsoft.com> Mike Plavsky: > Wow interesting, is mini_rspec part of IronRuby? Yes - it ships as part of our tests\specs directory. Thanks, -John From Mike.Plavsky at quest.com Mon Feb 4 13:17:49 2008 From: Mike.Plavsky at quest.com (Mike Plavsky) Date: Mon, 4 Feb 2008 18:17:49 +0000 Subject: [Ironruby-core] delegate In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D8FF0384E@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <3adad22e80c66a8d6b13d6b6cf485896@ruby-forum.com> <925d311d9c135b9a1e2eae410c2d7395@ruby-forum.com> <372109E149E8084D8E6C7D9CFD82E0632D8FF03800@NA-EXMSG-C115.redmond.corp.microsoft.com> <372109E149E8084D8E6C7D9CFD82E0632D8FF0384E@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: Thanks a lot! Tried - works fine! Regards, Mike -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of John Lam (DLR) Sent: Monday, February 04, 2008 7:43 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] delegate Mike Plavsky: > Wow interesting, is mini_rspec part of IronRuby? Yes - it ships as part of our tests\specs directory. Thanks, -John _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From ivan at flanders.co.nz Mon Feb 4 14:57:48 2008 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Tue, 5 Feb 2008 08:57:48 +1300 Subject: [Ironruby-core] building on OSX In-Reply-To: References: <372109E149E8084D8E6C7D9CFD82E0632D8FF0373A@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: Thanks guys, I got it to build. I do feel slightly dirty because it's somewhat hacky. (I'm very, very new to OSX) but I edited the Rakefil and set the libdir specifically there FRAMEWORK_DIR = '/opt/local/mono/lib/mono/2.0/' #Pathname.new(libdir) + 'mono' + '2.0' I'm not entirely happy with this solution and it probably has something to do with an environment variable not being set correctly, but at least i know it can be done now and eventually I'll get it so that the standard rake file suffices. I've seen that the command 'pkg-config --variable=libdir mono' doesn't return anything, which may be the cause :) Cheers Ivan On Feb 5, 2008 2:39 AM, M. David Peterson wrote: > On Sun, 03 Feb 2008 13:14:28 -0700, Ivan Porto Carrero > wrote: > > > ok .. I'll keep trying then until I get a working mono version. Haven't > > done much testing with mono but I did run the minimal test suite before > > installing. > > If I compile on windows and use the binaries there is no problem. > > Are you compiling with both --with-preview=yes and --with-moonlight=yes ? > > Actually, I think they both are set to yet by default, but if you're > building from SVN you'll need to checkout not only the mono directory but > olive, moon, mcs, and (possibly) gtk-sharp as well. You've already got > mono checked out, so if you enter the same directory that the mono > directory is contained in and run, > > svn co > svn://anonsvn.mono-project.com/source/trunk/{mcs,moon,olive,gtk-sharp} > > ... to then svn up mono you can then enter the mono directory and run, > > ./autogen.sh --with-preview=yes --with-moonlight=yes [additional options > (such as --prefix)] > > NOTE: I realize I mentioned that I believe both of these values are yes by > default, but it doesn't hurt so it's worth adding them just in case. > > If that script finishes without erroring out then run, > > make; sudo make install > > If it does error out there's a good chance it's going to be one of several > things, > > 1) The existing DMG-based installation is getting in the way. I would > move /Library/Frameworks/Mono.framework (if you don't see it there, try > ~/Library/Frameworks/Mono.framework) to another directory to ensure you're > not running into a problem with the build process linking against the > wrong libraries. > 2) The generated ./configure file will have a few lines that autotools > will claim to be invalid syntax. If you see this problem, just open the > ./configure file, go to the specified line, and comment it out. > IMPORTANT!: Don't rerun ./autogen.sh at this point. It will write over > the previous generated ./configure file and cause the same error to occur. > > At this stage of the game you'll then want to run, > > ./configure --with-preview=yes --with-moonlight=yes [additional options > (such as --prefix)]; make; sudo make install > > At this point you're system should be completely up-to-date with all of > the latest code that is specific to the needs of the DLR and DLR-based > languages. That doesn't mean it's guaranteed to compile and work, but > I've yet to find a situation unrelated to System.Windows.Forms that didn't > work on OS X if it worked on Linux. It sometimes takes a bit of hacking > the build process, but it usually works out in the end. :D > > That said, given the IronRuby and the DLR are moving targets, there's no > guarantee you're not going to run into issues. But in my own experience, > the Mono team places an extremely high importance on bugs related to the > Iron* projects and the DLR. Often times there's a fix checked into SVN > within a few hours of filing the report. > > Hope this helps! > > -- > /M:D > > M. David Peterson > Co-Founder & Chief Architect, 3rd&Urban, LLC > Email: m.david at 3rdandUrban.com | m.david at amp.fm > Mobile: (206) 418-9027 > http://3rdandUrban.com | http://amp.fm | > http://www.oreillynet.com/pub/au/2354 > _______________________________________________ > 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/20080205/8baddd00/attachment.html From ivan at flanders.co.nz Mon Feb 4 15:31:04 2008 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Tue, 5 Feb 2008 09:31:04 +1300 Subject: [Ironruby-core] building on OSX In-Reply-To: References: <372109E149E8084D8E6C7D9CFD82E0632D8FF0373A@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: I've got it working now. Thanks for all your help :). Turns out I have to set a variable PKG_CONFIG_PATH in .bash_profile that includes the path which has the mono.pc file in it. I don't have to edit anything anymore and it compiles Thanks Ivan On Feb 5, 2008 8:57 AM, Ivan Porto Carrero wrote: > Thanks guys, I got it to build. > I do feel slightly dirty because it's somewhat hacky. (I'm very, very new > to OSX) but I edited the Rakefil and set the libdir specifically there > > FRAMEWORK_DIR = '/opt/local/mono/lib/mono/2.0/' #Pathname.new(libdir) + > 'mono' + '2.0' > > I'm not entirely happy with this solution and it probably has something to > do with an environment variable not being set correctly, but at least i know > it can be done now and eventually I'll get it so that the standard rake file > suffices. > > I've seen that the command 'pkg-config --variable=libdir mono' doesn't > return anything, which may be the cause :) > > Cheers > Ivan > > > On Feb 5, 2008 2:39 AM, M. David Peterson wrote: > > > On Sun, 03 Feb 2008 13:14:28 -0700, Ivan Porto Carrero > > wrote: > > > > > ok .. I'll keep trying then until I get a working mono version. > > Haven't > > > done much testing with mono but I did run the minimal test suite > > before > > > installing. > > > If I compile on windows and use the binaries there is no problem. > > > > Are you compiling with both --with-preview=yes and --with-moonlight=yes > > ? > > > > Actually, I think they both are set to yet by default, but if you're > > building from SVN you'll need to checkout not only the mono directory > > but > > olive, moon, mcs, and (possibly) gtk-sharp as well. You've already got > > mono checked out, so if you enter the same directory that the mono > > directory is contained in and run, > > > > svn co > > svn://anonsvn.mono-project.com/source/trunk/{mcs,moon,olive,gtk-sharp} > > > > ... to then svn up mono you can then enter the mono directory and run, > > > > ./autogen.sh --with-preview=yes --with-moonlight=yes [additional options > > (such as --prefix)] > > > > NOTE: I realize I mentioned that I believe both of these values are yes > > by > > default, but it doesn't hurt so it's worth adding them just in case. > > > > If that script finishes without erroring out then run, > > > > make; sudo make install > > > > If it does error out there's a good chance it's going to be one of > > several > > things, > > > > 1) The existing DMG-based installation is getting in the way. I would > > move /Library/Frameworks/Mono.framework (if you don't see it there, try > > ~/Library/Frameworks/Mono.framework) to another directory to ensure > > you're > > not running into a problem with the build process linking against the > > wrong libraries. > > 2) The generated ./configure file will have a few lines that autotools > > will claim to be invalid syntax. If you see this problem, just open the > > ./configure file, go to the specified line, and comment it out. > > IMPORTANT!: Don't rerun ./autogen.sh at this point. It will write over > > the previous generated ./configure file and cause the same error to > > occur. > > > > At this stage of the game you'll then want to run, > > > > ./configure --with-preview=yes --with-moonlight=yes [additional options > > (such as --prefix)]; make; sudo make install > > > > At this point you're system should be completely up-to-date with all of > > the latest code that is specific to the needs of the DLR and DLR-based > > languages. That doesn't mean it's guaranteed to compile and work, but > > I've yet to find a situation unrelated to System.Windows.Forms that > > didn't > > work on OS X if it worked on Linux. It sometimes takes a bit of hacking > > the build process, but it usually works out in the end. :D > > > > That said, given the IronRuby and the DLR are moving targets, there's no > > guarantee you're not going to run into issues. But in my own > > experience, > > the Mono team places an extremely high importance on bugs related to the > > Iron* projects and the DLR. Often times there's a fix checked into SVN > > within a few hours of filing the report. > > > > Hope this helps! > > > > -- > > /M:D > > > > M. David Peterson > > Co-Founder & Chief Architect, 3rd&Urban, LLC > > Email: m.david at 3rdandUrban.com | m.david at amp.fm > > Mobile: (206) 418-9027 > > http://3rdandUrban.com | http://amp.fm | > > http://www.oreillynet.com/pub/au/2354 > > _______________________________________________ > > 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/20080205/2b8f1f06/attachment-0001.html From m.david at xmlhacker.com Mon Feb 4 16:03:27 2008 From: m.david at xmlhacker.com (M. David Peterson) Date: Mon, 04 Feb 2008 14:03:27 -0700 Subject: [Ironruby-core] building on OSX In-Reply-To: References: <372109E149E8084D8E6C7D9CFD82E0632D8FF0373A@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: On Mon, 04 Feb 2008 12:57:48 -0700, Ivan Porto Carrero wrote: > I've seen that the command 'pkg-config --variable=libdir mono' doesn't > return anything, which may be the cause :) Looks like you need to add /opt/local/lib/pkgconfig to your PKG_CONFIG_PATH environment variable. -- /M:D M. David Peterson Co-Founder & Chief Architect, 3rd&Urban, LLC Email: m.david at 3rdandUrban.com | m.david at amp.fm Mobile: (206) 418-9027 http://3rdandUrban.com | http://amp.fm | http://www.oreillynet.com/pub/au/2354 From m.david at xmlhacker.com Mon Feb 4 16:04:10 2008 From: m.david at xmlhacker.com (M. David Peterson) Date: Mon, 04 Feb 2008 14:04:10 -0700 Subject: [Ironruby-core] building on OSX In-Reply-To: References: <372109E149E8084D8E6C7D9CFD82E0632D8FF0373A@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: On Mon, 04 Feb 2008 13:31:04 -0700, Ivan Porto Carrero wrote: > Turns out I have to set a variable PKG_CONFIG_PATH in .bash_profile that > includes the path which has the mono.pc file in it. I don't have to edit > anything anymore and it compiles Should have read your follow-up first. ;-) -- /M:D M. David Peterson Co-Founder & Chief Architect, 3rd&Urban, LLC Email: m.david at 3rdandUrban.com | m.david at amp.fm Mobile: (206) 418-9027 http://3rdandUrban.com | http://amp.fm | http://www.oreillynet.com/pub/au/2354 From w.kelly at qut.edu.au Mon Feb 4 22:35:53 2008 From: w.kelly at qut.edu.au (Wayne Kelly) Date: Tue, 5 Feb 2008 13:35:53 +1000 Subject: [Ironruby-core] ConvertTo vs Cast Message-ID: <6821FE23D98BAC41AC2A91E7970F31AF1CCF7275E9@QUTEXMBX02.qut.edu.au> Consider the following Ruby code: i = 0 while (i < 1000) i = i + 1 end When run using IronRuby, the (i < 1000) comparison results in method ConvertToInt32 being invoked to convert local i into an integer, however, the i +1 operation simply casts i to be an integer. (IronPython performs a cast in both cases to avoid the method call to ConvertToInt32) It appears that the difference in behaviour of these two method calls in IronRuby is due to the fact that the first argument for the LessThan method is not overloaded: public static bool LessThan(int self, int other) public static bool LessThan(CodeContext/*!*/ context, int self, object other) but the first argument for the Add method is overloaded: public static object Add(int self, int other) public static double Add(int self, double other) public static object Add(CodeContext/*!*/ context, object self, object other) Note, this only affects performance, not correctness. Eliminating the call to ConvertToInt32 makes the program execute about 10% faster. As an aside, is there really a need for an overloaded Add method with a self of type object rather than int? Ironically, making the types stronger in this way would make the performance worse with the current implementation. Or am I completely mistaken? Cheers, Wayne. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20080205/6ba1fa7e/attachment.html From bacondarwin at googlemail.com Tue Feb 5 03:37:35 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Tue, 5 Feb 2008 08:37:35 -0000 Subject: [Ironruby-core] ConvertTo vs Cast In-Reply-To: <6821FE23D98BAC41AC2A91E7970F31AF1CCF7275E9@QUTEXMBX02.qut.edu.au> References: <6821FE23D98BAC41AC2A91E7970F31AF1CCF7275E9@QUTEXMBX02.qut.edu.au> Message-ID: <000901c867d2$5df4da60$19de8f20$@com> Regarding the aside, you can pass Float, Bignum, Complex or any other class you choose to define to the Fixnum#+ operator so you do need an overload with object. I seem to remember it then coerces the fixnum to whatever the other type is and then calls + on the coerced object. Without looking at the code I can't comment on the main thrust of the mail, but shouldn't the local variable i be a Fixnum from the word go and therefore call the LessThan(int, int) method anyway? Pete From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Wayne Kelly Sent: Tuesday,05 February 05, 2008 03:36 To: ironruby-core at rubyforge.org Subject: [Ironruby-core] ConvertTo vs Cast Consider the following Ruby code: i = 0 while (i < 1000) i = i + 1 end When run using IronRuby, the (i < 1000) comparison results in method ConvertToInt32 being invoked to convert local i into an integer, however, the i +1 operation simply casts i to be an integer. (IronPython performs a cast in both cases to avoid the method call to ConvertToInt32) It appears that the difference in behaviour of these two method calls in IronRuby is due to the fact that the first argument for the LessThan method is not overloaded: public static bool LessThan(int self, int other) public static bool LessThan(CodeContext/*!*/ context, int self, object other) but the first argument for the Add method is overloaded: public static object Add(int self, int other) public static double Add(int self, double other) public static object Add(CodeContext/*!*/ context, object self, object other) Note, this only affects performance, not correctness. Eliminating the call to ConvertToInt32 makes the program execute about 10% faster. As an aside, is there really a need for an overloaded Add method with a self of type object rather than int? Ironically, making the types stronger in this way would make the performance worse with the current implementation. Or am I completely mistaken? Cheers, Wayne. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20080205/2ad65866/attachment.html From w.kelly at qut.edu.au Tue Feb 5 04:08:33 2008 From: w.kelly at qut.edu.au (Wayne Kelly) Date: Tue, 5 Feb 2008 19:08:33 +1000 Subject: [Ironruby-core] ConvertTo vs Cast In-Reply-To: <000901c867d2$5df4da60$19de8f20$@com> References: <6821FE23D98BAC41AC2A91E7970F31AF1CCF7275E9@QUTEXMBX02.qut.edu.au>, <000901c867d2$5df4da60$19de8f20$@com> Message-ID: <6821FE23D98BAC41AC2A91E7970F31AF1CCF7275EE@QUTEXMBX02.qut.edu.au> From: ironruby-core-bounces at rubyforge.org [ironruby-core-bounces at rubyforge.org] On Behalf Of Peter Bacon Darwin [bacondarwin at googlemail.com] Sent: Tuesday, 5 February 2008 6:37 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] ConvertTo vs Cast Regarding the aside, you can pass Float, Bignum, Complex or any other class you choose to define to the Fixnum#+ operator so you do need an overload with object. I seem to remember it then coerces the fixnum to whatever the other type is and then calls + on the coerced object. In Ruby 1.8.6: Fixnum.instance_method("+').bind(3.0) produces: 'bind': bind argument must be an instance of Fixnum (TypeError) Without looking at the code I can?t comment on the main thrust of the mail, but shouldn?t the local variable i be a Fixnum from the word go and therefore call the LessThan(int, int) method anyway? Yes, LessThan(int, int) is called each time, but an unnecessary call is also made to method ConvertToInt32 every time around the loop to convert what is already an integer into an integer. Cheers, Wayne. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20080205/d04fba0f/attachment-0001.html From slavof at gmail.com Tue Feb 5 04:51:37 2008 From: slavof at gmail.com (Slavo Furman) Date: Tue, 5 Feb 2008 10:51:37 +0100 Subject: [Ironruby-core] The future of Ruby.NET Message-ID: <24e27e560802050151j43fbb2b5la5645bb1334247cd@mail.gmail.com> hi! Just in case someone do not seen this yet. http://groups.google.com/group/RubyDOTNET/browse_thread/thread/1752830c857620b0 regards, Slavo. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20080205/400a426c/attachment.html From lists at ruby-forum.com Tue Feb 5 05:42:13 2008 From: lists at ruby-forum.com (Huw Collingbourne) Date: Tue, 5 Feb 2008 11:42:13 +0100 Subject: [Ironruby-core] The future of Ruby.NET In-Reply-To: <24e27e560802050151j43fbb2b5la5645bb1334247cd@mail.gmail.com> References: <24e27e560802050151j43fbb2b5la5645bb1334247cd@mail.gmail.com> Message-ID: <9a500a41f482bd431d42b3dfa71ca54f@ruby-forum.com> I've justed posted a few comments here: http://www.sapphiresteel.com/The-End-Of-Ruby-NET I think this is sad but inevitable. The fact of the matter is (in our opinion, anyway) that the DLR truly is the way forward for dynamic languages on .NET. We've only started looking seriously into the DLR quite recently and suffice to say we are mightily impressed by what we've seen. Dr Kelly and his team did great work on Ruby .NET but ultimately I think the advent of the DLR just changed everything. best wishes Huw Collingbourne SapphireSteel Software Ruby and Rails In Visual Studio http://www.sapphiresteel.com -- Posted via http://www.ruby-forum.com/. From bacondarwin at googlemail.com Tue Feb 5 09:15:48 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Tue, 5 Feb 2008 14:15:48 -0000 Subject: [Ironruby-core] ConvertTo vs Cast In-Reply-To: <6821FE23D98BAC41AC2A91E7970F31AF1CCF7275EE@QUTEXMBX02.qut.edu.au> References: <6821FE23D98BAC41AC2A91E7970F31AF1CCF7275E9@QUTEXMBX02.qut.edu.au>, <000901c867d2$5df4da60$19de8f20$@com> <6821FE23D98BAC41AC2A91E7970F31AF1CCF7275EE@QUTEXMBX02.qut.edu.au> Message-ID: <001d01c86801$9c87ca60$d5975f20$@com> What about this though? class D def +(other) 45 end def coerce(other) [self,self] end end 3 + D.new => 45 In Ruby 1.8.6: Fixnum.instance_method("+').bind(3.0) produces: 'bind': bind argument must be an instance of Fixnum (TypeError) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20080205/cfd00e45/attachment.html From jflam at microsoft.com Tue Feb 5 12:31:27 2008 From: jflam at microsoft.com (John Lam (DLR)) Date: Tue, 5 Feb 2008 09:31:27 -0800 Subject: [Ironruby-core] The future of Ruby.NET In-Reply-To: <9a500a41f482bd431d42b3dfa71ca54f@ruby-forum.com> References: <24e27e560802050151j43fbb2b5la5645bb1334247cd@mail.gmail.com> <9a500a41f482bd431d42b3dfa71ca54f@ruby-forum.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D8FF03FC9@NA-EXMSG-C115.redmond.corp.microsoft.com> I just posted a follow-up on my blog: http://www.iunknown.com/2008/02/welcome-wayne-k.html Thanks again Wayne for all your work on Ruby.net and gppg, and we look forward to seeing more of you on our list! -John From bacondarwin at googlemail.com Tue Feb 5 13:42:32 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Tue, 5 Feb 2008 18:42:32 -0000 Subject: [Ironruby-core] ConvertTo vs Cast In-Reply-To: <6821FE23D98BAC41AC2A91E7970F31AF1CCF7275EE@QUTEXMBX02.qut.edu.au> References: <6821FE23D98BAC41AC2A91E7970F31AF1CCF7275E9@QUTEXMBX02.qut.edu.au>, <000901c867d2$5df4da60$19de8f20$@com> <6821FE23D98BAC41AC2A91E7970F31AF1CCF7275EE@QUTEXMBX02.qut.edu.au> Message-ID: <000001c86826$dfedaac0$9fc90040$@com> OK, so I think that this is a problem with the AST to code generation, though I really don't understand it deeply enough to say exactly where. If you dump the ASTs from the ruby code the body of the loop looks like this: { (.bound i) = (Object)0; .return .comma { .try { { (.bound #rfc).InLoop = (Boolean)True; { (.bound #skip-condition) = (Boolean)False; .for (; ; ) { .try { { .if ((.bound #skip-condition) ) {(Void)(.bound #skip-condition) = (Boolean)False; } .else {.if (.action (Boolean) ConvertTo System.Boolean( // ConvertTo to System.Boolean .action (Object) InvokeMember <( // InvokeMember <(Instance, Simple) ReturnNonCallable, IsCallWithThis (.bound i) 1000 ) ) ) {/*empty*/; } .else {.break; }} { (.bound i) = (Object).action (Object) InvokeMember +( // InvokeMember +(Instance, Simple) ReturnNonCallable, IsCallWithThis (.bound i) 1 ); } } } .catch ( BlockUnwinder #unwinder) { (.bound #skip-condition) = (.bound #unwinder).IsRedo; } .catch ( EvalUnwinder #unwinder) { .if (((.bound #unwinder).Reason == (BlockReturnReason)Break) ) {{ (.bound #loop-result) = (.bound #unwinder).ReturnValue; .break; } } .else { .throw () }} } } } } .finally { (.bound #rfc).InLoop = (Boolean)False; } (.bound #loop-result) } ; } No mention of ConvertToInt32 there although it is noticeable that the (.bound i) value is an object and not a Fixnum. If you dump the generated code you get the following two methods for invoking the Fixnum methods: public static object $Ruby.Builtins.FixnumOps.LessThan(object[] objArray1, DynamicSite site1, CodeContext context1, object obj1, int num1) { if (((obj1 != null) && (obj1.GetType() == typeof(int))) && (((RubyClass) objArray1[0]).get_Version() == 0x3b3e)) { bool flag; bool flag1 = flag = FixnumOps.LessThan(Converter.ConvertToInt32(obj1), num1); return RuntimeHelpers.BooleanToObject(flag); } return site1.UpdateBindingAndInvoke(context1, obj1, num1); } public static object $Ruby.Builtins.FixnumOps.Add(object[] objArray1, DynamicSite site1, CodeContext context1, object obj1, int num1) { if (((obj1 != null) && (obj1.GetType() == typeof(int))) && (((RubyClass) objArray1[0]).get_Version() == 0x3b3e)) { return FixnumOps.Add((int) obj1, num1); } return site1.UpdateBindingAndInvoke(context1, obj1, num1); } Here as Wayne points out the code generator has added in the ConvertToInt32 in the LessThan invocation, whereas in the Add invocation it has used a direct cast. Somewhere in the innards of Ruby.dll this decision is being made and I haven't tracked down where. Clearly it is not necessary to use the conversion method: for a start there is a clause around the call to the method that tests whether obj1 (self) is an int. As it happens I am generally doubtful about the inclusion of automated Conversion in IronRuby at all, apart from perhaps for .NET classes that don't map directly to Ruby ones, such as byte and float. The design of the Ruby builtin classes manages the conversions directly, using such things as to_s, to_str, to_f, to_int and to_i. Getting the DLR to do hidden conversions seems to be overkill and can upset the semantics of the library classes. Pete Without looking at the code I can't comment on the main thrust of the mail, but shouldn't the local variable i be a Fixnum from the word go and therefore call the LessThan(int, int) method anyway? Yes, LessThan(int, int) is called each time, but an unnecessary call is also made to method ConvertToInt32 every time around the loop to convert what is already an integer into an integer. Cheers, Wayne. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20080205/76a2a3b6/attachment-0001.html From jflam at microsoft.com Tue Feb 5 14:11:46 2008 From: jflam at microsoft.com (John Lam (DLR)) Date: Tue, 5 Feb 2008 11:11:46 -0800 Subject: [Ironruby-core] ConvertTo vs Cast In-Reply-To: <000001c86826$dfedaac0$9fc90040$@com> References: <6821FE23D98BAC41AC2A91E7970F31AF1CCF7275E9@QUTEXMBX02.qut.edu.au>, <000901c867d2$5df4da60$19de8f20$@com> <6821FE23D98BAC41AC2A91E7970F31AF1CCF7275EE@QUTEXMBX02.qut.edu.au> <000001c86826$dfedaac0$9fc90040$@com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D8FF040E4@NA-EXMSG-C115.redmond.corp.microsoft.com> Peter Bacon Darwin: > OK, so I think that this is a problem with the AST to code generation, > though I really don't understand it deeply enough to say exactly where. > > If you dump the ASTs from the ruby code the body of the loop looks > like > this: > (scary Martin AST dump elided) Yep. Looks like a bug. Can you open one on this for us? Thanks, -John From michael.letterle at gmail.com Tue Feb 5 14:16:12 2008 From: michael.letterle at gmail.com (Michael Letterle) Date: Tue, 5 Feb 2008 14:16:12 -0500 Subject: [Ironruby-core] The future of Ruby.NET In-Reply-To: <9a500a41f482bd431d42b3dfa71ca54f@ruby-forum.com> References: <24e27e560802050151j43fbb2b5la5645bb1334247cd@mail.gmail.com> <9a500a41f482bd431d42b3dfa71ca54f@ruby-forum.com> Message-ID: I don't find it all that sad, the Ruby.NET folks did some awesome stuff, now they can come over and do awesome stuff in IronRuby :) On Feb 5, 2008 5:42 AM, Huw Collingbourne wrote: > I've justed posted a few comments here: > > http://www.sapphiresteel.com/The-End-Of-Ruby-NET > > I think this is sad but inevitable. The fact of the matter is (in our > opinion, anyway) that the DLR truly is the way forward for dynamic > languages on .NET. We've only started looking seriously into the DLR > quite recently and suffice to say we are mightily impressed by what > we've seen. Dr Kelly and his team did great work on Ruby .NET but > ultimately I think the advent of the DLR just changed everything. > > best wishes > Huw Collingbourne > > SapphireSteel Software > Ruby and Rails In Visual Studio > http://www.sapphiresteel.com > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -- Michael Letterle [Polymath Programmer] http://michaeldotnet.blogspot.com From angrygreg at gmail.com Tue Feb 5 15:31:29 2008 From: angrygreg at gmail.com (Greg Akins) Date: Tue, 5 Feb 2008 15:31:29 -0500 Subject: [Ironruby-core] The future of Ruby.NET In-Reply-To: References: <24e27e560802050151j43fbb2b5la5645bb1334247cd@mail.gmail.com> <9a500a41f482bd431d42b3dfa71ca54f@ruby-forum.com> Message-ID: <8526685f0802051231x6d32a71dt93054360932f4ad7@mail.gmail.com> On Feb 5, 2008 2:16 PM, Michael Letterle wrote: > I don't find it all that sad, the Ruby.NET folks did some awesome > stuff, now they can come over and do awesome stuff in IronRuby :) This might be an old topic, but does the IronRuby project intend to allow Ruby code to be written as a "first class" .Net language Meaning, that like Ruby.Net can we write .Net classes in Ruby rather than writing them as strings that are passed to the RubyEngine? I had expected that having to do that was just a function of the "newness" of IronRuby, not a design decision. But wanted to check :-) -- Greg Akins Software Development Manager SSI Services http://kc.vanadium.com http://www.pghcodingdojo.org http://www.insomnia-consulting.org/monologue From curt at hagenlocher.org Tue Feb 5 15:43:14 2008 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Tue, 5 Feb 2008 12:43:14 -0800 Subject: [Ironruby-core] The future of Ruby.NET In-Reply-To: <8526685f0802051231x6d32a71dt93054360932f4ad7@mail.gmail.com> References: <24e27e560802050151j43fbb2b5la5645bb1334247cd@mail.gmail.com> <9a500a41f482bd431d42b3dfa71ca54f@ruby-forum.com> <8526685f0802051231x6d32a71dt93054360932f4ad7@mail.gmail.com> Message-ID: On Feb 5, 2008 12:31 PM, Greg Akins wrote: > > Meaning, that like Ruby.Net can we write .Net classes in Ruby rather > than writing them as strings that are passed to the RubyEngine? There's a kind of mismatch between the capabilities of statically defined types (as in the CLR) and the dynamic classes that Ruby offers. What should happen to the corresponding CLR class if, for instance, someone were to dynamically add methods to the Ruby class? CLR classes don't support that kind of operation. The best option in this regard is probably to allow a dynamic (Ruby or other DLR) class to be delegated to by a statically-defined wrapper. Conceptually, such a wrapper could be automatically generated from the Ruby class definition, but once defined it would be unalterable. -- Curt Hagenlocher curt at hagenlocher.org From enicholson at gmail.com Tue Feb 5 15:59:38 2008 From: enicholson at gmail.com (Eric Nicholson) Date: Tue, 5 Feb 2008 15:59:38 -0500 Subject: [Ironruby-core] ConvertTo vs Cast In-Reply-To: <000001c86826$dfedaac0$9fc90040$@com> References: <6821FE23D98BAC41AC2A91E7970F31AF1CCF7275E9@QUTEXMBX02.qut.edu.au> <000901c867d2$5df4da60$19de8f20$@com> <6821FE23D98BAC41AC2A91E7970F31AF1CCF7275EE@QUTEXMBX02.qut.edu.au> <000001c86826$dfedaac0$9fc90040$@com> Message-ID: Stupid question, but how do you dump the AST? I've wanted to do that a couple times (most recently while hacking my own temporary "eval"). On Feb 5, 2008 1:42 PM, Peter Bacon Darwin wrote: > OK, so I think that this is a problem with the AST to code generation, > though I really don't understand it deeply enough to say exactly where. > > > > If you dump the ASTs from the ruby code the body of the loop looks like > this: > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20080205/b46fb12b/attachment.html From michael.letterle at gmail.com Tue Feb 5 16:17:07 2008 From: michael.letterle at gmail.com (Michael Letterle) Date: Tue, 5 Feb 2008 16:17:07 -0500 Subject: [Ironruby-core] ConvertTo vs Cast In-Reply-To: References: <6821FE23D98BAC41AC2A91E7970F31AF1CCF7275E9@QUTEXMBX02.qut.edu.au> <000901c867d2$5df4da60$19de8f20$@com> <6821FE23D98BAC41AC2A91E7970F31AF1CCF7275EE@QUTEXMBX02.qut.edu.au> <000001c86826$dfedaac0$9fc90040$@com> Message-ID: rbx /? is your friend :) the quick answer is rbx -X:ShowASTs For reference: IronRuby command line: Usage: [options] [file|- [arguments]] Options: -opt dummy -c cmd Program passed in as string (terminates option list) -h Display usage -i Inspect interactively after running script -V Print the version number and exit -O Enable optimizations -D EngineDebug mode -OO Remove doc-strings in addition to the -O optimizations -X:AutoIndent -X:AssembliesDir Set the directory for saving generated assemblies -X:ColorfulConsole Enable ColorfulConsole -X:DumpASTs Dump all ASTs generated to a file -X:ExceptionDetail Enable ExceptionDetail mode -X:Interpret Enable interpreted mode -X:Frames Generate custom frames -X:GenerateAsSnippets Generate code to run in snippet mode -X:ILDebug Output generated IL code to a text file for debugging -X:MaxRecursion Set the maximum recursion level -X:NoOptimize Disable JIT optimization in generated code -X:NoTraceback Do not emit traceback code -X:PassExceptions Do not catch exceptions that are unhandled by script code -X:PrivateBinding Enable binding to private members -X:SaveAssemblies Save generated assemblies -X:ShowASTs Print all ASTs to the console -X:ShowClrExceptions Display CLS Exception information -X:ShowRules Show the AST for rules generated -X:SlowOps Enable fast ops -X:StaticMethods Generate static methods only -X:TabCompletion Enable TabCompletion mode -X:TrackPerformance Track performance sensitive areas -X:CachePointersInApartment Cache COM pointers per apartment (prototype) On Feb 5, 2008 3:59 PM, Eric Nicholson wrote: > Stupid question, but how do you dump the AST? I've wanted to do that a > couple times (most recently while hacking my own temporary "eval"). > > > > On Feb 5, 2008 1:42 PM, Peter Bacon Darwin > wrote: > > > > > > > > > > > > > OK, so I think that this is a problem with the AST to code generation, > though I really don't understand it deeply enough to say exactly where. > > > > > > > > If you dump the ASTs from the ruby code the body of the loop looks like > this: > > > > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -- Michael Letterle [Polymath Programmer] http://michaeldotnet.blogspot.com From Shri.Borde at microsoft.com Tue Feb 5 17:30:29 2008 From: Shri.Borde at microsoft.com (Shri Borde) Date: Tue, 5 Feb 2008 14:30:29 -0800 Subject: [Ironruby-core] Access from static languages In-Reply-To: References: <24e27e560802050151j43fbb2b5la5645bb1334247cd@mail.gmail.com> <9a500a41f482bd431d42b3dfa71ca54f@ruby-forum.com> <8526685f0802051231x6d32a71dt93054360932f4ad7@mail.gmail.com> Message-ID: <50B69702CA6E6D4E849D30CD4989AB8ED7F4664846@DF-GRTDANE-MSG.exchange.corp.microsoft.com> C# is looking into making it easy to talk with DLR objects. See http://blogs.msdn.com/charlie/archive/2008/01/25/future-focus.aspx -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Curt Hagenlocher Sent: Tuesday, February 05, 2008 12:43 PM To: gakins at insomnia-consulting.org; ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] The future of Ruby.NET On Feb 5, 2008 12:31 PM, Greg Akins wrote: > > Meaning, that like Ruby.Net can we write .Net classes in Ruby rather > than writing them as strings that are passed to the RubyEngine? There's a kind of mismatch between the capabilities of statically defined types (as in the CLR) and the dynamic classes that Ruby offers. What should happen to the corresponding CLR class if, for instance, someone were to dynamically add methods to the Ruby class? CLR classes don't support that kind of operation. The best option in this regard is probably to allow a dynamic (Ruby or other DLR) class to be delegated to by a statically-defined wrapper. Conceptually, such a wrapper could be automatically generated from the Ruby class definition, but once defined it would be unalterable. -- Curt Hagenlocher curt at hagenlocher.org _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From curt at hagenlocher.org Tue Feb 5 17:58:07 2008 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Tue, 5 Feb 2008 14:58:07 -0800 Subject: [Ironruby-core] Access from static languages In-Reply-To: <50B69702CA6E6D4E849D30CD4989AB8ED7F4664846@DF-GRTDANE-MSG.exchange.corp.microsoft.com> References: <24e27e560802050151j43fbb2b5la5645bb1334247cd@mail.gmail.com> <9a500a41f482bd431d42b3dfa71ca54f@ruby-forum.com> <8526685f0802051231x6d32a71dt93054360932f4ad7@mail.gmail.com> <50B69702CA6E6D4E849D30CD4989AB8ED7F4664846@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: While this is really cool, it doesn't (for instance) let you expose a dynamic object to WCF without manually wrapping it in a static C# class -- or any other CLR feature based on method, property or class-level attributes. Did I mention that this is really really cool? :) On Feb 5, 2008 2:30 PM, Shri Borde wrote: > C# is looking into making it easy to talk with DLR objects. See > http://blogs.msdn.com/charlie/archive/2008/01/25/future-focus.aspx > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] On Behalf Of Curt Hagenlocher > Sent: Tuesday, February 05, 2008 12:43 PM > To: gakins at insomnia-consulting.org; ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] The future of Ruby.NET > > On Feb 5, 2008 12:31 PM, Greg Akins wrote: > > > > Meaning, that like Ruby.Net can we write .Net classes in Ruby rather > > than writing them as strings that are passed to the RubyEngine? > > There's a kind of mismatch between the capabilities of statically > defined types (as in the CLR) and the dynamic classes that Ruby > offers. What should happen to the corresponding CLR class if, for > instance, someone were to dynamically add methods to the Ruby class? > CLR classes don't support that kind of operation. > > The best option in this regard is probably to allow a dynamic (Ruby or > other DLR) class to be delegated to by a statically-defined wrapper. > Conceptually, such a wrapper could be automatically generated from the > Ruby class definition, but once defined it would be unalterable. > > -- > Curt Hagenlocher > curt at hagenlocher.org > _______________________________________________ > 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: http://rubyforge.org/pipermail/ironruby-core/attachments/20080205/ceb8c109/attachment-0001.html From w.kelly at qut.edu.au Tue Feb 5 19:03:45 2008 From: w.kelly at qut.edu.au (Wayne Kelly) Date: Wed, 6 Feb 2008 10:03:45 +1000 Subject: [Ironruby-core] ConvertTo vs Cast In-Reply-To: <001d01c86801$9c87ca60$d5975f20$@com> References: <6821FE23D98BAC41AC2A91E7970F31AF1CCF7275E9@QUTEXMBX02.qut.edu.au>, <000901c867d2$5df4da60$19de8f20$@com> <6821FE23D98BAC41AC2A91E7970F31AF1CCF7275EE@QUTEXMBX02.qut.edu.au> <001d01c86801$9c87ca60$d5975f20$@com> Message-ID: <6821FE23D98BAC41AC2A91E7970F31AF1CCF9E3B83@QUTEXMBX02.qut.edu.au> Hi Peter, Yes, you are right, sorry - somehow I missed reading the very last case in our fix_plus implementation :( ________________________________ From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Peter Bacon Darwin Sent: Wednesday, 6 February 2008 12:16 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] ConvertTo vs Cast What about this though? class D def +(other) 45 end def coerce(other) [self,self] end end 3 + D.new => 45 In Ruby 1.8.6: Fixnum.instance_method("+').bind(3.0) produces: 'bind': bind argument must be an instance of Fixnum (TypeError) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20080206/3636870d/attachment.html From lists at mikejarosch.com Wed Feb 6 00:20:30 2008 From: lists at mikejarosch.com (List Member) Date: Tue, 5 Feb 2008 23:20:30 -0600 Subject: [Ironruby-core] YAML for .NET In-Reply-To: References: <20080201105344.8210E18586D9@rubyforge.org> <002401c864cf$4d543030$e7fc9090$@com> <5b0248170802021902w7ddec6f4wa8804770153bb299@mail.gmail.com> Message-ID: I had started working on porting JvYaml to c#. It is really rough, currently exporting to Yaml is working, I didn't get a chance to start on the other direction though. I don't know if it's of any value, but I would be more than happy to contribute what I got working. On Feb 3, 2008 9:37 AM, Mike Moore wrote: > IronRuby's YAML library needs to more than just be a YAML lib available to > .NET. It needs to match the API that the Ruby lib implemented with Syck > has. It has a particular API, which is why Ola wrote RbYAML in the first > place. We could use RbYAML (which is written entirely in Ruby) for the yaml > lib in IronRuby, but the JRuby guys found that the performance wasn't there. > YAML is used in lots of apps, and having it be an order of magnitude slower > on one platform vs. the other isn't good. So Ola wrote JvYAML, which > follows the Syck API but is written in Java. That's the port I started on, > and that's what John M is currently working on. > I understand there are other YAML libs out there. Personally, I'd love to > experiment with F# to get one written. But unless they follow Syck then > they won't match what Ruby already has. I know there was an effort at a > university somewhere to write a C# port of Syck, but I don't think it was > ever released. And I seem to remember the JRuby guys saying that it was > simpler to write it in Java than port Syck. Also, I seem to recall Syck > isn't going to be worked on anymore. > > > On Feb 3, 2008 3:09 AM, M. David Peterson wrote: > > > On Sat, 02 Feb 2008 20:02:08 -0700, Sanghyeon Seo > > wrote: > > > > > 1. Will PyYaml run via IronPython? > > > Yes. > > > > Nice! > > > > > 2. If yes, why not focus on using PyYaml? > > > I believe this is a separate question from having a good YAML parser > > on > > > .NET. > > > > By "on .NET" I assume you are referring to a good YAML parser that is > > available to more than just Iron* languages? > > > > -- > > /M:D > > > > M. David Peterson > > Co-Founder & Chief Architect, 3rd&Urban, LLC > > Email: m.david at 3rdandUrban.com | m.david at amp.fm > > Mobile: (206) 418-9027 > > http://3rdandUrban.com | http://amp.fm | > > http://www.oreillynet.com/pub/au/2354 > > _______________________________________________ > > 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: http://rubyforge.org/pipermail/ironruby-core/attachments/20080205/01a81f5a/attachment.html From Shri.Borde at microsoft.com Wed Feb 6 01:40:26 2008 From: Shri.Borde at microsoft.com (Shri Borde) Date: Tue, 5 Feb 2008 22:40:26 -0800 Subject: [Ironruby-core] Access from static languages In-Reply-To: References: <24e27e560802050151j43fbb2b5la5645bb1334247cd@mail.gmail.com> <9a500a41f482bd431d42b3dfa71ca54f@ruby-forum.com> <8526685f0802051231x6d32a71dt93054360932f4ad7@mail.gmail.com> <50B69702CA6E6D4E849D30CD4989AB8ED7F4664846@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: <50B69702CA6E6D4E849D30CD4989AB8ED7F4664A0C@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Yup, we still need to tackle attributes. Attributes are tricky to fit into a dynamic language. It can be done, but it definitely has issues. Another approach is to have attribute-based features exposed via other mechanisms as well (for eg. an imperative API). Dynamic languages could then build libraries on top of those APIs that worked well with the paradigms of that particular dynamic language. Given the existing set of attribute-based features, we will have to think about this more. In the meantime, there is a workaround of using a statically typed language just for the part which requires attributes. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Curt Hagenlocher Sent: Tuesday, February 05, 2008 2:58 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Access from static languages While this is really cool, it doesn't (for instance) let you expose a dynamic object to WCF without manually wrapping it in a static C# class -- or any other CLR feature based on method, property or class-level attributes. Did I mention that this is really really cool? :) On Feb 5, 2008 2:30 PM, Shri Borde > wrote: C# is looking into making it easy to talk with DLR objects. See http://blogs.msdn.com/charlie/archive/2008/01/25/future-focus.aspx -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Curt Hagenlocher Sent: Tuesday, February 05, 2008 12:43 PM To: gakins at insomnia-consulting.org; ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] The future of Ruby.NET On Feb 5, 2008 12:31 PM, Greg Akins > wrote: > > Meaning, that like Ruby.Net can we write .Net classes in Ruby rather > than writing them as strings that are passed to the RubyEngine? There's a kind of mismatch between the capabilities of statically defined types (as in the CLR) and the dynamic classes that Ruby offers. What should happen to the corresponding CLR class if, for instance, someone were to dynamically add methods to the Ruby class? CLR classes don't support that kind of operation. The best option in this regard is probably to allow a dynamic (Ruby or other DLR) class to be delegated to by a statically-defined wrapper. Conceptually, such a wrapper could be automatically generated from the Ruby class definition, but once defined it would be unalterable. -- Curt Hagenlocher curt at hagenlocher.org _______________________________________________ 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: http://rubyforge.org/pipermail/ironruby-core/attachments/20080205/8d6a5255/attachment-0001.html From m.david at xmlhacker.com Wed Feb 6 03:49:46 2008 From: m.david at xmlhacker.com (M. David Peterson) Date: Wed, 06 Feb 2008 01:49:46 -0700 Subject: [Ironruby-core] The future of Ruby.NET In-Reply-To: References: <6821FE23D98BAC41AC2A91E7970F31AF1CCF7275E8@QUTEXMBX02.qut.edu.au> Message-ID: On Mon, 04 Feb 2008 21:21:07 -0700, M. David Peterson wrote: > Expect an extended follow-up from me tomorrow. It can be difficult to make a clean separation between what truly matters in life and what does not, a fact that can be easily seen if you were to grab an iPhone out of an iPhone owners hands, throw it to the ground, and stomp it into itty bitty pieces. I've been writing code since I was 11 and over the course of the 25 years that have since followed I have come to understand the fact that the software projects we develop can quickly become very much like our own children. That may sound silly, but the truth of the matter is that we, as humans, tend to attach our emotions to things that really don't matter all that much. As software developers the code we write can very easily become a part of who we are, a fact easily seen at a tech conference while we watch the presenters gush over PowerPoint presentations as if they were pictures of their own children (We've all done it, so that's not a statement of exclusivity.) For Dr. Kelly and Professor Gough to have created such a fantastically wonderful project to then make the determination that it was time to turn their attention elsewhere says a lot about their character, a decision I believe they should be commended for making. I think it's important to consider the fact that when it comes down to it, Dr. Kelly and Professor Gough are both computer scientists *AND* educators at heart. As both their jobs require them to keep an open mind and a finger on the pulse of the industry. I have no doubt in my mind that their decision to forego continued involvement with the Ruby.NET project to instead work with the IronRuby team was both difficult and painful. But ultimately they had to do what was right for not only themselves but for the students that look to them for guidance and direction as to where they should place the focus of their studies. As Dr. Kelly mentioned, the DLR and IronRuby are here and here to stay. It's important that the CS students of the world understand this and the best way to understand these two important projects is to roll up their sleeves and get their hands dirty. That doesn't mean that the Ruby.NET project should just fold up and die. It simply means it was the right decision for them to make, a decision that, quite obviously, was not an easy decision to make for either of them. So then, where from here? I believe that Ruby.NET is an important project for many reasons, first and foremost because it works, works well, and works now. That said, IronRuby and in particular the DLR has completely changed the game for dynamic languages on the .NET platform. We all know that, so there's no point in pretending this is not the case. Ignoring this fact will come back to haunt any dynamic language project targeted towards the .NET platform. Relating this to Ruby.NET, the answer as to whether or not the Ruby.NET project should live on, in my own opinion, is to focus on the fact that Ruby.NET works right now and can act as the perfect foundation for .NET developers interested in getting their feet wet with Ruby and for Ruby developers interested in getting their feet wet with the .NET platform to do just that. In this regard I see Ruby.NET as a way to start this process sooner rather than later while at the same time helping to expose where the pain points are such that IronRuby can be a better overall project as a result. But there's more to it than that. As Ted Neward specified, > I still believe that there is room in the world for both a > statically-compiled Ruby and a dynamically-interpreted Ruby on the CLR. One of the most commonly asked questions on the IronPython development list -- IronPython as we all know being the basis of what brought about the DLR -- is "Can I write my libraries in Python and then call those libraries in my C# or VB.NET code?" While the answer is a bit more complicated than this, for the most part the answer is "Probably not." This is one area of the DLR that both the IronPython and IronRuby teams have specified would be nice to have, but at present time is a non-goal for the 1.0 release of the DLR and the projects based on that release. In this regard there is a clean separation between what Ruby.NET can offer the .NET developer *right now* and what IronRuby *will not* offer the .NET developer in the near term future. As such this is one area that I believe should be the core focus of the Ruby.NET project moving forward. But not from the standpoint of creating a competitive Ruby language project for the .NET platform -- that would be silly and prideful -- and instead from the standpoint of merging the focus of the two projects together in such a way that interop between the two code bases is seamless. In other words, and in my own opinion, the purpose of the Ruby.NET project moving forward *should not be* one of being a separate project with a separate focus and instead, 1) a stepping stone for the Ruby language on the .NET platform that Ruby and .NET developers alike can use to get started with Ruby development for the .NET platform *right now*. 2) a way that someone can take the same code base they write for IronRuby and compile that code into a static and reusable assembly that is portable and reusable inside of any CLI-compliant language. I don't think it was by any strange coincidence that when Dr. Kelly created this project on Google Code he chose rubydotnetcompiler as the project name, as ultimately that's what this project is all about. Ultimately and eventually it may turn out that the IronRuby and DLR teams decide to enable static compilation. And maybe they won't, deciding instead to focus their time on making the dynamic nature of dynamic languages that much more dynamic than would otherwise be the case. In the mean time, however, there's the *Ruby .NET compiler* project, a project in which I believe should follow the direct path of the IronRuby team, making it possible to take code targeted for IronRuby, statically compile that code, and reuse the static assembly within any other .NET code project. To me, anyway, this is an area of great desire with the .NET development communities and as such the perfect focus for moving this project forward. Thoughts from the communities at large? -- /M:D M. David Peterson Co-Founder & Chief Architect, 3rd&Urban, LLC Email: m.david at 3rdandUrban.com | m.david at amp.fm Mobile: (206) 418-9027 http://3rdandUrban.com | http://amp.fm | http://www.oreillynet.com/pub/au/2354 From m.david at xmlhacker.com Wed Feb 6 04:15:18 2008 From: m.david at xmlhacker.com (M. David Peterson) Date: Wed, 06 Feb 2008 02:15:18 -0700 Subject: [Ironruby-core] The future of Ruby.NET In-Reply-To: References: <24e27e560802050151j43fbb2b5la5645bb1334247cd@mail.gmail.com> <9a500a41f482bd431d42b3dfa71ca54f@ruby-forum.com> <8526685f0802051231x6d32a71dt93054360932f4ad7@mail.gmail.com> Message-ID: On Tue, 05 Feb 2008 13:43:14 -0700, Curt Hagenlocher wrote: > On Feb 5, 2008 12:31 PM, Greg Akins wrote: >> >> Meaning, that like Ruby.Net can we write .Net classes in Ruby rather >> than writing them as strings that are passed to the RubyEngine? > > There's a kind of mismatch between the capabilities of statically > defined types (as in the CLR) and the dynamic classes that Ruby > offers. What should happen to the corresponding CLR class if, for > instance, someone were to dynamically add methods to the Ruby class? > CLR classes don't support that kind of operation. I'm not sure this can really be applied to the notion of statically compiling Ruby code into a language agnostic .NET assembly. People who want static compilation of Ruby code don't look at it from the stand point of "I want the best of both the dynamic and static worlds" and instead "I want to write this library in Ruby because it's easier." or "I would like to use this Ruby library inside of my C# code." or "etc.". There's an obvious tradeoff: If you compile the code statically you lose the benefits that come along for the dynamic ride. But that's a tradeoff I believe some folks are willing to make. It doesn't always make sense to go this direction, and in some cases it may not even work as one might expect. But again, that's the tradeoff you have to be willing to make and it seems to me there are enough people who are willing to make it and therefore interested in the capability. > The best option in this regard is probably to allow a dynamic (Ruby or > other DLR) class to be delegated to by a statically-defined wrapper. > Conceptually, such a wrapper could be automatically generated from the > Ruby class definition, but once defined it would be unalterable. I think this is taking things a little too far. If you want the advantages of a dynamic language, use a dynamic language coupled with it's dynamic language runtime counterpart. If you're simply interested in using Ruby code as if it were a statically compiled language then statically compile the code and then, as you point out, > once defined it would be unalterable. -- /M:D M. David Peterson Co-Founder & Chief Architect, 3rd&Urban, LLC Email: m.david at 3rdandUrban.com | m.david at amp.fm Mobile: (206) 418-9027 http://3rdandUrban.com | http://amp.fm | http://www.oreillynet.com/pub/au/2354 From michael.letterle at gmail.com Wed Feb 6 10:13:39 2008 From: michael.letterle at gmail.com (Michael Letterle) Date: Wed, 6 Feb 2008 10:13:39 -0500 Subject: [Ironruby-core] delegate In-Reply-To: References: <3adad22e80c66a8d6b13d6b6cf485896@ruby-forum.com> <925d311d9c135b9a1e2eae410c2d7395@ruby-forum.com> Message-ID: Well I figured out how to get events wired up, that was fun :) Personally I'd rather see events wired up like this: @rbutton.Click.add &Proc @rbutton.Click.remove &Proc On Feb 4, 2008 12:40 AM, Tomas Matousek wrote: > Yes, it's half done and will be fixed. All scenarios that are available in other .NET languages will be doable in Ruby as well. > > Tomas > > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Michael Letterle > Sent: Sunday, February 03, 2008 2:29 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] delegate > > Well, it seems like the event stuff is only half done, let's say you > add two additional blocks to the Click event. You'll actually fire > three methods, except it will only be the first one you defined (ie > It'll say "Clicked!" three times). It seems to have something to do > with the way SetInvocationRule is currently implemented in > RubyEventInfo. I'm sure this'll be fixed eventually :) > > What I'm saying is eventually you'll be able to something like > > rbutton.Click{|sender, e| puts "Clicked!"} > rbutton.Click{|sender, e| puts "Also Clicked!"} > > and it'll work like +=ing to two seperate functions. > > On Feb 3, 2008 2:48 PM, Huw Collingbourne wrote: > > Michael Letterle wrote: > > > > > rbutton.Click { |sender,e| puts "Clicked!"} > > > > > > Why do you feel the need to new up an EventHandler directly? > > > > The problem is that this does not providee the ability (as in all other > > .NET languages) to do true delegation. In C#, for example, it is > > perfectly posssible to delegate the same event handling method to large > > numbers of different controls. We have already 'faked' delegation in a > > similar way to your suggestion (attaching blocks to specific > > Control.events) in our current form designer for IronRuby: > > > > http://www.sapphiresteel.com/IronRuby-Visual-Form-Designer > > http://www.sapphiresteel.com/IronRuby-Visual-Designer > > > > > > For a production system, however, this is less than desirable. What we > > really need is the normal .NET type of delegate chaining using the += > > and -= operators. > > > > best wishes > > Huw > > > > SapphireSteel Software > > Ruby and Rails In Visual Studio > > http://www.sapphiresteel.com > > -- > > > > Posted via http://www.ruby-forum.com/. > > _______________________________________________ > > Ironruby-core mailing list > > Ironruby-core at rubyforge.org > > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > > > -- > Michael Letterle > [Polymath Programmer] > http://michaeldotnet.blogspot.com > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -- Michael Letterle [Polymath Programmer] http://michaeldotnet.blogspot.com From lists at ruby-forum.com Wed Feb 6 12:48:42 2008 From: lists at ruby-forum.com (Huw Collingbourne) Date: Wed, 6 Feb 2008 18:48:42 +0100 Subject: [Ironruby-core] delegate In-Reply-To: References: <3adad22e80c66a8d6b13d6b6cf485896@ruby-forum.com> <925d311d9c135b9a1e2eae410c2d7395@ruby-forum.com> Message-ID: Michael Letterle wrote: > Well I figured out how to get events wired up, that was fun :) > > Personally I'd rather see events wired up like this: > > @rbutton.Click.add &Proc > @rbutton.Click.remove &Proc > > The actual syntax is no big deal. To work like other .NET languages and to provide the same IDE support, however, event handlers need to be named methods that can be selectively 'wired up' either in programming code or by selecting a method name using Visual Studio's Events panel. I have no very strong feelings about the operators ( += and -= or some alternatives ) but I do think that consistency with existing .NET delegation standards is important. best wishes Huw SapphireSteel Software Ruby and Rails In Visual Studio http://www.sapphiresteel.com -- Posted via http://www.ruby-forum.com/. From michael.letterle at gmail.com Wed Feb 6 12:53:39 2008 From: michael.letterle at gmail.com (Michael Letterle) Date: Wed, 6 Feb 2008 12:53:39 -0500 Subject: [Ironruby-core] delegate In-Reply-To: References: <3adad22e80c66a8d6b13d6b6cf485896@ruby-forum.com> <925d311d9c135b9a1e2eae410c2d7395@ruby-forum.com> Message-ID: Once we have the method() method, I imagine that will be a little easier... I had taken a side trip on implementing that when looking at the events stuff, but I really wanted to figure out how to get methods added to events properly, I may take a look at implementing method() (and methods()) next... Unless someone tells me to stop. On Feb 6, 2008 12:48 PM, Huw Collingbourne wrote: > Michael Letterle wrote: > > Well I figured out how to get events wired up, that was fun :) > > > > Personally I'd rather see events wired up like this: > > > > @rbutton.Click.add &Proc > > @rbutton.Click.remove &Proc > > > > > > The actual syntax is no big deal. To work like other .NET languages and > to provide the same IDE support, however, event handlers need to be > named methods that can be selectively 'wired up' either in programming > code or by selecting a method name using Visual Studio's Events panel. I > have no very strong feelings about the operators ( += and -= or some > alternatives ) but I do think that consistency with existing .NET > delegation standards is important. > > > best wishes > Huw > > SapphireSteel Software > Ruby and Rails In Visual Studio > http://www.sapphiresteel.com > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -- Michael Letterle [Polymath Programmer] http://michaeldotnet.blogspot.com From enicholson at gmail.com Wed Feb 6 14:38:46 2008 From: enicholson at gmail.com (Eric Nicholson) Date: Wed, 6 Feb 2008 14:38:46 -0500 Subject: [Ironruby-core] Weird performance problem with "find" Message-ID: I noticed some strange issues in an application I'm working on where it works speedy at first, and then gets progressively slower and slower. After a little bit of investigation, it seems that Enumerable#find is the culprit. The more times you run a find statement the slower it gets. Does anybody have any ideas why this is? Here's a sample that demonstrates the issue: require 'mscorlib' require 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll' a = (1..1000).to_a s = System::Diagnostics::Stopwatch.new() 100.times { s.start a.find {|x| x == 1000} s.stop puts "find took: #{s.elapsed.ToString}" } which outputs: find took: 00:00:00.0743446 ...snip... find took: 00:00:00.2290894 ...snip... find took: 00:00:00.4942105 I understand you guys aren't optimizing yet, but I thought you might be interested to see growth where there shouldn't be any. Also, if you have any ideas off the top of your head, I wouldn't mind looking into it a little. -Eric -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20080206/db2837b1/attachment.html From enicholson at gmail.com Wed Feb 6 15:04:20 2008 From: enicholson at gmail.com (Eric Nicholson) Date: Wed, 6 Feb 2008 15:04:20 -0500 Subject: [Ironruby-core] Weird performance problem with "find" In-Reply-To: References: Message-ID: Whoops, had the stopwatch setup wrong in that last message require 'mscorlib' require 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll' a = (1..1000).to_a 1000.times { s = System::Diagnostics::Stopwatch.new() s.start a.find {|x| x == 1000} s.stop puts "find took: #{s.elapsed.ToString}" } and the output is: find took: 00:00:00.0732210 find took: 00:00:00.0048562 find took: 00:00:00.0022469 find took: 00:00:00.0021351 ... snip ... find took: 00:00:00.0196016 find took: 00:00:00.0201994 find took: 00:00:00.0218765 ... snip ... find took: 00:00:00.0371834 find took: 00:00:00.0367817 find took: 00:00:00.0361911 On Feb 6, 2008 2:38 PM, Eric Nicholson wrote: > I noticed some strange issues in an application I'm working on where it > works speedy at first, and then gets progressively slower and slower. After > a little bit of investigation, it seems that Enumerable#find is the > culprit. The more times you run a find statement the slower it gets. Does > anybody have any ideas why this is? > > Here's a sample that demonstrates the issue: > > require 'mscorlib' > require 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll' > > a = (1..1000).to_a > s = System::Diagnostics::Stopwatch.new() > > 100.times { > s.start > a.find {|x| x == 1000} > s.stop > puts "find took: #{s.elapsed.ToString}" > } > > which outputs: > > find took: 00:00:00.0743446 > ...snip... > find took: 00:00:00.2290894 > ...snip... > find took: 00:00:00.4942105 > > I understand you guys aren't optimizing yet, but I thought you might be > interested to see growth where there shouldn't be any. Also, if you have > any ideas off the top of your head, I wouldn't mind looking into it a > little. > > -Eric > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20080206/270140e9/attachment-0001.html From m.david at xmlhacker.com Wed Feb 6 15:13:36 2008 From: m.david at xmlhacker.com (M. David Peterson) Date: Wed, 06 Feb 2008 13:13:36 -0700 Subject: [Ironruby-core] Weird performance problem with "find" In-Reply-To: References: Message-ID: On Wed, 06 Feb 2008 12:38:46 -0700, Eric Nicholson wrote: > require 'mscorlib' > require 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll' > > a = (1..1000).to_a > s = System::Diagnostics::Stopwatch.new() > > 100.times { > s.start > a.find {|x| x == 1000} > s.stop > puts "find took: #{s.elapsed.ToString}" > } You're reusing the same Stopwatch instance, so you have to add a call to the Reset method at the end of each iteration. In doing so you should find your timings are as they should be. -- /M:D M. David Peterson Co-Founder & Chief Architect, 3rd&Urban, LLC Email: m.david at 3rdandUrban.com | m.david at amp.fm Mobile: (206) 418-9027 http://3rdandUrban.com | http://amp.fm | http://www.oreillynet.com/pub/au/2354 From michael.letterle at gmail.com Wed Feb 6 15:23:10 2008 From: michael.letterle at gmail.com (Michael Letterle) Date: Wed, 6 Feb 2008 15:23:10 -0500 Subject: [Ironruby-core] Weird performance problem with "find" In-Reply-To: References: Message-ID: He's right about the issue however: find took: 00:00:00.0081136 find took: 00:00:00.0022516 find took: 00:00:00.0021312 [snip] find took: 00:00:00.0220530 find took: 00:00:00.0245721 find took: 00:00:00.0238102 [snip] find took: 00:00:00.0377458 find took: 00:00:00.0453373 find took: 00:00:00.0369415 On Feb 6, 2008 3:13 PM, M. David Peterson wrote: > On Wed, 06 Feb 2008 12:38:46 -0700, Eric Nicholson > wrote: > > > require 'mscorlib' > > require 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll' > > > > a = (1..1000).to_a > > s = System::Diagnostics::Stopwatch.new() > > > > 100.times { > > s.start > > a.find {|x| x == 1000} > > s.stop > > puts "find took: #{s.elapsed.ToString}" > > } > > > You're reusing the same Stopwatch instance, so you have to add a call to > the Reset method at the end of each iteration. In doing so you should > find your timings are as they should be. > > > -- > /M:D > > M. David Peterson > Co-Founder & Chief Architect, 3rd&Urban, LLC > Email: m.david at 3rdandUrban.com | m.david at amp.fm > Mobile: (206) 418-9027 > http://3rdandUrban.com | http://amp.fm | > http://www.oreillynet.com/pub/au/2354 > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -- Michael Letterle [Polymath Programmer] http://michaeldotnet.blogspot.com From m.david at xmlhacker.com Wed Feb 6 15:31:54 2008 From: m.david at xmlhacker.com (M. David Peterson) Date: Wed, 06 Feb 2008 13:31:54 -0700 Subject: [Ironruby-core] Weird performance problem with "find" In-Reply-To: References: Message-ID: On Wed, 06 Feb 2008 13:23:10 -0700, Michael Letterle wrote: > He's right about the issue however: > ... > find took: 00:00:00.0377458 > find took: 00:00:00.0453373 > find took: 00:00:00.0369415 Whoops. My bad. I was testing via Ruby.NET which, coincidentally, doesn't showcase this type of behavior, find took: 00:00:00.0216940 find took: 00:00:00.0012342 find took: 00:00:00.0012423 ... find took: 00:00:00.0013994 find took: 00:00:00.0013016 find took: 00:00:00.0017697 ... find took: 00:00:00.0012989 find took: 00:00:00.0014228 find took: 00:00:00.0013389 ... I guess maybe Ruby.NET still has its place in this world afterall. ;-) :D --- (the modified code in case anyone wants to run the comparison on their own machine) require 'mscorlib' require 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll' a = (1..1000).to_a s = System::Diagnostics::Stopwatch.new() 100.times { s.Start a.find {|x| x == 1000} s.Stop puts "find took: #{s.Elapsed}" s.Reset } -- /M:D M. David Peterson Co-Founder & Chief Architect, 3rd&Urban, LLC Email: m.david at 3rdandUrban.com | m.david at amp.fm Mobile: (206) 418-9027 http://3rdandUrban.com | http://amp.fm | http://www.oreillynet.com/pub/au/2354 From michael.letterle at gmail.com Wed Feb 6 16:22:48 2008 From: michael.letterle at gmail.com (Michael Letterle) Date: Wed, 6 Feb 2008 16:22:48 -0500 Subject: [Ironruby-core] Weird performance problem with "find" In-Reply-To: References: Message-ID: I have some ideas on what some of the issues may be, primarily related to how the Enumerable class creates a new Proc object every time through the loop. Anyway, doing the following seems to help to some extent: require 'mscorlib' require 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll' a = (1..1000).to_a s = System::Diagnostics::Stopwatch.new() m = Proc.new {|x| x == 1000 } 1000.times { s.start y = a.find &m s.stop puts "find took: #{s.elapsed.ToString}" s.reset } find took: 00:00:00.0012998 find took: 00:00:00.0012719 find took: 00:00:00.0012915 [snip] find took: 00:00:00.0049048 find took: 00:00:00.0052548 find took: 00:00:00.0051403 [snip] find took: 00:00:00.0127650 find took: 00:00:00.0141006 find took: 00:00:00.0106432 You can see the times still going up (rules are being created based on Proc.Id?) but not nearly the same pace. On Feb 6, 2008 3:31 PM, M. David Peterson wrote: > On Wed, 06 Feb 2008 13:23:10 -0700, Michael Letterle > wrote: > > > He's right about the issue however: > > ... > > find took: 00:00:00.0377458 > > find took: 00:00:00.0453373 > > find took: 00:00:00.0369415 > > Whoops. My bad. I was testing via Ruby.NET which, coincidentally, > doesn't showcase this type of behavior, > > find took: 00:00:00.0216940 > find took: 00:00:00.0012342 > find took: 00:00:00.0012423 > ... > find took: 00:00:00.0013994 > find took: 00:00:00.0013016 > find took: 00:00:00.0017697 > ... > find took: 00:00:00.0012989 > find took: 00:00:00.0014228 > find took: 00:00:00.0013389 > ... > > I guess maybe Ruby.NET still has its place in this world afterall. ;-) :D > > --- > > (the modified code in case anyone wants to run the comparison on their own > machine) > > require 'mscorlib' > require 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll' > > a = (1..1000).to_a > s = System::Diagnostics::Stopwatch.new() > > 100.times { > s.Start > a.find {|x| x == 1000} > s.Stop > puts "find took: #{s.Elapsed}" > s.Reset > } > > -- > > /M:D > > M. David Peterson > Co-Founder & Chief Architect, 3rd&Urban, LLC > Email: m.david at 3rdandUrban.com | m.david at amp.fm > Mobile: (206) 418-9027 > http://3rdandUrban.com | http://amp.fm | > http://www.oreillynet.com/pub/au/2354 > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -- Michael Letterle [Polymath Programmer] http://michaeldotnet.blogspot.com From jflam at microsoft.com Wed Feb 6 17:58:59 2008 From: jflam at microsoft.com (John Lam (DLR)) Date: Wed, 6 Feb 2008 14:58:59 -0800 Subject: [Ironruby-core] Weird performance problem with "find" In-Reply-To: References: Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D8FFAA0CC@NA-EXMSG-C115.redmond.corp.microsoft.com> Michael Letterle: > I have some ideas on what some of the issues may be, primarily related > to how the Enumerable class creates a new Proc object every time > through the loop. Anyway, doing the following seems to help to some > extent: > > require 'mscorlib' > require 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll' > > a = (1..1000).to_a > s = System::Diagnostics::Stopwatch.new() > m = Proc.new {|x| x == 1000 } > 1000.times { > s.start > y = a.find &m > s.stop > puts "find took: #{s.elapsed.ToString}" > s.reset > } > > find took: 00:00:00.0012998 > find took: 00:00:00.0012719 > find took: 00:00:00.0012915 > > [snip] > > find took: 00:00:00.0049048 > find took: 00:00:00.0052548 > find took: 00:00:00.0051403 > > [snip] > > find took: 00:00:00.0127650 > find took: 00:00:00.0141006 > find took: 00:00:00.0106432 This is a strange; nothing obvious jumps out right now. We'll have to look at this down the road when we do our perf push. Clearly this is a bug. Can someone open up a bug for this? Thanks, -John From michael.letterle at gmail.com Wed Feb 6 18:06:37 2008 From: michael.letterle at gmail.com (Michael Letterle) Date: Wed, 6 Feb 2008 18:06:37 -0500 Subject: [Ironruby-core] Weird performance problem with "find" In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D8FFAA0CC@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <372109E149E8084D8E6C7D9CFD82E0632D8FFAA0CC@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: Bug has been submitted. I'll probably poke it with a stick some while I'm at it. On Feb 6, 2008 5:58 PM, John Lam (DLR) wrote: > Michael Letterle: > > > > I have some ideas on what some of the issues may be, primarily related > > to how the Enumerable class creates a new Proc object every time > > through the loop. Anyway, doing the following seems to help to some > > extent: > > > > require 'mscorlib' > > require 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll' > > > > a = (1..1000).to_a > > s = System::Diagnostics::Stopwatch.new() > > m = Proc.new {|x| x == 1000 } > > 1000.times { > > s.start > > y = a.find &m > > s.stop > > puts "find took: #{s.elapsed.ToString}" > > s.reset > > } > > > > find took: 00:00:00.0012998 > > find took: 00:00:00.0012719 > > find took: 00:00:00.0012915 > > > > [snip] > > > > find took: 00:00:00.0049048 > > find took: 00:00:00.0052548 > > find took: 00:00:00.0051403 > > > > [snip] > > > > find took: 00:00:00.0127650 > > find took: 00:00:00.0141006 > > find took: 00:00:00.0106432 > > This is a strange; nothing obvious jumps out right now. We'll have to look at this down the road when we do our perf push. Clearly this is a bug. Can someone open up a bug for this? > > Thanks, > -John > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -- Michael Letterle [Polymath Programmer] http://michaeldotnet.blogspot.com From enicholson at gmail.com Wed Feb 6 18:56:35 2008 From: enicholson at gmail.com (Eric Nicholson) Date: Wed, 6 Feb 2008 18:56:35 -0500 Subject: [Ironruby-core] Weird performance problem with "find" In-Reply-To: References: <372109E149E8084D8E6C7D9CFD82E0632D8FFAA0CC@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: So "Enumerable#find" is definitely a red herring. I'm guessing it has something to do with block creation. Here's a better example without the find: 10000.times { | iter | s.reset s.start x = 0 1000.times { x += 1} s.stop puts "iteration #{iter} took: #{s.elapsed.ToString}" if iter % 100 == 0 } Output: iteration 0 took: 00:00:00.0471160 iteration 100 took: 00:00:00.0024187 iteration 200 took: 00:00:00.0037267 iteration 300 took: 00:00:00.0039901 iteration 400 took: 00:00:00.0054012 iteration 500 took: 00:00:00.0063639 iteration 600 took: 00:00:00.0070567 iteration 700 took: 00:00:00.0103230 iteration 800 took: 00:00:00.0093428 iteration 900 took: 00:00:00.0095257 [snip] iteration 9700 took: 00:00:00.0892543 iteration 9800 took: 00:00:00.0899337 iteration 9900 took: 00:00:00.0963234 It's very consistent linear growth. Several iterations took much longer presumably due to garbage collection. Compare that to this version without the inner block: 1000.times do |iter| s.reset s.start x = 0 x+= 1 while x < 1000 s.stop puts "iteration #{iter} took: #{s.elapsed.ToString}" if iter % 100 == 0 iter += 1 end Output: iteration 0 took: 00:00:00.1119421 iteration 100 took: 00:00:00.0001190 iteration 200 took: 00:00:00.0001430 iteration 300 took: 00:00:00.0001326 iteration 400 took: 00:00:00.0001212 iteration 500 took: 00:00:00.0001173 iteration 600 took: 00:00:00.0001190 iteration 700 took: 00:00:00.0001178 iteration 800 took: 00:00:00.0001176 iteration 900 took: 00:00:00.0001178 [snip] iteration 9900 took: 00:00:00.0001142 So maybe block creation/parsing/execution is a little slower each time? On Feb 6, 2008 6:06 PM, Michael Letterle wrote: > Bug has been submitted. I'll probably poke it with a stick some while > I'm at it. > > On Feb 6, 2008 5:58 PM, John Lam (DLR) wrote: > > Michael Letterle: > > > > > > > I have some ideas on what some of the issues may be, primarily related > > > to how the Enumerable class creates a new Proc object every time > > > through the loop. Anyway, doing the following seems to help to some > > > extent: > > > > > > require 'mscorlib' > > > require 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll' > > > > > > a = (1..1000).to_a > > > s = System::Diagnostics::Stopwatch.new() > > > m = Proc.new {|x| x == 1000 } > > > 1000.times { > > > s.start > > > y = a.find &m > > > s.stop > > > puts "find took: #{s.elapsed.ToString}" > > > s.reset > > > } > > > > > > find took: 00:00:00.0012998 > > > find took: 00:00:00.0012719 > > > find took: 00:00:00.0012915 > > > > > > [snip] > > > > > > find took: 00:00:00.0049048 > > > find took: 00:00:00.0052548 > > > find took: 00:00:00.0051403 > > > > > > [snip] > > > > > > find took: 00:00:00.0127650 > > > find took: 00:00:00.0141006 > > > find took: 00:00:00.0106432 > > > > This is a strange; nothing obvious jumps out right now. We'll have to > look at this down the road when we do our perf push. Clearly this is a bug. > Can someone open up a bug for this? > > > > Thanks, > > -John > > > > > > _______________________________________________ > > Ironruby-core mailing list > > Ironruby-core at rubyforge.org > > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > > > -- > Michael Letterle > [Polymath Programmer] > http://michaeldotnet.blogspot.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/20080206/c3f1117e/attachment-0001.html From michael.letterle at gmail.com Wed Feb 6 19:18:46 2008 From: michael.letterle at gmail.com (Michael Letterle) Date: Wed, 6 Feb 2008 19:18:46 -0500 Subject: [Ironruby-core] Weird performance problem with "find" In-Reply-To: References: <372109E149E8084D8E6C7D9CFD82E0632D8FFAA0CC@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: I don't know if i'd call it a "red herring" as the performance with find dropped considerably faster, it's probably a combination. On Feb 6, 2008 6:56 PM, Eric Nicholson wrote: > So "Enumerable#find" is definitely a red herring. I'm guessing it has > something to do with block creation. Here's a better example without the > find: > > 10000.times { | iter | > s.reset > s.start > x = 0 > 1000.times { x += 1} > s.stop > puts "iteration #{iter} took: #{s.elapsed.ToString}" if iter % 100 == 0 > } > Output: > > iteration 0 took: 00:00:00.0471160 > iteration 100 took: 00:00:00.0024187 > iteration 200 took: 00:00:00.0037267 > iteration 300 took: 00:00:00.0039901 > iteration 400 took: 00:00:00.0054012 > iteration 500 took: 00:00:00.0063639 > iteration 600 took: 00:00:00.0070567 > iteration 700 took: 00:00:00.0103230 > iteration 800 took: 00:00:00.0093428 > iteration 900 took: 00:00:00.0095257 > [snip] > iteration 9700 took: 00:00:00.0892543 > iteration 9800 took: 00:00:00.0899337 > iteration 9900 took: 00:00:00.0963234 > > It's very consistent linear growth. Several iterations took much longer > presumably due to garbage collection. > > Compare that to this version without the inner block: > > 1000.times do |iter| > s.reset > s.start > x = 0 > x+= 1 while x < 1000 > s.stop > puts "iteration #{iter} took: #{s.elapsed.ToString}" if iter % 100 == 0 > iter += 1 > end > > Output: > > iteration 0 took: 00:00:00.1119421 > iteration 100 took: 00:00:00.0001190 > iteration 200 took: 00:00:00.0001430 > iteration 300 took: 00:00:00.0001326 > iteration 400 took: 00:00:00.0001212 > iteration 500 took: 00:00:00.0001173 > iteration 600 took: 00:00:00.0001190 > iteration 700 took: 00:00:00.0001178 > iteration 800 took: 00:00:00.0001176 > iteration 900 took: 00:00:00.0001178 > [snip] > iteration 9900 took: 00:00:00.0001142 > > So maybe block creation/parsing/execution is a little slower each time? > > > > On Feb 6, 2008 6:06 PM, Michael Letterle wrote: > > > Bug has been submitted. I'll probably poke it with a stick some while > > I'm at it. > > > > > > > > > > On Feb 6, 2008 5:58 PM, John Lam (DLR) wrote: > > > Michael Letterle: > > > > > > > > > > I have some ideas on what some of the issues may be, primarily related > > > > to how the Enumerable class creates a new Proc object every time > > > > through the loop. Anyway, doing the following seems to help to some > > > > extent: > > > > > > > > require 'mscorlib' > > > > require 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll' > > > > > > > > a = (1..1000).to_a > > > > s = System::Diagnostics::Stopwatch.new() > > > > m = Proc.new {|x| x == 1000 } > > > > 1000.times { > > > > s.start > > > > y = a.find &m > > > > s.stop > > > > puts "find took: #{s.elapsed.ToString}" > > > > s.reset > > > > } > > > > > > > > find took: 00:00:00.0012998 > > > > find took: 00:00:00.0012719 > > > > find took: 00:00:00.0012915 > > > > > > > > [snip] > > > > > > > > find took: 00:00:00.0049048 > > > > find took: 00:00:00.0052548 > > > > find took: 00:00:00.0051403 > > > > > > > > [snip] > > > > > > > > find took: 00:00:00.0127650 > > > > find took: 00:00:00.0141006 > > > > find took: 00:00:00.0106432 > > > > > > This is a strange; nothing obvious jumps out right now. We'll have to > look at this down the road when we do our perf push. Clearly this is a bug. > Can someone open up a bug for this? > > > > > > Thanks, > > > -John > > > > > > > > > _______________________________________________ > > > Ironruby-core mailing list > > > Ironruby-core at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > > > > > > > > > > -- > > Michael Letterle > > [Polymath Programmer] > > http://michaeldotnet.blogspot.com > > _______________________________________________ > > > > > > > > Ironruby-core mailing list > > Ironruby-core at rubyforge.org > > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -- Michael Letterle [Polymath Programmer] http://michaeldotnet.blogspot.com From jomes at microsoft.com Wed Feb 6 19:41:57 2008 From: jomes at microsoft.com (John Messerly) Date: Wed, 6 Feb 2008 16:41:57 -0800 Subject: [Ironruby-core] Weird performance problem with "find" In-Reply-To: References: <372109E149E8084D8E6C7D9CFD82E0632D8FFAA0CC@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <918705E903F4714CB713D89AB5F1857D73B40ACA26@NA-EXMSG-C116.redmond.corp.microsoft.com> Michael Letterle: > I don't know if i'd call it a "red herring" as the performance with > find dropped considerably faster, it's probably a combination. Probably because Enumerable#find uses a block internally when it calls #each, so you get two block dispatches instead of one. - John From michael.letterle at gmail.com Wed Feb 6 20:12:25 2008 From: michael.letterle at gmail.com (Michael Letterle) Date: Wed, 6 Feb 2008 20:12:25 -0500 Subject: [Ironruby-core] Weird performance problem with "find" In-Reply-To: <918705E903F4714CB713D89AB5F1857D73B40ACA26@NA-EXMSG-C116.redmond.corp.microsoft.com> References: <372109E149E8084D8E6C7D9CFD82E0632D8FFAA0CC@NA-EXMSG-C115.redmond.corp.microsoft.com> <918705E903F4714CB713D89AB5F1857D73B40ACA26@NA-EXMSG-C116.redmond.corp.microsoft.com> Message-ID: The example with a nested times call also consists of two block dispatches and doesn't ramp up nearly as bad, or am I missing something? On Feb 6, 2008 7:41 PM, John Messerly wrote: > Michael Letterle: > > > I don't know if i'd call it a "red herring" as the performance with > > find dropped considerably faster, it's probably a combination. > > Probably because Enumerable#find uses a block internally when it calls #each, so you get two block dispatches instead of one. > > - John > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -- Michael Letterle [Polymath Programmer] http://michaeldotnet.blogspot.com From lists at ruby-forum.com Thu Feb 7 03:46:15 2008 From: lists at ruby-forum.com (Softmind Technology) Date: Thu, 7 Feb 2008 09:46:15 +0100 Subject: [Ironruby-core] Any Plans for a StarterKit in IronRuby on CodePlex. Message-ID: <5ba19d9113f99f91b343762ff6c29501@ruby-forum.com> Hello, I am just curious to know about the plans to make IronRuby more reachable and just to inquire, whether there is any projects already announced on StarterKits in IronRuby. I think, converting an existing asp.net starterKit to IronRuby would be a nice option. This way we can learn more easily. I know... there is a Book on the way for Ironruby by Manning Publishers, but it seems to be very far by now. No news about the progress so far. What are the next as well as immediate plans by Microsoft IronRuby Team, about teaching IronRuby from Scratch. Since Ironruby is going to get No.1 .Net Language support like C# and Vb.Net, can i expect the same level of support. Thanks -- Posted via http://www.ruby-forum.com/. From ivan at flanders.co.nz Thu Feb 7 04:13:07 2008 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Thu, 7 Feb 2008 22:13:07 +1300 Subject: [Ironruby-core] Any Plans for a StarterKit in IronRuby on CodePlex. In-Reply-To: <5ba19d9113f99f91b343762ff6c29501@ruby-forum.com> References: <5ba19d9113f99f91b343762ff6c29501@ruby-forum.com> Message-ID: The book will go in early early access program soon. We're in the process of preparing that. Although the part of the book that will be available won't be of much use if you're already familiar with Ruby and .NET because it's just satisfying the prerequisites. I will be posting stuff on my blog and the manning website next week on how to leverage various .NET orms from IronRuby. That should give you an idea of doing interop with your own compiled classes etc. I don't deal with the .NET ORMS in the book itself but rather with ActiveRecord from Rails. I'm sorry but IronRuby is quite a young project and writing a book does take time :) What would be topics of particular interest to you? my blog: http://flanders.co.nz/blog hth Ivan On Feb 7, 2008 9:46 PM, Softmind Technology wrote: > Hello, > > I am just curious to know about the plans to make IronRuby more > reachable and just to inquire, whether there is any projects already > announced on StarterKits in IronRuby. I think, converting an existing > asp.net starterKit to IronRuby would be a nice option. This way we can > learn more easily. > > I know... there is a Book on the way for Ironruby by Manning Publishers, > but it seems to be very far by now. No news about the progress so far. > > What are the next as well as immediate plans by Microsoft IronRuby Team, > about teaching IronRuby from Scratch. > > Since Ironruby is going to get No.1 .Net Language support like C# and > Vb.Net, can i expect the same level of support. > > 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/20080207/0cd091ed/attachment.html From slavof at gmail.com Thu Feb 7 04:14:44 2008 From: slavof at gmail.com (Slavo Furman) Date: Thu, 7 Feb 2008 10:14:44 +0100 Subject: [Ironruby-core] Any Plans for a StarterKit in IronRuby on CodePlex. In-Reply-To: <5ba19d9113f99f91b343762ff6c29501@ruby-forum.com> References: <5ba19d9113f99f91b343762ff6c29501@ruby-forum.com> Message-ID: <24e27e560802070114q18f58e25kf959e09b2983e204@mail.gmail.com> hi! On same topic, what you see as primary scenario(s) for IronRuby use. Silverlight programming, general web app programming (means ASP.NET, RoR(?), ...), windows forms apps, porting code written in Ruby to .NET, ... interested in hearing your thoughts ;) thanks, Slavo. On Feb 7, 2008 9:46 AM, Softmind Technology wrote: > Hello, > > I am just curious to know about the plans to make IronRuby more > reachable and just to inquire, whether there is any projects already > announced on StarterKits in IronRuby. I think, converting an existing > asp.net starterKit to IronRuby would be a nice option. This way we can > learn more easily. > > I know... there is a Book on the way for Ironruby by Manning Publishers, > but it seems to be very far by now. No news about the progress so far. > > What are the next as well as immediate plans by Microsoft IronRuby Team, > about teaching IronRuby from Scratch. > > Since Ironruby is going to get No.1 .Net Language support like C# and > Vb.Net, can i expect the same level of support. > > 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/20080207/5b4bd2d2/attachment.html From ivan at flanders.co.nz Thu Feb 7 04:37:40 2008 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Thu, 7 Feb 2008 22:37:40 +1300 Subject: [Ironruby-core] Any Plans for a StarterKit in IronRuby on CodePlex. In-Reply-To: <24e27e560802070114q18f58e25kf959e09b2983e204@mail.gmail.com> References: <5ba19d9113f99f91b343762ff6c29501@ruby-forum.com> <24e27e560802070114q18f58e25kf959e09b2983e204@mail.gmail.com> Message-ID: Well I quit my job to be able to spend more time on Silverlight and IronRuby as a consultant because I think that one takes the cake :) I think that most people will go to IronRuby to have something like RubyOnRails.NET (IronRubyOnRails). I personally like Ruby best for the web and for automating my common desktop tasks, using Rake as a replacement for msbuild or nant. Once you get the hang of Ruby you can do so much more in a day than you could with a language like say C#. One of the things I'm looking forward to, is to be able to use rspec and mocha as my unit test framework instead of one out the plethora of c# ones. Mocking becomes so much easier with ruby, where in C# i have it associated with pain. I'm coming from a .NET background before I did ruby, so I'll be probably most inclined to find a good balance between using what's there from the ruby community and what's in the .NET framework. To use an empty term the best tool for the job. I'm also looking forward to getting a bunch of nice dsl's around .NET libraries etc. I'll probably use it for most things I come across. IronRuby code executes slower than C# code which will be one of the objections you get. But I think that in most webapps for example the performance bottleneck is the way the data is handled.Because typically you're doing things on a per request basis and most of the operations aren't that computational intensive at all, the difference isn't that bad. And if needs be you can always perform those tasks that need that extra bit of performance in a statically compiled assembly. It's hard to tell what will actually happen because using IronRuby for webforms programming should make that model also very attractive. Especially for ASP.NET developers from today because they won't need to learn a new framework and mindset they can happily stick with viewstate, css control adapters and controls. Another thing that interests me is how I would be able to leverage the ASP.NET MVC Framework because as a personal preference I like that one the best for doing MVC because almost no choices have been made for me. Where other people will find a more opionated framework more suitable for their taste. I think IronRuby and WPF is also a winner but not as much as Silverlight is. I'd like to see everybody switching to ironruby ;) On Feb 7, 2008 10:14 PM, Slavo Furman wrote: > hi! > > On same topic, what you see as primary scenario(s) for IronRuby use. > Silverlight programming, general web app programming (means ASP.NET, > RoR(?), ...), windows forms apps, porting code written in Ruby to .NET, ... > > interested in hearing your thoughts ;) > > thanks, > Slavo. > On Feb 7, 2008 9:46 AM, Softmind Technology wrote: > > > Hello, > > > > I am just curious to know about the plans to make IronRuby more > > reachable and just to inquire, whether there is any projects already > > announced on StarterKits in IronRuby. I think, converting an existing > > asp.net starterKit to IronRuby would be a nice option. This way we can > > learn more easily. > > > > I know... there is a Book on the way for Ironruby by Manning Publishers, > > but it seems to be very far by now. No news about the progress so far. > > > > What are the next as well as immediate plans by Microsoft IronRuby Team, > > about teaching IronRuby from Scratch. > > > > Since Ironruby is going to get No.1 .Net Language support like C# and > > Vb.Net, can i expect the same level of support. > > > > Thanks > > -- > > Posted via http://www.ruby-forum.com/. > > _______________________________________________ > > Ironruby-core mailing list > > Ironruby-core at rubyforge.org > > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20080207/189708e1/attachment-0001.html From lists at ruby-forum.com Thu Feb 7 06:27:27 2008 From: lists at ruby-forum.com (Softmind Technology) Date: Thu, 7 Feb 2008 12:27:27 +0100 Subject: [Ironruby-core] Any Plans for a StarterKit in IronRuby on CodePlex. In-Reply-To: References: <5ba19d9113f99f91b343762ff6c29501@ruby-forum.com> <24e27e560802070114q18f58e25kf959e09b2983e204@mail.gmail.com> Message-ID: <157026466f342eb44dd122dee6d45c2a@ruby-forum.com> Hi Ivan, Thanks for informing us about the status. Its nice to know that you are considering about Active Record as an ORM in your book. Thats the best idea and i do support it. Informing a bit about DataMapper would also be nice, since MERB is going to support 3 ORM's and Datamapper is one of them. It would be nice if you can focus and write few pages on LinQ to SQL with IronRuby in your book. All the codes i have seen so far have mainly covered C#, and few of them with Vb.Net. So far i have not seen a single example with Ironruby. I know that IronRuby is still in alpha stage, but something should be ready by now, which can show atleast a single example in LinQ to SQL with IronRuby. I think, more opinions will flow in, from this forum. Thanks -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Thu Feb 7 07:27:03 2008 From: lists at ruby-forum.com (Softmind Technology) Date: Thu, 7 Feb 2008 13:27:03 +0100 Subject: [Ironruby-core] Any Plans for a StarterKit in IronRuby on CodePlex. In-Reply-To: <157026466f342eb44dd122dee6d45c2a@ruby-forum.com> References: <5ba19d9113f99f91b343762ff6c29501@ruby-forum.com> <24e27e560802070114q18f58e25kf959e09b2983e204@mail.gmail.com> <157026466f342eb44dd122dee6d45c2a@ruby-forum.com> Message-ID: <3e6dd551ddcff00ce3d29e653d1d1be9@ruby-forum.com> Hi Ivan, Sorry.... I missed to mention in my previous thread. It would be nice if you will kindly consider to show few examples of connections with MySql as well. Since IIS 7 will support PHP and MySQL, it would be great to show how IronRuby works with MySQl. Since many classic Ruby developers would be having a ready made database in MySql, they would rather prefer to stick to MySQL. MS SQL Server would be the other option for them. In short we get best of both the worlds,when it comes to database. Thanks -- Posted via http://www.ruby-forum.com/. From jflam at microsoft.com Thu Feb 7 12:01:44 2008 From: jflam at microsoft.com (John Lam (DLR)) Date: Thu, 7 Feb 2008 09:01:44 -0800 Subject: [Ironruby-core] Any Plans for a StarterKit in IronRuby on CodePlex. In-Reply-To: References: <5ba19d9113f99f91b343762ff6c29501@ruby-forum.com> <24e27e560802070114q18f58e25kf959e09b2983e204@mail.gmail.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D8FFAA3A5@NA-EXMSG-C115.redmond.corp.microsoft.com> Ivan Porto Carrero: > But I think that in most webapps for example the performance > bottleneck is the way the data is handled.Because typically you're > doing things on a per request basis and most of the operations aren't > that computational intensive at all, the difference isn't that bad. > And if needs be you can always perform those tasks that need that > extra bit of performance in a statically compiled assembly. A couple of points here: 1) If you s/performance/efficiency/ you'll see the problem from a different light. Server virtualization and power efficiency are becoming things that lots of folks are concerned with these days. So while optimizing *latency* may not be important due to being IO bound, doing more with the CPU cycles that are available and the energy cost per CPU cycle is becoming more and more important, especially as sites grow. 2) A statically compiled assembly won't necessarily buy you better performance. Certainly not today. So I think that you still need to think about efficiency vs. latency / perf. > I think IronRuby and WPF is also a winner but not as much as > Silverlight is. +1 on the Silverlight comment. I think this is a place where we can do things that most other implementations cannot. We will have reasonably broad reach of SL by the end of this year, which is the base platform for running IronRuby in the browser. Now what folks will actually do with Ruby in the browser is something that I would love to spin up a discussion around. Thoughts are welcome here. Thanks, -John From ivan at flanders.co.nz Thu Feb 7 15:39:39 2008 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Fri, 8 Feb 2008 09:39:39 +1300 Subject: [Ironruby-core] Any Plans for a StarterKit in IronRuby on CodePlex. In-Reply-To: <3e6dd551ddcff00ce3d29e653d1d1be9@ruby-forum.com> References: <5ba19d9113f99f91b343762ff6c29501@ruby-forum.com> <24e27e560802070114q18f58e25kf959e09b2983e204@mail.gmail.com> <157026466f342eb44dd122dee6d45c2a@ruby-forum.com> <3e6dd551ddcff00ce3d29e653d1d1be9@ruby-forum.com> Message-ID: Hi The rubyists already know how to connect to mysql don't they :). Because IronRuby will support everything MRI supports that means that the ruby-dbi library should also work on IronRuby. And in that case there are plenty of tutorials on the web that actually show that. I do want to show new things in the book and not stuff that is ubiquitous on the web or available in 20 other books. That being said I had planned to talk about DataMapper and Sequel as ruby ORM's and probably very briefly mention that there is rBatis an iBatis implementation in Ruby. I'll see how I can work Linq2Sql in. But if I'm going to show Linq2Sql that would probably mean generating the Linq2Sql classes in C# and then using that assembly from your code. Because at this time IronRuby doesn't support custom attributes and I believe Linq2Sql needs those for it's metadata. I haven't properly looked into Linq2Sql yet except for a demo I did a couple of months ago. I'm mostly interested in having a DBI provider, based on ADO.NET that would mean you get an almost drop in replacement for most exisiting ruby applications by just changing the connection string and for rails by creating a new client adapter that understands the ADO.NET connection string. Or do you mean leveraging the ADO.NET providers directly ? For me this is perfect time to have this discussion on which data access people are interested in because this is what I'll be writing about next. It makes my job easier when I get feedback so I know what is really of interest to the community instead of guessing for it :) Thanks Ivan On Feb 8, 2008 1:27 AM, Softmind Technology wrote: > Hi Ivan, > > Sorry.... I missed to mention in my previous thread. > > It would be nice if you will kindly consider to show few examples of > connections with MySql as well. > > Since IIS 7 will support PHP and MySQL, it would be great to show how > IronRuby works with MySQl. Since many classic Ruby developers would be > having a ready made database in MySql, they would rather prefer to stick > to MySQL. > > MS SQL Server would be the other option for them. > > In short we get best of both the worlds,when it comes to database. > > 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/20080208/93c8eed5/attachment.html From lists at ruby-forum.com Fri Feb 8 05:14:16 2008 From: lists at ruby-forum.com (Dermot Hogan) Date: Fri, 8 Feb 2008 11:14:16 +0100 Subject: [Ironruby-core] AddRange problem Message-ID: <3aa18c73086c9a875389e5421f1da0e4@ruby-forum.com> I'm having trouble with this in a ListBox control: self.listBox1.Items.AddRange(['a', 'b', 'c']) I get the error :0:in `InitializeComponent': wrong number or type of arguments for `AddRange' (ArgumentError) What's the correct syntax here? (I think this used to work) Dermot -- Posted via http://www.ruby-forum.com/. From michael.letterle at gmail.com Fri Feb 8 08:47:48 2008 From: michael.letterle at gmail.com (Michael Letterle) Date: Fri, 8 Feb 2008 08:47:48 -0500 Subject: [Ironruby-core] AddRange problem In-Reply-To: <3aa18c73086c9a875389e5421f1da0e4@ruby-forum.com> References: <3aa18c73086c9a875389e5421f1da0e4@ruby-forum.com> Message-ID: For some reason it seems to be passing it in as self.listBox1.Items.AddRange('a', 'b', 'c') Odd.. Regardless though, as a work around for now you can do this: ['a','b','c'].each {|item| self.listBox1.Items.Add item} On Feb 8, 2008 5:14 AM, Dermot Hogan wrote: > I'm having trouble with this in a ListBox control: > > self.listBox1.Items.AddRange(['a', 'b', 'c']) > > I get the error > > :0:in `InitializeComponent': wrong number or type of arguments for > `AddRange' (ArgumentError) > > What's the correct syntax here? > > (I think this used to work) > > Dermot > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -- Michael Letterle [Polymath Programmer] http://michaeldotnet.blogspot.com From lists at ruby-forum.com Fri Feb 8 10:10:40 2008 From: lists at ruby-forum.com (Dermot Hogan) Date: Fri, 8 Feb 2008 16:10:40 +0100 Subject: [Ironruby-core] AddRange problem In-Reply-To: References: <3aa18c73086c9a875389e5421f1da0e4@ruby-forum.com> Message-ID: <36e7bbc45fbbd7e2d25bf8e57e307d93@ruby-forum.com> Michael Letterle wrote: > For some reason it seems to be passing it in as > > self.listBox1.Items.AddRange('a', 'b', 'c') > > Odd.. > > Regardless though, as a work around for now you can do this: > > ['a','b','c'].each {|item| self.listBox1.Items.Add item} > Unfortunately I can't do that ... I have to use AddRange because that's what the ListBox control + Form Designer generates. So I think I'm stuck :( Dermot -- Posted via http://www.ruby-forum.com/. From m.david at xmlhacker.com Fri Feb 8 20:35:28 2008 From: m.david at xmlhacker.com (M. David Peterson) Date: Fri, 08 Feb 2008 18:35:28 -0700 Subject: [Ironruby-core] Support For Referencing Ruby Libs As Embedded Resources? Message-ID: A recent inquiry on the Ruby.NET list brought up the question as to whether or not the ability to reference ruby libs as embedded resources is supported or will be supported via IronRuby. e.g., require 'res://assembly.dll/foo/bar' Yes/No/Maybe? Reasons For/Against/Agnostic? -- /M:D M. David Peterson Co-Founder & Chief Architect, 3rd&Urban, LLC Email: m.david at 3rdandUrban.com | m.david at amp.fm Mobile: (206) 418-9027 http://3rdandUrban.com | http://amp.fm | http://www.oreillynet.com/pub/au/2354 From jomes at microsoft.com Fri Feb 8 20:48:39 2008 From: jomes at microsoft.com (John Messerly) Date: Fri, 8 Feb 2008 17:48:39 -0800 Subject: [Ironruby-core] Support For Referencing Ruby Libs As Embedded Resources? In-Reply-To: References: Message-ID: <918705E903F4714CB713D89AB5F1857D73B41907B0@NA-EXMSG-C116.redmond.corp.microsoft.com> M. David Peterson: > A recent inquiry on the Ruby.NET list brought up the question as to > whether or not the ability to reference ruby libs as embedded resources > is supported or will be supported via IronRuby. e.g., > > require 'res://assembly.dll/foo/bar' > > Yes/No/Maybe? Reasons For/Against/Agnostic? Is the embedded resource a Ruby file or something else? What is the feature used for? - John From curt at hagenlocher.org Fri Feb 8 21:00:26 2008 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Fri, 8 Feb 2008 18:00:26 -0800 Subject: [Ironruby-core] Support For Referencing Ruby Libs As Embedded Resources? In-Reply-To: <918705E903F4714CB713D89AB5F1857D73B41907B0@NA-EXMSG-C116.redmond.corp.microsoft.com> References: <918705E903F4714CB713D89AB5F1857D73B41907B0@NA-EXMSG-C116.redmond.corp.microsoft.com> Message-ID: On Feb 8, 2008 5:48 PM, John Messerly wrote: > M. David Peterson: > > > A recent inquiry on the Ruby.NET list brought up the question as to > > whether or not the ability to reference ruby libs as embedded resources > > is supported or will be supported via IronRuby. e.g., > > > > require 'res://assembly.dll/foo/bar' > > Is the embedded resource a Ruby file or something else? > What is the feature used for? I imagine the idea is to make deployment more robust by putting the Ruby source somewhere that a user can't screw up. ;) At least, that's what *I'd* want it for... -- Curt Hagenlocher curt at hagenlocher.org From m.david at xmlhacker.com Fri Feb 8 21:06:36 2008 From: m.david at xmlhacker.com (M. David Peterson) Date: Fri, 08 Feb 2008 19:06:36 -0700 Subject: [Ironruby-core] Support For Referencing Ruby Libs As Embedded Resources? In-Reply-To: <918705E903F4714CB713D89AB5F1857D73B41907B0@NA-EXMSG-C116.redmond.corp.microsoft.com> References: <918705E903F4714CB713D89AB5F1857D73B41907B0@NA-EXMSG-C116.redmond.corp.microsoft.com> Message-ID: On Fri, 08 Feb 2008 18:48:39 -0700, John Messerly wrote: > Is the embedded resource a Ruby file or something else? Yes, a Ruby file. > What is the feature used for? Here's a copy of the pertinent pieces from the related thread on the Ruby.NET list. In short, for ease of redistribution of stdlib source files. On Fri, 08 Feb 2008 18:26:57 -0700, M. David Peterson wrote: > On Fri, 08 Feb 2008 13:33:47 -0700, chriso wrote: >> Is there a way to bundle any required libraries into the compiled >> dll? > > You could embed a source file into the assembly and then resolve that > file internally to your code base. However, I'm not sure if there is > any officially sanctioned way as of yet to reference embedded resources > (e.g. res://assemblyname.dll/foo), though this certainly seems like > something that needs to be both considered and discussed. > > A temporary hack[1,2] _could_ be used (though I wouldn't recommend this > for anything beyond experimentation) via creating an assembly who's only > purpose was to return requests for embedded resources to then evaluate > the returned Ruby.String, but this would only work for a small fraction > of use-cases in which the referenced stdlib didn't reference any other > stdlibs. In this regard there would need to be some way of indicating > to the Ruby.NET Runtime whether it should look for an embedded resource, > and if yes, where it should look. > > I would think that using the standard res://assemblyname.dll/foo/bar > would make the most sense. Anybody happen to have a sense as to how to > properly handle this? I'll make a post to the IronRuby list to see if > they plan to provide support for embedded resources, and if so, the > syntax they plan to use. > > > [1] C# ResourceManager which returns the Ruby.String for the referenced > embedded resource. > > using System; > using System.Resources; > using System.Text; > > namespace ResourceLib > { > public class RubyStdLib > { > static Encoding m_encoding = Encoding.UTF8; > static ResourceManager manager = > Properties.Resources.ResourceManager; > > public Ruby.String getStdLib(string stdLibName) > { > return new > Ruby.String(m_encoding.GetString((byte[])manager.GetObject(stdLibName))); > } > } > } > > [2] Modified Ruby > > require 'mscorlib.dll' > a_date = System::DateTime.new(2007, 1, 1) > puts a_date.AddYears(1).ToString() > puts 'Hello .net' > > input = %{\ > <% high.downto(low) do |n| # set high, low externally %> > <%= n %> green bottles, hanging on the wall > <%= n %> green bottles, hanging on the wall > And if one green bottle should accidentally fall > There'd be <%= n - 1 > %> green bottles, hanging on the wall > <% end %> > } > high,low = 10, 8 > > # Beware of the horrific hack just begging to be exploited that follows. > # Beyond loading the source file directly or using the taint method is > # there a better way to handle this that's not immediately obvious? > > require 'ResourceLib.dll' > rm = ResourceLib::RubyStdLib.new > erb = eval(rm.getStdLib('erb'))::ERB.new(input) > puts erb > bind = Kernel.binding > puts bind > puts erb.run(bind) > > puts 'Bye .net' > -- /M:D M. David Peterson Co-Founder & Chief Architect, 3rd&Urban, LLC Email: m.david at 3rdandUrban.com | m.david at amp.fm Mobile: (206) 418-9027 http://3rdandUrban.com | http://amp.fm | http://www.oreillynet.com/pub/au/2354 From m.david at xmlhacker.com Fri Feb 8 21:07:52 2008 From: m.david at xmlhacker.com (M. David Peterson) Date: Fri, 08 Feb 2008 19:07:52 -0700 Subject: [Ironruby-core] Support For Referencing Ruby Libs As Embedded Resources? In-Reply-To: References: <918705E903F4714CB713D89AB5F1857D73B41907B0@NA-EXMSG-C116.redmond.corp.microsoft.com> Message-ID: On Fri, 08 Feb 2008 19:00:26 -0700, Curt Hagenlocher wrote: > I imagine the idea is to make deployment more robust by putting the > Ruby source somewhere that a user can't screw up. Yup! > At least, that's what *I'd* want it for... You and I both, Curt! :D -- /M:D M. David Peterson Co-Founder & Chief Architect, 3rd&Urban, LLC Email: m.david at 3rdandUrban.com | m.david at amp.fm Mobile: (206) 418-9027 http://3rdandUrban.com | http://amp.fm | http://www.oreillynet.com/pub/au/2354 From jomes at microsoft.com Fri Feb 8 21:09:25 2008 From: jomes at microsoft.com (John Messerly) Date: Fri, 8 Feb 2008 18:09:25 -0800 Subject: [Ironruby-core] Support For Referencing Ruby Libs As Embedded Resources? In-Reply-To: References: <918705E903F4714CB713D89AB5F1857D73B41907B0@NA-EXMSG-C116.redmond.corp.microsoft.com> Message-ID: <918705E903F4714CB713D89AB5F1857D73B41907B5@NA-EXMSG-C116.redmond.corp.microsoft.com> Curt Hagenlocher: > On Feb 8, 2008 5:48 PM, John Messerly wrote: > > M. David Peterson: > > > > > A recent inquiry on the Ruby.NET list brought up the question as to > > > whether or not the ability to reference ruby libs as embedded > > > resources is supported or will be supported via IronRuby. e.g., > > > > > > require 'res://assembly.dll/foo/bar' > > > > Is the embedded resource a Ruby file or something else? > > What is the feature used for? > > I imagine the idea is to make deployment more robust by putting the > Ruby source somewhere that a user can't screw up. ;) > > At least, that's what *I'd* want it for... Right, but if you have a DLL already, you can just host IronRuby from C# and feed it Ruby code however you want to. I guess I'd be hesitant to change the meaning of "require". The way we have it now (require 'mscorlib') is nice because it's not changing the behavior. If you really wanted to you could write mscorlib.rb and run your code on another Ruby implementation. - John From m.david at xmlhacker.com Fri Feb 8 21:16:52 2008 From: m.david at xmlhacker.com (M. David Peterson) Date: Fri, 08 Feb 2008 19:16:52 -0700 Subject: [Ironruby-core] Support For Referencing Ruby Libs As Embedded Resources? In-Reply-To: <918705E903F4714CB713D89AB5F1857D73B41907B5@NA-EXMSG-C116.redmond.corp.microsoft.com> References: <918705E903F4714CB713D89AB5F1857D73B41907B0@NA-EXMSG-C116.redmond.corp.microsoft.com> <918705E903F4714CB713D89AB5F1857D73B41907B5@NA-EXMSG-C116.redmond.corp.microsoft.com> Message-ID: On Fri, 08 Feb 2008 19:09:25 -0700, John Messerly wrote: > Right, but if you have a DLL already, you can just host IronRuby from C# > and feed it Ruby code however you want to. True. So would that then be the prefered way to go about providing support? > I guess I'd be hesitant to change the meaning of "require". The way we > have it now (require 'mscorlib') is nice because it's not changing the > behavior. If you really wanted to you could write mscorlib.rb and run > your code on another Ruby implementation. Oh, I'm not suggesting changing the meaning, just adding a handler for the 'res' protocol that would locate the source file via an assembly rather than the file system. To me, anyway, I don't see any difference between what, require 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll' ... means and what, require 'res://assemblyname.dll/foo/bar' ... means, at least in regards to the fact that they both represent references to external libraries. -- /M:D M. David Peterson Co-Founder & Chief Architect, 3rd&Urban, LLC Email: m.david at 3rdandUrban.com | m.david at amp.fm Mobile: (206) 418-9027 http://3rdandUrban.com | http://amp.fm | http://www.oreillynet.com/pub/au/2354 From curt at hagenlocher.org Fri Feb 8 21:54:35 2008 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Fri, 8 Feb 2008 18:54:35 -0800 Subject: [Ironruby-core] Support For Referencing Ruby Libs As Embedded Resources? In-Reply-To: References: <918705E903F4714CB713D89AB5F1857D73B41907B0@NA-EXMSG-C116.redmond.corp.microsoft.com> <918705E903F4714CB713D89AB5F1857D73B41907B5@NA-EXMSG-C116.redmond.corp.microsoft.com> Message-ID: On Feb 8, 2008 6:16 PM, M. David Peterson wrote: > On Fri, 08 Feb 2008 19:09:25 -0700, John Messerly > wrote: > > > I guess I'd be hesitant to change the meaning of "require". The way we > > have it now (require 'mscorlib') is nice because it's not changing the > > behavior. If you really wanted to you could write mscorlib.rb and run > > your code on another Ruby implementation. > > Oh, I'm not suggesting changing the meaning, just adding a handler for the > 'res' protocol that would locate the source file via an assembly rather > than the file system. > After all, if urirequire can do this for "http:"... -- Curt Hagenlocher curt at hagenlocher.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20080208/71d92fec/attachment.html From michael.letterle at gmail.com Fri Feb 8 22:11:27 2008 From: michael.letterle at gmail.com (Michael Letterle) Date: Fri, 8 Feb 2008 22:11:27 -0500 Subject: [Ironruby-core] Support For Referencing Ruby Libs As Embedded Resources? In-Reply-To: References: <918705E903F4714CB713D89AB5F1857D73B41907B0@NA-EXMSG-C116.redmond.corp.microsoft.com> <918705E903F4714CB713D89AB5F1857D73B41907B5@NA-EXMSG-C116.redmond.corp.microsoft.com> Message-ID: I'd personally much rather see it done via something like urirequire (heck if it's that needed, someone can write resrequire ;) ) Though there is a debate in there about if require should handle URIs in general or not, I think it's one for Ruby in general to have... On Feb 8, 2008 9:54 PM, Curt Hagenlocher wrote: > > On Feb 8, 2008 6:16 PM, M. David Peterson wrote: > > > > > On Fri, 08 Feb 2008 19:09:25 -0700, John Messerly > > wrote: > > > > > > > > > I guess I'd be hesitant to change the meaning of "require". The way we > > > have it now (require 'mscorlib') is nice because it's not changing the > > > behavior. If you really wanted to you could write mscorlib.rb and run > > > your code on another Ruby implementation. > > > > Oh, I'm not suggesting changing the meaning, just adding a handler for the > > 'res' protocol that would locate the source file via an assembly rather > > than the file system. > > > After all, if urirequire can do this for "http:"... > > > -- > Curt Hagenlocher > curt at hagenlocher.org > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -- Michael Letterle [Polymath Programmer] http://michaeldotnet.blogspot.com From m.david at xmlhacker.com Fri Feb 8 22:35:01 2008 From: m.david at xmlhacker.com (M. David Peterson) Date: Fri, 08 Feb 2008 20:35:01 -0700 Subject: [Ironruby-core] Support For Referencing Ruby Libs As Embedded Resources? In-Reply-To: References: <918705E903F4714CB713D89AB5F1857D73B41907B0@NA-EXMSG-C116.redmond.corp.microsoft.com> <918705E903F4714CB713D89AB5F1857D73B41907B5@NA-EXMSG-C116.redmond.corp.microsoft.com> Message-ID: On Fri, 08 Feb 2008 20:11:27 -0700, Michael Letterle wrote: > heck if it's that needed, someone can write resrequire Assuming this would be seen as standard practice for implementing core language extensions, this would probably make the most sense, avoiding any compromise and ensuring that there's a simple escape hatch to fallback to require if the resrequire method isn't supported or if the requested embedded resource is unavailable. -- /M:D M. David Peterson Co-Founder & Chief Architect, 3rd&Urban, LLC Email: m.david at 3rdandUrban.com | m.david at amp.fm Mobile: (206) 418-9027 http://3rdandUrban.com | http://amp.fm | http://www.oreillynet.com/pub/au/2354 From michael.letterle at gmail.com Fri Feb 8 22:57:58 2008 From: michael.letterle at gmail.com (Michael Letterle) Date: Fri, 8 Feb 2008 22:57:58 -0500 Subject: [Ironruby-core] Support For Referencing Ruby Libs As Embedded Resources? In-Reply-To: References: <918705E903F4714CB713D89AB5F1857D73B41907B0@NA-EXMSG-C116.redmond.corp.microsoft.com> <918705E903F4714CB713D89AB5F1857D73B41907B5@NA-EXMSG-C116.redmond.corp.microsoft.com> Message-ID: My /personal/ view is that IronRuby should be Ruby first and .NET second. Anything that's done outside of "normal" behaviour should be implemented outside of the core implementation. I'd almost go as far as to say that the current method of loading .NET assemblies is pushing it, but that's an extreme view. So yes, if we're doing something specific to this platform it should be implemented ontop of the core language not in it. It would be up to the person writing the code that uses resrequire (or urirequire) to perform the graceful fallback. On Feb 8, 2008 10:35 PM, M. David Peterson wrote: > On Fri, 08 Feb 2008 20:11:27 -0700, Michael Letterle > wrote: > > > heck if it's that needed, someone can write resrequire > > Assuming this would be seen as standard practice for implementing core > language extensions, this would probably make the most sense, avoiding any > compromise and ensuring that there's a simple escape hatch to fallback to > require if the resrequire method isn't supported or if the requested > embedded resource is unavailable. > > -- > /M:D > > M. David Peterson > Co-Founder & Chief Architect, 3rd&Urban, LLC > Email: m.david at 3rdandUrban.com | m.david at amp.fm > Mobile: (206) 418-9027 > http://3rdandUrban.com | http://amp.fm | > http://www.oreillynet.com/pub/au/2354 > _______________________________________________ > > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -- Michael Letterle [Polymath Programmer] http://michaeldotnet.blogspot.com From m.david at xmlhacker.com Sat Feb 9 00:45:12 2008 From: m.david at xmlhacker.com (M. David Peterson) Date: Fri, 08 Feb 2008 22:45:12 -0700 Subject: [Ironruby-core] Support For Referencing Ruby Libs As Embedded Resources? In-Reply-To: References: <918705E903F4714CB713D89AB5F1857D73B41907B0@NA-EXMSG-C116.redmond.corp.microsoft.com> <918705E903F4714CB713D89AB5F1857D73B41907B5@NA-EXMSG-C116.redmond.corp.microsoft.com> Message-ID: On Fri, 08 Feb 2008 20:57:58 -0700, Michael Letterle wrote: > So yes, if we're doing something specific to this platform it should > be implemented ontop of the core language not in it. It would be up > to the person writing the code that uses resrequire (or urirequire) to > perform the graceful fallback. That makes complete sense and I can't help but agree. :) -- /M:D M. David Peterson Co-Founder & Chief Architect, 3rd&Urban, LLC Email: m.david at 3rdandUrban.com | m.david at amp.fm Mobile: (206) 418-9027 http://3rdandUrban.com | http://amp.fm | http://www.oreillynet.com/pub/au/2354 From raskovic at interfree.it Sat Feb 9 06:34:31 2008 From: raskovic at interfree.it (ras) Date: Sat, 9 Feb 2008 12:34:31 +0100 Subject: [Ironruby-core] Problem with ironruby on mono Message-ID: <20080209123431.c9eb5837.raskovic@interfree.it> Hi all, I've successfully compiled (with rake compile mono=1) IronRuby under Linux with Mono but whe I try to execute some code I get a strange behaviour, for example: $ mono rbx.exe 0.1 Copyright (c) Microsoft Corporation. All rights reserved. >>> a = 1 => 1 >>> puts a unknown: undefined local variable or method `a' for main:Object (NoMethodError) >>> b = a + 1 unknown: undefined local variable or method `a' for main:Object (NoMethodError) >>> a.class unknown: undefined local variable or method `a' for main:Object (NoMethodError) >>> and so on... where's the problem? some info: $ mono -V Mono JIT compiler version 1.9 (/trunk/ r95320) Copyright (C) 2002-2007 Novell, Inc and Contributors. www.mono-project.com TLS: __thread GC: Included Boehm (with typed GC) SIGSEGV: altstack Notifications: epoll Architecture: x86 Disabled: none $ mono rbx.exe -V IronRuby 0.1 on .NET 2.0.0.0 TIA, ras From sanxiyn at gmail.com Sat Feb 9 06:47:23 2008 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Sat, 9 Feb 2008 20:47:23 +0900 Subject: [Ironruby-core] Problem with ironruby on mono In-Reply-To: <20080209123431.c9eb5837.raskovic@interfree.it> References: <20080209123431.c9eb5837.raskovic@interfree.it> Message-ID: <5b0248170802090347w583e0d4cp79cfda65803e7b88@mail.gmail.com> 2008/2/9, ras : > >>> a = 1 > => 1 > >>> puts a > unknown: undefined local variable or method `a' for main:Object (NoMethodError) This is a known IronRuby problem and unrelated to Mono. -- Seo Sanghyeon From michael.letterle at gmail.com Sat Feb 9 07:10:32 2008 From: michael.letterle at gmail.com (Michael Letterle) Date: Sat, 9 Feb 2008 07:10:32 -0500 Subject: [Ironruby-core] Problem with ironruby on mono In-Reply-To: <5b0248170802090347w583e0d4cp79cfda65803e7b88@mail.gmail.com> References: <20080209123431.c9eb5837.raskovic@interfree.it> <5b0248170802090347w583e0d4cp79cfda65803e7b88@mail.gmail.com> Message-ID: To be specific, local variables are not supported interactively, use global or instance variables. Really need to get that disclaimer compiled in.... On Feb 9, 2008 6:47 AM, Sanghyeon Seo wrote: > 2008/2/9, ras : > > >>> a = 1 > > => 1 > > >>> puts a > > unknown: undefined local variable or method `a' for main:Object (NoMethodError) > > This is a known IronRuby problem and unrelated to Mono. > > -- > Seo Sanghyeon > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -- Michael Letterle [Polymath Programmer] http://michaeldotnet.blogspot.com From michael.letterle at gmail.com Sat Feb 9 08:00:13 2008 From: michael.letterle at gmail.com (Michael Letterle) Date: Sat, 9 Feb 2008 08:00:13 -0500 Subject: [Ironruby-core] Support For Referencing Ruby Libs As Embedded Resources? In-Reply-To: References: <918705E903F4714CB713D89AB5F1857D73B41907B0@NA-EXMSG-C116.redmond.corp.microsoft.com> <918705E903F4714CB713D89AB5F1857D73B41907B5@NA-EXMSG-C116.redmond.corp.microsoft.com> Message-ID: For what it's worth, this /is/ possible today: require 'mscorlib' def resrequire(assembly, resource) assem = System::Reflection::Assembly.LoadFile assembly stream = assem.GetManifestResourceStream(resource) streamreader = System::IO::StreamReader.new stream filetext = streamreader.ReadToEnd file = File.new resource, 'w' file.write filetext file.close require resource File.delete resource end I think I'd rather use eval then create a file, but we don't have that yet ;) On Feb 9, 2008 12:45 AM, M. David Peterson wrote: > On Fri, 08 Feb 2008 20:57:58 -0700, Michael Letterle > wrote: > > > So yes, if we're doing something specific to this platform it should > > be implemented ontop of the core language not in it. It would be up > > to the person writing the code that uses resrequire (or urirequire) to > > perform the graceful fallback. > > That makes complete sense and I can't help but agree. :) > > -- > > /M:D > > M. David Peterson > Co-Founder & Chief Architect, 3rd&Urban, LLC > Email: m.david at 3rdandUrban.com | m.david at amp.fm > Mobile: (206) 418-9027 > http://3rdandUrban.com | http://amp.fm | > http://www.oreillynet.com/pub/au/2354 > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -- Michael Letterle [Polymath Programmer] http://michaeldotnet.blogspot.com From lists at ruby-forum.com Sat Feb 9 13:42:40 2008 From: lists at ruby-forum.com (Dermot Hogan) Date: Sat, 9 Feb 2008 19:42:40 +0100 Subject: [Ironruby-core] Getting the .NET type of an IronRuby class Message-ID: <84a0adebeea7b594e7ee9ceb33bffd1c@ruby-forum.com> Is there a simple way of getting the .NET type of an IronRuby class? I have this code: resources = System::ComponentModel::ComponentResourceManager.new(X.class) where X is a class. But this doesn't do it - I get a run time exception. Any ideas? Dermot -- Posted via http://www.ruby-forum.com/. From michael.letterle at gmail.com Sat Feb 9 14:09:28 2008 From: michael.letterle at gmail.com (Michael Letterle) Date: Sat, 9 Feb 2008 14:09:28 -0500 Subject: [Ironruby-core] Getting the .NET type of an IronRuby class In-Reply-To: <84a0adebeea7b594e7ee9ceb33bffd1c@ruby-forum.com> References: <84a0adebeea7b594e7ee9ceb33bffd1c@ruby-forum.com> Message-ID: resources = System::ComponentModel::ComponentResoruceManager.new( X.GetType) or if you'd rather: require 'mscorlib' def typeof(object) System::Type.GetTypeFromHandle(System::Type.GetTypeHandle(object)) end On Feb 9, 2008 1:42 PM, Dermot Hogan wrote: > Is there a simple way of getting the .NET type of an IronRuby class? > > I have this code: > > resources = > System::ComponentModel::ComponentResourceManager.new(X.class) > > where X is a class. But this doesn't do it - I get a run time exception. > > > Any ideas? > > Dermot > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -- Michael Letterle [Polymath Programmer] http://michaeldotnet.blogspot.com From ivan at flanders.co.nz Sat Feb 9 14:20:43 2008 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Sun, 10 Feb 2008 08:20:43 +1300 Subject: [Ironruby-core] What will happen with WCF Message-ID: Hi Will there be support for WCF in IronRuby or is the proposed way going to be to generate a proxy in C# or something and use that proxy? And writing WCF services should that then happen through subclassing a c# shim? Thanks Ivan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20080210/285b3b2d/attachment.html From lists at ruby-forum.com Sat Feb 9 15:09:50 2008 From: lists at ruby-forum.com (Dermot Hogan) Date: Sat, 9 Feb 2008 21:09:50 +0100 Subject: [Ironruby-core] Getting the .NET type of an IronRuby class In-Reply-To: References: <84a0adebeea7b594e7ee9ceb33bffd1c@ruby-forum.com> Message-ID: Michael Letterle wrote: > resources = System::ComponentModel::ComponentResoruceManager.new( > X.GetType) > Thanks! Yes, it's obvious: I think I've got trouble switching beteen thinking in Ruby and thinking in .NET ... Dermot -- Posted via http://www.ruby-forum.com/. From robert.brotherus at napa.fi Mon Feb 11 09:17:09 2008 From: robert.brotherus at napa.fi (Robert Brotherus) Date: Mon, 11 Feb 2008 16:17:09 +0200 Subject: [Ironruby-core] IronXXX for custom WPF-components in XAML References: <84a0adebeea7b594e7ee9ceb33bffd1c@ruby-forum.com> Message-ID: <53194650933664488F3F0C3A0AB56832060278@nw60.napa.fi> We are evaluating IronRuby and/or IronPython to use as event handling script language in a WPF / XAML GUI project. Our current XAML / C# design has the regular VS2008 -generated logic of creating custom class (and enbedded BAML) for each XAML-file. We also use heavily custom controls to build up larger panels / windows: MyControl.xaml: ... Window1.xaml: ... ... ... While I have been able to attach event handlers defined in IronPython 2.0 to the various GUI classes, I would find it more natural if I could derive classes in Ruby from the corresponding CLR-classes: class MyControlRuby < MyControl def Clicked(sender, args) ... end However, I suspect that re-using such classes on the XAML-side would not work: ... ... ... Can someone confirm or deny my assumption about XAML being not-so-DLR-language-friendly here as I suppose? Might this approach have better changes of success if I would use IronPython 1.1 that can supposedly compile Python classes to CLR classes? Robert Brotherus Software architect Napa Ltd Tammasaarenkatu 3, Helsinki FI-00180 P.O.Box 470, Helsinki FI-00181 Tel. +358 9 22 813 1 Direct. +358 9 22 813 611 GSM +358 45 11 456 02 Fax. +358 9 22 813 800 Email: Robert.Brotherus at napa.fi www.napa.fi From lists at ruby-forum.com Tue Feb 12 07:08:51 2008 From: lists at ruby-forum.com (Huw Collingbourne) Date: Tue, 12 Feb 2008 13:08:51 +0100 Subject: [Ironruby-core] IronRuby Visual Design Environment Message-ID: I've just posted an article about the latest version of our IronRuby IDE... http://www.sapphiresteel.com/IronRuby-Developments-the-Visual We'll be releasing this in alpha to our users shortly. best wishes Huw SapphireSteel Software Ruby and Rails In Visual Studio http://www.sapphiresteel.com -- Posted via http://www.ruby-forum.com/. From michael.letterle at gmail.com Tue Feb 12 08:27:13 2008 From: michael.letterle at gmail.com (Michael Letterle) Date: Tue, 12 Feb 2008 08:27:13 -0500 Subject: [Ironruby-core] What Editor? Message-ID: Just curious what editors people are using to write IronRuby code in? Right now I'm using Emacs... -- Michael Letterle [Polymath Programmer] http://michaeldotnet.blogspot.com From thibaut.barrere at gmail.com Tue Feb 12 08:31:40 2008 From: thibaut.barrere at gmail.com (=?ISO-8859-1?Q?Thibaut_Barr=E8re?=) Date: Tue, 12 Feb 2008 14:31:40 +0100 Subject: [Ironruby-core] What Editor? In-Reply-To: References: Message-ID: <4a68b8cf0802120531q1e78ce06le60f989abe288eaf@mail.gmail.com> Hi, I'm using TextMate (mac) and Notepad++ (pc) so far. Thibaut Barr?re -- LoGeek http://blog.logeek.fr - about writing software http://evolvingworker.com - tools for a better day From robert.brotherus at napa.fi Tue Feb 12 08:35:35 2008 From: robert.brotherus at napa.fi (Robert Brotherus) Date: Tue, 12 Feb 2008 15:35:35 +0200 Subject: [Ironruby-core] What Editor? References: Message-ID: <53194650933664488F3F0C3A0AB5683206030D@nw60.napa.fi> Scite Robert Brotherus Software architect Napa Ltd Tammasaarenkatu 3, Helsinki FI-00180 P.O.Box 470, Helsinki FI-00181 Tel. +358 9 22 813 1 Direct. +358 9 22 813 611 GSM +358 45 11 456 02 Fax. +358 9 22 813 800 Email: Robert.Brotherus at napa.fi www.napa.fi -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Michael Letterle Sent: 12. helmikuuta 2008 15:27 To: ironruby-core at rubyforge.org Subject: [Ironruby-core] What Editor? Just curious what editors people are using to write IronRuby code in? Right now I'm using Emacs... -- Michael Letterle [Polymath Programmer] http://michaeldotnet.blogspot.com _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From tomas at winterdom.com Tue Feb 12 08:40:24 2008 From: tomas at winterdom.com (Tomas Restrepo) Date: Tue, 12 Feb 2008 08:40:24 -0500 Subject: [Ironruby-core] What Editor? In-Reply-To: References: Message-ID: > Just curious what editors people are using to write IronRuby code in? > Right now I'm using Emacs... Why, Vim of course :) -- Tomas Restrepo http://www.winterdom.com/weblog/ From m.david at xmlhacker.com Tue Feb 12 08:42:27 2008 From: m.david at xmlhacker.com (M. David Peterson) Date: Tue, 12 Feb 2008 06:42:27 -0700 Subject: [Ironruby-core] What Editor? In-Reply-To: References: Message-ID: On Tue, 12 Feb 2008 06:27:13 -0700, Michael Letterle wrote: > Right now I'm using Emacs... Vi+Emacs+jEdit for IronRuby (depends on the machine I'm on at the time) Vi+Emacs+jEdit+VS.NET for Ruby.NET (same reason as above) One area that has always interested me since the day I became aware of WPFe was the development of an in browser editing tool. Jim Hugunin's Mix07 demo highlights just how much can be accomplished in a small space of time, and Fuzzyman (Michael Foord) has another example @ http://www.voidspace.org.uk/ironpython/silverlight/index.shtml#the-web-ide -- /M:D M. David Peterson Co-Founder & Chief Architect, 3rd&Urban, LLC Email: m.david at 3rdandUrban.com | m.david at amp.fm Mobile: (206) 418-9027 http://3rdandUrban.com | http://amp.fm | http://www.oreillynet.com/pub/au/2354 From m.david at xmlhacker.com Tue Feb 12 08:43:49 2008 From: m.david at xmlhacker.com (M. David Peterson) Date: Tue, 12 Feb 2008 06:43:49 -0700 Subject: [Ironruby-core] What Editor? In-Reply-To: <4a68b8cf0802120531q1e78ce06le60f989abe288eaf@mail.gmail.com> References: <4a68b8cf0802120531q1e78ce06le60f989abe288eaf@mail.gmail.com> Message-ID: On Tue, 12 Feb 2008 06:31:40 -0700, Thibaut Barr?re wrote: > I'm using TextMate Ooops! Forgot about TextMate, yet another editor I will use from time-to-time, and increasingly so over the last few months. -- /M:D M. David Peterson Co-Founder & Chief Architect, 3rd&Urban, LLC Email: m.david at 3rdandUrban.com | m.david at amp.fm Mobile: (206) 418-9027 http://3rdandUrban.com | http://amp.fm | http://www.oreillynet.com/pub/au/2354 From m.david at xmlhacker.com Tue Feb 12 08:47:00 2008 From: m.david at xmlhacker.com (M. David Peterson) Date: Tue, 12 Feb 2008 06:47:00 -0700 Subject: [Ironruby-core] What Editor? In-Reply-To: <4a68b8cf0802120531q1e78ce06le60f989abe288eaf@mail.gmail.com> References: <4a68b8cf0802120531q1e78ce06le60f989abe288eaf@mail.gmail.com> Message-ID: On Tue, 12 Feb 2008 06:31:40 -0700, Thibaut Barr?re wrote: > I'm using TextMate BTW... For those unaware > http://www.e-texteditor.com/ < which is a port of TextMate to Windows. Requires cygwin (though it will install it for you during the setup process.) -- /M:D M. David Peterson Co-Founder & Chief Architect, 3rd&Urban, LLC Email: m.david at 3rdandUrban.com | m.david at amp.fm Mobile: (206) 418-9027 http://3rdandUrban.com | http://amp.fm | http://www.oreillynet.com/pub/au/2354 From enicholson at gmail.com Tue Feb 12 08:47:25 2008 From: enicholson at gmail.com (Eric Nicholson) Date: Tue, 12 Feb 2008 08:47:25 -0500 Subject: [Ironruby-core] What Editor? In-Reply-To: References: Message-ID: Notepad++ & occasionally VS.NET with the Ruby coloring support from Ruby.NET. I used to tolerate VIM & love Emacs back in my *nix days, but in a windows shop where I spend most of my time in VS.NET, Gmail, and pairing on other people's systems it's just too much cognitive dissonance to switch between them. The one thing I'm really missing is passable RegEx support. VS.Net has that crazy syntax that crashes all the time & N++ doesn't support multiline. One of these days... -Eric On Feb 12, 2008 8:27 AM, Michael Letterle wrote: > Just curious what editors people are using to write IronRuby code in? > Right now I'm using Emacs... > > -- > Michael Letterle > [Polymath Programmer] > http://michaeldotnet.blogspot.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/20080212/62cad5f8/attachment.html From tranqy at gmail.com Tue Feb 12 08:52:56 2008 From: tranqy at gmail.com (Aaron Junod) Date: Tue, 12 Feb 2008 08:52:56 -0500 Subject: [Ironruby-core] What Editor? In-Reply-To: References: <4a68b8cf0802120531q1e78ce06le60f989abe288eaf@mail.gmail.com> Message-ID: Textmate, Ruby In Steel, vi, and looking to use netbeans more. On Feb 12, 2008 8:43 AM, M. David Peterson wrote: > On Tue, 12 Feb 2008 06:31:40 -0700, Thibaut Barr?re > wrote: > > > I'm using TextMate > > Ooops! Forgot about TextMate, yet another editor I will use from > time-to-time, and increasingly so over the last few months. > > -- > /M:D > > M. David Peterson > Co-Founder & Chief Architect, 3rd&Urban, LLC > Email: m.david at 3rdandUrban.com | m.david at amp.fm > Mobile: (206) 418-9027 > http://3rdandUrban.com | http://amp.fm | > http://www.oreillynet.com/pub/au/2354 > _______________________________________________ > 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/20080212/38dffd66/attachment.html From soapthgr8 at gmail.com Tue Feb 12 09:14:59 2008 From: soapthgr8 at gmail.com (Tom Walker) Date: Tue, 12 Feb 2008 09:14:59 -0500 Subject: [Ironruby-core] What Editor? In-Reply-To: References: <4a68b8cf0802120531q1e78ce06le60f989abe288eaf@mail.gmail.com> Message-ID: <7903d7f0802120614u7c7bb04ahe17bea30edf271c@mail.gmail.com> For quick work - HTML-Kit (www.html-kit.com) and Notepad++ If it's loaded up VS.NET Tom Walker On Feb 12, 2008 8:52 AM, Aaron Junod wrote: > Textmate, Ruby In Steel, vi, and looking to use netbeans more. > > > On Feb 12, 2008 8:43 AM, M. David Peterson wrote: > > > On Tue, 12 Feb 2008 06:31:40 -0700, Thibaut Barr?re > > wrote: > > > > > I'm using TextMate > > > > Ooops! Forgot about TextMate, yet another editor I will use from > > time-to-time, and increasingly so over the last few months. > > > > -- > > /M:D > > > > M. David Peterson > > Co-Founder & Chief Architect, 3rd&Urban, LLC > > Email: m.david at 3rdandUrban.com | m.david at amp.fm > > Mobile: (206) 418-9027 > > http://3rdandUrban.com | http://amp.fm | > > http://www.oreillynet.com/pub/au/2354 > > _______________________________________________ > > 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: http://rubyforge.org/pipermail/ironruby-core/attachments/20080212/9a7dd373/attachment.html From slavof at gmail.com Tue Feb 12 13:42:03 2008 From: slavof at gmail.com (Slavo Furman) Date: Tue, 12 Feb 2008 19:42:03 +0100 Subject: [Ironruby-core] What Editor? In-Reply-To: References: <4a68b8cf0802120531q1e78ce06le60f989abe288eaf@mail.gmail.com> Message-ID: <24e27e560802121042r79e187ffw925223a7cceab4fc@mail.gmail.com> Hi! I actually use another very nice "TextMate"-like windows editor is InType ( http://intype.info/ ). thanks, Slavo. On Feb 12, 2008 2:47 PM, M. David Peterson wrote: > On Tue, 12 Feb 2008 06:31:40 -0700, Thibaut Barr?re > wrote: > > > I'm using TextMate > > BTW... For those unaware > http://www.e-texteditor.com/ < which is a port > of TextMate to Windows. Requires cygwin (though it will install it for > you during the setup process.) > > -- > /M:D > > M. David Peterson > Co-Founder & Chief Architect, 3rd&Urban, LLC > Email: m.david at 3rdandUrban.com | m.david at amp.fm > Mobile: (206) 418-9027 > http://3rdandUrban.com | http://amp.fm | > http://www.oreillynet.com/pub/au/2354 > _______________________________________________ > 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/20080212/2835c073/attachment.html From ivan at flanders.co.nz Tue Feb 12 13:56:31 2008 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Wed, 13 Feb 2008 07:56:31 +1300 Subject: [Ironruby-core] What Editor? In-Reply-To: <24e27e560802121042r79e187ffw925223a7cceab4fc@mail.gmail.com> References: <4a68b8cf0802120531q1e78ce06le60f989abe288eaf@mail.gmail.com> <24e27e560802121042r79e187ffw925223a7cceab4fc@mail.gmail.com> Message-ID: On windows either ruby in steel or Netbeans 6.0 where netbeans has a slight advantage at the moment. Or I use e-texteditor which is a textmate port to windows for really simple things. On OSX I use textmate which is what I'm using most of the time. On Feb 13, 2008 7:42 AM, Slavo Furman wrote: > Hi! > > I actually use another very nice "TextMate"-like windows editor is InType > (http://intype.info/ ). > > thanks, > Slavo. > > > On Feb 12, 2008 2:47 PM, M. David Peterson wrote: > > > On Tue, 12 Feb 2008 06:31:40 -0700, Thibaut Barr?re > > wrote: > > > > > I'm using TextMate > > > > BTW... For those unaware > http://www.e-texteditor.com/ < which is a > > port > > of TextMate to Windows. Requires cygwin (though it will install it for > > you during the setup process.) > > > > -- > > /M:D > > > > M. David Peterson > > Co-Founder & Chief Architect, 3rd&Urban, LLC > > Email: m.david at 3rdandUrban.com | m.david at amp.fm > > Mobile: (206) 418-9027 > > http://3rdandUrban.com | http://amp.fm | > > http://www.oreillynet.com/pub/au/2354 > > _______________________________________________ > > 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: http://rubyforge.org/pipermail/ironruby-core/attachments/20080213/2cd3681e/attachment-0001.html From jflam at microsoft.com Tue Feb 12 15:32:15 2008 From: jflam at microsoft.com (John Lam (DLR)) Date: Tue, 12 Feb 2008 12:32:15 -0800 Subject: [Ironruby-core] IronRuby Visual Design Environment In-Reply-To: References: Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D900296C7@NA-EXMSG-C115.redmond.corp.microsoft.com> Huw Collingbourne: > I've just posted an article about the latest version of our IronRuby > IDE... > > http://www.sapphiresteel.com/IronRuby-Developments-the-Visual > > We'll be releasing this in alpha to our users shortly. Looks great! Yes, we still need to fix that event bug. It's in the queue :) -John From michael.letterle at gmail.com Tue Feb 12 15:41:43 2008 From: michael.letterle at gmail.com (Michael Letterle) Date: Tue, 12 Feb 2008 15:41:43 -0500 Subject: [Ironruby-core] IronRuby Visual Design Environment In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D900296C7@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <372109E149E8084D8E6C7D9CFD82E0632D900296C7@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: I submitted a patch over at RubyForge actually ;) On Feb 12, 2008 3:32 PM, John Lam (DLR) wrote: > Huw Collingbourne: > > > I've just posted an article about the latest version of our IronRuby > > IDE... > > > > http://www.sapphiresteel.com/IronRuby-Developments-the-Visual > > > > We'll be releasing this in alpha to our users shortly. > > Looks great! > > Yes, we still need to fix that event bug. It's in the queue :) > > -John > > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -- Michael Letterle [Polymath Programmer] http://michaeldotnet.blogspot.com From jflam at microsoft.com Tue Feb 12 15:45:16 2008 From: jflam at microsoft.com (John Lam (DLR)) Date: Tue, 12 Feb 2008 12:45:16 -0800 Subject: [Ironruby-core] IronRuby Visual Design Environment In-Reply-To: References: <372109E149E8084D8E6C7D9CFD82E0632D900296C7@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D900296DE@NA-EXMSG-C115.redmond.corp.microsoft.com> Michael Letterle: > I submitted a patch over at RubyForge actually ;) Yep. I know. It's now in tomat's queue to review ... :) Nudge nudge ... -John From coreyhaines at gmail.com Tue Feb 12 18:07:31 2008 From: coreyhaines at gmail.com (Corey Haines) Date: Tue, 12 Feb 2008 18:07:31 -0500 Subject: [Ironruby-core] What Editor? In-Reply-To: References: <4a68b8cf0802120531q1e78ce06le60f989abe288eaf@mail.gmail.com> <24e27e560802121042r79e187ffw925223a7cceab4fc@mail.gmail.com> Message-ID: <6bdacb70802121507j738db270k29ee488ce79fcd39@mail.gmail.com> Ivan, I have a question. If you use textmate on OSX, why did you choose to use ruby in steel or netbeans on windows instead of e? Do you find them better? -Corey On Feb 12, 2008 1:56 PM, Ivan Porto Carrero wrote: > On windows either ruby in steel or Netbeans 6.0 where netbeans has a > slight advantage at the moment. Or I use e-texteditor which is a textmate > port to windows for really simple things. > > On OSX I use textmate which is what I'm using most of the time. > > > On Feb 13, 2008 7:42 AM, Slavo Furman wrote: > > > Hi! > > > > I actually use another very nice "TextMate"-like windows editor is > > InType (http://intype.info/ ). > > > > thanks, > > Slavo. > > > > > > On Feb 12, 2008 2:47 PM, M. David Peterson > > wrote: > > > > > On Tue, 12 Feb 2008 06:31:40 -0700, Thibaut Barr?re > > > wrote: > > > > > > > I'm using TextMate > > > > > > BTW... For those unaware > http://www.e-texteditor.com/ < which is a > > > port > > > of TextMate to Windows. Requires cygwin (though it will install it > > > for > > > you during the setup process.) > > > > > > -- > > > /M:D > > > > > > M. David Peterson > > > Co-Founder & Chief Architect, 3rd&Urban, LLC > > > Email: m.david at 3rdandUrban.com | m.david at amp.fm > > > Mobile: (206) 418-9027 > > > http://3rdandUrban.com | http://amp.fm | > > > http://www.oreillynet.com/pub/au/2354 > > > _______________________________________________ > > > Ironruby-core mailing list > > > Ironruby-core at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > > > > > > _______________________________________________ > > Ironruby-core mailing list > > Ironruby-core at rubyforge.org > > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -- http://www.coreyhaines.com The Internet's Premiere source of information about Corey Haines -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20080212/e44b5622/attachment.html From ivan at flanders.co.nz Tue Feb 12 19:03:12 2008 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Wed, 13 Feb 2008 13:03:12 +1300 Subject: [Ironruby-core] What Editor? In-Reply-To: <6bdacb70802121507j738db270k29ee488ce79fcd39@mail.gmail.com> References: <4a68b8cf0802120531q1e78ce06le60f989abe288eaf@mail.gmail.com> <24e27e560802121042r79e187ffw925223a7cceab4fc@mail.gmail.com> <6bdacb70802121507j738db270k29ee488ce79fcd39@mail.gmail.com> Message-ID: I have used e-editor but had trouble connecting to mysql and started using netbeans instead after a friend of mine recommended it for doing rails on windows. I like it when I have simple things to do or to browse ruby code. I use netbeans mostly because their autocomplete gets it right most often. In meantime I got a macbook and textmate. And the more I use textmate the more I'm liking it. I was very reluctant against not having some sort of autocomplete function, that reluctance has somewhat faded because most of what I need can be provided by hitting the esc key once or twice in textmate. On Feb 13, 2008 12:07 PM, Corey Haines wrote: > Ivan, > > I have a question. If you use textmate on OSX, why did you choose to use > ruby in steel or netbeans on windows instead of e? Do you find them better? > > -Corey > > On Feb 12, 2008 1:56 PM, Ivan Porto Carrero wrote: > > > On windows either ruby in steel or Netbeans 6.0 where netbeans has a > > slight advantage at the moment. Or I use e-texteditor which is a textmate > > port to windows for really simple things. > > > > On OSX I use textmate which is what I'm using most of the time. > > > > > > On Feb 13, 2008 7:42 AM, Slavo Furman wrote: > > > > > Hi! > > > > > > I actually use another very nice "TextMate"-like windows editor is > > > InType (http://intype.info/ ). > > > > > > thanks, > > > Slavo. > > > > > > > > > On Feb 12, 2008 2:47 PM, M. David Peterson > > > wrote: > > > > > > > On Tue, 12 Feb 2008 06:31:40 -0700, Thibaut Barr?re > > > > wrote: > > > > > > > > > I'm using TextMate > > > > > > > > BTW... For those unaware > http://www.e-texteditor.com/ < which is a > > > > port > > > > of TextMate to Windows. Requires cygwin (though it will install it > > > > for > > > > you during the setup process.) > > > > > > > > -- > > > > /M:D > > > > > > > > M. David Peterson > > > > Co-Founder & Chief Architect, 3rd&Urban, LLC > > > > Email: m.david at 3rdandUrban.com | m.david at amp.fm > > > > Mobile: (206) 418-9027 > > > > http://3rdandUrban.com | http://amp.fm | > > > > http://www.oreillynet.com/pub/au/2354 > > > > _______________________________________________ > > > > Ironruby-core mailing list > > > > Ironruby-core at rubyforge.org > > > > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > > > > > > > > > > _______________________________________________ > > > Ironruby-core mailing list > > > Ironruby-core at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > > > > > > > _______________________________________________ > > Ironruby-core mailing list > > Ironruby-core at rubyforge.org > > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > > > > -- > http://www.coreyhaines.com > The Internet's Premiere source of information about Corey Haines > _______________________________________________ > 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/20080213/dccb20db/attachment.html From coreyhaines at gmail.com Tue Feb 12 20:03:43 2008 From: coreyhaines at gmail.com (Corey Haines) Date: Tue, 12 Feb 2008 20:03:43 -0500 Subject: [Ironruby-core] What Editor? In-Reply-To: References: <4a68b8cf0802120531q1e78ce06le60f989abe288eaf@mail.gmail.com> <24e27e560802121042r79e187ffw925223a7cceab4fc@mail.gmail.com> <6bdacb70802121507j738db270k29ee488ce79fcd39@mail.gmail.com> Message-ID: <6bdacb70802121703waf95472s55c8291d35a835c8@mail.gmail.com> That sounds about like the experiences I hear. Personally, I don't really miss auto-complete too much in Ruby (I'm coming from C#, where Intellicrack is my life blood). I am currently using Aptana, but I'm going to switch over and really focus on trying e, to get a sense of it. I'm mostly looking forward to the Ruby bundles for Textmate. -Corey On Feb 12, 2008 7:03 PM, Ivan Porto Carrero wrote: > > I have used e-editor but had trouble connecting to mysql and started using > netbeans instead after a friend of mine recommended it for doing rails on > windows. I like it when I have simple things to do or to browse ruby code. > I use netbeans mostly because their autocomplete gets it right most often. > > In meantime I got a macbook and textmate. And the more I use textmate the > more I'm liking it. I was very reluctant against not having some sort of > autocomplete function, that reluctance has somewhat faded because most of > what I need can be provided by hitting the esc key once or twice in > textmate. > > > > > On Feb 13, 2008 12:07 PM, Corey Haines wrote: > > > Ivan, > > > > I have a question. If you use textmate on OSX, why did you choose to use > > ruby in steel or netbeans on windows instead of e? Do you find them better? > > > > -Corey > > > > On Feb 12, 2008 1:56 PM, Ivan Porto Carrero wrote: > > > > > On windows either ruby in steel or Netbeans 6.0 where netbeans has a > > > slight advantage at the moment. Or I use e-texteditor which is a textmate > > > port to windows for really simple things. > > > > > > On OSX I use textmate which is what I'm using most of the time. > > > > > > > > > On Feb 13, 2008 7:42 AM, Slavo Furman wrote: > > > > > > > Hi! > > > > > > > > I actually use another very nice "TextMate"-like windows editor is > > > > InType (http://intype.info/ ). > > > > > > > > thanks, > > > > Slavo. > > > > > > > > > > > > On Feb 12, 2008 2:47 PM, M. David Peterson > > > > wrote: > > > > > > > > > On Tue, 12 Feb 2008 06:31:40 -0700, Thibaut Barr?re > > > > > wrote: > > > > > > > > > > > I'm using TextMate > > > > > > > > > > BTW... For those unaware > http://www.e-texteditor.com/ < which is > > > > > a port > > > > > of TextMate to Windows. Requires cygwin (though it will install > > > > > it for > > > > > you during the setup process.) > > > > > > > > > > -- > > > > > /M:D > > > > > > > > > > M. David Peterson > > > > > Co-Founder & Chief Architect, 3rd&Urban, LLC > > > > > Email: m.david at 3rdandUrban.com | m.david at amp.fm > > > > > Mobile: (206) 418-9027 > > > > > http://3rdandUrban.com | http://amp.fm | > > > > > http://www.oreillynet.com/pub/au/2354 > > > > > _______________________________________________ > > > > > Ironruby-core mailing list > > > > > Ironruby-core at rubyforge.org > > > > > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > > > > > > > > > > > > > > _______________________________________________ > > > > Ironruby-core mailing list > > > > Ironruby-core at rubyforge.org > > > > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > > > > > > > > > > > _______________________________________________ > > > Ironruby-core mailing list > > > Ironruby-core at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > > > > > > > > > -- > > http://www.coreyhaines.com > > The Internet's Premiere source of information about Corey Haines > > _______________________________________________ > > 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 > > -- http://www.coreyhaines.com The Internet's Premiere source of information about Corey Haines -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20080212/ce202263/attachment-0001.html From info at counterforensics.net Tue Feb 12 22:49:50 2008 From: info at counterforensics.net (Michael F Graham) Date: Tue, 12 Feb 2008 19:49:50 -0800 Subject: [Ironruby-core] Text Editor References: Message-ID: <001201c86df3$86e25700$9701a8c0@crypto1> I have used Netbeans, Scite, Ruby in Steel (text edition) and TextMate. I am normally a Mac user and used TextMate almost exclusively. I like Ruby in Steel so much, however, that I now do all of my work with it. I am saving to buy the Professional Edition once I finish restoring my Fialka (Russian rotor machine) and get my tuition paid for. Mike Graham From m.david at xmlhacker.com Tue Feb 12 23:12:42 2008 From: m.david at xmlhacker.com (M. David Peterson) Date: Tue, 12 Feb 2008 21:12:42 -0700 Subject: [Ironruby-core] Text Editor In-Reply-To: <001201c86df3$86e25700$9701a8c0@crypto1> References: <001201c86df3$86e25700$9701a8c0@crypto1> Message-ID: On Tue, 12 Feb 2008 20:49:50 -0700, Michael F Graham wrote: > I like Ruby in > Steel so much, however, that I now do all of my work with it. I am > saving to > buy the Professional Edition once I finish restoring my Fialka (Russian > rotor machine) and get my tuition paid for. Just that sound bite alone should be worth a free license, don't ya think? (just in case, yes that was a direct call-out to the marketing department @ SapphireSteel. Not to put you all on the spot or anything ;-) -- /M:D M. David Peterson Co-Founder & Chief Architect, 3rd&Urban, LLC Email: m.david at 3rdandUrban.com | m.david at amp.fm Mobile: (206) 418-9027 http://3rdandUrban.com | http://amp.fm | http://www.oreillynet.com/pub/au/2354 From lists at ruby-forum.com Wed Feb 13 00:11:32 2008 From: lists at ruby-forum.com (Softmind Technology) Date: Wed, 13 Feb 2008 06:11:32 +0100 Subject: [Ironruby-core] What Pleasing News are we getting at MIX 2008 Message-ID: Hi, I have been reading all good things shaping up for Mix 2008. It seems MSFT has lots of stuff to be announced at Mix. I just read about the refreshing news on MVC front by ScottGu in his recent blog. Can some one focus more light on exiting news for IronRuby as well, to be announced at Mix. Will IronRuby enter Beta before that....? Thanks -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Wed Feb 13 02:59:02 2008 From: lists at ruby-forum.com (Softmind Technology) Date: Wed, 13 Feb 2008 08:59:02 +0100 Subject: [Ironruby-core] IronRuby Now on Google Groups - Join and Discuss Now. Message-ID: <9a8544352397c94b271dc039e1d60fe3@ruby-forum.com> Hi, I just Found this Fresh New Group on IronRuby. Its nice to have IronRuby spreading all over. Discussions regarding IronRuby on Google Groups shall give more mileage offering good search engine results. http://groups.google.com/group/ironruby Thanks -- Posted via http://www.ruby-forum.com/. From 1115201006 at HotPOP.com Wed Feb 13 04:31:16 2008 From: 1115201006 at HotPOP.com (1115201006) Date: Wed, 13 Feb 2008 10:31:16 +0100 Subject: [Ironruby-core] How to contrubute to IronRuby? Message-ID: Hi all, someone can resume me how to contribute to IronRuby project? where, and how, send patches? and if there's a todo list... I've already read the wiki page http://ironruby.rubyforge.org/wiki/wiki.pl?ContributingToIronRuby but I'm a bit confused and I need a more detailed guide... From michael.letterle at gmail.com Wed Feb 13 08:30:51 2008 From: michael.letterle at gmail.com (Michael Letterle) Date: Wed, 13 Feb 2008 08:30:51 -0500 Subject: [Ironruby-core] How to contrubute to IronRuby? In-Reply-To: References: Message-ID: Here's how I understand it: Follow the instructions on that wiki page to sign the contributor agreement. You're already at rubyforge, everything is there: Bug List: http://rubyforge.org/tracker/?atid=16798&group_id=4359&func=browse The ToDo list is empty, but pretty much consists of "Make it work" The project page: http://rubyforge.org/projects/ironruby/ also has links to a patch submission tracker. But to be honest I don't think any offical "contribution" policies have been laid out but the core team. On Feb 13, 2008 4:31 AM, 1115201006 <1115201006 at hotpop.com> wrote: > Hi all, > someone can resume me how to contribute to IronRuby project? > where, and how, send patches? and if there's a todo list... > > I've already read the wiki page > http://ironruby.rubyforge.org/wiki/wiki.pl?ContributingToIronRuby > but I'm a bit confused and I need a more detailed guide... > > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -- Michael Letterle [Polymath Programmer] http://michaeldotnet.blogspot.com From Josh.Holmes at microsoft.com Wed Feb 13 14:34:05 2008 From: Josh.Holmes at microsoft.com (Josh Holmes) Date: Wed, 13 Feb 2008 11:34:05 -0800 Subject: [Ironruby-core] What Editor? In-Reply-To: <6bdacb70802121703waf95472s55c8291d35a835c8@mail.gmail.com> References: <4a68b8cf0802120531q1e78ce06le60f989abe288eaf@mail.gmail.com> <24e27e560802121042r79e187ffw925223a7cceab4fc@mail.gmail.com> <6bdacb70802121507j738db270k29ee488ce79fcd39@mail.gmail.com> <6bdacb70802121703waf95472s55c8291d35a835c8@mail.gmail.com> Message-ID: <1AC17FAF2165B641AC2AF42BBEED58CF3C061292CA@NA-EXMSG-C110.redmond.corp.microsoft.com> My biggest use of Intellicrack is investigation. I'm using e-texteditor on windows. Josh Holmes Architect Evangelist, Microsoft Mobile 734.323.3543 | josh.holmes at microsoft.com | blog http://www.joshholmes.com [cid:image001.jpg at 01C86E33.D9573E20] From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Corey Haines Sent: Tuesday, February 12, 2008 5:04 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] What Editor? That sounds about like the experiences I hear. Personally, I don't really miss auto-complete too much in Ruby (I'm coming from C#, where Intellicrack is my life blood). I am currently using Aptana, but I'm going to switch over and really focus on trying e, to get a sense of it. I'm mostly looking forward to the Ruby bundles for Textmate. -Corey On Feb 12, 2008 7:03 PM, Ivan Porto Carrero > wrote: I have used e-editor but had trouble connecting to mysql and started using netbeans instead after a friend of mine recommended it for doing rails on windows. I like it when I have simple things to do or to browse ruby code. I use netbeans mostly because their autocomplete gets it right most often. In meantime I got a macbook and textmate. And the more I use textmate the more I'm liking it. I was very reluctant against not having some sort of autocomplete function, that reluctance has somewhat faded because most of what I need can be provided by hitting the esc key once or twice in textmate. On Feb 13, 2008 12:07 PM, Corey Haines > wrote: Ivan, I have a question. If you use textmate on OSX, why did you choose to use ruby in steel or netbeans on windows instead of e? Do you find them better? -Corey On Feb 12, 2008 1:56 PM, Ivan Porto Carrero > wrote: On windows either ruby in steel or Netbeans 6.0 where netbeans has a slight advantage at the moment. Or I use e-texteditor which is a textmate port to windows for really simple things. On OSX I use textmate which is what I'm using most of the time. On Feb 13, 2008 7:42 AM, Slavo Furman > wrote: Hi! I actually use another very nice "TextMate"-like windows editor is InType (http://intype.info/ ). thanks, Slavo. On Feb 12, 2008 2:47 PM, M. David Peterson > wrote: On Tue, 12 Feb 2008 06:31:40 -0700, Thibaut Barr?re > wrote: > I'm using TextMate BTW... For those unaware > http://www.e-texteditor.com/ < which is a port of TextMate to Windows. Requires cygwin (though it will install it for you during the setup process.) -- /M:D M. David Peterson Co-Founder & Chief Architect, 3rd&Urban, LLC Email: m.david at 3rdandUrban.com | m.david at amp.fm Mobile: (206) 418-9027 http://3rdandUrban.com | http://amp.fm | http://www.oreillynet.com/pub/au/2354 _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -- http://www.coreyhaines.com The Internet's Premiere source of information about Corey Haines _______________________________________________ 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 -- http://www.coreyhaines.com The Internet's Premiere source of information about Corey Haines -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20080213/cae88b86/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 737 bytes Desc: image001.jpg Url : http://rubyforge.org/pipermail/ironruby-core/attachments/20080213/cae88b86/attachment-0001.jpg From coreyhaines at gmail.com Wed Feb 13 15:51:55 2008 From: coreyhaines at gmail.com (coreyhaines at gmail.com) Date: Wed, 13 Feb 2008 15:51:55 -0500 Subject: [Ironruby-core] What Editor? In-Reply-To: <1AC17FAF2165B641AC2AF42BBEED58CF3C061292CA@NA-EXMSG-C110.redmond.corp.microsoft.com> References: <4a68b8cf0802120531q1e78ce06le60f989abe288eaf@mail.gmail.com> <24e27e560802121042r79e187ffw925223a7cceab4fc@mail.gmail.com> <6bdacb70802121507j738db270k29ee488ce79fcd39@mail.gmail.com> <6bdacb70802121703waf95472s55c8291d35a835c8@mail.gmail.com> <1AC17FAF2165B641AC2AF42BBEED58CF3C061292CA@NA-EXMSG-C110.redmond.corp.microsoft.com> Message-ID: <6bdacb70802131251y2372ff37h138c0583e583cf62@mail.gmail.com> yeah, intellicrack is mostly for investigation. auto-complete is for my laziness in keystrokes, though. In a way, I look at intellicrack as encompassing both functions: discovery; and, don't make me type. :) On 2/13/08, Josh Holmes wrote: > My biggest use of Intellicrack is investigation. I'm using e-texteditor on > windows. > > Josh Holmes > Architect Evangelist, Microsoft > Mobile 734.323.3543 | > josh.holmes at microsoft.com | blog > http://www.joshholmes.com > [cid:image001.jpg at 01C86E33.D9573E20] > > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Corey Haines > Sent: Tuesday, February 12, 2008 5:04 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] What Editor? > > That sounds about like the experiences I hear. Personally, I don't really > miss auto-complete too much in Ruby (I'm coming from C#, where Intellicrack > is my life blood). I am currently using Aptana, but I'm going to switch over > and really focus on trying e, to get a sense of it. I'm mostly looking > forward to the Ruby bundles for Textmate. > > -Corey > On Feb 12, 2008 7:03 PM, Ivan Porto Carrero > > wrote: > > I have used e-editor but had trouble connecting to mysql and started using > netbeans instead after a friend of mine recommended it for doing rails on > windows. I like it when I have simple things to do or to browse ruby code. > I use netbeans mostly because their autocomplete gets it right most often. > > In meantime I got a macbook and textmate. And the more I use textmate the > more I'm liking it. I was very reluctant against not having some sort of > autocomplete function, that reluctance has somewhat faded because most of > what I need can be provided by hitting the esc key once or twice in > textmate. > > > > On Feb 13, 2008 12:07 PM, Corey Haines > > wrote: > Ivan, > > I have a question. If you use textmate on OSX, why did you choose to use > ruby in steel or netbeans on windows instead of e? Do you find them better? > > -Corey > On Feb 12, 2008 1:56 PM, Ivan Porto Carrero > > wrote: > On windows either ruby in steel or Netbeans 6.0 where netbeans has a slight > advantage at the moment. Or I use e-texteditor which is a textmate port to > windows for really simple things. > > On OSX I use textmate which is what I'm using most of the time. > > On Feb 13, 2008 7:42 AM, Slavo Furman > > wrote: > Hi! > > I actually use another very nice "TextMate"-like windows editor is InType > (http://intype.info/ ). > > thanks, > Slavo. > > On Feb 12, 2008 2:47 PM, M. David Peterson > > wrote: > On Tue, 12 Feb 2008 06:31:40 -0700, Thibaut Barr?re > > wrote: > > > I'm using TextMate > BTW... For those unaware > http://www.e-texteditor.com/ < which is a port > of TextMate to Windows. Requires cygwin (though it will install it for > you during the setup process.) > > -- > /M:D > > M. David Peterson > Co-Founder & Chief Architect, 3rd&Urban, LLC > Email: m.david at 3rdandUrban.com | > m.david at amp.fm > Mobile: (206) 418-9027 > http://3rdandUrban.com | http://amp.fm | > http://www.oreillynet.com/pub/au/2354 > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > -- > http://www.coreyhaines.com > The Internet's Premiere source of information about Corey Haines > _______________________________________________ > 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 > > > > -- > http://www.coreyhaines.com > The Internet's Premiere source of information about Corey Haines > -- http://www.coreyhaines.com The Internet's Premiere source of information about Corey Haines From w.kelly at qut.edu.au Wed Feb 13 18:58:56 2008 From: w.kelly at qut.edu.au (Wayne Kelly) Date: Thu, 14 Feb 2008 09:58:56 +1000 Subject: [Ironruby-core] Initializing external Ruby libraries In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D900D48E7@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <6821FE23D98BAC41AC2A91E7970F31AF1CCFB0F77C@QUTEXMBX02.qut.edu.au> <372109E149E8084D8E6C7D9CFD82E0632D900D48E7@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <6821FE23D98BAC41AC2A91E7970F31AF1CCFB0F948@QUTEXMBX02.qut.edu.au> For Ruby libraries such as sockets, openssl etc (ie not built-in classes or modules), I assume we will implement/port them using say C# to produce a managed dll (eg socket.dll). Client programs will then require 'socket', and IronRuby will load socket.dll rather than socket.so I note IronRuby already has the ability to load managed dlls such as mscorlib - but that appears to simply load the assembly and then presumably uses .NET reflection to expose the .NET classes as Ruby classes. But for managed dll such as socket.dll that has been specifically engineered as an IronRuby extension dll, I image the loading process would be a little different? CRuby, for example exposes an Init_Foo function which explicitly calls define_class, define_method etc to explicitly register each of the Ruby classes implemented by that library (equivalent to what IronRuby does in LibrariesInitializer.LoadModules). Will there be a similar convention used by IronRuby? Possibly in static class constructors? Cheers, Wayne. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20080214/6ee8eaaf/attachment.html From bacondarwin at googlemail.com Wed Feb 13 20:00:39 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Thu, 14 Feb 2008 01:00:39 -0000 Subject: [Ironruby-core] Initializing external Ruby libraries In-Reply-To: <6821FE23D98BAC41AC2A91E7970F31AF1CCFB0F948@QUTEXMBX02.qut.edu.au> References: <6821FE23D98BAC41AC2A91E7970F31AF1CCFB0F77C@QUTEXMBX02.qut.edu.au> <372109E149E8084D8E6C7D9CFD82E0632D900D48E7@NA-EXMSG-C115.redmond.corp.microsoft.com> <6821FE23D98BAC41AC2A91E7970F31AF1CCFB0F948@QUTEXMBX02.qut.edu.au> Message-ID: <000e01c86ea5$0583ebd0$108bc370$@com> I believe the library side of this mechanism is already in-place. Take a look at the \trunk\src\IronRuby.Libraries\Initializer.Generated.cs file which is automatically generated by the \trunk\src\IronRuby.Libraries\GenerateInitializers.cmd. The cmd file reflects on the compiled library file, reading the RubyClass, RubyMethod, etc. attributes and generates the initialize code you describe below. You can see this in action inside \trunk\src\ironruby\Runtime\Loader.cs : Ruby.Runtime.Loader.LoadStandardRubyLibraries(). What appears to be missing is the hosting side of things when you "require" one of these assemblies. There doesn't seem to be any point in the assembly loading process that checks for a LibraryInitializer class and runs the LoadModules method. Is that what you meant? Pete From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Wayne Kelly Sent: Wednesday,13 February 13, 2008 23:59 To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Initializing external Ruby libraries For Ruby libraries such as sockets, openssl etc (ie not built-in classes or modules), I assume we will implement/port them using say C# to produce a managed dll (eg socket.dll). Client programs will then require 'socket', and IronRuby will load socket.dll rather than socket.so I note IronRuby already has the ability to load managed dlls such as mscorlib - but that appears to simply load the assembly and then presumably uses .NET reflection to expose the .NET classes as Ruby classes. But for managed dll such as socket.dll that has been specifically engineered as an IronRuby extension dll, I image the loading process would be a little different? CRuby, for example exposes an Init_Foo function which explicitly calls define_class, define_method etc to explicitly register each of the Ruby classes implemented by that library (equivalent to what IronRuby does in LibrariesInitializer.LoadModules). Will there be a similar convention used by IronRuby? Possibly in static class constructors? Cheers, Wayne. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20080214/690b6f5c/attachment.html From michael.letterle at gmail.com Wed Feb 13 20:03:02 2008 From: michael.letterle at gmail.com (Michael Letterle) Date: Wed, 13 Feb 2008 20:03:02 -0500 Subject: [Ironruby-core] Initializing external Ruby libraries In-Reply-To: <6821FE23D98BAC41AC2A91E7970F31AF1CCFB0F948@QUTEXMBX02.qut.edu.au> References: <6821FE23D98BAC41AC2A91E7970F31AF1CCFB0F77C@QUTEXMBX02.qut.edu.au> <372109E149E8084D8E6C7D9CFD82E0632D900D48E7@NA-EXMSG-C115.redmond.corp.microsoft.com> <6821FE23D98BAC41AC2A91E7970F31AF1CCFB0F948@QUTEXMBX02.qut.edu.au> Message-ID: What do you see would be the advantage of something like this as opposed to the current method of loading .NET assemblies? I mean you could use something like OpenSSL.NET (http://openssl-net.sourceforge.net/) today to implement ssl in IronRuby for example I believe a future goal is to actually support loading unmanaged extensions (this is based strictly on comments in the code, noone's actually said this as far as I know). On Feb 13, 2008 6:58 PM, Wayne Kelly wrote: > > > For Ruby libraries such as sockets, openssl etc (ie not built-in classes or > modules), I assume we will implement/port them using say C# to produce a > managed dll (eg socket.dll). Client programs will then require 'socket', and > IronRuby will load socket.dll rather than socket.so > > I note IronRuby already has the ability to load managed dlls such as > mscorlib - but that appears to simply load the assembly and then presumably > uses .NET reflection to expose the .NET classes as Ruby classes. But for > managed dll such as socket.dll that has been specifically engineered as an > IronRuby extension dll, I image the loading process would be a little > different? CRuby, for example exposes an Init_Foo function which explicitly > calls define_class, define_method etc to explicitly register each of the > Ruby classes implemented by that library (equivalent to what IronRuby does > in LibrariesInitializer.LoadModules). > > Will there be a similar convention used by IronRuby? Possibly in static > class constructors? > > Cheers, Wayne. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -- Michael Letterle [Polymath Programmer] http://michaeldotnet.blogspot.com From jomes at microsoft.com Wed Feb 13 20:13:40 2008 From: jomes at microsoft.com (John Messerly) Date: Wed, 13 Feb 2008 17:13:40 -0800 Subject: [Ironruby-core] Initializing external Ruby libraries In-Reply-To: References: <6821FE23D98BAC41AC2A91E7970F31AF1CCFB0F77C@QUTEXMBX02.qut.edu.au> <372109E149E8084D8E6C7D9CFD82E0632D900D48E7@NA-EXMSG-C115.redmond.corp.microsoft.com> <6821FE23D98BAC41AC2A91E7970F31AF1CCFB0F948@QUTEXMBX02.qut.edu.au> Message-ID: <918705E903F4714CB713D89AB5F1857D73B42CC39B@NA-EXMSG-C116.redmond.corp.microsoft.com> Michael Letterle: > What do you see would be the advantage of something like this as > opposed to the current method of loading .NET assemblies? I mean you > could use something like OpenSSL.NET > (http://openssl-net.sourceforge.net/) today to implement ssl in > IronRuby for example The main reason for implementing the libraries in C# would be for better performance. But if it's just a thin wrapper on top of some .NET piece, there's no reason you couldn't implement it in Ruby code instead of C# - John From w.kelly at qut.edu.au Wed Feb 13 20:45:06 2008 From: w.kelly at qut.edu.au (Wayne Kelly) Date: Thu, 14 Feb 2008 11:45:06 +1000 Subject: [Ironruby-core] Initializing external Ruby libraries In-Reply-To: <000e01c86ea5$0583ebd0$108bc370$@com> References: <6821FE23D98BAC41AC2A91E7970F31AF1CCFB0F77C@QUTEXMBX02.qut.edu.au> <372109E149E8084D8E6C7D9CFD82E0632D900D48E7@NA-EXMSG-C115.redmond.corp.microsoft.com> <6821FE23D98BAC41AC2A91E7970F31AF1CCFB0F948@QUTEXMBX02.qut.edu.au> <000e01c86ea5$0583ebd0$108bc370$@com> Message-ID: <6821FE23D98BAC41AC2A91E7970F31AF1CCFB0FAF4@QUTEXMBX02.qut.edu.au> ________________________________ From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Peter Bacon Darwin Sent: Thursday, 14 February 2008 11:01 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Initializing external Ruby libraries I believe the library side of this mechanism is already in-place. Take a look at the \trunk\src\IronRuby.Libraries\Initializer.Generated.cs file which is automatically generated by the \trunk\src\IronRuby.Libraries\GenerateInitializers.cmd. The cmd file reflects on the compiled library file, reading the RubyClass, RubyMethod, etc. attributes and generates the initialize code you describe below. You can see this in action inside \trunk\src\ironruby\Runtime\Loader.cs : Ruby.Runtime.Loader.LoadStandardRubyLibraries(). What appears to be missing is the hosting side of things when you "require" one of these assemblies. There doesn't seem to be any point in the assembly loading process that checks for a LibraryInitializer class and runs the LoadModules method. Is that what you meant? Yes, exactly. Cheers, Wayne. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20080214/f087d712/attachment.html From michael.letterle at gmail.com Wed Feb 13 20:53:27 2008 From: michael.letterle at gmail.com (Michael Letterle) Date: Wed, 13 Feb 2008 20:53:27 -0500 Subject: [Ironruby-core] Initializing external Ruby libraries In-Reply-To: <918705E903F4714CB713D89AB5F1857D73B42CC39B@NA-EXMSG-C116.redmond.corp.microsoft.com> References: <6821FE23D98BAC41AC2A91E7970F31AF1CCFB0F77C@QUTEXMBX02.qut.edu.au> <372109E149E8084D8E6C7D9CFD82E0632D900D48E7@NA-EXMSG-C115.redmond.corp.microsoft.com> <6821FE23D98BAC41AC2A91E7970F31AF1CCFB0F948@QUTEXMBX02.qut.edu.au> <918705E903F4714CB713D89AB5F1857D73B42CC39B@NA-EXMSG-C116.redmond.corp.microsoft.com> Message-ID: Yes, my only point is that the way it works today a .NET class becomes a Ruby class and a .NET method becomes a Ruby method. Nothing is stopping one from writing a .NET assembly so that it "feels" like Ruby when it's compiled. That said, I can see the advantage of being able to use the RubyClass and RubyMethod attributes outside of that.. Is the performance between this and utilizing an Initializer that great? On Feb 13, 2008 8:13 PM, John Messerly wrote: > Michael Letterle: > > > What do you see would be the advantage of something like this as > > opposed to the current method of loading .NET assemblies? I mean you > > could use something like OpenSSL.NET > > (http://openssl-net.sourceforge.net/) today to implement ssl in > > IronRuby for example > > The main reason for implementing the libraries in C# would be for better performance. But if it's just a thin wrapper on top of some .NET piece, there's no reason you couldn't implement it in Ruby code instead of C# > > - John > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -- Michael Letterle [Polymath Programmer] http://michaeldotnet.blogspot.com From w.kelly at qut.edu.au Wed Feb 13 20:59:03 2008 From: w.kelly at qut.edu.au (Wayne Kelly) Date: Thu, 14 Feb 2008 11:59:03 +1000 Subject: [Ironruby-core] Initializing external Ruby libraries In-Reply-To: References: <6821FE23D98BAC41AC2A91E7970F31AF1CCFB0F77C@QUTEXMBX02.qut.edu.au> <372109E149E8084D8E6C7D9CFD82E0632D900D48E7@NA-EXMSG-C115.redmond.corp.microsoft.com> <6821FE23D98BAC41AC2A91E7970F31AF1CCFB0F948@QUTEXMBX02.qut.edu.au> Message-ID: <6821FE23D98BAC41AC2A91E7970F31AF1CCFB0FB29@QUTEXMBX02.qut.edu.au> > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of > Michael Letterle > Sent: Thursday, 14 February 2008 11:03 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Initializing external Ruby libraries > > What do you see would be the advantage of something like this > as opposed to the current method of loading .NET assemblies? > I mean you could use something like OpenSSL.NET > (http://openssl-net.sourceforge.net/) today to implement ssl > in IronRuby for example It's not just about getting access to some implementation of OpenSSL, it about providing a set of Ruby classes and methods that exactly match those exposed by existing Ruby extension libraries used by CRuby. By explicitly calling define_class, define_method etc, you have better control over how your C# code is presented to the Ruby world. You can, for example, specify a Ruby base class that may not exist as a static .NET class. I'm not sure if this is actually an issue in practice. But then if there's no need to call define_class and define_method explicitly for external libraries, then why do it for the built-in classes? Why not simply load an RubyExternalLibrary.dll? Is it for performance, for preciseness of interface or both? Cheers, Wayne. From jomes at microsoft.com Wed Feb 13 21:00:28 2008 From: jomes at microsoft.com (John Messerly) Date: Wed, 13 Feb 2008 18:00:28 -0800 Subject: [Ironruby-core] Initializing external Ruby libraries In-Reply-To: References: <6821FE23D98BAC41AC2A91E7970F31AF1CCFB0F77C@QUTEXMBX02.qut.edu.au> <372109E149E8084D8E6C7D9CFD82E0632D900D48E7@NA-EXMSG-C115.redmond.corp.microsoft.com> <6821FE23D98BAC41AC2A91E7970F31AF1CCFB0F948@QUTEXMBX02.qut.edu.au> <918705E903F4714CB713D89AB5F1857D73B42CC39B@NA-EXMSG-C116.redmond.corp.microsoft.com> Message-ID: <918705E903F4714CB713D89AB5F1857D73B42CC3C0@NA-EXMSG-C116.redmond.corp.microsoft.com> Michael Letterle: > Yes, my only point is that the way it works today a .NET class becomes > a Ruby class and a .NET method becomes a Ruby method. Nothing is > stopping one from writing a .NET assembly so that it "feels" like Ruby > when it's compiled. > > That said, I can see the advantage of being able to use the RubyClass > and RubyMethod attributes outside of that.. > > Is the performance between this and utilizing an Initializer that > great? > Sorry, I misunderstood. I thought you were suggesting writing the library as a .rb file & using .NET interop features to call into the .NET code. Yeah, you couldn't just write it in C# because we need the initializer to give proper Ruby method names & public/protected/private/instance/singleton metadata. It's also a performance win because we don't need to use reflection to pull out the metadata at runtime. - John From michael.letterle at gmail.com Wed Feb 13 21:17:45 2008 From: michael.letterle at gmail.com (Michael Letterle) Date: Wed, 13 Feb 2008 21:17:45 -0500 Subject: [Ironruby-core] Initializing external Ruby libraries In-Reply-To: <918705E903F4714CB713D89AB5F1857D73B42CC3C0@NA-EXMSG-C116.redmond.corp.microsoft.com> References: <6821FE23D98BAC41AC2A91E7970F31AF1CCFB0F77C@QUTEXMBX02.qut.edu.au> <372109E149E8084D8E6C7D9CFD82E0632D900D48E7@NA-EXMSG-C115.redmond.corp.microsoft.com> <6821FE23D98BAC41AC2A91E7970F31AF1CCFB0F948@QUTEXMBX02.qut.edu.au> <918705E903F4714CB713D89AB5F1857D73B42CC39B@NA-EXMSG-C116.redmond.corp.microsoft.com> <918705E903F4714CB713D89AB5F1857D73B42CC3C0@NA-EXMSG-C116.redmond.corp.microsoft.com> Message-ID: I assume then we will be using the RubyLibrary, RubyClass, RubyMethod attributes, et al to implement that then? On Feb 13, 2008 9:00 PM, John Messerly wrote: > Michael Letterle: > > > Yes, my only point is that the way it works today a .NET class becomes > > a Ruby class and a .NET method becomes a Ruby method. Nothing is > > stopping one from writing a .NET assembly so that it "feels" like Ruby > > when it's compiled. > > > > That said, I can see the advantage of being able to use the RubyClass > > and RubyMethod attributes outside of that.. > > > > Is the performance between this and utilizing an Initializer that > > great? > > > > Sorry, I misunderstood. I thought you were suggesting writing the library as a .rb file & using .NET interop features to call into the .NET code. > > Yeah, you couldn't just write it in C# because we need the initializer to give proper Ruby method names & public/protected/private/instance/singleton metadata. It's also a performance win because we don't need to use reflection to pull out the metadata at runtime. > > > - John > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -- Michael Letterle [Polymath Programmer] http://michaeldotnet.blogspot.com From robert.brotherus at napa.fi Thu Feb 14 03:44:23 2008 From: robert.brotherus at napa.fi (Robert Brotherus) Date: Thu, 14 Feb 2008 10:44:23 +0200 Subject: [Ironruby-core] IronRuby debugging support in VS References: Message-ID: <53194650933664488F3F0C3A0AB56832060438@nw60.napa.fi> Read John Lams blog http://www.iunknown.com/2008/02/ironruby-sun-an.html Nice news about getting debugging support for IronRuby more close to completion: "We have debugging and stack backtraces working." I was wondering if this means that IronRuby 1.0 release can be expected to ship with a plug-in or similar to VisualStudio to enable such debugging with the IDE? Robert Brotherus Software architect Napa Ltd Tammasaarenkatu 3, Helsinki FI-00180 P.O.Box 470, Helsinki FI-00181 Tel. +358 9 22 813 1 Direct. +358 9 22 813 611 GSM +358 45 11 456 02 Fax. +358 9 22 813 800 Email: Robert.Brotherus at napa.fi www.napa.fi From michael.letterle at gmail.com Thu Feb 14 08:56:04 2008 From: michael.letterle at gmail.com (Michael Letterle) Date: Thu, 14 Feb 2008 08:56:04 -0500 Subject: [Ironruby-core] Noone's mentioned it yet... Message-ID: But I noticed it yesterday, there's a new SVN revision out there. Lot's of changes to the DLR, which can affect stuff people may be working on. You may want to get latest and merge your changes. I assume this is a result of syncing up IronPython and IronRuby's DLR projects... I'm sure it's been asked before, but why /isn't/ the DLR hosted separately? -- Michael Letterle [Polymath Programmer] http://michaeldotnet.blogspot.com From jflam at microsoft.com Thu Feb 14 10:25:59 2008 From: jflam at microsoft.com (John Lam (DLR)) Date: Thu, 14 Feb 2008 07:25:59 -0800 Subject: [Ironruby-core] IronRuby debugging support in VS In-Reply-To: <53194650933664488F3F0C3A0AB56832060438@nw60.napa.fi> References: <53194650933664488F3F0C3A0AB56832060438@nw60.napa.fi> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D900D4B3F@NA-EXMSG-C115.redmond.corp.microsoft.com> Robert Brotherus: > I was wondering if this means that IronRuby 1.0 release can be expected > to ship with a plug-in or similar to VisualStudio to enable such > debugging with the IDE? Yes. We're working on a rudimentary language service and we're hoping to get debugging on par with what IronPython provides today. The ETA for the debugging check-in is sometime next week. The language service will take a while longer to whip into shape, and we'll likely be showing it off at MIX. Keep in mind that this in no way is a complete language service. As the good folks over at Sapphire in Steel will tell you, there's a ton more work to do than just getting syntax coloring and debugging working (in their case it was actual work since they had to write a debugger and a scanner and parser). Today we don't have plans to fully productize IronRuby a'la C# or JScript in VS. Consider this the min bar of what my team will provide: syntax coloring, some kind of project system, and VS debugging support. Thanks, -John From lists at ruby-forum.com Thu Feb 14 11:17:46 2008 From: lists at ruby-forum.com (Huw Collingbourne) Date: Thu, 14 Feb 2008 17:17:46 +0100 Subject: [Ironruby-core] IronRuby debugging support in VS In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D900D4B3F@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <53194650933664488F3F0C3A0AB56832060438@nw60.napa.fi> <372109E149E8084D8E6C7D9CFD82E0632D900D4B3F@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <2b95de33cda12fd95aa2f195cb421be5@ruby-forum.com> John Lam (DLR) wrote: > Robert Brotherus: > Keep in mind that this in no way is a complete language service. As the > good folks over at Sapphire in Steel will tell you, there's a ton more > work to do than just getting syntax coloring and debugging working (in > their case it was actual work since they had to write a debugger and a > scanner and parser). > I can confirm that ;-) It's been our experience that many people hugely underestimate the work required to create a first class IDE for Visual Studio. It's a constant frustration to us that people usually refer to our IDE, Ruby in Steel, as a 'plugin' (which makes it sound trivial) whereas in actual fact it is a 'package' which is a completely different beast from a plugin - a package is really deep integrated with VS, just like the 'standard' languages such as C# and VB.NET. I can tell you that creating this kind of IDE is a massive undertaking. We are just about to look at the IronRuby debugger and we aim to integrate a visual IronRuby debugger into an alpha or beta release of Ruby In Steel for IronRuby asap. In the meantime, we'll be releasing the alpha of our IronRuby IDE to our customers in the next week or two - this will have the form designer but not yet the debugger. See here: http://www.sapphiresteel.com/IronRuby-Developments-the-Visual best wishes Huw SapphireSteel Software Ruby and Rails In Visual Studio http://www.sapphiresteel.com -- Posted via http://www.ruby-forum.com/. From jflam at microsoft.com Thu Feb 14 11:21:31 2008 From: jflam at microsoft.com (John Lam (DLR)) Date: Thu, 14 Feb 2008 08:21:31 -0800 Subject: [Ironruby-core] IronRuby debugging support in VS In-Reply-To: <2b95de33cda12fd95aa2f195cb421be5@ruby-forum.com> References: <53194650933664488F3F0C3A0AB56832060438@nw60.napa.fi> <372109E149E8084D8E6C7D9CFD82E0632D900D4B3F@NA-EXMSG-C115.redmond.corp.microsoft.com> <2b95de33cda12fd95aa2f195cb421be5@ruby-forum.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D900D4B7B@NA-EXMSG-C115.redmond.corp.microsoft.com> Huw Collingbourne: > We are just about to look at the IronRuby debugger and we aim to > integrate a visual IronRuby debugger into an alpha or beta release of > Ruby In Steel for IronRuby asap. In the meantime, we'll be releasing > the alpha of our IronRuby IDE to our customers in the next week or two > - this will have the form designer but not yet the debugger. See here: > http://www.sapphiresteel.com/IronRuby-Developments-the-Visual The good news is that you should just be able to reuse our work to get debugging support working. AFAIK there was almost no work required to enable debugging in VS once we got IronRuby + DLR generating the correct PDBs. Thanks, -John From lists at ruby-forum.com Thu Feb 14 11:34:56 2008 From: lists at ruby-forum.com (Huw Collingbourne) Date: Thu, 14 Feb 2008 17:34:56 +0100 Subject: [Ironruby-core] IronRuby debugging support in VS In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D900D4B7B@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <53194650933664488F3F0C3A0AB56832060438@nw60.napa.fi> <372109E149E8084D8E6C7D9CFD82E0632D900D4B3F@NA-EXMSG-C115.redmond.corp.microsoft.com> <2b95de33cda12fd95aa2f195cb421be5@ruby-forum.com> <372109E149E8084D8E6C7D9CFD82E0632D900D4B7B@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: John Lam (DLR) wrote: > > The good news is that you should just be able to reuse our work to get > debugging support working. AFAIK there was almost no work required to > enable debugging in VS once we got IronRuby + DLR generating the correct > PDBs. That's good to hear. It should be a lot less work for us to get the IronRuby debugger integrated than it was to write a fast debugger for standard Ruby ;-) I must say that I've really started enjoying using IronRuby now we have a workable form designer. The big thing I've missed up to now has been the debugger so that's going to be a great addition. best wishes Huw SapphireSteel Software Ruby and Rails In Visual Studio http://www.sapphiresteel.com -- Posted via http://www.ruby-forum.com/. From Shri.Borde at microsoft.com Fri Feb 15 01:15:14 2008 From: Shri.Borde at microsoft.com (Shri Borde) Date: Thu, 14 Feb 2008 22:15:14 -0800 Subject: [Ironruby-core] Noone's mentioned it yet... In-Reply-To: References: Message-ID: <50B69702CA6E6D4E849D30CD4989AB8ED7F4DE8D73@DF-GRTDANE-MSG.exchange.corp.microsoft.com> We have talked about hosting DLR separately and still not sure where we will land. Hosting it separately makes it harder to pull down matching sources of the DLR and IronRuby (or DLR and IronPython). So its not clear whether it would be a net positive or a net negative to host it separately. -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Michael Letterle Sent: Thursday, February 14, 2008 5:56 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Noone's mentioned it yet... But I noticed it yesterday, there's a new SVN revision out there. Lot's of changes to the DLR, which can affect stuff people may be working on. You may want to get latest and merge your changes. I assume this is a result of syncing up IronPython and IronRuby's DLR projects... I'm sure it's been asked before, but why /isn't/ the DLR hosted separately? -- Michael Letterle [Polymath Programmer] http://michaeldotnet.blogspot.com _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From robert.brotherus at napa.fi Fri Feb 15 03:09:38 2008 From: robert.brotherus at napa.fi (Robert Brotherus) Date: Fri, 15 Feb 2008 10:09:38 +0200 Subject: [Ironruby-core] Mismatch in cases of names of events References: <50B69702CA6E6D4E849D30CD4989AB8ED7F4DE8D73@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: <53194650933664488F3F0C3A0AB568320A0FA2@nw60.napa.fi> I have made a test app with XAML + WPF + IronRuby event handlers (IronRuby revision 76). The code of the Ruby-part (EventManager.rb) is below. Due to lack of other working mechanisms of connecting the Ruby-methods to the WPF-events, I ended up in passing the widget reference to Ruby in a global variable and then using the closure-syntax to connect the delegates on Ruby-side. All three events work ok and the App runs, but only with following event names: CLR name of the event Name of event seen in IronRuby "Click" "click" "Loaded" "loaded" "MouseEnter" "MouseEnter" Notice that whereas "Click" and "Loaded" mapped to their lower-case equivalents, the "MouseEnter" event connected only if it was written in the original capital form "MouseEnter" on IronRuby-side. The most logical alternative "mouseEnter" caused MethodMissing. I suspect such inconsistency in the name-mapping cannot be intentional. Robert Brotherus Software architect Email: Robert.Brotherus at napa.fi www.napa.fi ------------------------- EventManager.rb: ------------------------- # Reference the WPF assemblies require 'PresentationFramework, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' require 'PresentationCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' SolidColorBrush = System::Windows::Media::SolidColorBrush Colors = System::Windows::Media::Colors module NWS module COLOURBUTTON class WidgetEventManager def initialize(widget) widget.click { |sender,args| self.click(sender,args) } # CLR name: Click widget.loaded { |sender,args| self.loaded(sender) } # CLR name: Loaded widget.MouseEnter { |sender,args| self.mouse_enter(sender,args) } # CRL name: MouseEnter end def click(widget, args) widget.content = widget.content.to_s + "X" end def mouse_enter(widget, args) widget.background = SolidColorBrush.new(Colors.Red) end def loaded(widget) widget.background = SolidColorBrush.new(Colors.Yellow) end end end end WidgetEventManager.new($widget) From jflam at microsoft.com Fri Feb 15 09:52:21 2008 From: jflam at microsoft.com (John Lam (DLR)) Date: Fri, 15 Feb 2008 06:52:21 -0800 Subject: [Ironruby-core] Mismatch in cases of names of events In-Reply-To: <53194650933664488F3F0C3A0AB568320A0FA2@nw60.napa.fi> References: <50B69702CA6E6D4E849D30CD4989AB8ED7F4DE8D73@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <53194650933664488F3F0C3A0AB568320A0FA2@nw60.napa.fi> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D900D5077@NA-EXMSG-C115.redmond.corp.microsoft.com> Robert Brotherus: > CLR name of the event Name of event seen in IronRuby > "Click" "click" > "Loaded" "loaded" > "MouseEnter" "MouseEnter" Nope. This is definitely a bug in the name mangling. It should be mouse_enter or MouseEnter. Can you open a bug on this one please? Thanks, -John From Tomas.Matousek at microsoft.com Fri Feb 15 12:14:15 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Fri, 15 Feb 2008 09:14:15 -0800 Subject: [Ironruby-core] Mismatch in cases of names of events In-Reply-To: <53194650933664488F3F0C3A0AB568320A0FA2@nw60.napa.fi> References: <50B69702CA6E6D4E849D30CD4989AB8ED7F4DE8D73@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <53194650933664488F3F0C3A0AB568320A0FA2@nw60.napa.fi> Message-ID: Have you tried mouse_enter? Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Robert Brotherus Sent: Friday, February 15, 2008 12:10 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Mismatch in cases of names of events I have made a test app with XAML + WPF + IronRuby event handlers (IronRuby revision 76). The code of the Ruby-part (EventManager.rb) is below. Due to lack of other working mechanisms of connecting the Ruby-methods to the WPF-events, I ended up in passing the widget reference to Ruby in a global variable and then using the closure-syntax to connect the delegates on Ruby-side. All three events work ok and the App runs, but only with following event names: CLR name of the event Name of event seen in IronRuby "Click" "click" "Loaded" "loaded" "MouseEnter" "MouseEnter" Notice that whereas "Click" and "Loaded" mapped to their lower-case equivalents, the "MouseEnter" event connected only if it was written in the original capital form "MouseEnter" on IronRuby-side. The most logical alternative "mouseEnter" caused MethodMissing. I suspect such inconsistency in the name-mapping cannot be intentional. Robert Brotherus Software architect Email: Robert.Brotherus at napa.fi www.napa.fi ------------------------- EventManager.rb: ------------------------- # Reference the WPF assemblies require 'PresentationFramework, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' require 'PresentationCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' SolidColorBrush = System::Windows::Media::SolidColorBrush Colors = System::Windows::Media::Colors module NWS module COLOURBUTTON class WidgetEventManager def initialize(widget) widget.click { |sender,args| self.click(sender,args) } # CLR name: Click widget.loaded { |sender,args| self.loaded(sender) } # CLR name: Loaded widget.MouseEnter { |sender,args| self.mouse_enter(sender,args) } # CRL name: MouseEnter end def click(widget, args) widget.content = widget.content.to_s + "X" end def mouse_enter(widget, args) widget.background = SolidColorBrush.new(Colors.Red) end def loaded(widget) widget.background = SolidColorBrush.new(Colors.Yellow) end end end end WidgetEventManager.new($widget) _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From lists at ruby-forum.com Sat Feb 16 23:43:31 2008 From: lists at ruby-forum.com (Softmind Technology) Date: Sun, 17 Feb 2008 05:43:31 +0100 Subject: [Ironruby-core] Curious about IronRuby and IronPython on DLR Message-ID: Hi, Just curious to know more about IronRuby and IronPython. Since both are based on DLR....here are my short questions. (1) Is the progress same with both the languages. (2) Will version 1.0 for both will be in the same time frame... (3) If Rails is the target for declaring IronRuby as 1.0 then.. will django will be the target for declaring IronPython as 1.0 (4) How are the code contributions flowing to IronRuby from other 3rd party developers when compared to IronRuby... Thanks -- Posted via http://www.ruby-forum.com/. From karl at powershell.com Sun Feb 17 00:07:33 2008 From: karl at powershell.com (Karl Prosser) Date: Sat, 16 Feb 2008 21:07:33 -0800 Subject: [Ironruby-core] Curious about IronRuby and IronPython on DLR In-Reply-To: References: Message-ID: <47B7C115.7050809@powershell.com> well ironpython 1.0 has already been out for some time. its version 2 (i think) that they are putting on the DLR, so you could say safely, i think, that ironpython is more mature. (but of course ruby is cooler) and further along in full language compatibility. This is just my perception though. Hopefully somebody who really knows will answer ;) Softmind Technology wrote: > Hi, > > Just curious to know more about IronRuby and IronPython. > > Since both are based on DLR....here are my short questions. > > (1) Is the progress same with both the languages. > > (2) Will version 1.0 for both will be in the same time frame... > > (3) If Rails is the target for declaring IronRuby as 1.0 then.. > will django will be the target for declaring IronPython as 1.0 > > (4) How are the code contributions flowing to IronRuby from other 3rd > party developers when compared to IronRuby... > > Thanks > From tranqy at gmail.com Sun Feb 17 08:23:41 2008 From: tranqy at gmail.com (Aaron Junod) Date: Sun, 17 Feb 2008 08:23:41 -0500 Subject: [Ironruby-core] Curious about IronRuby and IronPython on DLR In-Reply-To: <47B7C115.7050809@powershell.com> References: <47B7C115.7050809@powershell.com> Message-ID: IronPython is much further along. All of the details about IronPython are readily available online, including how far it is along in cPython's compatibility. I would say no languages will progress at the same time no matter if they are on the CLR or DLR, language teams are seperate from platform teams within MS. The polocies for code contributions for both languages are also very public for you to review yourself. On Feb 17, 2008 12:07 AM, Karl Prosser wrote: > well ironpython 1.0 has already been out for some time. its version 2 (i > think) that they are putting on the DLR, so you could say safely, i > think, that ironpython is more mature. (but of course ruby is cooler) > and further along in full language compatibility. This is just my > perception though. Hopefully somebody who really knows will answer ;) > > Softmind Technology wrote: > > Hi, > > > > Just curious to know more about IronRuby and IronPython. > > > > Since both are based on DLR....here are my short questions. > > > > (1) Is the progress same with both the languages. > > > > (2) Will version 1.0 for both will be in the same time frame... > > > > (3) If Rails is the target for declaring IronRuby as 1.0 then.. > > will django will be the target for declaring IronPython as 1.0 > > > > (4) How are the code contributions flowing to IronRuby from other 3rd > > party developers when compared to IronRuby... > > > > Thanks > > > > > _______________________________________________ > 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/20080217/584d62f6/attachment.html From w.kelly at qut.edu.au Sun Feb 17 19:29:41 2008 From: w.kelly at qut.edu.au (Wayne Kelly) Date: Mon, 18 Feb 2008 10:29:41 +1000 Subject: [Ironruby-core] Towards Rails on .NET In-Reply-To: References: <47B7C115.7050809@powershell.com> Message-ID: <6821FE23D98BAC41AC2A91E7970F31AF1CCFB6405A@QUTEXMBX02.qut.edu.au> Below is a table summarizing the extension libraries that are needed by a number of simple Rails use cases. These libraries are implemented in Matz's Ruby Interpreter in C code rather than in Ruby code, so we'll need to port or at least wrap them in some way. Use Case Win32API Syck (YAML) thread socket stringio zlib digest strscan openssl sqlite3_api Setup gems ? ? ? Gem install rails ? ? ? ? ? ? Rails create app ? ? ? ? ? Start WEBrick ? ? ? ? ? WEBrick process static html page ? ? ? ? ? WEBrick process dynamic controller page ? ? ? ? ? ? ? ? ? IIS CGI dispatch ? ? ? ? ? ? I'd like to start working on some of these libraries, but first want to check who is already working on what. I understand that John Messerly is working on a YAML port and according to the WIKI, Eduardo Flores is working on stringio and Curt Hagenlocher is working on strscan. Is this list correct and complete. Is anyone else already working on any of these libraries? To support these simple use cases, typically only a small number of functions from these libraries is actually needed. If you are going to work on any of these libraries, I can provide you with a list of the actual functions and with the exact signature/overrides that are actually used by these use cases. Obviously, other functions will also be needed long term, but by implementing these functions first we can get basic Rails functionality happening sooner. Note, there are many different web server options that we could persue. We could for example not worry about WEBrick and go straight to IIS as a host and so avoid implementing the socket library. Ultimately, I think we want to be web server agnostic, That is, we should aim to provide a drop in replacement for "rubyw.exe" that works regardless of which web server (IIS, Apache, WEBrick, Mongrel, etc) that administrators choose to adopt. That said, Windows is currently considered a second class platform for deploying Rails and the setup can be quite complex and buggy in some configurations. In the longer term we should aim to improve this situation. For production Rails we'll want to support IIS 7.0 well on server machines, but for those that just want to try it out, I believe we should also make sure it can be made to work on desktop machines such as mine with IIS 5 and XP. Your thoughts? Cheers, Wayne. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20080218/f89f640b/attachment-0001.html From w.kelly at qut.edu.au Sun Feb 17 19:35:32 2008 From: w.kelly at qut.edu.au (Wayne Kelly) Date: Mon, 18 Feb 2008 10:35:32 +1000 Subject: [Ironruby-core] Towards Rails on .NET In-Reply-To: References: <47B7C115.7050809@powershell.com> Message-ID: <6821FE23D98BAC41AC2A91E7970F31AF1CCFB64073@QUTEXMBX02.qut.edu.au> Below is a table summarizing the extension libraries that are needed by a number of simple Rails use cases. These libraries are implemented in Matz's Ruby Interpreter in C code rather than in Ruby code, so we'll need to port or at least wrap them in some way. Use Case Win32API Syck (YAML) thread socket stringio zlib digest strscan openssl sqlite3_api Setup gems ? ? ? Gem install rails ? ? ? ? ? ? Rails create app ? ? ? ? ? Start WEBrick ? ? ? ? ? WEBrick process static html page ? ? ? ? ? WEBrick process dynamic controller page ? ? ? ? ? ? ? ? ? IIS CGI dispatch ? ? ? ? ? ? I'd like to start working on some of these libraries, but first want to check who is already working on what. I understand that John Messerly is working on a YAML port and according to the WIKI, Eduardo Flores is working on stringio and Curt Hagenlocher is working on strscan. Is this list correct and complete. Is anyone else already working on any of these libraries? To support these simple use cases, typically only a small number of functions from these libraries is actually needed. If you are going to work on any of these libraries, I can provide you with a list of the actual functions and with the exact signature/overrides that are actually used by these use cases. Cheers, Wayne. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20080218/8581f474/attachment-0001.html From m.david at xmlhacker.com Sun Feb 17 22:25:45 2008 From: m.david at xmlhacker.com (M. David Peterson) Date: Sun, 17 Feb 2008 20:25:45 -0700 Subject: [Ironruby-core] Towards Rails on .NET In-Reply-To: <6821FE23D98BAC41AC2A91E7970F31AF1CCFB6405A@QUTEXMBX02.qut.edu.au> References: <47B7C115.7050809@powershell.com> <6821FE23D98BAC41AC2A91E7970F31AF1CCFB6405A@QUTEXMBX02.qut.edu.au> Message-ID: Hi Wayne, This is great! More below... On Sun, 17 Feb 2008 17:29:41 -0700, Wayne Kelly wrote: > Note, there are many different web server options that we could persue. > We could for example not worry about WEBrick and go straight to IIS as a > host and so avoid implementing the socket library. Ultimately, I think > we want to be web server agnostic, That is, we should aim to provide a > drop in replacement for "rubyw.exe" that works regardless of which web > server (IIS, Apache, WEBrick, Mongrel, etc) that administrators choose > to adopt. +1. I would suggest we adopt using either XSP or Cassini, both of which are small and capable. XSP is specifically an HTTP 1.0 server. Not sure if Cassini covers 1.1 or not. Anyone know? > That said, Windows is currently considered a second class platform for > deploying Rails and the setup can be quite complex and buggy in some > configurations. In the longer term we should aim to improve this > situation. Using either XSP or Cassini will help in that if we can get it to run via either, then getting it to run via IIS and/or through mod_mono/fastcgi should be quite a bit easier. > For production Rails we'll want to support IIS 7.0 well on server > machines, but for those that just want to try it out, I believe we > should also make sure it can be made to work on desktop machines such as > mine with IIS 5 and XP. > > Your thoughts? We need to place focus on providing support via FastCGI such that getting it to work on lighty, Apache, etc. is simple and straight forward. Using Mono's FastCGI support should make this drop dead simple. -- /M:D M. David Peterson http://mdavid.name | http://www.oreillynet.com/pub/au/2354 | http://dev.aol.com/blog/3155 From robert.brotherus at napa.fi Mon Feb 18 02:35:13 2008 From: robert.brotherus at napa.fi (Robert Brotherus) Date: Mon, 18 Feb 2008 09:35:13 +0200 Subject: [Ironruby-core] Mismatch in cases of names of events References: <50B69702CA6E6D4E849D30CD4989AB8ED7F4DE8D73@DF-GRTDANE-MSG.exchange.corp.microsoft.com><53194650933664488F3F0C3A0AB568320A0FA2@nw60.napa.fi> Message-ID: <53194650933664488F3F0C3A0AB568320A1044@nw60.napa.fi> Yes I tried, mouse_enter did not work Robert Brotherus Software architect Napa Ltd -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek Sent: 15. helmikuuta 2008 19:14 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Mismatch in cases of names of events Have you tried mouse_enter? Tomas From Jimmy.Schementi at microsoft.com Mon Feb 18 03:25:27 2008 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Mon, 18 Feb 2008 00:25:27 -0800 Subject: [Ironruby-core] Towards Rails on .NET In-Reply-To: <6821FE23D98BAC41AC2A91E7970F31AF1CCFB6405A@QUTEXMBX02.qut.edu.au> References: <47B7C115.7050809@powershell.com> <6821FE23D98BAC41AC2A91E7970F31AF1CCFB6405A@QUTEXMBX02.qut.edu.au> Message-ID: <5283CA0A4168DF4FBBD71AE9ECA5A32844F4842A31@NA-EXMSG-C116.redmond.corp.microsoft.com> I think a "sane subset" of supported web servers is the way to go. For instance, no one uses webrick anymore (most popular is mongrel for development and mongrel+apache/lighttpd for production), so supporting webrick isn't super-important. I completely agree w/the importance of being web-server agnostic. Also, webrick is a pure ruby app, so by definition we'll want to make it work in the long run. Btw, this is really cool Wayne =) ~js From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Wayne Kelly Sent: Sunday, February 17, 2008 4:30 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Towards Rails on .NET Below is a table summarizing the extension libraries that are needed by a number of simple Rails use cases. These libraries are implemented in Matz's Ruby Interpreter in C code rather than in Ruby code, so we'll need to port or at least wrap them in some way. Use Case Win32API Syck (YAML) thread socket stringio zlib digest strscan openssl sqlite3_api Setup gems * * * Gem install rails * * * * * * Rails create app * * * * * Start WEBrick * * * * * WEBrick process static html page * * * * * WEBrick process dynamic controller page * * * * * * * * * IIS CGI dispatch * * * * * * I'd like to start working on some of these libraries, but first want to check who is already working on what. I understand that John Messerly is working on a YAML port and according to the WIKI, Eduardo Flores is working on stringio and Curt Hagenlocher is working on strscan. Is this list correct and complete. Is anyone else already working on any of these libraries? To support these simple use cases, typically only a small number of functions from these libraries is actually needed. If you are going to work on any of these libraries, I can provide you with a list of the actual functions and with the exact signature/overrides that are actually used by these use cases. Obviously, other functions will also be needed long term, but by implementing these functions first we can get basic Rails functionality happening sooner. Note, there are many different web server options that we could persue. We could for example not worry about WEBrick and go straight to IIS as a host and so avoid implementing the socket library. Ultimately, I think we want to be web server agnostic, That is, we should aim to provide a drop in replacement for "rubyw.exe" that works regardless of which web server (IIS, Apache, WEBrick, Mongrel, etc) that administrators choose to adopt. That said, Windows is currently considered a second class platform for deploying Rails and the setup can be quite complex and buggy in some configurations. In the longer term we should aim to improve this situation. For production Rails we'll want to support IIS 7.0 well on server machines, but for those that just want to try it out, I believe we should also make sure it can be made to work on desktop machines such as mine with IIS 5 and XP. Your thoughts? Cheers, Wayne. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20080218/e67546c5/attachment-0001.html From lists at ruby-forum.com Mon Feb 18 04:01:52 2008 From: lists at ruby-forum.com (Aaron Clauson) Date: Mon, 18 Feb 2008 10:01:52 +0100 Subject: [Ironruby-core] String Equality Operation Message-ID: <9185cbb6b550c1ab1c215617629c75ae@ruby-forum.com> Hi There, I'm doing a bit of playing around with IronRuby and ticking along ok. One thing which I'm having difficulty with though is string equality between a string that's come from an external object. Example: mystring = $external.MyMethod puts "mystring=#{mystring}." if mystring == 'abcd' puts "Match." else puts "No match. end Output: mystring=abcd. No Match. So I can get the value from my external method ok but it's not macthing up with the IronRuby string object. Does anyone know whether this is something I'm doing wrong? Regards, Aaron -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Mon Feb 18 04:21:06 2008 From: lists at ruby-forum.com (Aaron Clauson) Date: Mon, 18 Feb 2008 10:21:06 +0100 Subject: [Ironruby-core] String Equality Operation In-Reply-To: <9185cbb6b550c1ab1c215617629c75ae@ruby-forum.com> References: <9185cbb6b550c1ab1c215617629c75ae@ruby-forum.com> Message-ID: <66563f17b70a6c4cf75cd0173ace17ab@ruby-forum.com> Found the answer for those that might come across this and are in the same boat: http://www.ruby-forum.com/topic/126197#new Working Example: mystring = $external.MyMethod.to_s puts "mystring=#{mystring}." if mystring == 'abcd' puts "Match." else puts "No match. end Output: mystring=abcd. Match. Regards, Aaron -- Posted via http://www.ruby-forum.com/. From michael.letterle at gmail.com Mon Feb 18 08:52:13 2008 From: michael.letterle at gmail.com (Michael Letterle) Date: Mon, 18 Feb 2008 08:52:13 -0500 Subject: [Ironruby-core] Towards Rails on .NET In-Reply-To: <6821FE23D98BAC41AC2A91E7970F31AF1CCFB6405A@QUTEXMBX02.qut.edu.au> References: <47B7C115.7050809@powershell.com> <6821FE23D98BAC41AC2A91E7970F31AF1CCFB6405A@QUTEXMBX02.qut.edu.au> Message-ID: Very cool list! This should be put on the wiki at Rubyforge methinks... There's still a lot to be done in the ruby core too though... there may be some dependency there for these things to work "right". I'd be interested in doing the zlib port if noone else has done anything on it yet, I just recently had to dig into zlib a bit so it's kind of fresh. Feel free to send me what needs implemented. On Feb 17, 2008 7:29 PM, Wayne Kelly wrote: > > > Below is a table summarizing the extension libraries that are needed by a > number of simple Rails use cases. These libraries are implemented in Matz's > Ruby Interpreter in C code rather than in Ruby code, so we'll need to port > or at least wrap them in some way. > > > > > > Use Case > > Win32API > > Syck > > (YAML) > > thread > > socket > > stringio > > zlib > > digest > > strscan > > openssl > > sqlite3_api > > > Setup gems > > ? > > ? > > ? > > > > > > > > > > > > > > > > > Gem install rails > > ? > > ? > > ? > > ? > > ? > > ? > > > > > > > > > > > Rails create app > > ? > > ? > > ? > > > > > > > > ? > > ? > > > > > > > Start WEBrick > > ? > > ? > > ? > > ? > > > > > > > > ? > > > > > > > WEBrick process static html page > > ? > > ? > > ? > > ? > > > > > > > > ? > > > > > > > WEBrick process dynamic controller page > > ? > > ? > > ? > > ? > > ? > > > > ? > > ? > > ? > > ? > > > IIS CGI dispatch > > ? > > ? > > ? > > > > > > > > ? > > ? > > ? > > > > I'd like to start working on some of these libraries, but first want to > check who is already working on what. I understand that John Messerly is > working on a YAML port and according to the WIKI, Eduardo Flores is working > on stringio and Curt Hagenlocher is working on strscan. Is this list correct > and complete. Is anyone else already working on any of these libraries? > > To support these simple use cases, typically only a small number of > functions from these libraries is actually needed. If you are going to work > on any of these libraries, I can provide you with a list of the actual > functions and with the exact signature/overrides that are actually used by > these use cases. Obviously, other functions will also be needed long term, > but by implementing these functions first we can get basic Rails > functionality happening sooner. > > Note, there are many different web server options that we could persue. We > could for example not worry about WEBrick and go straight to IIS as a host > and so avoid implementing the socket library. Ultimately, I think we want to > be web server agnostic, That is, we should aim to provide a drop in > replacement for "rubyw.exe" that works regardless of which web server (IIS, > Apache, WEBrick, Mongrel, etc) that administrators choose to adopt. That > said, Windows is currently considered a second class platform for deploying > Rails and the setup can be quite complex and buggy in some configurations. > In the longer term we should aim to improve this situation. For production > Rails we'll want to support IIS 7.0 well on server machines, but for those > that just want to try it out, I believe we should also make sure it can be > made to work on desktop machines such as mine with IIS 5 and XP. > Your thoughts? > > Cheers, Wayne. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -- Michael Letterle [Polymath Programmer] http://michaeldotnet.blogspot.com From jflam at microsoft.com Mon Feb 18 10:14:02 2008 From: jflam at microsoft.com (John Lam (DLR)) Date: Mon, 18 Feb 2008 07:14:02 -0800 Subject: [Ironruby-core] String Equality Operation In-Reply-To: <66563f17b70a6c4cf75cd0173ace17ab@ruby-forum.com> References: <9185cbb6b550c1ab1c215617629c75ae@ruby-forum.com> <66563f17b70a6c4cf75cd0173ace17ab@ruby-forum.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D912A2AB6@NA-EXMSG-C115.redmond.corp.microsoft.com> Aaron Clauson: > mystring = $external.MyMethod.to_s > puts "mystring=#{mystring}." > > if mystring == 'abcd' > puts "Match." > else > puts "No match. > end If you look at the class of each of your strings you'll find that they are currently different types. mystring should be a ClrString and 'abcd' is a String. If you do mystring.to_s == 'abcd' it should return true. We're working on a plan to unify all string types and do lazy conversions as necessary. We're slammed doing MIX work so that won't start happening until we're locked down for MIX (at least a couple of weeks or so). Thanks -John From lists at ruby-forum.com Mon Feb 18 10:25:32 2008 From: lists at ruby-forum.com (Softmind Technology) Date: Mon, 18 Feb 2008 16:25:32 +0100 Subject: [Ironruby-core] IronRuby (Without MVC ) and ActiveRecord... Is it Possib In-Reply-To: References: <5b0c6acc1ee9a93b90e8c1d238280971@ruby-forum.com> <19893d51e2b11623238211584410a98d@ruby-forum.com> Message-ID: Hi, Can some one from IronRuby team, focus more on this. BTW... Did Ruby.Net in the past had implemented this Active Record to work with any .Net languages on CLR. Which ORM was supported by Ruby.Net... Thanks -- Posted via http://www.ruby-forum.com/. From bacondarwin at googlemail.com Mon Feb 18 12:46:29 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Mon, 18 Feb 2008 17:46:29 -0000 Subject: [Ironruby-core] IronRuby (Without MVC ) and ActiveRecord... Is it Possib In-Reply-To: References: <5b0c6acc1ee9a93b90e8c1d238280971@ruby-forum.com> <19893d51e2b11623238211584410a98d@ruby-forum.com> Message-ID: <000601c87256$35137280$9f3a5780$@com> Softmind Technology wrote: > Can some one from IronRuby team, focus more on this. I don't mean to be difficult but why? I think you need to give some kind of justification for your requests. Otherwise how can the people working on IronRuby prioritize their work? Of course, since IR is open source you could get involved and develop Active Record yourself if you wanted. By the way, I suspect that ActiveRecord itself is written in Ruby and so should just work straight out in IR but of course what you actually want is someone to get the various database drivers up and running, which is what Wayne was talking about in an earlier post today. Regards, Pete From jflam at microsoft.com Mon Feb 18 13:53:21 2008 From: jflam at microsoft.com (John Lam (DLR)) Date: Mon, 18 Feb 2008 10:53:21 -0800 Subject: [Ironruby-core] Towards Rails on .NET In-Reply-To: <6821FE23D98BAC41AC2A91E7970F31AF1CCFB64073@QUTEXMBX02.qut.edu.au> References: <47B7C115.7050809@powershell.com> <6821FE23D98BAC41AC2A91E7970F31AF1CCFB64073@QUTEXMBX02.qut.edu.au> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D912A2C25@NA-EXMSG-C115.redmond.corp.microsoft.com> Wayne Kelly: > I'd like to start working on some of these libraries, but first want > to check who is already working on what. I understand that John > Messerly is working on a YAML port and according to the WIKI, Eduardo > Flores is working on stringio and Curt Hagenlocher is working on > strscan. Is this list correct and complete. Is anyone else already > working on any of these libraries? I think it would be awesome if you could start investigating the openssl and zlib support. Both of these are on the critical path to getting Rails to work and don't have other folks looking at them AFAIK. I think it is important to look at integration with IIS 7 + fastcgi, and then looking at back-porting to IIS 6 as a lower priority. I'm still working on the status app. Wayne has already provided me with the dynamic method traces of these scenarios. Wayne, if you want feel free to make those files available to the group (I don't think the list will make it easy to do this, so uploading them to a server and providing a link will likely be the best way to do this). Thanks, -John From ivan at flanders.co.nz Mon Feb 18 15:30:57 2008 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Tue, 19 Feb 2008 09:30:57 +1300 Subject: [Ironruby-core] requiring .NET assemblies Message-ID: Hi, I ran into a pretty weird issue, I tried to use some of the .NET ORM's with IronRuby. I haven't investigated with the debugger turned on yet but here's what I observed I tried this with ActiveRecord from Castle, SubSonic and LightSpeed. Linq2Sql doesn't have a problem. What the first 3 ORM's have in common is that I can use the types in the actual ORM library. All of those ORM's require you to have a generic base class. If I include other types in the assembly (non generic base classes) then I can just use those classes. When I create a type with a generic base class that is defined in the same assembly I can use that class in IronRuby For SubSonic a Customer class could look like: *public class Customer : ActiveRecord{ // model code here }* The output from the console session that shows the behavior. I tried a lot of different approaches but it always boils down to the same error. *IronRuby 0.1 on .NET 2.0.50727.1434 Copyright (c) Microsoft Corporation. All rights reserved. Note that local variables do not work today in the console. As a workaround, use globals instead (eg $x = 42 instead of x = 42). >>> require 'mscorlib' => true >>> require Dir.getwd + '/SubSonic.dll' => true >>> require Dir.getwd + '/DataAccess.SubSonic.dll' => true >>> include DataAccess::SubSonic => Object >>> Customer.new IronRuby.Libraries:0:in `ConstantMissing': uninitialized constant Object::Customer (NameError) from :0:in `main' from :0:in `##16' >>> exit* Is this a bug or is it a case of me missing something? Cheers Ivan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20080219/1efe70ca/attachment.html From enicholson at gmail.com Mon Feb 18 15:51:38 2008 From: enicholson at gmail.com (Eric Nicholson) Date: Mon, 18 Feb 2008 15:51:38 -0500 Subject: [Ironruby-core] requiring .NET assemblies In-Reply-To: References: Message-ID: Where is the assembly that contains Customer? Is that " DataAccess.SubSonic.dll"? BTW: ActiveRecord (from Castle) does not require you to inherit ActiveRecordBase. You can just mark up your classes with attributes and use ActiveRecordMediator for all the CRUD. -Eric On Feb 18, 2008 3:30 PM, Ivan Porto Carrero wrote: > Hi, > > I ran into a pretty weird issue, I tried to use some of the .NET ORM's > with IronRuby. > I haven't investigated with the debugger turned on yet but here's what I > observed > > I tried this with ActiveRecord from Castle, SubSonic and LightSpeed. > Linq2Sql doesn't have a problem. > > What the first 3 ORM's have in common is that I can use the types in the > actual ORM library. All of those ORM's require you to have a generic base > class. > If I include other types in the assembly (non generic base classes) then I > can just use those classes. > When I create a type with a generic base class that is defined in the same > assembly I can use that class in IronRuby > > For SubSonic a Customer class could look like: > > *public class Customer : ActiveRecord{ > // model code here > }* > > The output from the console session that shows the behavior. I tried a lot > of different approaches but it always boils down to the same error. > > *IronRuby 0.1 on .NET 2.0.50727.1434 > Copyright (c) Microsoft Corporation. All rights reserved. > > Note that local variables do not work today in the console. > As a workaround, use globals instead (eg $x = 42 instead of x = 42). > > >>> require 'mscorlib' > => true > >>> require Dir.getwd + '/SubSonic.dll' > => true > >>> require Dir.getwd + '/DataAccess.SubSonic.dll' > => true > >>> include DataAccess::SubSonic > => Object > >>> Customer.new > IronRuby.Libraries:0:in `ConstantMissing': uninitialized constant > Object::Customer (NameError) > from :0:in `main' > from :0:in `##16' > >>> exit* > > Is this a bug or is it a case of me missing something? > > Cheers > Ivan > > _______________________________________________ > 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/20080218/d6fd779d/attachment-0001.html From w.kelly at qut.edu.au Mon Feb 18 17:35:21 2008 From: w.kelly at qut.edu.au (Wayne Kelly) Date: Tue, 19 Feb 2008 08:35:21 +1000 Subject: [Ironruby-core] Towards Rails on .NET In-Reply-To: References: <47B7C115.7050809@powershell.com> <6821FE23D98BAC41AC2A91E7970F31AF1CCFB6405A@QUTEXMBX02.qut.edu.au>, Message-ID: <6821FE23D98BAC41AC2A91E7970F31AF1CCF7275F9@QUTEXMBX02.qut.edu.au> > From: ironruby-core-bounces at rubyforge.org [ironruby-core-bounces at rubyforge.org] On Behalf Of > Michael Letterle [michael.letterle at gmail.com] > Sent: Monday, 18 February 2008 11:52 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Towards Rails on .NET > > I'd be interested in doing the zlib port if noone else has done > anything on it yet, I just recently had to dig into zlib a bit so it's > kind of fresh. Feel free to send me what needs implemented. Sounds good to me, but before we go too far down this path, perhaps we should discuss the ground rules for implementing these extension libraries. CRuby implements many of these libraries as CRuby specific thin C wrappers around functionality provided by other native open source libraries. To build CRuby for Rails from source you need to go to various other open source projects, download and compile each of their bits and make sure their binaries are present on the right path. What approaches are deemed acceptable within the IronRuby project? Firstly, is it OK to have dependences on other open source project or do we need to implement all of these components from scratch? Secondly, is it OK to have dependences on native libraries rather than on fully managed libraries? (note these are two separate issues). Having our own fully managed implementations would have many advantages, but would require more work and wouldn't keep pace with advances made in those other libraries. Wrapping the same native libraries as C Ruby will also increase our compatability. I'm not proposing policy here, I'm just raising issues and asking for guidence. The other issue is where to we put these libraries once we start developing them? It would be nice to have them all in the same place, even in their early stages of development. Each I imagine would be a separate library, so they wouldn't interfere with one another. I assume they will not become part of the IronRuby.Libraries project. Perhaps they could be put into a separate RubyForge project initially that external contributors could directly upload to, and then if necessary moved into some kind of official tree as they mature? Cheers, Wayne. From curt at hagenlocher.org Mon Feb 18 19:37:15 2008 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Mon, 18 Feb 2008 16:37:15 -0800 Subject: [Ironruby-core] requiring .NET assemblies In-Reply-To: References: Message-ID: So, the Customer class was generated by SubSonic and is contained in DataAccess.Subsonic.dll? Do you get the same results by leaving out the include and saying DataAccess::SubSonic::Customer.new instead? On Feb 18, 2008 12:30 PM, Ivan Porto Carrero wrote: > Hi, > > I ran into a pretty weird issue, I tried to use some of the .NET ORM's > with IronRuby. > I haven't investigated with the debugger turned on yet but here's what I > observed > > I tried this with ActiveRecord from Castle, SubSonic and LightSpeed. > Linq2Sql doesn't have a problem. > > What the first 3 ORM's have in common is that I can use the types in the > actual ORM library. All of those ORM's require you to have a generic base > class. > If I include other types in the assembly (non generic base classes) then I > can just use those classes. > When I create a type with a generic base class that is defined in the same > assembly I can use that class in IronRuby > > For SubSonic a Customer class could look like: > > *public class Customer : ActiveRecord{ > // model code here > }* > > The output from the console session that shows the behavior. I tried a lot > of different approaches but it always boils down to the same error. > > *IronRuby 0.1 on .NET 2.0.50727.1434 > Copyright (c) Microsoft Corporation. All rights reserved. > > Note that local variables do not work today in the console. > As a workaround, use globals instead (eg $x = 42 instead of x = 42). > > >>> require 'mscorlib' > => true > >>> require Dir.getwd + '/SubSonic.dll' > => true > >>> require Dir.getwd + '/DataAccess.SubSonic.dll' > => true > >>> include DataAccess::SubSonic > => Object > >>> Customer.new > IronRuby.Libraries:0:in `ConstantMissing': uninitialized constant > Object::Customer (NameError) > from :0:in `main' > from :0:in `##16' > >>> exit* > > Is this a bug or is it a case of me missing something? > > Cheers > Ivan > > _______________________________________________ > 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/20080218/50ea5dc5/attachment.html From w.kelly at qut.edu.au Mon Feb 18 20:12:21 2008 From: w.kelly at qut.edu.au (Wayne Kelly) Date: Tue, 19 Feb 2008 11:12:21 +1000 Subject: [Ironruby-core] MergeLocation bug Message-ID: <6821FE23D98BAC41AC2A91E7970F31AF1CCF7275FA@QUTEXMBX02.qut.edu.au> A Parser/scanner bug has been introduced in lastest revision. We used to be able to successfully parse rubygems-1.0.1\setup.rb but it now raises an assertion error in SourceSpan::ValidateLocations. The problem lies in the Parser::MergeLocations method which I believe needs to be able to deal with the case where the end span lies before the start span. This occurs when there is a production with an empty RHS. Such a scenario should produce a span of width 0. I also note that the arguments to MergeLocation on line 350 of GPPG.cs have been reversed - I'm not sure that is correct. Cheers, Wayne. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20080219/187e733f/attachment.html From ivan at flanders.co.nz Mon Feb 18 21:19:08 2008 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Tue, 19 Feb 2008 15:19:08 +1300 Subject: [Ironruby-core] requiring .NET assemblies In-Reply-To: References: Message-ID: Yep On Feb 19, 2008 1:37 PM, Curt Hagenlocher wrote: > So, the Customer class was generated by SubSonic and is contained in > DataAccess.Subsonic.dll? Do you get the same results by leaving out the > include and saying > > DataAccess::SubSonic::Customer.new > > instead? > On Feb 18, 2008 12:30 PM, Ivan Porto Carrero wrote: > > > Hi, > > > > I ran into a pretty weird issue, I tried to use some of the .NET ORM's > > with IronRuby. > > I haven't investigated with the debugger turned on yet but here's what I > > observed > > > > I tried this with ActiveRecord from Castle, SubSonic and LightSpeed. > > Linq2Sql doesn't have a problem. > > > > What the first 3 ORM's have in common is that I can use the types in the > > actual ORM library. All of those ORM's require you to have a generic base > > class. > > If I include other types in the assembly (non generic base classes) then > > I can just use those classes. > > When I create a type with a generic base class that is defined in the > > same assembly I can use that class in IronRuby > > > > For SubSonic a Customer class could look like: > > > > *public class Customer : ActiveRecord{ > > // model code here > > }* > > > > The output from the console session that shows the behavior. I tried a > > lot of different approaches but it always boils down to the same error. > > > > *IronRuby 0.1 on .NET 2.0.50727.1434 > > Copyright (c) Microsoft Corporation. All rights reserved. > > > > Note that local variables do not work today in the console. > > As a workaround, use globals instead (eg $x = 42 instead of x = 42). > > > > >>> require 'mscorlib' > > => true > > >>> require Dir.getwd + '/SubSonic.dll' > > => true > > >>> require Dir.getwd + '/DataAccess.SubSonic.dll' > > => true > > >>> include DataAccess::SubSonic > > => Object > > >>> Customer.new > > IronRuby.Libraries:0:in `ConstantMissing': uninitialized constant > > Object::Customer (NameError) > > from :0:in `main' > > from :0:in `##16' > > >>> exit* > > > > Is this a bug or is it a case of me missing something? > > > > Cheers > > Ivan > > > > _______________________________________________ > > Ironruby-core mailing list > > Ironruby-core at rubyforge.org > > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20080219/3a488d33/attachment.html From ivan at flanders.co.nz Mon Feb 18 21:45:02 2008 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Tue, 19 Feb 2008 15:45:02 +1300 Subject: [Ironruby-core] requiring .NET assemblies In-Reply-To: References: Message-ID: Yep the same thing happens, and i can elaborate on that If it's an assembly which only contains ie. ActiveRecord types then i can't even execute include DataAccess::SubSonic I tried many variations on the theme. Tried with signed assemblies vs unsigned ones, tried different syntax structures, tried it in the console and in a file. On Feb 19, 2008 1:37 PM, Curt Hagenlocher wrote: > So, the Customer class was generated by SubSonic and is contained in > DataAccess.Subsonic.dll? Do you get the same results by leaving out the > include and saying > > DataAccess::SubSonic::Customer.new > > instead? > On Feb 18, 2008 12:30 PM, Ivan Porto Carrero wrote: > > > Hi, > > > > I ran into a pretty weird issue, I tried to use some of the .NET ORM's > > with IronRuby. > > I haven't investigated with the debugger turned on yet but here's what I > > observed > > > > I tried this with ActiveRecord from Castle, SubSonic and LightSpeed. > > Linq2Sql doesn't have a problem. > > > > What the first 3 ORM's have in common is that I can use the types in the > > actual ORM library. All of those ORM's require you to have a generic base > > class. > > If I include other types in the assembly (non generic base classes) then > > I can just use those classes. > > When I create a type with a generic base class that is defined in the > > same assembly I can use that class in IronRuby > > > > For SubSonic a Customer class could look like: > > > > *public class Customer : ActiveRecord{ > > // model code here > > }* > > > > The output from the console session that shows the behavior. I tried a > > lot of different approaches but it always boils down to the same error. > > > > *IronRuby 0.1 on .NET 2.0.50727.1434 > > Copyright (c) Microsoft Corporation. All rights reserved. > > > > Note that local variables do not work today in the console. > > As a workaround, use globals instead (eg $x = 42 instead of x = 42). > > > > >>> require 'mscorlib' > > => true > > >>> require Dir.getwd + '/SubSonic.dll' > > => true > > >>> require Dir.getwd + '/DataAccess.SubSonic.dll' > > => true > > >>> include DataAccess::SubSonic > > => Object > > >>> Customer.new > > IronRuby.Libraries:0:in `ConstantMissing': uninitialized constant > > Object::Customer (NameError) > > from :0:in `main' > > from :0:in `##16' > > >>> exit* > > > > Is this a bug or is it a case of me missing something? > > > > Cheers > > Ivan > > > > _______________________________________________ > > Ironruby-core mailing list > > Ironruby-core at rubyforge.org > > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20080219/c7156a7d/attachment-0001.html From curt at hagenlocher.org Mon Feb 18 22:34:36 2008 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Mon, 18 Feb 2008 19:34:36 -0800 Subject: [Ironruby-core] requiring .NET assemblies In-Reply-To: References: Message-ID: I got basically the same result when trying to use a SubSonic-generated DLL from IronPython. The Assembly.GetTypes function wasn't able to resolve the generated classes because "Could not load file or assembly 'SubSonic, Version=2.0.3.0, Culture=neutral, PublicKeyToken=eadb47849839a332' or one of its dependencies" The problem went away when I copied the SubSonic DLLs into the same directory as the executable. On Feb 18, 2008 6:19 PM, Ivan Porto Carrero wrote: > Yep > > > On Feb 19, 2008 1:37 PM, Curt Hagenlocher wrote: > > > So, the Customer class was generated by SubSonic and is contained in > > DataAccess.Subsonic.dll? Do you get the same results by leaving out the > > include and saying > > > > DataAccess::SubSonic::Customer.new > > > > instead? > > On Feb 18, 2008 12:30 PM, Ivan Porto Carrero > > wrote: > > > > > Hi, > > > > > > I ran into a pretty weird issue, I tried to use some of the .NET ORM's > > > with IronRuby. > > > I haven't investigated with the debugger turned on yet but here's what > > > I observed > > > > > > I tried this with ActiveRecord from Castle, SubSonic and LightSpeed. > > > Linq2Sql doesn't have a problem. > > > > > > What the first 3 ORM's have in common is that I can use the types in > > > the actual ORM library. All of those ORM's require you to have a generic > > > base class. > > > If I include other types in the assembly (non generic base classes) > > > then I can just use those classes. > > > When I create a type with a generic base class that is defined in the > > > same assembly I can use that class in IronRuby > > > > > > For SubSonic a Customer class could look like: > > > > > > *public class Customer : ActiveRecord{ > > > // model code here > > > }* > > > > > > The output from the console session that shows the behavior. I tried a > > > lot of different approaches but it always boils down to the same error. > > > > > > *IronRuby 0.1 on .NET 2.0.50727.1434 > > > Copyright (c) Microsoft Corporation. All rights reserved. > > > > > > Note that local variables do not work today in the console. > > > As a workaround, use globals instead (eg $x = 42 instead of x = 42). > > > > > > >>> require 'mscorlib' > > > => true > > > >>> require Dir.getwd + '/SubSonic.dll' > > > => true > > > >>> require Dir.getwd + '/DataAccess.SubSonic.dll' > > > => true > > > >>> include DataAccess::SubSonic > > > => Object > > > >>> Customer.new > > > IronRuby.Libraries:0:in `ConstantMissing': uninitialized constant > > > Object::Customer (NameError) > > > from :0:in `main' > > > from :0:in `##16' > > > >>> exit* > > > > > > Is this a bug or is it a case of me missing something? > > > > > > Cheers > > > Ivan > > > > > > _______________________________________________ > > > Ironruby-core mailing list > > > Ironruby-core at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > > > > > > > _______________________________________________ > > Ironruby-core mailing list > > Ironruby-core at rubyforge.org > > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20080218/e1288b23/attachment.html From ivan at flanders.co.nz Mon Feb 18 22:46:47 2008 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Tue, 19 Feb 2008 16:46:47 +1300 Subject: [Ironruby-core] requiring .NET assemblies In-Reply-To: References: Message-ID: ah k I'll try that thanks On Feb 19, 2008 4:34 PM, Curt Hagenlocher wrote: > I got basically the same result when trying to use a SubSonic-generated > DLL from IronPython. The Assembly.GetTypes function wasn't able to > resolve the generated classes because "Could not load file or assembly > 'SubSonic, Version=2.0.3.0, Culture=neutral, > PublicKeyToken=eadb47849839a332' or one of its dependencies" > The problem went away when I copied the SubSonic DLLs into the same > directory as the executable. > On Feb 18, 2008 6:19 PM, Ivan Porto Carrero wrote: > > > Yep > > > > > > On Feb 19, 2008 1:37 PM, Curt Hagenlocher wrote: > > > > > So, the Customer class was generated by SubSonic and is contained in > > > DataAccess.Subsonic.dll? Do you get the same results by leaving out > > > the include and saying > > > > > > DataAccess::SubSonic::Customer.new > > > > > > instead? > > > On Feb 18, 2008 12:30 PM, Ivan Porto Carrero > > > wrote: > > > > > > > Hi, > > > > > > > > I ran into a pretty weird issue, I tried to use some of the .NET > > > > ORM's with IronRuby. > > > > I haven't investigated with the debugger turned on yet but here's > > > > what I observed > > > > > > > > I tried this with ActiveRecord from Castle, SubSonic and LightSpeed. > > > > Linq2Sql doesn't have a problem. > > > > > > > > What the first 3 ORM's have in common is that I can use the types in > > > > the actual ORM library. All of those ORM's require you to have a generic > > > > base class. > > > > If I include other types in the assembly (non generic base classes) > > > > then I can just use those classes. > > > > When I create a type with a generic base class that is defined in > > > > the same assembly I can use that class in IronRuby > > > > > > > > For SubSonic a Customer class could look like: > > > > > > > > *public class Customer : ActiveRecord{ > > > > // model code here > > > > }* > > > > > > > > The output from the console session that shows the behavior. I tried > > > > a lot of different approaches but it always boils down to the same error. > > > > > > > > *IronRuby 0.1 on .NET 2.0.50727.1434 > > > > Copyright (c) Microsoft Corporation. All rights reserved. > > > > > > > > Note that local variables do not work today in the console. > > > > As a workaround, use globals instead (eg $x = 42 instead of x = 42). > > > > > > > > >>> require 'mscorlib' > > > > => true > > > > >>> require Dir.getwd + '/SubSonic.dll' > > > > => true > > > > >>> require Dir.getwd + '/DataAccess.SubSonic.dll' > > > > => true > > > > >>> include DataAccess::SubSonic > > > > => Object > > > > >>> Customer.new > > > > IronRuby.Libraries:0:in `ConstantMissing': uninitialized constant > > > > Object::Customer (NameError) > > > > from :0:in `main' > > > > from :0:in `##16' > > > > >>> exit* > > > > > > > > Is this a bug or is it a case of me missing something? > > > > > > > > Cheers > > > > Ivan > > > > > > > > _______________________________________________ > > > > Ironruby-core mailing list > > > > Ironruby-core at rubyforge.org > > > > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > > > > > > > > > > > _______________________________________________ > > > Ironruby-core mailing list > > > Ironruby-core at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > > > > > > > _______________________________________________ > > Ironruby-core mailing list > > Ironruby-core at rubyforge.org > > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20080219/e9050b8d/attachment.html From ivan at flanders.co.nz Mon Feb 18 22:51:33 2008 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Tue, 19 Feb 2008 16:51:33 +1300 Subject: [Ironruby-core] requiring .NET assemblies In-Reply-To: References: Message-ID: Thanks a lot that works :) On Feb 19, 2008 4:34 PM, Curt Hagenlocher wrote: > I got basically the same result when trying to use a SubSonic-generated > DLL from IronPython. The Assembly.GetTypes function wasn't able to > resolve the generated classes because "Could not load file or assembly > 'SubSonic, Version=2.0.3.0, Culture=neutral, > PublicKeyToken=eadb47849839a332' or one of its dependencies" > The problem went away when I copied the SubSonic DLLs into the same > directory as the executable. > On Feb 18, 2008 6:19 PM, Ivan Porto Carrero wrote: > > > Yep > > > > > > On Feb 19, 2008 1:37 PM, Curt Hagenlocher wrote: > > > > > So, the Customer class was generated by SubSonic and is contained in > > > DataAccess.Subsonic.dll? Do you get the same results by leaving out > > > the include and saying > > > > > > DataAccess::SubSonic::Customer.new > > > > > > instead? > > > On Feb 18, 2008 12:30 PM, Ivan Porto Carrero > > > wrote: > > > > > > > Hi, > > > > > > > > I ran into a pretty weird issue, I tried to use some of the .NET > > > > ORM's with IronRuby. > > > > I haven't investigated with the debugger turned on yet but here's > > > > what I observed > > > > > > > > I tried this with ActiveRecord from Castle, SubSonic and LightSpeed. > > > > Linq2Sql doesn't have a problem. > > > > > > > > What the first 3 ORM's have in common is that I can use the types in > > > > the actual ORM library. All of those ORM's require you to have a generic > > > > base class. > > > > If I include other types in the assembly (non generic base classes) > > > > then I can just use those classes. > > > > When I create a type with a generic base class that is defined in > > > > the same assembly I can use that class in IronRuby > > > > > > > > For SubSonic a Customer class could look like: > > > > > > > > *public class Customer : ActiveRecord{ > > > > // model code here > > > > }* > > > > > > > > The output from the console session that shows the behavior. I tried > > > > a lot of different approaches but it always boils down to the same error. > > > > > > > > *IronRuby 0.1 on .NET 2.0.50727.1434 > > > > Copyright (c) Microsoft Corporation. All rights reserved. > > > > > > > > Note that local variables do not work today in the console. > > > > As a workaround, use globals instead (eg $x = 42 instead of x = 42). > > > > > > > > >>> require 'mscorlib' > > > > => true > > > > >>> require Dir.getwd + '/SubSonic.dll' > > > > => true > > > > >>> require Dir.getwd + '/DataAccess.SubSonic.dll' > > > > => true > > > > >>> include DataAccess::SubSonic > > > > => Object > > > > >>> Customer.new > > > > IronRuby.Libraries:0:in `ConstantMissing': uninitialized constant > > > > Object::Customer (NameError) > > > > from :0:in `main' > > > > from :0:in `##16' > > > > >>> exit* > > > > > > > > Is this a bug or is it a case of me missing something? > > > > > > > > Cheers > > > > Ivan > > > > > > > > _______________________________________________ > > > > Ironruby-core mailing list > > > > Ironruby-core at rubyforge.org > > > > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > > > > > > > > > > > _______________________________________________ > > > Ironruby-core mailing list > > > Ironruby-core at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > > > > > > > _______________________________________________ > > Ironruby-core mailing list > > Ironruby-core at rubyforge.org > > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20080219/e1c209c7/attachment-0001.html From ivan at flanders.co.nz Mon Feb 18 23:02:52 2008 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Tue, 19 Feb 2008 17:02:52 +1300 Subject: [Ironruby-core] requiring .NET assemblies In-Reply-To: References: Message-ID: You also have to create an rbx.config file otherwise it doesn't know how to find the config file. On Feb 19, 2008 4:34 PM, Curt Hagenlocher wrote: > I got basically the same result when trying to use a SubSonic-generated > DLL from IronPython. The Assembly.GetTypes function wasn't able to > resolve the generated classes because "Could not load file or assembly > 'SubSonic, Version=2.0.3.0, Culture=neutral, > PublicKeyToken=eadb47849839a332' or one of its dependencies" > The problem went away when I copied the SubSonic DLLs into the same > directory as the executable. > On Feb 18, 2008 6:19 PM, Ivan Porto Carrero wrote: > > > Yep > > > > > > On Feb 19, 2008 1:37 PM, Curt Hagenlocher wrote: > > > > > So, the Customer class was generated by SubSonic and is contained in > > > DataAccess.Subsonic.dll? Do you get the same results by leaving out > > > the include and saying > > > > > > DataAccess::SubSonic::Customer.new > > > > > > instead? > > > On Feb 18, 2008 12:30 PM, Ivan Porto Carrero > > > wrote: > > > > > > > Hi, > > > > > > > > I ran into a pretty weird issue, I tried to use some of the .NET > > > > ORM's with IronRuby. > > > > I haven't investigated with the debugger turned on yet but here's > > > > what I observed > > > > > > > > I tried this with ActiveRecord from Castle, SubSonic and LightSpeed. > > > > Linq2Sql doesn't have a problem. > > > > > > > > What the first 3 ORM's have in common is that I can use the types in > > > > the actual ORM library. All of those ORM's require you to have a generic > > > > base class. > > > > If I include other types in the assembly (non generic base classes) > > > > then I can just use those classes. > > > > When I create a type with a generic base class that is defined in > > > > the same assembly I can use that class in IronRuby > > > > > > > > For SubSonic a Customer class could look like: > > > > > > > > *public class Customer : ActiveRecord{ > > > > // model code here > > > > }* > > > > > > > > The output from the console session that shows the behavior. I tried > > > > a lot of different approaches but it always boils down to the same error. > > > > > > > > *IronRuby 0.1 on .NET 2.0.50727.1434 > > > > Copyright (c) Microsoft Corporation. All rights reserved. > > > > > > > > Note that local variables do not work today in the console. > > > > As a workaround, use globals instead (eg $x = 42 instead of x = 42). > > > > > > > > >>> require 'mscorlib' > > > > => true > > > > >>> require Dir.getwd + '/SubSonic.dll' > > > > => true > > > > >>> require Dir.getwd + '/DataAccess.SubSonic.dll' > > > > => true > > > > >>> include DataAccess::SubSonic > > > > => Object > > > > >>> Customer.new > > > > IronRuby.Libraries:0:in `ConstantMissing': uninitialized constant > > > > Object::Customer (NameError) > > > > from :0:in `main' > > > > from :0:in `##16' > > > > >>> exit* > > > > > > > > Is this a bug or is it a case of me missing something? > > > > > > > > Cheers > > > > Ivan > > > > > > > > _______________________________________________ > > > > Ironruby-core mailing list > > > > Ironruby-core at rubyforge.org > > > > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > > > > > > > > > > > _______________________________________________ > > > Ironruby-core mailing list > > > Ironruby-core at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > > > > > > > _______________________________________________ > > Ironruby-core mailing list > > Ironruby-core at rubyforge.org > > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20080219/483d31fe/attachment.html From Tomas.Matousek at microsoft.com Mon Feb 18 23:03:10 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Mon, 18 Feb 2008 20:03:10 -0800 Subject: [Ironruby-core] MergeLocation bug In-Reply-To: <6821FE23D98BAC41AC2A91E7970F31AF1CCF7275FA@QUTEXMBX02.qut.edu.au> References: <6821FE23D98BAC41AC2A91E7970F31AF1CCF7275FA@QUTEXMBX02.qut.edu.au> Message-ID: Will look at it. Thanks! Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Wayne Kelly Sent: Monday, February 18, 2008 5:12 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] MergeLocation bug A Parser/scanner bug has been introduced in lastest revision. We used to be able to successfully parse rubygems-1.0.1\setup.rb but it now raises an assertion error in SourceSpan::ValidateLocations. The problem lies in the Parser::MergeLocations method which I believe needs to be able to deal with the case where the end span lies before the start span. This occurs when there is a production with an empty RHS. Such a scenario should produce a span of width 0. I also note that the arguments to MergeLocation on line 350 of GPPG.cs have been reversed - I'm not sure that is correct. Cheers, Wayne. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20080218/a5f5eb26/attachment.html From lists at ruby-forum.com Mon Feb 18 23:17:21 2008 From: lists at ruby-forum.com (Aaron Clauson) Date: Tue, 19 Feb 2008 05:17:21 +0100 Subject: [Ironruby-core] Can't run script after engine exception Message-ID: <4dfe22b63984313e8e1b201708929135@ruby-forum.com> Hi All, I've got a problem where if I execute a Ruby script that has a syntax error or missing method and that correctly fails I cannot use that engine object to subsequently execute a valid script. If I restart the application and re-execute the corrected script it works. It's only executing an erroneous script and then a valid script that fails. The code I'm using to run the script is: IScriptEnvironment scriptEnvironment = IronRuby.CreateRuntime(); IScriptEngine rubyengine = IronRuby.GetEngine(scriptEnvironment); SourceUnit scriptSource = rubyengine.CreateScriptSourceFromString(myScript); IScriptScope scope = rubyengine.CreateScope(); rubyengine.Execute(scope, scriptSource); Does anyone know if there is anyway to re-initialise the Ruby engine after a syntax or methodmissing exception so scripts can be executed again without needing to restart the application? Regards, Aaron -- Posted via http://www.ruby-forum.com/. From Tomas.Matousek at microsoft.com Mon Feb 18 23:32:42 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Mon, 18 Feb 2008 20:32:42 -0800 Subject: [Ironruby-core] Can't run script after engine exception In-Reply-To: <4dfe22b63984313e8e1b201708929135@ruby-forum.com> References: <4dfe22b63984313e8e1b201708929135@ruby-forum.com> Message-ID: Could you sent a full repro containing the source code of both scripts and the order of execution? Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Aaron Clauson Sent: Monday, February 18, 2008 8:17 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Can't run script after engine exception Hi All, I've got a problem where if I execute a Ruby script that has a syntax error or missing method and that correctly fails I cannot use that engine object to subsequently execute a valid script. If I restart the application and re-execute the corrected script it works. It's only executing an erroneous script and then a valid script that fails. The code I'm using to run the script is: IScriptEnvironment scriptEnvironment = IronRuby.CreateRuntime(); IScriptEngine rubyengine = IronRuby.GetEngine(scriptEnvironment); SourceUnit scriptSource = rubyengine.CreateScriptSourceFromString(myScript); IScriptScope scope = rubyengine.CreateScope(); rubyengine.Execute(scope, scriptSource); Does anyone know if there is anyway to re-initialise the Ruby engine after a syntax or methodmissing exception so scripts can be executed again without needing to restart the application? Regards, Aaron -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From w.kelly at qut.edu.au Mon Feb 18 23:43:37 2008 From: w.kelly at qut.edu.au (Wayne Kelly) Date: Tue, 19 Feb 2008 14:43:37 +1000 Subject: [Ironruby-core] Singleton methods on builtin global constants Message-ID: <6821FE23D98BAC41AC2A91E7970F31AF1CCF7275FC@QUTEXMBX02.qut.edu.au> I've been looking into implementing environment variable lookup, eg ENV['RUBYOPT'] (as it is required for gems setup). ENV is a builtin global constant. In the CRuby implementation it points to a plain old Ruby object that has a number of singleton methods defined on it, including [] which is used for looking up a specified environment variable. In IronRuby the RubyExecutionContext class has a method called InitializeGlobalConstants which seems to be used to initialize such global constants. It's therefore easy enough to define a new global variable called "ENV" and to initialize it to an object. But where then do we attach the 38 singleton methods to this class? These environment methods will presumably be implemented in the IronRuby.Libraries assembly? The method attributes and automatic class init generator allows singleton methods to be automatically added to modules, but doesn't appear to support adding singleton methods to well known objects. You can't even write the initialization code manually in say InitializeGlobalConstants as the methods that are needed are from the IronRuby.Library assembly which is not referenced by the Ruby assembly. It seems there are three choices: 1) somehow extend the attribute and automatic generator mechanism to allow singleton methods to be attached to well know objects. 2) instead of storing a plain old Ruby object in ENV, create an instance of a new ENV class (defined in the Ruby assembly?) that has instance methods rather than singleton methods (and perhaps somehow hide the existence of this class from the Ruby programmer?). 3) Manually write initialization code to attach the singleton methods - but we'd still need to work out where to place this code to avoid cyclic dependences between the two assemblies. Note, this is not just an issue for ENV, a number of other builtin global constants also have dozens of singleton methods attached to them and these are all yet to be implemented in IronRuby. Cheers, Wayne. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20080219/669103dc/attachment-0001.html From lists at ruby-forum.com Tue Feb 19 01:04:49 2008 From: lists at ruby-forum.com (Web Reservoir) Date: Tue, 19 Feb 2008 07:04:49 +0100 Subject: [Ironruby-core] Linq to SQL with IronRuby... Is it Possible...? Message-ID: <8d2b830e2d21a330daa5c4973818bb67@ruby-forum.com> hello, i'm a newbie here. joined now. i'm exploring ironruby from scratch. few questions to start with... LINQ to SQL... is a nice thing currently supported in C# and Vb.Net. i would like to know.. if this has been implemented now or its too early to ask. when will it be supported...? Which other ORM's are under consideration....? Will IronRuby work smoothly with Asp.Net MVC....? I would like to peep into a samll sample code for IronRuby with Asp.Net MVC and LINQ to SQL with IronRuby... Hope,,,i have not asked for more. -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Tue Feb 19 01:08:47 2008 From: lists at ruby-forum.com (Aaron Clauson) Date: Tue, 19 Feb 2008 07:08:47 +0100 Subject: [Ironruby-core] Can't run script after engine exception In-Reply-To: References: <4dfe22b63984313e8e1b201708929135@ruby-forum.com> Message-ID: <5ed6f087dbd9395a433248e3e4cce7df@ruby-forum.com> Tomas Matousek wrote: > Could you sent a full repro containing the source code of both scripts > and the order of execution? > > Tomas I thought I'd made a mistake for a while as I was having real difficulty reapeating the problem. However I've found that it's a particular type of syntax error that causes the problem rather than any syntax error. The end statement missing on an if block is the culprit. Below is the code that illustrates the problem: IScriptEnvironment scriptEnvironment = IronRuby.CreateRuntime(); IScriptEngine rubyengine = IronRuby.GetEngine(scriptEnvironment); string goodScript = @" if true puts 'Ruby is cool' end"; string badScript = @" if true puts 'Ruby is cool' "; Console.WriteLine("Attempting run1 (good script)."); rubyengine.Runtime.ExecuteSourceUnit(rubyengine.CreateScriptSourceFromString(goodScript)); try { Console.WriteLine("Attempting run2 (bad script)."); rubyengine.Runtime.ExecuteSourceUnit(rubyengine.CreateScriptSourceFromString(badScript)); } catch (Exception excp) { Console.WriteLine(excp.GetType()); } try { Console.WriteLine("Attempting run3 (good script)."); rubyengine.Runtime.ExecuteSourceUnit(rubyengine.CreateScriptSourceFromString(goodScript)); } catch (Exception excp2) { Console.WriteLine(excp2.GetType()); } Output: Attempting run1 (good script). Ruby is cool Attempting run2 (bad script). Microsoft.Scripting.SyntaxErrorException Attempting run3 (good script). Microsoft.Scripting.SyntaxErrorException Regards, Aaron -- Posted via http://www.ruby-forum.com/. From ivan at flanders.co.nz Tue Feb 19 01:53:38 2008 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Tue, 19 Feb 2008 19:53:38 +1300 Subject: [Ironruby-core] Linq to SQL with IronRuby... Is it Possible...? In-Reply-To: <8d2b830e2d21a330daa5c4973818bb67@ruby-forum.com> References: <8d2b830e2d21a330daa5c4973818bb67@ruby-forum.com> Message-ID: Hi I'll put an article up on the manning site this week that shows you how to use various .NET ORM's with IronRuby At this stage I can't show you an example of IronRuby with ASP.NET MVC but it should be possible in the future I think. For ASP.NET MVC we need support for custom attributes. hth Ivan On Feb 19, 2008 7:04 PM, Web Reservoir wrote: > hello, > > i'm a newbie here. joined now. > > i'm exploring ironruby from scratch. > > few questions to start with... > > LINQ to SQL... is a nice thing currently supported in C# and Vb.Net. > > i would like to know.. if this has been implemented now or its too > early to ask. > when will it be supported...? > > Which other ORM's are under consideration....? > > Will IronRuby work smoothly with Asp.Net MVC....? > > I would like to peep into a samll sample code for > > IronRuby with Asp.Net MVC and > LINQ to SQL with IronRuby... > > Hope,,,i have not asked for more. > -- > 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/20080219/d9a8de47/attachment.html From Shri.Borde at microsoft.com Tue Feb 19 02:38:35 2008 From: Shri.Borde at microsoft.com (Shri Borde) Date: Mon, 18 Feb 2008 23:38:35 -0800 Subject: [Ironruby-core] zlib for Rail on .NET In-Reply-To: <6821FE23D98BAC41AC2A91E7970F31AF1CCF7275F9@QUTEXMBX02.qut.edu.au> References: <47B7C115.7050809@powershell.com> <6821FE23D98BAC41AC2A91E7970F31AF1CCFB6405A@QUTEXMBX02.qut.edu.au>, <6821FE23D98BAC41AC2A91E7970F31AF1CCF7275F9@QUTEXMBX02.qut.edu.au> Message-ID: <50B69702CA6E6D4E849D30CD4989AB8ED7F4DE95DD@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Zlib had been discussed last year (and also the issue with including software with different licences). Below is one of the snippets (the Silverlight issues has since been resolved) from one of the archived threads. http://search.live.com/results.aspx?q=site%3Arubyforge.org+zlib+ironruby&form=QBRE should give you the other posts on that thread. And according to http://www.codeplex.com/WorkItem/View.aspx?ProjectName=IronPython&WorkItemId=2590, System.IO.Compression is able to support the Python zlib module. So it definitely sounds appealing, especially for Silverlight, where it would avoid reduce the download size of IronRuby apps since it is already included in Silverlight. John Lam said in http://rubyforge.org/pipermail/ironruby-core/2007-September/000024.html >>> After looking a bit more closely at System.IO.Compression, I think it actually gives us most of what we need. >>> So in order of preference: >>> 1) System.IO.Compression (we still have to solve the Silverlight problem since I just looked and saw that it doesn't ship in Silverlight). >>> 2) Component ACE zlib.net - I like the BSD style license - it will be easier to make a case for this. -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Wayne Kelly Sent: Monday, February 18, 2008 2:35 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Towards Rails on .NET > From: ironruby-core-bounces at rubyforge.org [ironruby-core-bounces at rubyforge.org] On Behalf Of > Michael Letterle [michael.letterle at gmail.com] > Sent: Monday, 18 February 2008 11:52 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Towards Rails on .NET > > I'd be interested in doing the zlib port if noone else has done > anything on it yet, I just recently had to dig into zlib a bit so it's > kind of fresh. Feel free to send me what needs implemented. Sounds good to me, but before we go too far down this path, perhaps we should discuss the ground rules for implementing these extension libraries. CRuby implements many of these libraries as CRuby specific thin C wrappers around functionality provided by other native open source libraries. To build CRuby for Rails from source you need to go to various other open source projects, download and compile each of their bits and make sure their binaries are present on the right path. What approaches are deemed acceptable within the IronRuby project? Firstly, is it OK to have dependences on other open source project or do we need to implement all of these components from scratch? Secondly, is it OK to have dependences on native libraries rather than on fully managed libraries? (note these are two separate issues). Having our own fully managed implementations would have many advantages, but would require more work and wouldn't keep pace with advances made in those other libraries. Wrapping the same native libraries as C Ruby will also increase our compatability. I'm not proposing policy here, I'm just raising issues and asking for guidence. The other issue is where to we put these libraries once we start developing them? It would be nice to have them all in the same place, even in their early stages of development. Each I imagine would be a separate library, so they wouldn't interfere with one another. I assume they will not become part of the IronRuby.Libraries project. Perhaps they could be put into a separate RubyForge project initially that external contributors could directly upload to, and then if necessary moved into some kind of official tree as they mature? Cheers, Wayne. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From Tomas.Matousek at microsoft.com Tue Feb 19 02:45:32 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Mon, 18 Feb 2008 23:45:32 -0800 Subject: [Ironruby-core] Singleton methods on builtin global constants In-Reply-To: <6821FE23D98BAC41AC2A91E7970F31AF1CCF7275FC@QUTEXMBX02.qut.edu.au> References: <6821FE23D98BAC41AC2A91E7970F31AF1CCF7275FC@QUTEXMBX02.qut.edu.au> Message-ID: Interesting. We have traits for main singleton and some other singleton objects in SingletonOps. I guess ENV will be similar (say, you would declare EnvironmentSingletonOps class in the library), however these are hardcoded in the IronRuby.dll and it would be clearly better to provide an extension point here. Will look at it at let you know. Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Wayne Kelly Sent: Monday, February 18, 2008 8:44 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Singleton methods on builtin global constants I've been looking into implementing environment variable lookup, eg ENV['RUBYOPT'] (as it is required for gems setup). ENV is a builtin global constant. In the CRuby implementation it points to a plain old Ruby object that has a number of singleton methods defined on it, including [] which is used for looking up a specified environment variable. In IronRuby the RubyExecutionContext class has a method called InitializeGlobalConstants which seems to be used to initialize such global constants. It's therefore easy enough to define a new global variable called "ENV" and to initialize it to an object. But where then do we attach the 38 singleton methods to this class? These environment methods will presumably be implemented in the IronRuby.Libraries assembly? The method attributes and automatic class init generator allows singleton methods to be automatically added to modules, but doesn't appear to support adding singleton methods to well known objects. You can't even write the initialization code manually in say InitializeGlobalConstants as the methods that are needed are from the IronRuby.Library assembly which is not referenced by the Ruby assembly. It seems there are three choices: 1) somehow extend the attribute and automatic generator mechanism to allow singleton methods to be attached to well know objects. 2) instead of storing a plain old Ruby object in ENV, create an instance of a new ENV class (defined in the Ruby assembly?) that has instance methods rather than singleton methods (and perhaps somehow hide the existence of this class from the Ruby programmer?). 3) Manually write initialization code to attach the singleton methods - but we'd still need to work out where to place this code to avoid cyclic dependences between the two assemblies. Note, this is not just an issue for ENV, a number of other builtin global constants also have dozens of singleton methods attached to them and these are all yet to be implemented in IronRuby. Cheers, Wayne. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20080218/6af67a1b/attachment.html From Tomas.Matousek at microsoft.com Tue Feb 19 02:51:33 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Mon, 18 Feb 2008 23:51:33 -0800 Subject: [Ironruby-core] Can't run script after engine exception In-Reply-To: <5ed6f087dbd9395a433248e3e4cce7df@ruby-forum.com> References: <4dfe22b63984313e8e1b201708929135@ruby-forum.com> <5ed6f087dbd9395a433248e3e4cce7df@ruby-forum.com> Message-ID: Thanks, will investigate. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Aaron Clauson Sent: Monday, February 18, 2008 10:09 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Can't run script after engine exception Tomas Matousek wrote: > Could you sent a full repro containing the source code of both scripts > and the order of execution? > > Tomas I thought I'd made a mistake for a while as I was having real difficulty reapeating the problem. However I've found that it's a particular type of syntax error that causes the problem rather than any syntax error. The end statement missing on an if block is the culprit. Below is the code that illustrates the problem: IScriptEnvironment scriptEnvironment = IronRuby.CreateRuntime(); IScriptEngine rubyengine = IronRuby.GetEngine(scriptEnvironment); string goodScript = @" if true puts 'Ruby is cool' end"; string badScript = @" if true puts 'Ruby is cool' "; Console.WriteLine("Attempting run1 (good script)."); rubyengine.Runtime.ExecuteSourceUnit(rubyengine.CreateScriptSourceFromString(goodScript)); try { Console.WriteLine("Attempting run2 (bad script)."); rubyengine.Runtime.ExecuteSourceUnit(rubyengine.CreateScriptSourceFromString(badScript)); } catch (Exception excp) { Console.WriteLine(excp.GetType()); } try { Console.WriteLine("Attempting run3 (good script)."); rubyengine.Runtime.ExecuteSourceUnit(rubyengine.CreateScriptSourceFromString(goodScript)); } catch (Exception excp2) { Console.WriteLine(excp2.GetType()); } Output: Attempting run1 (good script). Ruby is cool Attempting run2 (bad script). Microsoft.Scripting.SyntaxErrorException Attempting run3 (good script). Microsoft.Scripting.SyntaxErrorException Regards, Aaron -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From lists at ruby-forum.com Tue Feb 19 05:16:55 2008 From: lists at ruby-forum.com (Web Reservoir) Date: Tue, 19 Feb 2008 11:16:55 +0100 Subject: [Ironruby-core] Linq to SQL with IronRuby... Is it Possible...? In-Reply-To: References: <8d2b830e2d21a330daa5c4973818bb67@ruby-forum.com> Message-ID: <86919de7be7fb50d6d0f887f55c9d0d4@ruby-forum.com> Thanks Ivan Exciting news for me. By any chance are you also covering SubSonic as one of the ORM's. It would be helpful to me and others, if you will Kindly place a link to article here -- Posted via http://www.ruby-forum.com/. From ivan at flanders.co.nz Tue Feb 19 05:25:53 2008 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Tue, 19 Feb 2008 23:25:53 +1300 Subject: [Ironruby-core] Linq to SQL with IronRuby... Is it Possible...? In-Reply-To: <86919de7be7fb50d6d0f887f55c9d0d4@ruby-forum.com> References: <8d2b830e2d21a330daa5c4973818bb67@ruby-forum.com> <86919de7be7fb50d6d0f887f55c9d0d4@ruby-forum.com> Message-ID: I'm covering SubSonic, ActiveRecord, Linq2Sql and LightSpeed On Feb 19, 2008 11:16 PM, Web Reservoir wrote: > Thanks Ivan > > Exciting news for me. By any chance are you also covering SubSonic as > one of the ORM's. > > It would be helpful to me and others, if you will Kindly place a link to > article here > > -- > 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/20080219/cfc00c06/attachment.html From lists at ruby-forum.com Tue Feb 19 06:54:38 2008 From: lists at ruby-forum.com (Softmind Technology) Date: Tue, 19 Feb 2008 12:54:38 +0100 Subject: [Ironruby-core] Linq to SQL with IronRuby... Is it Possible...? In-Reply-To: References: <8d2b830e2d21a330daa5c4973818bb67@ruby-forum.com> <86919de7be7fb50d6d0f887f55c9d0d4@ruby-forum.com> Message-ID: Great News Ivan, Can't wait for this article. Just in case, you want to extend your article in future with Merb, i have seen a new blog today. Good one to book mark, specially for all those waiting for Merb http://www.prodevtips.com/2008/02/19/registration-form-with-merb-and-datamapper/ Thanks. -- Posted via http://www.ruby-forum.com/. From michael.letterle at gmail.com Tue Feb 19 07:25:20 2008 From: michael.letterle at gmail.com (Michael Letterle) Date: Tue, 19 Feb 2008 07:25:20 -0500 Subject: [Ironruby-core] Can't run script after engine exception In-Reply-To: References: <4dfe22b63984313e8e1b201708929135@ruby-forum.com> Message-ID: Note that this happens in rbx as well, if you make a syntax error, you can't do any thing any more and have to exit the interpreter. On Feb 18, 2008 11:32 PM, Tomas Matousek wrote: > Could you sent a full repro containing the source code of both scripts and the order of execution? > > Tomas > > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Aaron Clauson > Sent: Monday, February 18, 2008 8:17 PM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] Can't run script after engine exception > > Hi All, > > I've got a problem where if I execute a Ruby script that has a syntax > error or missing method and that correctly fails I cannot use that > engine object to subsequently execute a valid script. If I restart the > application and re-execute the corrected script it works. It's only > executing an erroneous script and then a valid script that fails. > > The code I'm using to run the script is: > > IScriptEnvironment scriptEnvironment = IronRuby.CreateRuntime(); > IScriptEngine rubyengine = IronRuby.GetEngine(scriptEnvironment); > SourceUnit scriptSource = > rubyengine.CreateScriptSourceFromString(myScript); > IScriptScope scope = rubyengine.CreateScope(); > rubyengine.Execute(scope, scriptSource); > > Does anyone know if there is anyway to re-initialise the Ruby engine > after a syntax or methodmissing exception so scripts can be executed > again without needing to restart the application? > > Regards, > > Aaron > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -- Michael Letterle [Polymath Programmer] http://michaeldotnet.blogspot.com From w.kelly at qut.edu.au Tue Feb 19 07:31:11 2008 From: w.kelly at qut.edu.au (Wayne Kelly) Date: Tue, 19 Feb 2008 22:31:11 +1000 Subject: [Ironruby-core] defined? bug Message-ID: <6821FE23D98BAC41AC2A91E7970F31AF1CCF7275FD@QUTEXMBX02.qut.edu.au> I assume this is just one of the many features that is yet to be fully implemented, but there was no TODO comment in the code, so I thought I'd mention that the current implementation of the defined? function in AstNodeDescriptionExpression.TransformRead is overly simplistic. For example, it always returns "constant" for the expression: defined? Foo where as it should return nil if constant Foo hasn't been initialized. In general, each type of expression has it's own semantics as to when it is considered defined. Cheers, Wayne. From jgbailey at gmail.com Tue Feb 19 10:58:52 2008 From: jgbailey at gmail.com (Justin Bailey) Date: Tue, 19 Feb 2008 07:58:52 -0800 Subject: [Ironruby-core] Linq to SQL with IronRuby... Is it Possible...? In-Reply-To: References: <8d2b830e2d21a330daa5c4973818bb67@ruby-forum.com> <86919de7be7fb50d6d0f887f55c9d0d4@ruby-forum.com> Message-ID: On Feb 19, 2008 2:25 AM, Ivan Porto Carrero wrote: > I'm covering SubSonic, ActiveRecord, Linq2Sql and LightSpeed > > > Please post a URL when you do that - I'm not familiar with the "manning site". Justin From Tomas.Matousek at microsoft.com Tue Feb 19 12:26:29 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 19 Feb 2008 09:26:29 -0800 Subject: [Ironruby-core] defined? bug In-Reply-To: <6821FE23D98BAC41AC2A91E7970F31AF1CCF7275FD@QUTEXMBX02.qut.edu.au> References: <6821FE23D98BAC41AC2A91E7970F31AF1CCF7275FD@QUTEXMBX02.qut.edu.au> Message-ID: Yes, your assumption is right :) We have a test that says todo. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Wayne Kelly Sent: Tuesday, February 19, 2008 4:31 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] defined? bug I assume this is just one of the many features that is yet to be fully implemented, but there was no TODO comment in the code, so I thought I'd mention that the current implementation of the defined? function in AstNodeDescriptionExpression.TransformRead is overly simplistic. For example, it always returns "constant" for the expression: defined? Foo where as it should return nil if constant Foo hasn't been initialized. In general, each type of expression has it's own semantics as to when it is considered defined. Cheers, Wayne. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From slavof at gmail.com Tue Feb 19 12:36:45 2008 From: slavof at gmail.com (Slavo Furman) Date: Tue, 19 Feb 2008 18:36:45 +0100 Subject: [Ironruby-core] Linq to SQL with IronRuby... Is it Possible...? In-Reply-To: References: <8d2b830e2d21a330daa5c4973818bb67@ruby-forum.com> <86919de7be7fb50d6d0f887f55c9d0d4@ruby-forum.com> Message-ID: <24e27e560802190936w6d53ffe3td3374a146c5b9214@mail.gmail.com> Hi! It is easy to find... ;) http://www.manning.com/ Upcoming IronRuby book do not whow yet on webpage. meanwhile you can look form example at IronPython book (http://www.manning.com/foord/) --c. On Feb 19, 2008 4:58 PM, Justin Bailey wrote: > On Feb 19, 2008 2:25 AM, Ivan Porto Carrero wrote: > > I'm covering SubSonic, ActiveRecord, Linq2Sql and LightSpeed > > > > > > > > Please post a URL when you do that - I'm not familiar with the "manning > site". > > Justin > _______________________________________________ > 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/20080219/7477132f/attachment.html From jflam at microsoft.com Tue Feb 19 23:21:36 2008 From: jflam at microsoft.com (John Lam (DLR)) Date: Tue, 19 Feb 2008 20:21:36 -0800 Subject: [Ironruby-core] Towards Rails on .NET In-Reply-To: <6821FE23D98BAC41AC2A91E7970F31AF1CCF7275F9@QUTEXMBX02.qut.edu.au> References: <47B7C115.7050809@powershell.com> <6821FE23D98BAC41AC2A91E7970F31AF1CCFB6405A@QUTEXMBX02.qut.edu.au>, <6821FE23D98BAC41AC2A91E7970F31AF1CCF7275F9@QUTEXMBX02.qut.edu.au> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D912A35FF@NA-EXMSG-C115.redmond.corp.microsoft.com> Wayne Kelly: > What approaches are deemed acceptable within the IronRuby project? > Firstly, is it OK to have dependences on other open source project or > do we need to implement all of these > components from scratch? I think it would be fine to have a dependency on a managed library (see below). > Secondly, is it OK to have dependences on > native libraries rather than on fully managed > libraries? (note these are two separate issues). I'd rather not have dependencies on native libraries. It makes it much more difficult to ship a single binary across all of our platforms (Mac, Windows, *nix). > The other issue is where to we put these libraries once we start > developing them? It would be nice to have them all > in the same place, even in their early stages of development. Each I > imagine would be a separate library, so they wouldn't > interfere with one another. I assume they will not become part of the > IronRuby.Libraries project. Perhaps they could be put > into a separate RubyForge project initially that external contributors > could directly upload to, and then if necessary moved > into some kind of official tree as they mature? There are a number of things that complicates things *now*. We don't have require 'foo' working for compiled Ruby library assemblies, so everything has to be dumped into IronRuby.Libraries.dll for the time being. Once we have that working it will make it easier to refactor libraries into packages. Thanks, -John From lists at ruby-forum.com Wed Feb 20 06:10:03 2008 From: lists at ruby-forum.com (Softmind Technology) Date: Wed, 20 Feb 2008 12:10:03 +0100 Subject: [Ironruby-core] Linq to SQL with IronRuby... Is it Possible...? In-Reply-To: References: <8d2b830e2d21a330daa5c4973818bb67@ruby-forum.com> <86919de7be7fb50d6d0f887f55c9d0d4@ruby-forum.com> Message-ID: Ivan Porto Carrero wrote: > I'm covering SubSonic, ActiveRecord, Linq2Sql and LightSpeed Hi Ivan, Just to know... which database have you selected working with ActiveRecord and SubSonic. Is it MySql or SQL SERVER...? You must have made some comparisons to study the major difference between ActiveRecord and SubSonic...Can you kindly blog on your website, in case if this is not a part of your book. Thanks -- Posted via http://www.ruby-forum.com/. From michael.letterle at gmail.com Wed Feb 20 07:57:09 2008 From: michael.letterle at gmail.com (Michael Letterle) Date: Wed, 20 Feb 2008 07:57:09 -0500 Subject: [Ironruby-core] Towards Rails on .NET In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D912A35FF@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <47B7C115.7050809@powershell.com> <6821FE23D98BAC41AC2A91E7970F31AF1CCFB6405A@QUTEXMBX02.qut.edu.au> <6821FE23D98BAC41AC2A91E7970F31AF1CCF7275F9@QUTEXMBX02.qut.edu.au> <372109E149E8084D8E6C7D9CFD82E0632D912A35FF@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: That leads to the question of... what can we, as outside contributors, do /now/ to help. I feel like there's alot of work going on, that we just don't know about... I'd hate to see duplicate efforts wasted. On Feb 19, 2008 11:21 PM, John Lam (DLR) wrote: > There are a number of things that complicates things *now*. We don't have require 'foo' working for compiled Ruby library assemblies, so everything has to be dumped into IronRuby.Libraries.dll for the time being. Once we have that working it will make it easier to refactor libraries into packages. > > Thanks, > -John > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -- Michael Letterle [Polymath Programmer] http://michaeldotnet.blogspot.com From w.kelly at qut.edu.au Wed Feb 20 09:12:15 2008 From: w.kelly at qut.edu.au (Wayne Kelly) Date: Thu, 21 Feb 2008 00:12:15 +1000 Subject: [Ironruby-core] Towards gems - obscure scoping bug Message-ID: <6821FE23D98BAC41AC2A91E7970F31AF1CCF727601@QUTEXMBX02.qut.edu.au> module A Default = 42 def A::foo end def A::meth1(param = Default) foo {} puts 'OK' end def A::meth2(param = Default) puts 'not OK' foo { foo {} } end A::meth1() A::meth2() end --------------------------------------------------------------------------------------------- The first method executes OK, however, the second method fails when trying to lookup the Default constant for the unspecified param. Even though the body of the second method is never executed, the mere presence of the nested blocks causes the context scoping to get screwed up so that the second method appears to be nested directly within the global scope rather than with the scope of the module A where the constant is defined. BTW, these and other errors that I've been reporting aren't just random bugs, they're bugs that I've come across in my on going efforts to get gems setup running under IronRuby, so they are on the critical path to running Rails. Cheers, Wayne. From jflam at microsoft.com Wed Feb 20 11:14:18 2008 From: jflam at microsoft.com (John Lam (DLR)) Date: Wed, 20 Feb 2008 08:14:18 -0800 Subject: [Ironruby-core] Towards Rails on .NET In-Reply-To: References: <47B7C115.7050809@powershell.com> <6821FE23D98BAC41AC2A91E7970F31AF1CCFB6405A@QUTEXMBX02.qut.edu.au> <6821FE23D98BAC41AC2A91E7970F31AF1CCF7275F9@QUTEXMBX02.qut.edu.au> <372109E149E8084D8E6C7D9CFD82E0632D912A35FF@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D912A370C@NA-EXMSG-C115.redmond.corp.microsoft.com> Michael Letterle: > That leads to the question of... what can we, as outside contributors, > do /now/ to help. I feel like there's alot of work going on, that we > just don't know about... I'd hate to see duplicate efforts wasted. Thanks for your enthusiasm, Michael! Let me give an update on what my team here at Microsoft is doing: we're working towards MIX08. Silverlight is its own branch, and we sync up to Silverlight periodically for big events. So while we were working on the standard libraries, we weren't tracking Silverlight (well John Messerly is, but that's a whole other story ... :)) Since MIX is right around the corner (March 5-7), we're working on getting demos working for MIX and generally looking at how Ruby and dynamic languages in general fit with the Silverlight development story. Keep in mind that Silverlight is initially about browser JavaScript programming (V1) and now .NET based languages programming (V2). Our job is to make sure that the APIs that they designed for V2 work well with dynamic languages. And the best way to do that is by writing code against their APIs. So we haven't been spending much time at all working on core libraries and Ruby features - we're mostly concerned with getting our demos / labs working for MIX. This gives us a chance to exercise our .NET interop story and look for holes in that story (and there are a bunch when it comes to data binding scenarios). It lets us figure out how much work there still is to do in our binder. Once MIX is done, we'll resume working on libraries and getting the last few language features implemented. The best way for you to lay claim (today) to some library is announce your intentions on this list. There are folks who have claimed stuff on the wiki, but who haven't updated us on status. So let's assume that for now there aren't any claims anywhere (with the exception of Wayne Kelly looking at OpenSSL and zlib support). My SL demo app for MIX is writing the web app that will let folks 'reserve' a library to work on based on scenarios. This will let us focus our efforts on places that need it, as well as providing valuable status reports without resorting to email. I'm still writing the app since it involves using a bunch of technology that I don't really use all that often. So hang in there ... it will be done soon! Thanks, -John From michael.letterle at gmail.com Wed Feb 20 15:23:17 2008 From: michael.letterle at gmail.com (Michael Letterle) Date: Wed, 20 Feb 2008 15:23:17 -0500 Subject: [Ironruby-core] Towards Rails on .NET In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D912A370C@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <47B7C115.7050809@powershell.com> <6821FE23D98BAC41AC2A91E7970F31AF1CCFB6405A@QUTEXMBX02.qut.edu.au> <6821FE23D98BAC41AC2A91E7970F31AF1CCF7275F9@QUTEXMBX02.qut.edu.au> <372109E149E8084D8E6C7D9CFD82E0632D912A35FF@NA-EXMSG-C115.redmond.corp.microsoft.com> <372109E149E8084D8E6C7D9CFD82E0632D912A370C@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: Awesome information, thanks for bringing us all up a bit to speed! I'm not just referring to libraries though, I'm talking about the core functionality (this is, after all, Ironruby-core ;) ) Some (all?) of the libraries will have dependencies on things that must be implemented in the core IronRuby code, what still needs to be done in the core code and what can we do to help there? My assumption (and it may be wrong) is that once a majority of the core functionality is in place, and stable, then the libraries will come quicker. In other words, the cake is still soft in the middle, we can't start putting icing on until it's done baking. What can we do to help stoke the oven? Or is this an unrealistic view? On Wed, Feb 20, 2008 at 11:14 AM, John Lam (DLR) wrote: > Michael Letterle: > > > > That leads to the question of... what can we, as outside contributors, > > do /now/ to help. I feel like there's alot of work going on, that we > > just don't know about... I'd hate to see duplicate efforts wasted. > > Thanks for your enthusiasm, Michael! > > Let me give an update on what my team here at Microsoft is doing: we're working towards MIX08. > [snip] > > The best way for you to lay claim (today) to some library is announce your intentions on this list. There are folks who have claimed stuff on the wiki, but who haven't updated us on status. So let's assume that for now there aren't any claims anywhere (with the exception of Wayne Kelly looking at OpenSSL and zlib support). > > My SL demo app for MIX is writing the web app that will let folks 'reserve' a library to work on based on scenarios. This will let us focus our efforts on places that need it, as well as providing valuable status reports without resorting to email. I'm still writing the app since it involves using a bunch of technology that I don't really use all that often. So hang in there ... it will be done soon! > > > > Thanks, > -John > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -- Michael Letterle [Polymath Programmer] http://michaeldotnet.blogspot.com From w.kelly at qut.edu.au Wed Feb 20 18:47:43 2008 From: w.kelly at qut.edu.au (Wayne Kelly) Date: Thu, 21 Feb 2008 09:47:43 +1000 Subject: [Ironruby-core] Towards gems - obscure scoping bug In-Reply-To: <6821FE23D98BAC41AC2A91E7970F31AF1CCF727601@QUTEXMBX02.qut.edu.au> References: <6821FE23D98BAC41AC2A91E7970F31AF1CCF727601@QUTEXMBX02.qut.edu.au> Message-ID: <6821FE23D98BAC41AC2A91E7970F31AF1CCF727602@QUTEXMBX02.qut.edu.au> I think I've tracked down the cause of this scoping bug. The meth2 body is executed, but unlike the meth1 body, this time a NestedCodeContext is created. It appears the problem is that RubyHelpers.CreateNestedCodeContext doesn't set the parent property of the nested context to the containing context that is passed to it as a parameter. Adding a new CodeContext constructor with an extra parent parameter appears to make the problem go away, at least in my example. Cheers, Wayne. ________________________________________ From: ironruby-core-bounces at rubyforge.org [ironruby-core-bounces at rubyforge.org] On Behalf Of Wayne Kelly [w.kelly at qut.edu.au] Sent: Thursday, 21 February 2008 12:12 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Towards gems - obscure scoping bug module A Default = 42 def A::foo end def A::meth1(param = Default) foo {} puts 'OK' end def A::meth2(param = Default) puts 'not OK' foo { foo {} } end A::meth1() A::meth2() end --------------------------------------------------------------------------------------------- The first method executes OK, however, the second method fails when trying to lookup the Default constant for the unspecified param. Even though the body of the second method is never executed, the mere presence of the nested blocks causes the context scoping to get screwed up so that the second method appears to be nested directly within the global scope rather than with the scope of the module A where the constant is defined. BTW, these and other errors that I've been reporting aren't just random bugs, they're bugs that I've come across in my on going efforts to get gems setup running under IronRuby, so they are on the critical path to running Rails. Cheers, Wayne. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From w.kelly at qut.edu.au Wed Feb 20 23:03:59 2008 From: w.kelly at qut.edu.au (Wayne Kelly) Date: Thu, 21 Feb 2008 14:03:59 +1000 Subject: [Ironruby-core] Towards gems - setup.rb Message-ID: <6821FE23D98BAC41AC2A91E7970F31AF1CCF727603@QUTEXMBX02.qut.edu.au> I thought I'd see how far I could get trying to execute gems setup.rb using IronRuby. The following lists the issues that I came across and how I fixed or worked around them: 1. Encountered assertion error in MergeLocations method when parsing setup.rb - changed code to cope with case where start location > end location - fixed a subsequent bug where _currentLineIndex wasn't restored after encountering a HEREDOC (see MergeLocations.patch) 2. Encountered unimplemented exception for NTH_REF.TransformRead - quick hack: provide a dummy implementation that simply returns Null (see NTH_REF.patch) 3. Undefined constant ENV - created a new global constant of type ENV and implemented [] and delete methods in EnvOps.cs - note, this should really have be done by adding singleton methods rather than creating a new type (see ENV.patch) 4. Uninitialized constant Config - this is meant to come from rbconfig.rb which gets loaded when gems are loaded via -rubygems command line option - so I added a -r command line option to automatically preload said modules - we may also want to support getting command line arguments from RUBYOPT environment variable. (see RequireOption.patch) * Now using rbx.exe /paths:\ruby\lib\ruby\1.8;\ruby\lib\ruby\site_ruby\1.8;\ruby\lib\ruby\1.8\i386-mswin32 -rubygems setup.rb 5. Loads ubygems.rb but then can't load thread.so - quick hack: change thread.rb so that it doesn't require thread.so 6. Runtime error: version 1.8.6 doesn't match executable version 1.0.0.0 in rbconfig.rb - change rbconfig.rb to expect 1.0.0.0. - Note this is going to be a problem in general as many ruby apps access RUBY_VERSION at runtime and expect it to be 1.8.x The question is, should the version represent the version of the language supported or the version of the platform implementation? 7. Versions still don't match as RUBY_VERSION constant is a CLR string rather than a MutableString. - change RUBY_VERSION and RUBY_RELEASE_DATE to be MutableString (see RUBY_VERSION.patch) 8. Uninitialized constant DESTDIR in rbconfig.rb - this is due to bug in defined?, so I extended AstNodeDescriptionExpression.TransformRead to deal correctly with uninitialized constants (see defined.patch) 9. Scoping bug for nested blocks in rbconfig.rb as discussed in a previous email - create new CodeContext constructor to initialize parent property for nested code contexts - Note: these changes are entirely within the DLR, not IronRuby! - is it really a DLR bug or is IronRuby using these constructs incorrectly? (see NestedContext.patch) 10. undefined method gsub! in rbconfig.rb - this method is not yet implemented. Is it waiting for port of the JRuby regular expression library? Are we sure we can't get by with built-in .NET regular expressions (with some workarounds)? Does anyone have an example of a Ruby regular expression that we can't deal with using .NET regular expressions? Some of the patches that I've provided are quick and dirty hacks, so I don't necessarily expect them to find their way into the official version in their current form, but they should at least give some idea about some of the fixes that will be required to get gems and hence rails working. Cheers, Wayne. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20080221/a61504bf/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: MergeLocations.patch Type: application/octet-stream Size: 3298 bytes Desc: MergeLocations.patch Url : http://rubyforge.org/pipermail/ironruby-core/attachments/20080221/a61504bf/attachment-0007.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: NTH_REF.patch Type: application/octet-stream Size: 498 bytes Desc: NTH_REF.patch Url : http://rubyforge.org/pipermail/ironruby-core/attachments/20080221/a61504bf/attachment-0008.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: defined.patch Type: application/octet-stream Size: 4204 bytes Desc: defined.patch Url : http://rubyforge.org/pipermail/ironruby-core/attachments/20080221/a61504bf/attachment-0009.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: ENV.patch Type: application/octet-stream Size: 1811 bytes Desc: ENV.patch Url : http://rubyforge.org/pipermail/ironruby-core/attachments/20080221/a61504bf/attachment-0010.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: RequireOption.patch Type: application/octet-stream Size: 2867 bytes Desc: RequireOption.patch Url : http://rubyforge.org/pipermail/ironruby-core/attachments/20080221/a61504bf/attachment-0011.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: RUBY_VERSION.patch Type: application/octet-stream Size: 917 bytes Desc: RUBY_VERSION.patch Url : http://rubyforge.org/pipermail/ironruby-core/attachments/20080221/a61504bf/attachment-0012.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: NestedContext.patch Type: application/octet-stream Size: 1676 bytes Desc: NestedContext.patch Url : http://rubyforge.org/pipermail/ironruby-core/attachments/20080221/a61504bf/attachment-0013.obj From w.kelly at qut.edu.au Thu Feb 21 11:11:41 2008 From: w.kelly at qut.edu.au (Wayne Kelly) Date: Fri, 22 Feb 2008 02:11:41 +1000 Subject: [Ironruby-core] Skeleton external libraries required by simple RoR use cases Message-ID: <6821FE23D98BAC41AC2A91E7970F31AF1CCF727605@QUTEXMBX02.qut.edu.au> Attached is a zipfile containing skeleton definitions for all classes and methods from Zlib, Win32API, Thread, Syck, StrScan, StringIO, SQLite3, Socket, OpenSSL and Digest that get called during the execution of a number of simple gems and RoR use cases. I've made the parameter and return types as strong as possible (based on CRuby trace information for these use cases), so as to simply the task of implementing these methods. For those interested in prototyping any of these libraries, these skeletons may be a good starting point. Cheers, Wayne. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20080222/58f681a8/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: ExternalLibraries.zip Type: application/x-zip-compressed Size: 5371 bytes Desc: ExternalLibraries.zip Url : http://rubyforge.org/pipermail/ironruby-core/attachments/20080222/58f681a8/attachment.bin From jflam at microsoft.com Thu Feb 21 11:18:30 2008 From: jflam at microsoft.com (John Lam (DLR)) Date: Thu, 21 Feb 2008 08:18:30 -0800 Subject: [Ironruby-core] Skeleton external libraries required by simple RoR use cases In-Reply-To: <6821FE23D98BAC41AC2A91E7970F31AF1CCF727605@QUTEXMBX02.qut.edu.au> References: <6821FE23D98BAC41AC2A91E7970F31AF1CCF727605@QUTEXMBX02.qut.edu.au> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D915DF9C4@NA-EXMSG-C115.redmond.corp.microsoft.com> Wayne Kelly: > Attached is a zipfile containing skeleton definitions for all classes > and methods from > > Zlib, Win32API, Thread, Syck, StrScan, StringIO, SQLite3, Socket, > OpenSSL and Digest that get called during the execution of a number of > simple gems and RoR use cases. I've made the parameter and return > types as strong as possible (based on CRuby trace information for > these use cases), so as to simply the task of implementing these > methods. For those interested in prototyping any of these libraries, > these skeletons may be a good starting point. Fantastic! Thanks for sending this out! -John From jflam at microsoft.com Thu Feb 21 11:21:02 2008 From: jflam at microsoft.com (John Lam (DLR)) Date: Thu, 21 Feb 2008 08:21:02 -0800 Subject: [Ironruby-core] Towards gems - setup.rb In-Reply-To: <6821FE23D98BAC41AC2A91E7970F31AF1CCF727603@QUTEXMBX02.qut.edu.au> References: <6821FE23D98BAC41AC2A91E7970F31AF1CCF727603@QUTEXMBX02.qut.edu.au> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D915DF9CD@NA-EXMSG-C115.redmond.corp.microsoft.com> Wayne Kelly: > I thought I'd see how far I could get trying to execute gems setup.rb > using IronRuby. > > > > Some of the patches that I've provided are quick and dirty hacks, so I > don't necessarily expect them to find their way into the official > version in their current form, but they should at least give some idea > about some of the fixes that will be required to get gems and hence > rails working. Thanks for sending this along, Wayne! We're buried getting ready for MIX right now, but we'll definitely get right on these when the schedule eases up a bit :) Thanks, -John From jflam at microsoft.com Thu Feb 21 11:28:13 2008 From: jflam at microsoft.com (John Lam (DLR)) Date: Thu, 21 Feb 2008 08:28:13 -0800 Subject: [Ironruby-core] Towards Rails on .NET In-Reply-To: References: <47B7C115.7050809@powershell.com> <6821FE23D98BAC41AC2A91E7970F31AF1CCFB6405A@QUTEXMBX02.qut.edu.au> <6821FE23D98BAC41AC2A91E7970F31AF1CCF7275F9@QUTEXMBX02.qut.edu.au> <372109E149E8084D8E6C7D9CFD82E0632D912A35FF@NA-EXMSG-C115.redmond.corp.microsoft.com> <372109E149E8084D8E6C7D9CFD82E0632D912A370C@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D915DF9D9@NA-EXMSG-C115.redmond.corp.microsoft.com> Michael Letterle: > Awesome information, thanks for bringing us all up a bit to speed! > > I'm not just referring to libraries though, I'm talking about the core > functionality (this is, after all, Ironruby-core ;) ) > > Some (all?) of the libraries will have dependencies on things that must > be implemented in the core IronRuby code, what still needs to be done > in the core code and what can we do to help there? > > My assumption (and it may be wrong) is that once a majority of the core > functionality is in place, and stable, then the libraries will come > quicker. > > In other words, the cake is still soft in the middle, we can't start > putting icing on until it's done baking. What can we do to help stoke > the oven? There's a lot of stuff that we still need to work on in the language, and Wayne's last mail contains a lot of pointers on things that we still have to do. I'm not sure there are any simple tasks that we have in the core language for folks to hack on. There's a fairly steep learning curve there, much more so than in the libs. The big rocks in core that are left: 1) Better .NET interop - our story for data binding today is virtually non-existent, we don't correctly convert blocks to delegates to support async pattern, etc. 2) String-based eval and bindings 3) Finishing off the Ruby reflection-esque API (essentially everything in Module). Thanks, -John From m.david at xmlhacker.com Thu Feb 21 12:15:08 2008 From: m.david at xmlhacker.com (M. David Peterson) Date: Thu, 21 Feb 2008 10:15:08 -0700 Subject: [Ironruby-core] Skeleton external libraries required by simple RoR use cases In-Reply-To: <6821FE23D98BAC41AC2A91E7970F31AF1CCF727605@QUTEXMBX02.qut.edu.au> References: <6821FE23D98BAC41AC2A91E7970F31AF1CCF727605@QUTEXMBX02.qut.edu.au> Message-ID: On Thu, 21 Feb 2008 09:11:41 -0700, Wayne Kelly wrote: > For those interested in prototyping any of these libraries, these > skeletons may be a good starting point. *ROCKSTAR*! This is amazingly cool, Dr. Kelly! -- /M:D M. David Peterson Co-Founder & Chief Architect, 3rd&Urban, LLC Email: m.david at 3rdandUrban.com | m.david at amp.fm Mobile: (206) 418-9027 http://3rdandUrban.com | http://amp.fm | http://www.oreillynet.com/pub/au/2354 From ivan at flanders.co.nz Thu Feb 21 13:43:16 2008 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Fri, 22 Feb 2008 07:43:16 +1300 Subject: [Ironruby-core] Skeleton external libraries required by simple RoR use cases In-Reply-To: References: <6821FE23D98BAC41AC2A91E7970F31AF1CCF727605@QUTEXMBX02.qut.edu.au> Message-ID: Really cool :) If nobody is doing zlib and using the .NET compression stuff is sufficient then I can implement that class. On Fri, Feb 22, 2008 at 6:15 AM, M. David Peterson wrote: > On Thu, 21 Feb 2008 09:11:41 -0700, Wayne Kelly > wrote: > > > For those interested in prototyping any of these libraries, these > > skeletons may be a good starting point. > > *ROCKSTAR*! This is amazingly cool, Dr. Kelly! > > -- > /M:D > > M. David Peterson > Co-Founder & Chief Architect, 3rd&Urban, LLC > Email: m.david at 3rdandUrban.com | m.david at amp.fm > Mobile: (206) 418-9027 > http://3rdandUrban.com | http://amp.fm | > http://www.oreillynet.com/pub/au/2354 > _______________________________________________ > 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/20080222/d060fc7d/attachment.html From ivan at flanders.co.nz Thu Feb 21 13:50:29 2008 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Fri, 22 Feb 2008 07:50:29 +1300 Subject: [Ironruby-core] extension methods etc Message-ID: Hi As you've probably seen before I'd like to write a couple of articles that show how to use ironruby with a couple of .NET ORMS but in the process of writing those I get constantly tripped up. When I have to pass a type parameter it looks like it loses some of it's inheritance information at least that is the case with lightspeed. I can do without LightSpeed so atm this is no problem for me When I want to use Linq 2 Sql I need to pass a type of block Func to the where expression db.categories.where {|c| puts c.name } But IronRuby doesn't like it that much. So the question is how exactly do I use System::Enumberable.Where etc? I haven't gone further trying other ORM's yet. Thanks Ivan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20080222/c28a61a2/attachment-0001.html From jomes at microsoft.com Thu Feb 21 16:13:15 2008 From: jomes at microsoft.com (John Messerly) Date: Thu, 21 Feb 2008 13:13:15 -0800 Subject: [Ironruby-core] FW: Our team is growing! Message-ID: <918705E903F4714CB713D89AB5F1857D73B57CA176@NA-EXMSG-C116.redmond.corp.microsoft.com> FYI, we're hiring! See below. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Dino Viehland Sent: Wednesday, February 20, 2008 11:57 AM To: Discussion of IronPython Subject: [IronPython] Our team is growing! Hi everyone! I just wanted to let you know that our team is growing and we're looking to hire some new people to work on IronPython, IronRuby, and F#. We have 6 new positions we're trying to fill. IronPython developer position: http://members.microsoft.com/careers/search/details.aspx?JobID=8BEEE2C2-A95D-41C6-9075-CF6347EE07F1 IronRuby developer position: http://members.microsoft.com/careers/search/details.aspx?JobID=7C2E33E8-5A9C-44F3-A1CE-DA2D66DC3C8B IronRuby QA position: http://members.microsoft.com/careers/search/details.aspx?JobID=FF36A073-D1E8-49A9-B942-AFA4AB2B437E We also have positions open for doing F# development, F# QA as well as an IronPython Program Manager position - unfortunately there's no website entry for those just yet. Here's the IronPython PM description, unfortunately I have no descriptions for the F# jobs right now. The Visual Studio languages team is looking for a Senior Program Manager (Sr. PM) to own our IronPython implementation on www.codeplex.com/ironpython. IronPython is an exciting new open source implementation of the Python programming language running on .NET. It was a 2007 Jolt award finalist http://www.joltawards.com/2007/. It supports an interactive console with fully dynamic compilation. It is well integrated with the rest of the .NET Framework and makes all .NET libraries easily available to Python programmers, while maintaining full compatibility with the Python language. The Sr. PM would be responsible for the vision, planning, strategy and execution of our project. You will work closely with the architect, developers and testers and the community to ensure the right product is getting built. In addition you will be our primary customer voice, evangelist/public speaker for IronPython in addition to being the liaison for rest of the languages team, marketing, legal and other internal and external partners. Requirements for this position include a bachelors degree in a technical field such as computer science or electrical engineering (Masters preferred), deep experience in using Python and several dynamic languages is required (and having implemented one is preferred). For the development positions you can contact sborde at microsoft.com For the test positions you can contact yalvi at microsoft.com For the PM position you can contact maheshp at microsoft.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20080221/96025356/attachment.html From w.kelly at qut.edu.au Thu Feb 21 18:56:28 2008 From: w.kelly at qut.edu.au (Wayne Kelly) Date: Fri, 22 Feb 2008 09:56:28 +1000 Subject: [Ironruby-core] Towards gems - setup.rb In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D915DF9CD@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <6821FE23D98BAC41AC2A91E7970F31AF1CCF727603@QUTEXMBX02.qut.edu.au> <372109E149E8084D8E6C7D9CFD82E0632D915DF9CD@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <6821FE23D98BAC41AC2A91E7970F31AF1CCFC5C634@QUTEXMBX02.qut.edu.au> > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of > John Lam (DLR) > Sent: Friday, 22 February 2008 2:21 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Towards gems - setup.rb > > We're buried getting ready for MIX right now, but we'll > definitely get right on these when the schedule eases up a bit :) Hi John, As an ex-project lead, I understand this situation all too well! I realize you guys are tied up with MIX, so please don't feel any pressure to respond to my postings promptly. Any bombshells planned for MIX this year? :) BTW, my next step will be to use the trace information to derive some test cases for these classes. I'm not yet working on actually implementing any of these classes, so if others want to volunteer for specific classes, please do so now. Cheers, Wayne. From fernandoacorreia at gmail.com Fri Feb 22 07:04:55 2008 From: fernandoacorreia at gmail.com (Fernando Correia) Date: Fri, 22 Feb 2008 09:04:55 -0300 Subject: [Ironruby-core] How to digitally sign the assemblies? Message-ID: <8140eff40802220404p6782f105j1f1883f0a0f794ae@mail.gmail.com> I want to try IronRuby on a project that has its assemblies signed. So, the IronRuby's assemblies must be signed as well. I've tried with Visual Studio 2005 and 2008 to set the projects up for signing, and created the .snk file. Visual Studio builds the projects but never calls the csc compiler with the signing command. The resulting assemblies are not strong-named. I'd appreciate if someone can give me a hint or to point me to some already signed binaries for the latest build. Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20080222/63ea2a9f/attachment.html From tomas at winterdom.com Fri Feb 22 16:57:36 2008 From: tomas at winterdom.com (Tomas Restrepo) Date: Fri, 22 Feb 2008 16:57:36 -0500 Subject: [Ironruby-core] Couple of Questions Message-ID: Hi everyone, I was watching yesterday's John Lam's Lang.NET presentation on IronRuby (Great presentation, btw, really enjoyed it), and it was pretty informative (to me, at least). Besides that, I've been looking at the IronRuby and DLR code trying to become more familiar with how everything fits together (haven't tried my hand yet at extending the libraries because I'm honestly a ruby newbie) and had a couple of questions. I hope they're not too stupid :) The first one is related to RubySites. On the presentation, John shows how the shared DynamicSites in RubySites are used, for example, to ask if a given object/class supports a method and invoke it if it it does. The example in the presentation was to_int() for converting an object to an integer value, btw. What I didn't see John mention very explicitly is where/how those shared DynamicSites get initialized so that they point to the right places (maybe it's dumb question and I'm just not getting it still!). The second question was not directly influenced by the presentation, and it's basically if someone would care to explain a bit better how Ruby obtains the corresponding RubyClass instance for an object. I understand the basic mechanism at the code level, but some points I'm not too sure about: - What exactly is the criteria for deciding whether a given class is a singleton or not? I see this is brought up throughout the code, but isn't very clear to me yet (and it might be a rubyism I'm not aware of). - What's the relationship between what goes around a RubyClass for a given type (in the case of .net objects) and the whole InstanceData business? Thanks! -- Tomas Restrepo http://www.winterdom.com/weblog/ From lists at ruby-forum.com Sun Feb 24 02:59:26 2008 From: lists at ruby-forum.com (Joe Chung) Date: Sun, 24 Feb 2008 08:59:26 +0100 Subject: [Ironruby-core] Couple of Questions In-Reply-To: References: Message-ID: <11a8f8b228c92e0500d90da58846bf46@ruby-forum.com> Tomas Restrepo wrote: > The first one is related to RubySites. On the presentation, John shows > how the shared DynamicSites in RubySites are used, for example, to ask > if a given object/class supports a method and invoke it if it it does. > The example in the presentation was to_int() for converting an object > to an integer value, btw. > What I didn't see John mention very explicitly is where/how those > shared DynamicSites get initialized so that they point to the right > places (maybe it's dumb question and I'm just not getting it still!). Check out Martin Maly's blog for an explanation of how DynamicSites work. http://blogs.msdn.com/mmaly/ This post in particular -- http://blogs.msdn.com/mmaly/archive/2008/01/19/building-a-dlr-language-dynamic-behaviors-2.aspx -- will probably answer your question. -- Posted via http://www.ruby-forum.com/. From tomas at winterdom.com Sun Feb 24 09:06:24 2008 From: tomas at winterdom.com (Tomas Restrepo) Date: Sun, 24 Feb 2008 09:06:24 -0500 Subject: [Ironruby-core] Couple of Questions In-Reply-To: <11a8f8b228c92e0500d90da58846bf46@ruby-forum.com> References: <11a8f8b228c92e0500d90da58846bf46@ruby-forum.com> Message-ID: Hi Joe, > Check out Martin Maly's blog for an explanation of how DynamicSites > work. First of all, thanks for answering. I'm aware of Martin's blog and it's a very nice resource, but honestly, the details still seem a bit hazy to me. In particular: Does this mean that a shared DynamicSite gets set up [1] for a given class/object and specific method during the first Invoke() call? If so, does calling DynamicSite.RespondTo() potentially setup the site for a given target as well? (I'm guessing yes, otherwise I can't quite see how the code could possibly work, but it would be nice to have confirmation). Actually, this kind of brings another question: As far as I can see, the shared DynamicSites are there to support the IronRuby runtime/libraries themselves needing to use the ruby bindings for specific methods, which is fine. But they are not involved when the runtime is simply calling a method explicitly based on the code. Take, for example, this simple piece of code: x = Mine.new print x.to_s print x Where Mine is some arbitrary class implementing a to_s() method. Now, the first call is invoked using the normal InvokeMember action semantics in IronRuby. The second one has an implicit to_s() call from print, which actually uses the shared RubySites.ToSSharedSite site. (it's easy to check using the debugger that the first explicit call doesn't go through the shared site, as expected) If so, then this would seem to imply that after this small snippet of code executes there are at least two sites caching the rule for Mine.to_s. Is my understanding of it correct? And if so, are there any implications of that? (I can guess it might involve some memory overhead). As I said, I'm just trying to understand what's going on in the code. Feel free to whack me in the head with the rod of enlightenment if I'm just asking stupid questions :) [1] I realize the term here might not be the most appropriate. -- Tomas Restrepo http://www.winterdom.com/weblog/ From tomas at winterdom.com Sun Feb 24 09:26:38 2008 From: tomas at winterdom.com (Tomas Restrepo) Date: Sun, 24 Feb 2008 09:26:38 -0500 Subject: [Ironruby-core] Couple of Questions In-Reply-To: References: <11a8f8b228c92e0500d90da58846bf46@ruby-forum.com> Message-ID: If > so, does calling DynamicSite.RespondTo() potentially setup the site > for a given target as well? *Sigh*; I'm an idiot; that happens for not looking again to see I was really referring to RubySites.RespondTo() which uses yet another shared dynamic site. The overall question still stands, though. -- Tomas Restrepo http://www.winterdom.com/weblog/ From lists at ruby-forum.com Mon Feb 25 02:16:43 2008 From: lists at ruby-forum.com (Web Reservoir) Date: Mon, 25 Feb 2008 08:16:43 +0100 Subject: [Ironruby-core] Asp.Net MVC .... V/S... IronRuby On Rails Message-ID: Hello, ( Please note all this discussion below is about Asp.Net MVC with IronRuby only.) I just finished reading the first chapter on Asp.Net MVC in Action by www.manning.com. It seems Asp.Net MVC is inspired a lot by Ruby on Rails.... And the Major interesting thing is Microsoft has improved a lot over this, offering some great advantages that ROR lacks. I think.. It would be wise to go with Asp.Net MVC with IronRuby.... rather than going for IronRuby on Rails.... since MS will constantly make efforts to improve upon MVC framework... Plus the advantages of calling other languages with the DLR support, Great Community Support..... and many other plus points can be added here... Just wondering and would like to know.. what others are thinking in this terms Thanks -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Mon Feb 25 02:33:21 2008 From: lists at ruby-forum.com (Web Reservoir) Date: Mon, 25 Feb 2008 08:33:21 +0100 Subject: [Ironruby-core] Asp.Net MVC .... V/S... IronRuby On Rails In-Reply-To: References: Message-ID: <3f8947644abc497e42db07db738b4c07@ruby-forum.com> Hi... Just missed to mention few great VIEW support by MVC Team Asp.Net MVC View... Asp.Net MVC Master Pages... Asp.Net MVC View UserControl Asp.Net MVC View Content Page All this, makes us smile. Just wishing to get ActiveRecord support with MVC, making my dream come true. -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Mon Feb 25 02:46:03 2008 From: lists at ruby-forum.com (Softmind Technology) Date: Mon, 25 Feb 2008 08:46:03 +0100 Subject: [Ironruby-core] Asp.Net MVC .... V/S... IronRuby On Rails In-Reply-To: <3f8947644abc497e42db07db738b4c07@ruby-forum.com> References: <3f8947644abc497e42db07db738b4c07@ruby-forum.com> Message-ID: <901f195f358ae1928ded1e6190385705@ruby-forum.com> Oops! You snatched my dreams. I think... Asp.Net MVC with IronRuby is going to give Ruby on rails a very very tough competition. I think... we are the winners. You just missed to mention, SilverLight Support with MVC.. which i will add it for you I hope, IronRuby Beta comes along with Asp.Net MVC beta -- Posted via http://www.ruby-forum.com/. From Jimmy.Schementi at microsoft.com Mon Feb 25 03:59:03 2008 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Mon, 25 Feb 2008 00:59:03 -0800 Subject: [Ironruby-core] Asp.Net MVC .... V/S... IronRuby On Rails In-Reply-To: Message-ID: Making both Rails and MVC work with IronRuby (and the other DLR languages) is the right thing to do, since freedom and choice with the Microsoft platform is what we're all about. So if someone want to use IronRuby on Rails or IronRuby on ASP.NET MVC, they should be able to. That being said, IronRuby on Rails will basically work as a byproduct of supporting all the Ruby languages features, as Rails is simply a big Ruby app. Other parts of the Rails stack that are even partially implemented in C (mongrel, database adapters, etc) will have to be re-implemented in C#. ASP.NET MVC has plenty of benefits over Ruby on Rails, except the fact that you can use Ruby with ROR. =P However, having ASP.NET MVC gives you a better scalability story w/IIS + SQL server, and Rails is hurting in that respect. Don't get me wrong, I love Rails, but I've had to deal with a lot of pain at getting Rails to scale up (not impossible, just harder than it needs to be); this is where we can improve on Rails. Now for the good stuff: I've been prototyping things w/IronRuby + MVC, and we've had conversations with the MVC team about support DLR languages. Scott Hanselman did a talk at Alt.NET about some early work getting IronPython working with a VERY early version of MVC here: http://www.hanselman.com/silverlight/ScottHaAtAltNetConf/. However, since we're all busy people, we're focusing on just getting the DLR+languages working, as keeping in two fast moving project in-sync is asking for trouble. =) For more substance, here are the things we need to care about to make DLR languages work w/MVC: 1. DLR languages in Controllers: - Translate a URL into a controller/action/params mapping. - Create/fetch from cache an instance of the controller - Call the action method on the instance with the params. MVC currently does this with reflection, so to make it work for DLR languages we need to change that part. 2. DLR languages in aspx/asmx pages for Views and Routing: - ASP.NET integration with IronPython (released w/last year's ASP.NET Futures package: http://www.asp.net/ironpython/) needs to be revved to work with DLR as a whole (which we're doing, but with the all the DLR changes going on it needs more work). 3. DLR languages in Models: - Make LINQ queries work with DLR languages - Define extension methods and LINQ models with DLR languages Queries will be done by using each language's syntax and providing clever APIs for each. Definitely other work is needed around this, but the right people are definitely working on this. Again, all these things have been only prototypes/samples simply because the DLR is moving so fast, and it makes sense to really start making things work when it begins to stabilize (which is beginning to happen). Keep in mind, a MVC preview is currently released @ http://www.asp.net/downloads/3.5-extensions/, so you can experiment with integrating w/the DLR yourself ... though I warn you, it won't be easy. =P The fact that it is so hard is definitely an issue at a higher level (parity between all languages is hard), and that's another issue people are working on. ~Jimmy On 2/24/08 11:16 PM, "Web Reservoir" wrote: Hello, ( Please note all this discussion below is about Asp.Net MVC with IronRuby only.) I just finished reading the first chapter on Asp.Net MVC in Action by www.manning.com. It seems Asp.Net MVC is inspired a lot by Ruby on Rails.... And the Major interesting thing is Microsoft has improved a lot over this, offering some great advantages that ROR lacks. I think.. It would be wise to go with Asp.Net MVC with IronRuby.... rather than going for IronRuby on Rails.... since MS will constantly make efforts to improve upon MVC framework... Plus the advantages of calling other languages with the DLR support, Great Community Support..... and many other plus points can be added here... Just wondering and would like to know.. what others are thinking in this terms Thanks -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core On 2/24/08 11:16 PM, "Web Reservoir" wrote: Hello, ( Please note all this discussion below is about Asp.Net MVC with IronRuby only.) I just finished reading the first chapter on Asp.Net MVC in Action by www.manning.com. It seems Asp.Net MVC is inspired a lot by Ruby on Rails.... And the Major interesting thing is Microsoft has improved a lot over this, offering some great advantages that ROR lacks. I think.. It would be wise to go with Asp.Net MVC with IronRuby.... rather than going for IronRuby on Rails.... since MS will constantly make efforts to improve upon MVC framework... Plus the advantages of calling other languages with the DLR support, Great Community Support..... and many other plus points can be added here... Just wondering and would like to know.. what others are thinking in this terms 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/20080225/9e38f336/attachment.html From lists at ruby-forum.com Mon Feb 25 07:10:51 2008 From: lists at ruby-forum.com (Joe Chung) Date: Mon, 25 Feb 2008 13:10:51 +0100 Subject: [Ironruby-core] Couple of Questions In-Reply-To: References: <11a8f8b228c92e0500d90da58846bf46@ruby-forum.com> Message-ID: <9f7264241d9a72210e3ce5a15c6d72fa@ruby-forum.com> Shared DynamicSites don't get initialized for each specific class/object and method combination. A shared DynamicSite applies to all invocations of a method like to_int. The DLR validates the context in which the invocation occurred and then invokes the dynamic site's target (a delegate) for the object. Rather than have tons of permutations of varying types baked into the DLR, they chose to use rule sets (as described in Martin Maly's blog) to determine which operation(s) should be performed on objects to achieve desired results and cache these rule applications so that it doesn't have to evaluate these rules over and over again (like, for instance, in a loop where the same operation is being iterated many times). Keep reading the code -- RubyBinder.cs in the Ruby project and DynamicSite.cs in the Microsoft.Scripting project -- to see how this happens for IronRuby. RubyBinder.cs should answer your question about why the behavior is different between InvokeMember and ConvertTo. Briefly, the Ruby action binder applied different rules to these invocations. Maybe one day someone with more acumen and expertise than myself will write a book about how the DLR works internally like what Don Box, Jeff Richter, and others did for the CLR. It'll be easier to comprehend then. In the meantime, you'll just have to rough it on the bleeding edge. ;) -- Posted via http://www.ruby-forum.com/. From tomas at winterdom.com Mon Feb 25 08:33:11 2008 From: tomas at winterdom.com (Tomas Restrepo) Date: Mon, 25 Feb 2008 08:33:11 -0500 Subject: [Ironruby-core] Couple of Questions In-Reply-To: <9f7264241d9a72210e3ce5a15c6d72fa@ruby-forum.com> References: <11a8f8b228c92e0500d90da58846bf46@ruby-forum.com> <9f7264241d9a72210e3ce5a15c6d72fa@ruby-forum.com> Message-ID: Hi Joe, > Shared DynamicSites don't get initialized for each specific class/object > and method combination. I know; that's why I mentioned "initialized" was probably the wrong term to use. What I meant was that at some point in time, there would be a rule created for a given class/method combination and somehow associated with that DynamicSite. > Keep reading the code -- RubyBinder.cs in the Ruby project and > DynamicSite.cs in the Microsoft.Scripting project -- to see how this > happens for IronRuby. RubyBinder.cs should answer your question about > why the behavior is different between InvokeMember and ConvertTo. > Briefly, the Ruby action binder applied different rules to these > invocations. That was pretty obvious. even to; but not really my point. > Maybe one day someone with more acumen and expertise than myself will > write a book about how the DLR works internally like what Don Box, Jeff > Richter, and others did for the CLR. It'll be easier to comprehend > then. In the meantime, you'll just have to rough it on the bleeding > edge. ;) I wasn't particularly asking about the DLR internals; this isn't really the place to do that anyway (not that there's actually one), but rather about IronRuby's use of it, and more specifically aimed at understanding a bit better how the library implementations got hooked into the runtime for their corresponding classes. I probably don't need to understand it anyway, but I prefer to. -- Tomas Restrepo http://www.winterdom.com/weblog/ From jflam at microsoft.com Mon Feb 25 11:53:11 2008 From: jflam at microsoft.com (John Lam (DLR)) Date: Mon, 25 Feb 2008 08:53:11 -0800 Subject: [Ironruby-core] Couple of Questions In-Reply-To: References: Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D916DA041@NA-EXMSG-C115.redmond.corp.microsoft.com> Tomas Restrepo: > The first one is related to RubySites. On the presentation, John shows > how the shared DynamicSites in RubySites are used, for example, to ask > if a given object/class supports a method and invoke it if it it does. > The example in the presentation was to_int() for converting an object > to an integer value, btw. > What I didn't see John mention very explicitly is where/how those > shared DynamicSites get initialized so that they point to the right > places (maybe it's dumb question and I'm just not getting it still!). Just looking over my slides again ... I'm guessing that your question relates to the RespondToSharedSite site that is called from RespondTo()? If so, the initial version of that site contains absolutely nothing but a call to UpdateSiteAndExecute(), which is the 'cry for help' method that Martin talks about in his blog: http://blogs.msdn.com/mmaly/archive/2008/01/22/building-a-dlr-language-dynamic-behaviors-3.aspx So the first time through, the site will examine the method parameters, perform the dynamic lookup, and cache the result of that dynamic lookup in the site (in addition to invoking the target). > - What exactly is the criteria for deciding whether a given class is a > singleton or not? I see this is brought up throughout the code, but > isn't very clear to me yet (and it might be a rubyism I'm not aware > of). Singleton classes in Ruby are classes that have exactly one instance. They are constructed on the fly from an instance. eg b,c = Bob.new, Bob.new class << b # mess with a class only for b def boo end end b.boo c.boo # fails > - What's the relationship between what goes around a RubyClass for a > given type (in the case of .net objects) and the whole InstanceData > business? Not sure about this question ... can you clarify? Thanks, -John From tomas at winterdom.com Mon Feb 25 12:14:42 2008 From: tomas at winterdom.com (Tomas Restrepo) Date: Mon, 25 Feb 2008 12:14:42 -0500 Subject: [Ironruby-core] Couple of Questions In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D916DA041@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <372109E149E8084D8E6C7D9CFD82E0632D916DA041@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: Hi John, > So the first time through, the site will examine the method parameters, perform the dynamic lookup, and cache the result of that dynamic lookup in the site (in addition to invoking the target). Thanks, that was exactly the answer I was hoping for :) > Singleton classes in Ruby are classes that have exactly one instance. They are constructed on the fly from an instance. eg Ahh thanks, that clarifies it! > > - What's the relationship between what goes around a RubyClass for a > > given type (in the case of .net objects) and the whole InstanceData > > business? > > Not sure about this question ... can you clarify? I was referring to RubyExecutionContext.GetInstanceData() and friends.... -- Tomas Restrepo http://www.winterdom.com/weblog/ From jomes at microsoft.com Mon Feb 25 14:32:31 2008 From: jomes at microsoft.com (John Messerly) Date: Mon, 25 Feb 2008 11:32:31 -0800 Subject: [Ironruby-core] Couple of Questions In-Reply-To: References: <372109E149E8084D8E6C7D9CFD82E0632D916DA041@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <918705E903F4714CB713D89AB5F1857D73B57CAC5A@NA-EXMSG-C116.redmond.corp.microsoft.com> Tomas Restrepo: > > > - What's the relationship between what goes around a RubyClass for > > a > given type (in the case of .net objects) and the whole > > InstanceData > business? > > > > Not sure about this question ... can you clarify? > > I was referring to RubyExecutionContext.GetInstanceData() and > friends.... InstanceData is the per-instance data for Ruby object. For example, instance variables (@abc), frozen/tainted flags, etc. We try to be smart about storing it on the object for types that we generate, but if it's a .NET object sometimes we have to go through a dictionary lookup to find the instance data for a given object. - John From tomas at winterdom.com Mon Feb 25 14:56:18 2008 From: tomas at winterdom.com (Tomas Restrepo) Date: Mon, 25 Feb 2008 14:56:18 -0500 Subject: [Ironruby-core] Couple of Questions In-Reply-To: <918705E903F4714CB713D89AB5F1857D73B57CAC5A@NA-EXMSG-C116.redmond.corp.microsoft.com> References: <372109E149E8084D8E6C7D9CFD82E0632D916DA041@NA-EXMSG-C115.redmond.corp.microsoft.com> <918705E903F4714CB713D89AB5F1857D73B57CAC5A@NA-EXMSG-C116.redmond.corp.microsoft.com> Message-ID: Hi John, > > InstanceData is the per-instance data for Ruby object. For example, instance variables (@abc), frozen/tainted flags, etc. Thanks, good to know. That was my impression from looking at the code, but wanted to make sure. > > We try to be smart about storing it on the object for types that we generate, but if it's a .NET object sometimes we have to go through a dictionary lookup to find the instance data for a given object. Is the object itself the key for that dictionary? (If yes, I'm guessing this will affect the lifetime of said objects, right?) -- Tomas Restrepo http://www.winterdom.com/weblog/ From jomes at microsoft.com Mon Feb 25 15:02:47 2008 From: jomes at microsoft.com (John Messerly) Date: Mon, 25 Feb 2008 12:02:47 -0800 Subject: [Ironruby-core] Couple of Questions In-Reply-To: References: <372109E149E8084D8E6C7D9CFD82E0632D916DA041@NA-EXMSG-C115.redmond.corp.microsoft.com> <918705E903F4714CB713D89AB5F1857D73B57CAC5A@NA-EXMSG-C116.redmond.corp.microsoft.com> Message-ID: <918705E903F4714CB713D89AB5F1857D73B57CAC99@NA-EXMSG-C116.redmond.corp.microsoft.com> Tomas Restrepo: > > > > We try to be smart about storing it on the object for types that we > generate, but if it's a .NET object sometimes we have to go through a > dictionary lookup to find the instance data for a given object. > > Is the object itself the key for that dictionary? (If yes, I'm guessing > this will affect the lifetime of said objects, right?) Yup. It's stored in a WeakReference though. See InstanceDataDictionary.cs - John From Tomas.Matousek at microsoft.com Mon Feb 25 17:11:47 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Mon, 25 Feb 2008 14:11:47 -0800 Subject: [Ironruby-core] Towards gems - setup.rb In-Reply-To: <6821FE23D98BAC41AC2A91E7970F31AF1CCF727603@QUTEXMBX02.qut.edu.au> References: <6821FE23D98BAC41AC2A91E7970F31AF1CCF727603@QUTEXMBX02.qut.edu.au> Message-ID: From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Wayne Kelly Sent: Wednesday, February 20, 2008 8:04 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Towards gems - setup.rb I thought I'd see how far I could get trying to execute gems setup.rb using IronRuby. The following lists the issues that I came across and how I fixed or worked around them: 1. Encountered assertion error in MergeLocations method when parsing setup.rb - changed code to cope with case where start location > end location - fixed a subsequent bug where _currentLineIndex wasn't restored after encountering a HEREDOC (see MergeLocations.patch) I've fixed this one. Thanks for the report! Tomas -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20080225/14e25b2d/attachment.html From w.kelly at qut.edu.au Mon Feb 25 20:59:19 2008 From: w.kelly at qut.edu.au (Wayne Kelly) Date: Tue, 26 Feb 2008 11:59:19 +1000 Subject: [Ironruby-core] OpenSSL implementation In-Reply-To: <918705E903F4714CB713D89AB5F1857D73B57CAC99@NA-EXMSG-C116.redmond.corp.microsoft.com> References: <372109E149E8084D8E6C7D9CFD82E0632D916DA041@NA-EXMSG-C115.redmond.corp.microsoft.com> <918705E903F4714CB713D89AB5F1857D73B57CAC5A@NA-EXMSG-C116.redmond.corp.microsoft.com> <918705E903F4714CB713D89AB5F1857D73B57CAC99@NA-EXMSG-C116.redmond.corp.microsoft.com> Message-ID: <6821FE23D98BAC41AC2A91E7970F31AF1CCFD20EE0@QUTEXMBX02.qut.edu.au> Attached is a fully managed implementation of the skeleton classes and methods from openssl.so that I posted last week. I'm currently working on implementing digest.so, which is very similar. Cheers, Wayne. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: OpenSSL.cs Url: http://rubyforge.org/pipermail/ironruby-core/attachments/20080226/d1918da4/attachment.pl -------------- next part -------------- A non-text attachment was scrubbed... Name: OpenSSL_Test.rb Type: application/octet-stream Size: 619 bytes Desc: OpenSSL_Test.rb Url : http://rubyforge.org/pipermail/ironruby-core/attachments/20080226/d1918da4/attachment.obj -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: OpenSSL_Test.cs Url: http://rubyforge.org/pipermail/ironruby-core/attachments/20080226/d1918da4/attachment-0001.pl From w.kelly at qut.edu.au Tue Feb 26 02:02:36 2008 From: w.kelly at qut.edu.au (Wayne Kelly) Date: Tue, 26 Feb 2008 17:02:36 +1000 Subject: [Ironruby-core] ClassInitGenerator issues In-Reply-To: <6821FE23D98BAC41AC2A91E7970F31AF1CCFD20EE0@QUTEXMBX02.qut.edu.au> References: <372109E149E8084D8E6C7D9CFD82E0632D916DA041@NA-EXMSG-C115.redmond.corp.microsoft.com> <918705E903F4714CB713D89AB5F1857D73B57CAC5A@NA-EXMSG-C116.redmond.corp.microsoft.com> <918705E903F4714CB713D89AB5F1857D73B57CAC99@NA-EXMSG-C116.redmond.corp.microsoft.com> <6821FE23D98BAC41AC2A91E7970F31AF1CCFD20EE0@QUTEXMBX02.qut.edu.au> Message-ID: <6821FE23D98BAC41AC2A91E7970F31AF1CCFD9725E@QUTEXMBX02.qut.edu.au> First Problem: If I define a new library class called say Digest::Class, ie a class called "Class" within a module called "Digest" then when I run the ClassInitGenerator it produces a method name clash between the LoadClass_Class generated for this new class and the one generated for the standard Ruby "Class". Second Problem: I define a new extension class: [RubyClass("MD5")] public class MD5: Base { } As part of the loading of this class I need to initialize a class variable: @@metadata = System.Security.Cryptography.MD5.Create(); Any idea how this initialization could/should be handled? I'd be happy with a workaround for the moment. In the longer term, rather than extending ClassInitGenerator to handle this specific case, can I suggest that developers of such extension classes be given the option to implement some kind of Init hook method that will get executed as part of each classes' definition process? This would be equivalent to code that Ruby programmers can put inside a class or module definition. This hook method would be passed the class or module being initialized. We could then manually do whatever we needed, eg attach singleton methods, define constants, set class variables, etc. Cheers, Wayne. From robert.brotherus at napa.fi Tue Feb 26 02:46:02 2008 From: robert.brotherus at napa.fi (Robert Brotherus) Date: Tue, 26 Feb 2008 09:46:02 +0200 Subject: [Ironruby-core] Regexp anomalous behavior Message-ID: <53194650933664488F3F0C3A0AB568320A14C8@nw60.napa.fi> Consider following program (test.rb): puts 'aaabbbaaa'.match('aaa').length puts 'aaabbbaaa'.match('x').length With CRuby, the result or running is: [08:49:31 ~] ruby test.rb 1 test.rb:2: undefined method `length' for nil:NilClass (NoMethodError) With IronRuby (revision 76): [08:37:14 ~] rbx test.rb 3 0 I apologize if this is a well-known issue and already on some to-do list Robert Brotherus Software architect Napa Ltd Tammasaarenkatu 3, Helsinki FI-00180 P.O.Box 470, Helsinki FI-00181 Tel. +358 9 22 813 1 Direct. +358 9 22 813 611 GSM +358 45 11 456 02 Fax. +358 9 22 813 800 Email: Robert.Brotherus at napa.fi www.napa.fi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20080226/a921a0a1/attachment.html From w.kelly at qut.edu.au Tue Feb 26 03:43:29 2008 From: w.kelly at qut.edu.au (Wayne Kelly) Date: Tue, 26 Feb 2008 18:43:29 +1000 Subject: [Ironruby-core] ClassInitGenerator issues In-Reply-To: <6821FE23D98BAC41AC2A91E7970F31AF1CCFD9725E@QUTEXMBX02.qut.edu.au> References: <372109E149E8084D8E6C7D9CFD82E0632D916DA041@NA-EXMSG-C115.redmond.corp.microsoft.com> <918705E903F4714CB713D89AB5F1857D73B57CAC5A@NA-EXMSG-C116.redmond.corp.microsoft.com> <918705E903F4714CB713D89AB5F1857D73B57CAC99@NA-EXMSG-C116.redmond.corp.microsoft.com> <6821FE23D98BAC41AC2A91E7970F31AF1CCFD20EE0@QUTEXMBX02.qut.edu.au>, <6821FE23D98BAC41AC2A91E7970F31AF1CCFD9725E@QUTEXMBX02.qut.edu.au> Message-ID: <6821FE23D98BAC41AC2A91E7970F31AF1CCF727609@QUTEXMBX02.qut.edu.au> Sorry, I realized after I posted that my issues are based on some questionable assumptions ... Given that there isn't yet a mechanism for loading ruby extension dlls, I followed the workaround, used for example by the current socket class implementations, where extension classes are simply added along side the builtin classes defined in IronRuby.Libraries. In the longer term, if non-builtin classes are implemented in separate assemblies then my name clash problem becomes less of an issue. I was also assuming that ClassInitGenerator would be used to automatically generate the module initialization code, but this may not necessarily be the case for non-builtin classes implemented in external assemblies. So my per class initialization hook issue also goes away if developers are simply able to manually implement their own equivalent of LoadModules(). It would be nice, however, to decide what this extention loading mechanism is going to be. Also, is there a simple way to test our C# extension libraries standalone (ie without having to run rbx.exe)? In the case of the openssl library it was easy to write a simple C# test harness as the openssl implementation didn't really use any of the IronRuby infrastructure (apart from simple classes such as MutableString). However, for more sophisticated libraries that, for example make use of dynamic call sites, it is difficult to call the library methods without the appropriate CodeContexts etc. Is there an easy way to create the appropriate contexts etc for use in a simple test harness or is it too difficult to bother attempting? Cheers, Wayne. From lists at ruby-forum.com Tue Feb 26 03:43:39 2008 From: lists at ruby-forum.com (Softmind Technology) Date: Tue, 26 Feb 2008 09:43:39 +0100 Subject: [Ironruby-core] Linq to SQL with IronRuby... Is it Possible...? In-Reply-To: References: <8d2b830e2d21a330daa5c4973818bb67@ruby-forum.com> <86919de7be7fb50d6d0f887f55c9d0d4@ruby-forum.com> Message-ID: <71771d435b52016e16593e60d9511b96@ruby-forum.com> Hi Ivan, It seems your article is delayed. When can we expect it....? Thanks -- Posted via http://www.ruby-forum.com/. From ivan at flanders.co.nz Tue Feb 26 03:51:45 2008 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Tue, 26 Feb 2008 21:51:45 +1300 Subject: [Ironruby-core] Linq to SQL with IronRuby... Is it Possible...? In-Reply-To: <71771d435b52016e16593e60d9511b96@ruby-forum.com> References: <8d2b830e2d21a330daa5c4973818bb67@ruby-forum.com> <86919de7be7fb50d6d0f887f55c9d0d4@ruby-forum.com> <71771d435b52016e16593e60d9511b96@ruby-forum.com> Message-ID: Hi I haven't found a good way to do those things yet. For the moment I'm focussing on getting the first couple of chapters ready for the meap. I don't know how to use generic notation for the c# classes that need it. And still wasn't able to do a query with linq 2 sql, as soon as I get some free time I'll try again. When I get some stuff going I'll surely post about it. I also have a job so i can't spend as much time on IronRuby as I'd like. Cheers, Ivan On Tue, Feb 26, 2008 at 9:43 PM, Softmind Technology wrote: > Hi Ivan, > > It seems your article is delayed. > > When can we expect it....? > > 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/20080226/2d75ae68/attachment.html From jomes at microsoft.com Tue Feb 26 16:56:30 2008 From: jomes at microsoft.com (John Messerly) Date: Tue, 26 Feb 2008 13:56:30 -0800 Subject: [Ironruby-core] Regexp anomalous behavior In-Reply-To: <53194650933664488F3F0C3A0AB568320A14C8@nw60.napa.fi> References: <53194650933664488F3F0C3A0AB568320A14C8@nw60.napa.fi> Message-ID: <918705E903F4714CB713D89AB5F1857D73B5916FA8@NA-EXMSG-C116.redmond.corp.microsoft.com> Robert Brotherus: > Consider following program (test.rb): > > puts 'aaabbbaaa'.match('aaa').length > puts 'aaabbbaaa'.match('x').length > > With CRuby, the result or running is: > > [08:49:31 ~] ruby test.rb > 1 > test.rb:2: undefined method `length' for nil:NilClass (NoMethodError) > > With IronRuby (revision 76): > > [08:37:14 ~] rbx test.rb > 3 > 0 Sure looks like a bug. I opened a bug for it: http://rubyforge.org/tracker/index.php?func=detail&aid=18407&group_id=4359&atid=16798 - John From Tomas.Matousek at microsoft.com Tue Feb 26 17:03:00 2008 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 26 Feb 2008 14:03:00 -0800 Subject: [Ironruby-core] ClassInitGenerator issues In-Reply-To: <6821FE23D98BAC41AC2A91E7970F31AF1CCF727609@QUTEXMBX02.qut.edu.au> References: <372109E149E8084D8E6C7D9CFD82E0632D916DA041@NA-EXMSG-C115.redmond.corp.microsoft.com> <918705E903F4714CB713D89AB5F1857D73B57CAC5A@NA-EXMSG-C116.redmond.corp.microsoft.com> <918705E903F4714CB713D89AB5F1857D73B57CAC99@NA-EXMSG-C116.redmond.corp.microsoft.com> <6821FE23D98BAC41AC2A91E7970F31AF1CCFD20EE0@QUTEXMBX02.qut.edu.au>, <6821FE23D98BAC41AC2A91E7970F31AF1CCFD9725E@QUTEXMBX02.qut.edu.au> <6821FE23D98BAC41AC2A91E7970F31AF1CCF727609@QUTEXMBX02.qut.edu.au> Message-ID: I think it is reasonable to add custom initialization method for classes to ClassInitGenerator. However, it is still better (for tooling, reduction of duplicated code etc.) to initialize classes declaratively (using attributes) than imperatively (executing arbitrary code). The class name clash is a bug that we will fixed. ClassInitGenerator doesn't need to be used by all extensions but will be recommended. As for testing, the preferred way to test libraries is to write RSpec tests and contribute them to Rubinius. John will write more on specs. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Wayne Kelly Sent: Tuesday, February 26, 2008 12:43 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] ClassInitGenerator issues Sorry, I realized after I posted that my issues are based on some questionable assumptions ... Given that there isn't yet a mechanism for loading ruby extension dlls, I followed the workaround, used for example by the current socket class implementations, where extension classes are simply added along side the builtin classes defined in IronRuby.Libraries. In the longer term, if non-builtin classes are implemented in separate assemblies then my name clash problem becomes less of an issue. I was also assuming that ClassInitGenerator would be used to automatically generate the module initialization code, but this may not necessarily be the case for non-builtin classes implemented in external assemblies. So my per class initialization hook issue also goes away if developers are simply able to manually implement their own equivalent of LoadModules(). It would be nice, however, to decide what this extention loading mechanism is going to be. Also, is there a simple way to test our C# extension libraries standalone (ie without having to run rbx.exe)? In the case of the openssl library it was easy to write a simple C# test harness as the openssl implementation didn't really use any of the IronRuby infrastructure (apart from simple classes such as MutableString). However, for more sophisticated libraries that, for example make use of dynamic call sites, it is difficult to call the library methods without the appropriate CodeContexts etc. Is there an easy way to create the appropriate contexts etc for use in a simple test harness or is it too difficult to bother attempting? Cheers, Wayne. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From w.kelly at qut.edu.au Tue Feb 26 18:35:15 2008 From: w.kelly at qut.edu.au (Wayne Kelly) Date: Wed, 27 Feb 2008 09:35:15 +1000 Subject: [Ironruby-core] ClassInitGenerator issues In-Reply-To: References: <372109E149E8084D8E6C7D9CFD82E0632D916DA041@NA-EXMSG-C115.redmond.corp.microsoft.com> <918705E903F4714CB713D89AB5F1857D73B57CAC5A@NA-EXMSG-C116.redmond.corp.microsoft.com> <918705E903F4714CB713D89AB5F1857D73B57CAC99@NA-EXMSG-C116.redmond.corp.microsoft.com> <6821FE23D98BAC41AC2A91E7970F31AF1CCFD20EE0@QUTEXMBX02.qut.edu.au>, <6821FE23D98BAC41AC2A91E7970F31AF1CCFD9725E@QUTEXMBX02.qut.edu.au> <6821FE23D98BAC41AC2A91E7970F31AF1CCF727609@QUTEXMBX02.qut.edu.au> Message-ID: <6821FE23D98BAC41AC2A91E7970F31AF1CCFD97459@QUTEXMBX02.qut.edu.au> > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of > Tomas Matousek > Sent: Wednesday, 27 February 2008 8:03 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] ClassInitGenerator issues > > As for testing, the preferred way to test libraries is to > write RSpec tests and contribute them to Rubinius. Yes, I can certainly write Ruby tests for these libraries as well, but I'd prefer to also be able to write simple C# test harnesses that directly exercise these libraries. Firstly, there's the issue that external libraries can't currently be loaded into IronRuby. And from a testing perspective, it's always desirable to eliminate as many variables as possible, ie if a test doesn't work, one doesn't want to have to consider: is this a bug in the library that I'm testing or in some other aspect of the IronRuby infrastructure. The OpenSSL_Test.cs file that I attached to a previous post is a simple example of what I'm talking about. But I'm not sure how to extend that approach when CodeContexts are required. Cheers, Wayne. From w.kelly at qut.edu.au Tue Feb 26 23:04:08 2008 From: w.kelly at qut.edu.au (Wayne Kelly) Date: Wed, 27 Feb 2008 14:04:08 +1000 Subject: [Ironruby-core] Win32API implemented! In-Reply-To: <6821FE23D98BAC41AC2A91E7970F31AF1CCFD97459@QUTEXMBX02.qut.edu.au> References: <372109E149E8084D8E6C7D9CFD82E0632D916DA041@NA-EXMSG-C115.redmond.corp.microsoft.com> <918705E903F4714CB713D89AB5F1857D73B57CAC5A@NA-EXMSG-C116.redmond.corp.microsoft.com> <918705E903F4714CB713D89AB5F1857D73B57CAC99@NA-EXMSG-C116.redmond.corp.microsoft.com> <6821FE23D98BAC41AC2A91E7970F31AF1CCFD20EE0@QUTEXMBX02.qut.edu.au>, <6821FE23D98BAC41AC2A91E7970F31AF1CCFD9725E@QUTEXMBX02.qut.edu.au> <6821FE23D98BAC41AC2A91E7970F31AF1CCF727609@QUTEXMBX02.qut.edu.au> <6821FE23D98BAC41AC2A91E7970F31AF1CCFD97459@QUTEXMBX02.qut.edu.au> Message-ID: <6821FE23D98BAC41AC2A91E7970F31AF1CCFD978CF@QUTEXMBX02.qut.edu.au> You may recall from an earlier post that one of the external libraries used by some simple Rails use cases was Win32API.so So, I started to look into how to implement this library - it was going to be quite complex to implement in a fully managed way, involving lots of dynamic pInvoke stuff. I then thought, hey the same Rails code runs on other platforms that obviously don't support the Win32 API. So, upon further investigation I learned that Rails tries to require "Win32API", but if the attempted load throws a not found exception it simply uses other more generic mechanisms to achieve the task at hand. So, implementing the Win32API for IronRuby is as simple as deleting Win32API.so! Cheers, Wayne. From m.david at xmlhacker.com Tue Feb 26 23:21:52 2008 From: m.david at xmlhacker.com (M. David Peterson) Date: Tue, 26 Feb 2008 21:21:52 -0700 Subject: [Ironruby-core] Win32API implemented! In-Reply-To: <6821FE23D98BAC41AC2A91E7970F31AF1CCFD978CF@QUTEXMBX02.qut.edu.au> References: <372109E149E8084D8E6C7D9CFD82E0632D916DA041@NA-EXMSG-C115.redmond.corp.microsoft.com> <918705E903F4714CB713D89AB5F1857D73B57CAC5A@NA-EXMSG-C116.redmond.corp.microsoft.com> <918705E903F4714CB713D89AB5F1857D73B57CAC99@NA-EXMSG-C116.redmond.corp.microsoft.com> <6821FE23D98BAC41AC2A91E7970F31AF1CCFD20EE0@QUTEXMBX02.qut.edu.au> <6821FE23D98BAC41AC2A91E7970F31AF1CCFD9725E@QUTEXMBX02.qut.edu.au> <6821FE23D98BAC41AC2A91E7970F31AF1CCF727609@QUTEXMBX02.qut.edu.au> <6821FE23D98BAC41AC2A91E7970F31AF1CCFD97459@QUTEXMBX02.qut.edu.au> <6821FE23D98BAC41AC2A91E7970F31AF1CCFD978CF@QUTEXMBX02.qut.edu.au> Message-ID: On Tue, 26 Feb 2008 21:04:08 -0700, Wayne Kelly wrote: > So, implementing the Win32API for IronRuby is as simple as deleting > Win32API.so! Very cool! Out of curiosity, given the fact that Rails has traditionally required significant hair loss before getting it to run on Windows, why would Rails look for the Win32API library *first* before going about things another way? -- /M:D M. David Peterson Co-Founder & Chief Architect, 3rd&Urban, LLC Email: m.david at 3rdandUrban.com | m.david at amp.fm Mobile: (206) 418-9027 http://3rdandUrban.com | http://amp.fm | http://www.oreillynet.com/pub/au/2354 From lists at ruby-forum.com Tue Feb 26 23:25:01 2008 From: lists at ruby-forum.com (Web Reservoir) Date: Wed, 27 Feb 2008 05:25:01 +0100 Subject: [Ironruby-core] Dead Slow Progress on IronRuby... No Beta Yet Message-ID: <3640f434fa5d558af9eaf77409cd0725@ruby-forum.com> Hi, I was expecting a rapid growth on IronRuby keeping following things in my mind which i had preserved so far. (1) Ruby.Net code ( partially ) was licensed by MS to incorporate in to IronRuby (2) IronRuby was announced in last year Mix 2007 event ( almost a year now ) (3) It was decided to place IronRuby on RubyForge for great support.. Even with all this aspects... IronRuby Progress is dead slow. If a part of Ruby.Net was included, and if Ruby.Net can give a stable version, why IronRuby lacks Beta Stage so far. Its almost one year since IronRuby was announced in the Mix event last year, and the new Mix 2008 is round the corner, still no news about Beta yet... If we add, (1) Ruby.Net Code + (2) Ruby Forge contribution + (3) Full time IronRuby Team support... this could have shaped very fast. Plan your work.... and workout your plans. This would have yielded better results so far. It seems there is something wrong with the exact tuning with DLR My simple question... "will there will ever be LINQ support with Dynamic language like IronRuby " still remains hanging.which shows the lack of correct tuning with other areas in .Net. Hoping to see Beta stage soon. ( Let me clarify... I am totally in support with IronRuby, but the slow progress kills my enthusiasm ) Just my 2 cents WebReservoir -- Posted via http://www.ruby-forum.com/. From jflam at microsoft.com Tue Feb 26 23:35:01 2008 From: jflam at microsoft.com (John Lam (DLR)) Date: Tue, 26 Feb 2008 20:35:01 -0800 Subject: [Ironruby-core] Dead Slow Progress on IronRuby... No Beta Yet In-Reply-To: <3640f434fa5d558af9eaf77409cd0725@ruby-forum.com> References: <3640f434fa5d558af9eaf77409cd0725@ruby-forum.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D916DAB04@NA-EXMSG-C115.redmond.corp.microsoft.com> Web Reservoir: > Even with all this aspects... IronRuby Progress is dead slow. > > If a part of Ruby.Net was included, and if Ruby.Net can give a stable > version, why IronRuby lacks Beta Stage so far. Its almost one year > since IronRuby was announced in the Mix event last year, and the new > Mix 2008 is round the corner, still no news about Beta yet... If you feel progress is 'dead slow', then *you* can help out. You can contribute by downloading the sources, building them and reporting bugs. You can also contribute by contributing patches. We *do* have members from the community who have helped out tremendously in their spare time. Surely you can do the same? BTW, can you please define 'beta stage' for me so that we can make sure to add it to our plans? Thanks, -John From m.david at xmlhacker.com Tue Feb 26 23:38:26 2008 From: m.david at xmlhacker.com (M. David Peterson) Date: Tue, 26 Feb 2008 21:38:26 -0700 Subject: [Ironruby-core] Dead Slow Progress on IronRuby... No Beta Yet In-Reply-To: <3640f434fa5d558af9eaf77409cd0725@ruby-forum.com> References: <3640f434fa5d558af9eaf77409cd0725@ruby-forum.com> Message-ID: On Tue, 26 Feb 2008 21:25:01 -0700, Web Reservoir wrote: > It seems there is something wrong with the exact > tuning with DLR If I were to speculate I would think that you'll see a massive influx of code just after Mix08 for the simple fact that -- as far as I can tell -- everyone @ MSFT working on DLR-related projects is heads down at the moment preparing for a spectacular showcase of platform capabilities, new announcements of products/project features, etc. Once the pressure of Mix08 has been released my *guess* is that these same folks will start churning out code that extends from what was shown @Mix by the truck load. Of course, this is just a guess, but having worked @MSFT and having presented at many conferences while I was there I can assure you that the preparations for shows as big as Mix begin _well_ in advance, and the pressure to go big is tremendous. Once that pressure has subsided, I would expect rapid advancement of the IronRuby project. Just my two cents. -- /M:D M. David Peterson Co-Founder & Chief Architect, 3rd&Urban, LLC Email: m.david at 3rdandUrban.com | m.david at amp.fm Mobile: (206) 418-9027 http://3rdandUrban.com | http://amp.fm | http://www.oreillynet.com/pub/au/2354 From m.david at xmlhacker.com Tue Feb 26 23:42:05 2008 From: m.david at xmlhacker.com (M. David Peterson) Date: Tue, 26 Feb 2008 21:42:05 -0700 Subject: [Ironruby-core] Dead Slow Progress on IronRuby... No Beta Yet In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D916DAB04@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <3640f434fa5d558af9eaf77409cd0725@ruby-forum.com> <372109E149E8084D8E6C7D9CFD82E0632D916DAB04@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: On Tue, 26 Feb 2008 21:35:01 -0700, John Lam (DLR) wrote: > You can contribute by downloading the sources, building them and > reporting bugs. You can also contribute by contributing patches. Just an observation from the outside: I can count the number of patches/contributions to this project from external folks on one hand, and every single one of those patches/contributions were reviewed/commented upon/injected into the source tree when and as appropriate within 48 hours. Of course, I'm just as guilty as everyone else: I haven't contributed a single line of code to this project, something I really need to fix. -- /M:D M. David Peterson Co-Founder & Chief Architect, 3rd&Urban, LLC Email: m.david at 3rdandUrban.com | m.david at amp.fm Mobile: (206) 418-9027 http://3rdandUrban.com | http://amp.fm | http://www.oreillynet.com/pub/au/2354 From lists at ruby-forum.com Tue Feb 26 23:48:58 2008 From: lists at ruby-forum.com (Web Reservoir) Date: Wed, 27 Feb 2008 05:48:58 +0100 Subject: [Ironruby-core] Dead Slow Progress on IronRuby... No Beta Yet In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D916DAB04@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <3640f434fa5d558af9eaf77409cd0725@ruby-forum.com> <372109E149E8084D8E6C7D9CFD82E0632D916DAB04@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: Dear John, Unfortunately i am from VB6 background, exploring more with Ruby Knowledge, and willing to start working extensively with IronRuby and Asp.Net MVC My Knowledge with C# is *ZERO* and thats what keeps me out to contribute. You can expect my best support for IronRuby 2.0 Since you have already classified Pre Alpha 1 and 2.... You are the owner and judge to announce BETA stage. Thanks -- Posted via http://www.ruby-forum.com/. From jflam at microsoft.com Wed Feb 27 00:00:30 2008 From: jflam at microsoft.com (John Lam (DLR)) Date: Tue, 26 Feb 2008 21:00:30 -0800 Subject: [Ironruby-core] Dead Slow Progress on IronRuby... No Beta Yet In-Reply-To: References: <3640f434fa5d558af9eaf77409cd0725@ruby-forum.com> <372109E149E8084D8E6C7D9CFD82E0632D916DAB04@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D916DAB13@NA-EXMSG-C115.redmond.corp.microsoft.com> Web Reservoir: > My Knowledge with C# is *ZERO* and thats what keeps me out to > contribute. That's OK. But you can download and build from sources, right? If so, then you can contribute by writing tutorials about your experiences, or by filing bug reports. If *building* IronRuby blocks you from participating, expect that to be fixed post-MIX. Thanks, -John From lists at ruby-forum.com Wed Feb 27 01:21:51 2008 From: lists at ruby-forum.com (Softmind Technology) Date: Wed, 27 Feb 2008 07:21:51 +0100 Subject: [Ironruby-core] IronRuby Support with VWD 2008 ---- Cheers Message-ID: Hi, I'm quoting the latest blog by ScottGu for Silverlight 2.0 ------------------------------------------------------------------------ Developers can write Silverlight applications using any .NET language (including VB, C#, JavaScript, IronPython and IronRuby). We will ship Visual Studio 2008 and Expression Studio tool support that enables great developer / designer workflow and integration when building Silverlight applications. ------------------------------------------------------------------------ In response to a comment posted to the above blog, ScottGu answered as below... Hi Ming, >>>>>> I hope it can on VWD 2008....... We'll also support Silverlight development with VWD 2008. Thanks, Scott ---------------------- It clearly means, we shall be getting the IronRuby advantage on VWD2008 as well, since IronRuby is one of the 5 languages helping you to build SilverLight 2.0. Pl. correct me if i am wrong I hope, what i understand is true. -- Posted via http://www.ruby-forum.com/. From sanxiyn at gmail.com Wed Feb 27 05:25:10 2008 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Wed, 27 Feb 2008 19:25:10 +0900 Subject: [Ironruby-core] Dead Slow Progress on IronRuby... No Beta Yet In-Reply-To: <372109E149E8084D8E6C7D9CFD82E0632D916DAB13@NA-EXMSG-C115.redmond.corp.microsoft.com> References: <3640f434fa5d558af9eaf77409cd0725@ruby-forum.com> <372109E149E8084D8E6C7D9CFD82E0632D916DAB04@NA-EXMSG-C115.redmond.corp.microsoft.com> <372109E149E8084D8E6C7D9CFD82E0632D916DAB13@NA-EXMSG-C115.redmond.corp.microsoft.com> Message-ID: <5b0248170802270225m5bf5e0adwcdee27bec0ea38cb@mail.gmail.com> 2008/2/27, John Lam (DLR) : > That's OK. But you can download and build from sources, right? If so, then you can contribute by writing tutorials about your experiences, or by filing bug reports. > > If *building* IronRuby blocks you from participating, expect that to be fixed post-MIX. Indeed, if you have some Ruby knowledge, the easiest way to contribute for outsiders is to try to use your favorite Ruby library or to run your favorite Ruby application with IronRuby, and report minimal testcases. This does not require any C# or DLR knowledge. Testing and testcase reduction are very important works, and can be rewarding. That said, the problem is that IronRuby is currently so incomplete that you can hardly require any Ruby standard library before running into problems. In my experience this has been the most discouraging. In comparison, I could require 'date' and 'url' in Ruby.NET just after a small number of bug fixes. -- Seo Sanghyeon From michael.letterle at gmail.com Wed Feb 27 08:53:27 2008 From: michael.letterle at gmail.com (Michael Letterle) Date: Wed, 27 Feb 2008 08:53:27 -0500 Subject: [Ironruby-core] Dead Slow Progress on IronRuby... No Beta Yet In-Reply-To: References: <3640f434fa5d558af9eaf77409cd0725@ruby-forum.com> Message-ID: Because of the current heads down nature of the DLR team, I think the current /perception/ of lack of progress is real. Knowing that things are going to change around Mix in the code kind makes one a bit lery to put too much stock in what we have now. Meaning, I don't know what bugs are being worked on and what interfaces and APIs might change between now and then. Just makes me a bit hesitant. That said, one can still download, play and submit bugs.. On Tue, Feb 26, 2008 at 11:38 PM, M. David Peterson wrote: > On Tue, 26 Feb 2008 21:25:01 -0700, Web Reservoir > wrote: > > > > It seems there is something wrong with the exact > > tuning with DLR > > If I were to speculate I would think that you'll see a massive influx of > code just after Mix08 for the simple fact that -- as far as I can tell -- > everyone @ MSFT working on DLR-related projects is heads down at the > moment preparing for a spectacular showcase of platform capabilities, new > announcements of products/project features, etc. Once the pressure of > Mix08 has been released my *guess* is that these same folks will start > churning out code that extends from what was shown @Mix by the truck load. > > Of course, this is just a guess, but having worked @MSFT and having > presented at many conferences while I was there I can assure you that the > preparations for shows as big as Mix begin _well_ in advance, and the > pressure to go big is tremendous. Once that pressure has subsided, I would > expect rapid advancement of the IronRuby project. > > Just my two cents. > > -- > /M:D > > M. David Peterson > Co-Founder & Chief Architect, 3rd&Urban, LLC > Email: m.david at 3rdandUrban.com | m.david at amp.fm > Mobile: (206) 418-9027 > http://3rdandUrban.com | http://amp.fm | > http://www.oreillynet.com/pub/au/2354 > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -- Michael Letterle [Polymath Programmer] http://michaeldotnet.blogspot.com From enicholson at gmail.com Wed Feb 27 08:58:00 2008 From: enicholson at gmail.com (Eric Nicholson) Date: Wed, 27 Feb 2008 08:58:00 -0500 Subject: [Ironruby-core] Dead Slow Progress on IronRuby... No Beta Yet In-Reply-To: <3640f434fa5d558af9eaf77409cd0725@ruby-forum.com> References: <3640f434fa5d558af9eaf77409cd0725@ruby-forum.com> Message-ID: In the IR crew's defense, there is a lot you can do with IronRuby right now, that isn't practical otherwise. Sure the ruby libraries are great, and running Rails on .NET is cool. But I'm a .NET programmer, I don't really care that much about the ruby framework, I want the language in MY apps. The .NET interop in IronRuby really works well, and makes a great way to control mountains of .NET code dynamically with a much more elegant language. Good job guys! On one level I agree though... It's about time for a binary release. It's hard to convince other people to look at something you have to grab from SVN and compile. Beta, alpha or CTP, I don't really care. -Eric On Tue, Feb 26, 2008 at 11:25 PM, Web Reservoir wrote: > Hi, > > I was expecting a rapid growth on IronRuby keeping following things in > my mind which i had preserved so far. > > (1) Ruby.Net code ( partially ) was licensed by MS to incorporate in to > IronRuby > > (2) IronRuby was announced in last year Mix 2007 event ( almost a year > now ) > > (3) It was decided to place IronRuby on RubyForge for great support.. > > Even with all this aspects... IronRuby Progress is dead slow. > > If a part of Ruby.Net was included, and if Ruby.Net can give a stable > version, why IronRuby lacks Beta Stage so far. Its almost one year since > IronRuby was announced in the Mix event last year, and the new Mix 2008 > is round the corner, still no news about Beta yet... > > If we add, (1) Ruby.Net Code + (2) Ruby Forge contribution + (3) Full > time IronRuby Team support... this could have shaped very fast. > > Plan your work.... and workout your plans. This would have yielded > better results so far. It seems there is something wrong with the exact > tuning with DLR > > My simple question... "will there will ever be LINQ support with Dynamic > language like IronRuby " still remains hanging.which shows the lack of > correct tuning with other areas in .Net. > > Hoping to see Beta stage soon. > > ( Let me clarify... I am totally in support with IronRuby, but the slow > progress kills my enthusiasm ) > > Just my 2 cents > > WebReservoir > -- > 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/20080227/52a522ad/attachment-0001.html From jflam at microsoft.com Wed Feb 27 10:43:49 2008 From: jflam at microsoft.com (John Lam (DLR)) Date: Wed, 27 Feb 2008 07:43:49 -0800 Subject: [Ironruby-core] Dead Slow Progress on IronRuby... No Beta Yet In-Reply-To: References: <3640f434fa5d558af9eaf77409cd0725@ruby-forum.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D916DAC58@NA-EXMSG-C115.redmond.corp.microsoft.com> Eric Nicholson: > On one level I agree though... It's about time for a binary release. > It's hard to convince other people to look at something you have to > grab from SVN and compile. Beta, alpha or CTP, I don't really care. Post-MIX we're going to have binaries available. Thanks, -John From jflam at microsoft.com Wed Feb 27 10:46:39 2008 From: jflam at microsoft.com (John Lam (DLR)) Date: Wed, 27 Feb 2008 07:46:39 -0800 Subject: [Ironruby-core] Dead Slow Progress on IronRuby... No Beta Yet In-Reply-To: References: <3640f434fa5d558af9eaf77409cd0725@ruby-forum.com> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D916DAC5D@NA-EXMSG-C115.redmond.corp.microsoft.com> Michael Letterle: > Because of the current heads down nature of the DLR team, I think the > current /perception/ of lack of progress is real. Knowing that things > are going to change around Mix in the code kind makes one a bit lery to > put too much stock in what we have now. Meaning, I don't know what > bugs are being worked on and what interfaces and APIs might change > between now and then. Just makes me a bit hesitant. That said, one > can still download, play and submit bugs.. Right now we're getting things ready for MIX. What that means is making sure that our interop works correctly, that we build *and run* correctly on CoreCLR (the Silverlight version of the CLR). There are bug fixes in the core language among other things that are in that build. There are no user-visible changes as far as anyone outside will see, nor are there any breaking changes in APIs that you would use to build libraries. There are no major changes planned on the library interfaces. So if you're currently hacking on a library we shouldn't break you today. Thanks, -John From jflam at microsoft.com Wed Feb 27 10:48:09 2008 From: jflam at microsoft.com (John Lam (DLR)) Date: Wed, 27 Feb 2008 07:48:09 -0800 Subject: [Ironruby-core] Win32API implemented! In-Reply-To: <6821FE23D98BAC41AC2A91E7970F31AF1CCFD978CF@QUTEXMBX02.qut.edu.au> References: <372109E149E8084D8E6C7D9CFD82E0632D916DA041@NA-EXMSG-C115.redmond.corp.microsoft.com> <918705E903F4714CB713D89AB5F1857D73B57CAC5A@NA-EXMSG-C116.redmond.corp.microsoft.com> <918705E903F4714CB713D89AB5F1857D73B57CAC99@NA-EXMSG-C116.redmond.corp.microsoft.com> <6821FE23D98BAC41AC2A91E7970F31AF1CCFD20EE0@QUTEXMBX02.qut.edu.au>, <6821FE23D98BAC41AC2A91E7970F31AF1CCFD9725E@QUTEXMBX02.qut.edu.au> <6821FE23D98BAC41AC2A91E7970F31AF1CCF727609@QUTEXMBX02.qut.edu.au> <6821FE23D98BAC41AC2A91E7970F31AF1CCFD97459@QUTEXMBX02.qut.edu.au> <6821FE23D98BAC41AC2A91E7970F31AF1CCFD978CF@QUTEXMBX02.qut.edu.au> Message-ID: <372109E149E8084D8E6C7D9CFD82E0632D916DAC62@NA-EXMSG-C115.redmond.corp.microsoft.com> Wayne Kelly: > So, implementing the Win32API for IronRuby is as simple as deleting > Win32API.so! If only everything were so easy ... thanks, Wayne! -John From w.kelly at qut.edu.au Wed Feb 27 22:51:17 2008 From: w.kelly at qut.edu.au (Wayne Kelly) Date: Thu, 28 Feb 2008 13:51:17 +1000 Subject: [Ironruby-core] digest.so implemented Message-ID: <6821FE23D98BAC41AC2A91E7970F31AF1CCF72760B@QUTEXMBX02.qut.edu.au> Attached is an implementation of the methods and classes from external library digest.so that are used by some simple Rails use cases. ----------------------------------------------------------------------------------------- I note, that the IronRuby pattern for supporting custom object cloning it to implement the IDuplicable interface. Is there some reason for this approach rather than using Ruby's standard mechanism of implementing an initialize_copy method? With the latter approach, Ruby programmers can implement their own copy semantics, eg: class Foo def initialize_copy(c) puts 'copying' end end f = Foo.new g = f.clone Cheers, Wayne. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: Digest.cs Url: http://rubyforge.org/pipermail/ironruby-core/attachments/20080228/315649d5/attachment.pl -------------- next part -------------- A non-text attachment was scrubbed... Name: digest_test.rb Type: application/octet-stream Size: 764 bytes Desc: digest_test.rb Url : http://rubyforge.org/pipermail/ironruby-core/attachments/20080228/315649d5/attachment.obj From sanxiyn at gmail.com Thu Feb 28 02:50:57 2008 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Thu, 28 Feb 2008 16:50:57 +0900 Subject: [Ironruby-core] digest.so implemented In-Reply-To: <6821FE23D98BAC41AC2A91E7970F31AF1CCF72760B@QUTEXMBX02.qut.edu.au> References: <6821FE23D98BAC41AC2A91E7970F31AF1CCF72760B@QUTEXMBX02.qut.edu.au> Message-ID: <5b0248170802272350qa4b8059t6ddcc1b80c667251@mail.gmail.com> 2008/2/28, Wayne Kelly : > Attached is an implementation of the methods and classes from external library digest.so that are used by some simple Rails use cases. This implementation appends all strings hashed to the buffer. Which means, if you hash 100 MB file, each megabyte incrementally, 100 MB MutableString is allocated. This is unnecessary, and can be avoided by using TransformBlock. FePy's implementation of hashlib extension module uses this method. See: http://fepy.svn.sourceforge.net/svnroot/fepy/trunk/lib/hashlib.py -- Seo Sanghyeon From bacondarwin at googlemail.com Thu Feb 28 03:35:00 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Thu, 28 Feb 2008 08:35:00 -0000 Subject: [Ironruby-core] digest.so implemented In-Reply-To: <6821FE23D98BAC41AC2A91E7970F31AF1CCF72760B@QUTEXMBX02.qut.edu.au> References: <6821FE23D98BAC41AC2A91E7970F31AF1CCF72760B@QUTEXMBX02.qut.edu.au> Message-ID: <000001c879e4$cfaa0670$6efe1350$@com> You are really on a roll Wayne. Great stuff! I might be wrong but my impression of the IronRuby support for the various .NET interfaces, such as IDuplicable, IEnumerable and so on, was purely to support .NET interop and not designed to be the mechanism used by actual Ruby libraries. So I suppose the most comprehensive method would be to support both initialize_copy and IDuplicable if you can and then one or the other if you can't (i.e. you are developing only in Ruby or you have a 3rd party .NET class). Correct me if I'm wrong. Pete -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Wayne Kelly Sent: Thursday,28 February 28, 2008 03:51 To: ironruby-core at rubyforge.org Subject: [Ironruby-core] digest.so implemented Attached is an implementation of the methods and classes from external library digest.so that are used by some simple Rails use cases. ---------------------------------------------------------------------------- ------------- I note, that the IronRuby pattern for supporting custom object cloning it to implement the IDuplicable interface. Is there some reason for this approach rather than using Ruby's standard mechanism of implementing an initialize_copy method? With the latter approach, Ruby programmers can implement their own copy semantics, eg: class Foo def initialize_copy(c) puts 'copying' end end f = Foo.new g = f.clone Cheers, Wayne. From lists at ruby-forum.com Thu Feb 28 07:55:08 2008 From: lists at ruby-forum.com (Ales Sturala) Date: Thu, 28 Feb 2008 13:55:08 +0100 Subject: [Ironruby-core] DLR - where is the community? Message-ID: Hi, DLR is nice, but what is still missing is "community". I think there is plenty of people trying DLR, but there is no good source for information except some blogs. What I am really missing is some community forum, where all the developers can look for solutions and discuss their problems. Now it looks those people are spread over the Internet and there is no place for discussion yet ... or maybe I am wrong and I just didn't find it. Anyway if there is not such place, would be possible to make at least category on MSDN forums for DLR? PS: Sorry for asking this here, but this forum looks like the closest one to DLR topic :] -- Posted via http://www.ruby-forum.com/. From sanxiyn at gmail.com Thu Feb 28 08:04:15 2008 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Thu, 28 Feb 2008 22:04:15 +0900 Subject: [Ironruby-core] DLR - where is the community? In-Reply-To: References: Message-ID: <5b0248170802280504m6a80d019qfac94232df73043d@mail.gmail.com> 2008/2/28, Ales Sturala : > Hi, > DLR is nice, but what is still missing is "community". I think there is > plenty of people trying DLR, but there is no good source for information > except some blogs. What I am really missing is some community forum, > where all the developers can look for solutions and discuss their > problems. Now it looks those people are spread over the Internet and > there is no place for discussion yet ... or maybe I am wrong and I just > didn't find it. Eh, *this* list is a such forum? And IronPython list. > Anyway if there is not such place, would be possible to make at least > category on MSDN forums for DLR? I much prefer mailing lists to forums. -- Seo Sanghyeon From slavof at gmail.com Thu Feb 28 08:21:08 2008 From: slavof at gmail.com (Slavo Furman) Date: Thu, 28 Feb 2008 14:21:08 +0100 Subject: [Ironruby-core] DLR - where is the community? In-Reply-To: <5b0248170802280504m6a80d019qfac94232df73043d@mail.gmail.com> References: <5b0248170802280504m6a80d019qfac94232df73043d@mail.gmail.com> Message-ID: <24e27e560802280521s21d4af7g10deae2c42eba57f@mail.gmail.com> Hello! i was thinking about same ("where to ask DLR specific questions") few days ago while reading DLR articles on Tomas Restrepo's weblog (btw, thanks for good articles, Tomas... ) maybe it would be a good idea have separate DLR mailing list or forum (for DLR specific language agnostic questions). But i am afraid that this is a same sort of decision as if there should be separate codebase for DLR or not. I would prefer separate mailing lists and separate codebase, but I understand that it is not easy decision. thanks, Slavo. On Thu, Feb 28, 2008 at 2:04 PM, Sanghyeon Seo wrote: > 2008/2/28, Ales Sturala : > > Hi, > > DLR is nice, but what is still missing is "community". I think there is > > plenty of people trying DLR, but there is no good source for > information > > except some blogs. What I am really missing is some community forum, > > where all the developers can look for solutions and discuss their > > problems. Now it looks those people are spread over the Internet and > > there is no place for discussion yet ... or maybe I am wrong and I just > > didn't find it. > > Eh, *this* list is a such forum? And IronPython list. > > > Anyway if there is not such place, would be possible to make at least > > category on MSDN forums for DLR? > > I much prefer mailing lists to forums. > > -- > 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/20080228/4cc6f068/attachment.html From lists at ruby-forum.com Thu Feb 28 08:25:46 2008 From: lists at ruby-forum.com (Ales Sturala) Date: Thu, 28 Feb 2008 14:25:46 +0100 Subject: [Ironruby-core] DLR - where is the community? In-Reply-To: <5b0248170802280504m6a80d019qfac94232df73043d@mail.gmail.com> References: <5b0248170802280504m6a80d019qfac94232df73043d@mail.gmail.com> Message-ID: Sanghyeon Seo wrote: > 2008/2/28, Ales Sturala : >> Hi, >> DLR is nice, but what is still missing is "community". I think there is >> plenty of people trying DLR, but there is no good source for information >> except some blogs. What I am really missing is some community forum, >> where all the developers can look for solutions and discuss their >> problems. Now it looks those people are spread over the Internet and >> there is no place for discussion yet ... or maybe I am wrong and I just >> didn't find it. > > Eh, *this* list is a such forum? And IronPython list. > >> Anyway if there is not such place, would be possible to make at least >> category on MSDN forums for DLR? > > I much prefer mailing lists to forums. As you said, here it is about IronPhyton. Most of questions are what doesn't work in IronPhyton, what works differently then expected, etc .. but not about building languages on DLR, using DLR AST and so on ... -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Thu Feb 28 09:36:25 2008 From: lists at ruby-forum.com (Huw Collingbourne) Date: Thu, 28 Feb 2008 15:36:25 +0100 Subject: [Ironruby-core] Ruby In Steel IronRuby Edition - alpha now available Message-ID: The first public alpha of our IronRuby IDE is now available for free download. This includes our IronRuby form designer with drag+drop controls, properties panel, syntax coloring, code collapsing, code formatting, bracket matching, keyword..end matching, project setup wizards, project management in the solution explorer etc. It does not currently include debugging or IntelliSense. You can read about its features and limitations on the download page: http://www.sapphiresteel.com/Ruby-In-Steel-For-IronRuby Have fun! Huw SapphireSteel Software Ruby and Rails In Visual Studio http://www.sapphiresteel.com -- Posted via http://www.ruby-forum.com/. From w.kelly at qut.edu.au Thu Feb 28 18:51:30 2008 From: w.kelly at qut.edu.au (Wayne Kelly) Date: Fri, 29 Feb 2008 09:51:30 +1000 Subject: [Ironruby-core] digest.so implemented In-Reply-To: <5b0248170802272350qa4b8059t6ddcc1b80c667251@mail.gmail.com> References: <6821FE23D98BAC41AC2A91E7970F31AF1CCF72760B@QUTEXMBX02.qut.edu.au> <5b0248170802272350qa4b8059t6ddcc1b80c667251@mail.gmail.com> Message-ID: <6821FE23D98BAC41AC2A91E7970F31AF1CCFDFA1E3@QUTEXMBX02.qut.edu.au> > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of > Sanghyeon Seo > Sent: Thursday, 28 February 2008 5:51 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] digest.so implemented > > This implementation appends all strings hashed to the buffer. > Which means, if you hash 100 MB file, each megabyte > incrementally, 100 MB MutableString is allocated. This is > unnecessary, and can be avoided by using TransformBlock. Hi Seo, Thanks for raising this. I was aware of the performance issue and my original implementation did use the TransformBlock method, but I switched to an explicit buffer approach in order to support cloning of digest objects. I didn't think/realize it was possible to clone .NET Crypto objects. I see you use the MemberwiseClone method. Firstly, I thought this was a protected member, how are you able to directly call it on your context objects? Secondly, is the shallow copy that MemberwiseClone performs going to give us the correct cloning semantics? P.S. I notice your module is implemented in Python - I hadn't even contemplated the idea of implementing these libraries in Ruby - I guess because I'm a C# developer. Do people think we should rewrite these extension libraries in Ruby? Cheers, Wayne. From sanxiyn at gmail.com Thu Feb 28 23:23:06 2008 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Fri, 29 Feb 2008 13:23:06 +0900 Subject: [Ironruby-core] digest.so implemented In-Reply-To: <6821FE23D98BAC41AC2A91E7970F31AF1CCFDFA1E3@QUTEXMBX02.qut.edu.au> References: <6821FE23D98BAC41AC2A91E7970F31AF1CCF72760B@QUTEXMBX02.qut.edu.au> <5b0248170802272350qa4b8059t6ddcc1b80c667251@mail.gmail.com> <6821FE23D98BAC41AC2A91E7970F31AF1CCFDFA1E3@QUTEXMBX02.qut.edu.au> Message-ID: <5b0248170802282023t7c6db335rd386408247372acc@mail.gmail.com> 2008/2/29, Wayne Kelly : > Thanks for raising this. I was aware of the performance issue and my original implementation did use the TransformBlock method, but I switched to an explicit buffer approach in order to support cloning of digest objects. I didn't think/realize it was possible to clone .NET Crypto objects. > > I see you use the MemberwiseClone method. Firstly, I thought this was a protected member, how are you able to directly call it on your context objects? Secondly, is the shallow copy that MemberwiseClone performs going to give us the correct cloning semantics? I think visibility is enforced by compiler, not runtime. For example, one can access private members by reflection or by bytecode generation. In general, IronPython can access protected members by default, and private members when explicitly asked. Hash implementations are fully managed (in .NET and Mono), and shallow copying by MemberwiseClone does give the correct semantics *now*. hashlib.py is currently in production use. However, I don't think that MemberwiseClone gives correct semantics is guaranteed by explicit documentation. > P.S. I notice your module is implemented in Python - I hadn't even contemplated the idea of implementing these libraries in Ruby - I guess because I'm a C# developer. Do people think we should rewrite these extension libraries in Ruby? Writing in Ruby does simplify some boilerplates code, doesn't it? -- Seo Sanghyeon From robert.brotherus at napa.fi Fri Feb 29 02:51:27 2008 From: robert.brotherus at napa.fi (Robert Brotherus) Date: Fri, 29 Feb 2008 09:51:27 +0200 Subject: [Ironruby-core] Ruby In Steel IronRuby Edition - how about XAML / WPF? :-) References: Message-ID: <53194650933664488F3F0C3A0AB568320A18CD@nw60.napa.fi> Thanks for the great tool Huw! Have been playing with that for a while and feels really decent for an "alpha" version :-) Since we IronRuby early adopters are "living on the bleeding edge", there might be quite a few (including our company) that are more interested in WPF GUI:s (preverably with XAML, but possibly without) instead of the older Windows Forms. I am curious about Sapphire Steels plans / opinions on feasibility of combining WPF/XAML support their tool? I have myself a working proto of an application with WPF/XAML defined GUI:s and IronRuby event-handlers implemented as proxy-objects for the MSBuild-generated WPF Widget classes. While this approach works, it is not optimally elegant since the event handler methods are not first-class members of the widget classes. But we could not take the approach of extending the WPF-classes as IronRuby-classes because of our heavy reliance of XAML that refers to other XAML-defined custom classes: References: <53194650933664488F3F0C3A0AB568320A18CD@nw60.napa.fi> Message-ID: <72fbb8a4906e4cd29470b8b50cddbb40@ruby-forum.com> Thanks for the comments, Robert. In principle, WPF support is not difficult and as a general rule we plan to 'move forward' with Ruby In Steel. Currently, our alpha product is very basic (though I'm pleased to hear you say that it doesn't seem so!) - and, really, we are waiting for a few more iterations of IronRuby development before going too far ahead. So things such as WPF, debugging and IntelliSense will have to wait till later. We actually have implemented some IntelliSense already but we turned it off for the alpha release as it is by no means yet as good as the IntelliSense in our standard product. We felt it was worth waiting until IronRuby itself was a bit more mature before putting effort into supporting the full range of features and technologies that you would expect in the finished product. best wishes Huw SapphireSteel Software Ruby and Rails In Visual Studio http://www.sapphiresteel.com -- Posted via http://www.ruby-forum.com/. From bacondarwin at googlemail.com Fri Feb 29 08:16:15 2008 From: bacondarwin at googlemail.com (Peter Bacon Darwin) Date: Fri, 29 Feb 2008 13:16:15 -0000 Subject: [Ironruby-core] digest.so implemented In-Reply-To: <5b0248170802282023t7c6db335rd386408247372acc@mail.gmail.com> References: <6821FE23D98BAC41AC2A91E7970F31AF1CCF72760B@QUTEXMBX02.qut.edu.au> <5b0248170802272350qa4b8059t6ddcc1b80c667251@mail.gmail.com> <6821FE23D98BAC41AC2A91E7970F31AF1CCFDFA1E3@QUTEXMBX02.qut.edu.au> <5b0248170802282023t7c6db335rd386408247372acc@mail.gmail.com> Message-ID: <001501c87ad5$44a6e470$cdf4ad50$@com> I thought that the general idea in Ruby circles was that all their libraries should be written in Ruby unless there was some important reason not to, such as performance or access to underlying OS or hardware functionality that was not available to Ruby code? The Rubinius guys took this one step further and have pretty much implemented everything in Ruby (including the runtime engine itself) and where they needed to access the OS directly they have created hooks into the operating system via "special" Rubinius operations that allow the ruby code to do the stuff. Interestingly, they then run into the problem of people monkey patching their runtime engine by accident, which is what happened when you required the math library which changed the way division works in integers and this broke their implementation of indexing arrays. If the DLR is going to compile up the Ruby code into IL anyway then it should not be a huge performance problem to write most libraries in Ruby and then use IR .NET interop to access any underlying functionality that is not normally available in Ruby. **** This would also have the benefit of removing the excuse of non-C# developers from contributing to the IR libraries!! **** Pete -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Sanghyeon Seo > P.S. I notice your module is implemented in Python - I hadn't even contemplated the idea of implementing these libraries in Ruby - I guess because I'm a C# developer. Do people think we should rewrite these extension libraries in Ruby? Writing in Ruby does simplify some boilerplates code, doesn't it? -- Seo Sanghyeon From myles at madpilot.com.au Fri Feb 29 08:22:12 2008 From: myles at madpilot.com.au (Myles Eftos) Date: Fri, 29 Feb 2008 22:22:12 +0900 Subject: [Ironruby-core] digest.so implemented In-Reply-To: <001501c87ad5$44a6e470$cdf4ad50$@com> Message-ID: <20080229132314.8A08618586B0@rubyforge.org> Implementing as much as possible in Ruby sounds like a plan, because as you say it means us Rubyist can avoid C#. As you say, there shouldn't be any performance hit as it all gets compiled to IL. Obviously we need some base parts of the language complete first though :) ---------------------------------------------- Myles Eftos Mobile: +61-409-293-183 MadPilot Productions URL: http://www.madpilot.com.au Phone: +618-9467-7651 Fax: +618-9467-6289 Try our time tracking system: 88 Miles! http://www.88miles.net > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of > Peter Bacon Darwin > Sent: Friday, 29 February 2008 22:16 > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] digest.so implemented > > I thought that the general idea in Ruby circles was that all > their libraries should be written in Ruby unless there was > some important reason not to, such as performance or access > to underlying OS or hardware functionality that was not > available to Ruby code? > > The Rubinius guys took this one step further and have pretty > much implemented everything in Ruby (including the runtime > engine itself) and where they needed to access the OS > directly they have created hooks into the operating system > via "special" Rubinius operations that allow the ruby code to > do the stuff. > > Interestingly, they then run into the problem of people > monkey patching their runtime engine by accident, which is > what happened when you required the math library which > changed the way division works in integers and this broke > their implementation of indexing arrays. > > If the DLR is going to compile up the Ruby code into IL > anyway then it should not be a huge performance problem to > write most libraries in Ruby and then use IR .NET interop to > access any underlying functionality that is not normally > available in Ruby. > > **** This would also have the benefit of removing the excuse > of non-C# developers from contributing to the IR libraries!! **** > > Pete > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of > Sanghyeon Seo > > > P.S. I notice your module is implemented in Python - I hadn't even > contemplated the idea of implementing these libraries in Ruby > - I guess because I'm a C# developer. Do people think we > should rewrite these extension libraries in Ruby? > > Writing in Ruby does simplify some boilerplates code, doesn't it? > > -- > Seo Sanghyeon > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > From Shri.Borde at microsoft.com Fri Feb 29 14:00:45 2008 From: Shri.Borde at microsoft.com (Shri Borde) Date: Fri, 29 Feb 2008 11:00:45 -0800 Subject: [Ironruby-core] DLR - where is the community? In-Reply-To: <24e27e560802280521s21d4af7g10deae2c42eba57f@mail.gmail.com> References: <5b0248170802280504m6a80d019qfac94232df73043d@mail.gmail.com> <24e27e560802280521s21d4af7g10deae2c42eba57f@mail.gmail.com> Message-ID: <50B69702CA6E6D4E849D30CD4989AB8ED7F5EF1C48@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Yes, it is not an easy decision without knowing the what activity level to expect. If there are not enough people active on the mailing list, it reduces the value to the participants since their questions will not be answered quickly. So specialized mailing lists are necessarily the right answer. A separate codebase has significant disadvantages - if you want to find matching versions of IronRuby or IronPython to see how they use the DLR, you will have a hard time. Do start using the IronRuby or IronPython mailing lists for DLR questions. If the volume of DLR-specific questions goes up, that will make it easier to decide to create a separate mailing list. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Slavo Furman Sent: Thursday, February 28, 2008 5:21 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] DLR - where is the community? Hello! i was thinking about same ("where to ask DLR specific questions") few days ago while reading DLR articles on Tomas Restrepo's weblog (btw, thanks for good articles, Tomas... ) maybe it would be a good idea have separate DLR mailing list or forum (for DLR specific language agnostic questions). But i am afraid that this is a same sort of decision as if there should be separate codebase for DLR or not. I would prefer separate mailing lists and separate codebase, but I understand that it is not easy decision. thanks, Slavo. On Thu, Feb 28, 2008 at 2:04 PM, Sanghyeon Seo > wrote: 2008/2/28, Ales Sturala >: > Hi, > DLR is nice, but what is still missing is "community". I think there is > plenty of people trying DLR, but there is no good source for information > except some blogs. What I am really missing is some community forum, > where all the developers can look for solutions and discuss their > problems. Now it looks those people are spread over the Internet and > there is no place for discussion yet ... or maybe I am wrong and I just > didn't find it. Eh, *this* list is a such forum? And IronPython list. > Anyway if there is not such place, would be possible to make at least > category on MSDN forums for DLR? I much prefer mailing lists to forums. -- 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/20080229/398b63c0/attachment.html