From shay.friedman at gmail.com Mon Nov 2 10:06:31 2009 From: shay.friedman at gmail.com (Shay Friedman) Date: Mon, 2 Nov 2009 17:06:31 +0200 Subject: [Ironruby-core] How do you convince .Net developers to use IronRuby? Message-ID: Hi there, In the last month I had 3 sessions about IronRuby, all of them in front of .Net audience. I really believe in the IronRuby but I find it very very hard to pass that to existing .Net developers. I try to show the benefits of using IR - getting things done faster (like POCs, internal tools), using REPL, using IR abilities from C#, IR and Silverlight (like Gestalt), unit testing, RoR... Most of the .Net devs are very conservative and are not willing to get out of their familiar development environment even when they see the clear benefits of the new technology. They feel that using IronRuby will take everything they love from them - Visual Studio, Ctrl+F5, the sacred intellisense, etc. That's about what happens during a session: - No Visual Studio integration: 50% of the audience are willing to leave. - No compilation: more 25% have just lost interest. - Intensive command line work: more 15% are shutting down. That leaves about 10 perecent of the audience that just think of using IronRuby, most of them decide not to eventually. My question is - how do you suggest to present IronRuby to .Net developers? and to the team members - does Microsoft expect that existing .Net devs will start using IronRuby? Thanks! Shay. -- -------------------------------------------------- Shay Friedman Author of IronRuby Unleashed http://www.IronShay.com Follow me: http://twitter.com/ironshay -------------- next part -------------- An HTML attachment was scrubbed... URL: From Nathan_Stults at HSIHealth.com Mon Nov 2 10:46:56 2009 From: Nathan_Stults at HSIHealth.com (Nathan Stults) Date: Mon, 2 Nov 2009 07:46:56 -0800 Subject: [Ironruby-core] How do you convince .Net developers to use IronRuby? In-Reply-To: References: Message-ID: <790F1F63F5D2E44E91797E821B31FDBB02BC759E@hsi-fs.HSIHealth.local> I think Time will be the most important ingredient in getting people amped on IR. It's probably too early to expect incredible enthusiasm from users groups. IronRuby, lacking VS integration and with all the command line stuff, doesn't demo in the usual Microsoft fashion, so it might be hard to wow the rank and file. If you do want to get people excited in a demo, I'd demo in the context of C# 4.0, so you can demo inside visual studio, and let people see IronRuby shine from within a familiar environment. Also, ASP.NET MVC with IronRuby might resonate better than RoR at first, and you could also try demo'ing with something like RubyMine, that does have intellisense and refactorings. To get IronRuby to spread, I would focus on selling IronRuby proper to the vanguard (Alt).NET communities, their bloggers, thought leaders, etc. who have large followings among progressive developers. They should immediately be able to get over the lack of "tooling sugar" to see the value IronRuby has to offer. I'd start with the testing aspects, Cucumber, RSpec, etc. as well as Rake and its superior abilities in creating dev tools and build automations and things, then move on to scripting & automating existing .NET apps. I think RoR and other pure Ruby concepts are a bit out of range for most .NET folks just now, and anyway if they did want to start building those kinds of pure Ruby applications in IronRuby, they'd run into some brick walls and may drop out prematurely. From what I can tell IronRuby isn't quite ready for real, full scale Ruby development - a hefty portion of the things I try don't work on IronRuby yet, simply because the language isn't complete (String#unpack, File#flock, etc) and because the community hasn't caught up (DataMapper integrations, C# ports of native libraries, etc). Finally, you may want to ask the JRuby community how they did it. Of coure, Java devs by and large may be much more comfortable with command line work, but the situation is largely the same I would think. All in all, though, I think it is still very early to expect too much. Hopefully, as the early adopter types start to pick this thing up and get excited about it, they will spread the excitement - I think it is more likely to get into people's heads that way, rather than user group presentations. At the same time, MS will continue to improve their tooling, JetBrains may build their RubyMine product as a VS integration when IronRuby is more mature, and demos can get flashier. That will help some too. That's my guess anyway. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Shay Friedman Sent: Monday, November 02, 2009 7:07 AM To: ironruby-core Subject: [Ironruby-core] How do you convince .Net developers to use IronRuby? Hi there, In the last month I had 3 sessions about IronRuby, all of them in front of .Net audience. I really believe in the IronRuby but I find it very very hard to pass that to existing .Net developers. I try to show the benefits of using IR - getting things done faster (like POCs, internal tools), using REPL, using IR abilities from C#, IR and Silverlight (like Gestalt), unit testing, RoR... Most of the .Net devs are very conservative and are not willing to get out of their familiar development environment even when they see the clear benefits of the new technology. They feel that using IronRuby will take everything they love from them - Visual Studio, Ctrl+F5, the sacred intellisense, etc. That's about what happens during a session: - No Visual Studio integration: 50% of the audience are willing to leave. - No compilation: more 25% have just lost interest. - Intensive command line work: more 15% are shutting down. That leaves about 10 perecent of the audience that just think of using IronRuby, most of them decide not to eventually. My question is - how do you suggest to present IronRuby to .Net developers? and to the team members - does Microsoft expect that existing .Net devs will start using IronRuby? Thanks! Shay. -- -------------------------------------------------- Shay Friedman Author of IronRuby Unleashed http://www.IronShay.com Follow me: http://twitter.com/ironshay -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Mon Nov 2 11:16:32 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Mon, 2 Nov 2009 17:16:32 +0100 Subject: [Ironruby-core] How do you convince .Net developers to use IronRuby? In-Reply-To: References: Message-ID: AFAICT you don't, they'll have to convince themselves. I may have given this issue some thought before today :) One of the problems I have with most of the .NET shops these days is that they are very conservative. I'm having countless discussions on the benefits of unit testing, stored procs vs OR/M, ... then the developers have been misled into believing intellisense actually helps them while all they are missing is a tool that lets them find api docs fast (msdn isn't it although the new version is a lot faster), because intellisense gets more in the way than out of it. The same way they have been misled into believing static typing is the shiznit. It took me 6 months of daily scavenging the net for an IDE and eventually I just bought a mac so I could use textmate and be done with it. Before we can get ironruby to not be perceived as a "hippy" language there are a few things that need to happen: 1. .net 4.0 needs to be out (preferrably with a service release or 2) so they can use it from their C# visual studio project. 2. we need a textmate/rubymate like autocomplete in visual studio that will just tokenize the words in a document or open documents and puts some heuristics around which one you are most likely to use. 3. IronRuby needs to be labelled 1.0 (preferably with a SP1 stamp) 4. visual studio must not insert a BOM in the files it creates (this is solved by creating ruby file templates see ironrubymvc project). 5. We need an example application that when compared to the C# one has obvious benefits. It would be good to have some kind of build off, unfortunately the human factor makes that non deterministic and subjective. 6. IronRuby startup time needs to get a _lot_ faster, because antonio cangiani's benchmark might show different results but for me running a spec suite with ironruby and one with ruby 1.9 is a difference of 2 minutes vs 10 seconds, mostly because of startup time. but that totally kills the rapid feedback cycle you want. 7. blog, speak, write, convert them one at a time I say :) I see ironruby creeping in the enterprise via 4 ways: 1. using as a test framework for their apps (and even then perhaps only the fan boys at first) 2. a much better nant because nobody likes writing xml 3. for rules engines where the user can define the rules, or as plugins for existing applications 4. Quicker prototyping This is one of those things that isn't going to happen overnight, and the early hype around IronRuby didn't really help the situation. So that means we still have a lot of work todo. Writing, blogging, speaking about IronRuby is a necessity but also making sure the experience is optimal makes a big difference. If you want to be an agent for change you'll have to realize that that is a very frustrating position to be in because all you will face is resistance -being in the front line and all-, but if you take a step back then you'll see that usage of ironruby has grown quite a bit in recent months and as the implementation progresses it will increase more and faster ( a little bit like a snow ball). Also change doesn't happen on the spot. For example I will get frustrated and stop my contract but when I talk to that company one year later it turns out they are actually implementing what I had been fighting for the year before. I lack patience and tact to be really good at changing mindsets :). There is some ruby envy in the clr community though. I say ruby envy because they refuse to move out of C# but wish C# has all the things ruby has but with the wonderful C# syntax. To give an example of the mindset: The microsoft belgium people almost laughed at me when I told them I was going to write a real app in IronRuby when I applied for bizspark. I don't see command line as a problem because as the guys from sapphire steel have shown they can integrate that quite good , rubymine and netbeans show that too. I'm just faster with the command line and I feel like I'm in control (which in reality I'm not of course) I also agree with Nathan IronRuby isn't ready for prime-time mass-adoption yet. --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Mon, Nov 2, 2009 at 4:06 PM, Shay Friedman wrote: > Hi there, > > In the last month I had 3 sessions about IronRuby, all of them in front of > .Net audience. I really believe in the IronRuby but I find it very very hard > to pass that to existing .Net developers. > I try to show the benefits of using IR - getting things done faster (like > POCs, internal tools), using REPL, using IR abilities from C#, IR and > Silverlight (like Gestalt), unit testing, RoR... > Most of the .Net devs are very conservative and are not willing to get out > of their familiar development environment even when they see the clear > benefits of the new technology. > They feel that using IronRuby will take everything they love from them - > Visual Studio, Ctrl+F5, the sacred intellisense, etc. > > That's about what happens during a session: > - No Visual Studio integration: 50% of the audience are willing to leave. > - No compilation: more 25% have just lost interest. > - Intensive command line work: more 15% are shutting down. > > That leaves about 10 perecent of the audience that just think of using > IronRuby, most of them decide not to eventually. > > My question is - how do you suggest to present IronRuby to .Net developers? > > and to the team members - does Microsoft expect that existing .Net devs > will start using IronRuby? > > Thanks! > Shay. > > -- > -------------------------------------------------- > Shay Friedman > Author of IronRuby Unleashed > http://www.IronShay.com > Follow me: http://twitter.com/ironshay > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dipidi at gmail.com Mon Nov 2 11:28:14 2009 From: dipidi at gmail.com (Dotan N.) Date: Mon, 2 Nov 2009 18:28:14 +0200 Subject: [Ironruby-core] How do you convince .Net developers to use IronRuby? In-Reply-To: <790F1F63F5D2E44E91797E821B31FDBB02BC759E@hsi-fs.HSIHealth.local> References: <790F1F63F5D2E44E91797E821B31FDBB02BC759E@hsi-fs.HSIHealth.local> Message-ID: <6927b8740911020828m7a2f8177n80cc02c85f23375a@mail.gmail.com> 1. Quick construction/prototyping, 2. Slow maintenance no one building a real enterprise application with intricate licensing and SLAs will settle for (2). when i think about ironruby in a .net environment - i think web, and embedded scripting extensions / DSLs in a "real" .Net app. thats your audience. On Mon, Nov 2, 2009 at 5:46 PM, Nathan Stults wrote: > I think Time will be the most important ingredient in getting people > amped on IR. It?s probably too early to expect incredible enthusiasm from > users groups. IronRuby, lacking VS integration and with all the command line > stuff, doesn?t demo in the usual Microsoft fashion, so it might be hard to > wow the rank and file. If you do want to get people excited in a demo, I?d > demo in the context of C# 4.0, so you can demo inside visual studio, and let > people see IronRuby shine from within a familiar environment. Also, > ASP.NET MVC with IronRuby might resonate better than RoR at first, and you > could also try demo?ing with something like RubyMine, that does have > intellisense and refactorings. > > > > To get IronRuby to spread, I would focus on selling IronRuby proper to the > vanguard (Alt).NET communities, their bloggers, thought leaders, etc. who > have large followings among progressive developers. They should immediately > be able to get over the lack of ?tooling sugar? to see the value IronRuby > has to offer. I?d start with the testing aspects, Cucumber, RSpec, etc. as > well as Rake and its superior abilities in creating dev tools and build > automations and things, then move on to scripting & automating existing .NET > apps. I think RoR and other pure Ruby concepts are a bit out of range for > most .NET folks just now, and anyway if they did want to start building > those kinds of pure Ruby applications in IronRuby, they?d run into some > brick walls and may drop out prematurely. From what I can tell IronRuby > isn?t quite ready for real, full scale Ruby development ? a hefty portion of > the things I try don?t work on IronRuby yet, simply because the language > isn?t complete (String#unpack, File#flock, etc) and because the community > hasn?t caught up (DataMapper integrations, C# ports of native libraries, > etc). > > > > Finally, you may want to ask the JRuby community how they did it. Of coure, > Java devs by and large may be much more comfortable with command line work, > but the situation is largely the same I would think. > > > > All in all, though, I think it is still very early to expect too much. > Hopefully, as the early adopter types start to pick this thing up and get > excited about it, they will spread the excitement ? I think it is more > likely to get into people?s heads that way, rather than user group > presentations. At the same time, MS will continue to improve their tooling, > JetBrains may build their RubyMine product as a VS integration when IronRuby > is more mature, and demos can get flashier. That will help some too. That?s > my guess anyway. > > > > > > > > > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Shay Friedman > *Sent:* Monday, November 02, 2009 7:07 AM > *To:* ironruby-core > *Subject:* [Ironruby-core] How do you convince .Net developers to use > IronRuby? > > > > Hi there, > > In the last month I had 3 sessions about IronRuby, all of them in front of > .Net audience. I really believe in the IronRuby but I find it very very hard > to pass that to existing .Net developers. > I try to show the benefits of using IR - getting things done faster (like > POCs, internal tools), using REPL, using IR abilities from C#, IR and > Silverlight (like Gestalt), unit testing, RoR... > Most of the .Net devs are very conservative and are not willing to get out > of their familiar development environment even when they see the clear > benefits of the new technology. > They feel that using IronRuby will take everything they love from them - > Visual Studio, Ctrl+F5, the sacred intellisense, etc. > > That's about what happens during a session: > - No Visual Studio integration: 50% of the audience are willing to leave. > - No compilation: more 25% have just lost interest. > - Intensive command line work: more 15% are shutting down. > > That leaves about 10 perecent of the audience that just think of using > IronRuby, most of them decide not to eventually. > > My question is - how do you suggest to present IronRuby to .Net developers? > > and to the team members - does Microsoft expect that existing .Net devs > will start using IronRuby? > > Thanks! > Shay. > > -- > -------------------------------------------------- > Shay Friedman > Author of IronRuby Unleashed > http://www.IronShay.com > Follow me: http://twitter.com/ironshay > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Mon Nov 2 11:48:55 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Mon, 2 Nov 2009 17:48:55 +0100 Subject: [Ironruby-core] ironruby and sharepoint or dynamics Message-ID: Has anyone done anything with IronRuby and dynamics or sharepoint? --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdeville at microsoft.com Mon Nov 2 11:54:17 2009 From: jdeville at microsoft.com (Jim Deville) Date: Mon, 2 Nov 2009 16:54:17 +0000 Subject: [Ironruby-core] Code Review: update_version Message-ID: FYI!!! tfpt review "/shelveset:update_version;REDMOND\jdeville" Comment : IronRuby.wxs needs to be included in the update version script. -------------- next part -------------- A non-text attachment was scrubbed... Name: update_version.diff Type: application/octet-stream Size: 2811 bytes Desc: update_version.diff URL: From sanxiyn at gmail.com Mon Nov 2 12:30:45 2009 From: sanxiyn at gmail.com (Seo Sanghyeon) Date: Tue, 3 Nov 2009 02:30:45 +0900 Subject: [Ironruby-core] How do you convince .Net developers to use IronRuby? In-Reply-To: References: Message-ID: <5b0248170911020930x216b64b7q94c21e15553178f6@mail.gmail.com> 2009/11/3 Shay Friedman : > My question is - how do you suggest to present IronRuby to .Net developers? I'd wait a bit more before the implementation matures. In my opinion, IronRuby is doing pretty well, compared to IronPython in its pre-1.0 days with similar implementation maturity. You could even say IronRuby is doing *too* well, that is, generating unwarranted hypes. -- Seo Sanghyeon From kevin.radcliffe at gmail.com Mon Nov 2 13:11:15 2009 From: kevin.radcliffe at gmail.com (Kevin Radcliffe) Date: Mon, 2 Nov 2009 11:11:15 -0700 Subject: [Ironruby-core] How do you convince .Net developers to use IronRuby? In-Reply-To: <5b0248170911020930x216b64b7q94c21e15553178f6@mail.gmail.com> References: <5b0248170911020930x216b64b7q94c21e15553178f6@mail.gmail.com> Message-ID: <131af5e0911021011w54c60943u548792d80a9b339d@mail.gmail.com> I haven't been in the position to present on this, so please take my observations with a grain of salt. Personally, I'm a big fan of listening, and not so much on convincing. You say the biggest group of people that leave is: - No Visual Studio integration: 50% of the audience are willing to leave. If possible, try to note a few of the people leaving and attempt to catch up w/ them later (particularly good if you know them personally). Don't be confrontational, but try to genuinely dig into why they find out why they find Visual Studio integration to be such a big barrier. Personally, I initially perceived this to be a big barrier to adopting Ruby/IronRuby. It was only once I started using it and experiencing the development flow myself that I realized that this was mostly a non-issue. You might be able to work with someone "on-stage" to walk them through a very simple development flow to help ease the fear of working without the IDE. You might show right away that there is an MS Connect feature request to add VS support - though this might drive some people away too ;) In any case, I think talking to the people that are walking away and taking their concerns seriously (even though you may have gotten past those concerns yourself) will put you in a MUCH better position to sympathize with and understand those developers that are walking away. As a side-effect, you might be able to "convince" them to try IronRuby too ;) Best Regards, Kevin On Mon, Nov 2, 2009 at 10:30 AM, Seo Sanghyeon wrote: > 2009/11/3 Shay Friedman : >> My question is - how do you suggest to present IronRuby to .Net developers? > > I'd wait a bit more before the implementation matures. In my opinion, > IronRuby is doing pretty well, compared to IronPython in its pre-1.0 > days with similar implementation maturity. You could even say IronRuby > is doing *too* well, that is, generating unwarranted hypes. > > -- > Seo Sanghyeon > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > From orion.edwards at gmail.com Mon Nov 2 14:52:29 2009 From: orion.edwards at gmail.com (Orion Edwards) Date: Tue, 3 Nov 2009 08:52:29 +1300 Subject: [Ironruby-core] How do you convince .Net developers to use IronRuby? In-Reply-To: <131af5e0911021011w54c60943u548792d80a9b339d@mail.gmail.com> References: <5b0248170911020930x216b64b7q94c21e15553178f6@mail.gmail.com> <131af5e0911021011w54c60943u548792d80a9b339d@mail.gmail.com> Message-ID: <7c1b59c00911021152g424fed16q9530c37cab8e7c24@mail.gmail.com> Don't sell IronRuby, sell Ruby itself. It's not hard to find sample code (or just refactor some existing C# code) where the ruby version is quarter the size, and twice as readable than the C# version. If you can convince people of the benefits of ruby, and then go "and now here's the party trick, you can integrate IronRuby with all your existing C# code for no effort" then I've found that works. There are also a couple of areas where ruby really shines 1) Exploration. Irb is already pretty good at this, but a REALLY killer feature would be integrated IronRuby in visual studio's immediate window under the debugger. 2) Testing. Unfortunately this is harder to sell as if you're testing other .NET code you really need the visual studio integration :-( -------------- next part -------------- An HTML attachment was scrubbed... URL: From davidescobar1976 at gmail.com Mon Nov 2 15:12:53 2009 From: davidescobar1976 at gmail.com (David Escobar) Date: Mon, 2 Nov 2009 12:12:53 -0800 Subject: [Ironruby-core] IronRuby static compilation Message-ID: <38ef96bd0911021212q5c8c1d93qd071b58d3dceb652@mail.gmail.com> Hi everyone. I've looked for this, but haven't really found much information. Is there a way to statically compile an IronRuby program to an .exe or .dll? It can be done with IronPython, but I haven't been able to find any information on how to do it with IronRuby. Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tomas.Matousek at microsoft.com Mon Nov 2 15:48:44 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Mon, 2 Nov 2009 20:48:44 +0000 Subject: [Ironruby-core] IronRuby static compilation In-Reply-To: <38ef96bd0911021212q5c8c1d93qd071b58d3dceb652@mail.gmail.com> References: <38ef96bd0911021212q5c8c1d93qd071b58d3dceb652@mail.gmail.com> Message-ID: <4B342496A3EFEB48839E10BB4BF5964C0671B645@TK5EX14MBXC131.redmond.corp.microsoft.com> We don't support precompilation yet. We might implement it post v1.0. Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of David Escobar Sent: Monday, November 02, 2009 12:13 PM To: ironruby-core Subject: [Ironruby-core] IronRuby static compilation Hi everyone. I've looked for this, but haven't really found much information. Is there a way to statically compile an IronRuby program to an .exe or .dll? It can be done with IronPython, but I haven't been able to find any information on how to do it with IronRuby. Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From davidescobar1976 at gmail.com Mon Nov 2 17:47:45 2009 From: davidescobar1976 at gmail.com (David Escobar) Date: Mon, 2 Nov 2009 14:47:45 -0800 Subject: [Ironruby-core] IronRuby static compilation In-Reply-To: <4B342496A3EFEB48839E10BB4BF5964C0671B645@TK5EX14MBXC131.redmond.corp.microsoft.com> References: <38ef96bd0911021212q5c8c1d93qd071b58d3dceb652@mail.gmail.com> <4B342496A3EFEB48839E10BB4BF5964C0671B645@TK5EX14MBXC131.redmond.corp.microsoft.com> Message-ID: <38ef96bd0911021447lacbd5d9s2bc63018546a8c40@mail.gmail.com> That's very good news. Thanks. On Mon, Nov 2, 2009 at 12:48 PM, Tomas Matousek < Tomas.Matousek at microsoft.com> wrote: > We don?t support precompilation yet. We might implement it post v1.0. > > > > Tomas > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *David Escobar > *Sent:* Monday, November 02, 2009 12:13 PM > *To:* ironruby-core > *Subject:* [Ironruby-core] IronRuby static compilation > > > > Hi everyone. I've looked for this, but haven't really found much > information. Is there a way to statically compile an IronRuby program to an > .exe or .dll? It can be done with IronPython, but I haven't been able to > find any information on how to do it with 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: From Jimmy.Schementi at microsoft.com Mon Nov 2 19:20:32 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Tue, 3 Nov 2009 00:20:32 +0000 Subject: [Ironruby-core] [ANN] IronRuby 0.9.2 Released Message-ID: <1B42307CD4AADD438CDDA2FE1121CC920299D2@TK5EX14MBXC134.redmond.corp.microsoft.com> The IronRuby team is pleased to announce version 0.9.2! http://ironruby.net/download Direct download link: http://ironruby.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=33693#DownloadId=90621 As IronRuby approaches 1.0, these 0.9.x releases contain important bug fixes and enhancements that IronRuby users request; this release fixes/closes 44 bugs. For more information see: http://rubyforge.org/frs/shownotes.php?release_id=41087. This release is the first to give IronRuby a MSI-based installer for Windows. Try it out and let us know if it does not install on your system. As always, if you encounter any issues with IronRuby please report it here: http://ironruby.codeplex.com/WorkItem/Create.aspx. From thibaut.barrere at gmail.com Tue Nov 3 06:27:05 2009 From: thibaut.barrere at gmail.com (=?ISO-8859-1?Q?Thibaut_Barr=E8re?=) Date: Tue, 3 Nov 2009 12:27:05 +0100 Subject: [Ironruby-core] How do you convince .Net developers to use IronRuby? In-Reply-To: <7c1b59c00911021152g424fed16q9530c37cab8e7c24@mail.gmail.com> References: <5b0248170911020930x216b64b7q94c21e15553178f6@mail.gmail.com> <131af5e0911021011w54c60943u548792d80a9b339d@mail.gmail.com> <7c1b59c00911021152g424fed16q9530c37cab8e7c24@mail.gmail.com> Message-ID: <4a68b8cf0911030327m39915b0ewc6461f0a99e6da9a@mail.gmail.com> Very quick thoughts: - dynamic (ruby/python) is quite frightening for most .Net developers I know (they tend to have a mostly static background, C C++ Java .Net) - I tend to focus my energy on building useful stuff with X vs. advocating the use of X (valid point for .Net in 2001, Rails in 2005, Pascal in 1993, etc...). Even after seeing mind-changing implementations, most of the developers won't switch unless the change is enforced, somehow! - I agree with Kevin: listening then explaining is usually far more efficient as compared to convincing, which generates a strong force back. - I agree that despite the huge work behind it and the reliability of IR, we're very early in its life. Most people I know will expect a 1.0 timestamp before even trying to download the package. - I would try hard *not* to make hype at all around IronRuby. I know it's hard for book writers, early adopters etc, but honestly it tend to put too much expectations, and it's very quick to backfire with this. Just providing informational stuff, kind and useful, not "we're better than x" kind of stuff, works best in my opinion. Well this doesn't give you a solution, but hopefully a few more points to think about :) Thibaut -- http://www.learnivore.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Tue Nov 3 07:15:12 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Tue, 3 Nov 2009 13:15:12 +0100 Subject: [Ironruby-core] ironruby twitter list Message-ID: Hi I created a twitter list for ironruby you can follow it @ http://twitter.com/casualjim/ironruby-community It might be a good idea to create such a list under the twitter @ironruby account, who's managing that? I've added a bunch of people from the people I'm following but if you're not on the list it's just because I forgot or am not following you. --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero GSM: +32.486.787.582 Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) -------------- next part -------------- An HTML attachment was scrubbed... URL: From shay.friedman at gmail.com Tue Nov 3 09:52:34 2009 From: shay.friedman at gmail.com (Shay Friedman) Date: Tue, 3 Nov 2009 16:52:34 +0200 Subject: [Ironruby-core] How do you convince .Net developers to use IronRuby? In-Reply-To: <4a68b8cf0911030327m39915b0ewc6461f0a99e6da9a@mail.gmail.com> References: <5b0248170911020930x216b64b7q94c21e15553178f6@mail.gmail.com> <131af5e0911021011w54c60943u548792d80a9b339d@mail.gmail.com> <7c1b59c00911021152g424fed16q9530c37cab8e7c24@mail.gmail.com> <4a68b8cf0911030327m39915b0ewc6461f0a99e6da9a@mail.gmail.com> Message-ID: Thanks all for your replys. I might have been a bit harsh with the word I chose... When I talk with .Net devs and present IronRuby to them, I don't really want to "convince" them it's the best language (it can't be, it's an entirely subjective opinion), I just try to add IronRuby to their list of "to be interested in" stuff, a task which, as I wrote, I'm not successful with too much. Regarding people leaving - they don't really leave. Their attention does :) Trying to speak with most of them might be frustrating as well since most of them doesn't have something against IronRuby specifically, it's about a new language in general. For example, one said to me "why does Microsoft release so much languages - D, F#, IronPython, IronRuby? all I need is C#"... Anyway, from your answers I understand that I should not expect much of an interest now. We are the front runners now BUT the rest WILL follow! :) I'm a big believer in presentations and telling people about technologies - new or old. In my opinion, it is more effective than written articles (it is, of course, not a substitute to the written word). I try to talk wherever I can and my target is to push IronRuby to the audience consciousness so when they need something IronRuby might really help them in, it will jump to their mind. I plan to continue with that (someone want to have me? :-) ) even though it is a bit frustrating currently. In conclusion, next time I'm doing an IronRuby presentation, I'd try to do as follows: 1. Show them demos in their "natural" environment - Visual Studio: - .Net 4.0 - Running IronRuby from C# - Maybe configure VS to execute ir.exe and write the demo code inside VS (as a regular txt file) - to eliminate command line :) 2. Show them Ruby test frameworks and test custom .Net code. My suggestion: Cucumber. 3. Suggestion: show them how to install IronRuby from downloading until running a Hello World sample. 4. DSLs - show them one heck of a DSL (a practical one). 5. Show how to use IronRuby for adding REPL abilities to a .Net application or as an easy way to provide extension abilities to a .Net application. IronRuby will prevail!!! :) Shay. -- -------------------------------------------------- Shay Friedman Author of IronRuby Unleashed http://www.IronShay.com Follow me: http://twitter.com/ironshay On Tue, Nov 3, 2009 at 1:27 PM, Thibaut Barr?re wrote: > Very quick thoughts: > - dynamic (ruby/python) is quite frightening for most .Net developers I > know (they tend to have a mostly static background, C C++ Java .Net) > - I tend to focus my energy on building useful stuff with X vs. advocating > the use of X (valid point for .Net in 2001, Rails in 2005, Pascal in 1993, > etc...). Even after seeing mind-changing implementations, most of the > developers won't switch unless the change is enforced, somehow! > - I agree with Kevin: listening then explaining is usually far more > efficient as compared to convincing, which generates a strong force back. > - I agree that despite the huge work behind it and the reliability of IR, > we're very early in its life. Most people I know will expect a 1.0 timestamp > before even trying to download the package. > - I would try hard *not* to make hype at all around IronRuby. I know it's > hard for book writers, early adopters etc, but honestly it tend to put too > much expectations, and it's very quick to backfire with this. Just providing > informational stuff, kind and useful, not "we're better than x" kind of > stuff, works best in my opinion. > > Well this doesn't give you a solution, but hopefully a few more points to > think about :) > > Thibaut > -- > http://www.learnivore.com > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dipidi at gmail.com Tue Nov 3 10:17:22 2009 From: dipidi at gmail.com (Dotan N.) Date: Tue, 3 Nov 2009 17:17:22 +0200 Subject: [Ironruby-core] How do you convince .Net developers to use IronRuby? In-Reply-To: References: <5b0248170911020930x216b64b7q94c21e15553178f6@mail.gmail.com> <131af5e0911021011w54c60943u548792d80a9b339d@mail.gmail.com> <7c1b59c00911021152g424fed16q9530c37cab8e7c24@mail.gmail.com> <4a68b8cf0911030327m39915b0ewc6461f0a99e6da9a@mail.gmail.com> Message-ID: <6927b8740911030717y4b7f7ea3mf2e3166454096444@mail.gmail.com> Shay, Based on your target audience I would do this agenda: 1. show a very intuitive DSL, go into source and expose ruby meta features, mixins, "reflection" 2. show how you twist a ruby object from ir 3. Embedded ruby as an ability to add scripting to your app 4. rapid prototyping if time allows (adding stuff to living instances and watching it change) PS (if you do this publicly in .il, i'd like to attend) On Tue, Nov 3, 2009 at 4:52 PM, Shay Friedman wrote: > Thanks all for your replys. I might have been a bit harsh with the word I > chose... When I talk with .Net devs and present IronRuby to them, I don't > really want to "convince" them it's the best language (it can't be, it's an > entirely subjective opinion), I just try to add IronRuby to their list of > "to be interested in" stuff, a task which, as I wrote, I'm not successful > with too much. > > Regarding people leaving - they don't really leave. Their attention does :) > Trying to speak with most of them might be frustrating as well since most of > them doesn't have something against IronRuby specifically, it's about a new > language in general. For example, one said to me "why does Microsoft release > so much languages - D, F#, IronPython, IronRuby? all I need is C#"... > > Anyway, from your answers I understand that I should not expect much of an > interest now. We are the front runners now BUT the rest WILL follow! :) > > I'm a big believer in presentations and telling people about technologies - > new or old. In my opinion, it is more effective than written articles (it > is, of course, not a substitute to the written word). > I try to talk wherever I can and my target is to push IronRuby to the > audience consciousness so when they need something IronRuby might really > help them in, it will jump to their mind. I plan to continue with that > (someone want to have me? :-) ) even though it is a bit frustrating > currently. > > In conclusion, next time I'm doing an IronRuby presentation, I'd try to do > as follows: > 1. Show them demos in their "natural" environment - Visual Studio: > - .Net 4.0 > - Running IronRuby from C# > - Maybe configure VS to execute ir.exe and write the demo code inside VS > (as a regular txt file) - to eliminate command line :) > 2. Show them Ruby test frameworks and test custom .Net code. My suggestion: > Cucumber. > 3. Suggestion: show them how to install IronRuby from downloading until > running a Hello World sample. > 4. DSLs - show them one heck of a DSL (a practical one). > 5. Show how to use IronRuby for adding REPL abilities to a .Net application > or as an easy way to provide extension abilities to a .Net application. > > IronRuby will prevail!!! > :) > > > Shay. > > -- > -------------------------------------------------- > Shay Friedman > Author of IronRuby Unleashed > http://www.IronShay.com > Follow me: http://twitter.com/ironshay > > On Tue, Nov 3, 2009 at 1:27 PM, Thibaut Barr?re > wrote: > >> Very quick thoughts: >> - dynamic (ruby/python) is quite frightening for most .Net developers I >> know (they tend to have a mostly static background, C C++ Java .Net) >> - I tend to focus my energy on building useful stuff with X vs. advocating >> the use of X (valid point for .Net in 2001, Rails in 2005, Pascal in 1993, >> etc...). Even after seeing mind-changing implementations, most of the >> developers won't switch unless the change is enforced, somehow! >> - I agree with Kevin: listening then explaining is usually far more >> efficient as compared to convincing, which generates a strong force back. >> - I agree that despite the huge work behind it and the reliability of IR, >> we're very early in its life. Most people I know will expect a 1.0 timestamp >> before even trying to download the package. >> - I would try hard *not* to make hype at all around IronRuby. I know it's >> hard for book writers, early adopters etc, but honestly it tend to put too >> much expectations, and it's very quick to backfire with this. Just providing >> informational stuff, kind and useful, not "we're better than x" kind of >> stuff, works best in my opinion. >> >> Well this doesn't give you a solution, but hopefully a few more points to >> think about :) >> >> Thibaut >> -- >> http://www.learnivore.com >> >> >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core >> >> > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dsisnero at gmail.com Tue Nov 3 10:22:53 2009 From: dsisnero at gmail.com (Dominic Sisneros) Date: Tue, 3 Nov 2009 08:22:53 -0700 Subject: [Ironruby-core] [ANN] IronRuby 0.9.2 Released In-Reply-To: <1B42307CD4AADD438CDDA2FE1121CC920299D2@TK5EX14MBXC134.redmond.corp.microsoft.com> References: <1B42307CD4AADD438CDDA2FE1121CC920299D2@TK5EX14MBXC134.redmond.corp.microsoft.com> Message-ID: Thanks for this release. One problem with the MSI install is that it is requiring admin rights to install. This is not an option for me. thanks for all the hard work Dominic On Mon, Nov 2, 2009 at 5:20 PM, Jimmy Schementi < Jimmy.Schementi at microsoft.com> wrote: > The IronRuby team is pleased to announce version 0.9.2! > > http://ironruby.net/download > Direct download link: > > http://ironruby.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=33693#DownloadId=90621 > > As IronRuby approaches 1.0, these 0.9.x releases contain important bug > fixes > and enhancements that IronRuby users request; this release fixes/closes > 44 bugs. For more information see: > http://rubyforge.org/frs/shownotes.php?release_id=41087. > > This release is the first to give IronRuby a MSI-based installer for > Windows. > Try it out and let us know if it does not install on your system. > > As always, if you encounter any issues with IronRuby please report it here: > http://ironruby.codeplex.com/WorkItem/Create.aspx. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ruby-forum.com Tue Nov 3 10:23:59 2009 From: lists at ruby-forum.com (Huw Collingbourne) Date: Tue, 3 Nov 2009 16:23:59 +0100 Subject: [Ironruby-core] How do you convince .Net developers to use IronRuby? In-Reply-To: References: <5b0248170911020930x216b64b7q94c21e15553178f6@mail.gmail.com> <131af5e0911021011w54c60943u548792d80a9b339d@mail.gmail.com> <7c1b59c00911021152g424fed16q9530c37cab8e7c24@mail.gmail.com> <4a68b8cf0911030327m39915b0ewc6461f0a99e6da9a@mail.gmail.com> Message-ID: <83163c6a4a295b874feefb89a3f590ed@ruby-forum.com> Re. Visual Studio integration. My company (SapphireSteel Software) released an alpha Visual Studio IDE for IronRuby about 18 months ago (Feb 2008): http://www.sapphiresteel.com/Ruby-In-Steel-For-IronRuby At that time, we offered to work with the IronRuby team to develop a more powerful IDE but we received very little interest. As a result we transferred our efforts into a developing additional tools for our standard Ruby IDE and also creating a new Flex/ActionScript IDE for Visual Studio. best wishes Huw Collingbourne http://www.sapphiresteel.com -- Posted via http://www.ruby-forum.com/. From Jimmy.Schementi at microsoft.com Tue Nov 3 12:49:27 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Tue, 3 Nov 2009 17:49:27 +0000 Subject: [Ironruby-core] ironruby twitter list In-Reply-To: References: Message-ID: <1B42307CD4AADD438CDDA2FE1121CC9202ACDD@TK5EX14MBXC134.redmond.corp.microsoft.com> Actually I know the person who has the @ironruby account, and they are willing to donate it to the IronRuby team, so now it a fine time to get that account. ________________________________ From: ironruby-core-bounces at rubyforge.org [ironruby-core-bounces at rubyforge.org] on behalf of Ivan Porto Carrero [ivan at flanders.co.nz] Sent: Tuesday, November 03, 2009 4:15 AM To: ironruby-core Subject: [Ironruby-core] ironruby twitter list Hi I created a twitter list for ironruby you can follow it @ http://twitter.com/casualjim/ironruby-community It might be a good idea to create such a list under the twitter @ironruby account, who's managing that? I've added a bunch of people from the people I'm following but if you're not on the list it's just because I forgot or am not following you. --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero GSM: +32.486.787.582 Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jimmy.Schementi at microsoft.com Tue Nov 3 12:52:42 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Tue, 3 Nov 2009 17:52:42 +0000 Subject: [Ironruby-core] [ANN] IronRuby 0.9.2 Released In-Reply-To: References: <1B42307CD4AADD438CDDA2FE1121CC920299D2@TK5EX14MBXC134.redmond.corp.microsoft.com>, Message-ID: <1B42307CD4AADD438CDDA2FE1121CC9202B417@TK5EX14MBXC134.redmond.corp.microsoft.com> Jim, could we do a non-admin installer that puts the files in the user directory? ________________________________ From: ironruby-core-bounces at rubyforge.org [ironruby-core-bounces at rubyforge.org] on behalf of Dominic Sisneros [dsisnero at gmail.com] Sent: Tuesday, November 03, 2009 7:22 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] [ANN] IronRuby 0.9.2 Released Thanks for this release. One problem with the MSI install is that it is requiring admin rights to install. This is not an option for me. thanks for all the hard work Dominic On Mon, Nov 2, 2009 at 5:20 PM, Jimmy Schementi > wrote: The IronRuby team is pleased to announce version 0.9.2! http://ironruby.net/download Direct download link: http://ironruby.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=33693#DownloadId=90621 As IronRuby approaches 1.0, these 0.9.x releases contain important bug fixes and enhancements that IronRuby users request; this release fixes/closes 44 bugs. For more information see: http://rubyforge.org/frs/shownotes.php?release_id=41087. This release is the first to give IronRuby a MSI-based installer for Windows. Try it out and let us know if it does not install on your system. As always, if you encounter any issues with IronRuby please report it here: http://ironruby.codeplex.com/WorkItem/Create.aspx. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdeville at microsoft.com Tue Nov 3 13:11:36 2009 From: jdeville at microsoft.com (Jim Deville) Date: Tue, 3 Nov 2009 18:11:36 +0000 Subject: [Ironruby-core] [ANN] IronRuby 0.9.2 Released In-Reply-To: <1B42307CD4AADD438CDDA2FE1121CC9202B417@TK5EX14MBXC134.redmond.corp.microsoft.com> References: <1B42307CD4AADD438CDDA2FE1121CC920299D2@TK5EX14MBXC134.redmond.corp.microsoft.com>, <1B42307CD4AADD438CDDA2FE1121CC9202B417@TK5EX14MBXC134.redmond.corp.microsoft.com> Message-ID: I'll investigate. Tracking here: http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=2969 JD From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jimmy Schementi Sent: Tuesday, November 03, 2009 9:53 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] [ANN] IronRuby 0.9.2 Released Jim, could we do a non-admin installer that puts the files in the user directory? ________________________________ From: ironruby-core-bounces at rubyforge.org [ironruby-core-bounces at rubyforge.org] on behalf of Dominic Sisneros [dsisnero at gmail.com] Sent: Tuesday, November 03, 2009 7:22 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] [ANN] IronRuby 0.9.2 Released Thanks for this release. One problem with the MSI install is that it is requiring admin rights to install. This is not an option for me. thanks for all the hard work Dominic On Mon, Nov 2, 2009 at 5:20 PM, Jimmy Schementi > wrote: The IronRuby team is pleased to announce version 0.9.2! http://ironruby.net/download Direct download link: http://ironruby.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=33693#DownloadId=90621 As IronRuby approaches 1.0, these 0.9.x releases contain important bug fixes and enhancements that IronRuby users request; this release fixes/closes 44 bugs. For more information see: http://rubyforge.org/frs/shownotes.php?release_id=41087. This release is the first to give IronRuby a MSI-based installer for Windows. Try it out and let us know if it does not install on your system. As always, if you encounter any issues with IronRuby please report it here: http://ironruby.codeplex.com/WorkItem/Create.aspx. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: From Shri.Borde at microsoft.com Tue Nov 3 16:37:17 2009 From: Shri.Borde at microsoft.com (Shri Borde) Date: Tue, 3 Nov 2009 21:37:17 +0000 Subject: [Ironruby-core] Review: Fixes for double formatting on non-English culture Message-ID: <8E45365BECA665489F3CB8878A6C1B7D0C7B42E9@TK5EX14MBXC140.redmond.corp.microsoft.com> tfpt review /shelveset:cul;sborde Comment : Ivan's build machine uses a Dutch-Belgium culture, where comma is used for the decimal point instead of a period. Need to use CultureInfo.Invariant to parse a float/double out of a string. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: cul.diff Type: application/octet-stream Size: 6262 bytes Desc: cul.diff URL: From Tomas.Matousek at microsoft.com Tue Nov 3 17:27:31 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 3 Nov 2009 22:27:31 +0000 Subject: [Ironruby-core] Review: Fixes for double formatting on non-English culture In-Reply-To: <8E45365BECA665489F3CB8878A6C1B7D0C7B42E9@TK5EX14MBXC140.redmond.corp.microsoft.com> References: <8E45365BECA665489F3CB8878A6C1B7D0C7B42E9@TK5EX14MBXC140.redmond.corp.microsoft.com> Message-ID: <4B342496A3EFEB48839E10BB4BF5964C171D3A54@TK5EX14MBXC129.redmond.corp.microsoft.com> Looks good. Tomas From: Shri Borde Sent: Tuesday, November 03, 2009 1:37 PM To: IronRuby External Code Reviewers; ironruby-core at rubyforge.org Subject: Review: Fixes for double formatting on non-English culture tfpt review /shelveset:cul;sborde Comment : Ivan's build machine uses a Dutch-Belgium culture, where comma is used for the decimal point instead of a period. Need to use CultureInfo.Invariant to parse a float/double out of a string. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ryan.riley at panesofglass.org Tue Nov 3 17:51:31 2009 From: ryan.riley at panesofglass.org (Ryan Riley) Date: Tue, 3 Nov 2009 16:51:31 -0600 Subject: [Ironruby-core] How do you convince .Net developers to use IronRuby? In-Reply-To: <83163c6a4a295b874feefb89a3f590ed@ruby-forum.com> References: <5b0248170911020930x216b64b7q94c21e15553178f6@mail.gmail.com> <131af5e0911021011w54c60943u548792d80a9b339d@mail.gmail.com> <7c1b59c00911021152g424fed16q9530c37cab8e7c24@mail.gmail.com> <4a68b8cf0911030327m39915b0ewc6461f0a99e6da9a@mail.gmail.com> <83163c6a4a295b874feefb89a3f590ed@ruby-forum.com> Message-ID: On Tue, Nov 3, 2009 at 9:23 AM, Huw Collingbourne wrote: > Re. Visual Studio integration. My company (SapphireSteel Software) > released an alpha Visual Studio IDE for IronRuby about 18 months ago > (Feb 2008): http://www.sapphiresteel.com/Ruby-In-Steel-For-IronRuby > > At that time, we offered to work with the IronRuby team to develop a > more powerful IDE but we received very little interest. As a result we > transferred our efforts into a developing additional tools for our > standard Ruby IDE and also creating a new Flex/ActionScript IDE for > Visual Studio. Any chance that might pick back up? I remember you mentioned that you weren't planning to keep it up with each release of IronRuby as it developed, and I imagine that was a primary reason for the lack of interest. Now that IR is closing in on 1.0, I would bet you would find more interest. Regards, Ryan Riley Email: ryan.riley at panesofglass.org LinkedIn: http://www.linkedin.com/in/ryanriley Blog: http://wizardsofsmart.net/ Website: http://panesofglass.org/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark.ryall at gmail.com Tue Nov 3 23:19:44 2009 From: mark.ryall at gmail.com (Mark Ryall) Date: Wed, 4 Nov 2009 15:19:44 +1100 Subject: [Ironruby-core] [ANN] IronRuby 0.9.2 Released In-Reply-To: References: <1B42307CD4AADD438CDDA2FE1121CC920299D2@TK5EX14MBXC134.redmond.corp.microsoft.com> <1B42307CD4AADD438CDDA2FE1121CC9202B417@TK5EX14MBXC134.redmond.corp.microsoft.com> Message-ID: <43769a4a0911032019n57186f79ka8b787666711ade3@mail.gmail.com> igem fails to install gems to the default install location (c:\Program Files\IronRuby 0.9.2) presumably because of the spaces. I can't recall the exact error message but something about "invalid characters in the path". It seems fine if you install ironruby to a path that doesn't contain spaces. Not sure whether this is a bug with rubygems or ironruby? Something should be escaping the space characters or wrapping in quotes. On Wed, Nov 4, 2009 at 5:11 AM, Jim Deville wrote: > I?ll investigate. > > > > Tracking here: > http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=2969 > > > > JD > > > > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jimmy Schementi > Sent: Tuesday, November 03, 2009 9:53 AM > > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] [ANN] IronRuby 0.9.2 Released > > > > Jim, could we do a non-admin installer that puts the files in the user > directory? > > ________________________________ > > From: ironruby-core-bounces at rubyforge.org > [ironruby-core-bounces at rubyforge.org] on behalf of Dominic Sisneros > [dsisnero at gmail.com] > Sent: Tuesday, November 03, 2009 7:22 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] [ANN] IronRuby 0.9.2 Released > > Thanks for this release.? One problem with the MSI install is that it is > requiring admin rights to install.? This is not an option for me. > > thanks for all the hard work > > Dominic > > On Mon, Nov 2, 2009 at 5:20 PM, Jimmy Schementi > wrote: > > The IronRuby team is pleased to announce version 0.9.2! > > http://ironruby.net/download > Direct download link: > http://ironruby.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=33693#DownloadId=90621 > > As IronRuby approaches 1.0, these 0.9.x releases contain important bug fixes > and enhancements that IronRuby users request; this release fixes/closes > 44 bugs. For more information see: > http://rubyforge.org/frs/shownotes.php?release_id=41087. > > This release is the first to give IronRuby a MSI-based installer for > Windows. > Try it out and let us know if it does not install on your system. > > As always, if you encounter any issues with IronRuby please report it here: > http://ironruby.codeplex.com/WorkItem/Create.aspx. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > From jdeville at microsoft.com Tue Nov 3 23:37:31 2009 From: jdeville at microsoft.com (Jim Deville) Date: Wed, 4 Nov 2009 04:37:31 +0000 Subject: [Ironruby-core] [ANN] IronRuby 0.9.2 Released Message-ID: Please file a bug with us and i'll investigate to see if MRI acts identically. -----Original Message----- From: Mark Ryall Sent: Tuesday, November 03, 2009 8:26 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] [ANN] IronRuby 0.9.2 Released igem fails to install gems to the default install location (c:\Program Files\IronRuby 0.9.2) presumably because of the spaces. I can't recall the exact error message but something about "invalid characters in the path". It seems fine if you install ironruby to a path that doesn't contain spaces. Not sure whether this is a bug with rubygems or ironruby? Something should be escaping the space characters or wrapping in quotes. On Wed, Nov 4, 2009 at 5:11 AM, Jim Deville wrote: > I?ll investigate. > > > > Tracking here: > http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=2969 > > > > JD > > > > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jimmy Schementi > Sent: Tuesday, November 03, 2009 9:53 AM > > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] [ANN] IronRuby 0.9.2 Released > > > > Jim, could we do a non-admin installer that puts the files in the user > directory? > > ________________________________ > > From: ironruby-core-bounces at rubyforge.org > [ironruby-core-bounces at rubyforge.org] on behalf of Dominic Sisneros > [dsisnero at gmail.com] > Sent: Tuesday, November 03, 2009 7:22 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] [ANN] IronRuby 0.9.2 Released > > Thanks for this release. One problem with the MSI install is that it is > requiring admin rights to install. This is not an option for me. > > thanks for all the hard work > > Dominic > > On Mon, Nov 2, 2009 at 5:20 PM, Jimmy Schementi > wrote: > > The IronRuby team is pleased to announce version 0.9.2! > > http://ironruby.net/download > Direct download link: > http://ironruby.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=33693#DownloadId=90621 > > As IronRuby approaches 1.0, these 0.9.x releases contain important bug fixes > and enhancements that IronRuby users request; this release fixes/closes > 44 bugs. For more information see: > http://rubyforge.org/frs/shownotes.php?release_id=41087. > > This release is the first to give IronRuby a MSI-based installer for > Windows. > Try it out and let us know if it does not install on your system. > > As always, if you encounter any issues with IronRuby please report it here: > http://ironruby.codeplex.com/WorkItem/Create.aspx. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From davidescobar1976 at gmail.com Wed Nov 4 03:32:37 2009 From: davidescobar1976 at gmail.com (David Escobar) Date: Wed, 4 Nov 2009 00:32:37 -0800 Subject: [Ironruby-core] How do you convince .Net developers to use IronRuby? In-Reply-To: References: <5b0248170911020930x216b64b7q94c21e15553178f6@mail.gmail.com> <131af5e0911021011w54c60943u548792d80a9b339d@mail.gmail.com> <7c1b59c00911021152g424fed16q9530c37cab8e7c24@mail.gmail.com> <4a68b8cf0911030327m39915b0ewc6461f0a99e6da9a@mail.gmail.com> <83163c6a4a295b874feefb89a3f590ed@ruby-forum.com> Message-ID: <38ef96bd0911040032w632e82fbvf349895197c641b3@mail.gmail.com> In my opinion, I think two things are necessary for IronRuby to gain more momentum: 1. Allow static compilation of assemblies (.dll's, .exe's, etc.) and allow applications to be distributed in the standard Windows way. Good or bad, Windows users expect precompiled binaries that can be run and installed. This has been one of the biggest problems with standard CRuby - spotty support for distribution on the Windows platform. Certainly there have been attempts made at building .exe package makers, but they do not get enough maintenance and every new version of Ruby tends to break them. It's extremely cumbersome to have to install Ruby, wxRuby, and a myriad of other libraries on every user's machine (and make sure all the versions play well with each other!). Much easier to have one standard way of doing it. Also, from what I understand, RubyGems has problems on Windows. 2. Full Visual Studio integration is necessary. I realize that intellisense probably won't work as well with dynamic languages, but even some basic support would be a good thing. On top of that, you have other, even more important tools like the Windows Forms/WPF designers, debugging tools, database and web tools, etc. After developing GUI applications with designers, it's understandable that developers are not going to be interested in going back to doing this through code alone (or through a command line). Any productivity gains made by using Ruby will be offset by the loss in productivity from the lack of tools. I think Ruby is one of the most elegant and productive languages available today, but the lack of tools is what's preventing more widespread adoption, especially at the corporate/production environment level. All other things being equal (Visual Studio integration), I think that IronRuby will win over C# and VB in most cases and adoption will increase significantly. So here's to hoping that the excellent progress already made will continue! Just my humble opinion - thanks. David On Tue, Nov 3, 2009 at 2:51 PM, Ryan Riley wrote: > On Tue, Nov 3, 2009 at 9:23 AM, Huw Collingbourne wrote: > >> Re. Visual Studio integration. My company (SapphireSteel Software) >> released an alpha Visual Studio IDE for IronRuby about 18 months ago >> (Feb 2008): http://www.sapphiresteel.com/Ruby-In-Steel-For-IronRuby >> >> At that time, we offered to work with the IronRuby team to develop a >> more powerful IDE but we received very little interest. As a result we >> transferred our efforts into a developing additional tools for our >> standard Ruby IDE and also creating a new Flex/ActionScript IDE for >> Visual Studio. > > > Any chance that might pick back up? I remember you mentioned that you > weren't planning to keep it up with each release of IronRuby as it > developed, and I imagine that was a primary reason for the lack of interest. > Now that IR is closing in on 1.0, I would bet you would find more interest. > > Regards, > > > Ryan Riley > > Email: ryan.riley at panesofglass.org > LinkedIn: http://www.linkedin.com/in/ryanriley > Blog: http://wizardsofsmart.net/ > Website: http://panesofglass.org/ > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ruby-forum.com Wed Nov 4 05:48:33 2009 From: lists at ruby-forum.com (Huw Collingbourne) Date: Wed, 4 Nov 2009 11:48:33 +0100 Subject: [Ironruby-core] How do you convince .Net developers to use IronRuby? In-Reply-To: References: <5b0248170911020930x216b64b7q94c21e15553178f6@mail.gmail.com> <131af5e0911021011w54c60943u548792d80a9b339d@mail.gmail.com> <7c1b59c00911021152g424fed16q9530c37cab8e7c24@mail.gmail.com> <4a68b8cf0911030327m39915b0ewc6461f0a99e6da9a@mail.gmail.com> <83163c6a4a295b874feefb89a3f590ed@ruby-forum.com> Message-ID: Ryan Riley wrote: > > Any chance that might pick back up? I remember you mentioned that you > weren't planning to keep it up with each release of IronRuby as it > developed, and I imagine that was a primary reason for the lack of > interest. Hello Ryan. We are going to wait to see how much interest there will be from our customers. To date, I have to say, there hasn't been much. To be perfectly honest, neither have we had much interest from the people here who are already using IronRuby. Bear in mind that we released the alpha IDE in Feb '08, so there has been plenty of time for people to let us know whether or not Visual Studio integration of IronRuby is important to them. To date, very little feedback has been received. Obviously we can't commit a significant amount of our development time to a project that is generating so little interest. As I mentioned before, we have since moved onto the development of a Visual Studio IDE for Adobe Flex - that project has generated a great deal of interest and so we would need to be very convinced indeed that transferring development time back to IronRuby would be a sensible use of our resources. I plan to ask our existing users for feedback on IronRuby shortly (I'll post some questions in our forum and blog). The response we get may help us to decide on our future plans. We'll come to a final decision some time after the release of IR 1.0. best wishes Huw http://www.sapphiresteel.com -- Posted via http://www.ruby-forum.com/. From will at hotgazpacho.org Wed Nov 4 08:52:33 2009 From: will at hotgazpacho.org (Will Green) Date: Wed, 4 Nov 2009 08:52:33 -0500 Subject: [Ironruby-core] [ANN] IronRuby 0.9.2 Released In-Reply-To: References: Message-ID: <398d3e0e0911040552v1dd68c65j8e176de132d30a69@mail.gmail.com> I'm not convinced this is a "spaces in the name" issue. I think it is more likely a privileges/UAC issue. Vista and Win7 are very paranoid about allowing anyone except the trusted installer to write files to the Program Files directory. If you explicitly run the command prompt as administrator, does the issue still occur? -- Will Green http://hotgazpacho.org/ On Tue, Nov 3, 2009 at 11:37 PM, Jim Deville wrote: > Please file a bug with us and i'll investigate to see if MRI acts > identically. > > > > -----Original Message----- > From: Mark Ryall > Sent: Tuesday, November 03, 2009 8:26 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] [ANN] IronRuby 0.9.2 Released > > > igem fails to install gems to the default install location (c:\Program > Files\IronRuby 0.9.2) presumably because of the spaces. > > I can't recall the exact error message but something about "invalid > characters in the path". > > It seems fine if you install ironruby to a path that doesn't contain > spaces. > > Not sure whether this is a bug with rubygems or ironruby? Something > should be escaping the space characters or wrapping in quotes. > > On Wed, Nov 4, 2009 at 5:11 AM, Jim Deville > wrote: > > I?ll investigate. > > > > > > > > Tracking here: > > http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=2969 > > > > > > > > JD > > > > > > > > From: ironruby-core-bounces at rubyforge.org > > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jimmy > Schementi > > Sent: Tuesday, November 03, 2009 9:53 AM > > > > To: ironruby-core at rubyforge.org > > Subject: Re: [Ironruby-core] [ANN] IronRuby 0.9.2 Released > > > > > > > > Jim, could we do a non-admin installer that puts the files in the user > > directory? > > > > ________________________________ > > > > From: ironruby-core-bounces at rubyforge.org > > [ironruby-core-bounces at rubyforge.org] on behalf of Dominic Sisneros > > [dsisnero at gmail.com] > > Sent: Tuesday, November 03, 2009 7:22 AM > > To: ironruby-core at rubyforge.org > > Subject: Re: [Ironruby-core] [ANN] IronRuby 0.9.2 Released > > > > Thanks for this release. One problem with the MSI install is that it is > > requiring admin rights to install. This is not an option for me. > > > > thanks for all the hard work > > > > Dominic > > > > On Mon, Nov 2, 2009 at 5:20 PM, Jimmy Schementi > > wrote: > > > > The IronRuby team is pleased to announce version 0.9.2! > > > > http://ironruby.net/download > > Direct download link: > > > http://ironruby.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=33693#DownloadId=90621 > > > > As IronRuby approaches 1.0, these 0.9.x releases contain important bug > fixes > > and enhancements that IronRuby users request; this release fixes/closes > > 44 bugs. For more information see: > > http://rubyforge.org/frs/shownotes.php?release_id=41087. > > > > This release is the first to give IronRuby a MSI-based installer for > > Windows. > > Try it out and let us know if it does not install on your system. > > > > As always, if you encounter any issues with IronRuby please report it > here: > > http://ironruby.codeplex.com/WorkItem/Create.aspx. > > _______________________________________________ > > Ironruby-core mailing list > > Ironruby-core at rubyforge.org > > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > > > > > _______________________________________________ > > Ironruby-core mailing list > > Ironruby-core at rubyforge.org > > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ryan.riley at panesofglass.org Wed Nov 4 13:27:34 2009 From: ryan.riley at panesofglass.org (Ryan Riley) Date: Wed, 4 Nov 2009 12:27:34 -0600 Subject: [Ironruby-core] How do you convince .Net developers to use IronRuby? In-Reply-To: References: <5b0248170911020930x216b64b7q94c21e15553178f6@mail.gmail.com> <131af5e0911021011w54c60943u548792d80a9b339d@mail.gmail.com> <7c1b59c00911021152g424fed16q9530c37cab8e7c24@mail.gmail.com> <4a68b8cf0911030327m39915b0ewc6461f0a99e6da9a@mail.gmail.com> <83163c6a4a295b874feefb89a3f590ed@ruby-forum.com> Message-ID: On Wed, Nov 4, 2009 at 4:48 AM, Huw Collingbourne wrote: > Hello Ryan. > > We are going to wait to see how much interest there will be from our > customers. To date, I have to say, there hasn't been much. To be > perfectly honest, neither have we had much interest from the people here > who are already using IronRuby. Bear in mind that we released the alpha > IDE in Feb '08, so there has been plenty of time for people to let us > know whether or not Visual Studio integration of IronRuby is important > to them. To date, very little feedback has been received. Thanks, Huw. I can't speak for everyone else and I may be recalling this incorrectly, but I haven't pushed for anything b/c I thought it was just a matter of waiting. I never got the Ruby in Steel IDE b/c I've never earned a dime on any of my meager Ruby work and, with IronRuby on the horizon, I wanted to get something that would work with IR. I imagine there are others out there like me who just didn't want to pester. :) However, I can certainly understand the business implications, and I appreciate you posting the question on your site. I'm hopeful you'll get a good response! Best regards, Ryan Riley Email: ryan.riley at panesofglass.org LinkedIn: http://www.linkedin.com/in/ryanriley Blog: http://wizardsofsmart.net/ Website: http://panesofglass.org/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From james at plainprograms.com Wed Nov 4 15:32:27 2009 From: james at plainprograms.com (James Thompson) Date: Wed, 4 Nov 2009 14:32:27 -0600 Subject: [Ironruby-core] Further problems with ActionMailer Message-ID: I just posted this issue . I've got 0.9.2 in place and the UTC issue has gone away but now I'm getting this new error. James Thompson Plain Programs New Orleans, LA P: (502) 619.0353 E: james at plainprograms.com W: www.plainprograms.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ruby-forum.com Wed Nov 4 17:07:29 2009 From: lists at ruby-forum.com (Huw Collingbourne) Date: Wed, 4 Nov 2009 23:07:29 +0100 Subject: [Ironruby-core] How do you convince .Net developers to use IronRuby? In-Reply-To: References: <5b0248170911020930x216b64b7q94c21e15553178f6@mail.gmail.com> <131af5e0911021011w54c60943u548792d80a9b339d@mail.gmail.com> <7c1b59c00911021152g424fed16q9530c37cab8e7c24@mail.gmail.com> <4a68b8cf0911030327m39915b0ewc6461f0a99e6da9a@mail.gmail.com> <83163c6a4a295b874feefb89a3f590ed@ruby-forum.com> Message-ID: Well we are getting some interesting comments on the post on our site so I don't want to repeat myself too much in this thread ;-) Suffice to say, while we have provided free IDEs for Ruby and IronRuby, we are a commercial company so we have to take a very hard-headed view of where our most profitable future path may be. For us to resume work on our Visual Studio IronRuby IDE, we really need to be convinced that there is a market for this among professional Visual Studio developers. While it is, I suppose, possible that people have been silently waiting for us to produce new versions of our IronRuby IDE, all I can say is that it has been our experience that when a body of programmers is using your IDE regularly, they don't stay silent. When we were in the beta development of our standard Ruby IDE, we had a lot of user feedback. The same is now true of the IDE we are building for Adobe Flex. The future of our IronRuby IDE is not something we are going to decide overnight. We'll certainly keep a close eye on the IronRuby forums and we'll no doubt carry on the discussion on our own forums and blog before we arrive at a final decision. Given the work we initially put into the alpha IronRuby IDE (the form designer etc.) it would be personally satisfying to take it up to the same level of development as our Ruby and Flex IDEs. At the moment, we are not completely convinced that diverting back resources into that would be a sound business decision. But if we do get the sense that there genuinely is an upwelling of interest among professional .NET / Visual Studio developers we shall, of course, pay very close attention to that! ;-) best wishes Huw http://www.sapphiresteel.com -- Posted via http://www.ruby-forum.com/. From mark.ryall at gmail.com Wed Nov 4 19:57:20 2009 From: mark.ryall at gmail.com (Mark Ryall) Date: Thu, 5 Nov 2009 11:57:20 +1100 Subject: [Ironruby-core] [ANN] IronRuby 0.9.2 Released In-Reply-To: <398d3e0e0911040552v1dd68c65j8e176de132d30a69@mail.gmail.com> References: <398d3e0e0911040552v1dd68c65j8e176de132d30a69@mail.gmail.com> Message-ID: <43769a4a0911041657m70f402eaq553f82e351bdb291@mail.gmail.com> I encountered the problem on windows xp as a local administrator. I doubt there was anything so elaborate as special treatment of the program files folder in those halcyon days of xp security - all local adminstrators are probably treated alike. I'll submit a issue to codeplex now but got deterred yesterday (and subsequently distracted) at step one by forgetting my username On Thu, Nov 5, 2009 at 12:52 AM, Will Green wrote: > I'm not convinced this is a "spaces in the name" issue. I think it is more > likely a privileges/UAC issue.?Vista and Win7 are very paranoid about > allowing anyone except the trusted installer to write files to the Program > Files directory. > If you explicitly run the command prompt as administrator, does the issue > still occur? > -- > Will Green > http://hotgazpacho.org/ > > > On Tue, Nov 3, 2009 at 11:37 PM, Jim Deville wrote: >> >> Please file a bug with us and i'll investigate to see if MRI acts >> identically. >> >> >> >> -----Original Message----- >> From: Mark Ryall >> Sent: Tuesday, November 03, 2009 8:26 PM >> To: ironruby-core at rubyforge.org >> Subject: Re: [Ironruby-core] [ANN] IronRuby 0.9.2 Released >> >> >> igem fails to install gems to the default install location (c:\Program >> Files\IronRuby 0.9.2) presumably because of the spaces. >> >> I can't recall the exact error message but something about "invalid >> characters in the path". >> >> It seems fine if you install ironruby to a path that doesn't contain >> spaces. >> >> Not sure whether this is a bug with rubygems or ironruby? ?Something >> should be escaping the space characters or wrapping in quotes. >> >> On Wed, Nov 4, 2009 at 5:11 AM, Jim Deville >> wrote: >> > I?ll investigate. >> > >> > >> > >> > Tracking here: >> > http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=2969 >> > >> > >> > >> > JD >> > >> > >> > >> > From: ironruby-core-bounces at rubyforge.org >> > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jimmy >> > Schementi >> > Sent: Tuesday, November 03, 2009 9:53 AM >> > >> > To: ironruby-core at rubyforge.org >> > Subject: Re: [Ironruby-core] [ANN] IronRuby 0.9.2 Released >> > >> > >> > >> > Jim, could we do a non-admin installer that puts the files in the user >> > directory? >> > >> > ________________________________ >> > >> > From: ironruby-core-bounces at rubyforge.org >> > [ironruby-core-bounces at rubyforge.org] on behalf of Dominic Sisneros >> > [dsisnero at gmail.com] >> > Sent: Tuesday, November 03, 2009 7:22 AM >> > To: ironruby-core at rubyforge.org >> > Subject: Re: [Ironruby-core] [ANN] IronRuby 0.9.2 Released >> > >> > Thanks for this release. ?One problem with the MSI install is that it is >> > requiring admin rights to install. ?This is not an option for me. >> > >> > thanks for all the hard work >> > >> > Dominic >> > >> > On Mon, Nov 2, 2009 at 5:20 PM, Jimmy Schementi >> > wrote: >> > >> > The IronRuby team is pleased to announce version 0.9.2! >> > >> > http://ironruby.net/download >> > Direct download link: >> > >> > http://ironruby.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=33693#DownloadId=90621 >> > >> > As IronRuby approaches 1.0, these 0.9.x releases contain important bug >> > fixes >> > and enhancements that IronRuby users request; this release fixes/closes >> > 44 bugs. For more information see: >> > http://rubyforge.org/frs/shownotes.php?release_id=41087. >> > >> > This release is the first to give IronRuby a MSI-based installer for >> > Windows. >> > Try it out and let us know if it does not install on your system. >> > >> > As always, if you encounter any issues with IronRuby please report it >> > here: >> > http://ironruby.codeplex.com/WorkItem/Create.aspx. >> > _______________________________________________ >> > Ironruby-core mailing list >> > Ironruby-core at rubyforge.org >> > http://rubyforge.org/mailman/listinfo/ironruby-core >> > >> > >> > >> > _______________________________________________ >> > Ironruby-core mailing list >> > Ironruby-core at rubyforge.org >> > http://rubyforge.org/mailman/listinfo/ironruby-core >> > >> > >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core >> >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > From ckponnappa at gmail.com Wed Nov 4 23:27:46 2009 From: ckponnappa at gmail.com (C. K. Ponnappa) Date: Thu, 05 Nov 2009 09:57:46 +0530 Subject: [Ironruby-core] How do you convince .Net developers to use IronRuby? In-Reply-To: References: Message-ID: <4AF25442.4030702@gmail.com> Hey Shay, > how do you suggest to present IronRuby to .Net developers The deal is that you're not convincing a Chevy SUV driver to switch to a Ford SUV. You're asking him to switch to a Lamborghini sports car. The ride quality is different, the engine is fundamentally different, the handling is different and though the risks to passersby are roughly the same (they get run over if the driver is careless), the risks to the driver are different (not much can happen to you in an SUV because, so to speak, your ass is covered). What I'm trying to get at with this weak (but still amusing, I hope) analogy is that often with Ruby versus the mainstream (C#/Java), the fact that it's IronRuby or JRuby matters little; it's the fundamentally different approaches you need to take to ensure delivery that is the bigger issue. This includes technical issues like the unavailability of Intellisense (look at the bright side - the Java devs ask for refactoring support when you try to pitch JRuby to them which is a lot harder), software engineering issues (reliability, codebase entropy) and political issues (the last is a huge factor in the mainstream). My perspective - don't bother about it, at least right now. You have an audience that has already accepted and dealt with these issues; basically, convert the existing C-Ruby community first. Converting all the Ferrari owners to Lamborghini is an easier proposition, and generates enough publicity that the more adventurous among the mainstream will start experimenting of their own accord. As others on this thread have pointed out, most .Net shops are extremely conservative and most developers have next to no exposure to what the Ruby community would consider standard engineering best practices like TDD and CI. I'd say that the primary audience that you need to convert is the existing Ruby community by convincing them that IronRuby is a viable production platform. I'd say once the Ruby community accepts and promotes IronRuby just as they already have JRuby, then you can worry about bringing the luddites on board. At the risk of upsetting a lot of people, I think much of the mainstream .Net world is blinkered and has a very narrow perspective. For example, I have friends (and acquaintances) who are Microsoft devs who spend all their time writing C#, but who have never even _heard_ of Nant, NUnit and NHibernate. They have never heard of ReSharper and think VisualStudio is a cutting edge (*cough*) IDE. The Alt .Net guys are changing this, but these things take time. Focus on converting the Ruby community and the edgier folks in the mainstream (who tend to have their ears to the ground anyways) will follow. Best, Sidu. http://blog.sidu.in http://twitter.com/ponnappa Shay Friedman wrote: > Hi there, > > In the last month I had 3 sessions about IronRuby, all of them in > front of .Net audience. I really believe in the IronRuby but I find it > very very hard to pass that to existing .Net developers. > I try to show the benefits of using IR - getting things done faster > (like POCs, internal tools), using REPL, using IR abilities from C#, > IR and Silverlight (like Gestalt), unit testing, RoR... > Most of the .Net devs are very conservative and are not willing to get > out of their familiar development environment even when they see the > clear benefits of the new technology. > They feel that using IronRuby will take everything they love from them > - Visual Studio, Ctrl+F5, the sacred intellisense, etc. > > That's about what happens during a session: > - No Visual Studio integration: 50% of the audience are willing to leave. > - No compilation: more 25% have just lost interest. > - Intensive command line work: more 15% are shutting down. > > That leaves about 10 perecent of the audience that just think of using > IronRuby, most of them decide not to eventually. > > My question is - how do you suggest to present IronRuby to .Net > developers? > and to the team members - does Microsoft expect that existing .Net > devs will start using IronRuby? > > Thanks! > Shay. > > -- > -------------------------------------------------- > Shay Friedman > Author of IronRuby Unleashed > http://www.IronShay.com > Follow me: http://twitter.com/ironshay > ------------------------------------------------------------------------ > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > From Nathan_Stults at HSIHealth.com Wed Nov 4 23:44:05 2009 From: Nathan_Stults at HSIHealth.com (Nathan Stults) Date: Wed, 4 Nov 2009 20:44:05 -0800 Subject: [Ironruby-core] How do you convince .Net developers to useIronRuby? In-Reply-To: <4AF25442.4030702@gmail.com> References: <4AF25442.4030702@gmail.com> Message-ID: <790F1F63F5D2E44E91797E821B31FDBB02BC7A3E@hsi-fs.HSIHealth.local> But isn't the C-Ruby or J-Ruby crowd deploying primarily on Windows a pretty small group, all in all? Aren't most Ruby dev's working on Linux? After all, Ruby is considerably faster on Linux. I'm having a hard time imagining what the value proposition is for this demographic, who shouldn't really need to convert, but simply be willing to consider IronRuby as an alternative deployment option for Windows. Maybe I'm just being pessimistic, but I see convincing established Ruby developers to leave their stable, mature interpreters and libraries for 0.x IronRuby to gain access to .NET, and at the same time wave goodbye to Ruby 1.9, somewhat steeper of a climb than peddling dynamic languages, Ruby and IronRuby, to the existing .NET community. I do agree that you have to go in at the ALT.NET back door rather than the front door as the standard enterprise .NET developer is likely to stare blankly at you while you stammer in apparent gibberish at him, but converting Rubyists, this early in the ball game? I say good luck to that :) My guess is the bar of maturity and stability is even higher for existing Ruby programmers than it is for fresh meat. But that's just my half cocked opinion. :) -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of C. K. Ponnappa Sent: Wednesday, November 04, 2009 8:28 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] How do you convince .Net developers to useIronRuby? Hey Shay, > how do you suggest to present IronRuby to .Net developers The deal is that you're not convincing a Chevy SUV driver to switch to a Ford SUV. You're asking him to switch to a Lamborghini sports car. The ride quality is different, the engine is fundamentally different, the handling is different and though the risks to passersby are roughly the same (they get run over if the driver is careless), the risks to the driver are different (not much can happen to you in an SUV because, so to speak, your ass is covered). What I'm trying to get at with this weak (but still amusing, I hope) analogy is that often with Ruby versus the mainstream (C#/Java), the fact that it's IronRuby or JRuby matters little; it's the fundamentally different approaches you need to take to ensure delivery that is the bigger issue. This includes technical issues like the unavailability of Intellisense (look at the bright side - the Java devs ask for refactoring support when you try to pitch JRuby to them which is a lot harder), software engineering issues (reliability, codebase entropy) and political issues (the last is a huge factor in the mainstream). My perspective - don't bother about it, at least right now. You have an audience that has already accepted and dealt with these issues; basically, convert the existing C-Ruby community first. Converting all the Ferrari owners to Lamborghini is an easier proposition, and generates enough publicity that the more adventurous among the mainstream will start experimenting of their own accord. As others on this thread have pointed out, most .Net shops are extremely conservative and most developers have next to no exposure to what the Ruby community would consider standard engineering best practices like TDD and CI. I'd say that the primary audience that you need to convert is the existing Ruby community by convincing them that IronRuby is a viable production platform. I'd say once the Ruby community accepts and promotes IronRuby just as they already have JRuby, then you can worry about bringing the luddites on board. At the risk of upsetting a lot of people, I think much of the mainstream .Net world is blinkered and has a very narrow perspective. For example, I have friends (and acquaintances) who are Microsoft devs who spend all their time writing C#, but who have never even _heard_ of Nant, NUnit and NHibernate. They have never heard of ReSharper and think VisualStudio is a cutting edge (*cough*) IDE. The Alt .Net guys are changing this, but these things take time. Focus on converting the Ruby community and the edgier folks in the mainstream (who tend to have their ears to the ground anyways) will follow. Best, Sidu. http://blog.sidu.in http://twitter.com/ponnappa Shay Friedman wrote: > Hi there, > > In the last month I had 3 sessions about IronRuby, all of them in > front of .Net audience. I really believe in the IronRuby but I find it > very very hard to pass that to existing .Net developers. > I try to show the benefits of using IR - getting things done faster > (like POCs, internal tools), using REPL, using IR abilities from C#, > IR and Silverlight (like Gestalt), unit testing, RoR... > Most of the .Net devs are very conservative and are not willing to get > out of their familiar development environment even when they see the > clear benefits of the new technology. > They feel that using IronRuby will take everything they love from them > - Visual Studio, Ctrl+F5, the sacred intellisense, etc. > > That's about what happens during a session: > - No Visual Studio integration: 50% of the audience are willing to leave. > - No compilation: more 25% have just lost interest. > - Intensive command line work: more 15% are shutting down. > > That leaves about 10 perecent of the audience that just think of using > IronRuby, most of them decide not to eventually. > > My question is - how do you suggest to present IronRuby to .Net > developers? > and to the team members - does Microsoft expect that existing .Net > devs will start using IronRuby? > > Thanks! > Shay. > > -- > -------------------------------------------------- > Shay Friedman > Author of IronRuby Unleashed > http://www.IronShay.com > Follow me: http://twitter.com/ironshay > ------------------------------------------------------------------------ > > _______________________________________________ > 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 ryan.riley at panesofglass.org Thu Nov 5 00:34:43 2009 From: ryan.riley at panesofglass.org (Ryan Riley) Date: Wed, 4 Nov 2009 23:34:43 -0600 Subject: [Ironruby-core] How do you convince .Net developers to useIronRuby? In-Reply-To: <790F1F63F5D2E44E91797E821B31FDBB02BC7A3E@hsi-fs.HSIHealth.local> References: <4AF25442.4030702@gmail.com> <790F1F63F5D2E44E91797E821B31FDBB02BC7A3E@hsi-fs.HSIHealth.local> Message-ID: On Wed, Nov 4, 2009 at 10:44 PM, Nathan Stults wrote: > But isn't the C-Ruby or J-Ruby crowd deploying primarily on Windows a > pretty small group, all in all? Aren't most Ruby dev's working on Linux? > After all, Ruby is considerably faster on Linux. I'm having a hard time > imagining what the value proposition is for this demographic, who > shouldn't really need to convert, but simply be willing to consider > IronRuby as an alternative deployment option for Windows. Maybe I'm just > being pessimistic, but I see convincing established Ruby developers to > leave their stable, mature interpreters and libraries for 0.x IronRuby > to gain access to .NET, and at the same time wave goodbye to Ruby 1.9, > somewhat steeper of a climb than peddling dynamic languages, Ruby and > IronRuby, to the existing .NET community. What about RubyCocoa and Flex development? Not all Ruby is pure web or console scripts. Apple got Ruby devs working on their platform (or maybe vice versa). Why not Ruby WPF or Ruby Silverlight (via Ivan's IronNails or Jimmy's silverline)? It's not a major jump, but it gives them easier access to Windows client development. If nothing else, they may be able to help evangelize the C# and VB.NET stalwarts and show them a better way. ;) Ryan Riley Email: ryan.riley at panesofglass.org LinkedIn: http://www.linkedin.com/in/ryanriley Blog: http://wizardsofsmart.net/ Website: http://panesofglass.org/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From Nathan_Stults at HSIHealth.com Thu Nov 5 01:08:42 2009 From: Nathan_Stults at HSIHealth.com (Nathan Stults) Date: Wed, 4 Nov 2009 22:08:42 -0800 Subject: [Ironruby-core] How do you convince .Net developers touseIronRuby? In-Reply-To: References: <4AF25442.4030702@gmail.com><790F1F63F5D2E44E91797E821B31FDBB02BC7A3E@hsi-fs.HSIHealth.local> Message-ID: <790F1F63F5D2E44E91797E821B31FDBB02BC7A40@hsi-fs.HSIHealth.local> Good point. I guess from an evangelism perspective, it makes sense to talk to everyone who walks by the soapbox, as there?s something for everyone. Even so, if the path to significant adoption = IronRuby Evangelists => Rubyists => .NET Foot Soldiers, I?ll eat my hat J Fortunately, it?s made of food. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ryan Riley Sent: Wednesday, November 04, 2009 9:35 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] How do you convince .Net developers touseIronRuby? On Wed, Nov 4, 2009 at 10:44 PM, Nathan Stults wrote: But isn't the C-Ruby or J-Ruby crowd deploying primarily on Windows a pretty small group, all in all? Aren't most Ruby dev's working on Linux? After all, Ruby is considerably faster on Linux. I'm having a hard time imagining what the value proposition is for this demographic, who shouldn't really need to convert, but simply be willing to consider IronRuby as an alternative deployment option for Windows. Maybe I'm just being pessimistic, but I see convincing established Ruby developers to leave their stable, mature interpreters and libraries for 0.x IronRuby to gain access to .NET, and at the same time wave goodbye to Ruby 1.9, somewhat steeper of a climb than peddling dynamic languages, Ruby and IronRuby, to the existing .NET community. What about RubyCocoa and Flex development? Not all Ruby is pure web or console scripts. Apple got Ruby devs working on their platform (or maybe vice versa). Why not Ruby WPF or Ruby Silverlight (via Ivan's IronNails or Jimmy's silverline)? It's not a major jump, but it gives them easier access to Windows client development. If nothing else, they may be able to help evangelize the C# and VB.NET stalwarts and show them a better way. ;) Ryan Riley Email: ryan.riley at panesofglass.org LinkedIn: http://www.linkedin.com/in/ryanriley Blog: http://wizardsofsmart.net/ Website: http://panesofglass.org/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From Nathan_Stults at HSIHealth.com Thu Nov 5 01:11:21 2009 From: Nathan_Stults at HSIHealth.com (Nathan Stults) Date: Wed, 4 Nov 2009 22:11:21 -0800 Subject: [Ironruby-core] How do you convince .Net developers touseIronRuby? In-Reply-To: References: <4AF25442.4030702@gmail.com><790F1F63F5D2E44E91797E821B31FDBB02BC7A3E@hsi-fs.HSIHealth.local> Message-ID: <790F1F63F5D2E44E91797E821B31FDBB02BC7A41@hsi-fs.HSIHealth.local> Good point. I guess from an evangelism perspective, it makes sense to talk to everyone who walks by the soapbox, as there?s something for everyone. Even so, if the path to significant adoption = IronRuby Evangelists => Rubyists => .NET Foot Soldiers, I?ll eat my hat. Fortunately, it?s made of food. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ryan Riley Sent: Wednesday, November 04, 2009 9:35 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] How do you convince .Net developers touseIronRuby? On Wed, Nov 4, 2009 at 10:44 PM, Nathan Stults wrote: But isn't the C-Ruby or J-Ruby crowd deploying primarily on Windows a pretty small group, all in all? Aren't most Ruby dev's working on Linux? After all, Ruby is considerably faster on Linux. I'm having a hard time imagining what the value proposition is for this demographic, who shouldn't really need to convert, but simply be willing to consider IronRuby as an alternative deployment option for Windows. Maybe I'm just being pessimistic, but I see convincing established Ruby developers to leave their stable, mature interpreters and libraries for 0.x IronRuby to gain access to .NET, and at the same time wave goodbye to Ruby 1.9, somewhat steeper of a climb than peddling dynamic languages, Ruby and IronRuby, to the existing .NET community. What about RubyCocoa and Flex development? Not all Ruby is pure web or console scripts. Apple got Ruby devs working on their platform (or maybe vice versa). Why not Ruby WPF or Ruby Silverlight (via Ivan's IronNails or Jimmy's silverline)? It's not a major jump, but it gives them easier access to Windows client development. If nothing else, they may be able to help evangelize the C# and VB.NET stalwarts and show them a better way. ;) Ryan Riley Email: ryan.riley at panesofglass.org LinkedIn: http://www.linkedin.com/in/ryanriley Blog: http://wizardsofsmart.net/ Website: http://panesofglass.org/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From ryan.riley at panesofglass.org Thu Nov 5 01:16:25 2009 From: ryan.riley at panesofglass.org (Ryan Riley) Date: Thu, 5 Nov 2009 00:16:25 -0600 Subject: [Ironruby-core] How do you convince .Net developers touseIronRuby? In-Reply-To: <790F1F63F5D2E44E91797E821B31FDBB02BC7A40@hsi-fs.HSIHealth.local> References: <4AF25442.4030702@gmail.com> <790F1F63F5D2E44E91797E821B31FDBB02BC7A3E@hsi-fs.HSIHealth.local> <790F1F63F5D2E44E91797E821B31FDBB02BC7A40@hsi-fs.HSIHealth.local> Message-ID: On Thu, Nov 5, 2009 at 12:08 AM, Nathan Stults wrote: > Good point. I guess from an evangelism perspective, it makes sense to > talk to everyone who walks by the soapbox, as there?s something for > everyone. Even so, if the path to significant adoption = IronRuby > Evangelists => Rubyists => .NET Foot Soldiers, I?ll eat my hat JFortunately, it?s made of food. > > > Well, since I'm taking that approach atm, here's to good health and tasty hats! ;) Ryan Riley Email: ryan.riley at panesofglass.org LinkedIn: http://www.linkedin.com/in/ryanriley Blog: http://wizardsofsmart.net/ Website: http://panesofglass.org/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jimmy.Schementi at microsoft.com Thu Nov 5 01:58:43 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Thu, 5 Nov 2009 06:58:43 +0000 Subject: [Ironruby-core] How do you convince .Net developers to useIronRuby? In-Reply-To: <790F1F63F5D2E44E91797E821B31FDBB02BC7A3E@hsi-fs.HSIHealth.local> References: <4AF25442.4030702@gmail.com> <790F1F63F5D2E44E91797E821B31FDBB02BC7A3E@hsi-fs.HSIHealth.local> Message-ID: <1B42307CD4AADD438CDDA2FE1121CC9202D2FC@TK5EX14MBXC134.redmond.corp.microsoft.com> On a related vein, I got some news from the Rails core team a couple of days ago that the Rails documentation is viewed by Windows machines 50% of the time. The Rails core team sees Windows developers as a huge group of people to make happy. >>> Ruby is considerably faster on Linux Unfortunately, that was true with previous builds of Ruby, but the new revived RubyInstaller project is building Ruby with more modern compilers, getting the speed up to what Ruby on Linux is: See http://antoniocangiano.com/2009/08/10/how-much-faster-is-ruby-on-linux/ and http://antoniocangiano.com/2009/08/04/a-faster-ruby-on-windows-is-possible/ if you haven't already. ~js -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Nathan Stults Sent: Wednesday, November 04, 2009 8:44 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] How do you convince .Net developers to useIronRuby? But isn't the C-Ruby or J-Ruby crowd deploying primarily on Windows a pretty small group, all in all? Aren't most Ruby dev's working on Linux? After all, Ruby is considerably faster on Linux. I'm having a hard time imagining what the value proposition is for this demographic, who shouldn't really need to convert, but simply be willing to consider IronRuby as an alternative deployment option for Windows. Maybe I'm just being pessimistic, but I see convincing established Ruby developers to leave their stable, mature interpreters and libraries for 0.x IronRuby to gain access to .NET, and at the same time wave goodbye to Ruby 1.9, somewhat steeper of a climb than peddling dynamic languages, Ruby and IronRuby, to the existing .NET community. I do agree that you have to go in at the ALT.NET back door rather than the front door as the standard enterprise .NET developer is likely to stare blankly at you while you stammer in apparent gibberish at him, but converting Rubyists, this early in the ball game? I say good luck to that :) My guess is the bar of maturity and stability is even higher for existing Ruby programmers than it is for fresh meat. But that's just my half cocked opinion. :) -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of C. K. Ponnappa Sent: Wednesday, November 04, 2009 8:28 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] How do you convince .Net developers to useIronRuby? Hey Shay, > how do you suggest to present IronRuby to .Net developers The deal is that you're not convincing a Chevy SUV driver to switch to a Ford SUV. You're asking him to switch to a Lamborghini sports car. The ride quality is different, the engine is fundamentally different, the handling is different and though the risks to passersby are roughly the same (they get run over if the driver is careless), the risks to the driver are different (not much can happen to you in an SUV because, so to speak, your ass is covered). What I'm trying to get at with this weak (but still amusing, I hope) analogy is that often with Ruby versus the mainstream (C#/Java), the fact that it's IronRuby or JRuby matters little; it's the fundamentally different approaches you need to take to ensure delivery that is the bigger issue. This includes technical issues like the unavailability of Intellisense (look at the bright side - the Java devs ask for refactoring support when you try to pitch JRuby to them which is a lot harder), software engineering issues (reliability, codebase entropy) and political issues (the last is a huge factor in the mainstream). My perspective - don't bother about it, at least right now. You have an audience that has already accepted and dealt with these issues; basically, convert the existing C-Ruby community first. Converting all the Ferrari owners to Lamborghini is an easier proposition, and generates enough publicity that the more adventurous among the mainstream will start experimenting of their own accord. As others on this thread have pointed out, most .Net shops are extremely conservative and most developers have next to no exposure to what the Ruby community would consider standard engineering best practices like TDD and CI. I'd say that the primary audience that you need to convert is the existing Ruby community by convincing them that IronRuby is a viable production platform. I'd say once the Ruby community accepts and promotes IronRuby just as they already have JRuby, then you can worry about bringing the luddites on board. At the risk of upsetting a lot of people, I think much of the mainstream .Net world is blinkered and has a very narrow perspective. For example, I have friends (and acquaintances) who are Microsoft devs who spend all their time writing C#, but who have never even _heard_ of Nant, NUnit and NHibernate. They have never heard of ReSharper and think VisualStudio is a cutting edge (*cough*) IDE. The Alt .Net guys are changing this, but these things take time. Focus on converting the Ruby community and the edgier folks in the mainstream (who tend to have their ears to the ground anyways) will follow. Best, Sidu. http://blog.sidu.in http://twitter.com/ponnappa Shay Friedman wrote: > Hi there, > > In the last month I had 3 sessions about IronRuby, all of them in > front of .Net audience. I really believe in the IronRuby but I find it > very very hard to pass that to existing .Net developers. > I try to show the benefits of using IR - getting things done faster > (like POCs, internal tools), using REPL, using IR abilities from C#, > IR and Silverlight (like Gestalt), unit testing, RoR... > Most of the .Net devs are very conservative and are not willing to get > out of their familiar development environment even when they see the > clear benefits of the new technology. > They feel that using IronRuby will take everything they love from them > - Visual Studio, Ctrl+F5, the sacred intellisense, etc. > > That's about what happens during a session: > - No Visual Studio integration: 50% of the audience are willing to leave. > - No compilation: more 25% have just lost interest. > - Intensive command line work: more 15% are shutting down. > > That leaves about 10 perecent of the audience that just think of using > IronRuby, most of them decide not to eventually. > > My question is - how do you suggest to present IronRuby to .Net > developers? > and to the team members - does Microsoft expect that existing .Net > devs will start using IronRuby? > > Thanks! > Shay. > > -- > -------------------------------------------------- > Shay Friedman > Author of IronRuby Unleashed > http://www.IronShay.com > Follow me: http://twitter.com/ironshay > ------------------------------------------------------------------------ > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From dipidi at gmail.com Thu Nov 5 02:40:27 2009 From: dipidi at gmail.com (Dotan N.) Date: Thu, 5 Nov 2009 09:40:27 +0200 Subject: [Ironruby-core] How do you convince .Net developers to useIronRuby? In-Reply-To: <1B42307CD4AADD438CDDA2FE1121CC9202D2FC@TK5EX14MBXC134.redmond.corp.microsoft.com> References: <4AF25442.4030702@gmail.com> <790F1F63F5D2E44E91797E821B31FDBB02BC7A3E@hsi-fs.HSIHealth.local> <1B42307CD4AADD438CDDA2FE1121CC9202D2FC@TK5EX14MBXC134.redmond.corp.microsoft.com> Message-ID: <6927b8740911042340o164503c1g95239004f013503a@mail.gmail.com> dont forget that since rails devs are always looking for ways to squeeze some more performance from their poorly performing c-ruby, if ironruby performs considerably faster than MRI and JRuby, some dedicated windows rails servers will start to pop up. it will be easier in every possible way for a .net dev to deploy, run and manage. i think this is the major 'selling' point -- bigger share for windows servers and bigger opportunities for .net developers at the end of the day. On Thu, Nov 5, 2009 at 8:58 AM, Jimmy Schementi < Jimmy.Schementi at microsoft.com> wrote: > On a related vein, I got some news from the Rails core team a couple of > days ago that the Rails documentation is viewed by Windows machines 50% of > the time. The Rails core team sees Windows developers as a huge group of > people to make happy. > > >>> Ruby is considerably faster on Linux > > Unfortunately, that was true with previous builds of Ruby, but the new > revived RubyInstaller project is building Ruby with more modern compilers, > getting the speed up to what Ruby on Linux is: See > http://antoniocangiano.com/2009/08/10/how-much-faster-is-ruby-on-linux/and > http://antoniocangiano.com/2009/08/04/a-faster-ruby-on-windows-is-possible/if you haven't already. > > ~js > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] On Behalf Of Nathan Stults > Sent: Wednesday, November 04, 2009 8:44 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] How do you convince .Net developers to > useIronRuby? > > But isn't the C-Ruby or J-Ruby crowd deploying primarily on Windows a > pretty small group, all in all? Aren't most Ruby dev's working on Linux? > After all, Ruby is considerably faster on Linux. I'm having a hard time > imagining what the value proposition is for this demographic, who shouldn't > really need to convert, but simply be willing to consider IronRuby as an > alternative deployment option for Windows. Maybe I'm just being pessimistic, > but I see convincing established Ruby developers to leave their stable, > mature interpreters and libraries for 0.x IronRuby to gain access to .NET, > and at the same time wave goodbye to Ruby 1.9, somewhat steeper of a climb > than peddling dynamic languages, Ruby and IronRuby, to the existing .NET > community. I do agree that you have to go in at the ALT.NET back door > rather than the front door as the standard enterprise .NET developer is > likely to stare blankly at you while you stammer in apparent gibberish at > him, but converting Rubyists, this early in the ball game? I say good luck > to that :) My guess is the bar of maturity and stability is even higher for > existing Ruby programmers than > it is for fresh meat. But that's just my half cocked opinion. :) > > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of C. K. Ponnappa > Sent: Wednesday, November 04, 2009 8:28 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] How do you convince .Net developers to > useIronRuby? > > Hey Shay, > > > how do you suggest to present IronRuby to .Net developers > The deal is that you're not convincing a Chevy SUV driver to switch to a > > Ford SUV. You're asking him to switch to a Lamborghini sports car. The ride > quality is different, the engine is fundamentally different, the handling > is different and though the risks to passersby are roughly the same (they > get run over if the driver is careless), the risks to the driver are > different (not much can happen to you in an SUV because, so to speak, your > ass is covered). > > What I'm trying to get at with this weak (but still amusing, I hope) > analogy is that often with Ruby versus the mainstream (C#/Java), the fact > that it's IronRuby or JRuby matters little; it's the fundamentally different > approaches you need to take to ensure delivery that is the bigger issue. > This includes technical issues like the unavailability of Intellisense (look > at the bright side - the Java devs ask for refactoring support when you try > to pitch JRuby to them which is a lot harder), software engineering issues > (reliability, codebase entropy) and > > political issues (the last is a huge factor in the mainstream). My > perspective - don't bother about it, at least right now. You have an > audience that has already accepted and dealt with these issues; basically, > convert the existing C-Ruby community first. Converting all the Ferrari > owners to Lamborghini is an easier proposition, and generates enough > publicity that the more adventurous among the mainstream will start > experimenting of their own accord. > > As others on this thread have pointed out, most .Net shops are extremely > > conservative and most developers have next to no exposure to what the Ruby > community would consider standard engineering best practices like TDD and > CI. I'd say that the primary audience that you need to convert is the > existing Ruby community by convincing them that IronRuby is a viable > production platform. I'd say once the Ruby community accepts and promotes > IronRuby just as they already have JRuby, then you can worry about bringing > the luddites on board. > > At the risk of upsetting a lot of people, I think much of the mainstream > > .Net world is blinkered and has a very narrow perspective. For example, I > have friends (and acquaintances) who are Microsoft devs who spend all their > time writing C#, but who have never even _heard_ of Nant, NUnit and > NHibernate. They have never heard of ReSharper and think VisualStudio is a > cutting edge (*cough*) IDE. The Alt .Net guys are changing this, but these > things take time. > > Focus on converting the Ruby community and the edgier folks in the > mainstream (who tend to have their ears to the ground anyways) will follow. > > Best, > Sidu. > http://blog.sidu.in > http://twitter.com/ponnappa > > > Shay Friedman wrote: > > Hi there, > > > > In the last month I had 3 sessions about IronRuby, all of them in > > front of .Net audience. I really believe in the IronRuby but I find it > > > very very hard to pass that to existing .Net developers. > > I try to show the benefits of using IR - getting things done faster > > (like POCs, internal tools), using REPL, using IR abilities from C#, > > IR and Silverlight (like Gestalt), unit testing, RoR... > > Most of the .Net devs are very conservative and are not willing to get > > > out of their familiar development environment even when they see the > > clear benefits of the new technology. > > They feel that using IronRuby will take everything they love from them > > > - Visual Studio, Ctrl+F5, the sacred intellisense, etc. > > > > That's about what happens during a session: > > - No Visual Studio integration: 50% of the audience are willing to > leave. > > - No compilation: more 25% have just lost interest. > > - Intensive command line work: more 15% are shutting down. > > > > That leaves about 10 perecent of the audience that just think of using > > > IronRuby, most of them decide not to eventually. > > > > My question is - how do you suggest to present IronRuby to .Net > > developers? > > and to the team members - does Microsoft expect that existing .Net > > devs will start using IronRuby? > > > > Thanks! > > Shay. > > > > -- > > -------------------------------------------------- > > Shay Friedman > > Author of IronRuby Unleashed > > http://www.IronShay.com > > Follow me: http://twitter.com/ironshay > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > Ironruby-core mailing list > > Ironruby-core at rubyforge.org > > http://rubyforge.org/mailman/listinfo/ironruby-core > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ckponnappa at gmail.com Thu Nov 5 04:55:32 2009 From: ckponnappa at gmail.com (C. K. Ponnappa) Date: Thu, 05 Nov 2009 15:25:32 +0530 Subject: [Ironruby-core] How do you convince .Net developers touseIronRuby? In-Reply-To: <790F1F63F5D2E44E91797E821B31FDBB02BC7A41@hsi-fs.HSIHealth.local> References: <4AF25442.4030702@gmail.com><790F1F63F5D2E44E91797E821B31FDBB02BC7A3E@hsi-fs.HSIHealth.local> <790F1F63F5D2E44E91797E821B31FDBB02BC7A41@hsi-fs.HSIHealth.local> Message-ID: <4AF2A114.7050504@gmail.com> > But isn't the C-Ruby or J-Ruby crowd deploying primarily on Windows a > pretty small group, all in all? This is true. But mostly because none of them actually work for Windows shops, because if a shop is open to C-Ruby or J-Ruby they are not a Windows shop. Almost a Catch 22. > After all, Ruby is considerably faster on Linux. This is true too - but only compared to Ruby on Windows. The MRI compared to anything else (any other language) is like treacle. In fact, I always strongly recommend JRuby to all my clients, and one of our flagship products (Mingle) has been on JRuby since JRuby 0.9. Pretty much the only thing I miss on JRuby in terms of libraries is RCov - everything else has been ported, or better options exist in Java already. Of course, the fact that JRuby is *way* faster than MRI helps, and from everything I've seen IronRuby is going to be just as quick, if not quicker. Now, most shops are either Java or .Net and honestly, at the end of the day, this is with reference to the supported production environment, really, not the languages used. Taking myself as an example, I believe Ruby is a good idea so solve certain problems, and I can (and do) make a strong case for Ruby in Java shops thanks to JRuby. With IronRuby becoming mainstream, I can now start to make a case for it, and this is what I'm trying to get at. It will be dedicated Rubyists that make the point that a Windows production environment and a Ruby project are no longer a contradiction in terms, not unconvinced VB.Net devs or a suit that showed up at a MS dev day by mistake. It's the early adopters that evangelise, and someone who has only ever done C# since 2002 because his employers asked him to clearly isn't an early adopter. And finally, the most crucial point for me: The .Net world doesn't contain the most avid open source contributors (or even users) in the world. Not by a long shot. The Java world does, and the Ruby world is nothing but avid open source contributors and users. This is why you see JRuby grow a viable ecosystem in no time at all, with all significant gems ported and production deployments even before a 1.0. Without that, you simply do not have enough tools and libraries to build stuff. Encouraging developers and maintainers of popular Ruby gems to support and innovate on IronRuby is of the utmost importance. And almost every single popular gem is developed on either OSX or Linux - which means IronRuby building and running smoothly on both Linux and OSX is essential to get the ecosystem going. Anyways, long story short, when we get to a point where a hacker can confidently offer to solve a problem with a Ruby app (especially in the enterprise, because here there be dragons) even though its a Windows shop, we've achieved critical mass. Then its all downhill from there. Best, Sidu. http://blog.sidu.in http://twitter.com/ponnappa Nathan Stults wrote: > > Good point. I guess from an evangelism perspective, it makes sense to > talk to everyone who walks by the soapbox, as there?s something for > everyone. Even so, if the path to significant adoption = IronRuby > Evangelists => Rubyists => .NET Foot Soldiers, I?ll eat my hat. > Fortunately, it?s made of food. > > > > > > *From:* ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] *On Behalf Of *Ryan Riley > *Sent:* Wednesday, November 04, 2009 9:35 PM > *To:* ironruby-core at rubyforge.org > *Subject:* Re: [Ironruby-core] How do you convince .Net developers > touseIronRuby? > > > > On Wed, Nov 4, 2009 at 10:44 PM, Nathan Stults > > wrote: > > But isn't the C-Ruby or J-Ruby crowd deploying primarily on Windows a > pretty small group, all in all? Aren't most Ruby dev's working on Linux? > After all, Ruby is considerably faster on Linux. I'm having a hard time > imagining what the value proposition is for this demographic, who > shouldn't really need to convert, but simply be willing to consider > IronRuby as an alternative deployment option for Windows. Maybe I'm just > being pessimistic, but I see convincing established Ruby developers to > leave their stable, mature interpreters and libraries for 0.x IronRuby > to gain access to .NET, and at the same time wave goodbye to Ruby 1.9, > somewhat steeper of a climb than peddling dynamic languages, Ruby and > IronRuby, to the existing .NET community. > > > > What about RubyCocoa and Flex development? Not all Ruby is pure web or > console scripts. Apple got Ruby devs working on their platform (or > maybe vice versa). Why not Ruby WPF or Ruby Silverlight (via Ivan's > IronNails or Jimmy's silverline)? It's not a major jump, but it gives > them easier access to Windows client development. If nothing else, > they may be able to help evangelize the C# and VB.NET > stalwarts and show them a better way. ;) > > > Ryan Riley > > Email: ryan.riley at panesofglass.org > LinkedIn: http://www.linkedin.com/in/ryanriley > Blog: http://wizardsofsmart.net/ > > Website: http://panesofglass.org/ > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > From sanxiyn at gmail.com Thu Nov 5 07:59:53 2009 From: sanxiyn at gmail.com (Seo Sanghyeon) Date: Thu, 5 Nov 2009 21:59:53 +0900 Subject: [Ironruby-core] How do you convince .Net developers touseIronRuby? In-Reply-To: <4AF2A114.7050504@gmail.com> References: <4AF25442.4030702@gmail.com> <790F1F63F5D2E44E91797E821B31FDBB02BC7A3E@hsi-fs.HSIHealth.local> <790F1F63F5D2E44E91797E821B31FDBB02BC7A41@hsi-fs.HSIHealth.local> <4AF2A114.7050504@gmail.com> Message-ID: <5b0248170911050459x71545aa1gd5546c7a4e9bee16@mail.gmail.com> 2009/11/5 C. K. Ponnappa : > And finally, the most crucial point for me: ?The .Net world doesn't contain > the most avid open source contributors (or even users) in the world. Not by > a long shot. The Java world does, and the Ruby world is nothing but avid > open source contributors and users. This is why you see JRuby grow a viable > ecosystem in no time at all, with all significant gems ported and production > deployments even before a 1.0. Without that, you simply do not have enough > tools and libraries to build stuff. Encouraging developers and maintainers > of popular Ruby gems to support and innovate on IronRuby is of the utmost > importance. And almost every single popular gem is developed on either OSX > or Linux - which means IronRuby building and running smoothly on both Linux > and OSX is essential to get the ecosystem going. I agree 100%. This is why I spent a lot of time running IronPython on Mono in 2006 and 2007, and I believe this is of critical importance for IronRuby too, but this doesn't seem to be too popular here... -- Seo Sanghyeon From Nathan_Stults at HSIHealth.com Thu Nov 5 10:37:32 2009 From: Nathan_Stults at HSIHealth.com (Nathan Stults) Date: Thu, 5 Nov 2009 07:37:32 -0800 Subject: [Ironruby-core] How do you convince .Netdevelopers touseIronRuby? In-Reply-To: <4AF2A114.7050504@gmail.com> References: <4AF25442.4030702@gmail.com><790F1F63F5D2E44E91797E821B31FDBB02BC7A3E@hsi-fs.HSIHealth.local> <790F1F63F5D2E44E91797E821B31FDBB02BC7A41@hsi-fs.HSIHealth.local> <4AF2A114.7050504@gmail.com> Message-ID: <790F1F63F5D2E44E91797E821B31FDBB02BC7A4A@hsi-fs.HSIHealth.local> You're probably right, you have a much broader perspective than I do (Windows/MS only) and on the larger scale, I can see how acceptance of IronRuby as a first class Ruby platform by the Ruby community will make or break its ultimate success. And I see what you mean about the nature of the OSS communities of the various platforms. Actually, my biggest fear for IronRuby is that the community won't port enough of the native components of the Ruby libraries to make it a truly viable option, exactly because the .NET OSS community isn't as robust, so engaging Ruby developers to step in and help get the work done does seem absolutely critical, in retrospect far more critical than convincing existing .NET developers to slowly start dipping their toes in IronRuby, as progress in that direction is not likely to move the platform towards parity with the other Ruby interpreters, which is the key component. Thanks for the schooling. -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of C. K. Ponnappa Sent: Thursday, November 05, 2009 1:56 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] How do you convince .Netdevelopers touseIronRuby? > But isn't the C-Ruby or J-Ruby crowd deploying primarily on Windows a > pretty small group, all in all? This is true. But mostly because none of them actually work for Windows shops, because if a shop is open to C-Ruby or J-Ruby they are not a Windows shop. Almost a Catch 22. > After all, Ruby is considerably faster on Linux. This is true too - but only compared to Ruby on Windows. The MRI compared to anything else (any other language) is like treacle. In fact, I always strongly recommend JRuby to all my clients, and one of our flagship products (Mingle) has been on JRuby since JRuby 0.9. Pretty much the only thing I miss on JRuby in terms of libraries is RCov - everything else has been ported, or better options exist in Java already. Of course, the fact that JRuby is *way* faster than MRI helps, and from everything I've seen IronRuby is going to be just as quick, if not quicker. Now, most shops are either Java or .Net and honestly, at the end of the day, this is with reference to the supported production environment, really, not the languages used. Taking myself as an example, I believe Ruby is a good idea so solve certain problems, and I can (and do) make a strong case for Ruby in Java shops thanks to JRuby. With IronRuby becoming mainstream, I can now start to make a case for it, and this is what I'm trying to get at. It will be dedicated Rubyists that make the point that a Windows production environment and a Ruby project are no longer a contradiction in terms, not unconvinced VB.Net devs or a suit that showed up at a MS dev day by mistake. It's the early adopters that evangelise, and someone who has only ever done C# since 2002 because his employers asked him to clearly isn't an early adopter. And finally, the most crucial point for me: The .Net world doesn't contain the most avid open source contributors (or even users) in the world. Not by a long shot. The Java world does, and the Ruby world is nothing but avid open source contributors and users. This is why you see JRuby grow a viable ecosystem in no time at all, with all significant gems ported and production deployments even before a 1.0. Without that, you simply do not have enough tools and libraries to build stuff. Encouraging developers and maintainers of popular Ruby gems to support and innovate on IronRuby is of the utmost importance. And almost every single popular gem is developed on either OSX or Linux - which means IronRuby building and running smoothly on both Linux and OSX is essential to get the ecosystem going. Anyways, long story short, when we get to a point where a hacker can confidently offer to solve a problem with a Ruby app (especially in the enterprise, because here there be dragons) even though its a Windows shop, we've achieved critical mass. Then its all downhill from there. Best, Sidu. http://blog.sidu.in http://twitter.com/ponnappa Nathan Stults wrote: > > Good point. I guess from an evangelism perspective, it makes sense to > talk to everyone who walks by the soapbox, as there?s something for > everyone. Even so, if the path to significant adoption = IronRuby > Evangelists => Rubyists => .NET Foot Soldiers, I?ll eat my hat. > Fortunately, it?s made of food. > > > > > > *From:* ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] *On Behalf Of *Ryan Riley > *Sent:* Wednesday, November 04, 2009 9:35 PM > *To:* ironruby-core at rubyforge.org > *Subject:* Re: [Ironruby-core] How do you convince .Net developers > touseIronRuby? > > > > On Wed, Nov 4, 2009 at 10:44 PM, Nathan Stults > > wrote: > > But isn't the C-Ruby or J-Ruby crowd deploying primarily on Windows a > pretty small group, all in all? Aren't most Ruby dev's working on Linux? > After all, Ruby is considerably faster on Linux. I'm having a hard time > imagining what the value proposition is for this demographic, who > shouldn't really need to convert, but simply be willing to consider > IronRuby as an alternative deployment option for Windows. Maybe I'm just > being pessimistic, but I see convincing established Ruby developers to > leave their stable, mature interpreters and libraries for 0.x IronRuby > to gain access to .NET, and at the same time wave goodbye to Ruby 1.9, > somewhat steeper of a climb than peddling dynamic languages, Ruby and > IronRuby, to the existing .NET community. > > > > What about RubyCocoa and Flex development? Not all Ruby is pure web or > console scripts. Apple got Ruby devs working on their platform (or > maybe vice versa). Why not Ruby WPF or Ruby Silverlight (via Ivan's > IronNails or Jimmy's silverline)? It's not a major jump, but it gives > them easier access to Windows client development. If nothing else, > they may be able to help evangelize the C# and VB.NET > stalwarts and show them a better way. ;) > > > Ryan Riley > > Email: ryan.riley at panesofglass.org > LinkedIn: http://www.linkedin.com/in/ryanriley > Blog: http://wizardsofsmart.net/ > > Website: http://panesofglass.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 From Nathan_Stults at HSIHealth.com Thu Nov 5 15:30:15 2009 From: Nathan_Stults at HSIHealth.com (Nathan Stults) Date: Thu, 5 Nov 2009 12:30:15 -0800 Subject: [Ironruby-core] Replacing StandardInput for ScriptEngine? Message-ID: <790F1F63F5D2E44E91797E821B31FDBB02BC7B4A@hsi-fs.HSIHealth.local> Hello, I am experimenting with script IO in preparation for hosting an IRB session via an embedded SSH server and/or embedded HTTP server, but I'm having trouble getting the script environment to use a custom stream for standard input. I used the following code for setting up my IronRuby environment: public Form1() { InitializeComponent(); _stdIn = new MemoryStream(); _inputWriter = new StreamWriter(_stdIn); txtStandardIn.KeyPress+=(s,e)=> { _inputWriter.Write(e.KeyChar); _inputWriter.Flush(); Debug.Write(e.KeyChar); }; _stdOut = new FifoStream(); _outputReader = new StreamReader(_stdOut); _stdOut.DataArrived += StdOutDataArrived; _scriptEngine = Ruby.CreateEngine(); _globalScope = _scriptEngine.CreateScope(); _scriptEngine.Runtime.IO.SetInput(_stdIn, Encoding.Default); _scriptEngine.Runtime.IO.SetOutput(_stdOut, Encoding.Default); } If I write "hello" + Environment.NewLine to the input stream and flush the writer and then use the ScriptEngine e to execute a "x = gets" - x is always nil. However, if I use the script engine to execute "puts 'hello'" my custom output stream is used and I see my output. I feel like I am missing a key ingredient in my setup process - any help would be appreciated. Thanks, Nathan -------------- next part -------------- An HTML attachment was scrubbed... URL: From Nathan_Stults at HSIHealth.com Thu Nov 5 17:40:16 2009 From: Nathan_Stults at HSIHealth.com (Nathan Stults) Date: Thu, 5 Nov 2009 14:40:16 -0800 Subject: [Ironruby-core] Replacing StandardInput for ScriptEngine? In-Reply-To: <790F1F63F5D2E44E91797E821B31FDBB02BC7B4A@hsi-fs.HSIHealth.local> References: <790F1F63F5D2E44E91797E821B31FDBB02BC7B4A@hsi-fs.HSIHealth.local> Message-ID: <790F1F63F5D2E44E91797E821B31FDBB02BC7B78@hsi-fs.HSIHealth.local> Please disregard. The StandardInput is being set properly and IronRuby is using it. Writing to a MemoryStream (obviously) positions the stream at EOF - the next read will obviously come up empty unless the position is reset. Used a queue-based stream and all worked well. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Nathan Stults Sent: Thursday, November 05, 2009 12:30 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Replacing StandardInput for ScriptEngine? Hello, I am experimenting with script IO in preparation for hosting an IRB session via an embedded SSH server and/or embedded HTTP server, but I'm having trouble getting the script environment to use a custom stream for standard input. I used the following code for setting up my IronRuby environment: public Form1() { InitializeComponent(); _stdIn = new MemoryStream(); _inputWriter = new StreamWriter(_stdIn); txtStandardIn.KeyPress+=(s,e)=> { _inputWriter.Write(e.KeyChar); _inputWriter.Flush(); Debug.Write(e.KeyChar); }; _stdOut = new FifoStream(); _outputReader = new StreamReader(_stdOut); _stdOut.DataArrived += StdOutDataArrived; _scriptEngine = Ruby.CreateEngine(); _globalScope = _scriptEngine.CreateScope(); _scriptEngine.Runtime.IO.SetInput(_stdIn, Encoding.Default); _scriptEngine.Runtime.IO.SetOutput(_stdOut, Encoding.Default); } If I write "hello" + Environment.NewLine to the input stream and flush the writer and then use the ScriptEngine e to execute a "x = gets" - x is always nil. However, if I use the script engine to execute "puts 'hello'" my custom output stream is used and I see my output. I feel like I am missing a key ingredient in my setup process - any help would be appreciated. Thanks, Nathan -------------- next part -------------- An HTML attachment was scrubbed... URL: From ironruby at monnet-usa.com Thu Nov 5 20:38:05 2009 From: ironruby at monnet-usa.com (Philippe Monnet) Date: Thu, 05 Nov 2009 18:38:05 -0700 Subject: [Ironruby-core] How do you convince .Net developers to useIronRuby? In-Reply-To: <6927b8740911042340o164503c1g95239004f013503a@mail.gmail.com> References: <4AF25442.4030702@gmail.com> <790F1F63F5D2E44E91797E821B31FDBB02BC7A3E@hsi-fs.HSIHealth.local> <1B42307CD4AADD438CDDA2FE1121CC9202D2FC@TK5EX14MBXC134.redmond.corp.microsoft.com> <6927b8740911042340o164503c1g95239004f013503a@mail.gmail.com> Message-ID: <4AF37DFD.9000409@monnet-usa.com> An HTML attachment was scrubbed... URL: From dipidi at gmail.com Fri Nov 6 14:16:43 2009 From: dipidi at gmail.com (Dotan N.) Date: Fri, 6 Nov 2009 21:16:43 +0200 Subject: [Ironruby-core] ironruby hosting as scripting engine Message-ID: <6927b8740911061116q35bd061cy34854ff7484d69c6@mail.gmail.com> Hi guys sorry for the lengthy mail but i believe this is interesting since i've found a solution that someone else could use. just had a session of trying to embed IR in my application. I'm defining a user script which contains some initialization code and a special worker function 'execute' this is the "user script": script1.s -------------------------------------------------------- $script.declare "version 1" def execute $script.report "success" end -------------------------------------------------------- what i'm doing is setting "script" as a global variable that is a gateway to my application. I've tried this way first: wrapping script1.s with "class Script end" and doing Engine.Execute on it. I expected to get a RubyObject as a result, which is the Script class. then with the RubyObject i would do ObjectOperations.Invoke("execute"); when ever i wish. I had 2 problems: 1. the RubyObject was always null. any idea why? 2. I couldn't really define a global variable properly (i've used the $a = a trick from the forum) eventually i've realized this solution: 1. set global variable via RubyContext.DefineGlobalVariable 2. i run everything on my script scope and Execute script1.s directly given a ScriptScope 3. do InvokeMember on the ScriptScope itself from googling i've noticed the solution changed a lot along time. so what is the proper way to do it? Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From kevin.radcliffe at gmail.com Fri Nov 6 14:35:44 2009 From: kevin.radcliffe at gmail.com (Kevin Radcliffe) Date: Fri, 6 Nov 2009 12:35:44 -0700 Subject: [Ironruby-core] ironruby hosting as scripting engine In-Reply-To: <6927b8740911061116q35bd061cy34854ff7484d69c6@mail.gmail.com> References: <6927b8740911061116q35bd061cy34854ff7484d69c6@mail.gmail.com> Message-ID: <131af5e0911061135k57a1e02ek30fdb3c658c8f49b@mail.gmail.com> Thanks Dotan. Personally, I have a bit of a hacky solution: I have a wrapper class with 2 functions SetScriptInput and GetScriptOutput. These pass and retrieve 2 scope level variables "callerInput" and "callerOutput" (names are arbitrary) The internal scripts expect and deal with these variables calling them through: self.callerInput and self.callerOutput. It works just fine, but I think I'll give your method a try as well. It looks like there will be less artifacts in the script using it (which would be nice) Best Regards, Kevin On Fri, Nov 6, 2009 at 12:16 PM, Dotan N. wrote: > Hi guys sorry for the lengthy mail but i believe this is interesting since > i've found a solution that someone else could use. > > just had a session of trying to embed IR in my application. > I'm defining a user script which contains some initialization code and a > special worker function 'execute' > > this is the "user script": > > script1.s -------------------------------------------------------- > $script.declare "version 1" > > def execute > ?? $script.report "success" > end > -------------------------------------------------------- > > > what i'm doing is setting "script" as a global variable that is a gateway to > my application. > I've tried this way first: > > wrapping script1.s with "class Script end" > and doing Engine.Execute on it. > > I expected to get a RubyObject as a result, which is the Script class. > > then with the RubyObject i would do ObjectOperations.Invoke("execute"); when > ever i wish. > > I had 2 problems: > > 1. the RubyObject was always null. any idea why? > 2. I couldn't really define a global variable properly (i've used the $a = a > trick from the forum) > > > > eventually i've realized this solution: > 1. set global variable via RubyContext.DefineGlobalVariable > 2.? i run everything on my script scope and Execute script1.s directly given > a ScriptScope > 3. do InvokeMember on the ScriptScope itself > > > from googling i've noticed the solution changed a lot along time. > so what is the proper way to do it? > > > Thanks! > > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > From Jimmy.Schementi at microsoft.com Fri Nov 6 16:16:37 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Fri, 6 Nov 2009 21:16:37 +0000 Subject: [Ironruby-core] ironruby hosting as scripting engine In-Reply-To: <6927b8740911061116q35bd061cy34854ff7484d69c6@mail.gmail.com> References: <6927b8740911061116q35bd061cy34854ff7484d69c6@mail.gmail.com> Message-ID: <1B42307CD4AADD438CDDA2FE1121CC9202F475@TK5EX14MBXC134.redmond.corp.microsoft.com> Your solution sounds fine. To answer you first question though: engine.Execute("class Script; end") will always give you nil; classes return nil when defined: >>> class Foo ... end => nil You'll have to do this to get the actual class object: engine.Execute("class Script; end; Script") ~Jimmy From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Dotan N. Sent: Friday, November 06, 2009 11:17 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] ironruby hosting as scripting engine Hi guys sorry for the lengthy mail but i believe this is interesting since i've found a solution that someone else could use. just had a session of trying to embed IR in my application. I'm defining a user script which contains some initialization code and a special worker function 'execute' this is the "user script": script1.s -------------------------------------------------------- $script.declare "version 1" def execute $script.report "success" end -------------------------------------------------------- what i'm doing is setting "script" as a global variable that is a gateway to my application. I've tried this way first: wrapping script1.s with "class Script end" and doing Engine.Execute on it. I expected to get a RubyObject as a result, which is the Script class. then with the RubyObject i would do ObjectOperations.Invoke("execute"); when ever i wish. I had 2 problems: 1. the RubyObject was always null. any idea why? 2. I couldn't really define a global variable properly (i've used the $a = a trick from the forum) eventually i've realized this solution: 1. set global variable via RubyContext.DefineGlobalVariable 2. i run everything on my script scope and Execute script1.s directly given a ScriptScope 3. do InvokeMember on the ScriptScope itself from googling i've noticed the solution changed a lot along time. so what is the proper way to do it? Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From dipidi at gmail.com Fri Nov 6 16:54:12 2009 From: dipidi at gmail.com (Dotan N.) Date: Fri, 6 Nov 2009 23:54:12 +0200 Subject: [Ironruby-core] ironruby hosting as scripting engine In-Reply-To: <1B42307CD4AADD438CDDA2FE1121CC9202F475@TK5EX14MBXC134.redmond.corp.microsoft.com> References: <6927b8740911061116q35bd061cy34854ff7484d69c6@mail.gmail.com> <1B42307CD4AADD438CDDA2FE1121CC9202F475@TK5EX14MBXC134.redmond.corp.microsoft.com> Message-ID: <6927b8740911061354w28656340v8ec942b90afc2a25@mail.gmail.com> Kevin, Yep i also needed to support input output but it all goes through the "$script" variable back to the backing C# object. for now, it makes it easier to have events and debugging. all in all the end result is that i provide an "API" exposed through $script. Jimmy, Thanks, I clearly overlooked that. On Fri, Nov 6, 2009 at 11:16 PM, Jimmy Schementi < Jimmy.Schementi at microsoft.com> wrote: > Your solution sounds fine. To answer you first question though: > engine.Execute("class Script; end") will always give you nil; classes return > nil when defined: > > > > >>> class Foo > > ... end > > => nil > > > > You?ll have to do this to get the actual class object: > > > > engine.Execute("class Script; end; Script") > > > > ~Jimmy > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Dotan N. > *Sent:* Friday, November 06, 2009 11:17 AM > *To:* ironruby-core at rubyforge.org > *Subject:* [Ironruby-core] ironruby hosting as scripting engine > > > > Hi guys sorry for the lengthy mail but i believe this is interesting since > i've found a solution that someone else could use. > > just had a session of trying to embed IR in my application. > I'm defining a user script which contains some initialization code and a > special worker function 'execute' > > this is the "user script": > > script1.s -------------------------------------------------------- > $script.declare "version 1" > > def execute > $script.report "success" > end > -------------------------------------------------------- > > > what i'm doing is setting "script" as a global variable that is a gateway > to my application. > I've tried this way first: > > wrapping script1.s with "class Script end" > and doing Engine.Execute on it. > > I expected to get a RubyObject as a result, which is the Script class. > > then with the RubyObject i would do ObjectOperations.Invoke("execute"); > when ever i wish. > > I had 2 problems: > > 1. the RubyObject was always null. any idea why? > 2. I couldn't really define a global variable properly (i've used the $a = > a trick from the forum) > > > > eventually i've realized this solution: > 1. set global variable via RubyContext.DefineGlobalVariable > 2. i run everything on my script scope and Execute script1.s directly > given a ScriptScope > 3. do InvokeMember on the ScriptScope itself > > > from googling i've noticed the solution changed a lot along time. > so what is the proper way to do it? > > > 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: From Tomas.Matousek at microsoft.com Fri Nov 6 19:09:04 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Sat, 7 Nov 2009 00:09:04 +0000 Subject: [Ironruby-core] ironruby hosting as scripting engine In-Reply-To: <6927b8740911061354w28656340v8ec942b90afc2a25@mail.gmail.com> References: <6927b8740911061116q35bd061cy34854ff7484d69c6@mail.gmail.com> <1B42307CD4AADD438CDDA2FE1121CC9202F475@TK5EX14MBXC134.redmond.corp.microsoft.com> <6927b8740911061354w28656340v8ec942b90afc2a25@mail.gmail.com> Message-ID: <4B342496A3EFEB48839E10BB4BF5964C171D9006@TK5EX14MBXC129.redmond.corp.microsoft.com> A better way of exposing application objects to the scripts and vice versa is to use ScriptScope: var engine = IronRuby.CreateEngine(); var scope = engine.CreateScope(); scope.SetVariable("my_app_object", new App()); engine.Execute(@" my_app_object.declare 'version 1' def do_stuff 'success' end ", scope); var execute = scope.GetVariable>("do_stuff"); Console.WriteLine(execute()); Top level Ruby methods defined in the executed script are published to the scope so that the host can read it via GetVariable method. Also, Ruby methods are convertible to delegates, so you can get the variable as Func and call the delegate later. Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Dotan N. Sent: Friday, November 06, 2009 1:54 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] ironruby hosting as scripting engine Kevin, Yep i also needed to support input output but it all goes through the "$script" variable back to the backing C# object. for now, it makes it easier to have events and debugging. all in all the end result is that i provide an "API" exposed through $script. Jimmy, Thanks, I clearly overlooked that. On Fri, Nov 6, 2009 at 11:16 PM, Jimmy Schementi > wrote: Your solution sounds fine. To answer you first question though: engine.Execute("class Script; end") will always give you nil; classes return nil when defined: >>> class Foo ... end => nil You'll have to do this to get the actual class object: engine.Execute("class Script; end; Script") ~Jimmy From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Dotan N. Sent: Friday, November 06, 2009 11:17 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] ironruby hosting as scripting engine Hi guys sorry for the lengthy mail but i believe this is interesting since i've found a solution that someone else could use. just had a session of trying to embed IR in my application. I'm defining a user script which contains some initialization code and a special worker function 'execute' this is the "user script": script1.s -------------------------------------------------------- $script.declare "version 1" def execute $script.report "success" end -------------------------------------------------------- what i'm doing is setting "script" as a global variable that is a gateway to my application. I've tried this way first: wrapping script1.s with "class Script end" and doing Engine.Execute on it. I expected to get a RubyObject as a result, which is the Script class. then with the RubyObject i would do ObjectOperations.Invoke("execute"); when ever i wish. I had 2 problems: 1. the RubyObject was always null. any idea why? 2. I couldn't really define a global variable properly (i've used the $a = a trick from the forum) eventually i've realized this solution: 1. set global variable via RubyContext.DefineGlobalVariable 2. i run everything on my script scope and Execute script1.s directly given a ScriptScope 3. do InvokeMember on the ScriptScope itself from googling i've noticed the solution changed a lot along time. so what is the proper way to do it? 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: From Jimmy.Schementi at microsoft.com Fri Nov 6 19:48:04 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Sat, 7 Nov 2009 00:48:04 +0000 Subject: [Ironruby-core] ironruby hosting as scripting engine In-Reply-To: <4B342496A3EFEB48839E10BB4BF5964C171D9006@TK5EX14MBXC129.redmond.corp.microsoft.com> References: <6927b8740911061116q35bd061cy34854ff7484d69c6@mail.gmail.com> <1B42307CD4AADD438CDDA2FE1121CC9202F475@TK5EX14MBXC134.redmond.corp.microsoft.com> <6927b8740911061354w28656340v8ec942b90afc2a25@mail.gmail.com> <4B342496A3EFEB48839E10BB4BF5964C171D9006@TK5EX14MBXC129.redmond.corp.microsoft.com> Message-ID: <1B42307CD4AADD438CDDA2FE1121CC9202F86B@TK5EX14MBXC134.redmond.corp.microsoft.com> Tomas, Will "my_app_object" be accessible in the do_stuff method? I think not, since our scope variables are just local ruby variables, right? What he'd really want is to define a method called "my_app_object" on the Script class, so then his ".s" files can use "my_app_object" anywhere, like: engine Execute(@"class Script def my_app_object # do whatever you need to get the app object end end") But I still don't like wrapping the user script in a class like that. The preferred way would be to create an instance of script and call instance_eval with the contents of the script1.s file: ~js From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek Sent: Friday, November 06, 2009 4:09 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] ironruby hosting as scripting engine A better way of exposing application objects to the scripts and vice versa is to use ScriptScope: var engine = IronRuby.CreateEngine(); var scope = engine.CreateScope(); scope.SetVariable("my_app_object", new App()); engine.Execute(@" my_app_object.declare 'version 1' def do_stuff 'success' end ", scope); var execute = scope.GetVariable>("do_stuff"); Console.WriteLine(execute()); Top level Ruby methods defined in the executed script are published to the scope so that the host can read it via GetVariable method. Also, Ruby methods are convertible to delegates, so you can get the variable as Func and call the delegate later. Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Dotan N. Sent: Friday, November 06, 2009 1:54 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] ironruby hosting as scripting engine Kevin, Yep i also needed to support input output but it all goes through the "$script" variable back to the backing C# object. for now, it makes it easier to have events and debugging. all in all the end result is that i provide an "API" exposed through $script. Jimmy, Thanks, I clearly overlooked that. On Fri, Nov 6, 2009 at 11:16 PM, Jimmy Schementi > wrote: Your solution sounds fine. To answer you first question though: engine.Execute("class Script; end") will always give you nil; classes return nil when defined: >>> class Foo ... end => nil You'll have to do this to get the actual class object: engine.Execute("class Script; end; Script") ~Jimmy From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Dotan N. Sent: Friday, November 06, 2009 11:17 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] ironruby hosting as scripting engine Hi guys sorry for the lengthy mail but i believe this is interesting since i've found a solution that someone else could use. just had a session of trying to embed IR in my application. I'm defining a user script which contains some initialization code and a special worker function 'execute' this is the "user script": script1.s -------------------------------------------------------- $script.declare "version 1" def execute $script.report "success" end -------------------------------------------------------- what i'm doing is setting "script" as a global variable that is a gateway to my application. I've tried this way first: wrapping script1.s with "class Script end" and doing Engine.Execute on it. I expected to get a RubyObject as a result, which is the Script class. then with the RubyObject i would do ObjectOperations.Invoke("execute"); when ever i wish. I had 2 problems: 1. the RubyObject was always null. any idea why? 2. I couldn't really define a global variable properly (i've used the $a = a trick from the forum) eventually i've realized this solution: 1. set global variable via RubyContext.DefineGlobalVariable 2. i run everything on my script scope and Execute script1.s directly given a ScriptScope 3. do InvokeMember on the ScriptScope itself from googling i've noticed the solution changed a lot along time. so what is the proper way to do it? 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: From Tomas.Matousek at microsoft.com Fri Nov 6 22:53:23 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Sat, 7 Nov 2009 03:53:23 +0000 Subject: [Ironruby-core] ironruby hosting as scripting engine In-Reply-To: <1B42307CD4AADD438CDDA2FE1121CC9202F86B@TK5EX14MBXC134.redmond.corp.microsoft.com> References: <6927b8740911061116q35bd061cy34854ff7484d69c6@mail.gmail.com> <1B42307CD4AADD438CDDA2FE1121CC9202F475@TK5EX14MBXC134.redmond.corp.microsoft.com> <6927b8740911061354w28656340v8ec942b90afc2a25@mail.gmail.com> <4B342496A3EFEB48839E10BB4BF5964C171D9006@TK5EX14MBXC129.redmond.corp.microsoft.com> <1B42307CD4AADD438CDDA2FE1121CC9202F86B@TK5EX14MBXC134.redmond.corp.microsoft.com> Message-ID: <4B342496A3EFEB48839E10BB4BF5964C171D90ED@TK5EX14MBXC129.redmond.corp.microsoft.com> It actually works. Any method call on top-level "self" object will fall back to the scope (we inject method_missing to the top-level object if the code is executed from hosting code). It is implemented like instance_eval against the scope. Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jimmy Schementi Sent: Friday, November 06, 2009 4:48 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] ironruby hosting as scripting engine Tomas, Will "my_app_object" be accessible in the do_stuff method? I think not, since our scope variables are just local ruby variables, right? What he'd really want is to define a method called "my_app_object" on the Script class, so then his ".s" files can use "my_app_object" anywhere, like: engine Execute(@"class Script def my_app_object # do whatever you need to get the app object end end") But I still don't like wrapping the user script in a class like that. The preferred way would be to create an instance of script and call instance_eval with the contents of the script1.s file: ~js From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek Sent: Friday, November 06, 2009 4:09 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] ironruby hosting as scripting engine A better way of exposing application objects to the scripts and vice versa is to use ScriptScope: var engine = IronRuby.CreateEngine(); var scope = engine.CreateScope(); scope.SetVariable("my_app_object", new App()); engine.Execute(@" my_app_object.declare 'version 1' def do_stuff 'success' end ", scope); var execute = scope.GetVariable>("do_stuff"); Console.WriteLine(execute()); Top level Ruby methods defined in the executed script are published to the scope so that the host can read it via GetVariable method. Also, Ruby methods are convertible to delegates, so you can get the variable as Func and call the delegate later. Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Dotan N. Sent: Friday, November 06, 2009 1:54 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] ironruby hosting as scripting engine Kevin, Yep i also needed to support input output but it all goes through the "$script" variable back to the backing C# object. for now, it makes it easier to have events and debugging. all in all the end result is that i provide an "API" exposed through $script. Jimmy, Thanks, I clearly overlooked that. On Fri, Nov 6, 2009 at 11:16 PM, Jimmy Schementi > wrote: Your solution sounds fine. To answer you first question though: engine.Execute("class Script; end") will always give you nil; classes return nil when defined: >>> class Foo ... end => nil You'll have to do this to get the actual class object: engine.Execute("class Script; end; Script") ~Jimmy From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Dotan N. Sent: Friday, November 06, 2009 11:17 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] ironruby hosting as scripting engine Hi guys sorry for the lengthy mail but i believe this is interesting since i've found a solution that someone else could use. just had a session of trying to embed IR in my application. I'm defining a user script which contains some initialization code and a special worker function 'execute' this is the "user script": script1.s -------------------------------------------------------- $script.declare "version 1" def execute $script.report "success" end -------------------------------------------------------- what i'm doing is setting "script" as a global variable that is a gateway to my application. I've tried this way first: wrapping script1.s with "class Script end" and doing Engine.Execute on it. I expected to get a RubyObject as a result, which is the Script class. then with the RubyObject i would do ObjectOperations.Invoke("execute"); when ever i wish. I had 2 problems: 1. the RubyObject was always null. any idea why? 2. I couldn't really define a global variable properly (i've used the $a = a trick from the forum) eventually i've realized this solution: 1. set global variable via RubyContext.DefineGlobalVariable 2. i run everything on my script scope and Execute script1.s directly given a ScriptScope 3. do InvokeMember on the ScriptScope itself from googling i've noticed the solution changed a lot along time. so what is the proper way to do it? 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: From Tomas.Matousek at microsoft.com Fri Nov 6 22:59:14 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Sat, 7 Nov 2009 03:59:14 +0000 Subject: [Ironruby-core] ironruby hosting as scripting engine In-Reply-To: <4B342496A3EFEB48839E10BB4BF5964C171D90ED@TK5EX14MBXC129.redmond.corp.microsoft.com> References: <6927b8740911061116q35bd061cy34854ff7484d69c6@mail.gmail.com> <1B42307CD4AADD438CDDA2FE1121CC9202F475@TK5EX14MBXC134.redmond.corp.microsoft.com> <6927b8740911061354w28656340v8ec942b90afc2a25@mail.gmail.com> <4B342496A3EFEB48839E10BB4BF5964C171D9006@TK5EX14MBXC129.redmond.corp.microsoft.com> <1B42307CD4AADD438CDDA2FE1121CC9202F86B@TK5EX14MBXC134.redmond.corp.microsoft.com> <4B342496A3EFEB48839E10BB4BF5964C171D90ED@TK5EX14MBXC129.redmond.corp.microsoft.com> Message-ID: <4B342496A3EFEB48839E10BB4BF5964C171D9110@TK5EX14MBXC129.redmond.corp.microsoft.com> Just to be clear, this works: public class App { public string Name = "hello"; } var engine = IronRuby.CreateEngine(); var scope = engine.CreateScope(); scope.SetVariable("my_app_object", new App()); engine.Execute(@" def do_stuff my_app_object.name end ", scope); var execute = scope.GetVariable>("do_stuff"); Console.WriteLine(execute()); Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek Sent: Friday, November 06, 2009 7:53 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] ironruby hosting as scripting engine It actually works. Any method call on top-level "self" object will fall back to the scope (we inject method_missing to the top-level object if the code is executed from hosting code). It is implemented like instance_eval against the scope. Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jimmy Schementi Sent: Friday, November 06, 2009 4:48 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] ironruby hosting as scripting engine Tomas, Will "my_app_object" be accessible in the do_stuff method? I think not, since our scope variables are just local ruby variables, right? What he'd really want is to define a method called "my_app_object" on the Script class, so then his ".s" files can use "my_app_object" anywhere, like: engine Execute(@"class Script def my_app_object # do whatever you need to get the app object end end") But I still don't like wrapping the user script in a class like that. The preferred way would be to create an instance of script and call instance_eval with the contents of the script1.s file: ~js From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek Sent: Friday, November 06, 2009 4:09 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] ironruby hosting as scripting engine A better way of exposing application objects to the scripts and vice versa is to use ScriptScope: var engine = IronRuby.CreateEngine(); var scope = engine.CreateScope(); scope.SetVariable("my_app_object", new App()); engine.Execute(@" my_app_object.declare 'version 1' def do_stuff 'success' end ", scope); var execute = scope.GetVariable>("do_stuff"); Console.WriteLine(execute()); Top level Ruby methods defined in the executed script are published to the scope so that the host can read it via GetVariable method. Also, Ruby methods are convertible to delegates, so you can get the variable as Func and call the delegate later. Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Dotan N. Sent: Friday, November 06, 2009 1:54 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] ironruby hosting as scripting engine Kevin, Yep i also needed to support input output but it all goes through the "$script" variable back to the backing C# object. for now, it makes it easier to have events and debugging. all in all the end result is that i provide an "API" exposed through $script. Jimmy, Thanks, I clearly overlooked that. On Fri, Nov 6, 2009 at 11:16 PM, Jimmy Schementi > wrote: Your solution sounds fine. To answer you first question though: engine.Execute("class Script; end") will always give you nil; classes return nil when defined: >>> class Foo ... end => nil You'll have to do this to get the actual class object: engine.Execute("class Script; end; Script") ~Jimmy From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Dotan N. Sent: Friday, November 06, 2009 11:17 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] ironruby hosting as scripting engine Hi guys sorry for the lengthy mail but i believe this is interesting since i've found a solution that someone else could use. just had a session of trying to embed IR in my application. I'm defining a user script which contains some initialization code and a special worker function 'execute' this is the "user script": script1.s -------------------------------------------------------- $script.declare "version 1" def execute $script.report "success" end -------------------------------------------------------- what i'm doing is setting "script" as a global variable that is a gateway to my application. I've tried this way first: wrapping script1.s with "class Script end" and doing Engine.Execute on it. I expected to get a RubyObject as a result, which is the Script class. then with the RubyObject i would do ObjectOperations.Invoke("execute"); when ever i wish. I had 2 problems: 1. the RubyObject was always null. any idea why? 2. I couldn't really define a global variable properly (i've used the $a = a trick from the forum) eventually i've realized this solution: 1. set global variable via RubyContext.DefineGlobalVariable 2. i run everything on my script scope and Execute script1.s directly given a ScriptScope 3. do InvokeMember on the ScriptScope itself from googling i've noticed the solution changed a lot along time. so what is the proper way to do it? 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: From Nathan_Stults at HSIHealth.com Fri Nov 6 23:49:45 2009 From: Nathan_Stults at HSIHealth.com (Nathan Stults) Date: Fri, 6 Nov 2009 20:49:45 -0800 Subject: [Ironruby-core] Hosting a REPL outside the command line Message-ID: <790F1F63F5D2E44E91797E821B31FDBB02BC7D0C@hsi-fs.HSIHealth.local> I don't suppose anyone has successfully run IRB outside of the console? I'm giving up at this point, as I get the feeling there is something special about running inside cmd.exe (on windows) that IRB really needs to feel whole - but I thought I'd throw out a net in case someone has been successful in this, or feels strongly it should be possible J Is there a standard or recommended approach to hosting a REPL outside of the context of the command line? I want to a. embed a REPL in my applications (which are windows forms) and b. provide remote access to a REPL via HTTP and SSH. Hosting IRB and taking over Standard In and Standard Out seemed ideal, but isn't working out. An anyway, at the end of the day an IRB solution would be bound to IronRuby, and it would be nice to allow any DLR language. I'm feeling like this may be a common need, and has probably been adequately solved by now, so I guess I'm just fishing for patterns. Thanks in advance, Nathan -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tomas.Matousek at microsoft.com Sat Nov 7 01:33:22 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Sat, 7 Nov 2009 06:33:22 +0000 Subject: [Ironruby-core] Hosting a REPL outside the command line In-Reply-To: <790F1F63F5D2E44E91797E821B31FDBB02BC7D0C@hsi-fs.HSIHealth.local> References: <790F1F63F5D2E44E91797E821B31FDBB02BC7D0C@hsi-fs.HSIHealth.local> Message-ID: <4B342496A3EFEB48839E10BB4BF5964C171D91D7@TK5EX14MBXC129.redmond.corp.microsoft.com> Do you specifically need IRB or would you rather build your custom REPL? The latter is pretty easy: http://blog.tomasm.net/2009/04/15/python-says-hello-to-ruby/ Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Nathan Stults Sent: Friday, November 06, 2009 8:50 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Hosting a REPL outside the command line I don't suppose anyone has successfully run IRB outside of the console? I'm giving up at this point, as I get the feeling there is something special about running inside cmd.exe (on windows) that IRB really needs to feel whole - but I thought I'd throw out a net in case someone has been successful in this, or feels strongly it should be possible :) Is there a standard or recommended approach to hosting a REPL outside of the context of the command line? I want to a. embed a REPL in my applications (which are windows forms) and b. provide remote access to a REPL via HTTP and SSH. Hosting IRB and taking over Standard In and Standard Out seemed ideal, but isn't working out. An anyway, at the end of the day an IRB solution would be bound to IronRuby, and it would be nice to allow any DLR language. I'm feeling like this may be a common need, and has probably been adequately solved by now, so I guess I'm just fishing for patterns. Thanks in advance, Nathan -------------- next part -------------- An HTML attachment was scrubbed... URL: From Nathan_Stults at HSIHealth.com Sat Nov 7 01:41:06 2009 From: Nathan_Stults at HSIHealth.com (Nathan Stults) Date: Fri, 6 Nov 2009 22:41:06 -0800 Subject: [Ironruby-core] Hosting a REPL outside the command line In-Reply-To: <4B342496A3EFEB48839E10BB4BF5964C171D91D7@TK5EX14MBXC129.redmond.corp.microsoft.com> References: <790F1F63F5D2E44E91797E821B31FDBB02BC7D0C@hsi-fs.HSIHealth.local> <4B342496A3EFEB48839E10BB4BF5964C171D91D7@TK5EX14MBXC129.redmond.corp.microsoft.com> Message-ID: <790F1F63F5D2E44E91797E821B31FDBB02BC7D0E@hsi-fs.HSIHealth.local> I don't need IRB - a custom REPL will do - I'll check your link, thanks. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek Sent: Friday, November 06, 2009 10:33 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Hosting a REPL outside the command line Do you specifically need IRB or would you rather build your custom REPL? The latter is pretty easy: http://blog.tomasm.net/2009/04/15/python-says-hello-to-ruby/ Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Nathan Stults Sent: Friday, November 06, 2009 8:50 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Hosting a REPL outside the command line I don't suppose anyone has successfully run IRB outside of the console? I'm giving up at this point, as I get the feeling there is something special about running inside cmd.exe (on windows) that IRB really needs to feel whole - but I thought I'd throw out a net in case someone has been successful in this, or feels strongly it should be possible J Is there a standard or recommended approach to hosting a REPL outside of the context of the command line? I want to a. embed a REPL in my applications (which are windows forms) and b. provide remote access to a REPL via HTTP and SSH. Hosting IRB and taking over Standard In and Standard Out seemed ideal, but isn't working out. An anyway, at the end of the day an IRB solution would be bound to IronRuby, and it would be nice to allow any DLR language. I'm feeling like this may be a common need, and has probably been adequately solved by now, so I guess I'm just fishing for patterns. Thanks in advance, Nathan -------------- next part -------------- An HTML attachment was scrubbed... URL: From orion.edwards at gmail.com Sun Nov 8 21:27:32 2009 From: orion.edwards at gmail.com (Orion Edwards) Date: Mon, 9 Nov 2009 15:27:32 +1300 Subject: [Ironruby-core] IronRuby 0.9.2 bug - super(.S, 1*&):433 @1 not supported on foreign meta-objects Message-ID: <7c1b59c00911081827v794e4910n503b94d034a4e55@mail.gmail.com> I have the following code, which used to work under IronRuby 0.9.1 and earlier class Object def method_missing(sym, *args, &block) if sym.to_s =~ /blah regex/ # do stuff else super # call through to underlying ruby method_missing end end end Under 0.9.1 this worked across the board, and under 0.9.2 it works for most objects, but suddenly for COM objects it's throwing an exception on the call to 'super' Repro code: load_assembly "microsoft.office.interop.word" word = Microsoft.Office.Interop.Word.ApplicationClass.new word.fdsfgdsf System::NotSupportedException: super(.S,1*&):482 @1 not supported on foreign meta-objects from (irb):12:in `method_missing' from (irb):16 from C:/Dev/TEST/ruby/lib/ruby/1.8/irb.rb:150:in `eval_input' from :0:in `eval' from C:/Dev/TEST/ruby/lib/ruby/1.8/irb.rb:263:in `signal_status' from C:/Dev/TEST/ruby/lib/ruby/1.8/irb.rb:147:in `eval_input' from C:/Dev/TEST/ruby/lib/ruby/1.8/irb.rb:146:in `eval_input' from C:/Dev/TEST/ruby/lib/ruby/1.8/irb.rb:70:in `start' from C:/Dev/TEST/ruby/lib/ruby/1.8/irb.rb:69:in `start' from C:/Dev/TEST/ruby/bin/iirb:13 from :0:in `loop' from :0:in `catch' from :0:in `catch' I'd be more than happy to work around it by not calling super if the object is a "foreign meta-object", but how can I tell that? Cheers, Orion -------------- next part -------------- An HTML attachment was scrubbed... URL: From orion.edwards at gmail.com Sun Nov 8 21:42:54 2009 From: orion.edwards at gmail.com (Orion Edwards) Date: Mon, 9 Nov 2009 15:42:54 +1300 Subject: [Ironruby-core] IronRuby 0.9.2 bug - Can't define a singleton method on a COM object instance Message-ID: <7c1b59c00911081842u1ae9dcb0u6d96aecd06f784ce@mail.gmail.com> This code used to work under IronRuby 0.9.1 and earlier load_assembly "microsoft.office.word.interop" word = Microsoft::Office::Interop::Word::ApplicationClass.new metaclass = class << word; self; end metaclass.send :define_method, "fizz" do |*args| puts "hello" end #BANG! Under 0.9.2, this happens NoMethodError: private method `singleton_method_added' called for Microsoft.Office.Interop.Word.ApplicationClass:Microsoft::Office::Interop::Word::ApplicationClass from (irb):52 from :0:in `define_method' from :0:in `define_method' from :0:in `send' from C:/Dev/TEST/ruby/lib/ruby/1.8/irb.rb:146:in `eval_input' from C:/Dev/TEST/ruby/lib/ruby/1.8/irb.rb:70:in `start' from C:/Dev/TEST/ruby/lib/ruby/1.8/irb.rb:69:in `start' from :0:in `eval' from workspace.rb:80:in `evaluate' from context.rb:217:in `evaluate' from irb.rb:147:in `eval_input' from irb.rb:257:in `signal_status' from irb.rb:146:in `eval_input' from ruby-lex.rb:230:in `each_top_level_statement' from :0:in `loop' from C:/Dev/TEST/ruby/bin/iirb:13 from :0:in `catch' from :0:i While the previous bug (calling super from method_missing on a COM object) was easy to work around and isn't that important in the scheme of things, this one is a real blocker :-( Might have to roll back to 0.9.1 :-( -------------- next part -------------- An HTML attachment was scrubbed... URL: From CDurfee at tsys.com Mon Nov 9 10:35:11 2009 From: CDurfee at tsys.com (CDurfee at tsys.com) Date: Mon, 9 Nov 2009 08:35:11 -0700 Subject: [Ironruby-core] ironruby hosting as scripting engine In-Reply-To: <4B342496A3EFEB48839E10BB4BF5964C171D9006@TK5EX14MBXC129.redmond.corp.microsoft.com> Message-ID: This is essentially how we implemented our rules script engine. It works really well. -- Chuck Durfee Lead Software Architect, CentreSuite TSYS iSolutions, Golden Email cdurfee at tsys.com Tomas Matousek Sent by: ironruby-core-bounces at rubyforge.org 11/06/2009 05:10 PM Please respond to ironruby-core at rubyforge.org To "ironruby-core at rubyforge.org" cc Subject Re: [Ironruby-core] ironruby hosting as scripting engine A better way of exposing application objects to the scripts and vice versa is to use ScriptScope: var engine = IronRuby.CreateEngine(); var scope = engine.CreateScope(); scope.SetVariable(?my_app_object?, new App()); engine.Execute(@? my_app_object.declare 'version 1' def do_stuff 'success' end ?, scope); var execute = scope.GetVariable>(?do_stuff?); Console.WriteLine(execute()); Top level Ruby methods defined in the executed script are published to the scope so that the host can read it via GetVariable method. Also, Ruby methods are convertible to delegates, so you can get the variable as Func and call the delegate later. Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Dotan N. Sent: Friday, November 06, 2009 1:54 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] ironruby hosting as scripting engine Kevin, Yep i also needed to support input output but it all goes through the "$script" variable back to the backing C# object. for now, it makes it easier to have events and debugging. all in all the end result is that i provide an "API" exposed through $script. Jimmy, Thanks, I clearly overlooked that. On Fri, Nov 6, 2009 at 11:16 PM, Jimmy Schementi < Jimmy.Schementi at microsoft.com> wrote: Your solution sounds fine. To answer you first question though: engine.Execute("class Script; end") will always give you nil; classes return nil when defined: >>> class Foo ... end => nil You?ll have to do this to get the actual class object: engine.Execute("class Script; end; Script") ~Jimmy From: ironruby-core-bounces at rubyforge.org [mailto: ironruby-core-bounces at rubyforge.org] On Behalf Of Dotan N. Sent: Friday, November 06, 2009 11:17 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] ironruby hosting as scripting engine Hi guys sorry for the lengthy mail but i believe this is interesting since i've found a solution that someone else could use. just had a session of trying to embed IR in my application. I'm defining a user script which contains some initialization code and a special worker function 'execute' this is the "user script": script1.s -------------------------------------------------------- $script.declare "version 1" def execute $script.report "success" end -------------------------------------------------------- what i'm doing is setting "script" as a global variable that is a gateway to my application. I've tried this way first: wrapping script1.s with "class Script end" and doing Engine.Execute on it. I expected to get a RubyObject as a result, which is the Script class. then with the RubyObject i would do ObjectOperations.Invoke("execute"); when ever i wish. I had 2 problems: 1. the RubyObject was always null. any idea why? 2. I couldn't really define a global variable properly (i've used the $a = a trick from the forum) eventually i've realized this solution: 1. set global variable via RubyContext.DefineGlobalVariable 2. i run everything on my script scope and Execute script1.s directly given a ScriptScope 3. do InvokeMember on the ScriptScope itself from googling i've noticed the solution changed a lot along time. so what is the proper way to do it? Thanks! _______________________________________________ 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 ----------------------------------------- The information contained in this communication (including any attachments hereto) is confidential and is intended solely for the personal and confidential use of the individual or entity to whom it is addressed. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this communication in error and that any review, dissemination, copying, or unauthorized use of this information, or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. Thank you -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tomas.Matousek at microsoft.com Mon Nov 9 16:19:02 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Mon, 9 Nov 2009 21:19:02 +0000 Subject: [Ironruby-core] Code Review: InstructionRefactoring Message-ID: <4B342496A3EFEB48839E10BB4BF5964C171D9CAE@TK5EX14MBXC129.redmond.corp.microsoft.com> tfpt review "/shelveset:InstructionRefactoring;REDMOND\tomat" DLR, Python Ruby: Makes all instruction classes internal except for the base Instruction class. Adds InstructionList class that represents incomplete instruction stream and provides Emit* instructions (like ILGenerator). The class is converted to InstructionArray when finished. Both implement a debug view so that it is easy to see what instructions are being emitted/interpreted. Implements cache for LoadObject instruction - instead of allocating a new instruction per object constant we store the constants into an array and have specialized pre-generated instructions to load them. Adds caching of branch instructions. Adds debug cookies to instruction list in DEBUG builds - each instruction can be associates with one or more debug cookies. LocalAccess instructions use this to store the variable names. The cookies are used in debug view. Groups related instructions into separate files. Implements AddInstuction for all primitive arithmetic types. Adds -X:CompilationThreshold option that sets the number of iterations before we start compiling code. Obsoletes InterpretedMode, NoAdaptiveCompilation and PerfStats properties on LanguageSetup. The options can still be set via dictionary. Reduces the number of instruction instances that are executed at least once during the run of "mspec ci core" from 1,274,454 to 280,684. Tomas -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: InstructionRefactoring.diff Type: application/octet-stream Size: 37516 bytes Desc: InstructionRefactoring.diff URL: From martin.smith.jr at gmail.com Tue Nov 10 19:39:32 2009 From: martin.smith.jr at gmail.com (Martin Smith) Date: Tue, 10 Nov 2009 16:39:32 -0800 Subject: [Ironruby-core] Disable compilation of scripts Message-ID: <21192f970911101639k678a5d35xe7829752db4d3fe8@mail.gmail.com> Hello, A while back I watched Jimmy on C9 talking about how IronRuby had a hybrid approach to execution only jitting after a code path had been run a couple times. Is there any way to control this. I'd like to experiment with either (1) turning off compilation and (2) forcing immediate compilation. The scenario is that there are times when i might be able to get away with the "compilation penalty" and I'd like to play around with doing just that. Is there anywhere I can find information on how to do this with the DLR? Thanks, Martin From martin.smith.jr at gmail.com Tue Nov 10 19:48:20 2009 From: martin.smith.jr at gmail.com (Martin Smith) Date: Tue, 10 Nov 2009 16:48:20 -0800 Subject: [Ironruby-core] IronRuby and Me Message-ID: <21192f970911101648x22b5756cx7c48e7ef5c73496a@mail.gmail.com> Hello again (sorry for the double post), We've noticed some slightly odd behavior. IronRuby, it seems, won't mangle methods that have the word "Me" in them, so if I have a method: UncheckMeAndMyChildren, uncheck_me_and_my_children won't work but for: UncheckSelfAndMyChildren, uncheck_self_and_my_children DOES work. Is this a bug or the expected behavior? Thanks, Martin From Tomas.Matousek at microsoft.com Tue Nov 10 20:14:11 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Wed, 11 Nov 2009 01:14:11 +0000 Subject: [Ironruby-core] Disable compilation of scripts In-Reply-To: <21192f970911101639k678a5d35xe7829752db4d3fe8@mail.gmail.com> References: <21192f970911101639k678a5d35xe7829752db4d3fe8@mail.gmail.com> Message-ID: <4B342496A3EFEB48839E10BB4BF5964C171DA57A@TK5EX14MBXC129.redmond.corp.microsoft.com> There is. You can set "NoAdaptiveCompilation" options on language setup when creating ScriptRuntime. Command line option is -X:NoAdaptiveCompilation. We'll also add "CompilationThreshold" option soon, which specifies the number of iterations before we start compiling. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Martin Smith Sent: Tuesday, November 10, 2009 4:40 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Disable compilation of scripts Hello, A while back I watched Jimmy on C9 talking about how IronRuby had a hybrid approach to execution only jitting after a code path had been run a couple times. Is there any way to control this. I'd like to experiment with either (1) turning off compilation and (2) forcing immediate compilation. The scenario is that there are times when i might be able to get away with the "compilation penalty" and I'd like to play around with doing just that. Is there anywhere I can find information on how to do this with the DLR? Thanks, Martin _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From Tomas.Matousek at microsoft.com Tue Nov 10 20:16:52 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Wed, 11 Nov 2009 01:16:52 +0000 Subject: [Ironruby-core] IronRuby and Me In-Reply-To: <21192f970911101648x22b5756cx7c48e7ef5c73496a@mail.gmail.com> References: <21192f970911101648x22b5756cx7c48e7ef5c73496a@mail.gmail.com> Message-ID: <4B342496A3EFEB48839E10BB4BF5964C171DA58D@TK5EX14MBXC129.redmond.corp.microsoft.com> Looks like a bug. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Martin Smith Sent: Tuesday, November 10, 2009 4:48 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] IronRuby and Me Hello again (sorry for the double post), We've noticed some slightly odd behavior. IronRuby, it seems, won't mangle methods that have the word "Me" in them, so if I have a method: UncheckMeAndMyChildren, uncheck_me_and_my_children won't work but for: UncheckSelfAndMyChildren, uncheck_self_and_my_children DOES work. Is this a bug or the expected behavior? Thanks, Martin _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jimmy.Schementi at microsoft.com Tue Nov 10 20:45:02 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Wed, 11 Nov 2009 01:45:02 +0000 Subject: [Ironruby-core] IronRuby and Me In-Reply-To: <21192f970911101648x22b5756cx7c48e7ef5c73496a@mail.gmail.com> References: <21192f970911101648x22b5756cx7c48e7ef5c73496a@mail.gmail.com> Message-ID: <1B42307CD4AADD438CDDA2FE1121CC92035E24@TK5EX14MBXC134.redmond.corp.microsoft.com> Martin, Expected, but also a bug. IronRuby will not provide a mangled name if the method name contains a 2-letter-word that is not in this list: as by do id it if in is go my of ok on to up This list is pretty arbitrary ... so "me" can probably be added to it. FYI, the code is in Merlin\Main\Languages\Ruby\Ruby\Runtime\RubyUtils.cs#TryMangleName (approx. line 298). ~Jimmy > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Martin Smith > Sent: Tuesday, November 10, 2009 4:48 PM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] IronRuby and Me > > Hello again (sorry for the double post), > > We've noticed some slightly odd behavior. IronRuby, it seems, won't mangle > methods that have the word "Me" in them, so if I have a method: > > UncheckMeAndMyChildren, uncheck_me_and_my_children won't work > > but for: > > UncheckSelfAndMyChildren, uncheck_self_and_my_children DOES work. > > Is this a bug or the expected behavior? > > Thanks, > Martin > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From martin.smith.jr at gmail.com Tue Nov 10 21:35:50 2009 From: martin.smith.jr at gmail.com (Martin Smith) Date: Tue, 10 Nov 2009 18:35:50 -0800 Subject: [Ironruby-core] IronRuby and Me In-Reply-To: <1B42307CD4AADD438CDDA2FE1121CC92035E24@TK5EX14MBXC134.redmond.corp.microsoft.com> References: <21192f970911101648x22b5756cx7c48e7ef5c73496a@mail.gmail.com> <1B42307CD4AADD438CDDA2FE1121CC92035E24@TK5EX14MBXC134.redmond.corp.microsoft.com> Message-ID: <21192f970911101835pe5c7235y45ea496698beb09b@mail.gmail.com> Thanks guys. Appreciate the (detailed) response. Actually, this explains quite a bit. I've run into times sporadically where i'd be using the mangled name and it wouldn't be recognized and had no ready explanation for it. Is there a specific reason that two letter words arent mangled? (I was looking in the comments of RubyUtils.cs but didn't find anything :-P ). Thanks, Martin On Tue, Nov 10, 2009 at 5:45 PM, Jimmy Schementi wrote: > Martin, > > Expected, but also a bug. IronRuby will not provide a mangled name if the method name contains a 2-letter-word that is not in this list: > > as > by > do > id > it > if > in > is > go > my > of > ok > on > to > up > > This list is pretty arbitrary ... so "me" can probably be added to it. FYI, the code is in Merlin\Main\Languages\Ruby\Ruby\Runtime\RubyUtils.cs#TryMangleName (approx. line 298). > > ~Jimmy > >> -----Original Message----- >> From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- >> bounces at rubyforge.org] On Behalf Of Martin Smith >> Sent: Tuesday, November 10, 2009 4:48 PM >> To: ironruby-core at rubyforge.org >> Subject: [Ironruby-core] IronRuby and Me >> >> Hello again (sorry for the double post), >> >> We've noticed some slightly odd behavior. ?IronRuby, it seems, won't mangle >> methods that have the word "Me" in them, so if I have a method: >> >> UncheckMeAndMyChildren, uncheck_me_and_my_children won't work >> >> but for: >> >> UncheckSelfAndMyChildren, uncheck_self_and_my_children DOES work. >> >> Is this a bug or the expected behavior? >> >> Thanks, >> Martin >> _______________________________________________ >> 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 martin.smith.jr at gmail.com Tue Nov 10 21:38:40 2009 From: martin.smith.jr at gmail.com (Martin Smith) Date: Tue, 10 Nov 2009 18:38:40 -0800 Subject: [Ironruby-core] Disable compilation of scripts In-Reply-To: <4B342496A3EFEB48839E10BB4BF5964C171DA57A@TK5EX14MBXC129.redmond.corp.microsoft.com> References: <21192f970911101639k678a5d35xe7829752db4d3fe8@mail.gmail.com> <4B342496A3EFEB48839E10BB4BF5964C171DA57A@TK5EX14MBXC129.redmond.corp.microsoft.com> Message-ID: <21192f970911101838h53720efey3daab99765133434@mail.gmail.com> Thanks Tomas! I also found the InterpretedMode flag as well. I've been looking a little more and it looks like the bulk of our problems are related to running IronRuby code through the VS.NET debugger. We had a script that was taking 15 seconds or more to run but runs in under a half second when we run our app outside of Visual Studio. Compiling does confer some pretty serious advantages though. Thanks! Martin On Tue, Nov 10, 2009 at 5:14 PM, Tomas Matousek wrote: > There is. You can set "NoAdaptiveCompilation" options on language setup when creating ScriptRuntime. Command line option is -X:NoAdaptiveCompilation. > We'll also add "CompilationThreshold" option soon, which specifies the number of iterations before we start compiling. > > Tomas > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Martin Smith > Sent: Tuesday, November 10, 2009 4:40 PM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] Disable compilation of scripts > > Hello, > > A while back I watched Jimmy on C9 talking about how IronRuby had a hybrid approach to execution only jitting after a code path had been run a couple times. ?Is there any way to control this. I'd like to experiment with either (1) turning off compilation and (2) forcing immediate compilation. ?The scenario is that there are times when i might be able to get away with the "compilation penalty" and I'd like to play around with doing just that. > > Is there anywhere I can find information on how to do this with the DLR? > > Thanks, > Martin > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > From Tomas.Matousek at microsoft.com Tue Nov 10 22:00:13 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Wed, 11 Nov 2009 03:00:13 +0000 Subject: [Ironruby-core] IronRuby and Me In-Reply-To: <21192f970911101835pe5c7235y45ea496698beb09b@mail.gmail.com> References: <21192f970911101648x22b5756cx7c48e7ef5c73496a@mail.gmail.com> <1B42307CD4AADD438CDDA2FE1121CC92035E24@TK5EX14MBXC134.redmond.corp.microsoft.com> <21192f970911101835pe5c7235y45ea496698beb09b@mail.gmail.com> Message-ID: <4B342496A3EFEB48839E10BB4BF5964C171DA61C@TK5EX14MBXC129.redmond.corp.microsoft.com> Yes, the reason is that .NET naming guidelines says that two-letter abbreviations are not camel-cased. That means we have names like GetIPAddress, PI, GetILGenerator etc. These are mangled to get_ip_address, pi, get_il_generator (not get_i_p_address, p_i, or get_i_l_generator). Unmangling is inverse of mangling (name == unmangle(mangle(name))), thus unmangling cannot turn "ip" into "Ip". Name-mangling is only heuristics. If some name doesn't follow the guidelines or is ambiguous (let's say "IT" in ITManager vs. "It" in ItJustWorks) then you need to use regular name. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Martin Smith Sent: Tuesday, November 10, 2009 6:36 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] IronRuby and Me Thanks guys. Appreciate the (detailed) response. Actually, this explains quite a bit. I've run into times sporadically where i'd be using the mangled name and it wouldn't be recognized and had no ready explanation for it. Is there a specific reason that two letter words arent mangled? (I was looking in the comments of RubyUtils.cs but didn't find anything :-P ). Thanks, Martin On Tue, Nov 10, 2009 at 5:45 PM, Jimmy Schementi wrote: > Martin, > > Expected, but also a bug. IronRuby will not provide a mangled name if the method name contains a 2-letter-word that is not in this list: > > as > by > do > id > it > if > in > is > go > my > of > ok > on > to > up > > This list is pretty arbitrary ... so "me" can probably be added to it. FYI, the code is in Merlin\Main\Languages\Ruby\Ruby\Runtime\RubyUtils.cs#TryMangleName (approx. line 298). > > ~Jimmy > >> -----Original Message----- >> From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- >> bounces at rubyforge.org] On Behalf Of Martin Smith >> Sent: Tuesday, November 10, 2009 4:48 PM >> To: ironruby-core at rubyforge.org >> Subject: [Ironruby-core] IronRuby and Me >> >> Hello again (sorry for the double post), >> >> We've noticed some slightly odd behavior. ?IronRuby, it seems, won't >> mangle methods that have the word "Me" in them, so if I have a method: >> >> UncheckMeAndMyChildren, uncheck_me_and_my_children won't work >> >> but for: >> >> UncheckSelfAndMyChildren, uncheck_self_and_my_children DOES work. >> >> Is this a bug or the expected behavior? >> >> Thanks, >> Martin >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From martin.smith.jr at gmail.com Tue Nov 10 22:17:49 2009 From: martin.smith.jr at gmail.com (Martin Smith) Date: Tue, 10 Nov 2009 19:17:49 -0800 Subject: [Ironruby-core] IronRuby and Me In-Reply-To: <4B342496A3EFEB48839E10BB4BF5964C171DA61C@TK5EX14MBXC129.redmond.corp.microsoft.com> References: <21192f970911101648x22b5756cx7c48e7ef5c73496a@mail.gmail.com> <1B42307CD4AADD438CDDA2FE1121CC92035E24@TK5EX14MBXC134.redmond.corp.microsoft.com> <21192f970911101835pe5c7235y45ea496698beb09b@mail.gmail.com> <4B342496A3EFEB48839E10BB4BF5964C171DA61C@TK5EX14MBXC129.redmond.corp.microsoft.com> Message-ID: <21192f970911101917hd7480aaw239fcf1c8fb0a0fa@mail.gmail.com> Gotcha... Thanks. I guess i've run into this myself with the occasionally mangled name some_h_t_m_l, but that makes perfect sense. Thanks, Martin On Tue, Nov 10, 2009 at 7:00 PM, Tomas Matousek wrote: > Yes, the reason is that .NET naming guidelines says that two-letter abbreviations are not camel-cased. That means we have names like GetIPAddress, PI, GetILGenerator etc. These are mangled to get_ip_address, pi, get_il_generator (not get_i_p_address, p_i, or get_i_l_generator). Unmangling is inverse of mangling (name == unmangle(mangle(name))), thus unmangling cannot turn "ip" into "Ip". > > Name-mangling is only heuristics. If some name doesn't follow the guidelines or is ambiguous (let's say "IT" in ITManager vs. "It" in ItJustWorks) then you need to use regular name. > > Tomas > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Martin Smith > Sent: Tuesday, November 10, 2009 6:36 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] IronRuby and Me > > Thanks guys. ?Appreciate the (detailed) response. > > Actually, this explains quite a bit. ?I've run into times sporadically where i'd be using the mangled name and it wouldn't be recognized and had no ready explanation for it. > > Is there a specific reason that two letter words arent mangled? ?(I was looking in the comments of RubyUtils.cs but didn't find anything :-P ). > > Thanks, > Martin > > On Tue, Nov 10, 2009 at 5:45 PM, Jimmy Schementi wrote: >> Martin, >> >> Expected, but also a bug. IronRuby will not provide a mangled name if the method name contains a 2-letter-word that is not in this list: >> >> as >> by >> do >> id >> it >> if >> in >> is >> go >> my >> of >> ok >> on >> to >> up >> >> This list is pretty arbitrary ... so "me" can probably be added to it. FYI, the code is in Merlin\Main\Languages\Ruby\Ruby\Runtime\RubyUtils.cs#TryMangleName (approx. line 298). >> >> ~Jimmy >> >>> -----Original Message----- >>> From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- >>> bounces at rubyforge.org] On Behalf Of Martin Smith >>> Sent: Tuesday, November 10, 2009 4:48 PM >>> To: ironruby-core at rubyforge.org >>> Subject: [Ironruby-core] IronRuby and Me >>> >>> Hello again (sorry for the double post), >>> >>> We've noticed some slightly odd behavior. ?IronRuby, it seems, won't >>> mangle methods that have the word "Me" in them, so if I have a method: >>> >>> UncheckMeAndMyChildren, uncheck_me_and_my_children won't work >>> >>> but for: >>> >>> UncheckSelfAndMyChildren, uncheck_self_and_my_children DOES work. >>> >>> Is this a bug or the expected behavior? >>> >>> Thanks, >>> Martin >>> _______________________________________________ >>> Ironruby-core mailing list >>> Ironruby-core at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/ironruby-core >> >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core >> > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > From Tomas.Matousek at microsoft.com Tue Nov 10 22:21:25 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Wed, 11 Nov 2009 03:21:25 +0000 Subject: [Ironruby-core] IronRuby and Me In-Reply-To: <21192f970911101917hd7480aaw239fcf1c8fb0a0fa@mail.gmail.com> References: <21192f970911101648x22b5756cx7c48e7ef5c73496a@mail.gmail.com> <1B42307CD4AADD438CDDA2FE1121CC92035E24@TK5EX14MBXC134.redmond.corp.microsoft.com> <21192f970911101835pe5c7235y45ea496698beb09b@mail.gmail.com> <4B342496A3EFEB48839E10BB4BF5964C171DA61C@TK5EX14MBXC129.redmond.corp.microsoft.com> <21192f970911101917hd7480aaw239fcf1c8fb0a0fa@mail.gmail.com> Message-ID: <4B342496A3EFEB48839E10BB4BF5964C171DA64B@TK5EX14MBXC129.redmond.corp.microsoft.com> FYI: The special cases are listed in unit tests (IronRuby.Tests\Runtime\RubyUtilsTests.cs). So you can look there if you are not sure if the behavior is intended or not. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Martin Smith Sent: Tuesday, November 10, 2009 7:18 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] IronRuby and Me Gotcha... Thanks. I guess i've run into this myself with the occasionally mangled name some_h_t_m_l, but that makes perfect sense. Thanks, Martin On Tue, Nov 10, 2009 at 7:00 PM, Tomas Matousek wrote: > Yes, the reason is that .NET naming guidelines says that two-letter abbreviations are not camel-cased. That means we have names like GetIPAddress, PI, GetILGenerator etc. These are mangled to get_ip_address, pi, get_il_generator (not get_i_p_address, p_i, or get_i_l_generator). Unmangling is inverse of mangling (name == unmangle(mangle(name))), thus unmangling cannot turn "ip" into "Ip". > > Name-mangling is only heuristics. If some name doesn't follow the guidelines or is ambiguous (let's say "IT" in ITManager vs. "It" in ItJustWorks) then you need to use regular name. > > Tomas > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Martin Smith > Sent: Tuesday, November 10, 2009 6:36 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] IronRuby and Me > > Thanks guys. ?Appreciate the (detailed) response. > > Actually, this explains quite a bit. ?I've run into times sporadically where i'd be using the mangled name and it wouldn't be recognized and had no ready explanation for it. > > Is there a specific reason that two letter words arent mangled? ?(I was looking in the comments of RubyUtils.cs but didn't find anything :-P ). > > Thanks, > Martin > > On Tue, Nov 10, 2009 at 5:45 PM, Jimmy Schementi wrote: >> Martin, >> >> Expected, but also a bug. IronRuby will not provide a mangled name if the method name contains a 2-letter-word that is not in this list: >> >> as >> by >> do >> id >> it >> if >> in >> is >> go >> my >> of >> ok >> on >> to >> up >> >> This list is pretty arbitrary ... so "me" can probably be added to it. FYI, the code is in Merlin\Main\Languages\Ruby\Ruby\Runtime\RubyUtils.cs#TryMangleName (approx. line 298). >> >> ~Jimmy >> >>> -----Original Message----- >>> From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- >>> bounces at rubyforge.org] On Behalf Of Martin Smith >>> Sent: Tuesday, November 10, 2009 4:48 PM >>> To: ironruby-core at rubyforge.org >>> Subject: [Ironruby-core] IronRuby and Me >>> >>> Hello again (sorry for the double post), >>> >>> We've noticed some slightly odd behavior. ?IronRuby, it seems, won't >>> mangle methods that have the word "Me" in them, so if I have a method: >>> >>> UncheckMeAndMyChildren, uncheck_me_and_my_children won't work >>> >>> but for: >>> >>> UncheckSelfAndMyChildren, uncheck_self_and_my_children DOES work. >>> >>> Is this a bug or the expected behavior? >>> >>> Thanks, >>> Martin >>> _______________________________________________ >>> Ironruby-core mailing list >>> Ironruby-core at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/ironruby-core >> >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core >> > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From patrickcbrown at gmail.com Wed Nov 11 09:45:26 2009 From: patrickcbrown at gmail.com (Patrick Brown) Date: Wed, 11 Nov 2009 09:45:26 -0500 Subject: [Ironruby-core] .NET Remoting with IronRuby 0.9.2 Message-ID: <48163ce60911110645p59eb8660k3cadea3431700231@mail.gmail.com> Hello Has anyone been able to get Remoting to work? I get the following exception when attempting to make a call. I am rather new to IronRuby but believe my code should work, I converted a very simple snippit of working C# code to IronRuby and can't seem to get it to work. I put breakpoints in the .NET assemblies and watch each step complete successfully until the service.SelectPolicies call. mscorlib:0:in `HandleReturnMessage': Cannot load type 'IronRuby.Runtime.IRubyObj ect, IronRuby, Version=0.9.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 '. (System::Runtime::Remoting::RemotingException) from mscorlib:0:in `PrivateInvoke' from Microsoft.Scripting.Core:0:in `BindCore' from Microsoft.Scripting.Core:0:in `Bind' from ./PropertyPolicy.rb:34:in `GitSomePolicies' from main.rb:5 IronRuby snippit RemotingConfiguration.Configure("Configuration\\ClientRemotingConfiguration.config", false) service = DIContainer.Instance.method(:Resolve).of(IPropertyPolicyService).call() types = DIContainer.Instance.method(:Resolve).of(ILookupInfos).call(); types.Add(DIContainer.Instance.method(:Resolve).of(ICodeListInfoBuilder).call().Build("AP", CodeValueAttribute.GetDescription(PolicyType.AllPacPolicy), "", 0, DateTime.Now, DateTime.Now)) policies = service.SelectPolicies(types) Thanks, Patrick -------------- next part -------------- An HTML attachment was scrubbed... URL: From patrickcbrown at gmail.com Wed Nov 11 13:17:14 2009 From: patrickcbrown at gmail.com (Patrick Brown) Date: Wed, 11 Nov 2009 13:17:14 -0500 Subject: [Ironruby-core] why use IronRuby Message-ID: <48163ce60911111017n6f90ea07r57357e343683b06@mail.gmail.com> Hello I have been playing with IronRuby 0.9.2 for a week or so and I have to say that it is alot of fun to tinker with, I am having alot of trouble trying to figure out where I would really use this though besides maybe in writing scripts to do little things or to help out with builds. My development is all desktop Client/Server code. I see people mention testing and rapid development, I think I can actually develop a fair bit quicker given current tools. I really am interested in working this in if I can see some areas that it would be helpful. Thanks, Patrick -------------- next part -------------- An HTML attachment was scrubbed... URL: From Nathan_Stults at HSIHealth.com Wed Nov 11 14:11:15 2009 From: Nathan_Stults at HSIHealth.com (Nathan Stults) Date: Wed, 11 Nov 2009 11:11:15 -0800 Subject: [Ironruby-core] why use IronRuby In-Reply-To: <48163ce60911111017n6f90ea07r57357e343683b06@mail.gmail.com> References: <48163ce60911111017n6f90ea07r57357e343683b06@mail.gmail.com> Message-ID: <790F1F63F5D2E44E91797E821B31FDBB02BC7FF8@hsi-fs.HSIHealth.local> It's probably too early to start building full client/server projects using IronRuby, though I am confident the day will come when WPF development is primarily accomplished using DLR languages and frameworks. Our shop is also heavily client/server, still using mostly Windows Forms, and the major potential for IronRuby to add value to our existing products falls into five categories: * Dev / Build Automation * Testing (primarily BDD style, in my opinion) You say you don't see much added value in using IronRuby in these scenarios, but I would challenge you to do some real world proof of concepts. I think you will eventually find the flexibility and dynamic nature of Ruby blows the standard .NET tooling out of the water from a productivity perspective. These kinds of tasks are inherently prone to constant flux and change and are best built in rapid iterations, and having a dynamic/interpreted language optimized for simplicity is of immense value. * Adding end user customizations / scripting / event handlers to the front end OR back end Eventually, you may want to allow your customers (or even your dev team) to be able to react in custom ways to domain events occurring in your applications. A dynamic language is perfect for this. * API / Integration Chances are your applications react to and generate a number of business events, or domain events. It is likely that at some point, if not already, your users will want your applications to integrate with other systems. Your applications may also be required to communicate with humans, via automated e-mails, sending SMS messages, etc. Giving your application servers the ability to prepare some event data related to each domain event and pass it off to dynamically discoverable Ruby scripts/handlers when these events occur gives your application tremendous flexibility to easily integrate with almost any system or platform at the drop of a hat. If you have a customer that wants to call a partners web service when something happens in their workflow, you just write a script for it. If the partners system is archaic and watches the files system for dropped files, you can generate that file in a few lines of Ruby too. Maybe your customers have IT departments? They can write their own scripts. As for integrating incoming data into your application, Ruby is also very good at transforming incoming data structures or DTO's into your domain objects, as you can react to changes in partner services without having to do a full, versioned deployment process on your clients and servers. Finally * Runtime (remote) access to application state via IronRuby REPL Being a dynamic, interpreted environment, you can easily put together a REPL, or interactive console, that can be launched within the process of your desktop clients or your servers (via command line) that can allow your operations people to dynamically probe the running state if those processes. This can be quite useful in certain troubleshooting or tech support scenarios. By making this shell environment available remotely (by integrating with a .NET SSH server, for instance, there is one on codeplex, will take some work but I'll have a library out soon to help) you can make your application externally scriptable for your operations department from any location, even an iphone (which has many SSH apps) The main point is that any place in your project that is likely to be customized on a per-deployment basis, or is likely to change in business time, which is a must faster rate of change than any infrastructure code you have, is a very good candidate for using a dynamic language, DLR and IronRuby. Given that IronRuby can easily call into any static .NET DLL's, you lose nothing and gain the flexibility to allow your application able to morph to meet new business conditions (particularly at the interface of your application and the rest of the world) very rapidly. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Patrick Brown Sent: Wednesday, November 11, 2009 10:17 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] why use IronRuby Hello I have been playing with IronRuby 0.9.2 for a week or so and I have to say that it is alot of fun to tinker with, I am having alot of trouble trying to figure out where I would really use this though besides maybe in writing scripts to do little things or to help out with builds. My development is all desktop Client/Server code. I see people mention testing and rapid development, I think I can actually develop a fair bit quicker given current tools. I really am interested in working this in if I can see some areas that it would be helpful. Thanks, Patrick -------------- next part -------------- An HTML attachment was scrubbed... URL: From martin.smith.jr at gmail.com Wed Nov 11 14:30:25 2009 From: martin.smith.jr at gmail.com (Martin Smith) Date: Wed, 11 Nov 2009 11:30:25 -0800 Subject: [Ironruby-core] Disable compilation of scripts In-Reply-To: <4B342496A3EFEB48839E10BB4BF5964C171DA57A@TK5EX14MBXC129.redmond.corp.microsoft.com> References: <21192f970911101639k678a5d35xe7829752db4d3fe8@mail.gmail.com> <4B342496A3EFEB48839E10BB4BF5964C171DA57A@TK5EX14MBXC129.redmond.corp.microsoft.com> Message-ID: <21192f970911111130o51d90761haba50a5b0d3ae5b8@mail.gmail.com> Hey Tomas, Are you planning on allowing the CompilationThreshold option to be set... so basically I'd envision: 1) app startup CompilationThreshold = 0 2) warm up and jit all the ruby code 3) after startup is finished set CompilationThreshold = 50 (or something) so we can issue quick calls to the already compiled code. That would be pretty cool if it could work that way. Thanks, Martin On Tue, Nov 10, 2009 at 5:14 PM, Tomas Matousek wrote: > There is. You can set "NoAdaptiveCompilation" options on language setup when creating ScriptRuntime. Command line option is -X:NoAdaptiveCompilation. > We'll also add "CompilationThreshold" option soon, which specifies the number of iterations before we start compiling. > > Tomas > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Martin Smith > Sent: Tuesday, November 10, 2009 4:40 PM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] Disable compilation of scripts > > Hello, > > A while back I watched Jimmy on C9 talking about how IronRuby had a hybrid approach to execution only jitting after a code path had been run a couple times. ?Is there any way to control this. I'd like to experiment with either (1) turning off compilation and (2) forcing immediate compilation. ?The scenario is that there are times when i might be able to get away with the "compilation penalty" and I'd like to play around with doing just that. > > Is there anywhere I can find information on how to do this with the DLR? > > Thanks, > Martin > _______________________________________________ > 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 orion.edwards at gmail.com Wed Nov 11 14:38:21 2009 From: orion.edwards at gmail.com (Orion Edwards) Date: Thu, 12 Nov 2009 08:38:21 +1300 Subject: [Ironruby-core] mailing list issues? Message-ID: <7c1b59c00911111138o425bcb2dv27e9f1ab36422bb0@mail.gmail.com> I sent a couple of emails about potential regressions in IronRuby 0.9.2, but they haven't yet shown up on the list. Is something wrong or are they likely to just be sitting in the moderation queue? Thanks, Orion -------------- next part -------------- An HTML attachment was scrubbed... URL: From kevin.radcliffe at gmail.com Wed Nov 11 14:41:13 2009 From: kevin.radcliffe at gmail.com (Kevin Radcliffe) Date: Wed, 11 Nov 2009 12:41:13 -0700 Subject: [Ironruby-core] mailing list issues? In-Reply-To: <7c1b59c00911111138o425bcb2dv27e9f1ab36422bb0@mail.gmail.com> References: <7c1b59c00911111138o425bcb2dv27e9f1ab36422bb0@mail.gmail.com> Message-ID: <131af5e0911111141m1c846db3r38fcd7d316218cde@mail.gmail.com> Did see a couple of recent ones like: "IronRuby 0.9.2 bug - super(.S, 1*&):433 @1 not supported on foreign meta-object" Were there more after those? Or where are you looking right now? Best Regards, Kevin On Wed, Nov 11, 2009 at 12:38 PM, Orion Edwards wrote: > I sent a couple of emails about potential regressions in IronRuby 0.9.2, but > they haven't yet shown up on the list. Is something wrong or are they likely > to just be sitting in the moderation queue? > Thanks, Orion > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > From kevin.radcliffe at gmail.com Wed Nov 11 14:34:38 2009 From: kevin.radcliffe at gmail.com (Kevin Radcliffe) Date: Wed, 11 Nov 2009 12:34:38 -0700 Subject: [Ironruby-core] ironruby hosting as scripting engine In-Reply-To: <4B342496A3EFEB48839E10BB4BF5964C171D9110@TK5EX14MBXC129.redmond.corp.microsoft.com> References: <6927b8740911061116q35bd061cy34854ff7484d69c6@mail.gmail.com> <1B42307CD4AADD438CDDA2FE1121CC9202F475@TK5EX14MBXC134.redmond.corp.microsoft.com> <6927b8740911061354w28656340v8ec942b90afc2a25@mail.gmail.com> <4B342496A3EFEB48839E10BB4BF5964C171D9006@TK5EX14MBXC129.redmond.corp.microsoft.com> <1B42307CD4AADD438CDDA2FE1121CC9202F86B@TK5EX14MBXC134.redmond.corp.microsoft.com> <4B342496A3EFEB48839E10BB4BF5964C171D90ED@TK5EX14MBXC129.redmond.corp.microsoft.com> <4B342496A3EFEB48839E10BB4BF5964C171D9110@TK5EX14MBXC129.redmond.corp.microsoft.com> Message-ID: <131af5e0911111134qebb5635yed13fda3f77dd4d5@mail.gmail.com> Tomas, is this new, or changed? I couldn't seem to call a method using what you showed. Because "do_stuff" is a function that returns a list (in my case) I couldn't do: var execute = scope.GetVariable>(?do_stuff?); But instead, had to do something like this: return engine.Execute("do_stuff", scope); In any case, it worked. Just wondering if it won't allow for some reason because I am expecting a complex type back (IList) Thanks, -Kevin On Fri, Nov 6, 2009 at 8:59 PM, Tomas Matousek wrote: > Just to be clear, this works: > > > > public class App { public string Name = ?hello?; } > > > > var engine = IronRuby.CreateEngine(); > > var scope = engine.CreateScope(); > > scope.SetVariable(?my_app_object?, new App()); > > > > engine.Execute(@? > > def do_stuff > ??my_app_object.name > end > > ?, scope); > > > > var execute = scope.GetVariable>(?do_stuff?); > > Console.WriteLine(execute()); > > > > Tomas > > > > > > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek > Sent: Friday, November 06, 2009 7:53 PM > > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] ironruby hosting as scripting engine > > > > It actually works. Any method call on top-level ?self? object will fall back > to the scope (we inject method_missing to the top-level object if the code > is executed from hosting code). > > It is implemented like instance_eval against the scope. > > > > Tomas > > > > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jimmy Schementi > Sent: Friday, November 06, 2009 4:48 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] ironruby hosting as scripting engine > > > > Tomas, > > > > Will ?my_app_object? be accessible in the do_stuff method? I think not, > since our scope variables are just local ruby variables, right? What he?d > really want is to define a method called ?my_app_object? on the Script > class, so then his ?.s? files can use ?my_app_object? anywhere, like: > > > > engine Execute(@?class Script > > ? def my_app_object > > ? ??# do whatever you need to get the app object > > ? end > > > > ?? > > end?) > > > > But I still don?t like wrapping the user script in a class like that. The > preferred way would be to create an instance of script and call > instance_eval with the contents of the script1.s file: > > > > ~js > > > > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek > Sent: Friday, November 06, 2009 4:09 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] ironruby hosting as scripting engine > > > > A better way of exposing application objects to the scripts and vice versa > is to use ScriptScope: > > > > var engine = IronRuby.CreateEngine(); > > var scope = engine.CreateScope(); > > scope.SetVariable(?my_app_object?, new App()); > > > > engine.Execute(@? > > my_app_object.declare 'version 1' > > def do_stuff > ??'success' > end > > ?, scope); > > > > var execute = scope.GetVariable>(?do_stuff?); > > Console.WriteLine(execute()); > > > > Top level Ruby methods defined in the executed script are published to the > scope so that the host can read it via GetVariable method. Also, Ruby > methods are convertible to delegates, so you can get the variable as > Func and call the delegate later. > > > > Tomas > > > > > > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Dotan N. > Sent: Friday, November 06, 2009 1:54 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] ironruby hosting as scripting engine > > > > Kevin, > Yep i also needed to support input output but it all goes through the > "$script" variable back to the backing C# object. for now, it makes it > easier to have events and debugging. all in all the end result is that i > provide an "API" exposed through $script. > > Jimmy, > Thanks, I clearly overlooked that. > > On Fri, Nov 6, 2009 at 11:16 PM, Jimmy Schementi > wrote: > > Your solution sounds fine. To answer you first question though: > engine.Execute("class Script; end") will always give you nil; classes return > nil when defined: > > > >>>> class Foo > > ... end > > => nil > > > > You?ll have to do this to get the actual class object: > > > > engine.Execute("class Script; end; Script") > > > > ~Jimmy > > > > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Dotan N. > Sent: Friday, November 06, 2009 11:17 AM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] ironruby hosting as scripting engine > > > > Hi guys sorry for the lengthy mail but i believe this is interesting since > i've found a solution that someone else could use. > > just had a session of trying to embed IR in my application. > I'm defining a user script which contains some initialization code and a > special worker function 'execute' > > this is the "user script": > > script1.s -------------------------------------------------------- > $script.declare "version 1" > > def execute > ?? $script.report "success" > end > -------------------------------------------------------- > > > what i'm doing is setting "script" as a global variable that is a gateway to > my application. > I've tried this way first: > > wrapping script1.s with "class Script end" > and doing Engine.Execute on it. > > I expected to get a RubyObject as a result, which is the Script class. > > then with the RubyObject i would do ObjectOperations.Invoke("execute"); when > ever i wish. > > I had 2 problems: > > 1. the RubyObject was always null. any idea why? > 2. I couldn't really define a global variable properly (i've used the $a = a > trick from the forum) > > > > eventually i've realized this solution: > 1. set global variable via RubyContext.DefineGlobalVariable > 2.? i run everything on my script scope and Execute script1.s directly given > a ScriptScope > 3. do InvokeMember on the ScriptScope itself > > > from googling i've noticed the solution changed a lot along time. > so what is the proper way to do it? > > > Thanks! > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > From Tomas.Matousek at microsoft.com Wed Nov 11 14:45:27 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Wed, 11 Nov 2009 19:45:27 +0000 Subject: [Ironruby-core] mailing list issues? In-Reply-To: <7c1b59c00911111138o425bcb2dv27e9f1ab36422bb0@mail.gmail.com> References: <7c1b59c00911111138o425bcb2dv27e9f1ab36422bb0@mail.gmail.com> Message-ID: <4B342496A3EFEB48839E10BB4BF5964C171DAAB5@TK5EX14MBXC129.redmond.corp.microsoft.com> I've seen those. I'll file bugs for them. Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards Sent: Wednesday, November 11, 2009 11:38 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] mailing list issues? I sent a couple of emails about potential regressions in IronRuby 0.9.2, but they haven't yet shown up on the list. Is something wrong or are they likely to just be sitting in the moderation queue? Thanks, Orion -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tomas.Matousek at microsoft.com Wed Nov 11 14:47:14 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Wed, 11 Nov 2009 19:47:14 +0000 Subject: [Ironruby-core] IronRuby 0.9.2 bug - Can't define a singleton method on a COM object instance In-Reply-To: <7c1b59c00911081842u1ae9dcb0u6d96aecd06f784ce@mail.gmail.com> References: <7c1b59c00911081842u1ae9dcb0u6d96aecd06f784ce@mail.gmail.com> Message-ID: <4B342496A3EFEB48839E10BB4BF5964C171DAAC5@TK5EX14MBXC129.redmond.corp.microsoft.com> You might be able to work this around by making singleton_method_added a public method. Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards Sent: Sunday, November 08, 2009 6:43 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] IronRuby 0.9.2 bug - Can't define a singleton method on a COM object instance This code used to work under IronRuby 0.9.1 and earlier load_assembly "microsoft.office.word.interop" word = Microsoft::Office::Interop::Word::ApplicationClass.new metaclass = class << word; self; end metaclass.send :define_method, "fizz" do |*args| puts "hello" end #BANG! Under 0.9.2, this happens NoMethodError: private method `singleton_method_added' called for Microsoft.Office.Interop.Word.ApplicationClass:Microsoft::Office::Interop::Word::ApplicationClass from (irb):52 from :0:in `define_method' from :0:in `define_method' from :0:in `send' from C:/Dev/TEST/ruby/lib/ruby/1.8/irb.rb:146:in `eval_input' from C:/Dev/TEST/ruby/lib/ruby/1.8/irb.rb:70:in `start' from C:/Dev/TEST/ruby/lib/ruby/1.8/irb.rb:69:in `start' from :0:in `eval' from workspace.rb:80:in `evaluate' from context.rb:217:in `evaluate' from irb.rb:147:in `eval_input' from irb.rb:257:in `signal_status' from irb.rb:146:in `eval_input' from ruby-lex.rb:230:in `each_top_level_statement' from :0:in `loop' from C:/Dev/TEST/ruby/bin/iirb:13 from :0:in `catch' from :0:i While the previous bug (calling super from method_missing on a COM object) was easy to work around and isn't that important in the scheme of things, this one is a real blocker :-( Might have to roll back to 0.9.1 :-( -------------- next part -------------- An HTML attachment was scrubbed... URL: From orion.edwards at gmail.com Wed Nov 11 15:41:26 2009 From: orion.edwards at gmail.com (Orion Edwards) Date: Thu, 12 Nov 2009 09:41:26 +1300 Subject: [Ironruby-core] mailing list issues? In-Reply-To: <4B342496A3EFEB48839E10BB4BF5964C171DAAB5@TK5EX14MBXC129.redmond.corp.microsoft.com> References: <7c1b59c00911111138o425bcb2dv27e9f1ab36422bb0@mail.gmail.com> <4B342496A3EFEB48839E10BB4BF5964C171DAAB5@TK5EX14MBXC129.redmond.corp.microsoft.com> Message-ID: <7c1b59c00911111241nbfea6f2q87ae2eabd73d7f3f@mail.gmail.com> Hrm, they obviously got through then. Maybe gmail is being too clever for it's own good and not showing me my own messages :-( Confusing... Thanks anyway guys -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tomas.Matousek at microsoft.com Wed Nov 11 16:28:07 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Wed, 11 Nov 2009 21:28:07 +0000 Subject: [Ironruby-core] ironruby hosting as scripting engine In-Reply-To: <131af5e0911111134qebb5635yed13fda3f77dd4d5@mail.gmail.com> References: <6927b8740911061116q35bd061cy34854ff7484d69c6@mail.gmail.com> <1B42307CD4AADD438CDDA2FE1121CC9202F475@TK5EX14MBXC134.redmond.corp.microsoft.com> <6927b8740911061354w28656340v8ec942b90afc2a25@mail.gmail.com> <4B342496A3EFEB48839E10BB4BF5964C171D9006@TK5EX14MBXC129.redmond.corp.microsoft.com> <1B42307CD4AADD438CDDA2FE1121CC9202F86B@TK5EX14MBXC134.redmond.corp.microsoft.com> <4B342496A3EFEB48839E10BB4BF5964C171D90ED@TK5EX14MBXC129.redmond.corp.microsoft.com> <4B342496A3EFEB48839E10BB4BF5964C171D9110@TK5EX14MBXC129.redmond.corp.microsoft.com> <131af5e0911111134qebb5635yed13fda3f77dd4d5@mail.gmail.com> Message-ID: <4B342496A3EFEB48839E10BB4BF5964C171DAB74@TK5EX14MBXC129.redmond.corp.microsoft.com> GetVariable and Execute should do the same conversion. Could you send the snippet that doesn't work? Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Kevin Radcliffe Sent: Wednesday, November 11, 2009 11:35 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] ironruby hosting as scripting engine Tomas, is this new, or changed? I couldn't seem to call a method using what you showed. Because "do_stuff" is a function that returns a list (in my case) I couldn't do: var execute = scope.GetVariable>("do_stuff"); But instead, had to do something like this: return engine.Execute("do_stuff", scope); In any case, it worked. Just wondering if it won't allow for some reason because I am expecting a complex type back (IList) Thanks, -Kevin On Fri, Nov 6, 2009 at 8:59 PM, Tomas Matousek wrote: > Just to be clear, this works: > > > > public class App { public string Name = "hello"; } > > > > var engine = IronRuby.CreateEngine(); > > var scope = engine.CreateScope(); > > scope.SetVariable("my_app_object", new App()); > > > > engine.Execute(@" > > def do_stuff > ??my_app_object.name > end > > ", scope); > > > > var execute = scope.GetVariable>("do_stuff"); > > Console.WriteLine(execute()); > > > > Tomas > > > > > > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas > Matousek > Sent: Friday, November 06, 2009 7:53 PM > > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] ironruby hosting as scripting engine > > > > It actually works. Any method call on top-level "self" object will > fall back to the scope (we inject method_missing to the top-level > object if the code is executed from hosting code). > > It is implemented like instance_eval against the scope. > > > > Tomas > > > > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jimmy > Schementi > Sent: Friday, November 06, 2009 4:48 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] ironruby hosting as scripting engine > > > > Tomas, > > > > Will "my_app_object" be accessible in the do_stuff method? I think > not, since our scope variables are just local ruby variables, right? > What he'd really want is to define a method called "my_app_object" on > the Script class, so then his ".s" files can use "my_app_object" anywhere, like: > > > > engine Execute(@"class Script > > ? def my_app_object > > ? ??# do whatever you need to get the app object > > ? end > > > > ?? > > end") > > > > But I still don't like wrapping the user script in a class like that. > The preferred way would be to create an instance of script and call > instance_eval with the contents of the script1.s file: > > > > ~js > > > > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas > Matousek > Sent: Friday, November 06, 2009 4:09 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] ironruby hosting as scripting engine > > > > A better way of exposing application objects to the scripts and vice > versa is to use ScriptScope: > > > > var engine = IronRuby.CreateEngine(); > > var scope = engine.CreateScope(); > > scope.SetVariable("my_app_object", new App()); > > > > engine.Execute(@" > > my_app_object.declare 'version 1' > > def do_stuff > ??'success' > end > > ", scope); > > > > var execute = scope.GetVariable>("do_stuff"); > > Console.WriteLine(execute()); > > > > Top level Ruby methods defined in the executed script are published to > the scope so that the host can read it via GetVariable method. Also, > Ruby methods are convertible to delegates, so you can get the variable > as Func and call the delegate later. > > > > Tomas > > > > > > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Dotan N. > Sent: Friday, November 06, 2009 1:54 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] ironruby hosting as scripting engine > > > > Kevin, > Yep i also needed to support input output but it all goes through the > "$script" variable back to the backing C# object. for now, it makes it > easier to have events and debugging. all in all the end result is that > i provide an "API" exposed through $script. > > Jimmy, > Thanks, I clearly overlooked that. > > On Fri, Nov 6, 2009 at 11:16 PM, Jimmy Schementi > wrote: > > Your solution sounds fine. To answer you first question though: > engine.Execute("class Script; end") will always give you nil; classes > return nil when defined: > > > >>>> class Foo > > ... end > > => nil > > > > You'll have to do this to get the actual class object: > > > > engine.Execute("class Script; end; Script") > > > > ~Jimmy > > > > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Dotan N. > Sent: Friday, November 06, 2009 11:17 AM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] ironruby hosting as scripting engine > > > > Hi guys sorry for the lengthy mail but i believe this is interesting > since i've found a solution that someone else could use. > > just had a session of trying to embed IR in my application. > I'm defining a user script which contains some initialization code and > a special worker function 'execute' > > this is the "user script": > > script1.s -------------------------------------------------------- > $script.declare "version 1" > > def execute > ?? $script.report "success" > end > -------------------------------------------------------- > > > what i'm doing is setting "script" as a global variable that is a > gateway to my application. > I've tried this way first: > > wrapping script1.s with "class Script end" > and doing Engine.Execute on it. > > I expected to get a RubyObject as a result, which is the Script class. > > then with the RubyObject i would do > ObjectOperations.Invoke("execute"); when ever i wish. > > I had 2 problems: > > 1. the RubyObject was always null. any idea why? > 2. I couldn't really define a global variable properly (i've used the > $a = a trick from the forum) > > > > eventually i've realized this solution: > 1. set global variable via RubyContext.DefineGlobalVariable 2.? i run > everything on my script scope and Execute script1.s directly given a > ScriptScope 3. do InvokeMember on the ScriptScope itself > > > from googling i've noticed the solution changed a lot along time. > so what is the proper way to do it? > > > Thanks! > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From kevin.radcliffe at gmail.com Wed Nov 11 16:33:45 2009 From: kevin.radcliffe at gmail.com (Kevin Radcliffe) Date: Wed, 11 Nov 2009 14:33:45 -0700 Subject: [Ironruby-core] mailing list issues? In-Reply-To: <7c1b59c00911111241nbfea6f2q87ae2eabd73d7f3f@mail.gmail.com> References: <7c1b59c00911111138o425bcb2dv27e9f1ab36422bb0@mail.gmail.com> <4B342496A3EFEB48839E10BB4BF5964C171DAAB5@TK5EX14MBXC129.redmond.corp.microsoft.com> <7c1b59c00911111241nbfea6f2q87ae2eabd73d7f3f@mail.gmail.com> Message-ID: <131af5e0911111333h73a30235xd115cbef5ad40cf@mail.gmail.com> Orion, yes, I think that's exactly what's happening. It took me awhile before I realized that's what was happening to me. I label the ironruby mailing list items, and I never saw my own "show up" ;) Best Regards, Kevin On Wed, Nov 11, 2009 at 1:41 PM, Orion Edwards wrote: > Hrm, they obviously got through then. > Maybe gmail is being too clever for it's own good and not showing me my own > messages :-( Confusing... > > Thanks anyway guys > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > From kevin.radcliffe at gmail.com Wed Nov 11 16:37:50 2009 From: kevin.radcliffe at gmail.com (Kevin Radcliffe) Date: Wed, 11 Nov 2009 14:37:50 -0700 Subject: [Ironruby-core] ironruby hosting as scripting engine In-Reply-To: <4B342496A3EFEB48839E10BB4BF5964C171DAB74@TK5EX14MBXC129.redmond.corp.microsoft.com> References: <6927b8740911061116q35bd061cy34854ff7484d69c6@mail.gmail.com> <1B42307CD4AADD438CDDA2FE1121CC9202F475@TK5EX14MBXC134.redmond.corp.microsoft.com> <6927b8740911061354w28656340v8ec942b90afc2a25@mail.gmail.com> <4B342496A3EFEB48839E10BB4BF5964C171D9006@TK5EX14MBXC129.redmond.corp.microsoft.com> <1B42307CD4AADD438CDDA2FE1121CC9202F86B@TK5EX14MBXC134.redmond.corp.microsoft.com> <4B342496A3EFEB48839E10BB4BF5964C171D90ED@TK5EX14MBXC129.redmond.corp.microsoft.com> <4B342496A3EFEB48839E10BB4BF5964C171D9110@TK5EX14MBXC129.redmond.corp.microsoft.com> <131af5e0911111134qebb5635yed13fda3f77dd4d5@mail.gmail.com> <4B342496A3EFEB48839E10BB4BF5964C171DAB74@TK5EX14MBXC129.redmond.corp.microsoft.com> Message-ID: <131af5e0911111337n3ab3d5d8y607b274aa189c32c@mail.gmail.com> Tomas, I wasn't reading your snippet right, the execute automatically executes.. But with the variable, you have to call it, I didn't notice that in your example you are actually calling it with () after you retrieve as a var. Sorry for the trouble. Works now, and is obvious why I was mistaken, Thanks Best Regards, Kevin On Wed, Nov 11, 2009 at 2:28 PM, Tomas Matousek wrote: > GetVariable and Execute should do the same conversion. Could you send the snippet that doesn't work? > > Tomas > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Kevin Radcliffe > Sent: Wednesday, November 11, 2009 11:35 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] ironruby hosting as scripting engine > > Tomas, is this new, or changed? I couldn't seem to call a method using what you showed. > Because "do_stuff" is a function that returns a list (in my case) I couldn't do: > > var execute = scope.GetVariable>("do_stuff"); > > But instead, had to do something like this: > > return engine.Execute("do_stuff", scope); > > In any case, it worked. Just wondering if it won't allow for some reason because I am expecting a complex type back (IList) > > Thanks, -Kevin > > On Fri, Nov 6, 2009 at 8:59 PM, Tomas Matousek wrote: >> Just to be clear, this works: >> >> >> >> public class App { public string Name = "hello"; } >> >> >> >> var engine = IronRuby.CreateEngine(); >> >> var scope = engine.CreateScope(); >> >> scope.SetVariable("my_app_object", new App()); >> >> >> >> engine.Execute(@" >> >> def do_stuff >> ??my_app_object.name >> end >> >> ", scope); >> >> >> >> var execute = scope.GetVariable>("do_stuff"); >> >> Console.WriteLine(execute()); >> >> >> >> Tomas >> >> >> >> >> >> From: ironruby-core-bounces at rubyforge.org >> [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas >> Matousek >> Sent: Friday, November 06, 2009 7:53 PM >> >> To: ironruby-core at rubyforge.org >> Subject: Re: [Ironruby-core] ironruby hosting as scripting engine >> >> >> >> It actually works. Any method call on top-level "self" object will >> fall back to the scope (we inject method_missing to the top-level >> object if the code is executed from hosting code). >> >> It is implemented like instance_eval against the scope. >> >> >> >> Tomas >> >> >> >> From: ironruby-core-bounces at rubyforge.org >> [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jimmy >> Schementi >> Sent: Friday, November 06, 2009 4:48 PM >> To: ironruby-core at rubyforge.org >> Subject: Re: [Ironruby-core] ironruby hosting as scripting engine >> >> >> >> Tomas, >> >> >> >> Will "my_app_object" be accessible in the do_stuff method? I think >> not, since our scope variables are just local ruby variables, right? >> What he'd really want is to define a method called "my_app_object" on >> the Script class, so then his ".s" files can use "my_app_object" anywhere, like: >> >> >> >> engine Execute(@"class Script >> >> ? def my_app_object >> >> ? ??# do whatever you need to get the app object >> >> ? end >> >> >> >> ?? >> >> end") >> >> >> >> But I still don't like wrapping the user script in a class like that. >> The preferred way would be to create an instance of script and call >> instance_eval with the contents of the script1.s file: >> >> >> >> ~js >> >> >> >> From: ironruby-core-bounces at rubyforge.org >> [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas >> Matousek >> Sent: Friday, November 06, 2009 4:09 PM >> To: ironruby-core at rubyforge.org >> Subject: Re: [Ironruby-core] ironruby hosting as scripting engine >> >> >> >> A better way of exposing application objects to the scripts and vice >> versa is to use ScriptScope: >> >> >> >> var engine = IronRuby.CreateEngine(); >> >> var scope = engine.CreateScope(); >> >> scope.SetVariable("my_app_object", new App()); >> >> >> >> engine.Execute(@" >> >> my_app_object.declare 'version 1' >> >> def do_stuff >> ??'success' >> end >> >> ", scope); >> >> >> >> var execute = scope.GetVariable>("do_stuff"); >> >> Console.WriteLine(execute()); >> >> >> >> Top level Ruby methods defined in the executed script are published to >> the scope so that the host can read it via GetVariable method. Also, >> Ruby methods are convertible to delegates, so you can get the variable >> as Func and call the delegate later. >> >> >> >> Tomas >> >> >> >> >> >> From: ironruby-core-bounces at rubyforge.org >> [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Dotan N. >> Sent: Friday, November 06, 2009 1:54 PM >> To: ironruby-core at rubyforge.org >> Subject: Re: [Ironruby-core] ironruby hosting as scripting engine >> >> >> >> Kevin, >> Yep i also needed to support input output but it all goes through the >> "$script" variable back to the backing C# object. for now, it makes it >> easier to have events and debugging. all in all the end result is that >> i provide an "API" exposed through $script. >> >> Jimmy, >> Thanks, I clearly overlooked that. >> >> On Fri, Nov 6, 2009 at 11:16 PM, Jimmy Schementi >> wrote: >> >> Your solution sounds fine. To answer you first question though: >> engine.Execute("class Script; end") will always give you nil; classes >> return nil when defined: >> >> >> >>>>> class Foo >> >> ... end >> >> => nil >> >> >> >> You'll have to do this to get the actual class object: >> >> >> >> engine.Execute("class Script; end; Script") >> >> >> >> ~Jimmy >> >> >> >> From: ironruby-core-bounces at rubyforge.org >> [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Dotan N. >> Sent: Friday, November 06, 2009 11:17 AM >> To: ironruby-core at rubyforge.org >> Subject: [Ironruby-core] ironruby hosting as scripting engine >> >> >> >> Hi guys sorry for the lengthy mail but i believe this is interesting >> since i've found a solution that someone else could use. >> >> just had a session of trying to embed IR in my application. >> I'm defining a user script which contains some initialization code and >> a special worker function 'execute' >> >> this is the "user script": >> >> script1.s -------------------------------------------------------- >> $script.declare "version 1" >> >> def execute >> ?? $script.report "success" >> end >> -------------------------------------------------------- >> >> >> what i'm doing is setting "script" as a global variable that is a >> gateway to my application. >> I've tried this way first: >> >> wrapping script1.s with "class Script end" >> and doing Engine.Execute on it. >> >> I expected to get a RubyObject as a result, which is the Script class. >> >> then with the RubyObject i would do >> ObjectOperations.Invoke("execute"); when ever i wish. >> >> I had 2 problems: >> >> 1. the RubyObject was always null. any idea why? >> 2. I couldn't really define a global variable properly (i've used the >> $a = a trick from the forum) >> >> >> >> eventually i've realized this solution: >> 1. set global variable via RubyContext.DefineGlobalVariable 2.? i run >> everything on my script scope and Execute script1.s directly given a >> ScriptScope 3. do InvokeMember on the ScriptScope itself >> >> >> from googling i've noticed the solution changed a lot along time. >> so what is the proper way to do it? >> >> >> Thanks! >> >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core >> >> >> >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core >> >> > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > From ckponnappa at gmail.com Wed Nov 11 23:41:13 2009 From: ckponnappa at gmail.com (C. K. Ponnappa) Date: Thu, 12 Nov 2009 10:11:13 +0530 Subject: [Ironruby-core] why use IronRuby In-Reply-To: <48163ce60911111017n6f90ea07r57357e343683b06@mail.gmail.com> References: <48163ce60911111017n6f90ea07r57357e343683b06@mail.gmail.com> Message-ID: <4AFB91E9.2060101@gmail.com> As an experiment, I'd suggest pick a toy client-server problem. Try building out your server as a Rails app that has no human consumable view and only exposes REST resources (ok, Rails resources aren't very RESTful, but that's another story altogether). Build your client using standard C# if it's a desktop app or silverlight, or build another Rails app as the client if it's going to be a website. Stick with TDD the whole way on all components and keep your build green all the time (this is important if you're looking to experience a productivity boost). This should give you a reasonably good idea about what you can expect and the tradeoffs that you make with Ruby. It will be even better if you can find an experienced Ruby hacker to pair with over the course of the exercise, preferably one who is familiar with .Net. > I would really use this though besides maybe in writing scripts to do > little things or to help out with builds. Absolutely! I swear by Rake, it's fabulous as a build language and hammers ant/nant in terms of ease of use and longer term maintainability, especially on larger codebases which tend to have many stages in the build. There are several projects on multiple platforms (including .Net, Cocoa, Java and of course Ruby) that have discarded their traditional build scripts to move to Rake. > I think I can actually develop a fair bit quicker given current tools. The catch with writing Ruby is that most of the dev tools are part of the OS. It's been a few years since I used a serious IDE (IntelliJ) but IDEs are primarily valuable for their magnificent support for Refactoring. These days I use TextMate with a bunch shell scripts which give me everything except the Refactoring (which I sorely miss, I can tell you). On Windows, you're rather stuck when it comes Ruby dev tooling (at least for now). In my experience, at least to begin with you can do with IronRuby what most people do with JRuby - develop on Ubuntu/OSX using the MRI and deploy onto IronRuby on Windows. You get the developer productivity boost associated with any *nix based OS and the ability to finally deploy onto Windows. You'll need to watch out for gem dependencies though, since only the pure Ruby ones will be automatically available on IronRuby. Best, Sidu. http://blog.sidu.in http://twitter.com/ponnappa > > I have been playing with IronRuby 0.9.2 for a week or so and I have > to say that it is alot of fun to tinker with, I am having alot of > trouble trying to figure out where I would really use this though > besides maybe in writing scripts to do little things or to help out > with builds. My development is all desktop Client/Server code. I see > people mention testing and rapid development, I think I can actually > develop a fair bit quicker given current tools. I really am > interested in working this in if I can see some areas that it would be > helpful. > > Thanks, > Patrick > ------------------------------------------------------------------------ > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > From patrickcbrown at gmail.com Thu Nov 12 18:49:17 2009 From: patrickcbrown at gmail.com (Patrick Brown) Date: Thu, 12 Nov 2009 18:49:17 -0500 Subject: [Ironruby-core] call an overloaded constructor?? Message-ID: <48163ce60911121549l5525af18q3f28773dd44d3a9d@mail.gmail.com> Hi Is there a way for me to call an overloaded constructor?? I want to say date = new DateTime(2009,9,28) using IronRuby 0.9.2. I have been searching quite a bit and haven't seen anything so far. Thank you, Patrick -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Thu Nov 12 19:11:26 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Fri, 13 Nov 2009 01:11:26 +0100 Subject: [Ironruby-core] call an overloaded constructor?? In-Reply-To: <48163ce60911121549l5525af18q3f28773dd44d3a9d@mail.gmail.com> References: <48163ce60911121549l5525af18q3f28773dd44d3a9d@mail.gmail.com> Message-ID: But you can just use the ruby way and that is a lot less noisy for a local time Time.local 2009, 9, 28 http://ruby-doc.org/core/classes/Time.html#M000254 for utc Time.utc 2009, 9, 29 http://ruby-doc.org/core/classes/Time.html#M000252 It still creates a System::DateTime underneath --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Fri, Nov 13, 2009 at 12:49 AM, Patrick Brown wrote: > Hi > > Is there a way for me to call an overloaded constructor?? I want > to say date = new DateTime(2009,9,28) using IronRuby 0.9.2. I have been > searching quite a bit and haven't seen anything so far. > > Thank you, > Patrick > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tomas.Matousek at microsoft.com Thu Nov 12 19:07:45 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Fri, 13 Nov 2009 00:07:45 +0000 Subject: [Ironruby-core] call an overloaded constructor?? In-Reply-To: <48163ce60911121549l5525af18q3f28773dd44d3a9d@mail.gmail.com> References: <48163ce60911121549l5525af18q3f28773dd44d3a9d@mail.gmail.com> Message-ID: <4B342496A3EFEB48839E10BB4BF5964C171DC6E2@TK5EX14MBXC129.redmond.corp.microsoft.com> CLR DateTime type is currently mapped to Time Ruby class, so "new" uses only Ruby constructors to be compatible. However, you can use clr_new to call the CLR constructor for any CLR type with a public constructor: Time.clr_new(2009, 9, 28) You can also get the constructor method and call it like so: Time.clr_ctor.call(2009, 9, 28) This is useful when there are multiple overloads of the constructor among which we are not able to choose based upon the types of the actual arguments. Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Patrick Brown Sent: Thursday, November 12, 2009 3:49 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] call an overloaded constructor?? Hi Is there a way for me to call an overloaded constructor?? I want to say date = new DateTime(2009,9,28) using IronRuby 0.9.2. I have been searching quite a bit and haven't seen anything so far. Thank you, Patrick -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Thu Nov 12 19:07:05 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Fri, 13 Nov 2009 01:07:05 +0100 Subject: [Ironruby-core] call an overloaded constructor?? In-Reply-To: <48163ce60911121549l5525af18q3f28773dd44d3a9d@mail.gmail.com> References: <48163ce60911121549l5525af18q3f28773dd44d3a9d@mail.gmail.com> Message-ID: System::DateTime.method(:clr_new).overload(Fixnum, Fixnum, Fixnum).call 2009, 9, 28 --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Fri, Nov 13, 2009 at 12:49 AM, Patrick Brown wrote: > Hi > > Is there a way for me to call an overloaded constructor?? I want > to say date = new DateTime(2009,9,28) using IronRuby 0.9.2. I have been > searching quite a bit and haven't seen anything so far. > > Thank you, > Patrick > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Nathan_Stults at HSIHealth.com Thu Nov 12 19:16:25 2009 From: Nathan_Stults at HSIHealth.com (Nathan Stults) Date: Thu, 12 Nov 2009 16:16:25 -0800 Subject: [Ironruby-core] call an overloaded constructor?? In-Reply-To: References: <48163ce60911121549l5525af18q3f28773dd44d3a9d@mail.gmail.com> Message-ID: <790F1F63F5D2E44E91797E821B31FDBB02BC81F1@hsi-fs.HSIHealth.local> OOooooh that?s pretty?. J From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Thursday, November 12, 2009 4:07 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] call an overloaded constructor?? System::DateTime.method(:clr_new).overload(Fixnum, Fixnum, Fixnum).call 2009, 9, 28 --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Fri, Nov 13, 2009 at 12:49 AM, Patrick Brown wrote: Hi Is there a way for me to call an overloaded constructor?? I want to say date = new DateTime(2009,9,28) using IronRuby 0.9.2. I have been searching quite a bit and haven't seen anything so far. Thank you, Patrick _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: From patrickcbrown at gmail.com Thu Nov 12 21:18:27 2009 From: patrickcbrown at gmail.com (Patrick Brown) Date: Thu, 12 Nov 2009 21:18:27 -0500 Subject: [Ironruby-core] call an overloaded constructor?? In-Reply-To: References: <48163ce60911121549l5525af18q3f28773dd44d3a9d@mail.gmail.com> Message-ID: <48163ce60911121818m1b9e4724tc654116ecf85e92a@mail.gmail.com> Hi That is fine in this case, can you tell me, in cases where I can't fall back on a ruby class, is there a way to call an overloaded constructor? Your reply makes me worry a bit more. Thanks, Patrick On Thu, Nov 12, 2009 at 7:11 PM, Ivan Porto Carrero wrote: > But you can just use the ruby way and that is a lot less noisy > > for a local time > > Time.local 2009, 9, 28 > http://ruby-doc.org/core/classes/Time.html#M000254 > > for utc > Time.utc 2009, 9, 29 > http://ruby-doc.org/core/classes/Time.html#M000252 > > It still creates a System::DateTime underneath > > --- > Met vriendelijke groeten - Best regards - Salutations > Ivan Porto Carrero > Blog: http://flanders.co.nz > Google Wave: portocarrero.ivan at googlewave.com > Twitter: http://twitter.com/casualjim > Author of IronRuby in Action (http://manning.com/carrero) > > > > On Fri, Nov 13, 2009 at 12:49 AM, Patrick Brown wrote: > >> Hi >> >> Is there a way for me to call an overloaded constructor?? I want >> to say date = new DateTime(2009,9,28) using IronRuby 0.9.2. I have been >> searching quite a bit and haven't seen anything so far. >> >> Thank you, >> Patrick >> >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core >> >> > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From shay.friedman at gmail.com Fri Nov 13 01:15:52 2009 From: shay.friedman at gmail.com (Shay Friedman) Date: Fri, 13 Nov 2009 08:15:52 +0200 Subject: [Ironruby-core] call an overloaded constructor?? In-Reply-To: <48163ce60911121818m1b9e4724tc654116ecf85e92a@mail.gmail.com> References: <48163ce60911121549l5525af18q3f28773dd44d3a9d@mail.gmail.com> <48163ce60911121818m1b9e4724tc654116ecf85e92a@mail.gmail.com> Message-ID: Hi Patrick, Assuming you have the next C# class in C:\CustomAssembly.dll: namespace ClassLibrary2 { public class Class1 { public Class1(int a) { Console.WriteLine(a); } public Class1(int a, string s) { Console.WriteLine("{0} and {1}",a,s); } public Class1(bool b) { Console.WriteLine("b = {0}",b); } } } There are several constructors here. All you have to do to call a specific constructor via IronRuby, is to get the constructor method object (with clr_ctor like Tomas said), use the overload method to pick up the needed overload and call it. For example, the next IronRuby code executes all three constructors of the custom class above: require 'c:\CustomAssembly.dll' include ClassLibrary2 # Call Class1(int a) constructor: Class1.clr_ctor.overload(System::Int32).call 1 # Prints "1" # Call Class1(int a, string s) constructor Class1.clr_ctor.overload(System::Int32, System::String).call 1, "yes" # Prints "1 and yes" # Call Class1(bool b) constructor: Class1.clr_ctor.overload(System::Boolean).call true # Prints "b = true" Hope it helps, Shay. -- -------------------------------------------------- Shay Friedman Author of IronRuby Unleashed http://www.IronShay.com Follow me: http://twitter.com/ironshay On Fri, Nov 13, 2009 at 4:18 AM, Patrick Brown wrote: > Hi > > That is fine in this case, can you tell me, in cases where I can't fall > back on a ruby class, is there a way to call an overloaded constructor? > Your reply makes me worry a bit more. > > Thanks, > Patrick > > > On Thu, Nov 12, 2009 at 7:11 PM, Ivan Porto Carrero wrote: > >> But you can just use the ruby way and that is a lot less noisy >> >> for a local time >> >> Time.local 2009, 9, 28 >> http://ruby-doc.org/core/classes/Time.html#M000254 >> >> for utc >> Time.utc 2009, 9, 29 >> http://ruby-doc.org/core/classes/Time.html#M000252 >> >> It still creates a System::DateTime underneath >> >> --- >> Met vriendelijke groeten - Best regards - Salutations >> Ivan Porto Carrero >> Blog: http://flanders.co.nz >> Google Wave: portocarrero.ivan at googlewave.com >> Twitter: http://twitter.com/casualjim >> Author of IronRuby in Action (http://manning.com/carrero) >> >> >> >> On Fri, Nov 13, 2009 at 12:49 AM, Patrick Brown wrote: >> >>> Hi >>> >>> Is there a way for me to call an overloaded constructor?? I want >>> to say date = new DateTime(2009,9,28) using IronRuby 0.9.2. I have been >>> searching quite a bit and haven't seen anything so far. >>> >>> Thank you, >>> Patrick >>> >>> _______________________________________________ >>> Ironruby-core mailing list >>> Ironruby-core at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/ironruby-core >>> >>> >> >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core >> >> > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From patrickcbrown at gmail.com Fri Nov 13 09:22:42 2009 From: patrickcbrown at gmail.com (Patrick Brown) Date: Fri, 13 Nov 2009 09:22:42 -0500 Subject: [Ironruby-core] call an overloaded constructor?? In-Reply-To: References: <48163ce60911121549l5525af18q3f28773dd44d3a9d@mail.gmail.com> <48163ce60911121818m1b9e4724tc654116ecf85e92a@mail.gmail.com> Message-ID: <48163ce60911130622y52d6dd70l5306b64a78c9122b@mail.gmail.com> Hello Thank you all for your help and I have to say that I am sorry also, I missed the other replies where you came right out and told me how to do it, for some reason I only saw the one that mapped the DateTime to the Time object, you all provided very good answers to my question and I really appreciate it. Patrick On Fri, Nov 13, 2009 at 1:15 AM, Shay Friedman wrote: > Hi Patrick, > > Assuming you have the next C# class in C:\CustomAssembly.dll: > namespace ClassLibrary2 > { > public class Class1 > { > public Class1(int a) > { > Console.WriteLine(a); > } > public Class1(int a, string s) > { > Console.WriteLine("{0} and {1}",a,s); > } > public Class1(bool b) > { > Console.WriteLine("b = {0}",b); > } > } > } > > There are several constructors here. All you have to do to call a specific > constructor via IronRuby, is to get the constructor method object (with > clr_ctor like Tomas said), use the overload method to pick up the needed > overload and call it. > For example, the next IronRuby code executes all three constructors of the > custom class above: > require 'c:\CustomAssembly.dll' > > include ClassLibrary2 > > # Call Class1(int a) constructor: > Class1.clr_ctor.overload(System::Int32).call 1 > # Prints "1" > > # Call Class1(int a, string s) constructor > Class1.clr_ctor.overload(System::Int32, System::String).call 1, "yes" > # Prints "1 and yes" > > # Call Class1(bool b) constructor: > Class1.clr_ctor.overload(System::Boolean).call true > # Prints "b = true" > > Hope it helps, > Shay. > > -- > -------------------------------------------------- > Shay Friedman > Author of IronRuby Unleashed > http://www.IronShay.com > Follow me: http://twitter.com/ironshay > > > On Fri, Nov 13, 2009 at 4:18 AM, Patrick Brown wrote: > >> Hi >> >> That is fine in this case, can you tell me, in cases where I can't fall >> back on a ruby class, is there a way to call an overloaded constructor? >> Your reply makes me worry a bit more. >> >> Thanks, >> Patrick >> >> >> On Thu, Nov 12, 2009 at 7:11 PM, Ivan Porto Carrero wrote: >> >>> But you can just use the ruby way and that is a lot less noisy >>> >>> for a local time >>> >>> Time.local 2009, 9, 28 >>> http://ruby-doc.org/core/classes/Time.html#M000254 >>> >>> for utc >>> Time.utc 2009, 9, 29 >>> http://ruby-doc.org/core/classes/Time.html#M000252 >>> >>> It still creates a System::DateTime underneath >>> >>> --- >>> Met vriendelijke groeten - Best regards - Salutations >>> Ivan Porto Carrero >>> Blog: http://flanders.co.nz >>> Google Wave: portocarrero.ivan at googlewave.com >>> Twitter: http://twitter.com/casualjim >>> Author of IronRuby in Action (http://manning.com/carrero) >>> >>> >>> >>> On Fri, Nov 13, 2009 at 12:49 AM, Patrick Brown < >>> patrickcbrown at gmail.com> wrote: >>> >>>> Hi >>>> >>>> Is there a way for me to call an overloaded constructor?? I want >>>> to say date = new DateTime(2009,9,28) using IronRuby 0.9.2. I have been >>>> searching quite a bit and haven't seen anything so far. >>>> >>>> Thank you, >>>> Patrick >>>> >>>> _______________________________________________ >>>> Ironruby-core mailing list >>>> Ironruby-core at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/ironruby-core >>>> >>>> >>> >>> _______________________________________________ >>> Ironruby-core mailing list >>> Ironruby-core at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/ironruby-core >>> >>> >> >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core >> >> > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From patrickcbrown at gmail.com Fri Nov 13 12:36:40 2009 From: patrickcbrown at gmail.com (Patrick Brown) Date: Fri, 13 Nov 2009 12:36:40 -0500 Subject: [Ironruby-core] IronRuby .Net 4 CTP and dynamic Message-ID: <48163ce60911130936y7fed7775k7d87c3e9dfe6e112@mail.gmail.com> Hi Should I be able to call out to a C# method with this release that returns a dynamic and access it's return value? public class Modifier { public dynamic Modify(IPropertyPolicyInfo info) { dynamic obj = new ExpandoObject(); obj.Name = info.AccountShortName; obj.Address = new ExpandoObject(); obj.Address.LineOne = info.PolicyHQAddressLine1; obj.Address.City = info.PolicyHQCityName; return obj; } } I get an exception saying "Unbound variable:value" when puts attempts to access t.Name. I watch it in the debugger and can see that the dynamic object is fully populated prior to sending back to the script. policies.each { |info| t = modifier.Modify(info) puts t.Name } Thanks, Patrick -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ruby-forum.com Fri Nov 13 13:22:34 2009 From: lists at ruby-forum.com (Alexandre Mutel) Date: Fri, 13 Nov 2009 19:22:34 +0100 Subject: [Ironruby-core] Calling a C# static from IronRuby Message-ID: Hi all, Is there any way to declare a C# static method accessible from IronRuby as a regular Ruby method? like: public class MyCSharpClass { public static string mymethod(string test) { return test + "yes"; } } in ironruby: puts mymethod("test") -- Posted via http://www.ruby-forum.com/. From ivan at flanders.co.nz Fri Nov 13 14:03:45 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Fri, 13 Nov 2009 20:03:45 +0100 Subject: [Ironruby-core] Calling a C# static from IronRuby In-Reply-To: References: Message-ID: You can only reach it by adding the class as receiver. but you can use method missing as a dispatcher: alias :old_mm :method_missing def method_missing(method_name, *args, &block) return MyCSharpClass.send(method_name, *args) if MyCSharpClass.respond_to? method_name old_mn method_name, *args, &block end try this in a console :) alias :old_mm :method_missing def method_missing(method_name, *args, &block) return System::Math.send(method_name, *args) if System::Math.respond_to? method_name old_mn method_name, *args, &block end puts pi --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Fri, Nov 13, 2009 at 7:22 PM, Alexandre Mutel wrote: > Hi all, > Is there any way to declare a C# static method accessible from IronRuby > as a regular Ruby method? > like: > public class MyCSharpClass { > public static string mymethod(string test) { > return test + "yes"; > } > } > > in ironruby: > puts mymethod("test") > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: From shay.friedman at gmail.com Fri Nov 13 14:06:29 2009 From: shay.friedman at gmail.com (Shay Friedman) Date: Fri, 13 Nov 2009 21:06:29 +0200 Subject: [Ironruby-core] Calling a C# static from IronRuby In-Reply-To: References: Message-ID: I guess you can do that in two ways. The first one is to add a statement in Ruby code: class Object def mymethod(str) MyCSharpClass.mymethod(str) end end Or you can write an IronRuby extension in C# and make that class extend the Object class. Shay. -- -------------------------------------------------- Shay Friedman Author of IronRuby Unleashed http://www.IronShay.com Follow me: http://twitter.com/ironshay On Fri, Nov 13, 2009 at 8:22 PM, Alexandre Mutel wrote: > Hi all, > Is there any way to declare a C# static method accessible from IronRuby > as a regular Ruby method? > like: > public class MyCSharpClass { > public static string mymethod(string test) { > return test + "yes"; > } > } > > in ironruby: > puts mymethod("test") > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jimmy.Schementi at microsoft.com Fri Nov 13 15:07:47 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Fri, 13 Nov 2009 20:07:47 +0000 Subject: [Ironruby-core] Calling a C# static from IronRuby In-Reply-To: References: Message-ID: <1B42307CD4AADD438CDDA2FE1121CC92038407@TK5EX14MBXC134.redmond.corp.microsoft.com> FYI, we?re thinking about allowing you to use ?include? with .NET types, which will include it?s static methods. That would enable: include MyCSharpClass puts mymethod "foo" IronPython already does this for import, so it seems like a good idea: from MyCSharpClass import mymethod print mymethod("foo") ~Jimmy From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Friday, November 13, 2009 11:04 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Calling a C# static from IronRuby You can only reach it by adding the class as receiver. but you can use method missing as a dispatcher: alias :old_mm :method_missing def method_missing(method_name, *args, &block) return MyCSharpClass.send(method_name, *args) if MyCSharpClass.respond_to? method_name old_mn method_name, *args, &block end try this in a console :) alias :old_mm :method_missing def method_missing(method_name, *args, &block) return System::Math.send(method_name, *args) if System::Math.respond_to? method_name old_mn method_name, *args, &block end puts pi --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Fri, Nov 13, 2009 at 7:22 PM, Alexandre Mutel > wrote: Hi all, Is there any way to declare a C# static method accessible from IronRuby as a regular Ruby method? like: public class MyCSharpClass { public static string mymethod(string test) { return test + "yes"; } } in ironruby: puts mymethod("test") -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Fri Nov 13 15:29:39 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Fri, 13 Nov 2009 21:29:39 +0100 Subject: [Ironruby-core] Calling a C# static from IronRuby In-Reply-To: <1B42307CD4AADD438CDDA2FE1121CC92038407@TK5EX14MBXC134.redmond.corp.microsoft.com> References: <1B42307CD4AADD438CDDA2FE1121CC92038407@TK5EX14MBXC134.redmond.corp.microsoft.com> Message-ID: My 2c on the matter I think Ruby on .NET is great and stuff like the clr_new, overloads etc are a necessary evil to ease working with CLR classes. But I do think that changing a basic construct like include will not be good unless the other rubies also include it. The reason for it is you only use clr_new (which is aptly prefixed btw) or overload etc when you're working with the CLR but include you use in other implementations too and then it won't behave consistently across the board. --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Fri, Nov 13, 2009 at 9:07 PM, Jimmy Schementi < Jimmy.Schementi at microsoft.com> wrote: > FYI, we?re thinking about allowing you to use ?include? with .NET types, > which will include it?s static methods. That would enable: > > > > include MyCSharpClass > > puts mymethod "foo" > > > > IronPython already does this for import, so it seems like a good idea: > > > > from MyCSharpClass import mymethod > > print mymethod("foo") > > > > ~Jimmy > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Ivan Porto Carrero > *Sent:* Friday, November 13, 2009 11:04 AM > *To:* ironruby-core at rubyforge.org > *Subject:* Re: [Ironruby-core] Calling a C# static from IronRuby > > > > You can only reach it by adding the class as receiver. > > > > but you can use method missing as a dispatcher: > > > > alias :old_mm :method_missing > > def method_missing(method_name, *args, &block) > > return MyCSharpClass.send(method_name, *args) if MyCSharpClass.respond_to? > method_name > > old_mn method_name, *args, &block > > end > > > > > > > > try this in a console :) > > > > alias :old_mm :method_missing > > def method_missing(method_name, *args, &block) > > return System::Math.send(method_name, *args) if System::Math.respond_to? > method_name > > old_mn method_name, *args, &block > > end > > > > puts pi > > --- > Met vriendelijke groeten - Best regards - Salutations > Ivan Porto Carrero > Blog: http://flanders.co.nz > Google Wave: portocarrero.ivan at googlewave.com > Twitter: http://twitter.com/casualjim > Author of IronRuby in Action (http://manning.com/carrero) > > > On Fri, Nov 13, 2009 at 7:22 PM, Alexandre Mutel > wrote: > > Hi all, > Is there any way to declare a C# static method accessible from IronRuby > as a regular Ruby method? > like: > public class MyCSharpClass { > public static string mymethod(string test) { > return test + "yes"; > } > } > > in ironruby: > puts mymethod("test") > -- > 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: From lists at ruby-forum.com Fri Nov 13 16:25:49 2009 From: lists at ruby-forum.com (Alexandre Mutel) Date: Fri, 13 Nov 2009 22:25:49 +0100 Subject: [Ironruby-core] Calling a C# static from IronRuby In-Reply-To: References: Message-ID: <1bccdc8a3cbcba5dd4d1c4052aa36754@ruby-forum.com> Ivan Porto carrero wrote: > You can only reach it by adding the class as receiver. > > but you can use method missing as a dispatcher: > > alias :old_mm :method_missing > def method_missing(method_name, *args, &block) > return MyCSharpClass.send(method_name, *args) if > MyCSharpClass.respond_to? > method_name > old_mn method_name, *args, &block > end > > Thanks, it's a nice workaround, i didn't know about the "method_missing". Is there any way to do it C#, through the DLR (i didn't see anything about this, as it's obviously language dependent) or custom IronRuby classes? The reason is i have a lots of method that would be called this way and i would like to use the most efficient way to do it. On a similar subject, is there a way to resolve dynamic variable at runtime? Like, a user type a variable that was not declared, but the DLR host is able to create on the fly an object for this variable and return it. Is it possible? Is "IDynamicMetaObjectProvider" and "IAttributesCollections" on CreateScope() are used for that? > FYI, we?re thinking about allowing you to use ?include? with .NET types, > which will include it?s static methods. That would enable: > include MyCSharpClass > puts mymethod "foo" Good, i used this similar method in IronPython, so IronRuby probably deserve this kind of static import! Thanks for your quick response. -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Fri Nov 13 16:45:03 2009 From: lists at ruby-forum.com (Alexandre Mutel) Date: Fri, 13 Nov 2009 22:45:03 +0100 Subject: [Ironruby-core] Calling a C# static from IronRuby In-Reply-To: <1bccdc8a3cbcba5dd4d1c4052aa36754@ruby-forum.com> References: <1bccdc8a3cbcba5dd4d1c4052aa36754@ruby-forum.com> Message-ID: > On a similar subject, is there a way to resolve dynamic variable at > runtime? Like, a user type a variable that was not declared, but the DLR > host is able to create on the fly an object for this variable and return > it. Is it possible? Is "IDynamicMetaObjectProvider" and > "IAttributesCollections" on CreateScope() are used for that? > By the way, i'm trying to play with IDynamicMetaObjectProvider with IronRuby0.92 and Visual Studio 2010 Beta 2 and i'm getting some conflicts with System.Core... What are the reference assembly to include to avoid such conflicts? -- Posted via http://www.ruby-forum.com/. From orion.edwards at gmail.com Fri Nov 13 16:50:28 2009 From: orion.edwards at gmail.com (Orion Edwards) Date: Sat, 14 Nov 2009 10:50:28 +1300 Subject: [Ironruby-core] Calling a C# static from IronRuby In-Reply-To: References: <1B42307CD4AADD438CDDA2FE1121CC92038407@TK5EX14MBXC134.redmond.corp.microsoft.com> Message-ID: > On Fri, Nov 13, 2009 at 9:07 PM, Jimmy Schementi > wrote: > FYI, we?re thinking about allowing you to use ?include? with .NET > types, which will include it?s static methods. That would enable: > > I'd be very much in favour of this. A .NET static class full of static methods always seemed like it would be a good map to a ruby Module to me. Whether you want to limit the 'include' functionality to only work with static classes, or just work for static methods on any old class I think is up for debate. I'd go for 'any old class', but I generally fall on the 'be as permissive as possible' side of the fence, so others may not agree :-) > On 14/11/2009, at 9:29 AM, Ivan Porto Carrero wrote: > > I think Ruby on .NET is great and stuff like the clr_new, overloads > etc are a necessary evil to ease working with CLR classes. > But I do think that changing a basic construct like include will not > be good unless the other rubies also include it. The reason for it > is you only use clr_new (which is aptly prefixed btw) or overload > etc when you're working with the CLR but include you use in other > implementations too and then it won't behave consistently across the > board. While consistency with other Ruby implementations is obviously important, this is a CLR interop feature and shouldn't affect the normal ruby behavior of include, so I don't see how it affects consistency with other implementations at all?. It seems similar to being able to use include on .NET namespaces from IronRuby, which is of course also non-standard -------------- next part -------------- An HTML attachment was scrubbed... URL: From wilkins.mark at gmail.com Fri Nov 13 17:04:46 2009 From: wilkins.mark at gmail.com (Mark Wilkins) Date: Fri, 13 Nov 2009 17:04:46 -0500 Subject: [Ironruby-core] Interop with Sql Mgmt Objects (SMO) - the "IronRuby Way" Message-ID: <1127fc0f0911131404o6c632784nce5440e5f2d1eb74@mail.gmail.com> Thanks to casualjim in #ironruby, I figured out a way to do what I needed, but would be interested to see if there is a more appropriate solution: I'm trying to use SMO to script objects from a SqlServer DB, using IR. In particular, I am calling Microsoft::SqlServer::Management::Smo::Scripter.Script, which expects an array of SmoObject's (SmoObject[]). So...what is the best way to create this array? I ended up doing the following: @arsmo = System::Collections::Generic::List[SqlSmoObject].new @arsmo << dev.tables["tablename"] # where dev.tables is a Smo::TableCollection scripter.Script @arsmo.to_array As I said...this works fine. And...it also reminded me that @arsmo.to_array is much different than @arsmo.to_a. Just curious if there is a better way? I've tried something as simple as:: @arsmo = [] @arsmo << dev.tables["tablename"] scripter.Script @arsmo but I always get: "TypeError: can't convert Array into Microsoft::SqlServer::Management::Smo::SqlSmoObject[]" p.s. I know I can also do dev.tables["tablename"].script, but I was trying to assemble a list of everything I wanted scripted, then make one call Thanks Mark From Jimmy.Schementi at microsoft.com Fri Nov 13 19:24:31 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Sat, 14 Nov 2009 00:24:31 +0000 Subject: [Ironruby-core] Calling a C# static from IronRuby In-Reply-To: References: <1bccdc8a3cbcba5dd4d1c4052aa36754@ruby-forum.com> Message-ID: <1B42307CD4AADD438CDDA2FE1121CC9203873A@TK5EX14MBXC134.redmond.corp.microsoft.com> > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Alexandre Mutel > Sent: Friday, November 13, 2009 1:45 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Calling a C# static from IronRuby > > > On a similar subject, is there a way to resolve dynamic variable at > > runtime? Like, a user type a variable that was not declared, but the > > DLR host is able to create on the fly an object for this variable and > > return it. Is it possible? Is "IDynamicMetaObjectProvider" and > > "IAttributesCollections" on CreateScope() are used for that? > > > By the way, i'm trying to play with IDynamicMetaObjectProvider with > IronRuby0.92 and Visual Studio 2010 Beta 2 and i'm getting some conflicts > with System.Core... What are the reference assembly to include to avoid such > conflicts? Here's the current build specifically for .Net 4.0: http://ironruby.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=33305 The conflicts you're seeing between System.Core and Microsoft.Scripting.Core are because all of Microsoft.Scripting.Core was moved into System.Core for .NET 4.0. I think you can always alias System.Core to use 0.9.2 in .NET 4.0, but you won't able to take advantage of any of the "dynamic" features. ~js From Jimmy.Schementi at microsoft.com Sun Nov 15 22:32:29 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Mon, 16 Nov 2009 03:32:29 +0000 Subject: [Ironruby-core] How to run a XAML file? In-Reply-To: <16591a1ad4bb2e5ac17793631c763015@ruby-forum.com> References: <16591a1ad4bb2e5ac17793631c763015@ruby-forum.com> Message-ID: <1B42307CD4AADD438CDDA2FE1121CC92039642@TK5EX14MBXC134.redmond.corp.microsoft.com> I was looking through the mailing list archives for unanswered mails ... eek, sorry Shay! Well, if you still have this question ... You can also load XAML with System::Window::Application.LoadComponent: # This loads "foo.xaml" into the "canvas" variable include System include System::Windows include System::Windows::Controls canvas = Canvas.new Application.load_component canvas, Uri.new("foo.xaml", UriKind.relative) This only works when foo.xaml has a x:Class equal to the type passed to the first arg to load_component, like x:Class="System.Windows.Controls.Canvas". ~Jimmy > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Shay Friedman > Sent: Friday, July 24, 2009 2:34 AM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] How to run a XAML file? > > Hi, > > I have a WPF xaml file and I'd like to execute it using IronRuby. I know I > can use the System::Windows::Markup::XamlReader.parse method, but is there > another way? > > Using the XamlReader class makes registering events, for example, kind of an > irritating task. > > Thanks, > Shay. > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From shay.friedman at gmail.com Mon Nov 16 00:52:46 2009 From: shay.friedman at gmail.com (Shay Friedman) Date: Mon, 16 Nov 2009 07:52:46 +0200 Subject: [Ironruby-core] How to run a XAML file? In-Reply-To: <1B42307CD4AADD438CDDA2FE1121CC92039642@TK5EX14MBXC134.redmond.corp.microsoft.com> References: <16591a1ad4bb2e5ac17793631c763015@ruby-forum.com> <1B42307CD4AADD438CDDA2FE1121CC92039642@TK5EX14MBXC134.redmond.corp.microsoft.com> Message-ID: Thanks Jimmy :) On Mon, Nov 16, 2009 at 5:32 AM, Jimmy Schementi < Jimmy.Schementi at microsoft.com> wrote: > I was looking through the mailing list archives for unanswered mails ... > eek, sorry Shay! Well, if you still have this question ... > > You can also load XAML with System::Window::Application.LoadComponent: > > # This loads "foo.xaml" into the "canvas" variable > include System > include System::Windows > include System::Windows::Controls > canvas = Canvas.new > Application.load_component canvas, Uri.new("foo.xaml", UriKind.relative) > > This only works when foo.xaml has a x:Class equal to the type passed to the > first arg to load_component, like x:Class="System.Windows.Controls.Canvas". > > ~Jimmy > > > -----Original Message----- > > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > > bounces at rubyforge.org] On Behalf Of Shay Friedman > > Sent: Friday, July 24, 2009 2:34 AM > > To: ironruby-core at rubyforge.org > > Subject: [Ironruby-core] How to run a XAML file? > > > > Hi, > > > > I have a WPF xaml file and I'd like to execute it using IronRuby. I know > I > > can use the System::Windows::Markup::XamlReader.parse method, but is > there > > another way? > > > > Using the XamlReader class makes registering events, for example, kind of > an > > irritating task. > > > > Thanks, > > Shay. > > -- > > 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 > -- -------------------------------------------------- Shay Friedman Author of IronRuby Unleashed http://www.IronShay.com Follow me: http://twitter.com/ironshay -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken1hasimoto at gmail.com Mon Nov 16 03:44:33 2009 From: ken1hasimoto at gmail.com (=?ISO-2022-JP?B?GyRCJE8kNyRiJEgkMSRzJCQkQRsoQg==?=) Date: Mon, 16 Nov 2009 17:44:33 +0900 Subject: [Ironruby-core] IO#read for socket (SocketStream.cs) Message-ID: Hello, I'm kenichi hashimoto. I'm Japanese. I don't write english well. ------------- I modified the IronRuby Libirary for reading from the socket to run the script of the druby-library. The druby library is contained the standard ruby library. [BACKGROUND] I wrote two scripts that use the druby, and I tested it. I saw a exception of the druby when a client script requested to the server script ( I wrote both the client and the server ) on the IronRuby 0.9.2. This exception means that 'the druby library read the datum from the socket, but size is corrputed'. Of course, this scripts is not occurred the exception in Matz Ruby 1.8.7 and 1.9.1. [CAUSE] I confirm that protocol of the druby and communication seq, I found the error that when the druby requests to read the socket with a size, sometimes the read methods return a data smaller than specify the read method. The Ruby IO#Read( size ) MUST recive the buffer required size. If buffer is reached the request size, IO#read must block. [INVESTIGATION] I found the mistake in the \ironruby\Merlin\Main\Languages\Ruby\Libraries.LCA_RESTRICTED\Socket\SocketStream.cs . "_socket.Receive" does NOT block to reach the request size. public override int Read(byte[] buffer, int offset, int count) { int bytesToRead = _peeked ? count - 1 : count; byte[] readBuffer = new byte[bytesToRead]; long oldPos = _pos; if (bytesToRead > 0) { int bytesRead = _socket.Receive(readBuffer, bytesToRead, SocketFlags.None); _pos += bytesRead; } I rewrote bellow: int updatedOffset = 0; while (bytesToRead > 0) { int bytesRead = 0; if (bytesToRead > 0) { bytesRead = _socket.Receive(readBuffer, bytesToRead, SocketFlags.None); _pos += bytesRead; bytesToRead -= bytesRead; } if (_peeked) { // Put the byte we've already peeked at the beginning of the buffer buffer[offset] = _lastByteRead; // Put the rest of the data afterwards Array.Copy(readBuffer, 0, buffer, offset + 1 + updatedOffset, bytesRead); _pos += 1; _peeked = false; } else { Array.Copy(readBuffer, 0, buffer, offset + updatedOffset, bytesRead); } updatedOffset += bytesRead; } Note: This code assumes the 'count > 0'. And I didn't consider about efficiency of the code. If my consider is correct, Please modify this problem. Thank you B.R. Kenichi HASHIMOTO. From Tomas.Matousek at microsoft.com Mon Nov 16 11:57:23 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Mon, 16 Nov 2009 16:57:23 +0000 Subject: [Ironruby-core] IO#read for socket (SocketStream.cs) In-Reply-To: References: Message-ID: <4B342496A3EFEB48839E10BB4BF5964C171DDFE0@TK5EX14MBXC129.redmond.corp.microsoft.com> I've filed a bug http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=3122. Thanks for the report and fix, Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of ???????? Sent: Monday, November 16, 2009 12:45 AM To: Ironruby-core Subject: [Ironruby-core] IO#read for socket (SocketStream.cs) Hello, I'm kenichi hashimoto. I'm Japanese. I don't write english well. ------------- I modified the IronRuby Libirary for reading from the socket to run the script of the druby-library. The druby library is contained the standard ruby library. [BACKGROUND] I wrote two scripts that use the druby, and I tested it. I saw a exception of the druby when a client script requested to the server script ( I wrote both the client and the server ) on the IronRuby 0.9.2. This exception means that 'the druby library read the datum from the socket, but size is corrputed'. Of course, this scripts is not occurred the exception in Matz Ruby 1.8.7 and 1.9.1. [CAUSE] I confirm that protocol of the druby and communication seq, I found the error that when the druby requests to read the socket with a size, sometimes the read methods return a data smaller than specify the read method. The Ruby IO#Read( size ) MUST recive the buffer required size. If buffer is reached the request size, IO#read must block. [INVESTIGATION] I found the mistake in the \ironruby\Merlin\Main\Languages\Ruby\Libraries.LCA_RESTRICTED\Socket\SocketStream.cs . "_socket.Receive" does NOT block to reach the request size. public override int Read(byte[] buffer, int offset, int count) { int bytesToRead = _peeked ? count - 1 : count; byte[] readBuffer = new byte[bytesToRead]; long oldPos = _pos; if (bytesToRead > 0) { int bytesRead = _socket.Receive(readBuffer, bytesToRead, SocketFlags.None); _pos += bytesRead; } I rewrote bellow: int updatedOffset = 0; while (bytesToRead > 0) { int bytesRead = 0; if (bytesToRead > 0) { bytesRead = _socket.Receive(readBuffer, bytesToRead, SocketFlags.None); _pos += bytesRead; bytesToRead -= bytesRead; } if (_peeked) { // Put the byte we've already peeked at the beginning of the buffer buffer[offset] = _lastByteRead; // Put the rest of the data afterwards Array.Copy(readBuffer, 0, buffer, offset + 1 + updatedOffset, bytesRead); _pos += 1; _peeked = false; } else { Array.Copy(readBuffer, 0, buffer, offset + updatedOffset, bytesRead); } updatedOffset += bytesRead; } Note: This code assumes the 'count > 0'. And I didn't consider about efficiency of the code. If my consider is correct, Please modify this problem. Thank you B.R. Kenichi HASHIMOTO. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From ken1hasimoto at gmail.com Tue Nov 17 00:23:24 2009 From: ken1hasimoto at gmail.com (=?ISO-2022-JP?B?GyRCJE8kNyRiJEgkMSRzJCQkQRsoQg==?=) Date: Tue, 17 Nov 2009 14:23:24 +0900 Subject: [Ironruby-core] IO#read for socket (SocketStream.cs) In-Reply-To: <4B342496A3EFEB48839E10BB4BF5964C171DDFE0@TK5EX14MBXC129.redmond.corp.microsoft.com> References: <4B342496A3EFEB48839E10BB4BF5964C171DDFE0@TK5EX14MBXC129.redmond.corp.microsoft.com> Message-ID: Thank you for filing my report. I forgot to attach my test scripts.(Sorry, it is NOT rubyspec.) I attach two test case that was used in my investigation work. 1. druby test case. How to execute First c:\> ir.exe server.rb Second c:\> ir.exe client_2.rb client_2.rb does NOT raise Exception in matz ruby. 2. TCPServer/TCPSocket test case. How to execute First c:\> ir.exe s.rb Second c:\> ir.exe c.rb c.rb does NOT display "false" line to console in matz ruby. NOTE: I think that '0x0a' char cause the problem of my report. Because, if buffer does NOT contain the '0x0a' char, my socket program is success. I guess that below: 1st:The writer program send a buffer (that contained the '0x0a' char) to write socket stream, it do flush stream every '0x0a' char. Next:The write socket stream send out a packet (that is splited by '0x0a' char) to a Network stack. Thus:The packet is fragmented, and the reader program receives a packet smaller than sent buffer. (Of course, the reader program can receive a remain data in the next API call.) Thank you. B.R. Kenichi HASHIMOTO 2009/11/17 Tomas Matousek : > I've filed a bug http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=3122. > > Thanks for the report and fix, > Tomas > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of ???????? > Sent: Monday, November 16, 2009 12:45 AM > To: Ironruby-core > Subject: [Ironruby-core] IO#read for socket (SocketStream.cs) > > Hello, I'm kenichi hashimoto. > I'm Japanese. I don't write english well. > > ------------- > I modified the IronRuby Libirary for reading from the socket to run the script of the druby-library. > The druby library is contained the standard ruby library. > > [BACKGROUND] > I wrote two scripts that use the druby, and I tested it. > I saw a exception of the druby when a client script requested to the server script ( I wrote both the client and the server ) on the IronRuby 0.9.2. > This exception means that 'the druby library read the datum from the socket, but size is corrputed'. > Of course, this scripts is not occurred the exception in Matz Ruby > 1.8.7 and 1.9.1. > > [CAUSE] > I confirm that protocol of the druby and communication seq, I found the error that when the druby requests to read the socket with a size, sometimes the read methods return a data smaller than specify the read method. > The Ruby IO#Read( size ) MUST recive the buffer required size. If buffer is reached the request size, IO#read must block. > > > [INVESTIGATION] > I found the mistake in the > \ironruby\Merlin\Main\Languages\Ruby\Libraries.LCA_RESTRICTED\Socket\SocketStream.cs > . > "_socket.Receive" does NOT block to reach the request size. > > ? ? ? ?public override int Read(byte[] buffer, int offset, int count) { > ? ? ? ? ? ?int bytesToRead = _peeked ? count - 1 : count; > ? ? ? ? ? ?byte[] readBuffer = new byte[bytesToRead]; > ? ? ? ? ? ?long oldPos = _pos; > > ? ? ? ? ? ?if (bytesToRead > 0) { > ? ? ? ? ? ? ? ?int bytesRead = _socket.Receive(readBuffer, bytesToRead, SocketFlags.None); > ? ? ? ? ? ? ? ?_pos += bytesRead; > ? ? ? ? ? ?} > > I rewrote bellow: > > ? ? ? ? ? ?int updatedOffset = 0; > ? ? ? ? ? ?while (bytesToRead > 0) > ? ? ? ? ? ?{ > ? ? ? ? ? ? ? ?int bytesRead = 0; > ? ? ? ? ? ? ? ?if (bytesToRead > 0) > ? ? ? ? ? ? ? ?{ > ? ? ? ? ? ? ? ? ? ?bytesRead = _socket.Receive(readBuffer, bytesToRead, SocketFlags.None); > ? ? ? ? ? ? ? ? ? ?_pos += bytesRead; > ? ? ? ? ? ? ? ? ? ?bytesToRead -= bytesRead; > ? ? ? ? ? ? ? ?} > > ? ? ? ? ? ? ? ?if (_peeked) > ? ? ? ? ? ? ? ?{ > ? ? ? ? ? ? ? ? ? ?// Put the byte we've already peeked at the beginning of the buffer > ? ? ? ? ? ? ? ? ? ?buffer[offset] = _lastByteRead; > ? ? ? ? ? ? ? ? ? ?// Put the rest of the data afterwards > ? ? ? ? ? ? ? ? ? ?Array.Copy(readBuffer, 0, buffer, offset + 1 + updatedOffset, bytesRead); > ? ? ? ? ? ? ? ? ? ?_pos += 1; > ? ? ? ? ? ? ? ? ? ?_peeked = false; > ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ?else > ? ? ? ? ? ? ? ?{ > ? ? ? ? ? ? ? ? ? ?Array.Copy(readBuffer, 0, buffer, offset + updatedOffset, bytesRead); > ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ?updatedOffset += bytesRead; > ? ? ? ? ? ?} > > ?Note: > ? ?This code assumes the 'count > 0'. > ? ?And I didn't consider about efficiency of the code. > > If my consider is correct, Please modify this problem. > > Thank you > B.R. Kenichi HASHIMOTO. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -------------- next part -------------- A non-text attachment was scrubbed... Name: test_script.zip Type: application/zip Size: 1991 bytes Desc: not available URL: From kevin.radcliffe at gmail.com Tue Nov 17 01:08:31 2009 From: kevin.radcliffe at gmail.com (Kevin Radcliffe) Date: Mon, 16 Nov 2009 23:08:31 -0700 Subject: [Ironruby-core] IO#read for socket (SocketStream.cs) In-Reply-To: References: <4B342496A3EFEB48839E10BB4BF5964C171DDFE0@TK5EX14MBXC129.redmond.corp.microsoft.com> Message-ID: <131af5e0911162208o273c27ccr618ee39e6645f690@mail.gmail.com> Hashimoto-san, Thanks I've attached your tests scripts and script explanation to the codeplex issue here: http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=3122 Best Regards, Kevin Radcliffe 2009/11/16 ???????? > Thank you for filing my report. > > I forgot to attach my test scripts.(Sorry, it is NOT rubyspec.) > I attach two test case that was used in my investigation work. > > 1. druby test case. > > How to execute > First c:\> ir.exe server.rb > Second c:\> ir.exe client_2.rb > > client_2.rb does NOT raise Exception in matz ruby. > > 2. TCPServer/TCPSocket test case. > > How to execute > First c:\> ir.exe s.rb > Second c:\> ir.exe c.rb > > c.rb does NOT display "false" line to console in matz ruby. > > NOTE: > I think that '0x0a' char cause the problem of my report. > Because, if buffer does NOT contain the '0x0a' char, my socket program > is success. > I guess that below: > 1st:The writer program send a buffer (that contained the '0x0a' char) > to write socket stream, it do flush stream every '0x0a' char. > Next:The write socket stream send out a packet (that is splited by > '0x0a' char) to a Network stack. > Thus:The packet is fragmented, and the reader program receives a > packet smaller than sent buffer. > (Of course, the reader program can receive a remain data in the > next API call.) > > Thank you. > B.R. Kenichi HASHIMOTO > > 2009/11/17 Tomas Matousek : > > I've filed a bug > http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=3122. > > > > Thanks for the report and fix, > > Tomas > > > > -----Original Message----- > > From: ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] On Behalf Of ???????? > > Sent: Monday, November 16, 2009 12:45 AM > > To: Ironruby-core > > Subject: [Ironruby-core] IO#read for socket (SocketStream.cs) > > > > Hello, I'm kenichi hashimoto. > > I'm Japanese. I don't write english well. > > > > ------------- > > I modified the IronRuby Libirary for reading from the socket to run the > script of the druby-library. > > The druby library is contained the standard ruby library. > > > > [BACKGROUND] > > I wrote two scripts that use the druby, and I tested it. > > I saw a exception of the druby when a client script requested to the > server script ( I wrote both the client and the server ) on the IronRuby > 0.9.2. > > This exception means that 'the druby library read the datum from the > socket, but size is corrputed'. > > Of course, this scripts is not occurred the exception in Matz Ruby > > 1.8.7 and 1.9.1. > > > > [CAUSE] > > I confirm that protocol of the druby and communication seq, I found the > error that when the druby requests to read the socket with a size, sometimes > the read methods return a data smaller than specify the read method. > > The Ruby IO#Read( size ) MUST recive the buffer required size. If buffer > is reached the request size, IO#read must block. > > > > > > [INVESTIGATION] > > I found the mistake in the > > > \ironruby\Merlin\Main\Languages\Ruby\Libraries.LCA_RESTRICTED\Socket\SocketStream.cs > > . > > "_socket.Receive" does NOT block to reach the request size. > > > > public override int Read(byte[] buffer, int offset, int count) { > > int bytesToRead = _peeked ? count - 1 : count; > > byte[] readBuffer = new byte[bytesToRead]; > > long oldPos = _pos; > > > > if (bytesToRead > 0) { > > int bytesRead = _socket.Receive(readBuffer, bytesToRead, > SocketFlags.None); > > _pos += bytesRead; > > } > > > > I rewrote bellow: > > > > int updatedOffset = 0; > > while (bytesToRead > 0) > > { > > int bytesRead = 0; > > if (bytesToRead > 0) > > { > > bytesRead = _socket.Receive(readBuffer, bytesToRead, > SocketFlags.None); > > _pos += bytesRead; > > bytesToRead -= bytesRead; > > } > > > > if (_peeked) > > { > > // Put the byte we've already peeked at the beginning > of the buffer > > buffer[offset] = _lastByteRead; > > // Put the rest of the data afterwards > > Array.Copy(readBuffer, 0, buffer, offset + 1 + > updatedOffset, bytesRead); > > _pos += 1; > > _peeked = false; > > } > > else > > { > > Array.Copy(readBuffer, 0, buffer, offset + > updatedOffset, bytesRead); > > } > > updatedOffset += bytesRead; > > } > > > > Note: > > This code assumes the 'count > 0'. > > And I didn't consider about efficiency of the code. > > > > If my consider is correct, Please modify this problem. > > > > Thank you > > B.R. Kenichi HASHIMOTO. > > _______________________________________________ > > Ironruby-core mailing list > > Ironruby-core at rubyforge.org > > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > _______________________________________________ > > Ironruby-core mailing list > > Ironruby-core at rubyforge.org > > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ryan.riley at panesofglass.org Tue Nov 17 10:29:08 2009 From: ryan.riley at panesofglass.org (Ryan Riley) Date: Tue, 17 Nov 2009 09:29:08 -0600 Subject: [Ironruby-core] Calling a C# static from IronRuby In-Reply-To: References: Message-ID: On Fri, Nov 13, 2009 at 1:06 PM, Shay Friedman wrote: > I guess you can do that in two ways. > > The first one is to add a statement in Ruby code: > > class Object > def mymethod(str) > MyCSharpClass.mymethod(str) > end > end > > Maybe I'm missing something, but shouldn't that be: def mymethod(str) MyCSharpClass*::*mymethod(str) # Use '::' instead of '.'? end Ryan Riley Email: ryan.riley at panesofglass.org LinkedIn: http://www.linkedin.com/in/ryanriley Blog: http://wizardsofsmart.net/ Website: http://panesofglass.org/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From ryan.riley at panesofglass.org Tue Nov 17 10:36:04 2009 From: ryan.riley at panesofglass.org (Ryan Riley) Date: Tue, 17 Nov 2009 09:36:04 -0600 Subject: [Ironruby-core] Silverlight - Data Binding with IronRuby Types In-Reply-To: <0047ECBFA2E0DF4A834AA369282A5AFC19CF4996@tk5ex14mbxc106.redmond.corp.microsoft.com> References: <0047ECBFA2E0DF4A834AA369282A5AFC19CF4996@tk5ex14mbxc106.redmond.corp.microsoft.com> Message-ID: I just stumbled across these posts on __clrtype__ in IronPython. Is anything like this planned for IronRuby, or will we just have to wait for Silverlight 4 for a better data binding story? Cheers! Ryan Riley Email: ryan.riley at panesofglass.org LinkedIn: http://www.linkedin.com/in/ryanriley Blog: http://wizardsofsmart.net/ Website: http://panesofglass.org/ On Mon, Sep 7, 2009 at 3:38 PM, Jimmy Schementi < Jimmy.Schementi at microsoft.com> wrote: > Unfortunately Silverlight only supports reflection-based data-binding, and > does not support ICustomTypeDescriptor data-binding. IronRuby uses ICTD > data-binding on the desktop to accomplish accessor binding. To accomplish > the same thing in Silverlight you?d need to create a real CLR class and > property, inherit from that class, and set the property. You can do this > with a precompiled DLL, or maybe IronRubyInline could help: > http://github.com/rvernagus/IronRubyInline. > > > > Silverlight 4 will most likely have DLR-based data binding, so you?re > example would just work. They are also adding something similar to > ICustomTypeDescriptor, but for today you?ll have to go a bit out of your > way. > > > > ~js > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Tue Nov 17 12:22:25 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Tue, 17 Nov 2009 18:22:25 +0100 Subject: [Ironruby-core] when do we get this? Message-ID: http://devhawk.net/CommentView,guid,cef44285-b9e7-47c3-84b6-d79833c76875.aspx the question with regards to ironruby is when/if ? :) That sounds like it could be useful. --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Tue Nov 17 12:29:36 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Tue, 17 Nov 2009 18:29:36 +0100 Subject: [Ironruby-core] Calling a C# static from IronRuby In-Reply-To: References: Message-ID: both work :: but in practice you see . more often though (it should also be SomeClass::new if we're going down that route :)) http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/82031?help-en http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/250948 http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/250943 --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Tue, Nov 17, 2009 at 4:29 PM, Ryan Riley wrote: > On Fri, Nov 13, 2009 at 1:06 PM, Shay Friedman wrote: > >> I guess you can do that in two ways. >> >> The first one is to add a statement in Ruby code: >> >> class Object >> def mymethod(str) >> MyCSharpClass.mymethod(str) >> end >> end >> >> > Maybe I'm missing something, but shouldn't that be: > > def mymethod(str) > MyCSharpClass*::*mymethod(str) # Use '::' instead of '.'? > end > > Ryan Riley > > Email: ryan.riley at panesofglass.org > LinkedIn: http://www.linkedin.com/in/ryanriley > Blog: http://wizardsofsmart.net/ > Website: http://panesofglass.org/ > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ryan.riley at panesofglass.org Tue Nov 17 14:23:08 2009 From: ryan.riley at panesofglass.org (Ryan Riley) Date: Tue, 17 Nov 2009 13:23:08 -0600 Subject: [Ironruby-core] Calling a C# static from IronRuby In-Reply-To: References: Message-ID: I thought '.' was for instance and '::' for static members. I need to brush up on my Ruby! :) Ryan Riley Email: ryan.riley at panesofglass.org LinkedIn: http://www.linkedin.com/in/ryanriley Blog: http://wizardsofsmart.net/ Website: http://panesofglass.org/ On Tue, Nov 17, 2009 at 11:29 AM, Ivan Porto Carrero wrote: > both work :: but in practice you see . more often though (it should also be > SomeClass::new if we're going down that route :)) > > http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/82031?help-en > http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/250948 > http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/250943 > > --- > Met vriendelijke groeten - Best regards - Salutations > Ivan Porto Carrero > Blog: http://flanders.co.nz > Google Wave: portocarrero.ivan at googlewave.com > Twitter: http://twitter.com/casualjim > Author of IronRuby in Action (http://manning.com/carrero) > > > > On Tue, Nov 17, 2009 at 4:29 PM, Ryan Riley wrote: > >> On Fri, Nov 13, 2009 at 1:06 PM, Shay Friedman wrote: >> >>> I guess you can do that in two ways. >>> >>> The first one is to add a statement in Ruby code: >>> >>> class Object >>> def mymethod(str) >>> MyCSharpClass.mymethod(str) >>> end >>> end >>> >>> >> Maybe I'm missing something, but shouldn't that be: >> >> def mymethod(str) >> MyCSharpClass*::*mymethod(str) # Use '::' instead of '.'? >> end >> >> Ryan Riley >> >> Email: ryan.riley at panesofglass.org >> LinkedIn: http://www.linkedin.com/in/ryanriley >> Blog: http://wizardsofsmart.net/ >> Website: http://panesofglass.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: From Shri.Borde at microsoft.com Tue Nov 17 18:58:40 2009 From: Shri.Borde at microsoft.com (Shri Borde) Date: Tue, 17 Nov 2009 23:58:40 +0000 Subject: [Ironruby-core] Review: Fix Message-ID: <8E45365BECA665489F3CB8878A6C1B7D0C809B99@TK5EX14MBXC140.redmond.corp.microsoft.com> fpt review /shelveset:regex;sborde Implements Kernel.srand with no parameters Changes RubyRegex to not clone the input string when being used for String#scan, and to share the cloned string when possible. Without the sharing, you could cause OutOfMemoryException. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: regex.diff Type: application/octet-stream Size: 10027 bytes Desc: regex.diff URL: From Tomas.Matousek at microsoft.com Tue Nov 17 19:32:36 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Wed, 18 Nov 2009 00:32:36 +0000 Subject: [Ironruby-core] Review: Fix In-Reply-To: <8E45365BECA665489F3CB8878A6C1B7D0C809B99@TK5EX14MBXC140.redmond.corp.microsoft.com> References: <8E45365BECA665489F3CB8878A6C1B7D0C809B99@TK5EX14MBXC140.redmond.corp.microsoft.com> Message-ID: <4B342496A3EFEB48839E10BB4BF5964C171DE6C7@TK5EX14MBXC129.redmond.corp.microsoft.com> Looks good. Tomas From: Shri Borde Sent: Tuesday, November 17, 2009 3:59 PM To: ironruby-core at rubyforge.org Cc: IronRuby External Code Reviewers Subject: Review: Fix fpt review /shelveset:regex;sborde Implements Kernel.srand with no parameters Changes RubyRegex to not clone the input string when being used for String#scan, and to share the cloned string when possible. Without the sharing, you could cause OutOfMemoryException. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Thu Nov 19 03:26:16 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Thu, 19 Nov 2009 09:26:16 +0100 Subject: [Ironruby-core] Calling a C# static from IronRuby In-Reply-To: References: <1B42307CD4AADD438CDDA2FE1121CC92038407@TK5EX14MBXC134.redmond.corp.microsoft.com> Message-ID: FWIW I read too quickly before I sent the mail previous to this one. Orion put me straight, I have no objections to this and will put it in the interop features box. --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Fri, Nov 13, 2009 at 10:50 PM, Orion Edwards wrote: > On Fri, Nov 13, 2009 at 9:07 PM, Jimmy Schementi < > Jimmy.Schementi at microsoft.com> wrote: > >> FYI, we?re thinking about allowing you to use ?include? with .NET types, >> which will include it?s static methods. That would enable: >> >> > I'd be very much in favour of this. A .NET static class full of static > methods always seemed like it would be a good map to a ruby Module to me. > > Whether you want to limit the 'include' functionality to only work with > static classes, or just work for static methods on any old class I think is > up for debate. > I'd go for 'any old class', but I generally fall on the 'be as permissive > as possible' side of the fence, so others may not agree :-) > > > On 14/11/2009, at 9:29 AM, Ivan Porto Carrero wrote: > > I think Ruby on .NET is great and stuff like the clr_new, overloads etc are > a necessary evil to ease working with CLR classes. > But I do think that changing a basic construct like include will not be > good unless the other rubies also include it. The reason for it is you only > use clr_new (which is aptly prefixed btw) or overload etc when you're > working with the CLR but include you use in other implementations too and > then it won't behave consistently across the board. > > > While consistency with other Ruby implementations is obviously important, > this is a CLR interop feature and shouldn't affect the normal ruby behavior > of include, so I don't see how it affects consistency with other > implementations at all?. It seems similar to being able to use include on > .NET namespaces from IronRuby, which is of course also non-standard > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Thu Nov 19 13:21:22 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Thu, 19 Nov 2009 19:21:22 +0100 Subject: [Ironruby-core] scope.SetVariable weirdness with instance_eval Message-ID: Hi Consider the following code: public class Item { public string Title { get; private set; } public Item(string title){ Title = title; } } var _engine = Ruby.CreateEngine(); var context = new Item("The greatest item ever"); var scope = _engine.CreateScope(); *scope.SetVariable("ctxt", item);* _engine.ExecuteFile("path\to\file.rb", scope); And the following ruby class: class Testing def initialize(&b) instance_eval(&b) end def context(ctxt) @ctxt = ctxt end def print puts @ctxt.title end end Then this works when put at the bottom of the file: *inserted = ctxt* Testing.new do *context inserted* print end but this doesn't: Testing.new do *context ctxt* print end That doesn't seem right or does it? so I've created an issue on codeplex with this content, if this is the way it's supposed to work then I'll delete the issue --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tomas.Matousek at microsoft.com Thu Nov 19 13:45:53 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Thu, 19 Nov 2009 18:45:53 +0000 Subject: [Ironruby-core] scope.SetVariable weirdness with instance_eval In-Reply-To: References: Message-ID: <4B342496A3EFEB48839E10BB4BF5964C171DF016@TK5EX14MBXC129.redmond.corp.microsoft.com> inserted = ctxt calls a ?ctxt? method on ?self?. The hosting API injects method_missing into the top-level singleton ? you can see it by printing p self.method(:method_missing). The implementation of that method_missing looks into the scope for variables. In the latter case, I assume, you instance_eval the block against some object, right? Hence ctxt is an invocation on that object, which has no relationship with the scope. Testing.new do context ctxt print end Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Thursday, November 19, 2009 10:21 AM To: ironruby-core Subject: [Ironruby-core] scope.SetVariable weirdness with instance_eval Hi Consider the following code: public class Item { public string Title { get; private set; } public Item(string title){ Title = title; } } var _engine = Ruby.CreateEngine(); var context = new Item("The greatest item ever"); var scope = _engine.CreateScope(); scope.SetVariable("ctxt", item); _engine.ExecuteFile("path\to\file.rb", scope); And the following ruby class: class Testing def initialize(&b) instance_eval(&b) end def context(ctxt) @ctxt = ctxt end def print puts @ctxt.title end end Then this works when put at the bottom of the file: inserted = ctxt Testing.new do context inserted print end but this doesn't: Testing.new do context ctxt print end That doesn't seem right or does it? so I've created an issue on codeplex with this content, if this is the way it's supposed to work then I'll delete the issue --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Thu Nov 19 13:51:02 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Thu, 19 Nov 2009 19:51:02 +0100 Subject: [Ironruby-core] scope.SetVariable weirdness with instance_eval In-Reply-To: <4B342496A3EFEB48839E10BB4BF5964C171DF016@TK5EX14MBXC129.redmond.corp.microsoft.com> References: <4B342496A3EFEB48839E10BB4BF5964C171DF016@TK5EX14MBXC129.redmond.corp.microsoft.com> Message-ID: I tried closing the issue on codeplex but couldn't http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=3136 Thanks for the explanation --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Thu, Nov 19, 2009 at 7:45 PM, Tomas Matousek < Tomas.Matousek at microsoft.com> wrote: > *inserted = ctxt* > > > > calls a ?ctxt? method on ?self?. The hosting API injects method_missing > into the top-level singleton ? you can see it by printing p > self.method(:method_missing). > > The implementation of that method_missing looks into the scope for > variables. > > > > In the latter case, I assume, you instance_eval the block against some > object, right? Hence ctxt is an invocation on that object, which has no > relationship with the scope. > > > > Testing.new do > > *context ctxt* > > print > > end > > > > Tomas > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Ivan Porto Carrero > *Sent:* Thursday, November 19, 2009 10:21 AM > *To:* ironruby-core > *Subject:* [Ironruby-core] scope.SetVariable weirdness with instance_eval > > > > Hi > > > > Consider the following code: > > > > public class Item > > { > > public string Title { > > get; > > private set; > > } > > > > public Item(string title){ Title = title; } > > } > > > > var _engine = Ruby.CreateEngine(); > > var context = new Item("The greatest item ever"); > > > > var scope = _engine.CreateScope(); > > *scope.SetVariable("ctxt", item);* > > _engine.ExecuteFile("path\to\file.rb", scope); > > > > And the following ruby class: > > > > class Testing > > > > def initialize(&b) > > instance_eval(&b) > > end > > > > def context(ctxt) > > @ctxt = ctxt > > end > > > > def print > > puts @ctxt.title > > end > > > > end > > > > Then this works when put at the bottom of the file: > > > > *inserted = ctxt* > > Testing.new do > > *context inserted* > > print > > end > > > > but this doesn't: > > > > Testing.new do > > *context ctxt* > > print > > end > > > > > > That doesn't seem right or does it? so I've created an issue on codeplex > with this content, if this is the way it's supposed to work then I'll delete > the issue > > > > > --- > Met vriendelijke groeten - Best regards - Salutations > Ivan Porto Carrero > Blog: http://flanders.co.nz > Google Wave: portocarrero.ivan at googlewave.com > Twitter: http://twitter.com/casualjim > Author of IronRuby in Action (http://manning.com/carrero) > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tomas.Matousek at microsoft.com Thu Nov 19 14:12:24 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Thu, 19 Nov 2009 19:12:24 +0000 Subject: [Ironruby-core] scope.SetVariable weirdness with instance_eval In-Reply-To: References: <4B342496A3EFEB48839E10BB4BF5964C171DF016@TK5EX14MBXC129.redmond.corp.microsoft.com> Message-ID: <4B342496A3EFEB48839E10BB4BF5964C171DF064@TK5EX14MBXC129.redmond.corp.microsoft.com> I?ve closed it. If you think there might be a better approach to exposing scope variables let us know. Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Thursday, November 19, 2009 10:51 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] scope.SetVariable weirdness with instance_eval I tried closing the issue on codeplex but couldn't http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=3136 Thanks for the explanation --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Thu, Nov 19, 2009 at 7:45 PM, Tomas Matousek > wrote: inserted = ctxt calls a ?ctxt? method on ?self?. The hosting API injects method_missing into the top-level singleton ? you can see it by printing p self.method(:method_missing). The implementation of that method_missing looks into the scope for variables. In the latter case, I assume, you instance_eval the block against some object, right? Hence ctxt is an invocation on that object, which has no relationship with the scope. Testing.new do context ctxt print end Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Thursday, November 19, 2009 10:21 AM To: ironruby-core Subject: [Ironruby-core] scope.SetVariable weirdness with instance_eval Hi Consider the following code: public class Item { public string Title { get; private set; } public Item(string title){ Title = title; } } var _engine = Ruby.CreateEngine(); var context = new Item("The greatest item ever"); var scope = _engine.CreateScope(); scope.SetVariable("ctxt", item); _engine.ExecuteFile("path\to\file.rb", scope); And the following ruby class: class Testing def initialize(&b) instance_eval(&b) end def context(ctxt) @ctxt = ctxt end def print puts @ctxt.title end end Then this works when put at the bottom of the file: inserted = ctxt Testing.new do context inserted print end but this doesn't: Testing.new do context ctxt print end That doesn't seem right or does it? so I've created an issue on codeplex with this content, if this is the way it's supposed to work then I'll delete the issue --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Thu Nov 19 14:47:56 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Thu, 19 Nov 2009 20:47:56 +0100 Subject: [Ironruby-core] scope.SetVariable weirdness with instance_eval In-Reply-To: <4B342496A3EFEB48839E10BB4BF5964C171DF064@TK5EX14MBXC129.redmond.corp.microsoft.com> References: <4B342496A3EFEB48839E10BB4BF5964C171DF016@TK5EX14MBXC129.redmond.corp.microsoft.com> <4B342496A3EFEB48839E10BB4BF5964C171DF064@TK5EX14MBXC129.redmond.corp.microsoft.com> Message-ID: I just assumed (<== error right there) that scope.SetVariable("the_var", "the value"); did the same under the covers as the_var = "the value" so that it would be a real globally scoped variable, this probably makes more sense once you know how it works. This is also perfect timing for a call-out in this particular chapter :) Tomas says... But I've been caught out a few times now, I think I just need to take some time to look into the internals of IronRuby again, because I can figure this sort of stuff out by looking at the source code. I have no bright ideas at this point, I rarely do. --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Thu, Nov 19, 2009 at 8:12 PM, Tomas Matousek < Tomas.Matousek at microsoft.com> wrote: > I?ve closed it. If you think there might be a better approach to exposing > scope variables let us know. > > > > Tomas > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Ivan Porto Carrero > *Sent:* Thursday, November 19, 2009 10:51 AM > *To:* ironruby-core at rubyforge.org > *Subject:* Re: [Ironruby-core] scope.SetVariable weirdness with > instance_eval > > > > I tried closing the issue on codeplex but couldn't > > > > http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=3136 > > > > Thanks for the explanation > --- > Met vriendelijke groeten - Best regards - Salutations > Ivan Porto Carrero > Blog: http://flanders.co.nz > Google Wave: portocarrero.ivan at googlewave.com > Twitter: http://twitter.com/casualjim > Author of IronRuby in Action (http://manning.com/carrero) > > > On Thu, Nov 19, 2009 at 7:45 PM, Tomas Matousek < > Tomas.Matousek at microsoft.com> wrote: > > *inserted = ctxt* > > > > calls a ?ctxt? method on ?self?. The hosting API injects method_missing > into the top-level singleton ? you can see it by printing p > self.method(:method_missing). > > The implementation of that method_missing looks into the scope for > variables. > > > > In the latter case, I assume, you instance_eval the block against some > object, right? Hence ctxt is an invocation on that object, which has no > relationship with the scope. > > > > Testing.new do > > *context ctxt* > > print > > end > > > > Tomas > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Ivan Porto Carrero > *Sent:* Thursday, November 19, 2009 10:21 AM > *To:* ironruby-core > *Subject:* [Ironruby-core] scope.SetVariable weirdness with instance_eval > > > > Hi > > > > Consider the following code: > > > > public class Item > > { > > public string Title { > > get; > > private set; > > } > > > > public Item(string title){ Title = title; } > > } > > > > var _engine = Ruby.CreateEngine(); > > var context = new Item("The greatest item ever"); > > > > var scope = _engine.CreateScope(); > > *scope.SetVariable("ctxt", item);* > > _engine.ExecuteFile("path\to\file.rb", scope); > > > > And the following ruby class: > > > > class Testing > > > > def initialize(&b) > > instance_eval(&b) > > end > > > > def context(ctxt) > > @ctxt = ctxt > > end > > > > def print > > puts @ctxt.title > > end > > > > end > > > > Then this works when put at the bottom of the file: > > > > *inserted = ctxt* > > Testing.new do > > *context inserted* > > print > > end > > > > but this doesn't: > > > > Testing.new do > > *context ctxt* > > print > > end > > > > > > That doesn't seem right or does it? so I've created an issue on codeplex > with this content, if this is the way it's supposed to work then I'll delete > the issue > > > > > --- > Met vriendelijke groeten - Best regards - Salutations > Ivan Porto Carrero > Blog: http://flanders.co.nz > Google Wave: portocarrero.ivan at googlewave.com > Twitter: http://twitter.com/casualjim > Author of IronRuby in Action (http://manning.com/carrero) > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Shri.Borde at microsoft.com Thu Nov 19 16:23:40 2009 From: Shri.Borde at microsoft.com (Shri Borde) Date: Thu, 19 Nov 2009 21:23:40 +0000 Subject: [Ironruby-core] Review: Time does not map to System.DateTime Message-ID: <8E45365BECA665489F3CB8878A6C1B7D0C80C487@TK5EX14MBXC140.redmond.corp.microsoft.com> tfpt review /shelveset:time;sborde Makes Time mutable. It was mapped to System.DateTime which is immutable. However, Time#utc mutates the instance. So now we define a new type Time with a _dateTime field. The core\shared\gmtime test is not enabled because it expects that modifying ENV['TZ'] at runtime changes the timezone, which is not supported yet in IronRuby (and MRI too) -------------- next part -------------- An HTML attachment was scrubbed... URL: From jay.turpin at intel.com Fri Nov 20 10:01:49 2009 From: jay.turpin at intel.com (Turpin, Jay) Date: Fri, 20 Nov 2009 08:01:49 -0700 Subject: [Ironruby-core] IronRuby and ActiveRecord Message-ID: <02EA1FD4E5205C48BE881A7ACE2F7C8C12FFE38F5A@azsmsx502.amr.corp.intel.com> Hi - I've looked around and haven't been able to find a current set of instructions. What is the preferred way to setup IronRuby 0.9.2 with MSSQL and ActiveRecord support? Do I still need to install the MRI, or can IR stand on its own now? Thanks Regards, Jay Turpin "I long to accomplish a great and noble task, but it is my chief duty to accomplish small tasks as if they were great and noble. " - Helen Keller -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jimmy.Schementi at microsoft.com Fri Nov 20 10:15:49 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Fri, 20 Nov 2009 15:15:49 +0000 Subject: [Ironruby-core] IronRuby and ActiveRecord In-Reply-To: <02EA1FD4E5205C48BE881A7ACE2F7C8C12FFE38F5A@azsmsx502.amr.corp.intel.com> References: <02EA1FD4E5205C48BE881A7ACE2F7C8C12FFE38F5A@azsmsx502.amr.corp.intel.com> Message-ID: <1B42307CD4AADD438CDDA2FE1121CC9203EFCC@TK5EX14MBXC134.redmond.corp.microsoft.com> Those beginning MRI steps on http://ironruby.net/Documentation/Real_Ruby_Applications/Rails can probably just be run with IronRuby. Don't bother customizing the gem path either. Step 7 and 8 shouldn't be needed either, since those bugs are now fixed. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Turpin, Jay Sent: Friday, November 20, 2009 7:02 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] IronRuby and ActiveRecord Hi - I've looked around and haven't been able to find a current set of instructions. What is the preferred way to setup IronRuby 0.9.2 with MSSQL and ActiveRecord support? Do I still need to install the MRI, or can IR stand on its own now? Thanks Regards, Jay Turpin "I long to accomplish a great and noble task, but it is my chief duty to accomplish small tasks as if they were great and noble. " - Helen Keller -------------- next part -------------- An HTML attachment was scrubbed... URL: From thibaut.barrere at gmail.com Fri Nov 20 10:17:55 2009 From: thibaut.barrere at gmail.com (=?ISO-8859-1?Q?Thibaut_Barr=E8re?=) Date: Fri, 20 Nov 2009 16:17:55 +0100 Subject: [Ironruby-core] Difficulties grasping generics + IronRuby - any idea? (OpenXML) Message-ID: <4a68b8cf0911200717q1f20748mb6592c27d13e1ecc@mail.gmail.com> Hi, I'm testing out the OpenXML SDK with IronRuby (0.9.2). Turns out it's full of generics in there, a good play field. Here I'm trying to use the API to retrieve a list of sheets in an existing xslx. I'm having a hard-time understanding why I can't call "b.first" in the next snippet (full version at http://gist.github.com/239555): doc = SpreadsheetDocument.open('docs/single-cell.xlsx', false) a = doc.workbook_part.workbook.method(:get_first_child).of(Sheets).call puts a # -> DocumentFormat.OpenXml.Spreadsheet.Sheets b = a.method(:elements).of(Sheet).call puts b # -> DocumentFormat.OpenXml.OpenXmlElementList+d__0`1[DocumentFormat.OpenXml.Spreadsheet.Sheet] # b.first or anything similar fails * * It turns out that b.methods shows a "to_a" method is available, then I can do : puts b.to_a.first # woot! # -> DocumentFormat.OpenXml.Spreadsheet.Sheet So my questions are: - why can't I call b.first ? (maybe there's something obvious I didn't see - I assume it's probably that) - are there better ways of writing this ? And if you are interested to follow (I really need to wrap some ruby sugar around all this to make it easier to work with), I'll push my experiments here: http://github.com/thbar/openxml-labs thanks, Thibaut -- http://www.learnivore.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From patrickcbrown at gmail.com Fri Nov 20 10:39:29 2009 From: patrickcbrown at gmail.com (Patrick Brown) Date: Fri, 20 Nov 2009 10:39:29 -0500 Subject: [Ironruby-core] can't include System Message-ID: <48163ce60911200739g2069d1fbsa11126545bb0c1d@mail.gmail.com> Hello Can anyone see why I can't include System in this little script? If I do I get an exception 'Converter is not a class (TypeError)'. If I skip the include and fully qualify the classes in that namespace this works perfectly. Thanks for your time and ideas, Patrick require 'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' require 'Microsoft.Office.Interop.Word, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' include System include Microsoft::Office::Interop::Word class Converter def Convert(inputDirectories, outputDirectory) word = ApplicationClass.new inputDirectories.each {|inputDirectory| Directory.GetFiles(inputDirectory, '*.doc').each { |file| documentPath = System::IO::Path.Combine(outputDirectory, Path.GetFileNameWithoutExtension(file) + ".xps") word.Documents.Open(file) word.ActiveDocument.SaveAs(documentPath, WdSaveFormat.wdFormatXPS) word.ActiveDocument.Close() } word.Quit() } end end -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Fri Nov 20 10:49:22 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Fri, 20 Nov 2009 16:49:22 +0100 Subject: [Ironruby-core] can't include System In-Reply-To: <48163ce60911200739g2069d1fbsa11126545bb0c1d@mail.gmail.com> References: <48163ce60911200739g2069d1fbsa11126545bb0c1d@mail.gmail.com> Message-ID: Converter is a static class and those are mapped to modules module Converter def self.convert(inputDirectories, outputDirectory) .... end end puts System::Converter.class #=> Module --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Fri, Nov 20, 2009 at 4:39 PM, Patrick Brown wrote: > Hello > > Can anyone see why I can't include System in this little script? If I > do I get an exception 'Converter is not a class (TypeError)'. If I skip the > include and fully qualify the classes in that namespace this works > perfectly. > > Thanks for your time and ideas, > Patrick > > > > require 'System, Version=2.0.0.0, Culture=neutral, > PublicKeyToken=b77a5c561934e089' > require 'Microsoft.Office.Interop.Word, Version=12.0.0.0, Culture=neutral, > PublicKeyToken=71e9bce111e9429c' > > include System > include Microsoft::Office::Interop::Word > > class Converter > def Convert(inputDirectories, outputDirectory) > word = ApplicationClass.new > > inputDirectories.each {|inputDirectory| > Directory.GetFiles(inputDirectory, '*.doc').each { |file| > documentPath = System::IO::Path.Combine(outputDirectory, > Path.GetFileNameWithoutExtension(file) + ".xps") > > word.Documents.Open(file) > word.ActiveDocument.SaveAs(documentPath, WdSaveFormat.wdFormatXPS) > word.ActiveDocument.Close() > } > > word.Quit() > } > end > end > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.vernagus at gmail.com Fri Nov 20 10:46:55 2009 From: r.vernagus at gmail.com (Ray Vernagus) Date: Fri, 20 Nov 2009 10:46:55 -0500 Subject: [Ironruby-core] can't include System In-Reply-To: <48163ce60911200739g2069d1fbsa11126545bb0c1d@mail.gmail.com> References: <48163ce60911200739g2069d1fbsa11126545bb0c1d@mail.gmail.com> Message-ID: <4412df1c0911200746q55530d4ei1076754dc17889fb@mail.gmail.com> Converter is a *delegate *type in the System namespace (it comes from mscorlib.dll, not System.dll). You should probably put your class in a custom namespace like so: module MyModule class Converter ... end end On Fri, Nov 20, 2009 at 10:39 AM, Patrick Brown wrote: > Hello > > Can anyone see why I can't include System in this little script? If I > do I get an exception 'Converter is not a class (TypeError)'. If I skip the > include and fully qualify the classes in that namespace this works > perfectly. > > Thanks for your time and ideas, > Patrick > > > > require 'System, Version=2.0.0.0, Culture=neutral, > PublicKeyToken=b77a5c561934e089' > require 'Microsoft.Office.Interop.Word, Version=12.0.0.0, Culture=neutral, > PublicKeyToken=71e9bce111e9429c' > > include System > include Microsoft::Office::Interop::Word > > class Converter > def Convert(inputDirectories, outputDirectory) > word = ApplicationClass.new > > inputDirectories.each {|inputDirectory| > Directory.GetFiles(inputDirectory, '*.doc').each { |file| > documentPath = System::IO::Path.Combine(outputDirectory, > Path.GetFileNameWithoutExtension(file) + ".xps") > > word.Documents.Open(file) > word.ActiveDocument.SaveAs(documentPath, WdSaveFormat.wdFormatXPS) > word.ActiveDocument.Close() > } > > word.Quit() > } > end > end > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From patrickcbrown at gmail.com Fri Nov 20 11:15:01 2009 From: patrickcbrown at gmail.com (Patrick Brown) Date: Fri, 20 Nov 2009 11:15:01 -0500 Subject: [Ironruby-core] can't include System In-Reply-To: References: <48163ce60911200739g2069d1fbsa11126545bb0c1d@mail.gmail.com> Message-ID: <48163ce60911200815l6ae89b6el787f2a355691d032@mail.gmail.com> Hi It is funny how obvious some of these things turn out to be. Thanks, Patrick On Fri, Nov 20, 2009 at 10:49 AM, Ivan Porto Carrero wrote: > Converter is a static class and those are mapped to modules > > module Converter > def self.convert(inputDirectories, outputDirectory) > .... > end > end > > puts System::Converter.class #=> Module > > > --- > Met vriendelijke groeten - Best regards - Salutations > Ivan Porto Carrero > Blog: http://flanders.co.nz > Google Wave: portocarrero.ivan at googlewave.com > Twitter: http://twitter.com/casualjim > Author of IronRuby in Action (http://manning.com/carrero) > > > > On Fri, Nov 20, 2009 at 4:39 PM, Patrick Brown wrote: > >> Hello >> >> Can anyone see why I can't include System in this little script? If I >> do I get an exception 'Converter is not a class (TypeError)'. If I skip the >> include and fully qualify the classes in that namespace this works >> perfectly. >> >> Thanks for your time and ideas, >> Patrick >> >> >> >> require 'System, Version=2.0.0.0, Culture=neutral, >> PublicKeyToken=b77a5c561934e089' >> require 'Microsoft.Office.Interop.Word, Version=12.0.0.0, Culture=neutral, >> PublicKeyToken=71e9bce111e9429c' >> >> include System >> include Microsoft::Office::Interop::Word >> >> class Converter >> def Convert(inputDirectories, outputDirectory) >> word = ApplicationClass.new >> >> inputDirectories.each {|inputDirectory| >> Directory.GetFiles(inputDirectory, '*.doc').each { |file| >> documentPath = System::IO::Path.Combine(outputDirectory, >> Path.GetFileNameWithoutExtension(file) + ".xps") >> >> word.Documents.Open(file) >> word.ActiveDocument.SaveAs(documentPath, WdSaveFormat.wdFormatXPS) >> word.ActiveDocument.Close() >> } >> >> word.Quit() >> } >> end >> end >> >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core >> >> > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tomas.Matousek at microsoft.com Fri Nov 20 13:40:21 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Fri, 20 Nov 2009 18:40:21 +0000 Subject: [Ironruby-core] can't include System In-Reply-To: <48163ce60911200815l6ae89b6el787f2a355691d032@mail.gmail.com> References: <48163ce60911200739g2069d1fbsa11126545bb0c1d@mail.gmail.com> <48163ce60911200815l6ae89b6el787f2a355691d032@mail.gmail.com> Message-ID: <4B342496A3EFEB48839E10BB4BF5964C171DF58A@TK5EX14MBXC129.redmond.corp.microsoft.com> Actually, System::Converter is a generic type definition for a delegate class. Generic type definitions are mapped to Ruby modules. These modules are included in all instantiations of the generic type. >>> load_assembly 'System' => true >>> System::Converter => System::Converter[TInput, TOutput] >>> module System::Converter ... def foo ... puts 'foo' ... end ... end => nil >>> c = System::Converter[Fixnum, String].new { |i| i.to_s } => System.Converter`2[System.Int32,IronRuby.Builtins.MutableString] >>> c.foo Foo >>> System::Converter[Array, Hash].ancestors => [System::Converter[Array, Hash], System::Converter[TInput, TOutput], System::MulticastDelegate, System::Delegate, System::ICloneable, System::Runtime::Serialization::ISerializable, Object, Kernel] Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Patrick Brown Sent: Friday, November 20, 2009 8:15 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] can't include System Hi It is funny how obvious some of these things turn out to be. Thanks, Patrick On Fri, Nov 20, 2009 at 10:49 AM, Ivan Porto Carrero > wrote: Converter is a static class and those are mapped to modules module Converter def self.convert(inputDirectories, outputDirectory) .... end end puts System::Converter.class #=> Module --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Fri, Nov 20, 2009 at 4:39 PM, Patrick Brown > wrote: Hello Can anyone see why I can't include System in this little script? If I do I get an exception 'Converter is not a class (TypeError)'. If I skip the include and fully qualify the classes in that namespace this works perfectly. Thanks for your time and ideas, Patrick require 'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' require 'Microsoft.Office.Interop.Word, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' include System include Microsoft::Office::Interop::Word class Converter def Convert(inputDirectories, outputDirectory) word = ApplicationClass.new inputDirectories.each {|inputDirectory| Directory.GetFiles(inputDirectory, '*.doc').each { |file| documentPath = System::IO::Path.Combine(outputDirectory, Path.GetFileNameWithoutExtension(file) + ".xps") word.Documents.Open(file) word.ActiveDocument.SaveAs(documentPath, WdSaveFormat.wdFormatXPS) word.ActiveDocument.Close() } word.Quit() } end end _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: From ryan.riley at panesofglass.org Fri Nov 20 14:02:00 2009 From: ryan.riley at panesofglass.org (Ryan Riley) Date: Fri, 20 Nov 2009 13:02:00 -0600 Subject: [Ironruby-core] Difficulties grasping generics + IronRuby - any idea? (OpenXML) In-Reply-To: <4a68b8cf0911200717q1f20748mb6592c27d13e1ecc@mail.gmail.com> References: <4a68b8cf0911200717q1f20748mb6592c27d13e1ecc@mail.gmail.com> Message-ID: You can't call a C# extension method off of the object. You might try creating a mixin to add a method_missing to catch and call the appropriate extensions. Otherwise, I think you have to call them as static members, e.g. Enumerable.First.Of(Sheet).call(b). That looks horrifying, I know. I don't have IR available on this machine, or I would try it myself. Let me know how that goes. This seems like it will be a fairly common problem for things like LINQ, PFx and Rx. Maybe we can come up with a simple, one-size-fits-all solution? Ryan Riley Email: ryan.riley at panesofglass.org LinkedIn: http://www.linkedin.com/in/ryanriley Blog: http://wizardsofsmart.net/ Website: http://panesofglass.org/ On Fri, Nov 20, 2009 at 9:17 AM, Thibaut Barr?re wrote: > Hi, > > I'm testing out the OpenXML SDK with IronRuby (0.9.2). Turns out it's full > of generics in there, a good play field. > > Here I'm trying to use the API to retrieve a list of sheets in an existing > xslx. > > I'm having a hard-time understanding why I can't call "b.first" in the next > snippet (full version at http://gist.github.com/239555): > > doc = SpreadsheetDocument.open('docs/single-cell.xlsx', false) > > > > a = doc.workbook_part.workbook.method(:get_first_child).of(Sheets).call > > puts a > > # -> DocumentFormat.OpenXml.Spreadsheet.Sheets > > > > b = a.method(:elements).of(Sheet).call > > puts b > > # -> DocumentFormat.OpenXml.OpenXmlElementList+d__0`1[DocumentFormat.OpenXml.Spreadsheet.Sheet] > > > > # b.first or anything similar fails > > * > > * > > It turns out that b.methods shows a "to_a" method is available, then I can > do : > > puts b.to_a.first # woot! > > # -> DocumentFormat.OpenXml.Spreadsheet.Sheet > > > So my questions are: > - why can't I call b.first ? (maybe there's something obvious I didn't see > - I assume it's probably that) > - are there better ways of writing this ? > > And if you are interested to follow (I really need to wrap some ruby sugar > around all this to make it easier to work with), I'll push my experiments > here: > > http://github.com/thbar/openxml-labs > > thanks, > > Thibaut > -- > http://www.learnivore.com > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From thibaut.barrere at gmail.com Fri Nov 20 15:55:00 2009 From: thibaut.barrere at gmail.com (=?ISO-8859-1?Q?Thibaut_Barr=E8re?=) Date: Fri, 20 Nov 2009 21:55:00 +0100 Subject: [Ironruby-core] Difficulties grasping generics + IronRuby - any idea? (OpenXML) In-Reply-To: References: <4a68b8cf0911200717q1f20748mb6592c27d13e1ecc@mail.gmail.com> Message-ID: <4a68b8cf0911201255g45b60429h97f08648571bd1a0@mail.gmail.com> Hi Ryan, You can't call a C# extension method off of the object. You might try > creating a mixin to add a method_missing to catch and call the appropriate > extensions. Otherwise, I think you have to call them as static members, e.g. > Enumerable.First.Of(Sheet).call(b). That looks horrifying, I know. I don't > have IR available on this machine, or I would try it myself. Let me know how > that goes. This seems like it will be a fairly common problem for things > like LINQ, PFx and Rx. Maybe we can come up with a simple, one-size-fits-all > solution? yikes :) I was pretty sure something like that was involved. I think I'll try the static version first, see if it works. thanks for the hint, I'll keep you posted :) -- Thibaut > > > Ryan Riley > > Email: ryan.riley at panesofglass.org > LinkedIn: http://www.linkedin.com/in/ryanriley > Blog: http://wizardsofsmart.net/ > Website: http://panesofglass.org/ > > > On Fri, Nov 20, 2009 at 9:17 AM, Thibaut Barr?re < > thibaut.barrere at gmail.com> wrote: > >> Hi, >> >> I'm testing out the OpenXML SDK with IronRuby (0.9.2). Turns out it's full >> of generics in there, a good play field. >> >> Here I'm trying to use the API to retrieve a list of sheets in an existing >> xslx. >> >> I'm having a hard-time understanding why I can't call "b.first" in the >> next snippet (full version at http://gist.github.com/239555): >> >> doc = SpreadsheetDocument.open('docs/single-cell.xlsx', false) >> >> >> >> >> >> >> >> a = doc.workbook_part.workbook.method(:get_first_child).of(Sheets).call >> >> >> >> puts a >> >> >> >> # -> DocumentFormat.OpenXml.Spreadsheet.Sheets >> >> >> >> >> >> >> >> b = a.method(:elements).of(Sheet).call >> >> >> >> puts b >> >> >> >> # -> DocumentFormat.OpenXml.OpenXmlElementList+d__0`1[DocumentFormat.OpenXml.Spreadsheet.Sheet] >> >> >> >> >> >> >> >> # b.first or anything similar fails >> >> >> >> * >> >> * >> >> It turns out that b.methods shows a "to_a" method is available, then I can >> do : >> >> puts b.to_a.first # woot! >> >> >> >> # -> DocumentFormat.OpenXml.Spreadsheet.Sheet >> >> >> >> >> So my questions are: >> - why can't I call b.first ? (maybe there's something obvious I didn't see >> - I assume it's probably that) >> - are there better ways of writing this ? >> >> And if you are interested to follow (I really need to wrap some ruby sugar >> around all this to make it easier to work with), I'll push my experiments >> here: >> >> http://github.com/thbar/openxml-labs >> >> thanks, >> >> Thibaut >> -- >> http://www.learnivore.com >> >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core >> >> > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jay.turpin at intel.com Fri Nov 20 16:08:08 2009 From: jay.turpin at intel.com (Turpin, Jay) Date: Fri, 20 Nov 2009 14:08:08 -0700 Subject: [Ironruby-core] IronRuby and ActiveRecord In-Reply-To: <1B42307CD4AADD438CDDA2FE1121CC9203EFCC@TK5EX14MBXC134.redmond.corp.microsoft.com> References: <02EA1FD4E5205C48BE881A7ACE2F7C8C12FFE38F5A@azsmsx502.amr.corp.intel.com> <1B42307CD4AADD438CDDA2FE1121CC9203EFCC@TK5EX14MBXC134.redmond.corp.microsoft.com> Message-ID: <02EA1FD4E5205C48BE881A7ACE2F7C8C12FFED012E@azsmsx502.amr.corp.intel.com> Thanks - you're correct. We don't need to install MRI any longer. I updated the installation instructions on the wiki. Regards, Jay Turpin From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jimmy Schementi Sent: Friday, November 20, 2009 8:16 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] IronRuby and ActiveRecord Those beginning MRI steps on http://ironruby.net/Documentation/Real_Ruby_Applications/Rails can probably just be run with IronRuby. Don't bother customizing the gem path either. Step 7 and 8 shouldn't be needed either, since those bugs are now fixed. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Turpin, Jay Sent: Friday, November 20, 2009 7:02 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] IronRuby and ActiveRecord Hi - I've looked around and haven't been able to find a current set of instructions. What is the preferred way to setup IronRuby 0.9.2 with MSSQL and ActiveRecord support? Do I still need to install the MRI, or can IR stand on its own now? Thanks Regards, Jay Turpin "I long to accomplish a great and noble task, but it is my chief duty to accomplish small tasks as if they were great and noble. " - Helen Keller -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Sat Nov 21 03:06:07 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Sat, 21 Nov 2009 09:06:07 +0100 Subject: [Ironruby-core] ironruby RC1 Message-ID: Hi I don't get any changes coming in for the repo for the last 3 days, are those changes that make up RC1 in? Then on a side note I'm still unable to run xmpp4r with IronRuby. it should work but gets stuck in waiting for a thread that never returns. --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Sat Nov 21 03:39:02 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Sat, 21 Nov 2009 09:39:02 +0100 Subject: [Ironruby-core] eventmachine Message-ID: Anybody wanna join in getting eventmachine working on IronRuby? We can probably do 1 better than the C based implementation on windows simply because .NET has all the necessary classes and exposes the events we need. For example in the C-based version you can't use EM.popen on windows because they need a PID and a few events, which exist on the Process class in .NET. .NET has a cross platform FileSystemWatcher .NET has sockets with events .NET has events on a Process those are all we need AFAICT to get eventmachine working and also make EM.system and EM.popen work on windows that don't work currently. The only remaining issue on windows is then the unix sockets but we can do without those I guess. getting eventmachine to work brings us closer to or gives us Thin Blather AMQP Nanite .... And probably every 2nd library that uses the network and cares about not polling. I will still be busy for another month or so with the book but then I really want to get going with this. --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) -------------- next part -------------- An HTML attachment was scrubbed... URL: From shay.friedman at gmail.com Sat Nov 21 04:24:52 2009 From: shay.friedman at gmail.com (Shay Friedman) Date: Sat, 21 Nov 2009 11:24:52 +0200 Subject: [Ironruby-core] IronRuby::Clr modules Message-ID: Hi, I'm looking at the IronRuby class and its members. I've run into the IronRuby::Clr module that contains modules like BigInteger, Float and String. I know that, for example, IronRuby::Clr::BigInteger is included in the Bignum implementation. My question is - why are they available via the IronRuby::Clr module? Thanks, Shay. -- -------------------------------------------------- Shay Friedman Author of IronRuby Unleashed http://www.IronShay.com Follow me: http://twitter.com/ironshay -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jimmy.Schementi at microsoft.com Sat Nov 21 08:28:38 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Sat, 21 Nov 2009 13:28:38 +0000 Subject: [Ironruby-core] ironruby RC1 In-Reply-To: References: Message-ID: <1B42307CD4AADD438CDDA2FE1121CC9203F94E@TK5EX14MBXC134.redmond.corp.microsoft.com> The RC1 bits will be in GIT shortly ? looks like the pushes to GIT haven?t been happening/working. Also, the RC1 ?announcement? and other things from my RubyConf talk will make their way online over the next couple of days, but in short this release is ?RC1? because we want more people to start using it and find blocking bugs. WRT xmpp4r, it?d be great if you could investigate what the actual bug is; a small repro will drastically increase the chances of it being fixes in the near future, especially when it?s a library failing for some strange reasons. ~js From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Saturday, November 21, 2009 12:06 AM To: ironruby-core Subject: [Ironruby-core] ironruby RC1 Hi I don't get any changes coming in for the repo for the last 3 days, are those changes that make up RC1 in? Then on a side note I'm still unable to run xmpp4r with IronRuby. it should work but gets stuck in waiting for a thread that never returns. --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Sat Nov 21 10:37:50 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Sat, 21 Nov 2009 16:37:50 +0100 Subject: [Ironruby-core] ironruby RC1 In-Reply-To: <1B42307CD4AADD438CDDA2FE1121CC9203F94E@TK5EX14MBXC134.redmond.corp.microsoft.com> References: <1B42307CD4AADD438CDDA2FE1121CC9203F94E@TK5EX14MBXC134.redmond.corp.microsoft.com> Message-ID: I know it has something to do with Threading and the value of @tickets in this class. I've just managed to connect with xmpp4r to my jabber server :=D but then the stream is closed so you can't actually send messages etc. They have this class: ## # This class implements semaphore for threads synchronization. class Semaphore ## # Initialize new semaphore # # val:: [Integer] number of threads, that can enter to section def initialize(val=0) @tickets = val @lock = Mutex.new @cond = ConditionVariable.new end ## # Waits until are available some free tickets def wait @lock.synchronize { @cond.wait(@lock) while !(@tickets > 0) @tickets -= 1 } end ## # Unlocks guarded section, increments number of free tickets def run @lock.synchronize { @tickets += 1 @cond.signal } end end --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Sat, Nov 21, 2009 at 2:28 PM, Jimmy Schementi < Jimmy.Schementi at microsoft.com> wrote: > The RC1 bits will be in GIT shortly ? looks like the pushes to GIT haven?t > been happening/working. Also, the RC1 ?announcement? and other things from > my RubyConf talk will make their way online over the next couple of days, > but in short this release is ?RC1? because we want more people to start > using it and find blocking bugs. WRT xmpp4r, it?d be great if you could > investigate what the actual bug is; a small repro will drastically increase > the chances of it being fixes in the near future, especially when it?s a > library failing for some strange reasons. > > > > ~js > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Ivan Porto Carrero > *Sent:* Saturday, November 21, 2009 12:06 AM > *To:* ironruby-core > *Subject:* [Ironruby-core] ironruby RC1 > > > > Hi > > > > I don't get any changes coming in for the repo for the last 3 days, are > those changes that make up RC1 in? > > > > Then on a side note I'm still unable to run xmpp4r with IronRuby. it should > work but gets stuck in waiting for a thread that never returns. > > > > > > > --- > Met vriendelijke groeten - Best regards - Salutations > Ivan Porto Carrero > Blog: http://flanders.co.nz > Google Wave: portocarrero.ivan at googlewave.com > Twitter: http://twitter.com/casualjim > Author of IronRuby in Action (http://manning.com/carrero) > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Sat Nov 21 10:38:45 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Sat, 21 Nov 2009 16:38:45 +0100 Subject: [Ironruby-core] ironruby RC1 In-Reply-To: References: <1B42307CD4AADD438CDDA2FE1121CC9203F94E@TK5EX14MBXC134.redmond.corp.microsoft.com> Message-ID: I needed to add I managed to connect by initializing the tickets with another value than 0. I set it to 1 --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Sat, Nov 21, 2009 at 4:37 PM, Ivan Porto Carrero wrote: > I know it has something to do with Threading and the value of @tickets in > this class. > I've just managed to connect with xmpp4r to my jabber server :=D but then > the stream is closed so you can't actually send messages etc. > > They have this class: > > ## > # This class implements semaphore for threads synchronization. > class Semaphore > > ## > # Initialize new semaphore > # > # val:: [Integer] number of threads, that can enter to section > def initialize(val=0) > @tickets = val > @lock = Mutex.new > @cond = ConditionVariable.new > end > > ## > # Waits until are available some free tickets > def wait > @lock.synchronize { > @cond.wait(@lock) while !(@tickets > 0) > @tickets -= 1 > } > end > > ## > # Unlocks guarded section, increments number of free tickets > def run > @lock.synchronize { > @tickets += 1 > @cond.signal > } > end > end > --- > Met vriendelijke groeten - Best regards - Salutations > Ivan Porto Carrero > Blog: http://flanders.co.nz > Google Wave: portocarrero.ivan at googlewave.com > Twitter: http://twitter.com/casualjim > Author of IronRuby in Action (http://manning.com/carrero) > > > > On Sat, Nov 21, 2009 at 2:28 PM, Jimmy Schementi < > Jimmy.Schementi at microsoft.com> wrote: > >> The RC1 bits will be in GIT shortly ? looks like the pushes to GIT haven?t >> been happening/working. Also, the RC1 ?announcement? and other things from >> my RubyConf talk will make their way online over the next couple of days, >> but in short this release is ?RC1? because we want more people to start >> using it and find blocking bugs. WRT xmpp4r, it?d be great if you could >> investigate what the actual bug is; a small repro will drastically increase >> the chances of it being fixes in the near future, especially when it?s a >> library failing for some strange reasons. >> >> >> >> ~js >> >> >> >> *From:* ironruby-core-bounces at rubyforge.org [mailto: >> ironruby-core-bounces at rubyforge.org] *On Behalf Of *Ivan Porto Carrero >> *Sent:* Saturday, November 21, 2009 12:06 AM >> *To:* ironruby-core >> *Subject:* [Ironruby-core] ironruby RC1 >> >> >> >> Hi >> >> >> >> I don't get any changes coming in for the repo for the last 3 days, are >> those changes that make up RC1 in? >> >> >> >> Then on a side note I'm still unable to run xmpp4r with IronRuby. it >> should work but gets stuck in waiting for a thread that never returns. >> >> >> >> >> >> >> --- >> Met vriendelijke groeten - Best regards - Salutations >> Ivan Porto Carrero >> Blog: http://flanders.co.nz >> Google Wave: portocarrero.ivan at googlewave.com >> Twitter: http://twitter.com/casualjim >> Author of IronRuby in Action (http://manning.com/carrero) >> >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ryan.riley at panesofglass.org Sat Nov 21 12:01:18 2009 From: ryan.riley at panesofglass.org (Ryan Riley) Date: Sat, 21 Nov 2009 11:01:18 -0600 Subject: [Ironruby-core] eventmachine In-Reply-To: References: Message-ID: If I have time, which should be freeing up towards the end of the year, then I would like to work on this. Should we leverage the Reactive Extensions for this? It seems a good fit, and it would give us the ability to more easily mimic sockets (if I understand sockets correctly). Ryan Riley Email: ryan.riley at panesofglass.org LinkedIn: http://www.linkedin.com/in/ryanriley Blog: http://wizardsofsmart.net/ Website: http://panesofglass.org/ On Sat, Nov 21, 2009 at 2:39 AM, Ivan Porto Carrero wrote: > Anybody wanna join in getting eventmachine working on IronRuby? > > We can probably do 1 better than the C based implementation on windows > simply because .NET has all the necessary classes and exposes the events we > need. > For example in the C-based version you can't use EM.popen on windows > because they need a PID and a few events, which exist on the Process class > in .NET. > > .NET has a cross platform FileSystemWatcher > .NET has sockets with events > .NET has events on a Process > > those are all we need AFAICT to get eventmachine working and also make > EM.system and EM.popen work on windows that don't work currently. The only > remaining issue on windows is then the unix sockets but we can do without > those I guess. > > getting eventmachine to work brings us closer to or gives us > Thin > Blather > AMQP > Nanite > .... > > And probably every 2nd library that uses the network and cares about not > polling. > I will still be busy for another month or so with the book but then I > really want to get going with this. > --- > Met vriendelijke groeten - Best regards - Salutations > Ivan Porto Carrero > Blog: http://flanders.co.nz > Google Wave: portocarrero.ivan at googlewave.com > Twitter: http://twitter.com/casualjim > Author of IronRuby in Action (http://manning.com/carrero) > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdeville at microsoft.com Sat Nov 21 14:50:37 2009 From: jdeville at microsoft.com (Jim Deville) Date: Sat, 21 Nov 2009 19:50:37 +0000 Subject: [Ironruby-core] ironruby RC1 In-Reply-To: References: <1B42307CD4AADD438CDDA2FE1121CC9203F94E@TK5EX14MBXC134.redmond.corp.microsoft.com> Message-ID: I?m working on automating the pushes, but they aren?t done yet, and I haven?t had good enough internet while at RubyConf to push. Releasing was hard enough ;) I?ll do a push tonight when I get home. JD From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Saturday, November 21, 2009 7:38 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] ironruby RC1 I know it has something to do with Threading and the value of @tickets in this class. I've just managed to connect with xmpp4r to my jabber server :=D but then the stream is closed so you can't actually send messages etc. They have this class: ## # This class implements semaphore for threads synchronization. class Semaphore ## # Initialize new semaphore # # val:: [Integer] number of threads, that can enter to section def initialize(val=0) @tickets = val @lock = Mutex.new @cond = ConditionVariable.new end ## # Waits until are available some free tickets def wait @lock.synchronize { @cond.wait(@lock) while !(@tickets > 0) @tickets -= 1 } end ## # Unlocks guarded section, increments number of free tickets def run @lock.synchronize { @tickets += 1 @cond.signal } end end --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Sat, Nov 21, 2009 at 2:28 PM, Jimmy Schementi > wrote: The RC1 bits will be in GIT shortly ? looks like the pushes to GIT haven?t been happening/working. Also, the RC1 ?announcement? and other things from my RubyConf talk will make their way online over the next couple of days, but in short this release is ?RC1? because we want more people to start using it and find blocking bugs. WRT xmpp4r, it?d be great if you could investigate what the actual bug is; a small repro will drastically increase the chances of it being fixes in the near future, especially when it?s a library failing for some strange reasons. ~js From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Saturday, November 21, 2009 12:06 AM To: ironruby-core Subject: [Ironruby-core] ironruby RC1 Hi I don't get any changes coming in for the repo for the last 3 days, are those changes that make up RC1 in? Then on a side note I'm still unable to run xmpp4r with IronRuby. it should work but gets stuck in waiting for a thread that never returns. --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Sat Nov 21 19:00:13 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Sun, 22 Nov 2009 01:00:13 +0100 Subject: [Ironruby-core] ironruby RC1 In-Reply-To: References: <1B42307CD4AADD438CDDA2FE1121CC9203F94E@TK5EX14MBXC134.redmond.corp.microsoft.com> Message-ID: Yeah I saw that on twitter but you did make it in the end :) Much appreciated thanks --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Sat, Nov 21, 2009 at 8:50 PM, Jim Deville wrote: > I?m working on automating the pushes, but they aren?t done yet, and I > haven?t had good enough internet while at RubyConf to push. Releasing was > hard enough ;) > > > > I?ll do a push tonight when I get home. > > > > JD > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Ivan Porto Carrero > *Sent:* Saturday, November 21, 2009 7:38 AM > *To:* ironruby-core at rubyforge.org > *Subject:* Re: [Ironruby-core] ironruby RC1 > > > > I know it has something to do with Threading and the value of @tickets in > this class. > > I've just managed to connect with xmpp4r to my jabber server :=D but then > the stream is closed so you can't actually send messages etc. > > > > They have this class: > > > > ## > > # This class implements semaphore for threads synchronization. > > class Semaphore > > > > ## > > # Initialize new semaphore > > # > > # val:: [Integer] number of threads, that can enter to section > > def initialize(val=0) > > @tickets = val > > @lock = Mutex.new > > @cond = ConditionVariable.new > > end > > > > ## > > # Waits until are available some free tickets > > def wait > > @lock.synchronize { > > @cond.wait(@lock) while !(@tickets > 0) > > @tickets -= 1 > > } > > end > > > > ## > > # Unlocks guarded section, increments number of free tickets > > def run > > @lock.synchronize { > > @tickets += 1 > > @cond.signal > > } > > end > > end > > --- > Met vriendelijke groeten - Best regards - Salutations > Ivan Porto Carrero > Blog: http://flanders.co.nz > Google Wave: portocarrero.ivan at googlewave.com > Twitter: http://twitter.com/casualjim > Author of IronRuby in Action (http://manning.com/carrero) > > > On Sat, Nov 21, 2009 at 2:28 PM, Jimmy Schementi < > Jimmy.Schementi at microsoft.com> wrote: > > The RC1 bits will be in GIT shortly ? looks like the pushes to GIT haven?t > been happening/working. Also, the RC1 ?announcement? and other things from > my RubyConf talk will make their way online over the next couple of days, > but in short this release is ?RC1? because we want more people to start > using it and find blocking bugs. WRT xmpp4r, it?d be great if you could > investigate what the actual bug is; a small repro will drastically increase > the chances of it being fixes in the near future, especially when it?s a > library failing for some strange reasons. > > > > ~js > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Ivan Porto Carrero > *Sent:* Saturday, November 21, 2009 12:06 AM > *To:* ironruby-core > *Subject:* [Ironruby-core] ironruby RC1 > > > > Hi > > > > I don't get any changes coming in for the repo for the last 3 days, are > those changes that make up RC1 in? > > > > Then on a side note I'm still unable to run xmpp4r with IronRuby. it should > work but gets stuck in waiting for a thread that never returns. > > > > > > > --- > Met vriendelijke groeten - Best regards - Salutations > Ivan Porto Carrero > Blog: http://flanders.co.nz > Google Wave: portocarrero.ivan at googlewave.com > Twitter: http://twitter.com/casualjim > Author of IronRuby in Action (http://manning.com/carrero) > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Shri.Borde at microsoft.com Sat Nov 21 19:30:34 2009 From: Shri.Borde at microsoft.com (Shri Borde) Date: Sun, 22 Nov 2009 00:30:34 +0000 Subject: [Ironruby-core] ironruby RC1 In-Reply-To: References: <1B42307CD4AADD438CDDA2FE1121CC9203F94E@TK5EX14MBXC134.redmond.corp.microsoft.com> Message-ID: <8E45365BECA665489F3CB8878A6C1B7D0C815FC3@TK5EX14MBXC140.redmond.corp.microsoft.com> The comment for the ?val? parameter says ?number of threads, that can enter to section?, and so it seems reasonable that it should be atleast 1. I wonder if this just happens to work in MRI because ?run? gets called before ?wait?. This could happen predictably with MRI?s green threads because the scheduler has fixed rules of which thread gets scheduled, and so the chances of races is low even on a multiproc machine. Could you check if this theory is true by adding logging to the methods and running with MRI? If it is correct, then we will have to figure out if/why xmpp4r expects to call ?run? first, and how to get this to happen with IronRuby. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Saturday, November 21, 2009 7:39 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] ironruby RC1 I needed to add I managed to connect by initializing the tickets with another value than 0. I set it to 1 --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Sat, Nov 21, 2009 at 4:37 PM, Ivan Porto Carrero > wrote: I know it has something to do with Threading and the value of @tickets in this class. I've just managed to connect with xmpp4r to my jabber server :=D but then the stream is closed so you can't actually send messages etc. They have this class: ## # This class implements semaphore for threads synchronization. class Semaphore ## # Initialize new semaphore # # val:: [Integer] number of threads, that can enter to section def initialize(val=0) @tickets = val @lock = Mutex.new @cond = ConditionVariable.new end ## # Waits until are available some free tickets def wait @lock.synchronize { @cond.wait(@lock) while !(@tickets > 0) @tickets -= 1 } end ## # Unlocks guarded section, increments number of free tickets def run @lock.synchronize { @tickets += 1 @cond.signal } end end --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Sat, Nov 21, 2009 at 2:28 PM, Jimmy Schementi > wrote: The RC1 bits will be in GIT shortly ? looks like the pushes to GIT haven?t been happening/working. Also, the RC1 ?announcement? and other things from my RubyConf talk will make their way online over the next couple of days, but in short this release is ?RC1? because we want more people to start using it and find blocking bugs. WRT xmpp4r, it?d be great if you could investigate what the actual bug is; a small repro will drastically increase the chances of it being fixes in the near future, especially when it?s a library failing for some strange reasons. ~js From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Saturday, November 21, 2009 12:06 AM To: ironruby-core Subject: [Ironruby-core] ironruby RC1 Hi I don't get any changes coming in for the repo for the last 3 days, are those changes that make up RC1 in? Then on a side note I'm still unable to run xmpp4r with IronRuby. it should work but gets stuck in waiting for a thread that never returns. --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tomas.Matousek at microsoft.com Sat Nov 21 23:21:35 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Sun, 22 Nov 2009 04:21:35 +0000 Subject: [Ironruby-core] IronRuby::Clr modules In-Reply-To: References: Message-ID: <4B342496A3EFEB48839E10BB4BF5964C171DFAD9@TK5EX14MBXC129.redmond.corp.microsoft.com> No strong reason. IronRuby::Clr is a convenient place where to define CLR related modules. Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Shay Friedman Sent: Saturday, November 21, 2009 1:25 AM To: ironruby-core Subject: [Ironruby-core] IronRuby::Clr modules Hi, I'm looking at the IronRuby class and its members. I've run into the IronRuby::Clr module that contains modules like BigInteger, Float and String. I know that, for example, IronRuby::Clr::BigInteger is included in the Bignum implementation. My question is - why are they available via the IronRuby::Clr module? Thanks, Shay. -- -------------------------------------------------- Shay Friedman Author of IronRuby Unleashed http://www.IronShay.com Follow me: http://twitter.com/ironshay -------------- next part -------------- An HTML attachment was scrubbed... URL: From Shri.Borde at microsoft.com Sun Nov 22 03:27:45 2009 From: Shri.Borde at microsoft.com (Shri Borde) Date: Sun, 22 Nov 2009 08:27:45 +0000 Subject: [Ironruby-core] ironruby RC1 References: <1B42307CD4AADD438CDDA2FE1121CC9203F94E@TK5EX14MBXC134.redmond.corp.microsoft.com> Message-ID: <8E45365BECA665489F3CB8878A6C1B7D0C81702A@TK5EX14MBXC140.redmond.corp.microsoft.com> Actually, this is a bug in ConditionVariable, and we have RubySpec tags for the ConditionVariable to disable some failing specs. ConditionVariable used Monitor.Pulse to implement ConditionVariable#wait which will yield control only if there is a waiting thread; otherwise the pulse is ignored. So we need to use AutoResetEvent. I have opened bug http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=3151 and attached a fix to it. I am gone on vacation, so someone will have to get it checked in. From: Shri Borde Sent: Saturday, November 21, 2009 4:31 PM To: ironruby-core at rubyforge.org Subject: RE: [Ironruby-core] ironruby RC1 The comment for the ?val? parameter says ?number of threads, that can enter to section?, and so it seems reasonable that it should be atleast 1. I wonder if this just happens to work in MRI because ?run? gets called before ?wait?. This could happen predictably with MRI?s green threads because the scheduler has fixed rules of which thread gets scheduled, and so the chances of races is low even on a multiproc machine. Could you check if this theory is true by adding logging to the methods and running with MRI? If it is correct, then we will have to figure out if/why xmpp4r expects to call ?run? first, and how to get this to happen with IronRuby. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Saturday, November 21, 2009 7:39 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] ironruby RC1 I needed to add I managed to connect by initializing the tickets with another value than 0. I set it to 1 --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Sat, Nov 21, 2009 at 4:37 PM, Ivan Porto Carrero > wrote: I know it has something to do with Threading and the value of @tickets in this class. I've just managed to connect with xmpp4r to my jabber server :=D but then the stream is closed so you can't actually send messages etc. They have this class: ## # This class implements semaphore for threads synchronization. class Semaphore ## # Initialize new semaphore # # val:: [Integer] number of threads, that can enter to section def initialize(val=0) @tickets = val @lock = Mutex.new @cond = ConditionVariable.new end ## # Waits until are available some free tickets def wait @lock.synchronize { @cond.wait(@lock) while !(@tickets > 0) @tickets -= 1 } end ## # Unlocks guarded section, increments number of free tickets def run @lock.synchronize { @tickets += 1 @cond.signal } end end --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Sat, Nov 21, 2009 at 2:28 PM, Jimmy Schementi > wrote: The RC1 bits will be in GIT shortly ? looks like the pushes to GIT haven?t been happening/working. Also, the RC1 ?announcement? and other things from my RubyConf talk will make their way online over the next couple of days, but in short this release is ?RC1? because we want more people to start using it and find blocking bugs. WRT xmpp4r, it?d be great if you could investigate what the actual bug is; a small repro will drastically increase the chances of it being fixes in the near future, especially when it?s a library failing for some strange reasons. ~js From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Saturday, November 21, 2009 12:06 AM To: ironruby-core Subject: [Ironruby-core] ironruby RC1 Hi I don't get any changes coming in for the repo for the last 3 days, are those changes that make up RC1 in? Then on a side note I'm still unable to run xmpp4r with IronRuby. it should work but gets stuck in waiting for a thread that never returns. --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdeville at microsoft.com Sun Nov 22 04:45:58 2009 From: jdeville at microsoft.com (Jim Deville) Date: Sun, 22 Nov 2009 09:45:58 +0000 Subject: [Ironruby-core] ironruby RC1 In-Reply-To: References: <1B42307CD4AADD438CDDA2FE1121CC9203F94E@TK5EX14MBXC134.redmond.corp.microsoft.com> Message-ID: Push has been done. I?ve tagged it both v0.9.3 and v1.0RC1 From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Saturday, November 21, 2009 4:00 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] ironruby RC1 Yeah I saw that on twitter but you did make it in the end :) Much appreciated thanks --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Sat, Nov 21, 2009 at 8:50 PM, Jim Deville > wrote: I?m working on automating the pushes, but they aren?t done yet, and I haven?t had good enough internet while at RubyConf to push. Releasing was hard enough ;) I?ll do a push tonight when I get home. JD From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Saturday, November 21, 2009 7:38 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] ironruby RC1 I know it has something to do with Threading and the value of @tickets in this class. I've just managed to connect with xmpp4r to my jabber server :=D but then the stream is closed so you can't actually send messages etc. They have this class: ## # This class implements semaphore for threads synchronization. class Semaphore ## # Initialize new semaphore # # val:: [Integer] number of threads, that can enter to section def initialize(val=0) @tickets = val @lock = Mutex.new @cond = ConditionVariable.new end ## # Waits until are available some free tickets def wait @lock.synchronize { @cond.wait(@lock) while !(@tickets > 0) @tickets -= 1 } end ## # Unlocks guarded section, increments number of free tickets def run @lock.synchronize { @tickets += 1 @cond.signal } end end --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Sat, Nov 21, 2009 at 2:28 PM, Jimmy Schementi > wrote: The RC1 bits will be in GIT shortly ? looks like the pushes to GIT haven?t been happening/working. Also, the RC1 ?announcement? and other things from my RubyConf talk will make their way online over the next couple of days, but in short this release is ?RC1? because we want more people to start using it and find blocking bugs. WRT xmpp4r, it?d be great if you could investigate what the actual bug is; a small repro will drastically increase the chances of it being fixes in the near future, especially when it?s a library failing for some strange reasons. ~js From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Saturday, November 21, 2009 12:06 AM To: ironruby-core Subject: [Ironruby-core] ironruby RC1 Hi I don't get any changes coming in for the repo for the last 3 days, are those changes that make up RC1 in? Then on a side note I'm still unable to run xmpp4r with IronRuby. it should work but gets stuck in waiting for a thread that never returns. --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Sun Nov 22 05:31:49 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Sun, 22 Nov 2009 11:31:49 +0100 Subject: [Ironruby-core] ironruby RC1 In-Reply-To: References: <1B42307CD4AADD438CDDA2FE1121CC9203F94E@TK5EX14MBXC134.redmond.corp.microsoft.com> Message-ID: The mono build is up from that one too. http://dlrci.colliertech.org/ironruby --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Sun, Nov 22, 2009 at 10:45 AM, Jim Deville wrote: > Push has been done. I?ve tagged it both v0.9.3 and v1.0RC1 > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Ivan Porto Carrero > *Sent:* Saturday, November 21, 2009 4:00 PM > > *To:* ironruby-core at rubyforge.org > *Subject:* Re: [Ironruby-core] ironruby RC1 > > > > Yeah I saw that on twitter but you did make it in the end :) > > > > Much appreciated thanks > --- > Met vriendelijke groeten - Best regards - Salutations > Ivan Porto Carrero > Blog: http://flanders.co.nz > Google Wave: portocarrero.ivan at googlewave.com > Twitter: http://twitter.com/casualjim > Author of IronRuby in Action (http://manning.com/carrero) > > > On Sat, Nov 21, 2009 at 8:50 PM, Jim Deville > wrote: > > I?m working on automating the pushes, but they aren?t done yet, and I > haven?t had good enough internet while at RubyConf to push. Releasing was > hard enough ;) > > > > I?ll do a push tonight when I get home. > > > > JD > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Ivan Porto Carrero > *Sent:* Saturday, November 21, 2009 7:38 AM > *To:* ironruby-core at rubyforge.org > *Subject:* Re: [Ironruby-core] ironruby RC1 > > > > I know it has something to do with Threading and the value of @tickets in > this class. > > I've just managed to connect with xmpp4r to my jabber server :=D but then > the stream is closed so you can't actually send messages etc. > > > > They have this class: > > > > ## > > # This class implements semaphore for threads synchronization. > > class Semaphore > > > > ## > > # Initialize new semaphore > > # > > # val:: [Integer] number of threads, that can enter to section > > def initialize(val=0) > > @tickets = val > > @lock = Mutex.new > > @cond = ConditionVariable.new > > end > > > > ## > > # Waits until are available some free tickets > > def wait > > @lock.synchronize { > > @cond.wait(@lock) while !(@tickets > 0) > > @tickets -= 1 > > } > > end > > > > ## > > # Unlocks guarded section, increments number of free tickets > > def run > > @lock.synchronize { > > @tickets += 1 > > @cond.signal > > } > > end > > end > > --- > Met vriendelijke groeten - Best regards - Salutations > Ivan Porto Carrero > Blog: http://flanders.co.nz > Google Wave: portocarrero.ivan at googlewave.com > Twitter: http://twitter.com/casualjim > Author of IronRuby in Action (http://manning.com/carrero) > > On Sat, Nov 21, 2009 at 2:28 PM, Jimmy Schementi < > Jimmy.Schementi at microsoft.com> wrote: > > The RC1 bits will be in GIT shortly ? looks like the pushes to GIT haven?t > been happening/working. Also, the RC1 ?announcement? and other things from > my RubyConf talk will make their way online over the next couple of days, > but in short this release is ?RC1? because we want more people to start > using it and find blocking bugs. WRT xmpp4r, it?d be great if you could > investigate what the actual bug is; a small repro will drastically increase > the chances of it being fixes in the near future, especially when it?s a > library failing for some strange reasons. > > > > ~js > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Ivan Porto Carrero > *Sent:* Saturday, November 21, 2009 12:06 AM > *To:* ironruby-core > *Subject:* [Ironruby-core] ironruby RC1 > > > > Hi > > > > I don't get any changes coming in for the repo for the last 3 days, are > those changes that make up RC1 in? > > > > Then on a side note I'm still unable to run xmpp4r with IronRuby. it should > work but gets stuck in waiting for a thread that never returns. > > > > > > > --- > Met vriendelijke groeten - Best regards - Salutations > Ivan Porto Carrero > Blog: http://flanders.co.nz > Google Wave: portocarrero.ivan at googlewave.com > Twitter: http://twitter.com/casualjim > Author of IronRuby in Action (http://manning.com/carrero) > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From shay.friedman at gmail.com Sun Nov 22 08:04:02 2009 From: shay.friedman at gmail.com (Shay Friedman) Date: Sun, 22 Nov 2009 15:04:02 +0200 Subject: [Ironruby-core] Using IronPython code from IronRuby Message-ID: Hi, I'm trying to load an IronPython file in IronRuby (via IronRuby.require) and I get an exception: "Failed to load language 'IronPython 2.6': type 'IronPython.Runtime.PythonContext' is not a valid language provider because it does not inherit from LanguageContext". This is thrown from the require method. What am I doing wrong? Thanks, Shay. -- -------------------------------------------------- Shay Friedman Author of IronRuby Unleashed http://www.IronShay.com Follow me: http://twitter.com/ironshay -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tomas.Matousek at microsoft.com Sun Nov 22 14:22:10 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Sun, 22 Nov 2009 19:22:10 +0000 Subject: [Ironruby-core] Using IronPython code from IronRuby In-Reply-To: References: Message-ID: <4B342496A3EFEB48839E10BB4BF5964C171ECFBF@TK5EX14MBXC131.redmond.corp.microsoft.com> Looks like version mismatch. Do you build IronPython from the same sources as IronRuby? You can find compatible binaries here: http://ironruby.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=33693 Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Shay Friedman Sent: Sunday, November 22, 2009 5:04 AM To: ironruby-core Subject: [Ironruby-core] Using IronPython code from IronRuby Hi, I'm trying to load an IronPython file in IronRuby (via IronRuby.require) and I get an exception: "Failed to load language 'IronPython 2.6': type 'IronPython.Runtime.PythonContext' is not a valid language provider because it does not inherit from LanguageContext". This is thrown from the require method. What am I doing wrong? Thanks, Shay. -- -------------------------------------------------- Shay Friedman Author of IronRuby Unleashed http://www.IronShay.com Follow me: http://twitter.com/ironshay -------------- next part -------------- An HTML attachment was scrubbed... URL: From shay.friedman at gmail.com Sun Nov 22 14:33:38 2009 From: shay.friedman at gmail.com (Shay Friedman) Date: Sun, 22 Nov 2009 21:33:38 +0200 Subject: [Ironruby-core] Using IronPython code from IronRuby In-Reply-To: <4B342496A3EFEB48839E10BB4BF5964C171ECFBF@TK5EX14MBXC131.redmond.corp.microsoft.com> References: <4B342496A3EFEB48839E10BB4BF5964C171ECFBF@TK5EX14MBXC131.redmond.corp.microsoft.com> Message-ID: You're right. I had to build IronPython to make it work. I didn't realize IronPython was part of the source until now :) Thanks! Shay. On Sun, Nov 22, 2009 at 9:22 PM, Tomas Matousek < Tomas.Matousek at microsoft.com> wrote: > Looks like version mismatch. Do you build IronPython from the same sources > as IronRuby? > > You can find compatible binaries here: > > http://ironruby.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=33693 > > > > Tomas > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Shay Friedman > *Sent:* Sunday, November 22, 2009 5:04 AM > *To:* ironruby-core > *Subject:* [Ironruby-core] Using IronPython code from IronRuby > > > > Hi, > > I'm trying to load an IronPython file in IronRuby (via IronRuby.require) > and I get an exception: "Failed to load language 'IronPython 2.6': type > 'IronPython.Runtime.PythonContext' is not a valid language provider because > it does not inherit from LanguageContext". > > This is thrown from the require method. > > What am I doing wrong? > > Thanks, > Shay. > > -- > -------------------------------------------------- > Shay Friedman > Author of IronRuby Unleashed > http://www.IronShay.com > Follow me: http://twitter.com/ironshay > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -- -------------------------------------------------- Shay Friedman Author of IronRuby Unleashed http://www.IronShay.com Follow me: http://twitter.com/ironshay -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdeville at microsoft.com Sun Nov 22 15:52:28 2009 From: jdeville at microsoft.com (Jim Deville) Date: Sun, 22 Nov 2009 20:52:28 +0000 Subject: [Ironruby-core] Using IronPython code from IronRuby Message-ID: IronPython binaries haven't been uploaded yet. I'll upload them as soon as I have internet Sent from my HTC ________________________________ From: Shay Friedman Sent: Sunday, November 22, 2009 11:44 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Using IronPython code from IronRuby You're right. I had to build IronPython to make it work. I didn't realize IronPython was part of the source until now :) Thanks! Shay. On Sun, Nov 22, 2009 at 9:22 PM, Tomas Matousek > wrote: Looks like version mismatch. Do you build IronPython from the same sources as IronRuby? You can find compatible binaries here: http://ironruby.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=33693 Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Shay Friedman Sent: Sunday, November 22, 2009 5:04 AM To: ironruby-core Subject: [Ironruby-core] Using IronPython code from IronRuby Hi, I'm trying to load an IronPython file in IronRuby (via IronRuby.require) and I get an exception: "Failed to load language 'IronPython 2.6': type 'IronPython.Runtime.PythonContext' is not a valid language provider because it does not inherit from LanguageContext". This is thrown from the require method. What am I doing wrong? Thanks, Shay. -- -------------------------------------------------- Shay Friedman Author of IronRuby Unleashed http://www.IronShay.com Follow me: http://twitter.com/ironshay _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -- -------------------------------------------------- Shay Friedman Author of IronRuby Unleashed http://www.IronShay.com Follow me: http://twitter.com/ironshay -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tomas.Matousek at microsoft.com Mon Nov 23 19:29:34 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 24 Nov 2009 00:29:34 +0000 Subject: [Ironruby-core] Code Review: glob3 Message-ID: <4B342496A3EFEB48839E10BB4BF5964C18261A88@TK5EX14MBXC129.redmond.corp.microsoft.com> tfpt review "/shelveset:glob3;REDMOND\tomat" Enables FxCop rules in Globalization group for Ruby assemblies and fixes all violations. Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: glob3.diff Type: application/octet-stream Size: 248922 bytes Desc: glob3.diff URL: From Tomas.Matousek at microsoft.com Mon Nov 23 19:59:21 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 24 Nov 2009 00:59:21 +0000 Subject: [Ironruby-core] Code Review: Loops20 Message-ID: <4B342496A3EFEB48839E10BB4BF5964C18265642@TK5EX14MBXC129.redmond.corp.microsoft.com> tfpt review "/shelveset:Loops20;REDMOND\tomat" Implements adaptive loop compilation. This feature needed major changes to local variable handling and control flow implementation in interpreter. Local variables Replaces a list of local variables with LocalsVariable structure that encapsulates a dictionary. It doesn't support variable shadowing yet but it at least detects it and throws NotSupportedException. Previously we silently used wrong indices to the variable array. Control flow Reimplements interpreter goto instructions and exception handling. Goto instructions used to encode all information describing the jump (a list of finally blocks to be executed and target stack depth). The loop compiler needs to find all GotoExpressions within the loop that jump out of the loop and associate them with the corresponding Goto instructions. This cannot be done in presence of reducible nodes as they don't preserve nodes identity. Therefore we need to move the jump information from goto instruction to the target label and track current try and finally blocks. GotoInstruction, EnterTryFinallyInstruction and LeaveExceptionHandlerInstruction derive now from IndexedBranchInstruction. While OffsetInstruction hold on a relative offset these instructions hold on the target label index in the table of RuntimeLabels. RuntimeLabel struct comprises of target instruction index and target stack depth and target continuation stack depth. That's all it is needed for a jump to be executed. Jumps via label index are a little bit slower than jumps to relative offset since they need to look up the target index in the label table. Also the label table is only as big as there are gotos and try-catch/try-finally blocks in the lambda. We can easily convert other branch instructions into IndexedBranchInstructions if we find it better. Using indexed branch instructions moves target stack depth to the label. We also need to move finally list out of goto instruction. Since a single label might be used as a target of multiple goto instructions/expressions and these could be nested in different try-finally blocks we need to track the stack of finally blocks that we enter and leave as we execute instructions. EnterTryFinallyInstruction is added at the beginning of every try-finally block. This instruction pushes a local continuation into the stack of continuations stored on InterpretedFrame. The top item of this stack is current continuation. A continuation is implemented as an integer index into label table. The continuation pushed by EnterTryFinally points to finally clause. GotoInstruction sets the current pending continuation and pending value (if it transfers a value) and jumps to the current continuation if there is any. A GotoInstruction is emitted at the end of the try-finally body. This goto's target is the end of the entire try expression. EnterFinallyInstruction is emitted at the beginning of finally clause. It removes the current continuation from the continuation stack, pushes the pending continuation and value onto the data stack and invalidates them. If any exception is thrown but not caught during execution of finally clause the current pending continuation is canceled (and forgotten) and a new one is set. LeaveFinallyInstruction is emitted at the end of the finally clause. It pops the pending continuation (and pending value) from data stack and yields to it. YeildToPendingContinuation operation compares continuation stack depth of the current continuation with the continuation stack depth of the pending one. It jumps to the pending one only if its depth is less, i.e. when there is no continuation (finally clause) to be executed before we can jump to the target block. Otherwise it jumps to the current continuation. Whenever an exception occurs we catch it in Interpreter.Run method. We look for the exception handler that should be executed. If we find one we perform the same steps as if we just executed GotoInstruction targeted to the exception handle: we set the current pending continuation to the label that points to the handler and set pending value to the exception object. Finally, we jump to the current continuation. If there is no catch or fault handler we do the same as if there was one with instruction index Int32.MaxValue. That emulates a jump to the end of the instruction sequence. If this jump is not interrupted by another exception raised from some finally/fault block or goto jumping from a finally block we finish instruction execution and return from Run method with the current InstructionIndex set to the special value Int32.MaxValue. That indicates that we should rethrow the exception and so we do. Moves InterpretedFrame chaining from IronRuby to the interpreter. The frames are linked into a stack by Interpreter.Run method so that each CLR frame of this method corresponds to an interpreted stack frame in the interpreted stack. The two traces can be combined into one. A static ThreadLocal variable is updated upon entry and exit from Run method. Loop compiler Adds a new EnterLoopInstruction that is injected at the beginning of a loop generated from LoopExpression. This instruction has a counter that increments each time it is executed. If the counter reached CompilationThreshold a compilation is started on a background thread. The instruction holds on the LoopExpression to compile. The loop needs to be massaged before we can compile it to a lambda. The lambda we produce looks like: int lambda(InterpretedFrame frame) { T$1 loc$1 = (T$1)frame.Data[$index1]; ... T$n loc$n = (T$n)frame.Data[$indexN]; StrongBox closure_loc$1 = frame.Closure[$index1]; ... StrongBox closure_loc$M = frame.Closure[$indexM]; try { ... loc$1 = value ... ... closure_loc$1.Value = (object)value; ... return frame.Goto(labelIndex, value) // for each goto label (value), where label is outside loop } finally { // write back Frame.Data[$index1] = (object)loc$1; } return $breakOffset; } When the lambda is ready the EnterLoopInstruction is replaced by a CompiledLoopInstruction that holds on a delegate to the compiled lambda and calls it upon execution. Perf impact The interpreter thruput with disabled compilation is about 5% worse on Pystone with this change. About 1% amounts for tracking interpreted stack chain the rest is probably due to the more expensive try-finally blocks (continuation stack is allocated, continuations are pushed/popped on entry/exit to try and finally blocks, etc.). -X:NoAdaptiveCompilation is now better than adaptive compilation only by 4-7% (for compilation threshold 2 and 32, respectively), it used to be about 4 times better. Misc Special cases adaptive compilation for CompilationThreshold 0 and 1. In both cases the compilation is synchronous. This allows us to easily test and debug loop compiler and lambda compiler. Implements instruction provider for FinallyFlowControlExpression - the interpreter handles jumps from finally directly, so we don't need to rewrite the tree. FlowControlRewriter should reduce all extensible nodes within the tree. It might miss some goto expressions or finally clauses otherwise (e.g. { label: try { REDUCIBLE } finally { REDUCIBLE; } }, where any of the REDUCIBLEs reduces to "goto label". Ruby, Python: CatchBlock defines a scope for its exception variable, which wasn't taken into account in Python and Ruby AST generators and rewriters. They declared the variable in the containing block duplicating the variable definition and depending on variable shadowing. Removes the duplicate declarations. Removes "compileLoops" argument passed to LightCompile. All loops are adaptively compiled now. Python Adds missing debug info around for-loop initialization (see test_traceback.py run:test_throw_while_yield) Increases test_memory limit to 18k since the loop is adaptively compiled now. We might want to disable adaptive compilation during this test. Disables test_dict.py run:test_container_iterator. Filed bug: http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=25419 Disables test_traceback.py run:test_throw_while_yield. Filed bug: http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=25428 Ruby: Fixes mangling of "me" name. Disabled one test case in core/kernel/caller_spec.rb. The behavior that made this test accidentally pass was incorrect. Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: Loops20.diff Type: application/octet-stream Size: 85345 bytes Desc: Loops20.diff URL: From Tomas.Matousek at microsoft.com Mon Nov 23 20:54:20 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 24 Nov 2009 01:54:20 +0000 Subject: [Ironruby-core] Code Review: CV Message-ID: <4B342496A3EFEB48839E10BB4BF5964C182656BD@TK5EX14MBXC129.redmond.corp.microsoft.com> tfpt review "/shelveset:CV;REDMOND\tomat" Comment : Shri's fix to ConditionalVariable: http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=3151. Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: CV.diff Type: application/octet-stream Size: 6294 bytes Desc: CV.diff URL: From ivan at flanders.co.nz Tue Nov 24 05:39:47 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Tue, 24 Nov 2009 11:39:47 +0100 Subject: [Ironruby-core] eventmachine In-Reply-To: References: Message-ID: I would almost say that the reactive framework provides a similar abstraction as eventmachine but a lot more refined. It's defintely an avenue worth exploring, but I do have some concerns with regards to that: * It makes use of Expressions, LINQ and building those with IronRuby isn't going to as fun as writing plain ruby code. * It makes heavy use of generics which may also result in some pretty ugly ruby code. * Will it run on mono? For me this is of significant importance as most of my systems are either OSX, debian or ubuntu and I have 2 windows boxes. * Isn't this one of those libraries where you want to get as close to the metal as possible? I'm all for the latest and the greatest if it solves the problem better and easier than the alternative. The windows equivalent of a unix domain socket would probably be named pipes in passive mode. http://en.wikipedia.org/wiki/Named_pipe#Named_pipes_in_Windows The java implementation is not that large and I'm hoping that it is a good indication of the work that is involved. --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Sat, Nov 21, 2009 at 6:01 PM, Ryan Riley wrote: > If I have time, which should be freeing up towards the end of the year, > then I would like to work on this. Should we leverage the Reactive > Extensions for this? It seems a good fit, and it would give us the ability > to more easily mimic sockets (if I understand sockets correctly). > > > Ryan Riley > > Email: ryan.riley at panesofglass.org > LinkedIn: http://www.linkedin.com/in/ryanriley > Blog: http://wizardsofsmart.net/ > Website: http://panesofglass.org/ > > > On Sat, Nov 21, 2009 at 2:39 AM, Ivan Porto Carrero wrote: > >> Anybody wanna join in getting eventmachine working on IronRuby? >> >> We can probably do 1 better than the C based implementation on windows >> simply because .NET has all the necessary classes and exposes the events we >> need. >> For example in the C-based version you can't use EM.popen on windows >> because they need a PID and a few events, which exist on the Process class >> in .NET. >> >> .NET has a cross platform FileSystemWatcher >> .NET has sockets with events >> .NET has events on a Process >> >> those are all we need AFAICT to get eventmachine working and also make >> EM.system and EM.popen work on windows that don't work currently. The only >> remaining issue on windows is then the unix sockets but we can do without >> those I guess. >> >> getting eventmachine to work brings us closer to or gives us >> Thin >> Blather >> AMQP >> Nanite >> .... >> >> And probably every 2nd library that uses the network and cares about not >> polling. >> I will still be busy for another month or so with the book but then I >> really want to get going with this. >> --- >> Met vriendelijke groeten - Best regards - Salutations >> Ivan Porto Carrero >> Blog: http://flanders.co.nz >> Google Wave: portocarrero.ivan at googlewave.com >> Twitter: http://twitter.com/casualjim >> Author of IronRuby in Action (http://manning.com/carrero) >> >> >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core >> >> > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From patrickcbrown at gmail.com Tue Nov 24 13:44:52 2009 From: patrickcbrown at gmail.com (Patrick Brown) Date: Tue, 24 Nov 2009 13:44:52 -0500 Subject: [Ironruby-core] Dispatcher.Invoke Message-ID: <48163ce60911241044w603eaafer9989b7cad6bd1efc@mail.gmail.com> Hello Is it possible to call the Control.Dispatcher.Invoke in IronRuby? I have been digging around and trying various approaches for quite a while and can't quite seem to get it to work. The most simple example I below where I do not even access the parameter fails... any ideas would be greatly appreciated. class MainWindow < Window def updateStatus(status) puts 'hi' end def initialize self.Dispatcher.Invoke(updateStatus, ["jo"]) end end Thanks for your time and ideas, Patrick -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Tue Nov 24 14:09:04 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Tue, 24 Nov 2009 20:09:04 +0100 Subject: [Ironruby-core] Dispatcher.Invoke In-Reply-To: <48163ce60911241044w603eaafer9989b7cad6bd1efc@mail.gmail.com> References: <48163ce60911241044w603eaafer9989b7cad6bd1efc@mail.gmail.com> Message-ID: Yes it is possible but you need to wrap it in a Delegate like Action for it to work A ruby method is not a CLR delegate at all. So you can do something like this def update_status(status) puts status end def initialize meth = proc { |st| update_status(st) } self.dispatcher.invoke meth, %w(jo) end --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Tue, Nov 24, 2009 at 7:44 PM, Patrick Brown wrote: > Hello > > Is it possible to call the Control.Dispatcher.Invoke in IronRuby? I > have been digging around and trying various approaches for quite a while and > can't quite seem to get it to work. The most simple example I below where I > do not even access the parameter fails... any ideas would be greatly > appreciated. > > class MainWindow < Window > def updateStatus(status) > puts 'hi' > end > > def initialize > self.Dispatcher.Invoke(updateStatus, ["jo"]) > end > end > > Thanks for your time and ideas, > Patrick > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Tue Nov 24 14:11:54 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Tue, 24 Nov 2009 20:11:54 +0100 Subject: [Ironruby-core] Dispatcher.Invoke In-Reply-To: <48163ce60911241044w603eaafer9989b7cad6bd1efc@mail.gmail.com> References: <48163ce60911241044w603eaafer9989b7cad6bd1efc@mail.gmail.com> Message-ID: sorry def initialize meth = proc { |st| update_status(st) } self.dispatcher.invoke(System::Action.new(&meth), %w(jo)) end http://github.com/casualjim/ironnails/blob/master/IronNails/vendor/iron_nails/lib/view/xaml_proxy.rb#L10 --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Tue, Nov 24, 2009 at 7:44 PM, Patrick Brown wrote: > Hello > > Is it possible to call the Control.Dispatcher.Invoke in IronRuby? I > have been digging around and trying various approaches for quite a while and > can't quite seem to get it to work. The most simple example I below where I > do not even access the parameter fails... any ideas would be greatly > appreciated. > > class MainWindow < Window > def updateStatus(status) > puts 'hi' > end > > def initialize > self.Dispatcher.Invoke(updateStatus, ["jo"]) > end > end > > Thanks for your time and ideas, > Patrick > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From patrickcbrown at gmail.com Tue Nov 24 14:56:05 2009 From: patrickcbrown at gmail.com (Patrick Brown) Date: Tue, 24 Nov 2009 14:56:05 -0500 Subject: [Ironruby-core] Dispatcher.Invoke In-Reply-To: References: <48163ce60911241044w603eaafer9989b7cad6bd1efc@mail.gmail.com> Message-ID: <48163ce60911241156s3fb98b4fo782615db18a5c239@mail.gmail.com> Hi Thanks for your help, it still seems to be a bit off, I get this message after I cut and pasted your code in. Still looking into it but not finding much... ./MainWindow.rb:56: can't convert Proc into System::Delegate (TypeError) Thanks, Patrick On Tue, Nov 24, 2009 at 2:09 PM, Ivan Porto Carrero wrote: > Yes it is possible but you need to wrap it in a Delegate like Action for it > to work > > A ruby method is not a CLR delegate at all. > So you can do something like this > > def update_status(status) > puts status > end > > def initialize > meth = proc { |st| update_status(st) } > self.dispatcher.invoke meth, %w(jo) > end > > > --- > Met vriendelijke groeten - Best regards - Salutations > Ivan Porto Carrero > Blog: http://flanders.co.nz > Google Wave: portocarrero.ivan at googlewave.com > Twitter: http://twitter.com/casualjim > Author of IronRuby in Action (http://manning.com/carrero) > > > > On Tue, Nov 24, 2009 at 7:44 PM, Patrick Brown wrote: > >> Hello >> >> Is it possible to call the Control.Dispatcher.Invoke in IronRuby? I >> have been digging around and trying various approaches for quite a while and >> can't quite seem to get it to work. The most simple example I below where I >> do not even access the parameter fails... any ideas would be greatly >> appreciated. >> >> class MainWindow < Window >> def updateStatus(status) >> puts 'hi' >> end >> >> def initialize >> self.Dispatcher.Invoke(updateStatus, ["jo"]) >> end >> end >> >> Thanks for your time and ideas, >> Patrick >> >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core >> >> > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From patrickcbrown at gmail.com Tue Nov 24 15:02:51 2009 From: patrickcbrown at gmail.com (Patrick Brown) Date: Tue, 24 Nov 2009 15:02:51 -0500 Subject: [Ironruby-core] Dispatcher.Invoke In-Reply-To: References: <48163ce60911241044w603eaafer9989b7cad6bd1efc@mail.gmail.com> Message-ID: <48163ce60911241202i3c2ad7a4k62a45bd928038b13@mail.gmail.com> Hi Sorry, missed this response, it looks closer, I have to poke around for a bit, I am getting a missing method exception on Action.new. Thanks, Patrick On Tue, Nov 24, 2009 at 2:11 PM, Ivan Porto Carrero wrote: > sorry > > def initialize > meth = proc { |st| update_status(st) } > self.dispatcher.invoke(System::Action.new(&meth), %w(jo)) > end > > > http://github.com/casualjim/ironnails/blob/master/IronNails/vendor/iron_nails/lib/view/xaml_proxy.rb#L10 > > --- > Met vriendelijke groeten - Best regards - Salutations > Ivan Porto Carrero > Blog: http://flanders.co.nz > Google Wave: portocarrero.ivan at googlewave.com > Twitter: http://twitter.com/casualjim > Author of IronRuby in Action (http://manning.com/carrero) > > > > On Tue, Nov 24, 2009 at 7:44 PM, Patrick Brown wrote: > >> Hello >> >> Is it possible to call the Control.Dispatcher.Invoke in IronRuby? I >> have been digging around and trying various approaches for quite a while and >> can't quite seem to get it to work. The most simple example I below where I >> do not even access the parameter fails... any ideas would be greatly >> appreciated. >> >> class MainWindow < Window >> def updateStatus(status) >> puts 'hi' >> end >> >> def initialize >> self.Dispatcher.Invoke(updateStatus, ["jo"]) >> end >> end >> >> Thanks for your time and ideas, >> Patrick >> >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core >> >> > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Tue Nov 24 15:18:11 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Tue, 24 Nov 2009 21:18:11 +0100 Subject: [Ironruby-core] Dispatcher.Invoke In-Reply-To: <48163ce60911241156s3fb98b4fo782615db18a5c239@mail.gmail.com> References: <48163ce60911241044w603eaafer9989b7cad6bd1efc@mail.gmail.com> <48163ce60911241156s3fb98b4fo782615db18a5c239@mail.gmail.com> Message-ID: This works for me: require 'PresentationFramework' require 'PresentationCore' class MainWindow < System::Windows::Window def update_status(status) puts status end def initialize meth = proc { |status| update_status status } dispatcher.invoke System::Action.of(String).new(&meth), "jo" end end System::Windows::Application.new.run MainWindow.new --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Tue, Nov 24, 2009 at 8:56 PM, Patrick Brown wrote: > Hi > > Thanks for your help, it still seems to be a bit off, I get this message > after I cut and pasted your code in. Still looking into it but not finding > much... > > ./MainWindow.rb:56: can't convert Proc into System::Delegate (TypeError) > Thanks, > Patrick > > > > On Tue, Nov 24, 2009 at 2:09 PM, Ivan Porto Carrero wrote: > >> Yes it is possible but you need to wrap it in a Delegate like Action for >> it to work >> >> A ruby method is not a CLR delegate at all. >> So you can do something like this >> >> def update_status(status) >> puts status >> end >> >> def initialize >> meth = proc { |st| update_status(st) } >> self.dispatcher.invoke meth, %w(jo) >> end >> >> >> --- >> Met vriendelijke groeten - Best regards - Salutations >> Ivan Porto Carrero >> Blog: http://flanders.co.nz >> Google Wave: portocarrero.ivan at googlewave.com >> Twitter: http://twitter.com/casualjim >> Author of IronRuby in Action (http://manning.com/carrero) >> >> >> >> On Tue, Nov 24, 2009 at 7:44 PM, Patrick Brown > > wrote: >> >>> Hello >>> >>> Is it possible to call the Control.Dispatcher.Invoke in IronRuby? I >>> have been digging around and trying various approaches for quite a while and >>> can't quite seem to get it to work. The most simple example I below where I >>> do not even access the parameter fails... any ideas would be greatly >>> appreciated. >>> >>> class MainWindow < Window >>> def updateStatus(status) >>> puts 'hi' >>> end >>> >>> def initialize >>> self.Dispatcher.Invoke(updateStatus, ["jo"]) >>> end >>> end >>> >>> Thanks for your time and ideas, >>> Patrick >>> >>> _______________________________________________ >>> Ironruby-core mailing list >>> Ironruby-core at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/ironruby-core >>> >>> >> >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core >> >> > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From patrickcbrown at gmail.com Tue Nov 24 15:34:02 2009 From: patrickcbrown at gmail.com (Patrick Brown) Date: Tue, 24 Nov 2009 15:34:02 -0500 Subject: [Ironruby-core] Dispatcher.Invoke In-Reply-To: References: <48163ce60911241044w603eaafer9989b7cad6bd1efc@mail.gmail.com> <48163ce60911241156s3fb98b4fo782615db18a5c239@mail.gmail.com> Message-ID: <48163ce60911241234r14f5877bw74ec4539df079a69@mail.gmail.com> Ivan Thank you so much, you have been a great help, what slowed me down is that your current sample which works is actually a bit different than the previous two. Patrick On Tue, Nov 24, 2009 at 3:18 PM, Ivan Porto Carrero wrote: > This works for me: > > require 'PresentationFramework' > require 'PresentationCore' > > class MainWindow < System::Windows::Window > > def update_status(status) > puts status > end > > def initialize > meth = proc { |status| update_status status } > dispatcher.invoke System::Action.of(String).new(&meth), "jo" > end > end > > System::Windows::Application.new.run MainWindow.new > --- > Met vriendelijke groeten - Best regards - Salutations > Ivan Porto Carrero > Blog: http://flanders.co.nz > Google Wave: portocarrero.ivan at googlewave.com > Twitter: http://twitter.com/casualjim > Author of IronRuby in Action (http://manning.com/carrero) > > > > On Tue, Nov 24, 2009 at 8:56 PM, Patrick Brown wrote: > >> Hi >> >> Thanks for your help, it still seems to be a bit off, I get this >> message after I cut and pasted your code in. Still looking into it but not >> finding much... >> >> ./MainWindow.rb:56: can't convert Proc into System::Delegate (TypeError) >> Thanks, >> Patrick >> >> >> >> On Tue, Nov 24, 2009 at 2:09 PM, Ivan Porto Carrero wrote: >> >>> Yes it is possible but you need to wrap it in a Delegate like Action for >>> it to work >>> >>> A ruby method is not a CLR delegate at all. >>> So you can do something like this >>> >>> def update_status(status) >>> puts status >>> end >>> >>> def initialize >>> meth = proc { |st| update_status(st) } >>> self.dispatcher.invoke meth, %w(jo) >>> end >>> >>> >>> --- >>> Met vriendelijke groeten - Best regards - Salutations >>> Ivan Porto Carrero >>> Blog: http://flanders.co.nz >>> Google Wave: portocarrero.ivan at googlewave.com >>> Twitter: http://twitter.com/casualjim >>> Author of IronRuby in Action (http://manning.com/carrero) >>> >>> >>> >>> On Tue, Nov 24, 2009 at 7:44 PM, Patrick Brown < >>> patrickcbrown at gmail.com> wrote: >>> >>>> Hello >>>> >>>> Is it possible to call the Control.Dispatcher.Invoke in IronRuby? I >>>> have been digging around and trying various approaches for quite a while and >>>> can't quite seem to get it to work. The most simple example I below where I >>>> do not even access the parameter fails... any ideas would be greatly >>>> appreciated. >>>> >>>> class MainWindow < Window >>>> def updateStatus(status) >>>> puts 'hi' >>>> end >>>> >>>> def initialize >>>> self.Dispatcher.Invoke(updateStatus, ["jo"]) >>>> end >>>> end >>>> >>>> Thanks for your time and ideas, >>>> Patrick >>>> >>>> _______________________________________________ >>>> Ironruby-core mailing list >>>> Ironruby-core at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/ironruby-core >>>> >>>> >>> >>> _______________________________________________ >>> Ironruby-core mailing list >>> Ironruby-core at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/ironruby-core >>> >>> >> >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core >> >> > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Wed Nov 25 08:29:24 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Wed, 25 Nov 2009 14:29:24 +0100 Subject: [Ironruby-core] invoke member and dynamic binding isn't the same? Message-ID: Hi I have some ruby code, which through a process of instance_eval and other meta programming tricks builds an object with a method assign defined on it. I have this code in C# *var scope = Engine.CreateScope();* *scope.SetVariable("ctxt", this);* *Engine.ExecuteFile("rubyfile.rb", scope);* This code correctly sets a something property on this (linked with ctxt) but when I then want to call a method on it that should exist *public dynamic Something { get; set; }* *Something.assign("ivan")* Unhandled Exception: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: 'Iro nRuby.Builtins.RubyObject' does not contain a definition for 'assign' at CallSite.Target(Closure , CallSite , Object , String ) at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid2[T0,T1](CallSite site, T0 arg0, T1 arg1) at BugTracker_40.Bug.Assign(String assignee) in C:\dev\ironruby-in-action\Sam ples\BugTracker_40\BugTracker_40\Bug.cs:line 60 at BugTracker_40.Program.Main(String[] args) in C:\dev\ironruby-in-action\Sam ples\BugTracker_40\BugTracker_40\Program.cs:line 13 However the same code with: var _rubyOperations = Engine.CreateOperations() public object Something { get; set; } _rubyOperations.InvokeMember(Something, "assign", "ivan") does work. The question is why? Is this the expected behavior? Am I missing an assembly reference (it has Ironruby.*, Microsoft.Scripting, Microsoft.Scripting.Core) --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) -------------- next part -------------- An HTML attachment was scrubbed... URL: From adam.burmister at gmail.com Wed Nov 25 09:12:03 2009 From: adam.burmister at gmail.com (Adam Burmister) Date: Wed, 25 Nov 2009 14:12:03 +0000 Subject: [Ironruby-core] Finding the mythical root_visual object in Gestalt Message-ID: <5E1F302C-8934-47CD-AA64-DADA2C601270@gmail.com> Hi all, I'm currently writing about Gestalt using the 1.0 release. The best documentation I can find for it is the PDF "sl-back-to-just-text.pdf", by Jimmy, which states: "XAML accessors root_visual maps to System.Windows.Application.Current.RootVisual ... When a method is called that does not exist on root_visual, then FindName(methodName) is called. This allows access to any XAML elements with an x:Name value... root_visual.Message.Text = "New Message" " This is the code that I'm using to try and experiment with this: I cannot find this object placed anywhere I would expect; at least it's not as easily available as the documentation leads me to believe. Can anyone throw some light onto what I'm doing wrong, or if there has been a change in the way this works? Thank you kindly, Adam Burmister -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Wed Nov 25 11:17:20 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Wed, 25 Nov 2009 17:17:20 +0100 Subject: [Ironruby-core] 2 lines to add to the ir launcher Message-ID: Hi Could the following 2 lines be added to the ir launcher script for mono ? export MONO_IOMAP=all export MONO_MANAGED_WATCHER=1 The first one ensures no errors when people related to casing and drive letters http://www.mono-project.com/IOMap the second one enables System.IO.FileSystemWatcher on linux and OSX. --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero GSM: +32.486.787.582 Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tomas.Matousek at microsoft.com Wed Nov 25 12:16:32 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Wed, 25 Nov 2009 17:16:32 +0000 Subject: [Ironruby-core] invoke member and dynamic binding isn't the same? In-Reply-To: References: Message-ID: <4B342496A3EFEB48839E10BB4BF5964C1826BF7B@TK5EX14MBXC129.redmond.corp.microsoft.com> Can you send the entire source code that sets ?Something? and then the entire C# method that accesses it, ideally a minimal repro? Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Wednesday, November 25, 2009 5:29 AM To: ironruby-core Subject: [Ironruby-core] invoke member and dynamic binding isn't the same? Hi I have some ruby code, which through a process of instance_eval and other meta programming tricks builds an object with a method assign defined on it. I have this code in C# var scope = Engine.CreateScope(); scope.SetVariable("ctxt", this); Engine.ExecuteFile("rubyfile.rb", scope); This code correctly sets a something property on this (linked with ctxt) but when I then want to call a method on it that should exist public dynamic Something { get; set; } Something.assign("ivan") Unhandled Exception: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: 'Iro nRuby.Builtins.RubyObject' does not contain a definition for 'assign' at CallSite.Target(Closure , CallSite , Object , String ) at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid2[T0,T1](CallSite site, T0 arg0, T1 arg1) at BugTracker_40.Bug.Assign(String assignee) in C:\dev\ironruby-in-action\Sam ples\BugTracker_40\BugTracker_40\Bug.cs:line 60 at BugTracker_40.Program.Main(String[] args) in C:\dev\ironruby-in-action\Sam ples\BugTracker_40\BugTracker_40\Program.cs:line 13 However the same code with: var _rubyOperations = Engine.CreateOperations() public object Something { get; set; } _rubyOperations.InvokeMember(Something, "assign", "ivan") does work. The question is why? Is this the expected behavior? Am I missing an assembly reference (it has Ironruby.*, Microsoft.Scripting, Microsoft.Scripting.Core) --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) -------------- next part -------------- An HTML attachment was scrubbed... URL: From patrickcbrown at gmail.com Wed Nov 25 14:03:11 2009 From: patrickcbrown at gmail.com (Patrick Brown) Date: Wed, 25 Nov 2009 14:03:11 -0500 Subject: [Ironruby-core] ListViewItem DataTemplate Message-ID: <48163ce60911251103g4ff11e35l9504d70bab155a69@mail.gmail.com> Hello Has anyone gotten a datatemplate for a ListView under WPF? I created a very simple C# sample and converted it to IronRuby, the C# works perfectly, the IronRuby example displays my class name, the datatemplate didn't load and bind up to the properties as I hoped. C# public class StatusListView : ListView { public StatusListView() { var items = new[] { new { message = "One", messageType = "Status" }, new { message = "Two", messageType = "Error" }, new { message = "Shree", messageType = "Status" } }; FrameworkElementFactory textblock = new FrameworkElementFactory(typeof(TextBlock)); Setter setter = new Setter(); setter.Property = TextBlock.FontSizeProperty; setter.Value = 18.0; DataTrigger dataTrigger = new DataTrigger(); dataTrigger.Binding = new Binding("messageType"); dataTrigger.Value = "Status"; dataTrigger.Setters.Add(setter); Style style = new Style(typeof(TextBlock)); style.Triggers.Add(dataTrigger); textblock.SetValue(TextBlock.StyleProperty, style); textblock.SetBinding(TextBlock.TextProperty, new Binding("message")); DataTemplate template = new DataTemplate(); template.VisualTree = textblock; ItemsSource = items; ItemTemplate = template; } } IronRuby - in this sample my listview itemsource is actually set in another piece of code as so. As I state above, the item does show up in the listview but the datatemplate is not applied against it. self.buildMessages = Array.new self.buildMessages.push(BuildMessage.new("Test","Status")) self.statusListView.ItemsSource = self.buildMessages class StatusListView < ListView def initialize() HorizontalAlignment = HorizontalAlignment.Stretch Margin = Thickness.new(0,5,0,5) MinHeight = 200 BuildItemTemplate() end def BuildItemTemplate() begin textblock = FrameworkElementFactory.new(TextBlock.to_clr_type) setter = Setter.new setter.Property = TextBlock.FontSizeProperty setter.Value = 14.0 dataTrigger = DataTrigger.new dataTrigger.Binding = System::Windows::Data::Binding.new("messageType") dataTrigger.Value = "Status" dataTrigger.Setters.Add(setter) style = Style.new(TextBlock.to_clr_type) style.Triggers.Add(dataTrigger) textblock.SetValue(TextBlock.StyleProperty, style) textblock.SetBinding(TextBlock.TextProperty, System::Windows::Data::Binding.new("message")) template = DataTemplate.new template.VisualTree = textblock ItemTemplate = template rescue Exception => e puts "#{e}" end end end Thanks for your time and thoughts Patrick -------------- next part -------------- An HTML attachment was scrubbed... URL: From patrickcbrown at gmail.com Wed Nov 25 15:24:57 2009 From: patrickcbrown at gmail.com (Patrick Brown) Date: Wed, 25 Nov 2009 15:24:57 -0500 Subject: [Ironruby-core] ListViewItem DataTemplate In-Reply-To: <48163ce60911251103g4ff11e35l9504d70bab155a69@mail.gmail.com> References: <48163ce60911251103g4ff11e35l9504d70bab155a69@mail.gmail.com> Message-ID: <48163ce60911251224y1f89b618wb5651b5d7488cdee@mail.gmail.com> Hi Ok, this confuses me a bit, I can get it to work by not deriving from ListView and setting all my settings in the initialize method and instead having a listview member and assigning all the values on it. Can anyone see a reason for this? def BuildListView() self.statusListView = ListView.new self.statusListView.HorizontalAlignment = HorizontalAlignment.Stretch self.statusListView.Margin = Thickness.new(0,5,0,5) self.statusListView.Height = 200 textblock = FrameworkElementFactory.new(TextBlock.to_clr_type) setter = Setter.new setter.Property = TextBlock.FontSizeProperty setter.Value = 14.0 dataTrigger = DataTrigger.new dataTrigger.Binding = System::Windows::Data::Binding.new("messageType") dataTrigger.Value = "Status" dataTrigger.Setters.Add(setter) style = Style.new(TextBlock.to_clr_type) style.Triggers.Add(dataTrigger) textblock.SetValue(TextBlock.StyleProperty, style) textblock.SetBinding(TextBlock.TextProperty, System::Windows::Data::Binding.new("message")) template = DataTemplate.new template.VisualTree = textblock self.statusListView.ItemTemplate = template end On Wed, Nov 25, 2009 at 2:03 PM, Patrick Brown wrote: > Hello > > Has anyone gotten a datatemplate for a ListView under WPF? I created a > very simple C# sample and converted it to IronRuby, the C# works perfectly, > the IronRuby example displays my class name, the datatemplate didn't load > and bind up to the properties as I hoped. > > C# > public class StatusListView : ListView > { > public StatusListView() > { > var items = new[] > { > new { message = "One", messageType = "Status" }, > new { message = "Two", messageType = "Error" }, > new { message = "Shree", messageType = "Status" } > }; > FrameworkElementFactory textblock = new > FrameworkElementFactory(typeof(TextBlock)); > > Setter setter = new Setter(); > setter.Property = TextBlock.FontSizeProperty; > setter.Value = 18.0; > > DataTrigger dataTrigger = new DataTrigger(); > dataTrigger.Binding = new Binding("messageType"); > dataTrigger.Value = "Status"; > dataTrigger.Setters.Add(setter); > > Style style = new Style(typeof(TextBlock)); > style.Triggers.Add(dataTrigger); > > textblock.SetValue(TextBlock.StyleProperty, style); > textblock.SetBinding(TextBlock.TextProperty, new > Binding("message")); > DataTemplate template = new DataTemplate(); > template.VisualTree = textblock; > ItemsSource = items; > ItemTemplate = template; > } > } > > > IronRuby - in this sample my listview itemsource is actually set in > another piece of code as so. As I state above, the item does show up in the > listview but the datatemplate is not applied against it. > > self.buildMessages = Array.new > self.buildMessages.push(BuildMessage.new("Test","Status")) > self.statusListView.ItemsSource = self.buildMessages > > > class StatusListView < ListView > def initialize() > HorizontalAlignment = HorizontalAlignment.Stretch > Margin = Thickness.new(0,5,0,5) > MinHeight = 200 > > BuildItemTemplate() > end > > def BuildItemTemplate() > begin > textblock = FrameworkElementFactory.new(TextBlock.to_clr_type) > > setter = Setter.new > setter.Property = TextBlock.FontSizeProperty > setter.Value = 14.0 > > dataTrigger = DataTrigger.new > dataTrigger.Binding = System::Windows::Data::Binding.new("messageType") > dataTrigger.Value = "Status" > dataTrigger.Setters.Add(setter) > > style = Style.new(TextBlock.to_clr_type) > style.Triggers.Add(dataTrigger) > > textblock.SetValue(TextBlock.StyleProperty, style) > textblock.SetBinding(TextBlock.TextProperty, > System::Windows::Data::Binding.new("message")) > > template = DataTemplate.new > template.VisualTree = textblock > ItemTemplate = template > rescue Exception => e > puts "#{e}" > end > end > end > > Thanks for your time and thoughts > Patrick > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ast at atownley.org Wed Nov 25 16:27:45 2009 From: ast at atownley.org (Andrew S. Townley) Date: Wed, 25 Nov 2009 21:27:45 +0000 Subject: [Ironruby-core] Back with more questions: mono 2.4.x & IR 0.9.x Message-ID: <1259184465.9791.24.camel@linna> Hi Folks, Since I hear such good things about the rate at which features are being added to the project (and since it coincides with needing to write some cross-platform UI code), I thought I'd give the new version a go. Here's my environment: $ mono --version Mono JIT compiler version 2.4.2.3 (tarball Mon Nov 23 08:34:29 GMT 2009) Copyright (C) 2002-2008 Novell, Inc and Contributors. www.mono-project.com TLS: __thread GC: Included Boehm (with typed GC) SIGSEGV: altstack Notifications: epoll Architecture: amd64 Disabled: none $ mono bin/ir.exe --version IronRuby 0.9.2.0 on .NET 2.0.0.0 $ uname -a Linux linna 2.6.24-25-generic #1 SMP Tue Oct 20 06:49:12 UTC 2009 x86_64 GNU/Linux I'm having all kinds of trouble getting the examples to even run. When I try any of them, I get complaints about not being able to load libraries, e.g. the DiskUse demo: $ mono ../../bin/ir.exe app.rb :0:in `require': no such file to load -- WindowsBase (LoadError) from app.rb:16 ...not to mention having all sorts of issues getting the command-line tools to run in Linux due to environment issues that I don't really understand (and I've been a Linux user since 1993 and a UNIX user since 1990). It sure seems like there's some environment magic that's needed, but I can't figure out what it really is. Nothing that I've tried that seemed like it should work did the trick. Q: is there an up-to-date guide for getting IronRuby working with Mono 2.4 anywhere? Everything I could find with google seemed at least 2 yrs old. There aren't any obvious links from either the ironruby website or from the mono site. Clearly based on Jimmy's OSCON 2009 post: http://blog.jimmy.schementi.com/2009/07/ironruby-at-oscon-2009-mono-moonlight.html, it should all be working swimmingly. Apologies if this is a really dumb question. For what I need to do at the moment, I need to quickly prototype some small applications that need to work on Windows, Linux and OSX. From what I've seen, .NET & Mono seem to be the only real choice for this at the moment, but I'd prefer to not have to write C# code when I'm doing the prototypes (plus I've lots of ruby library code that I've already written for other purposes). What's the quickest way to get everything up and running (with some examples of actually running stuff from the command line on Linux)? Thanks in advance for your assistance. I'm looking forward to seeing what I can do with IronRuby since I looked at it a few months ago. :) Cheers, ast -- Andrew S. Townley http://atownley.org From lists at ruby-forum.com Wed Nov 25 23:41:58 2009 From: lists at ruby-forum.com (Dong Zhang) Date: Thu, 26 Nov 2009 05:41:58 +0100 Subject: [Ironruby-core] .NET Remoting with IronRuby 0.9.2 In-Reply-To: <48163ce60911110645p59eb8660k3cadea3431700231@mail.gmail.com> References: <48163ce60911110645p59eb8660k3cadea3431700231@mail.gmail.com> Message-ID: <0f03d8a64a42fdb662b378d34c01142d@ruby-forum.com> Hi Patrick did you find a solution to your problem? I got exactly the same problem while trying to call .NET remote method. thanks Dong Patrick Brown wrote: > Hello > > Has anyone been able to get Remoting to work? I get the following > exception when attempting to make a call. I am rather new to IronRuby > but > believe my code should work, I converted a very simple snippit of > working C# > code to IronRuby and can't seem to get it to work. I put breakpoints in > the > .NET assemblies and watch each step complete successfully until the > service.SelectPolicies call. > > mscorlib:0:in `HandleReturnMessage': Cannot load type > 'IronRuby.Runtime.IRubyObj > ect, IronRuby, Version=0.9.2.0, Culture=neutral, > PublicKeyToken=31bf3856ad364e35 > '. (System::Runtime::Remoting::RemotingException) > from mscorlib:0:in `PrivateInvoke' > from Microsoft.Scripting.Core:0:in `BindCore' > from Microsoft.Scripting.Core:0:in `Bind' > from ./PropertyPolicy.rb:34:in `GitSomePolicies' > from main.rb:5 > > > IronRuby snippit > > RemotingConfiguration.Configure("Configuration\\ClientRemotingConfiguration.config", > false) > > service = > DIContainer.Instance.method(:Resolve).of(IPropertyPolicyService).call() > types = DIContainer.Instance.method(:Resolve).of(ILookupInfos).call(); > types.Add(DIContainer.Instance.method(:Resolve).of(ICodeListInfoBuilder).call().Build("AP", > > CodeValueAttribute.GetDescription(PolicyType.AllPacPolicy), "", 0, > DateTime.Now, DateTime.Now)) > > policies = service.SelectPolicies(types) > > Thanks, > Patrick -- Posted via http://www.ruby-forum.com/. From ivan at flanders.co.nz Thu Nov 26 03:04:06 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Thu, 26 Nov 2009 09:04:06 +0100 Subject: [Ironruby-core] Back with more questions: mono 2.4.x & IR 0.9.x In-Reply-To: <1259184465.9791.24.camel@linna> References: <1259184465.9791.24.camel@linna> Message-ID: http://dlrci.colliertech.org/ironruby/ Those builds are done on a mono machine The console is a bit wonky at this point on mono. I don't know if it's a mono thing or an IronRuby thing but you can't use arrow keys in the console or tab etc. It takes the characters just doesn't interpret them. To make something run on linux download one of the packages and extract in a folder, then add the bin path in that folder to your PATH env variable. The thing is the demo you tried are WPF demo's and they don't work on mono because mono doesn't implement that technology. If you're going cross-platform and you want a similar experience on all platforms you're probably looking at using Qt, GTK# or Winforms at this as GUI toolkit. In about 8-10 months I guess silverlight 3 is a good option, and when moonlight catches up to silverlight 4 then Silverlight is the only choice that makes sense (money and time wise) I guess for building cross-platform apps and providing the same experience on all of them. IronRuby is the Ruby language on the .NET framework so if you're new to both it can hurt and the msdn docs don't yet show a ruby language tickbox so it will be of great help if you at least know how to read C# or VB. I hope this helps you to get started, if not keep sending emails :) --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Wed, Nov 25, 2009 at 10:27 PM, Andrew S. Townley wrote: > Hi Folks, > > Since I hear such good things about the rate at which features are being > added to the project (and since it coincides with needing to write some > cross-platform UI code), I thought I'd give the new version a go. > > Here's my environment: > $ mono --version > Mono JIT compiler version 2.4.2.3 (tarball Mon Nov 23 08:34:29 GMT 2009) > Copyright (C) 2002-2008 Novell, Inc and Contributors. > www.mono-project.com > TLS: __thread > GC: Included Boehm (with typed GC) > SIGSEGV: altstack > Notifications: epoll > Architecture: amd64 > Disabled: none > > $ mono bin/ir.exe --version > IronRuby 0.9.2.0 on .NET 2.0.0.0 > > $ uname -a > Linux linna 2.6.24-25-generic #1 SMP Tue Oct 20 06:49:12 UTC 2009 x86_64 > GNU/Linux > > I'm having all kinds of trouble getting the examples to even run. When > I try any of them, I get complaints about not being able to load > libraries, e.g. the DiskUse demo: > > $ mono ../../bin/ir.exe app.rb > :0:in `require': no such file to load -- WindowsBase (LoadError) > from app.rb:16 > > ...not to mention having all sorts of issues getting the command-line > tools to run in Linux due to environment issues that I don't really > understand (and I've been a Linux user since 1993 and a UNIX user since > 1990). It sure seems like there's some environment magic that's needed, > but I can't figure out what it really is. Nothing that I've tried that > seemed like it should work did the trick. > > Q: is there an up-to-date guide for getting IronRuby working with Mono > 2.4 anywhere? Everything I could find with google seemed at least 2 yrs > old. There aren't any obvious links from either the ironruby website or > from the mono site. > > Clearly based on Jimmy's OSCON 2009 post: > > http://blog.jimmy.schementi.com/2009/07/ironruby-at-oscon-2009-mono-moonlight.html, > it should all be working swimmingly. > > Apologies if this is a really dumb question. > > For what I need to do at the moment, I need to quickly prototype some > small applications that need to work on Windows, Linux and OSX. From > what I've seen, .NET & Mono seem to be the only real choice for this at > the moment, but I'd prefer to not have to write C# code when I'm doing > the prototypes (plus I've lots of ruby library code that I've already > written for other purposes). > > What's the quickest way to get everything up and running (with some > examples of actually running stuff from the command line on Linux)? > > Thanks in advance for your assistance. I'm looking forward to seeing > what I can do with IronRuby since I looked at it a few months ago. :) > > Cheers, > > ast > -- > Andrew S. Townley > http://atownley.org > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ast at atownley.org Thu Nov 26 03:27:28 2009 From: ast at atownley.org (Andrew S. Townley) Date: Thu, 26 Nov 2009 08:27:28 +0000 Subject: [Ironruby-core] Back with more questions: mono 2.4.x & IR 0.9.x In-Reply-To: References: <1259184465.9791.24.camel@linna> Message-ID: <1259224048.9791.46.camel@linna> Hi Ivan, On Thu, 2009-11-26 at 09:04 +0100, Ivan Porto Carrero wrote: > http://dlrci.colliertech.org/ironruby/ > > > Those builds are done on a mono machine Thanks for the pointer to the other builds. I'll give that a go later today. I did notice the thing about the console (with the colors), but from google, it seems that's a Mono issue and not an IronRuby issue. > The console is a bit wonky at this point on mono. I don't know if it's > a mono thing or an IronRuby thing but you can't use arrow keys in the > console or tab etc. It takes the characters just doesn't interpret > them. I occasionally use irb for quick tests, but most of the time, I just write simple little scripts and run them with the main ruby interpreter. > > To make something run on linux download one of the packages and > extract in a folder, then add the bin path in that folder to your PATH > env variable. > > > The thing is the demo you tried are WPF demo's and they don't work on > mono because mono doesn't implement that technology. It's been a while since I did any C# development (pre-WPF), and that was mostly command-line and library stuff. I did do a few WinForms things, but not a lot. Sorry for the confusion. > If you're going cross-platform and you want a similar experience on > all platforms you're probably looking at using Qt, GTK# or Winforms at > this as GUI toolkit. > In about 8-10 months I guess silverlight 3 is a good option, and when > moonlight catches up to silverlight 4 then Silverlight is the only > choice that makes sense (money and time wise) I guess for building > cross-platform apps and providing the same experience on all of them. WinForms was my plan for the moment. Going the silverlight route is too many layers of alpha for what I'm trying to do (my own stuff, IronRuby and the UI toolkit would just be too much! :) > IronRuby is the Ruby language on the .NET framework so if you're new > to both it can hurt and the msdn docs don't yet show a ruby language > tickbox so it will be of great help if you at least know how to read > C# or VB. > I hope this helps you to get started, if not keep sending emails :) Thanks for the help and the pointers. I would've done most of my C# with .NET 1.1, but I've been using ruby pretty actively for about 5 years, including fighting with trying to use MRI and GTK+ on Linux for the last couple of years and experiencing random crashes due to the incompatible threading models. Even if I have to use the WinForms package for the UI (which I vaguely remember from doing some MFC work back in 99-01), at least there's a common, underlying runtime for all the bits that should play nicer together than what I've been doing. Ruby 1.9 isn't an option for me because I have too many dependencies that don't seem to work without changes (based on a quick re-try of that last night). Again, thanks for all the help. That should be enough to get me up and running, and Thibaut sent me a link to some WinForms/IronRuby examples too. I'll let you know if I have any more issues getting started. Cheers, ast --- > Met vriendelijke groeten - Best regards - Salutations > Ivan Porto Carrero > Blog: http://flanders.co.nz > Google Wave: portocarrero.ivan at googlewave.com > Twitter: http://twitter.com/casualjim > Author of IronRuby in Action (http://manning.com/carrero) > > > > On Wed, Nov 25, 2009 at 10:27 PM, Andrew S. Townley > wrote: > Hi Folks, > > Since I hear such good things about the rate at which features > are being > added to the project (and since it coincides with needing to > write some > cross-platform UI code), I thought I'd give the new version a > go. > > Here's my environment: > $ mono --version > Mono JIT compiler version 2.4.2.3 (tarball Mon Nov 23 08:34:29 > GMT 2009) > Copyright (C) 2002-2008 Novell, Inc and Contributors. > www.mono-project.com > TLS: __thread > GC: Included Boehm (with typed GC) > SIGSEGV: altstack > Notifications: epoll > Architecture: amd64 > Disabled: none > > $ mono bin/ir.exe --version > IronRuby 0.9.2.0 on .NET 2.0.0.0 > > $ uname -a > Linux linna 2.6.24-25-generic #1 SMP Tue Oct 20 06:49:12 UTC > 2009 x86_64 > GNU/Linux > > I'm having all kinds of trouble getting the examples to even > run. When > I try any of them, I get complaints about not being able to > load > libraries, e.g. the DiskUse demo: > > $ mono ../../bin/ir.exe app.rb > :0:in `require': no such file to load -- WindowsBase > (LoadError) > from app.rb:16 > > ...not to mention having all sorts of issues getting the > command-line > tools to run in Linux due to environment issues that I don't > really > understand (and I've been a Linux user since 1993 and a UNIX > user since > 1990). It sure seems like there's some environment magic > that's needed, > but I can't figure out what it really is. Nothing that I've > tried that > seemed like it should work did the trick. > > Q: is there an up-to-date guide for getting IronRuby working > with Mono > 2.4 anywhere? Everything I could find with google seemed at > least 2 yrs > old. There aren't any obvious links from either the ironruby > website or > from the mono site. > > Clearly based on Jimmy's OSCON 2009 post: > http://blog.jimmy.schementi.com/2009/07/ironruby-at-oscon-2009-mono-moonlight.html, it should all be working swimmingly. > > Apologies if this is a really dumb question. > > For what I need to do at the moment, I need to quickly > prototype some > small applications that need to work on Windows, Linux and > OSX. From > what I've seen, .NET & Mono seem to be the only real choice > for this at > the moment, but I'd prefer to not have to write C# code when > I'm doing > the prototypes (plus I've lots of ruby library code that I've > already > written for other purposes). > > What's the quickest way to get everything up and running (with > some > examples of actually running stuff from the command line on > Linux)? > > Thanks in advance for your assistance. I'm looking forward to > seeing > what I can do with IronRuby since I looked at it a few months > ago. :) > > Cheers, > > ast > -- > Andrew S. Townley > http://atownley.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 -- Andrew S. Townley http://atownley.org From ivan at flanders.co.nz Thu Nov 26 03:48:24 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Thu, 26 Nov 2009 09:48:24 +0100 Subject: [Ironruby-core] ListViewItem DataTemplate In-Reply-To: <48163ce60911251103g4ff11e35l9504d70bab155a69@mail.gmail.com> References: <48163ce60911251103g4ff11e35l9504d70bab155a69@mail.gmail.com> Message-ID: There is no link between the DLR objects and CLR objects so if you derive from a control in ruby code there is no way for XAML to figure out what has been configured etc. There is also no class it can link to as the classes don't exist in the same way in a DLR based language as in a CLR language. The following control tries to make that integration easier but it's still very early days and all help is wanted. http://dynamicscriptcontrol.codeplex.com/ http://code.google.com/p/dynamic-script-control/ Nick Rickets may be of help, I think he's got a WPF application with IronRuby that is deployed AFAIK I think it's important to understand that there is a difference between a DLR and a CLR based language. CLR classes map straight to CLR-types but this isn't always the case in a DLR based language because they have a difference on opinion with the CLR on how classes should behave. The CLR says ALL classes are CLOSED that means you can't modify anything once it's compiled then it only does its job and doesn't learn new tricks The DLR (for IronRuby and IronPython at least) says ALL classes are OPEN, you can freeze some making them closed. Meaning once you're program is running you can modify classes by adding or removing methods and so on. Because of this reason x:Class doesn't know where to go because for the CLR the type may very well not exist. This doesn't help you much but it's a start to figure out what's going on and why things don't work the same as with C# I'm sorry but I keep deleting the following message from every email I sent to help you: Naming conventions! in ruby stuff is lowercased_and_underscored except for constants or there is a particularly good reason for you to want an uppercased name like a DSL entry point. UpperCased names are constants in Ruby and as such people wanting to help you (in this case me) have an easier time getting through your code as they don't have to workout what they are looking at. Constants include ModuleNames, ClassNames and CONSTANT_VALUES in C# stuff is CamelCasedAndNotUnderscored. . --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Wed, Nov 25, 2009 at 8:03 PM, Patrick Brown wrote: > Hello > > Has anyone gotten a datatemplate for a ListView under WPF? I created a > very simple C# sample and converted it to IronRuby, the C# works perfectly, > the IronRuby example displays my class name, the datatemplate didn't load > and bind up to the properties as I hoped. > > C# > public class StatusListView : ListView > { > public StatusListView() > { > var items = new[] > { > new { message = "One", messageType = "Status" }, > new { message = "Two", messageType = "Error" }, > new { message = "Shree", messageType = "Status" } > }; > FrameworkElementFactory textblock = new > FrameworkElementFactory(typeof(TextBlock)); > > Setter setter = new Setter(); > setter.Property = TextBlock.FontSizeProperty; > setter.Value = 18.0; > > DataTrigger dataTrigger = new DataTrigger(); > dataTrigger.Binding = new Binding("messageType"); > dataTrigger.Value = "Status"; > dataTrigger.Setters.Add(setter); > > Style style = new Style(typeof(TextBlock)); > style.Triggers.Add(dataTrigger); > > textblock.SetValue(TextBlock.StyleProperty, style); > textblock.SetBinding(TextBlock.TextProperty, new > Binding("message")); > DataTemplate template = new DataTemplate(); > template.VisualTree = textblock; > ItemsSource = items; > ItemTemplate = template; > } > } > > > IronRuby - in this sample my listview itemsource is actually set in > another piece of code as so. As I state above, the item does show up in the > listview but the datatemplate is not applied against it. > > self.buildMessages = Array.new > self.buildMessages.push(BuildMessage.new("Test","Status")) > self.statusListView.ItemsSource = self.buildMessages > > > class StatusListView < ListView > def initialize() > HorizontalAlignment = HorizontalAlignment.Stretch > Margin = Thickness.new(0,5,0,5) > MinHeight = 200 > > BuildItemTemplate() > end > > def BuildItemTemplate() > begin > textblock = FrameworkElementFactory.new(TextBlock.to_clr_type) > > setter = Setter.new > setter.Property = TextBlock.FontSizeProperty > setter.Value = 14.0 > > dataTrigger = DataTrigger.new > dataTrigger.Binding = System::Windows::Data::Binding.new("messageType") > dataTrigger.Value = "Status" > dataTrigger.Setters.Add(setter) > > style = Style.new(TextBlock.to_clr_type) > style.Triggers.Add(dataTrigger) > > textblock.SetValue(TextBlock.StyleProperty, style) > textblock.SetBinding(TextBlock.TextProperty, > System::Windows::Data::Binding.new("message")) > > template = DataTemplate.new > template.VisualTree = textblock > ItemTemplate = template > rescue Exception => e > puts "#{e}" > end > end > end > > Thanks for your time and thoughts > Patrick > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Thu Nov 26 03:58:32 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Thu, 26 Nov 2009 09:58:32 +0100 Subject: [Ironruby-core] Back with more questions: mono 2.4.x & IR 0.9.x In-Reply-To: <1259224048.9791.46.camel@linna> References: <1259184465.9791.24.camel@linna> <1259224048.9791.46.camel@linna> Message-ID: You can also look in my github account the samples for my book are published there. I don't have Webforms or Winforms samples there (except for the one provided by thibaut for his Magic DSL), because I declared those techs dead a few years ago. A GUI toolkit I want to give a try sometime in the future is clutter http://www.clutter-project.org/docs/clutter/stable/. It's a .NET based OSS OpenGL GUI toolkit. But all those toolkits IMHO are really stop gaps until SL is mature enough and Moonlight gets to SL4. (SL3 => no rich-text editor which is used often in LOB apps, OOB mode is still sandboxed) --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Thu, Nov 26, 2009 at 9:27 AM, Andrew S. Townley wrote: > Hi Ivan, > > On Thu, 2009-11-26 at 09:04 +0100, Ivan Porto Carrero wrote: > > http://dlrci.colliertech.org/ironruby/ > > > > > > Those builds are done on a mono machine > > Thanks for the pointer to the other builds. I'll give that a go later > today. I did notice the thing about the console (with the colors), but > from google, it seems that's a Mono issue and not an IronRuby issue. > > > The console is a bit wonky at this point on mono. I don't know if it's > > a mono thing or an IronRuby thing but you can't use arrow keys in the > > console or tab etc. It takes the characters just doesn't interpret > > them. > > I occasionally use irb for quick tests, but most of the time, I just > write simple little scripts and run them with the main ruby interpreter. > > > > > To make something run on linux download one of the packages and > > extract in a folder, then add the bin path in that folder to your PATH > > env variable. > > > > > > The thing is the demo you tried are WPF demo's and they don't work on > > mono because mono doesn't implement that technology. > > It's been a while since I did any C# development (pre-WPF), and that was > mostly command-line and library stuff. I did do a few WinForms things, > but not a lot. > > Sorry for the confusion. > > > If you're going cross-platform and you want a similar experience on > > all platforms you're probably looking at using Qt, GTK# or Winforms at > > this as GUI toolkit. > > In about 8-10 months I guess silverlight 3 is a good option, and when > > moonlight catches up to silverlight 4 then Silverlight is the only > > choice that makes sense (money and time wise) I guess for building > > cross-platform apps and providing the same experience on all of them. > > WinForms was my plan for the moment. Going the silverlight route is too > many layers of alpha for what I'm trying to do (my own stuff, IronRuby > and the UI toolkit would just be too much! :) > > > IronRuby is the Ruby language on the .NET framework so if you're new > > to both it can hurt and the msdn docs don't yet show a ruby language > > tickbox so it will be of great help if you at least know how to read > > C# or VB. > > I hope this helps you to get started, if not keep sending emails :) > > Thanks for the help and the pointers. I would've done most of my C# > with .NET 1.1, but I've been using ruby pretty actively for about 5 > years, including fighting with trying to use MRI and GTK+ on Linux for > the last couple of years and experiencing random crashes due to the > incompatible threading models. > > Even if I have to use the WinForms package for the UI (which I vaguely > remember from doing some MFC work back in 99-01), at least there's a > common, underlying runtime for all the bits that should play nicer > together than what I've been doing. > > Ruby 1.9 isn't an option for me because I have too many dependencies > that don't seem to work without changes (based on a quick re-try of that > last night). > > Again, thanks for all the help. That should be enough to get me up and > running, and Thibaut sent me a link to some WinForms/IronRuby examples > too. I'll let you know if I have any more issues getting started. > > Cheers, > > ast > > --- > > Met vriendelijke groeten - Best regards - Salutations > > Ivan Porto Carrero > > Blog: http://flanders.co.nz > > Google Wave: portocarrero.ivan at googlewave.com > > Twitter: http://twitter.com/casualjim > > Author of IronRuby in Action (http://manning.com/carrero) > > > > > > > > On Wed, Nov 25, 2009 at 10:27 PM, Andrew S. Townley > > wrote: > > Hi Folks, > > > > Since I hear such good things about the rate at which features > > are being > > added to the project (and since it coincides with needing to > > write some > > cross-platform UI code), I thought I'd give the new version a > > go. > > > > Here's my environment: > > $ mono --version > > Mono JIT compiler version 2.4.2.3 (tarball Mon Nov 23 08:34:29 > > GMT 2009) > > Copyright (C) 2002-2008 Novell, Inc and Contributors. > > www.mono-project.com > > TLS: __thread > > GC: Included Boehm (with typed GC) > > SIGSEGV: altstack > > Notifications: epoll > > Architecture: amd64 > > Disabled: none > > > > $ mono bin/ir.exe --version > > IronRuby 0.9.2.0 on .NET 2.0.0.0 > > > > $ uname -a > > Linux linna 2.6.24-25-generic #1 SMP Tue Oct 20 06:49:12 UTC > > 2009 x86_64 > > GNU/Linux > > > > I'm having all kinds of trouble getting the examples to even > > run. When > > I try any of them, I get complaints about not being able to > > load > > libraries, e.g. the DiskUse demo: > > > > $ mono ../../bin/ir.exe app.rb > > :0:in `require': no such file to load -- WindowsBase > > (LoadError) > > from app.rb:16 > > > > ...not to mention having all sorts of issues getting the > > command-line > > tools to run in Linux due to environment issues that I don't > > really > > understand (and I've been a Linux user since 1993 and a UNIX > > user since > > 1990). It sure seems like there's some environment magic > > that's needed, > > but I can't figure out what it really is. Nothing that I've > > tried that > > seemed like it should work did the trick. > > > > Q: is there an up-to-date guide for getting IronRuby working > > with Mono > > 2.4 anywhere? Everything I could find with google seemed at > > least 2 yrs > > old. There aren't any obvious links from either the ironruby > > website or > > from the mono site. > > > > Clearly based on Jimmy's OSCON 2009 post: > > > http://blog.jimmy.schementi.com/2009/07/ironruby-at-oscon-2009-mono-moonlight.html, > it should all be working swimmingly. > > > > Apologies if this is a really dumb question. > > > > For what I need to do at the moment, I need to quickly > > prototype some > > small applications that need to work on Windows, Linux and > > OSX. From > > what I've seen, .NET & Mono seem to be the only real choice > > for this at > > the moment, but I'd prefer to not have to write C# code when > > I'm doing > > the prototypes (plus I've lots of ruby library code that I've > > already > > written for other purposes). > > > > What's the quickest way to get everything up and running (with > > some > > examples of actually running stuff from the command line on > > Linux)? > > > > Thanks in advance for your assistance. I'm looking forward to > > seeing > > what I can do with IronRuby since I looked at it a few months > > ago. :) > > > > Cheers, > > > > ast > > -- > > Andrew S. Townley > > http://atownley.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 > -- > Andrew S. Townley > http://atownley.org > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ast at atownley.org Thu Nov 26 05:55:28 2009 From: ast at atownley.org (Andrew S. Townley) Date: Thu, 26 Nov 2009 10:55:28 +0000 Subject: [Ironruby-core] Back with more questions: mono 2.4.x & IR 0.9.x In-Reply-To: References: <1259184465.9791.24.camel@linna> <1259224048.9791.46.camel@linna> Message-ID: <1259232928.7683.2.camel@linna> On Thu, 2009-11-26 at 09:58 +0100, Ivan Porto Carrero wrote: > You can also look in my github account the samples for my book are > published there. Thanks Ivan, I will. > I don't have Webforms or Winforms samples there (except for the one > provided by thibaut for his Magic DSL), because I declared those techs > dead a few years ago. I know what you mean, but sometimes when a technology's declared "dead" is when it becomes ubiquitous enough to be useful! :) > A GUI toolkit I want to give a try sometime in the future is clutter > http://www.clutter-project.org/docs/clutter/stable/. > It's a .NET based OSS OpenGL GUI toolkit. But all those toolkits IMHO > are really stop gaps until SL is mature enough and Moonlight gets to > SL4. (SL3 => no rich-text editor which is used often in LOB apps, OOB > mode is still sandboxed) Yeah, that would be a problem for me. This is essentially LOB-ish. Cheers, ast > --- > Met vriendelijke groeten - Best regards - Salutations > Ivan Porto Carrero > Blog: http://flanders.co.nz > Google Wave: portocarrero.ivan at googlewave.com > Twitter: http://twitter.com/casualjim > Author of IronRuby in Action (http://manning.com/carrero) > > > > On Thu, Nov 26, 2009 at 9:27 AM, Andrew S. Townley > wrote: > Hi Ivan, > > On Thu, 2009-11-26 at 09:04 +0100, Ivan Porto Carrero wrote: > > http://dlrci.colliertech.org/ironruby/ > > > > > > Those builds are done on a mono machine > > > Thanks for the pointer to the other builds. I'll give that a > go later > today. I did notice the thing about the console (with the > colors), but > from google, it seems that's a Mono issue and not an IronRuby > issue. > > > The console is a bit wonky at this point on mono. I don't > know if it's > > a mono thing or an IronRuby thing but you can't use arrow > keys in the > > console or tab etc. It takes the characters just doesn't > interpret > > them. > > > I occasionally use irb for quick tests, but most of the time, > I just > write simple little scripts and run them with the main ruby > interpreter. > > > > > To make something run on linux download one of the packages > and > > extract in a folder, then add the bin path in that folder to > your PATH > > env variable. > > > > > > The thing is the demo you tried are WPF demo's and they > don't work on > > mono because mono doesn't implement that technology. > > > It's been a while since I did any C# development (pre-WPF), > and that was > mostly command-line and library stuff. I did do a few > WinForms things, > but not a lot. > > Sorry for the confusion. > > > If you're going cross-platform and you want a similar > experience on > > all platforms you're probably looking at using Qt, GTK# or > Winforms at > > this as GUI toolkit. > > In about 8-10 months I guess silverlight 3 is a good option, > and when > > moonlight catches up to silverlight 4 then Silverlight is > the only > > choice that makes sense (money and time wise) I guess for > building > > cross-platform apps and providing the same experience on all > of them. > > > WinForms was my plan for the moment. Going the silverlight > route is too > many layers of alpha for what I'm trying to do (my own stuff, > IronRuby > and the UI toolkit would just be too much! :) > > > IronRuby is the Ruby language on the .NET framework so if > you're new > > to both it can hurt and the msdn docs don't yet show a ruby > language > > tickbox so it will be of great help if you at least know how > to read > > C# or VB. > > I hope this helps you to get started, if not keep sending > emails :) > > > Thanks for the help and the pointers. I would've done most of > my C# > with .NET 1.1, but I've been using ruby pretty actively for > about 5 > years, including fighting with trying to use MRI and GTK+ on > Linux for > the last couple of years and experiencing random crashes due > to the > incompatible threading models. > > Even if I have to use the WinForms package for the UI (which I > vaguely > remember from doing some MFC work back in 99-01), at least > there's a > common, underlying runtime for all the bits that should play > nicer > together than what I've been doing. > > Ruby 1.9 isn't an option for me because I have too many > dependencies > that don't seem to work without changes (based on a quick > re-try of that > last night). > > Again, thanks for all the help. That should be enough to get > me up and > running, and Thibaut sent me a link to some WinForms/IronRuby > examples > too. I'll let you know if I have any more issues getting > started. > > Cheers, > > ast > > > --- > > Met vriendelijke groeten - Best regards - Salutations > > Ivan Porto Carrero > > Blog: http://flanders.co.nz > > Google Wave: portocarrero.ivan at googlewave.com > > Twitter: http://twitter.com/casualjim > > Author of IronRuby in Action (http://manning.com/carrero) > > > > > > > > On Wed, Nov 25, 2009 at 10:27 PM, Andrew S. Townley > > > wrote: > > Hi Folks, > > > > Since I hear such good things about the rate at > which features > > are being > > added to the project (and since it coincides with > needing to > > write some > > cross-platform UI code), I thought I'd give the new > version a > > go. > > > > Here's my environment: > > $ mono --version > > Mono JIT compiler version 2.4.2.3 (tarball Mon Nov > 23 08:34:29 > > GMT 2009) > > Copyright (C) 2002-2008 Novell, Inc and > Contributors. > > www.mono-project.com > > TLS: __thread > > GC: Included Boehm (with typed GC) > > SIGSEGV: altstack > > Notifications: epoll > > Architecture: amd64 > > Disabled: none > > > > $ mono bin/ir.exe --version > > IronRuby 0.9.2.0 on .NET 2.0.0.0 > > > > $ uname -a > > Linux linna 2.6.24-25-generic #1 SMP Tue Oct 20 > 06:49:12 UTC > > 2009 x86_64 > > GNU/Linux > > > > I'm having all kinds of trouble getting the examples > to even > > run. When > > I try any of them, I get complaints about not being > able to > > load > > libraries, e.g. the DiskUse demo: > > > > $ mono ../../bin/ir.exe app.rb > > :0:in `require': no such file to load -- WindowsBase > > (LoadError) > > from app.rb:16 > > > > ...not to mention having all sorts of issues getting > the > > command-line > > tools to run in Linux due to environment issues that > I don't > > really > > understand (and I've been a Linux user since 1993 > and a UNIX > > user since > > 1990). It sure seems like there's some environment > magic > > that's needed, > > but I can't figure out what it really is. Nothing > that I've > > tried that > > seemed like it should work did the trick. > > > > Q: is there an up-to-date guide for getting > IronRuby working > > with Mono > > 2.4 anywhere? Everything I could find with google > seemed at > > least 2 yrs > > old. There aren't any obvious links from either the > ironruby > > website or > > from the mono site. > > > > Clearly based on Jimmy's OSCON 2009 post: > > > http://blog.jimmy.schementi.com/2009/07/ironruby-at-oscon-2009-mono-moonlight.html, it should all be working swimmingly. > > > > Apologies if this is a really dumb question. > > > > For what I need to do at the moment, I need to > quickly > > prototype some > > small applications that need to work on Windows, > Linux and > > OSX. From > > what I've seen, .NET & Mono seem to be the only real > choice > > for this at > > the moment, but I'd prefer to not have to write C# > code when > > I'm doing > > the prototypes (plus I've lots of ruby library code > that I've > > already > > written for other purposes). > > > > What's the quickest way to get everything up and > running (with > > some > > examples of actually running stuff from the command > line on > > Linux)? > > > > Thanks in advance for your assistance. I'm looking > forward to > > seeing > > what I can do with IronRuby since I looked at it a > few months > > ago. :) > > > > Cheers, > > > > ast > > -- > > Andrew S. Townley > > http://atownley.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 > > -- > > Andrew S. Townley > http://atownley.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 -- Andrew S. Townley http://atownley.org From ast at atownley.org Thu Nov 26 06:10:47 2009 From: ast at atownley.org (Andrew S. Townley) Date: Thu, 26 Nov 2009 11:10:47 +0000 Subject: [Ironruby-core] IronRuby + Mono + WinForms issue Message-ID: <1259233847.7683.14.camel@linna> I sent this to Thibaut, but I probably should've sent it to the whole list since it probably isn't directly related to his work (sorry Thibaut!). Thanks to Ivan's pointer to mono builds, I was able to get IronRuby to work as I would've expected. However, it doesn't seem able to find the WinForms stuff that I clearly have on my machine: $ locate System.Windows.Forms /usr/lib/mono/1.0/System.Windows.Forms.dll /usr/lib/mono/gac/System.Windows.Forms /usr/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089 /usr/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089/System.Windows.Forms.dll /usr/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089/System.Windows.Forms.dll.config /usr/local/ironruby/lib/ironruby/System.Windows.Forms.rb /usr/local/mono-2.4/lib/mono/1.0/System.Windows.Forms.dll /usr/local/mono-2.4/lib/mono/2.0/System.Windows.Forms.dll /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089 /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms/2.0.0.0__b77a5c561934e089 /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089/System.Windows.Forms.dll /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089/System.Windows.Forms.dll.mdb /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll.mdb $ which mono /usr/local/mono-2.4/bin/mono $ ir -v IronRuby 0.9.3.0 on .NET 2.0.0.0 $ cat /tmp/test.rb require 'System.Windows.Forms' $ ir /tmp/test.rb :0:in `require': no such file to load -- System.Windows.Forms (LoadError) from /tmp/test.rb:1 I've even tried explicitly including the .NET 2.0 libraries as part of the LD_LIBRARY_PATH, but that didn't work: $ echo $LD_LIBRARY_PATH /usr/local/mono-2.4/lib:/usr/local/mono-2.4/lib/mono/2.0 Obviously, there's still a piece of the puzzle that I'm missing. Any ideas? Thanks in advance, ast -- Andrew S. Townley http://atownley.org From ivan at flanders.co.nz Thu Nov 26 06:22:23 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Thu, 26 Nov 2009 12:22:23 +0100 Subject: [Ironruby-core] IronRuby + Mono + WinForms issue In-Reply-To: <1259233847.7683.14.camel@linna> References: <1259233847.7683.14.camel@linna> Message-ID: what's the output of your pkgconfig path? ivan at debian-stage:~ ? pkg-config --variable=libdir mono /usr/local/mono/lib/pkgconfig/../../lib ivan at debian-stage:~ ? echo $PKG_CONFIG_PATH /usr/local/mono/lib/pkgconfig I added these lines to my .bashrc file export PKG_CONFIG_PATH=/usr/local/mono/lib/pkgconfig:$PKG_CONFIG_PATH export PATH="~/bin:/usr/local/mono/bin:$PATH" You can find more stuff here: http://linux.die.net/man/1/mono Are you able to get a hello world app with C# going in winforms? --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Thu, Nov 26, 2009 at 12:10 PM, Andrew S. Townley wrote: > I sent this to Thibaut, but I probably should've sent it to the whole > list since it probably isn't directly related to his work (sorry > Thibaut!). > > Thanks to Ivan's pointer to mono builds, I was able to get IronRuby to > work as I would've expected. However, it doesn't seem able to find the > WinForms stuff that I clearly have on my machine: > > $ locate System.Windows.Forms > /usr/lib/mono/1.0/System.Windows.Forms.dll > /usr/lib/mono/gac/System.Windows.Forms > /usr/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089 > > /usr/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089/System.Windows.Forms.dll > > /usr/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089/System.Windows.Forms.dll.config > /usr/local/ironruby/lib/ironruby/System.Windows.Forms.rb > /usr/local/mono-2.4/lib/mono/1.0/System.Windows.Forms.dll > /usr/local/mono-2.4/lib/mono/2.0/System.Windows.Forms.dll > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms > > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089 > > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms/2.0.0.0__b77a5c561934e089 > > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089/System.Windows.Forms.dll > > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089/System.Windows.Forms.dll.mdb > > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll > > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll.mdb > > $ which mono > /usr/local/mono-2.4/bin/mono > > $ ir -v > IronRuby 0.9.3.0 on .NET 2.0.0.0 > > $ cat /tmp/test.rb > require 'System.Windows.Forms' > > $ ir /tmp/test.rb > :0:in `require': no such file to load -- System.Windows.Forms > (LoadError) > from /tmp/test.rb:1 > > I've even tried explicitly including the .NET 2.0 libraries as part of > the LD_LIBRARY_PATH, but that didn't work: > > $ echo $LD_LIBRARY_PATH > /usr/local/mono-2.4/lib:/usr/local/mono-2.4/lib/mono/2.0 > > Obviously, there's still a piece of the puzzle that I'm missing. Any > ideas? > > Thanks in advance, > > ast > -- > Andrew S. Townley > http://atownley.org > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ast at atownley.org Thu Nov 26 06:36:29 2009 From: ast at atownley.org (Andrew S. Townley) Date: Thu, 26 Nov 2009 11:36:29 +0000 Subject: [Ironruby-core] IronRuby + Mono + WinForms issue In-Reply-To: References: <1259233847.7683.14.camel@linna> Message-ID: <1259235389.7683.23.camel@linna> On Thu, 2009-11-26 at 12:22 +0100, Ivan Porto Carrero wrote: > what's the output of your pkgconfig path? > > > ivan at debian-stage:~ > ? pkg-config --variable=libdir mono > /usr/local/mono/lib/pkgconfig/../../lib $ pkg-config --variable=libdir mono /usr/local/mono-2.4/lib/pkgconfig/../../lib > ivan at debian-stage:~ > ? echo $PKG_CONFIG_PATH > /usr/local/mono/lib/pkgconfig $ echo $PKG_CONFIG_PATH /usr/local/mono-2.4/lib/pkgconfig > I added these lines to my .bashrc file > > export PKG_CONFIG_PATH=/usr/local/mono/lib/pkgconfig:$PKG_CONFIG_PATH > export PATH="~/bin:/usr/local/mono/bin:$PATH" Yeah, I have a specific mono-2.4 environment script that I source based on notes from here: http://www.centriment.com/2009/04/01/building-mono-24-from-source-on-ubuntu-810/ #!/bin/bash MONO_PREFIX=/usr/local/mono-2.4 export DYLD_LIBRARY_PATH=$MONO_PREFIX/lib:$DYLD_LIBRARY_PATH export LD_LIBRARY_PATH=$MONO_PREFIX/lib:$LD_LIBRARY_PATH #export C_INCLUDE_PATH=$MONO_PREFIX/include export ACLOCAL_PATH=$MONO_PREFIX/share/aclocal export PKG_CONFIG_PATH=$MONO_PREFIX/lib/pkgconfig PATH=$MONO_PREFIX/bin:$PATH > > You can find more stuff here: > http://linux.die.net/man/1/mono > > Are you able to get a hello world app with C# going in winforms? Yes. $ cat hello.cs using System; using System.Drawing; using System.Windows.Forms; public class HelloWorld : Form { static public void Main () { Application.Run (new HelloWorld ()); } public HelloWorld () { Button b = new Button (); b.Text = "Click Me!"; b.Click += new EventHandler (Button_Click); Controls.Add (b); } private void Button_Click (object sender, EventArgs e) { MessageBox.Show ("Button Clicked!"); } } $ gmcs -pkg:dotnet hello.cs $ which mono /usr/local/mono-2.4/bin/mono $ mono hello.exe $ > --- > Met vriendelijke groeten - Best regards - Salutations > Ivan Porto Carrero > Blog: http://flanders.co.nz > Google Wave: portocarrero.ivan at googlewave.com > Twitter: http://twitter.com/casualjim > Author of IronRuby in Action (http://manning.com/carrero) > > > > On Thu, Nov 26, 2009 at 12:10 PM, Andrew S. Townley > wrote: > I sent this to Thibaut, but I probably should've sent it to > the whole > list since it probably isn't directly related to his work > (sorry > Thibaut!). > > Thanks to Ivan's pointer to mono builds, I was able to get > IronRuby to > work as I would've expected. However, it doesn't seem able to > find the > WinForms stuff that I clearly have on my machine: > > $ locate System.Windows.Forms > /usr/lib/mono/1.0/System.Windows.Forms.dll > /usr/lib/mono/gac/System.Windows.Forms > /usr/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089 > /usr/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089/System.Windows.Forms.dll > /usr/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089/System.Windows.Forms.dll.config > /usr/local/ironruby/lib/ironruby/System.Windows.Forms.rb > /usr/local/mono-2.4/lib/mono/1.0/System.Windows.Forms.dll > /usr/local/mono-2.4/lib/mono/2.0/System.Windows.Forms.dll > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089 > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms/2.0.0.0__b77a5c561934e089 > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089/System.Windows.Forms.dll > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089/System.Windows.Forms.dll.mdb > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll.mdb > > $ which mono > /usr/local/mono-2.4/bin/mono > > $ ir -v > IronRuby 0.9.3.0 on .NET 2.0.0.0 > > $ cat /tmp/test.rb > require 'System.Windows.Forms' > > $ ir /tmp/test.rb > :0:in `require': no such file to load -- System.Windows.Forms > (LoadError) > from /tmp/test.rb:1 > > I've even tried explicitly including the .NET 2.0 libraries as > part of > the LD_LIBRARY_PATH, but that didn't work: > > $ echo $LD_LIBRARY_PATH > /usr/local/mono-2.4/lib:/usr/local/mono-2.4/lib/mono/2.0 > > Obviously, there's still a piece of the puzzle that I'm > missing. Any > ideas? > > Thanks in advance, > > ast > -- > Andrew S. Townley > http://atownley.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 -- Andrew S. Townley http://atownley.org From ast at atownley.org Thu Nov 26 06:46:14 2009 From: ast at atownley.org (Andrew S. Townley) Date: Thu, 26 Nov 2009 11:46:14 +0000 Subject: [Ironruby-core] IronRuby + Mono + WinForms issue In-Reply-To: <1259235389.7683.23.camel@linna> References: <1259233847.7683.14.camel@linna> <1259235389.7683.23.camel@linna> Message-ID: <1259235974.7683.28.camel@linna> As an interesting side-note (and maybe a crucial point), I remembered I had a sample I used the last time I looked at IronRuby back in April. This one actually runs fine with no errors. Do you really have to specify the whole assembly information with each require? $ cat formtest.rb require 'mscorlib' require 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' require 'System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' Application = System::Windows::Forms::Application Form = System::Windows::Forms::Form MessageBox = System::Windows::Forms::MessageBox Button = System::Windows::Forms::Button Point = System::Drawing::Point class MyForm < Form def initialize self.text = "My .NET Form from Ruby" @button = Button.new @button.location = Point.new 150, 150 @button.text = "Click Me!" my_click_handler = Proc.new {|sender, e| MessageBox.show 'Hello from Ruby!'} @button.click(&my_click_handler) self.controls.add @button end end my_form = MyForm.new Application.run my_form I'm a bit confused at this stage.... :( On Thu, 2009-11-26 at 11:36 +0000, Andrew S. Townley wrote: > On Thu, 2009-11-26 at 12:22 +0100, Ivan Porto Carrero wrote: > > what's the output of your pkgconfig path? > > > > > > ivan at debian-stage:~ > > ? pkg-config --variable=libdir mono > > /usr/local/mono/lib/pkgconfig/../../lib > > $ pkg-config --variable=libdir mono > /usr/local/mono-2.4/lib/pkgconfig/../../lib > > > ivan at debian-stage:~ > > ? echo $PKG_CONFIG_PATH > > /usr/local/mono/lib/pkgconfig > > $ echo $PKG_CONFIG_PATH > /usr/local/mono-2.4/lib/pkgconfig > > > I added these lines to my .bashrc file > > > > export PKG_CONFIG_PATH=/usr/local/mono/lib/pkgconfig:$PKG_CONFIG_PATH > > export PATH="~/bin:/usr/local/mono/bin:$PATH" > > Yeah, I have a specific mono-2.4 environment script that I source based > on notes from here: > http://www.centriment.com/2009/04/01/building-mono-24-from-source-on-ubuntu-810/ > > #!/bin/bash > MONO_PREFIX=/usr/local/mono-2.4 > export DYLD_LIBRARY_PATH=$MONO_PREFIX/lib:$DYLD_LIBRARY_PATH > export LD_LIBRARY_PATH=$MONO_PREFIX/lib:$LD_LIBRARY_PATH > #export C_INCLUDE_PATH=$MONO_PREFIX/include > export ACLOCAL_PATH=$MONO_PREFIX/share/aclocal > export PKG_CONFIG_PATH=$MONO_PREFIX/lib/pkgconfig > PATH=$MONO_PREFIX/bin:$PATH > > > > > You can find more stuff here: > > http://linux.die.net/man/1/mono > > > > > > Are you able to get a hello world app with C# going in winforms? > > Yes. > > $ cat hello.cs > using System; > using System.Drawing; > using System.Windows.Forms; > > public class HelloWorld : Form > { > static public void Main () > { > Application.Run (new HelloWorld ()); > } > > public HelloWorld () > { > Button b = new Button (); > b.Text = "Click Me!"; > b.Click += new EventHandler (Button_Click); > Controls.Add (b); > } > > private void Button_Click (object sender, EventArgs e) > { > MessageBox.Show ("Button Clicked!"); > } > } > $ gmcs -pkg:dotnet hello.cs > $ which mono > /usr/local/mono-2.4/bin/mono > $ mono hello.exe > $ > > > --- > > Met vriendelijke groeten - Best regards - Salutations > > Ivan Porto Carrero > > Blog: http://flanders.co.nz > > Google Wave: portocarrero.ivan at googlewave.com > > Twitter: http://twitter.com/casualjim > > Author of IronRuby in Action (http://manning.com/carrero) > > > > > > > > On Thu, Nov 26, 2009 at 12:10 PM, Andrew S. Townley > > wrote: > > I sent this to Thibaut, but I probably should've sent it to > > the whole > > list since it probably isn't directly related to his work > > (sorry > > Thibaut!). > > > > Thanks to Ivan's pointer to mono builds, I was able to get > > IronRuby to > > work as I would've expected. However, it doesn't seem able to > > find the > > WinForms stuff that I clearly have on my machine: > > > > $ locate System.Windows.Forms > > /usr/lib/mono/1.0/System.Windows.Forms.dll > > /usr/lib/mono/gac/System.Windows.Forms > > /usr/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089 > > /usr/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089/System.Windows.Forms.dll > > /usr/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089/System.Windows.Forms.dll.config > > /usr/local/ironruby/lib/ironruby/System.Windows.Forms.rb > > /usr/local/mono-2.4/lib/mono/1.0/System.Windows.Forms.dll > > /usr/local/mono-2.4/lib/mono/2.0/System.Windows.Forms.dll > > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms > > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089 > > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms/2.0.0.0__b77a5c561934e089 > > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089/System.Windows.Forms.dll > > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089/System.Windows.Forms.dll.mdb > > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll > > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll.mdb > > > > $ which mono > > /usr/local/mono-2.4/bin/mono > > > > $ ir -v > > IronRuby 0.9.3.0 on .NET 2.0.0.0 > > > > $ cat /tmp/test.rb > > require 'System.Windows.Forms' > > > > $ ir /tmp/test.rb > > :0:in `require': no such file to load -- System.Windows.Forms > > (LoadError) > > from /tmp/test.rb:1 > > > > I've even tried explicitly including the .NET 2.0 libraries as > > part of > > the LD_LIBRARY_PATH, but that didn't work: > > > > $ echo $LD_LIBRARY_PATH > > /usr/local/mono-2.4/lib:/usr/local/mono-2.4/lib/mono/2.0 > > > > Obviously, there's still a piece of the puzzle that I'm > > missing. Any > > ideas? > > > > Thanks in advance, > > > > ast > > -- > > Andrew S. Townley > > http://atownley.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 -- Andrew S. Townley http://atownley.org From ivan at flanders.co.nz Thu Nov 26 06:48:29 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Thu, 26 Nov 2009 12:48:29 +0100 Subject: [Ironruby-core] IronRuby + Mono + WinForms issue In-Reply-To: <1259235389.7683.23.camel@linna> References: <1259233847.7683.14.camel@linna> <1259235389.7683.23.camel@linna> Message-ID: k I used to set those env. variables but the only one you really need is the PKG_CONFIG_PATH one if that is the only mono version on your system and it's installed in a non standard location (outside /usr or /usr/local) On ubuntu there is a package on launchpad called monoxide which has the 2.4.2.3 release as a .deb package.. might be easier to get going. https://launchpad.net/~directhex/+archive/monoxide Here's the script I use to build mono from trunk on both ubuntu and debian. ivan at debian-stage:~/src/mono ? cat ./update_mono #!/usr/bin/env bash #svn co svn:// anonsvn.mono-project.com/source/trunk/{cecil,debugger,gtk-sharp,libgdiplus,mcs,mod_mono,mono,mono-addins,mono-basic,mono-tools,monodevelop,moon,olive,rocks,winforms,winforms-tools,xbuild,xsp,gnome-sharp,gnome-desktop-sharp,gluezilla,monodevelop-visualizers,monocov} svn up {cecil,debugger,gtk-sharp,libgdiplus,mcs,mod_mono,mono,mono-addins,mono-basic,mono-tools,monodevelop,moon,olive,rocks,winforms,winforms-tools,xbuild,xsp,gnome-sharp,gnome-desktop-sharp,gluezilla,monodevelop-visualizers,monocov} cd mono make distclean ./autogen.sh --prefix=/usr/local/mono --with-moonlight=yes --with-libgdiplus=sibling --with-profile4=yes make sudo make install cd .. #... build script for the extra libs like gtk-sharp, gnome-sharp etc. all the way to monodevelop --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Thu, Nov 26, 2009 at 12:36 PM, Andrew S. Townley wrote: > On Thu, 2009-11-26 at 12:22 +0100, Ivan Porto Carrero wrote: > > what's the output of your pkgconfig path? > > > > > > ivan at debian-stage:~ > > ? pkg-config --variable=libdir mono > > /usr/local/mono/lib/pkgconfig/../../lib > > $ pkg-config --variable=libdir mono > /usr/local/mono-2.4/lib/pkgconfig/../../lib > > > ivan at debian-stage:~ > > ? echo $PKG_CONFIG_PATH > > /usr/local/mono/lib/pkgconfig > > $ echo $PKG_CONFIG_PATH > /usr/local/mono-2.4/lib/pkgconfig > > > I added these lines to my .bashrc file > > > > export PKG_CONFIG_PATH=/usr/local/mono/lib/pkgconfig:$PKG_CONFIG_PATH > > export PATH="~/bin:/usr/local/mono/bin:$PATH" > > Yeah, I have a specific mono-2.4 environment script that I source based > on notes from here: > > http://www.centriment.com/2009/04/01/building-mono-24-from-source-on-ubuntu-810/ > > #!/bin/bash > MONO_PREFIX=/usr/local/mono-2.4 > export DYLD_LIBRARY_PATH=$MONO_PREFIX/lib:$DYLD_LIBRARY_PATH > export LD_LIBRARY_PATH=$MONO_PREFIX/lib:$LD_LIBRARY_PATH > #export C_INCLUDE_PATH=$MONO_PREFIX/include > export ACLOCAL_PATH=$MONO_PREFIX/share/aclocal > export PKG_CONFIG_PATH=$MONO_PREFIX/lib/pkgconfig > PATH=$MONO_PREFIX/bin:$PATH > > > > > You can find more stuff here: > > http://linux.die.net/man/1/mono > > > > > > Are you able to get a hello world app with C# going in winforms? > > Yes. > > $ cat hello.cs > using System; > using System.Drawing; > using System.Windows.Forms; > > public class HelloWorld : Form > { > static public void Main () > { > Application.Run (new HelloWorld ()); > } > > public HelloWorld () > { > Button b = new Button (); > b.Text = "Click Me!"; > b.Click += new EventHandler (Button_Click); > Controls.Add (b); > } > > private void Button_Click (object sender, EventArgs e) > { > MessageBox.Show ("Button Clicked!"); > } > } > $ gmcs -pkg:dotnet hello.cs > $ which mono > /usr/local/mono-2.4/bin/mono > $ mono hello.exe > $ > > > --- > > Met vriendelijke groeten - Best regards - Salutations > > Ivan Porto Carrero > > Blog: http://flanders.co.nz > > Google Wave: portocarrero.ivan at googlewave.com > > Twitter: http://twitter.com/casualjim > > Author of IronRuby in Action (http://manning.com/carrero) > > > > > > > > On Thu, Nov 26, 2009 at 12:10 PM, Andrew S. Townley > > wrote: > > I sent this to Thibaut, but I probably should've sent it to > > the whole > > list since it probably isn't directly related to his work > > (sorry > > Thibaut!). > > > > Thanks to Ivan's pointer to mono builds, I was able to get > > IronRuby to > > work as I would've expected. However, it doesn't seem able to > > find the > > WinForms stuff that I clearly have on my machine: > > > > $ locate System.Windows.Forms > > /usr/lib/mono/1.0/System.Windows.Forms.dll > > /usr/lib/mono/gac/System.Windows.Forms > > > /usr/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089 > > > /usr/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089/System.Windows.Forms.dll > > > /usr/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089/System.Windows.Forms.dll.config > > /usr/local/ironruby/lib/ironruby/System.Windows.Forms.rb > > /usr/local/mono-2.4/lib/mono/1.0/System.Windows.Forms.dll > > /usr/local/mono-2.4/lib/mono/2.0/System.Windows.Forms.dll > > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms > > > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089 > > > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms/2.0.0.0__b77a5c561934e089 > > > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089/System.Windows.Forms.dll > > > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089/System.Windows.Forms.dll.mdb > > > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll > > > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll.mdb > > > > $ which mono > > /usr/local/mono-2.4/bin/mono > > > > $ ir -v > > IronRuby 0.9.3.0 on .NET 2.0.0.0 > > > > $ cat /tmp/test.rb > > require 'System.Windows.Forms' > > > > $ ir /tmp/test.rb > > :0:in `require': no such file to load -- System.Windows.Forms > > (LoadError) > > from /tmp/test.rb:1 > > > > I've even tried explicitly including the .NET 2.0 libraries as > > part of > > the LD_LIBRARY_PATH, but that didn't work: > > > > $ echo $LD_LIBRARY_PATH > > /usr/local/mono-2.4/lib:/usr/local/mono-2.4/lib/mono/2.0 > > > > Obviously, there's still a piece of the puzzle that I'm > > missing. Any > > ideas? > > > > Thanks in advance, > > > > ast > > -- > > Andrew S. Townley > > http://atownley.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 > -- > Andrew S. Townley > http://atownley.org > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Thu Nov 26 07:32:55 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Thu, 26 Nov 2009 13:32:55 +0100 Subject: [Ironruby-core] IronRuby + Mono + WinForms issue In-Reply-To: <1259235974.7683.28.camel@linna> References: <1259233847.7683.14.camel@linna> <1259235389.7683.23.camel@linna> <1259235974.7683.28.camel@linna> Message-ID: Only on debian apparently and only with version 0.9.3, because it works on my mac. When I try it with 0.9.0 - 0.9.2 it works :S Casing has changed for the lib/ironruby folder apparently it's now lib/IronRuby in the config file. That is fixed already in git on my branch but not in the build yet. To fix it go into /bin/ir.exe.config and change wrote: > As an interesting side-note (and maybe a crucial point), I remembered I > had a sample I used the last time I looked at IronRuby back in April. > This one actually runs fine with no errors. > > Do you really have to specify the whole assembly information with each > require? > > $ cat formtest.rb > require 'mscorlib' > require 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, > PublicKeyToken=b77a5c561934e089' > require 'System.Drawing, Version=2.0.0.0, Culture=neutral, > PublicKeyToken=b03f5f7f11d50a3a' > > Application = System::Windows::Forms::Application > Form = System::Windows::Forms::Form > MessageBox = System::Windows::Forms::MessageBox > Button = System::Windows::Forms::Button > Point = System::Drawing::Point > > class MyForm < Form > > def initialize > self.text = "My .NET Form from Ruby" > > @button = Button.new > @button.location = Point.new 150, 150 > @button.text = "Click Me!" > > my_click_handler = Proc.new {|sender, e| MessageBox.show 'Hello from > Ruby!'} > @button.click(&my_click_handler) > > self.controls.add @button > end > end > > my_form = MyForm.new > Application.run my_form > > I'm a bit confused at this stage.... :( > > On Thu, 2009-11-26 at 11:36 +0000, Andrew S. Townley wrote: > > On Thu, 2009-11-26 at 12:22 +0100, Ivan Porto Carrero wrote: > > > what's the output of your pkgconfig path? > > > > > > > > > ivan at debian-stage:~ > > > ? pkg-config --variable=libdir mono > > > /usr/local/mono/lib/pkgconfig/../../lib > > > > $ pkg-config --variable=libdir mono > > /usr/local/mono-2.4/lib/pkgconfig/../../lib > > > > > ivan at debian-stage:~ > > > ? echo $PKG_CONFIG_PATH > > > /usr/local/mono/lib/pkgconfig > > > > $ echo $PKG_CONFIG_PATH > > /usr/local/mono-2.4/lib/pkgconfig > > > > > I added these lines to my .bashrc file > > > > > > export PKG_CONFIG_PATH=/usr/local/mono/lib/pkgconfig:$PKG_CONFIG_PATH > > > export PATH="~/bin:/usr/local/mono/bin:$PATH" > > > > Yeah, I have a specific mono-2.4 environment script that I source based > > on notes from here: > > > http://www.centriment.com/2009/04/01/building-mono-24-from-source-on-ubuntu-810/ > > > > #!/bin/bash > > MONO_PREFIX=/usr/local/mono-2.4 > > export DYLD_LIBRARY_PATH=$MONO_PREFIX/lib:$DYLD_LIBRARY_PATH > > export LD_LIBRARY_PATH=$MONO_PREFIX/lib:$LD_LIBRARY_PATH > > #export C_INCLUDE_PATH=$MONO_PREFIX/include > > export ACLOCAL_PATH=$MONO_PREFIX/share/aclocal > > export PKG_CONFIG_PATH=$MONO_PREFIX/lib/pkgconfig > > PATH=$MONO_PREFIX/bin:$PATH > > > > > > > > You can find more stuff here: > > > http://linux.die.net/man/1/mono > > > > > > > > > > Are you able to get a hello world app with C# going in winforms? > > > > Yes. > > > > $ cat hello.cs > > using System; > > using System.Drawing; > > using System.Windows.Forms; > > > > public class HelloWorld : Form > > { > > static public void Main () > > { > > Application.Run (new HelloWorld ()); > > } > > > > public HelloWorld () > > { > > Button b = new Button (); > > b.Text = "Click Me!"; > > b.Click += new EventHandler (Button_Click); > > Controls.Add (b); > > } > > > > private void Button_Click (object sender, EventArgs e) > > { > > MessageBox.Show ("Button Clicked!"); > > } > > } > > $ gmcs -pkg:dotnet hello.cs > > $ which mono > > /usr/local/mono-2.4/bin/mono > > $ mono hello.exe > > $ > > > > > --- > > > Met vriendelijke groeten - Best regards - Salutations > > > Ivan Porto Carrero > > > Blog: http://flanders.co.nz > > > Google Wave: portocarrero.ivan at googlewave.com > > > Twitter: http://twitter.com/casualjim > > > Author of IronRuby in Action (http://manning.com/carrero) > > > > > > > > > > > > On Thu, Nov 26, 2009 at 12:10 PM, Andrew S. Townley > > > wrote: > > > I sent this to Thibaut, but I probably should've sent it to > > > the whole > > > list since it probably isn't directly related to his work > > > (sorry > > > Thibaut!). > > > > > > Thanks to Ivan's pointer to mono builds, I was able to get > > > IronRuby to > > > work as I would've expected. However, it doesn't seem able to > > > find the > > > WinForms stuff that I clearly have on my machine: > > > > > > $ locate System.Windows.Forms > > > /usr/lib/mono/1.0/System.Windows.Forms.dll > > > /usr/lib/mono/gac/System.Windows.Forms > > > > /usr/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089 > > > > /usr/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089/System.Windows.Forms.dll > > > > /usr/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089/System.Windows.Forms.dll.config > > > /usr/local/ironruby/lib/ironruby/System.Windows.Forms.rb > > > /usr/local/mono-2.4/lib/mono/1.0/System.Windows.Forms.dll > > > /usr/local/mono-2.4/lib/mono/2.0/System.Windows.Forms.dll > > > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms > > > > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089 > > > > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms/2.0.0.0__b77a5c561934e089 > > > > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089/System.Windows.Forms.dll > > > > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089/System.Windows.Forms.dll.mdb > > > > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll > > > > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll.mdb > > > > > > $ which mono > > > /usr/local/mono-2.4/bin/mono > > > > > > $ ir -v > > > IronRuby 0.9.3.0 on .NET 2.0.0.0 > > > > > > $ cat /tmp/test.rb > > > require 'System.Windows.Forms' > > > > > > $ ir /tmp/test.rb > > > :0:in `require': no such file to load -- System.Windows.Forms > > > (LoadError) > > > from /tmp/test.rb:1 > > > > > > I've even tried explicitly including the .NET 2.0 libraries as > > > part of > > > the LD_LIBRARY_PATH, but that didn't work: > > > > > > $ echo $LD_LIBRARY_PATH > > > /usr/local/mono-2.4/lib:/usr/local/mono-2.4/lib/mono/2.0 > > > > > > Obviously, there's still a piece of the puzzle that I'm > > > missing. Any > > > ideas? > > > > > > Thanks in advance, > > > > > > ast > > > -- > > > Andrew S. Townley > > > http://atownley.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 > -- > Andrew S. Townley > http://atownley.org > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Thu Nov 26 07:45:05 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Thu, 26 Nov 2009 13:45:05 +0100 Subject: [Ironruby-core] IronRuby + Mono + WinForms issue In-Reply-To: <1259235974.7683.28.camel@linna> References: <1259233847.7683.14.camel@linna> <1259235389.7683.23.camel@linna> <1259235974.7683.28.camel@linna> Message-ID: and as to why you're seeing that there is because require 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' is the only line of content in the file lib/ironruby/System.Windows.Forms.rb because paths are case sensitive it was looking in lib/IronRuby for the file System.Windows.Forms.rb but couldn't find it and told you about it. The ir.exe.config file holds the initial search paths for IronRuby. I came across this issue when I tried to use gems it took a while before I got to 1 + 1 = 2 --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Thu, Nov 26, 2009 at 12:46 PM, Andrew S. Townley wrote: > As an interesting side-note (and maybe a crucial point), I remembered I > had a sample I used the last time I looked at IronRuby back in April. > This one actually runs fine with no errors. > > Do you really have to specify the whole assembly information with each > require? > > $ cat formtest.rb > require 'mscorlib' > require 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, > PublicKeyToken=b77a5c561934e089' > require 'System.Drawing, Version=2.0.0.0, Culture=neutral, > PublicKeyToken=b03f5f7f11d50a3a' > > Application = System::Windows::Forms::Application > Form = System::Windows::Forms::Form > MessageBox = System::Windows::Forms::MessageBox > Button = System::Windows::Forms::Button > Point = System::Drawing::Point > > class MyForm < Form > > def initialize > self.text = "My .NET Form from Ruby" > > @button = Button.new > @button.location = Point.new 150, 150 > @button.text = "Click Me!" > > my_click_handler = Proc.new {|sender, e| MessageBox.show 'Hello from > Ruby!'} > @button.click(&my_click_handler) > > self.controls.add @button > end > end > > my_form = MyForm.new > Application.run my_form > > I'm a bit confused at this stage.... :( > > On Thu, 2009-11-26 at 11:36 +0000, Andrew S. Townley wrote: > > On Thu, 2009-11-26 at 12:22 +0100, Ivan Porto Carrero wrote: > > > what's the output of your pkgconfig path? > > > > > > > > > ivan at debian-stage:~ > > > ? pkg-config --variable=libdir mono > > > /usr/local/mono/lib/pkgconfig/../../lib > > > > $ pkg-config --variable=libdir mono > > /usr/local/mono-2.4/lib/pkgconfig/../../lib > > > > > ivan at debian-stage:~ > > > ? echo $PKG_CONFIG_PATH > > > /usr/local/mono/lib/pkgconfig > > > > $ echo $PKG_CONFIG_PATH > > /usr/local/mono-2.4/lib/pkgconfig > > > > > I added these lines to my .bashrc file > > > > > > export PKG_CONFIG_PATH=/usr/local/mono/lib/pkgconfig:$PKG_CONFIG_PATH > > > export PATH="~/bin:/usr/local/mono/bin:$PATH" > > > > Yeah, I have a specific mono-2.4 environment script that I source based > > on notes from here: > > > http://www.centriment.com/2009/04/01/building-mono-24-from-source-on-ubuntu-810/ > > > > #!/bin/bash > > MONO_PREFIX=/usr/local/mono-2.4 > > export DYLD_LIBRARY_PATH=$MONO_PREFIX/lib:$DYLD_LIBRARY_PATH > > export LD_LIBRARY_PATH=$MONO_PREFIX/lib:$LD_LIBRARY_PATH > > #export C_INCLUDE_PATH=$MONO_PREFIX/include > > export ACLOCAL_PATH=$MONO_PREFIX/share/aclocal > > export PKG_CONFIG_PATH=$MONO_PREFIX/lib/pkgconfig > > PATH=$MONO_PREFIX/bin:$PATH > > > > > > > > You can find more stuff here: > > > http://linux.die.net/man/1/mono > > > > > > > > > > Are you able to get a hello world app with C# going in winforms? > > > > Yes. > > > > $ cat hello.cs > > using System; > > using System.Drawing; > > using System.Windows.Forms; > > > > public class HelloWorld : Form > > { > > static public void Main () > > { > > Application.Run (new HelloWorld ()); > > } > > > > public HelloWorld () > > { > > Button b = new Button (); > > b.Text = "Click Me!"; > > b.Click += new EventHandler (Button_Click); > > Controls.Add (b); > > } > > > > private void Button_Click (object sender, EventArgs e) > > { > > MessageBox.Show ("Button Clicked!"); > > } > > } > > $ gmcs -pkg:dotnet hello.cs > > $ which mono > > /usr/local/mono-2.4/bin/mono > > $ mono hello.exe > > $ > > > > > --- > > > Met vriendelijke groeten - Best regards - Salutations > > > Ivan Porto Carrero > > > Blog: http://flanders.co.nz > > > Google Wave: portocarrero.ivan at googlewave.com > > > Twitter: http://twitter.com/casualjim > > > Author of IronRuby in Action (http://manning.com/carrero) > > > > > > > > > > > > On Thu, Nov 26, 2009 at 12:10 PM, Andrew S. Townley > > > wrote: > > > I sent this to Thibaut, but I probably should've sent it to > > > the whole > > > list since it probably isn't directly related to his work > > > (sorry > > > Thibaut!). > > > > > > Thanks to Ivan's pointer to mono builds, I was able to get > > > IronRuby to > > > work as I would've expected. However, it doesn't seem able to > > > find the > > > WinForms stuff that I clearly have on my machine: > > > > > > $ locate System.Windows.Forms > > > /usr/lib/mono/1.0/System.Windows.Forms.dll > > > /usr/lib/mono/gac/System.Windows.Forms > > > > /usr/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089 > > > > /usr/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089/System.Windows.Forms.dll > > > > /usr/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089/System.Windows.Forms.dll.config > > > /usr/local/ironruby/lib/ironruby/System.Windows.Forms.rb > > > /usr/local/mono-2.4/lib/mono/1.0/System.Windows.Forms.dll > > > /usr/local/mono-2.4/lib/mono/2.0/System.Windows.Forms.dll > > > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms > > > > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089 > > > > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms/2.0.0.0__b77a5c561934e089 > > > > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089/System.Windows.Forms.dll > > > > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089/System.Windows.Forms.dll.mdb > > > > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll > > > > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll.mdb > > > > > > $ which mono > > > /usr/local/mono-2.4/bin/mono > > > > > > $ ir -v > > > IronRuby 0.9.3.0 on .NET 2.0.0.0 > > > > > > $ cat /tmp/test.rb > > > require 'System.Windows.Forms' > > > > > > $ ir /tmp/test.rb > > > :0:in `require': no such file to load -- System.Windows.Forms > > > (LoadError) > > > from /tmp/test.rb:1 > > > > > > I've even tried explicitly including the .NET 2.0 libraries as > > > part of > > > the LD_LIBRARY_PATH, but that didn't work: > > > > > > $ echo $LD_LIBRARY_PATH > > > /usr/local/mono-2.4/lib:/usr/local/mono-2.4/lib/mono/2.0 > > > > > > Obviously, there's still a piece of the puzzle that I'm > > > missing. Any > > > ideas? > > > > > > Thanks in advance, > > > > > > ast > > > -- > > > Andrew S. Townley > > > http://atownley.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 > -- > Andrew S. Townley > http://atownley.org > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ast at atownley.org Thu Nov 26 08:49:49 2009 From: ast at atownley.org (Andrew S. Townley) Date: Thu, 26 Nov 2009 13:49:49 +0000 Subject: [Ironruby-core] IronRuby + Mono + WinForms issue In-Reply-To: References: <1259233847.7683.14.camel@linna> <1259235389.7683.23.camel@linna> <1259235974.7683.28.camel@linna> Message-ID: <1259243389.7683.45.camel@linna> Wow. Yeah, I can see why that too awhile! :) Thanks for the explanation. I understand the issue here, and I see the difference between the two versions. Thanks also for the build script. That will help a lot going forward. I'm just about to set up (build) Mono 2.4 on another Ubuntu 8.04 machine, so that looks the business! Is the whole script available somewhere? I know I could probably just finish it myself fairly quickly, but if you've already got one that works, that'd be very cool. ;) I don't really use any other of the default Ubuntu mono apps, but I didn't want to deal with dependency-hell with apt to try and remove only what I didn't actually need. I figured it'd just be safer to build from source, use the source script to toggle the environment and leave well enough alone. I do the same thing to cycle between several versions of the JDK when I'm doing that sort of thing too, so it isn't a new trick. What I ought to do is summarize all of this nicely into a blog post, but I've issues with my blog at the moment. At least I have the emails, and I'll likely be going through this again after a while to set up another machine. By then, I should have my blog sorted! :) Thanks so much for all your help! ast On Thu, 2009-11-26 at 13:45 +0100, Ivan Porto Carrero wrote: > and as to why you're seeing that there is because > > > require 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, > PublicKeyToken=b77a5c561934e089' > > > is the only line of content in the file > > > lib/ironruby/System.Windows.Forms.rb > > > because paths are case sensitive it was looking in lib/IronRuby for > the file System.Windows.Forms.rb but couldn't find it and told you > about it. > The ir.exe.config file holds the initial search paths for IronRuby. > > > I came across this issue when I tried to use gems it took a while > before I got to 1 + 1 = 2 > --- > Met vriendelijke groeten - Best regards - Salutations > Ivan Porto Carrero > Blog: http://flanders.co.nz > Google Wave: portocarrero.ivan at googlewave.com > Twitter: http://twitter.com/casualjim > Author of IronRuby in Action (http://manning.com/carrero) > > > > On Thu, Nov 26, 2009 at 12:46 PM, Andrew S. Townley > wrote: > As an interesting side-note (and maybe a crucial point), I > remembered I > had a sample I used the last time I looked at IronRuby back in > April. > This one actually runs fine with no errors. > > Do you really have to specify the whole assembly information > with each > require? > > $ cat formtest.rb > require 'mscorlib' > require 'System.Windows.Forms, Version=2.0.0.0, > Culture=neutral, > PublicKeyToken=b77a5c561934e089' > require 'System.Drawing, Version=2.0.0.0, Culture=neutral, > PublicKeyToken=b03f5f7f11d50a3a' > > Application = System::Windows::Forms::Application > Form = System::Windows::Forms::Form > MessageBox = System::Windows::Forms::MessageBox > Button = System::Windows::Forms::Button > Point = System::Drawing::Point > > class MyForm < Form > > def initialize > self.text = "My .NET Form from Ruby" > > @button = Button.new > @button.location = Point.new 150, 150 > @button.text = "Click Me!" > > my_click_handler = Proc.new {|sender, e| MessageBox.show > 'Hello from > Ruby!'} > @button.click(&my_click_handler) > > self.controls.add @button > end > end > > my_form = MyForm.new > Application.run my_form > > I'm a bit confused at this stage.... :( > > > On Thu, 2009-11-26 at 11:36 +0000, Andrew S. Townley wrote: > > On Thu, 2009-11-26 at 12:22 +0100, Ivan Porto Carrero wrote: > > > what's the output of your pkgconfig path? > > > > > > > > > ivan at debian-stage:~ > > > ? pkg-config --variable=libdir mono > > > /usr/local/mono/lib/pkgconfig/../../lib > > > > $ pkg-config --variable=libdir mono > > /usr/local/mono-2.4/lib/pkgconfig/../../lib > > > > > ivan at debian-stage:~ > > > ? echo $PKG_CONFIG_PATH > > > /usr/local/mono/lib/pkgconfig > > > > $ echo $PKG_CONFIG_PATH > > /usr/local/mono-2.4/lib/pkgconfig > > > > > I added these lines to my .bashrc file > > > > > > export PKG_CONFIG_PATH=/usr/local/mono/lib/pkgconfig: > $PKG_CONFIG_PATH > > > export PATH="~/bin:/usr/local/mono/bin:$PATH" > > > > Yeah, I have a specific mono-2.4 environment script that I > source based > > on notes from here: > > > http://www.centriment.com/2009/04/01/building-mono-24-from-source-on-ubuntu-810/ > > > > #!/bin/bash > > MONO_PREFIX=/usr/local/mono-2.4 > > export DYLD_LIBRARY_PATH=$MONO_PREFIX/lib:$DYLD_LIBRARY_PATH > > export LD_LIBRARY_PATH=$MONO_PREFIX/lib:$LD_LIBRARY_PATH > > #export C_INCLUDE_PATH=$MONO_PREFIX/include > > export ACLOCAL_PATH=$MONO_PREFIX/share/aclocal > > export PKG_CONFIG_PATH=$MONO_PREFIX/lib/pkgconfig > > PATH=$MONO_PREFIX/bin:$PATH > > > > > > > > You can find more stuff here: > > > http://linux.die.net/man/1/mono > > > > > > > > > > Are you able to get a hello world app with C# going in > winforms? > > > > Yes. > > > > $ cat hello.cs > > using System; > > using System.Drawing; > > using System.Windows.Forms; > > > > public class HelloWorld : Form > > { > > static public void Main () > > { > > Application.Run (new HelloWorld ()); > > } > > > > public HelloWorld () > > { > > Button b = new Button (); > > b.Text = "Click Me!"; > > b.Click += new EventHandler (Button_Click); > > Controls.Add (b); > > } > > > > private void Button_Click (object sender, EventArgs e) > > { > > MessageBox.Show ("Button Clicked!"); > > } > > } > > $ gmcs -pkg:dotnet hello.cs > > $ which mono > > /usr/local/mono-2.4/bin/mono > > $ mono hello.exe > > $ > > > > > --- > > > Met vriendelijke groeten - Best regards - Salutations > > > Ivan Porto Carrero > > > Blog: http://flanders.co.nz > > > Google Wave: portocarrero.ivan at googlewave.com > > > Twitter: http://twitter.com/casualjim > > > Author of IronRuby in Action (http://manning.com/carrero) > > > > > > > > > > > > On Thu, Nov 26, 2009 at 12:10 PM, Andrew S. Townley > > > > wrote: > > > I sent this to Thibaut, but I probably should've > sent it to > > > the whole > > > list since it probably isn't directly related to > his work > > > (sorry > > > Thibaut!). > > > > > > Thanks to Ivan's pointer to mono builds, I was > able to get > > > IronRuby to > > > work as I would've expected. However, it doesn't > seem able to > > > find the > > > WinForms stuff that I clearly have on my machine: > > > > > > $ locate System.Windows.Forms > > > /usr/lib/mono/1.0/System.Windows.Forms.dll > > > /usr/lib/mono/gac/System.Windows.Forms > > > > /usr/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089 > > > > /usr/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089/System.Windows.Forms.dll > > > > /usr/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089/System.Windows.Forms.dll.config > > > > /usr/local/ironruby/lib/ironruby/System.Windows.Forms.rb > > > > /usr/local/mono-2.4/lib/mono/1.0/System.Windows.Forms.dll > > > > /usr/local/mono-2.4/lib/mono/2.0/System.Windows.Forms.dll > > > > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms > > > > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089 > > > > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms/2.0.0.0__b77a5c561934e089 > > > > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089/System.Windows.Forms.dll > > > > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089/System.Windows.Forms.dll.mdb > > > > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll > > > > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll.mdb > > > > > > $ which mono > > > /usr/local/mono-2.4/bin/mono > > > > > > $ ir -v > > > IronRuby 0.9.3.0 on .NET 2.0.0.0 > > > > > > $ cat /tmp/test.rb > > > require 'System.Windows.Forms' > > > > > > $ ir /tmp/test.rb > > > :0:in `require': no such file to load -- > System.Windows.Forms > > > (LoadError) > > > from /tmp/test.rb:1 > > > > > > I've even tried explicitly including the .NET 2.0 > libraries as > > > part of > > > the LD_LIBRARY_PATH, but that didn't work: > > > > > > $ echo $LD_LIBRARY_PATH > > > > /usr/local/mono-2.4/lib:/usr/local/mono-2.4/lib/mono/2.0 > > > > > > Obviously, there's still a piece of the puzzle > that I'm > > > missing. Any > > > ideas? > > > > > > Thanks in advance, > > > > > > ast > > > -- > > > Andrew S. Townley > > > http://atownley.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 > -- > Andrew S. Townley > http://atownley.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 -- Andrew S. Townley http://atownley.org From ivan at flanders.co.nz Thu Nov 26 08:56:40 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Thu, 26 Nov 2009 14:56:40 +0100 Subject: [Ironruby-core] IronRuby + Mono + WinForms issue In-Reply-To: <1259243389.7683.45.camel@linna> References: <1259233847.7683.14.camel@linna> <1259235389.7683.23.camel@linna> <1259235974.7683.28.camel@linna> <1259243389.7683.45.camel@linna> Message-ID: http://ebsteblog.wordpress.com/2009/01/15/building-monodevelop-from-svn/ no worries. have fun with it! --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Thu, Nov 26, 2009 at 2:49 PM, Andrew S. Townley wrote: > Wow. Yeah, I can see why that too awhile! :) > > Thanks for the explanation. I understand the issue here, and I see the > difference between the two versions. > > Thanks also for the build script. That will help a lot going forward. > I'm just about to set up (build) Mono 2.4 on another Ubuntu 8.04 > machine, so that looks the business! Is the whole script available > somewhere? I know I could probably just finish it myself fairly > quickly, but if you've already got one that works, that'd be very > cool. ;) > > I don't really use any other of the default Ubuntu mono apps, but I > didn't want to deal with dependency-hell with apt to try and remove only > what I didn't actually need. I figured it'd just be safer to build from > source, use the source script to toggle the environment and leave well > enough alone. I do the same thing to cycle between several versions of > the JDK when I'm doing that sort of thing too, so it isn't a new trick. > > What I ought to do is summarize all of this nicely into a blog post, but > I've issues with my blog at the moment. At least I have the emails, and > I'll likely be going through this again after a while to set up another > machine. By then, I should have my blog sorted! :) > > Thanks so much for all your help! > > ast > > On Thu, 2009-11-26 at 13:45 +0100, Ivan Porto Carrero wrote: > > and as to why you're seeing that there is because > > > > > > require 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, > > PublicKeyToken=b77a5c561934e089' > > > > > > is the only line of content in the file > > > > > > lib/ironruby/System.Windows.Forms.rb > > > > > > because paths are case sensitive it was looking in lib/IronRuby for > > the file System.Windows.Forms.rb but couldn't find it and told you > > about it. > > The ir.exe.config file holds the initial search paths for IronRuby. > > > > > > I came across this issue when I tried to use gems it took a while > > before I got to 1 + 1 = 2 > > --- > > Met vriendelijke groeten - Best regards - Salutations > > Ivan Porto Carrero > > Blog: http://flanders.co.nz > > Google Wave: portocarrero.ivan at googlewave.com > > Twitter: http://twitter.com/casualjim > > Author of IronRuby in Action (http://manning.com/carrero) > > > > > > > > On Thu, Nov 26, 2009 at 12:46 PM, Andrew S. Townley > > wrote: > > As an interesting side-note (and maybe a crucial point), I > > remembered I > > had a sample I used the last time I looked at IronRuby back in > > April. > > This one actually runs fine with no errors. > > > > Do you really have to specify the whole assembly information > > with each > > require? > > > > $ cat formtest.rb > > require 'mscorlib' > > require 'System.Windows.Forms, Version=2.0.0.0, > > Culture=neutral, > > PublicKeyToken=b77a5c561934e089' > > require 'System.Drawing, Version=2.0.0.0, Culture=neutral, > > PublicKeyToken=b03f5f7f11d50a3a' > > > > Application = System::Windows::Forms::Application > > Form = System::Windows::Forms::Form > > MessageBox = System::Windows::Forms::MessageBox > > Button = System::Windows::Forms::Button > > Point = System::Drawing::Point > > > > class MyForm < Form > > > > def initialize > > self.text = "My .NET Form from Ruby" > > > > @button = Button.new > > @button.location = Point.new 150, 150 > > @button.text = "Click Me!" > > > > my_click_handler = Proc.new {|sender, e| MessageBox.show > > 'Hello from > > Ruby!'} > > @button.click(&my_click_handler) > > > > self.controls.add @button > > end > > end > > > > my_form = MyForm.new > > Application.run my_form > > > > I'm a bit confused at this stage.... :( > > > > > > On Thu, 2009-11-26 at 11:36 +0000, Andrew S. Townley wrote: > > > On Thu, 2009-11-26 at 12:22 +0100, Ivan Porto Carrero wrote: > > > > what's the output of your pkgconfig path? > > > > > > > > > > > > ivan at debian-stage:~ > > > > ? pkg-config --variable=libdir mono > > > > /usr/local/mono/lib/pkgconfig/../../lib > > > > > > $ pkg-config --variable=libdir mono > > > /usr/local/mono-2.4/lib/pkgconfig/../../lib > > > > > > > ivan at debian-stage:~ > > > > ? echo $PKG_CONFIG_PATH > > > > /usr/local/mono/lib/pkgconfig > > > > > > $ echo $PKG_CONFIG_PATH > > > /usr/local/mono-2.4/lib/pkgconfig > > > > > > > I added these lines to my .bashrc file > > > > > > > > export PKG_CONFIG_PATH=/usr/local/mono/lib/pkgconfig: > > $PKG_CONFIG_PATH > > > > export PATH="~/bin:/usr/local/mono/bin:$PATH" > > > > > > Yeah, I have a specific mono-2.4 environment script that I > > source based > > > on notes from here: > > > > > > http://www.centriment.com/2009/04/01/building-mono-24-from-source-on-ubuntu-810/ > > > > > > #!/bin/bash > > > MONO_PREFIX=/usr/local/mono-2.4 > > > export DYLD_LIBRARY_PATH=$MONO_PREFIX/lib:$DYLD_LIBRARY_PATH > > > export LD_LIBRARY_PATH=$MONO_PREFIX/lib:$LD_LIBRARY_PATH > > > #export C_INCLUDE_PATH=$MONO_PREFIX/include > > > export ACLOCAL_PATH=$MONO_PREFIX/share/aclocal > > > export PKG_CONFIG_PATH=$MONO_PREFIX/lib/pkgconfig > > > PATH=$MONO_PREFIX/bin:$PATH > > > > > > > > > > > You can find more stuff here: > > > > http://linux.die.net/man/1/mono > > > > > > > > > > > > > > Are you able to get a hello world app with C# going in > > winforms? > > > > > > Yes. > > > > > > $ cat hello.cs > > > using System; > > > using System.Drawing; > > > using System.Windows.Forms; > > > > > > public class HelloWorld : Form > > > { > > > static public void Main () > > > { > > > Application.Run (new HelloWorld ()); > > > } > > > > > > public HelloWorld () > > > { > > > Button b = new Button (); > > > b.Text = "Click Me!"; > > > b.Click += new EventHandler (Button_Click); > > > Controls.Add (b); > > > } > > > > > > private void Button_Click (object sender, EventArgs e) > > > { > > > MessageBox.Show ("Button Clicked!"); > > > } > > > } > > > $ gmcs -pkg:dotnet hello.cs > > > $ which mono > > > /usr/local/mono-2.4/bin/mono > > > $ mono hello.exe > > > $ > > > > > > > --- > > > > Met vriendelijke groeten - Best regards - Salutations > > > > Ivan Porto Carrero > > > > Blog: http://flanders.co.nz > > > > Google Wave: portocarrero.ivan at googlewave.com > > > > Twitter: http://twitter.com/casualjim > > > > Author of IronRuby in Action (http://manning.com/carrero) > > > > > > > > > > > > > > > > On Thu, Nov 26, 2009 at 12:10 PM, Andrew S. Townley > > > > > > wrote: > > > > I sent this to Thibaut, but I probably should've > > sent it to > > > > the whole > > > > list since it probably isn't directly related to > > his work > > > > (sorry > > > > Thibaut!). > > > > > > > > Thanks to Ivan's pointer to mono builds, I was > > able to get > > > > IronRuby to > > > > work as I would've expected. However, it doesn't > > seem able to > > > > find the > > > > WinForms stuff that I clearly have on my machine: > > > > > > > > $ locate System.Windows.Forms > > > > /usr/lib/mono/1.0/System.Windows.Forms.dll > > > > /usr/lib/mono/gac/System.Windows.Forms > > > > > > > /usr/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089 > > > > > > > /usr/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089/System.Windows.Forms.dll > > > > > > > /usr/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089/System.Windows.Forms.dll.config > > > > > > /usr/local/ironruby/lib/ironruby/System.Windows.Forms.rb > > > > > > /usr/local/mono-2.4/lib/mono/1.0/System.Windows.Forms.dll > > > > > > /usr/local/mono-2.4/lib/mono/2.0/System.Windows.Forms.dll > > > > > > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms > > > > > > > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089 > > > > > > > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms/2.0.0.0__b77a5c561934e089 > > > > > > > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089/System.Windows.Forms.dll > > > > > > > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089/System.Windows.Forms.dll.mdb > > > > > > > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll > > > > > > > /usr/local/mono-2.4/lib/mono/gac/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll.mdb > > > > > > > > $ which mono > > > > /usr/local/mono-2.4/bin/mono > > > > > > > > $ ir -v > > > > IronRuby 0.9.3.0 on .NET 2.0.0.0 > > > > > > > > $ cat /tmp/test.rb > > > > require 'System.Windows.Forms' > > > > > > > > $ ir /tmp/test.rb > > > > :0:in `require': no such file to load -- > > System.Windows.Forms > > > > (LoadError) > > > > from /tmp/test.rb:1 > > > > > > > > I've even tried explicitly including the .NET 2.0 > > libraries as > > > > part of > > > > the LD_LIBRARY_PATH, but that didn't work: > > > > > > > > $ echo $LD_LIBRARY_PATH > > > > > > /usr/local/mono-2.4/lib:/usr/local/mono-2.4/lib/mono/2.0 > > > > > > > > Obviously, there's still a piece of the puzzle > > that I'm > > > > missing. Any > > > > ideas? > > > > > > > > Thanks in advance, > > > > > > > > ast > > > > -- > > > > Andrew S. Townley > > > > http://atownley.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 > > -- > > Andrew S. Townley > > http://atownley.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 > -- > Andrew S. Townley > http://atownley.org > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: From patrickcbrown at gmail.com Fri Nov 27 11:59:58 2009 From: patrickcbrown at gmail.com (Patrick Brown) Date: Fri, 27 Nov 2009 11:59:58 -0500 Subject: [Ironruby-core] ListViewItem DataTemplate In-Reply-To: References: <48163ce60911251103g4ff11e35l9504d70bab155a69@mail.gmail.com> Message-ID: <48163ce60911270859m22aa7ce6oa63e6859914629d3@mail.gmail.com> Hi Thank you, this explanation is very helpful. I will start working on following the naming conventions, I have actually been purposefully avoiding them to this point as following the C# standards was helping me to map commonalities between the two languages and focus on learning the language and tools themselves. Thanks, I appreciate all of your help Patrick On Thu, Nov 26, 2009 at 3:48 AM, Ivan Porto Carrero wrote: > There is no link between the DLR objects and CLR objects so if you derive > from a control in ruby code there is no way for XAML to figure out what has > been configured etc. There is also no class it can link to as the classes > don't exist in the same way in a DLR based language as in a CLR language. > > The following control tries to make that integration easier but it's still > very early days and all help is wanted. > http://dynamicscriptcontrol.codeplex.com/ > http://code.google.com/p/dynamic-script-control/ > > Nick Rickets may be of help, I think he's got a WPF application with > IronRuby that is deployed AFAIK > > I think it's important to understand that there is a difference between a > DLR and a CLR based language. CLR classes map straight to CLR-types but this > isn't always the case in a DLR based language because they have a difference > on opinion with the CLR on how classes should behave. > The CLR says ALL classes are CLOSED that means you can't modify anything > once it's compiled then it only does its job and doesn't learn new tricks > The DLR (for IronRuby and IronPython at least) says ALL classes are OPEN, > you can freeze some making them closed. Meaning once you're program is > running you can modify classes by adding or removing methods and so on. > Because of this reason x:Class doesn't know where to go because for the CLR > the type may very well not exist. > > This doesn't help you much but it's a start to figure out what's going on > and why things don't work the same as with C# > > > I'm sorry but I keep deleting the following message from every email I sent > to help you: > > Naming conventions! > in ruby stuff is lowercased_and_underscored except for constants or there > is a particularly good reason for you to want an uppercased name like a DSL > entry point. UpperCased names are constants in Ruby and as such people > wanting to help you (in this case me) have an easier time getting through > your code as they don't have to workout what they are looking at. Constants > include ModuleNames, ClassNames and CONSTANT_VALUES > > in C# stuff is CamelCasedAndNotUnderscored. > > . > --- > Met vriendelijke groeten - Best regards - Salutations > Ivan Porto Carrero > Blog: http://flanders.co.nz > Google Wave: portocarrero.ivan at googlewave.com > Twitter: http://twitter.com/casualjim > Author of IronRuby in Action (http://manning.com/carrero) > > > > On Wed, Nov 25, 2009 at 8:03 PM, Patrick Brown wrote: > >> Hello >> >> Has anyone gotten a datatemplate for a ListView under WPF? I created a >> very simple C# sample and converted it to IronRuby, the C# works perfectly, >> the IronRuby example displays my class name, the datatemplate didn't load >> and bind up to the properties as I hoped. >> >> C# >> public class StatusListView : ListView >> { >> public StatusListView() >> { >> var items = new[] >> { >> new { message = "One", messageType = "Status" }, >> new { message = "Two", messageType = "Error" }, >> new { message = "Shree", messageType = "Status" } >> }; >> FrameworkElementFactory textblock = new >> FrameworkElementFactory(typeof(TextBlock)); >> >> Setter setter = new Setter(); >> setter.Property = TextBlock.FontSizeProperty; >> setter.Value = 18.0; >> >> DataTrigger dataTrigger = new DataTrigger(); >> dataTrigger.Binding = new Binding("messageType"); >> dataTrigger.Value = "Status"; >> dataTrigger.Setters.Add(setter); >> >> Style style = new Style(typeof(TextBlock)); >> style.Triggers.Add(dataTrigger); >> >> textblock.SetValue(TextBlock.StyleProperty, style); >> textblock.SetBinding(TextBlock.TextProperty, new >> Binding("message")); >> DataTemplate template = new DataTemplate(); >> template.VisualTree = textblock; >> ItemsSource = items; >> ItemTemplate = template; >> } >> } >> >> >> IronRuby - in this sample my listview itemsource is actually set in >> another piece of code as so. As I state above, the item does show up in the >> listview but the datatemplate is not applied against it. >> >> self.buildMessages = Array.new >> self.buildMessages.push(BuildMessage.new("Test","Status")) >> self.statusListView.ItemsSource = self.buildMessages >> >> >> class StatusListView < ListView >> def initialize() >> HorizontalAlignment = HorizontalAlignment.Stretch >> Margin = Thickness.new(0,5,0,5) >> MinHeight = 200 >> >> BuildItemTemplate() >> end >> >> def BuildItemTemplate() >> begin >> textblock = FrameworkElementFactory.new(TextBlock.to_clr_type) >> >> setter = Setter.new >> setter.Property = TextBlock.FontSizeProperty >> setter.Value = 14.0 >> >> dataTrigger = DataTrigger.new >> dataTrigger.Binding = System::Windows::Data::Binding.new("messageType") >> dataTrigger.Value = "Status" >> dataTrigger.Setters.Add(setter) >> >> style = Style.new(TextBlock.to_clr_type) >> style.Triggers.Add(dataTrigger) >> >> textblock.SetValue(TextBlock.StyleProperty, style) >> textblock.SetBinding(TextBlock.TextProperty, >> System::Windows::Data::Binding.new("message")) >> >> template = DataTemplate.new >> template.VisualTree = textblock >> ItemTemplate = template >> rescue Exception => e >> puts "#{e}" >> end >> end >> end >> >> Thanks for your time and thoughts >> Patrick >> >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core >> >> > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From patrickcbrown at gmail.com Fri Nov 27 12:01:46 2009 From: patrickcbrown at gmail.com (Patrick Brown) Date: Fri, 27 Nov 2009 12:01:46 -0500 Subject: [Ironruby-core] .NET Remoting with IronRuby 0.9.2 In-Reply-To: <0f03d8a64a42fdb662b378d34c01142d@ruby-forum.com> References: <48163ce60911110645p59eb8660k3cadea3431700231@mail.gmail.com> <0f03d8a64a42fdb662b378d34c01142d@ruby-forum.com> Message-ID: <48163ce60911270901y5293aadv2c35ea8f12f2a8af@mail.gmail.com> Hi Dong Unfortuantly not, it is an issue I am going to come back to and really want to get to work but I temporarily dropped it so I could move forward on learning the tools and language. Thanks, Patrick On Wed, Nov 25, 2009 at 11:41 PM, Dong Zhang wrote: > Hi Patrick > > did you find a solution to your problem? > I got exactly the same problem while trying to call .NET remote method. > > thanks > Dong > > > Patrick Brown wrote: > > Hello > > > > Has anyone been able to get Remoting to work? I get the following > > exception when attempting to make a call. I am rather new to IronRuby > > but > > believe my code should work, I converted a very simple snippit of > > working C# > > code to IronRuby and can't seem to get it to work. I put breakpoints in > > the > > .NET assemblies and watch each step complete successfully until the > > service.SelectPolicies call. > > > > mscorlib:0:in `HandleReturnMessage': Cannot load type > > 'IronRuby.Runtime.IRubyObj > > ect, IronRuby, Version=0.9.2.0, Culture=neutral, > > PublicKeyToken=31bf3856ad364e35 > > '. (System::Runtime::Remoting::RemotingException) > > from mscorlib:0:in `PrivateInvoke' > > from Microsoft.Scripting.Core:0:in `BindCore' > > from Microsoft.Scripting.Core:0:in `Bind' > > from ./PropertyPolicy.rb:34:in `GitSomePolicies' > > from main.rb:5 > > > > > > IronRuby snippit > > > > > RemotingConfiguration.Configure("Configuration\\ClientRemotingConfiguration.config", > > false) > > > > service = > > DIContainer.Instance.method(:Resolve).of(IPropertyPolicyService).call() > > types = DIContainer.Instance.method(:Resolve).of(ILookupInfos).call(); > > > types.Add(DIContainer.Instance.method(:Resolve).of(ICodeListInfoBuilder).call().Build("AP", > > > > CodeValueAttribute.GetDescription(PolicyType.AllPacPolicy), "", 0, > > DateTime.Now, DateTime.Now)) > > > > policies = service.SelectPolicies(types) > > > > Thanks, > > Patrick > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Fri Nov 27 12:17:55 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Fri, 27 Nov 2009 18:17:55 +0100 Subject: [Ironruby-core] ListViewItem DataTemplate In-Reply-To: <48163ce60911270859m22aa7ce6oa63e6859914629d3@mail.gmail.com> References: <48163ce60911251103g4ff11e35l9504d70bab155a69@mail.gmail.com> <48163ce60911270859m22aa7ce6oa63e6859914629d3@mail.gmail.com> Message-ID: Yeah sorry for that.. I guess I'm not a morning person keep sending questions, helps me to understand the areas people have trouble with :) --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Fri, Nov 27, 2009 at 5:59 PM, Patrick Brown wrote: > Hi > > Thank you, this explanation is very helpful. I will start working on > following the naming conventions, I have actually been purposefully avoiding > them to this point as following the C# standards was helping me to map > commonalities between the two languages and focus on learning the language > and tools themselves. > > Thanks, I appreciate all of your help > Patrick > > On Thu, Nov 26, 2009 at 3:48 AM, Ivan Porto Carrero wrote: > >> There is no link between the DLR objects and CLR objects so if you derive >> from a control in ruby code there is no way for XAML to figure out what has >> been configured etc. There is also no class it can link to as the classes >> don't exist in the same way in a DLR based language as in a CLR language. >> >> The following control tries to make that integration easier but it's still >> very early days and all help is wanted. >> http://dynamicscriptcontrol.codeplex.com/ >> http://code.google.com/p/dynamic-script-control/ >> >> Nick Rickets may be of help, I think he's got a WPF application with >> IronRuby that is deployed AFAIK >> >> I think it's important to understand that there is a difference between a >> DLR and a CLR based language. CLR classes map straight to CLR-types but this >> isn't always the case in a DLR based language because they have a difference >> on opinion with the CLR on how classes should behave. >> The CLR says ALL classes are CLOSED that means you can't modify anything >> once it's compiled then it only does its job and doesn't learn new tricks >> The DLR (for IronRuby and IronPython at least) says ALL classes are OPEN, >> you can freeze some making them closed. Meaning once you're program is >> running you can modify classes by adding or removing methods and so on. >> Because of this reason x:Class doesn't know where to go because for the >> CLR the type may very well not exist. >> >> This doesn't help you much but it's a start to figure out what's going on >> and why things don't work the same as with C# >> >> >> I'm sorry but I keep deleting the following message from every email I >> sent to help you: >> >> Naming conventions! >> in ruby stuff is lowercased_and_underscored except for constants or there >> is a particularly good reason for you to want an uppercased name like a DSL >> entry point. UpperCased names are constants in Ruby and as such people >> wanting to help you (in this case me) have an easier time getting through >> your code as they don't have to workout what they are looking at. Constants >> include ModuleNames, ClassNames and CONSTANT_VALUES >> >> in C# stuff is CamelCasedAndNotUnderscored. >> >> . >> --- >> Met vriendelijke groeten - Best regards - Salutations >> Ivan Porto Carrero >> Blog: http://flanders.co.nz >> Google Wave: portocarrero.ivan at googlewave.com >> Twitter: http://twitter.com/casualjim >> Author of IronRuby in Action (http://manning.com/carrero) >> >> >> >> On Wed, Nov 25, 2009 at 8:03 PM, Patrick Brown wrote: >> >>> Hello >>> >>> Has anyone gotten a datatemplate for a ListView under WPF? I created >>> a very simple C# sample and converted it to IronRuby, the C# works >>> perfectly, the IronRuby example displays my class name, the datatemplate >>> didn't load and bind up to the properties as I hoped. >>> >>> C# >>> public class StatusListView : ListView >>> { >>> public StatusListView() >>> { >>> var items = new[] >>> { >>> new { message = "One", messageType = "Status" }, >>> new { message = "Two", messageType = "Error" }, >>> new { message = "Shree", messageType = "Status" } >>> }; >>> FrameworkElementFactory textblock = new >>> FrameworkElementFactory(typeof(TextBlock)); >>> >>> Setter setter = new Setter(); >>> setter.Property = TextBlock.FontSizeProperty; >>> setter.Value = 18.0; >>> >>> DataTrigger dataTrigger = new DataTrigger(); >>> dataTrigger.Binding = new Binding("messageType"); >>> dataTrigger.Value = "Status"; >>> dataTrigger.Setters.Add(setter); >>> >>> Style style = new Style(typeof(TextBlock)); >>> style.Triggers.Add(dataTrigger); >>> >>> textblock.SetValue(TextBlock.StyleProperty, style); >>> textblock.SetBinding(TextBlock.TextProperty, new >>> Binding("message")); >>> DataTemplate template = new DataTemplate(); >>> template.VisualTree = textblock; >>> ItemsSource = items; >>> ItemTemplate = template; >>> } >>> } >>> >>> >>> IronRuby - in this sample my listview itemsource is actually set in >>> another piece of code as so. As I state above, the item does show up in the >>> listview but the datatemplate is not applied against it. >>> >>> self.buildMessages = Array.new >>> self.buildMessages.push(BuildMessage.new("Test","Status")) >>> self.statusListView.ItemsSource = self.buildMessages >>> >>> >>> class StatusListView < ListView >>> def initialize() >>> HorizontalAlignment = HorizontalAlignment.Stretch >>> Margin = Thickness.new(0,5,0,5) >>> MinHeight = 200 >>> >>> BuildItemTemplate() >>> end >>> >>> def BuildItemTemplate() >>> begin >>> textblock = FrameworkElementFactory.new(TextBlock.to_clr_type) >>> >>> setter = Setter.new >>> setter.Property = TextBlock.FontSizeProperty >>> setter.Value = 14.0 >>> >>> dataTrigger = DataTrigger.new >>> dataTrigger.Binding = >>> System::Windows::Data::Binding.new("messageType") >>> dataTrigger.Value = "Status" >>> dataTrigger.Setters.Add(setter) >>> >>> style = Style.new(TextBlock.to_clr_type) >>> style.Triggers.Add(dataTrigger) >>> >>> textblock.SetValue(TextBlock.StyleProperty, style) >>> textblock.SetBinding(TextBlock.TextProperty, >>> System::Windows::Data::Binding.new("message")) >>> >>> template = DataTemplate.new >>> template.VisualTree = textblock >>> ItemTemplate = template >>> rescue Exception => e >>> puts "#{e}" >>> end >>> end >>> end >>> >>> Thanks for your time and thoughts >>> Patrick >>> >>> _______________________________________________ >>> Ironruby-core mailing list >>> Ironruby-core at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/ironruby-core >>> >>> >> >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core >> >> > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ruby-forum.com Fri Nov 27 12:33:59 2009 From: lists at ruby-forum.com (Dylan McClung) Date: Fri, 27 Nov 2009 18:33:59 +0100 Subject: [Ironruby-core] handling ruby types and CallSiteStorage in std library Message-ID: I'm working on adding code to the OpenSSL extension of the standard library and I need to understand the design for invoking and typing Ruby code. I read the 'Modifying the sources' github page and it mentions using CallSiteStorage to call into Ruby code. Specifically, the Cipher ruby class has a dependency on the Digest ruby classes for the pkcs5_keyivgen method. An optional parameter for this method is an instance of the Ruby class Digest::Base. How would the type look, maybe Digest.Digest.Base digest/*optional*/? Or would it be an object and I'd also need to pass in CallSiteStorage to call methods on the object? An example in the standard library of such behavior would be much appreciated, thanks for any help. -- Posted via http://www.ruby-forum.com/. From Tomas.Matousek at microsoft.com Fri Nov 27 17:38:18 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Fri, 27 Nov 2009 22:38:18 +0000 Subject: [Ironruby-core] handling ruby types and CallSiteStorage in std library In-Reply-To: References: Message-ID: <4B342496A3EFEB48839E10BB4BF5964C1826C813@TK5EX14MBXC129.redmond.corp.microsoft.com> It depends whether the method is supposed to invoke Digest's methods dynamically or not. Does pkcs5_keyivgen method accept any Ruby object that implements the methods pkcs5_keyivgen calls? Or does it need to be an instance of Digest class? If the former is true than you need to use "object" as the parameter type and use dynamic call sites to invoke those methods. An example of such dynamic behavior would be MutableStringOps.Compare. If the latter is true you can just type the parameter to Digest CLR type and call its methods directly. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Dylan McClung Sent: Friday, November 27, 2009 9:34 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] handling ruby types and CallSiteStorage in std library I'm working on adding code to the OpenSSL extension of the standard library and I need to understand the design for invoking and typing Ruby code. I read the 'Modifying the sources' github page and it mentions using CallSiteStorage to call into Ruby code. Specifically, the Cipher ruby class has a dependency on the Digest ruby classes for the pkcs5_keyivgen method. An optional parameter for this method is an instance of the Ruby class Digest::Base. How would the type look, maybe Digest.Digest.Base digest/*optional*/? Or would it be an object and I'd also need to pass in CallSiteStorage to call methods on the object? An example in the standard library of such behavior would be much appreciated, thanks for any help. -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From Tomas.Matousek at microsoft.com Fri Nov 27 17:46:47 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Fri, 27 Nov 2009 22:46:47 +0000 Subject: [Ironruby-core] handling ruby types and CallSiteStorage in std library In-Reply-To: <4B342496A3EFEB48839E10BB4BF5964C1826C813@TK5EX14MBXC129.redmond.corp.microsoft.com> References: <4B342496A3EFEB48839E10BB4BF5964C1826C813@TK5EX14MBXC129.redmond.corp.microsoft.com> Message-ID: <4B342496A3EFEB48839E10BB4BF5964C1826C839@TK5EX14MBXC129.redmond.corp.microsoft.com> BTW: Since parts of the OpenSSL library are already written in Ruby (see ruby-1.8.6p368\lib\ruby\1.8\openssl directory) it might be easier to write the rest in Ruby as well. With calls to .NET implementation of the cryptographic algorithms, of course. If you chose to go that way you can add the scripts to Merlin\Main\Languages\Ruby\Libs. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek Sent: Friday, November 27, 2009 2:38 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] handling ruby types and CallSiteStorage in std library It depends whether the method is supposed to invoke Digest's methods dynamically or not. Does pkcs5_keyivgen method accept any Ruby object that implements the methods pkcs5_keyivgen calls? Or does it need to be an instance of Digest class? If the former is true than you need to use "object" as the parameter type and use dynamic call sites to invoke those methods. An example of such dynamic behavior would be MutableStringOps.Compare. If the latter is true you can just type the parameter to Digest CLR type and call its methods directly. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Dylan McClung Sent: Friday, November 27, 2009 9:34 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] handling ruby types and CallSiteStorage in std library I'm working on adding code to the OpenSSL extension of the standard library and I need to understand the design for invoking and typing Ruby code. I read the 'Modifying the sources' github page and it mentions using CallSiteStorage to call into Ruby code. Specifically, the Cipher ruby class has a dependency on the Digest ruby classes for the pkcs5_keyivgen method. An optional parameter for this method is an instance of the Ruby class Digest::Base. How would the type look, maybe Digest.Digest.Base digest/*optional*/? Or would it be an object and I'd also need to pass in CallSiteStorage to call methods on the object? An example in the standard library of such behavior would be much appreciated, thanks for any help. -- 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 ivan at flanders.co.nz Sat Nov 28 09:19:46 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Sat, 28 Nov 2009 15:19:46 +0100 Subject: [Ironruby-core] xap generation middleware for Rack Message-ID: Hi I've created a rack-xapper gem http://github.com/casualjim/rack-xapper It does basically the same thing as chiron but for any rack based application. It's still a work in progress, it doesn't have support for slvx stuff yet but for a silverlight 2 batteries included type of approach it should do its job. --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero GSM: +32.486.787.582 Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jimmy.Schementi at microsoft.com Sat Nov 28 19:23:57 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Sun, 29 Nov 2009 00:23:57 +0000 Subject: [Ironruby-core] Finding the mythical root_visual object in Gestalt In-Reply-To: <5E1F302C-8934-47CD-AA64-DADA2C601270@gmail.com> References: <5E1F302C-8934-47CD-AA64-DADA2C601270@gmail.com> Message-ID: <1A373725-CE4E-4930-97E2-8A2F71A800BF@microsoft.com> I can add the "root_visual" variable; the current implementation only defines "me" and "xaml", which do exactly what "root_visual" would do. Unfortunately the implementation doesn't quite match the spec at the moment (I'm not sure why they called it 1.0 =P). On Nov 25, 2009, at 9:12 AM, "Adam Burmister" > wrote: Hi all, I'm currently writing about Gestalt using the 1.0 release. The best documentation I can find for it is the PDF "sl-back-to-just-text.pdf", by Jimmy, which states: "XAML accessors root_visual maps to System.Windows.Application.Current.RootVisual ... When a method is called that does not exist on root_visual, then FindName(methodName) is called. This allows access to any XAML elements with an x:Name value... root_visual.Message.Text = "New Message" " This is the code that I'm using to try and experiment with this: I cannot find this object placed anywhere I would expect; at least it's not as easily available as the documentation leads me to believe. Can anyone throw some light onto what I'm doing wrong, or if there has been a change in the way this works? Thank you kindly, Adam Burmister _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jimmy.Schementi at microsoft.com Sat Nov 28 19:37:47 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Sun, 29 Nov 2009 00:37:47 +0000 Subject: [Ironruby-core] xap generation middleware for Rack In-Reply-To: References: Message-ID: <5EE34984-A483-48E7-9177-F1E37BFB64DD@microsoft.com> Ivan, While this is very cool, the need for a xap is now not required for silverlight apps; the "gestalt" app-model is now merged into microsoft.scripting.silverlight.dll and will be the default in upcoming builds. More info about this coming soon, and the gestalt webpage will point to the new ironruby site for all the info. But you'll see an announcement from me. ~Jimmy Sent from my phone On Nov 28, 2009, at 9:30 AM, "Ivan Porto Carrero" > wrote: Hi I've created a rack-xapper gem http://github.com/casualjim/rack-xapper It does basically the same thing as chiron but for any rack based application. It's still a work in progress, it doesn't have support for slvx stuff yet but for a silverlight 2 batteries included type of approach it should do its job. --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero GSM: +32.486.787.582 Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Sun Nov 29 04:04:57 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Sun, 29 Nov 2009 10:04:57 +0100 Subject: [Ironruby-core] getting the runtime type Message-ID: Hi I'd like to get the runtime type of a ruby class The IronPython guys can do something like this (python substituted for ruby) require 'clr' class Person < Struct.new(:id, :name, :age) end they can then do clr.ClrType(Person).FullName Something equivalent to that doesn't exist yet for ironruby does it? When I do Person.to_clr_type it returns nil and other objects give me their base types Person.GetType => IronRuby.Builtins.RubyObject I'm actually trying to get the ironpython ClrMetaClass from Harry Pierson written in ironruby. --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jimmy.Schementi at microsoft.com Sun Nov 29 09:00:50 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Sun, 29 Nov 2009 14:00:50 +0000 Subject: [Ironruby-core] getting the runtime type In-Reply-To: References: Message-ID: <6EF21EAB-2C0E-4EC4-8A5B-C660EBBD3F19@microsoft.com> Every Ruby class is not mapped to a unique CLR type (they are all IronRuby.Builtins.RubyObject unless you subclass a CLR type or implement and interface). So doing the IronPython ClrMetaClass equivalent would require a speciic feature in IronRuby to give more control of the underlying CLR type -- IronPython has already added this in the form of "__clrtype__". This work is not planned for 1.0, but definitely leaves a usability hole in our CLR integration. The work-around is to create a empty C# class, and then subclass it from Ruby -- there will be a unique CLR class generated for this Ruby class. Things like CLR attributes need to go on the C# class. ~Jimmy Sent from my phone On Nov 29, 2009, at 4:07 AM, "Ivan Porto Carrero" > wrote: Hi I'd like to get the runtime type of a ruby class The IronPython guys can do something like this (python substituted for ruby) require 'clr' class Person < Struct.new(:id, :name, :age) end they can then do clr.ClrType(Person).FullName Something equivalent to that doesn't exist yet for ironruby does it? When I do Person.to_clr_type it returns nil and other objects give me their base types Person.GetType => IronRuby.Builtins.RubyObject I'm actually trying to get the ironpython ClrMetaClass from Harry Pierson written in ironruby. --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken1hasimoto at gmail.com Sun Nov 29 09:04:46 2009 From: ken1hasimoto at gmail.com (=?ISO-2022-JP?B?GyRCJE8kNyRiJEgkMSRzJCQkQRsoQg==?=) Date: Sun, 29 Nov 2009 23:04:46 +0900 Subject: [Ironruby-core] Could you please teach a canonical style for writing the IronRuby hosting code. Message-ID: Hello, I'm kenichi hashimoto. I'm a Japanese. I don't write english well. Now I have a question about a canonical style for writing the IronRuby hosting code. [BACKGROUND] Now, I'm tring to host the IronRuby 1.0RC on C#.NET (Visual Studio 2008). And, I have been trying to host it since IronRuby 0.5. However, I haven't understood about how to write code in right style yet. [QUESTION] Could you please teach a canonical style for writing the IronRuby hosting code. Now, I wrote below: static void Main(string[] args) { // create the IronRuby engine. ScriptRuntime runtime = IronRuby.Ruby.CreateRuntime(); var engine = runtime.GetEngine("rb"); // create the scope and set the local variable from C# var scope = engine.CreateScope(); scope.SetVariable("x", 123); // set the global variable from C# IronRuby.Ruby.GetExecutionContext(engine).DefineGlobalVariable("xxx", 789); // execute the script with the scope var source = engine.CreateScriptSourceFromString(@"puts ""x is #{x}. $xxx is #{$xxx}."" "); source.Execute(scope); Console.ReadLine(); } Is it a canonical style? Thank you. B.R. Kenichi HASHIMOTO From Jimmy.Schementi at microsoft.com Sun Nov 29 10:26:51 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Sun, 29 Nov 2009 15:26:51 +0000 Subject: [Ironruby-core] Could you please teach a canonical style for writing the IronRuby hosting code. In-Reply-To: References: Message-ID: <1926FFBE-BC83-452F-9980-6F2733519A6F@microsoft.com> That looks good for hosting code that can switch between languages easily. If you're just using Ruby, you can use IronRuby.Ruby.CreateEngine() instead of getting the engine by string, but I'd suggest staying with what you have; you can change to other languages easily. For running code from strings, you don't necessarily need to create a ScriptSource; you can use engine.Execute(string, ScriptScope) instead. Creating a script source are for the cases where you want to compile the code and store it before executing, or you want to change the mode of source code execution (file, interactive, expressions, etc). There is a dlr hosting spec on dlr.codeplex.com that shows various hosting scenarios and how the code should look. Let us know if you have any other questions about hosting. I showed hosting at RubyConf this year, so keep an eye out for that blog post (I'll send mail to this list when it's done). ~Jimmy Sent from my phone On Nov 29, 2009, at 9:11 AM, "????????" wrote: > Hello, I'm kenichi hashimoto. > I'm a Japanese. I don't write english well. > > Now I have a question about a canonical style for writing the IronRuby > hosting code. > > [BACKGROUND] > Now, I'm tring to host the IronRuby 1.0RC on C#.NET (Visual Studio > 2008). > And, I have been trying to host it since IronRuby 0.5. > However, I haven't understood about how to write code in right style > yet. > > [QUESTION] > Could you please teach a canonical style for writing the IronRuby > hosting code. > > Now, I wrote below: > > static void Main(string[] args) > { > // create the IronRuby engine. > ScriptRuntime runtime = IronRuby.Ruby.CreateRuntime(); > var engine = runtime.GetEngine("rb"); > > // create the scope and set the local variable from C# > var scope = engine.CreateScope(); > scope.SetVariable("x", 123); > > // set the global variable from C# > IronRuby.Ruby.GetExecutionContext(engine).DefineGlobalVariable > ("xxx", > 789); > > // execute the script with the scope > var source = engine.CreateScriptSourceFromString(@"puts ""x is > #{x}. $xxx is #{$xxx}."" "); > source.Execute(scope); > > Console.ReadLine(); > } > > Is it a canonical style? > > Thank you. > B.R. Kenichi HASHIMOTO > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > From ryan.riley at panesofglass.org Sun Nov 29 14:39:52 2009 From: ryan.riley at panesofglass.org (Ryan Riley) Date: Sun, 29 Nov 2009 13:39:52 -0600 Subject: [Ironruby-core] getting the runtime type In-Reply-To: <6EF21EAB-2C0E-4EC4-8A5B-C660EBBD3F19@microsoft.com> References: <6EF21EAB-2C0E-4EC4-8A5B-C660EBBD3F19@microsoft.com> Message-ID: Is the current best practice for this to create a custom class for any Ruby types that need CLR integration, or should we use IronRubyInline? I suppose it depends on your use case, but I would think the latter is probably the best option. Thoughts? Ryan Riley Email: ryan.riley at panesofglass.org LinkedIn: http://www.linkedin.com/in/ryanriley Blog: http://wizardsofsmart.net/ Website: http://panesofglass.org/ On Sun, Nov 29, 2009 at 8:00 AM, Jimmy Schementi < Jimmy.Schementi at microsoft.com> wrote: > Every Ruby class is not mapped to a unique CLR type (they are all > IronRuby.Builtins.RubyObject unless you subclass a CLR type or implement and > interface). So doing the IronPython ClrMetaClass equivalent would require a > speciic feature in IronRuby to give more control of the underlying CLR type > -- IronPython has already added this in the form of "__clrtype__". > > This work is not planned for 1.0, but definitely leaves a usability hole in > our CLR integration. The work-around is to create a empty C# class, and then > subclass it from Ruby -- there will be a unique CLR class generated for this > Ruby class. Things like CLR attributes need to go on the C# class. > > > ~Jimmy > Sent from my phone > > On Nov 29, 2009, at 4:07 AM, "Ivan Porto Carrero" > wrote: > > Hi > > I'd like to get the runtime type of a ruby class > > The IronPython guys can do something like this (python substituted for > ruby) > require 'clr' > > class Person < Struct.new(:id, :name, :age) > end > > they can then do clr.ClrType(Person).FullName > > Something equivalent to that doesn't exist yet for ironruby does it? > > When I do Person.to_clr_type it returns nil > and other objects give me their base types > > Person.GetType => IronRuby.Builtins.RubyObject > > I'm actually trying to get the ironpython ClrMetaClass from Harry Pierson > written in ironruby. > --- > Met vriendelijke groeten - Best regards - Salutations > Ivan Porto Carrero > Blog: http://flanders.co.nz > Google Wave: > portocarrero.ivan at googlewave.com > Twitter: http://twitter.com/casualjim > Author of IronRuby in Action ( > http://manning.com/carrero) > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Sun Nov 29 14:53:10 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Sun, 29 Nov 2009 20:53:10 +0100 Subject: [Ironruby-core] getting the runtime type In-Reply-To: References: <6EF21EAB-2C0E-4EC4-8A5B-C660EBBD3F19@microsoft.com> Message-ID: I want to use it for silverlight databinding, but it's part of a bigger plan :) --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Sun, Nov 29, 2009 at 8:39 PM, Ryan Riley wrote: > Is the current best practice for this to create a custom class for any Ruby > types that need CLR integration, or should we use IronRubyInline? > I suppose it depends on your use case, but I would think the latter is > probably the best option. Thoughts? > > Ryan Riley > > Email: ryan.riley at panesofglass.org > LinkedIn: http://www.linkedin.com/in/ryanriley > Blog: http://wizardsofsmart.net/ > Website: http://panesofglass.org/ > > > > On Sun, Nov 29, 2009 at 8:00 AM, Jimmy Schementi < > Jimmy.Schementi at microsoft.com> wrote: > >> Every Ruby class is not mapped to a unique CLR type (they are all >> IronRuby.Builtins.RubyObject unless you subclass a CLR type or implement and >> interface). So doing the IronPython ClrMetaClass equivalent would require a >> speciic feature in IronRuby to give more control of the underlying CLR type >> -- IronPython has already added this in the form of "__clrtype__". >> >> This work is not planned for 1.0, but definitely leaves a usability hole >> in our CLR integration. The work-around is to create a empty C# class, and >> then subclass it from Ruby -- there will be a unique CLR class generated for >> this Ruby class. Things like CLR attributes need to go on the C# class. >> >> >> ~Jimmy >> Sent from my phone >> >> On Nov 29, 2009, at 4:07 AM, "Ivan Porto Carrero" >> wrote: >> >> Hi >> >> I'd like to get the runtime type of a ruby class >> >> The IronPython guys can do something like this (python substituted for >> ruby) >> require 'clr' >> >> class Person < Struct.new(:id, :name, :age) >> end >> >> they can then do clr.ClrType(Person).FullName >> >> Something equivalent to that doesn't exist yet for ironruby does it? >> >> When I do Person.to_clr_type it returns nil >> and other objects give me their base types >> >> Person.GetType => IronRuby.Builtins.RubyObject >> >> I'm actually trying to get the ironpython ClrMetaClass from Harry Pierson >> written in ironruby. >> --- >> Met vriendelijke groeten - Best regards - Salutations >> Ivan Porto Carrero >> Blog: http://flanders.co.nz >> Google Wave: >> portocarrero.ivan at googlewave.com >> Twitter: http://twitter.com/casualjim >> Author of IronRuby in Action ( >> http://manning.com/carrero) >> >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core >> >> >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core >> >> > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jimmy.Schementi at microsoft.com Sun Nov 29 15:24:18 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Sun, 29 Nov 2009 20:24:18 +0000 Subject: [Ironruby-core] getting the runtime type In-Reply-To: References: <6EF21EAB-2C0E-4EC4-8A5B-C660EBBD3F19@microsoft.com> Message-ID: IronRubyInline gives you a better workflow between writing C# and Ruby, so it gives you nice way to create a CLR type, but both ways are techically equivalent, so either way is fine. Personally I'd use the inline option. Keep in mind that ironrubyinline requires you to be able to call csc.exe and write a DLL to disk at runtime, so make sure your environment supports that -- you might need to pregen the dlls in a partial trust, for example, but for development it's perfectly fine. ~Jimmy Sent from my phone On Nov 29, 2009, at 2:40 PM, "Ryan Riley" > wrote: Is the current best practice for this to create a custom class for any Ruby types that need CLR integration, or should we use IronRubyInline? I suppose it depends on your use case, but I would think the latter is probably the best option. Thoughts? Ryan Riley Email: ryan.riley at panesofglass.org LinkedIn: http://www.linkedin.com/in/ryanriley Blog: http://wizardsofsmart.net/ Website: http://panesofglass.org/ On Sun, Nov 29, 2009 at 8:00 AM, Jimmy Schementi <Jimmy.Schementi at microsoft.com> wrote: Every Ruby class is not mapped to a unique CLR type (they are all IronRuby.Builtins.RubyObject unless you subclass a CLR type or implement and interface). So doing the IronPython ClrMetaClass equivalent would require a speciic feature in IronRuby to give more control of the underlying CLR type -- IronPython has already added this in the form of "__clrtype__". This work is not planned for 1.0, but definitely leaves a usability hole in our CLR integration. The work-around is to create a empty C# class, and then subclass it from Ruby -- there will be a unique CLR class generated for this Ruby class. Things like CLR attributes need to go on the C# class. ~Jimmy Sent from my phone On Nov 29, 2009, at 4:07 AM, "Ivan Porto Carrero" <ivan at flanders.co.nz> wrote: Hi I'd like to get the runtime type of a ruby class The IronPython guys can do something like this (python substituted for ruby) require 'clr' class Person < Struct.new(:id, :name, :age) end they can then do clr.ClrType(Person).FullName Something equivalent to that doesn't exist yet for ironruby does it? When I do Person.to_clr_type it returns nil and other objects give me their base types Person.GetType => IronRuby.Builtins.RubyObject I'm actually trying to get the ironpython ClrMetaClass from Harry Pierson written in ironruby. --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: From orion.edwards at gmail.com Sun Nov 29 19:40:34 2009 From: orion.edwards at gmail.com (Orion Edwards) Date: Mon, 30 Nov 2009 13:40:34 +1300 Subject: [Ironruby-core] 2d array Message-ID: <7c1b59c00911291640o69972ab6h21399bae01cff024@mail.gmail.com> I have some C# code which is expecting a 2d array. public static class Foo { public static int Bar(object[,] inArray) { ... } } Is there any way that I can call this from IronRuby? I can't figure out how to create the 2d array? I have a feeling this has been asked before, but I can't find any info about it... Cheers, Orion -------------- next part -------------- An HTML attachment was scrubbed... URL: From curth at microsoft.com Sun Nov 29 19:44:42 2009 From: curth at microsoft.com (Curt Hagenlocher) Date: Mon, 30 Nov 2009 00:44:42 +0000 Subject: [Ironruby-core] 2d array In-Reply-To: <7c1b59c00911291640o69972ab6h21399bae01cff024@mail.gmail.com> References: <7c1b59c00911291640o69972ab6h21399bae01cff024@mail.gmail.com> Message-ID: <9DBDB52016D6F34AABBACF6C2876EA2804418233@TK5EX14MBXC137.redmond.corp.microsoft.com> You can create an array using the BCL by calling Array.CreateInstance. From C#, it would look like this: Array.CreateInstance(typeof(object), 5, 6)); // Equivalent to new object[5,6] I don't have IronRuby on this machine and don't want to guess at the right syntax. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards Sent: Sunday, November 29, 2009 4:41 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] 2d array I have some C# code which is expecting a 2d array. public static class Foo { public static int Bar(object[,] inArray) { ... } } Is there any way that I can call this from IronRuby? I can't figure out how to create the 2d array? I have a feeling this has been asked before, but I can't find any info about it... Cheers, Orion -------------- next part -------------- An HTML attachment was scrubbed... URL: From orion.edwards at gmail.com Sun Nov 29 20:09:49 2009 From: orion.edwards at gmail.com (Orion Edwards) Date: Mon, 30 Nov 2009 14:09:49 +1300 Subject: [Ironruby-core] 2d array In-Reply-To: <9DBDB52016D6F34AABBACF6C2876EA2804418233@TK5EX14MBXC137.redmond.corp.microsoft.com> References: <7c1b59c00911291640o69972ab6h21399bae01cff024@mail.gmail.com> <9DBDB52016D6F34AABBACF6C2876EA2804418233@TK5EX14MBXC137.redmond.corp.microsoft.com> Message-ID: <7c1b59c00911291709y7c4f2749k999407ce19e2020@mail.gmail.com> This worked for me: System::Array.CreateInstance(System::Object.to_clr_type, 5, 6) Getting and setting works using x[1,2] as you'd expect Cheers! On Mon, Nov 30, 2009 at 1:44 PM, Curt Hagenlocher wrote: > You can create an array using the BCL by calling Array.CreateInstance. > >From C#, it would look like this: > > > > Array.CreateInstance(typeof(object), 5, 6)); // Equivalent to new > object[5,6] > > > > I don't have IronRuby on this machine and don't want to guess at the right > syntax. > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From orion.edwards at gmail.com Sun Nov 29 20:22:25 2009 From: orion.edwards at gmail.com (Orion Edwards) Date: Mon, 30 Nov 2009 14:22:25 +1300 Subject: [Ironruby-core] 2d array In-Reply-To: <7c1b59c00911291709y7c4f2749k999407ce19e2020@mail.gmail.com> References: <7c1b59c00911291640o69972ab6h21399bae01cff024@mail.gmail.com> <9DBDB52016D6F34AABBACF6C2876EA2804418233@TK5EX14MBXC137.redmond.corp.microsoft.com> <7c1b59c00911291709y7c4f2749k999407ce19e2020@mail.gmail.com> Message-ID: <7c1b59c00911291722x21baf9b6jb8789e96d6d0df31@mail.gmail.com> ... And here's a convenient helper class Array def to_2d_a(ruby_type) sub_count = self.length max_sub_len = self.map{ |a| a.length }.max ar = System::Array.CreateInstance(ruby_type.to_clr_type, sub_count, max_sub_len) self.each_with_index do |sub, idx| sub.each_with_index do |item, sub_idx| ar[idx, sub_idx] = item end end ar end used like this [[1,2],[3,4,5],[6,7]].to_2d_a(System::Int32) :-) On Mon, Nov 30, 2009 at 1:44 PM, Curt Hagenlocher wrote: > >> You can create an array using the BCL by calling Array.CreateInstance. >> >From C#, it would look like this: >> >> >> >> Array.CreateInstance(typeof(object), 5, 6)); // Equivalent to new >> object[5,6] >> >> >> >> I don't have IronRuby on this machine and don't want to guess at the right >> syntax. >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tomas.Matousek at microsoft.com Sun Nov 29 23:37:18 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Mon, 30 Nov 2009 04:37:18 +0000 Subject: [Ironruby-core] Code Review: Time7 Message-ID: <4B342496A3EFEB48839E10BB4BF5964C1826DFE1@TK5EX14MBXC129.redmond.corp.microsoft.com> tfpt review "/shelveset:Time7;REDMOND\tomat" Comment : Adds NoUnderlyingType to ModuleRestrictions. - If set, the members of the underlying CLR type are not accessible from Ruby (not even via clr_new, etc.) - A Ruby library class/module can either extend an existing CLR type or be self-contained. A self-contained class/module has ModuleRestriction.NoUnderlyingType set by default. Separates Ruby method implementations on RubyTime to a separate class so that we can expose RubyTime underlying CLR type. Fixes bugs and Time related specs: http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=2912 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=2217 Time zones It seems that MRI is using CRT zone API (_tzset) on Windows. That API (http://msdn.microsoft.com/en-us/library/90s5c885(VS.80).aspx) is buggy and also different from Unix API based on TZ environment variable. The only thing _tzset does is that it parses TZ environment variable value using format < zone offset hh:mm:ss> and stores the parsed values into global variables. It doesn't look up time zone name in any database (registry) or even allow to specify DST offset and rule (unlike POSIX TZ variable). As a consequence MRI on Windows doesn't correctly implement daylight saving related API (Time#dst?). If the offset is not specified in TZ variable we don't know anything about the zone and thus no zone related methods work correctly. And indeed the specs are failing. Besides, MRI doesn't update the current time zone if TZ environment variable is changed at runtime (it only parses it once when the process is initialized) - http://redmine.ruby-lang.org/issues/show/1972. This change makes IronRuby recognize TZ environment variable and update the current time zone whenever ENV["TZ"] is assigned to. Current limitations: 1) TZ variable needs to define zone offset. We don't do time zone name lookup and so only time zone name or abbreviation is not sufficient. If the offset is not specified we use the default time zone provided by OS and report a warning. 2) Time#dst? always uses the default OS zone, not the one that is specified by TZ variable. A warning is reported if the current zone comes from TZ variable. Fixes Time specs that were relying on Unix specific commands. Fixes time related bugs in YAML and a bug in the YAML scanner: http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=2044 Enables subclassing socket classes, fixes: http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=3196 There is a also bug in tzinfo gem: C:\M0\Merlin\External.LCA_RESTRICTED\Languages\Ruby\ruby-1.8.6p368\lib\ruby\gems\1.8\gems\tzinfo-0.3.15\lib\tzinfo\time_or_datetime.rb Line #43 is missing usec parameter: @time = Time.utc(@time.year, @time.mon, @time.mday, @time.hour, @time.min, @time.sec, @time.usec) unless @time.zone == 'UTC' Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: Time7.diff Type: application/octet-stream Size: 337797 bytes Desc: Time7.diff URL: From lists at ruby-forum.com Mon Nov 30 02:04:37 2009 From: lists at ruby-forum.com (James Leskovar) Date: Mon, 30 Nov 2009 08:04:37 +0100 Subject: [Ironruby-core] Leveraging StdLib.Win32API class Message-ID: <28cf1677025dd82a1e654b9463677889@ruby-forum.com> Hi all, I'm working on using metasm (http://metasm.cr0.org/) with IronRuby in order to generate and ultimately execute code at runtime. At the moment, I've been successful in using metasm to get back a string containing the encoded x86 instruction opcodes. The next step would be to allocate memory for the code, copy over the encoded instructions, mark the region as executable, and get back an IntPtr. Which brings me to Win32API. I think using Win32API would probably be the easiest way in order to get my code running, though currently there's no way to directly specify the function pointer of the function to be called (initializer only supports module and export name.) I've noticed that the Win32API CLR class seems to have a Function property, but no way to utilize it from ruby code. Are there any suggestions about how I could use the Win32API class, or any alternate solutions? Thanks in advance, James -- Posted via http://www.ruby-forum.com/. From ivan at flanders.co.nz Mon Nov 30 04:08:16 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Mon, 30 Nov 2009 10:08:16 +0100 Subject: [Ironruby-core] invoke member and dynamic binding isn't the same? In-Reply-To: <4B342496A3EFEB48839E10BB4BF5964C1826BF7B@TK5EX14MBXC129.redmond.corp.microsoft.com> References: <4B342496A3EFEB48839E10BB4BF5964C1826BF7B@TK5EX14MBXC129.redmond.corp.microsoft.com> Message-ID: I've included a C# project with all the files you need as attachment. http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=3213 --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Wed, Nov 25, 2009 at 6:16 PM, Tomas Matousek < Tomas.Matousek at microsoft.com> wrote: > Can you send the entire source code that sets ?Something? and then the > entire C# method that accesses it, ideally a minimal repro? > > > > Tomas > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Ivan Porto Carrero > *Sent:* Wednesday, November 25, 2009 5:29 AM > *To:* ironruby-core > *Subject:* [Ironruby-core] invoke member and dynamic binding isn't the > same? > > > > Hi > > I have some ruby code, which through a process of instance_eval and other > meta programming tricks builds an object with a method assign defined on it. > > > > > > I have this code in C# > > > > *var scope = Engine.CreateScope();* > > *scope.SetVariable("ctxt", this);* > > *Engine.ExecuteFile("rubyfile.rb", scope);* > > > > This code correctly sets a something property on this (linked with ctxt) > > but when I then want to call a method on it that should exist > > > > *public dynamic Something { get; set; }* > > > > *Something.assign("ivan")* > > > > Unhandled Exception: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: > 'Iro > > nRuby.Builtins.RubyObject' does not contain a definition for 'assign' > > at CallSite.Target(Closure , CallSite , Object , String ) > > at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid2[T0,T1](CallSite > site, > > T0 arg0, T1 arg1) > > at BugTracker_40.Bug.Assign(String assignee) in > C:\dev\ironruby-in-action\Sam > > ples\BugTracker_40\BugTracker_40\Bug.cs:line 60 > > at BugTracker_40.Program.Main(String[] args) in > C:\dev\ironruby-in-action\Sam > > ples\BugTracker_40\BugTracker_40\Program.cs:line 13 > > > > > > However the same code with: > > > > var _rubyOperations = Engine.CreateOperations() > > public object Something { get; set; } > > _rubyOperations.InvokeMember(Something, "assign", "ivan") > > > > does work. > > > > The question is why? Is this the expected behavior? Am I missing an > assembly reference (it has Ironruby.*, Microsoft.Scripting, > Microsoft.Scripting.Core) > > --- > Met vriendelijke groeten - Best regards - Salutations > Ivan Porto Carrero > Blog: http://flanders.co.nz > Google Wave: portocarrero.ivan at googlewave.com > Twitter: http://twitter.com/casualjim > Author of IronRuby in Action (http://manning.com/carrero) > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tomas.Matousek at microsoft.com Mon Nov 30 13:54:19 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Mon, 30 Nov 2009 18:54:19 +0000 Subject: [Ironruby-core] Leveraging StdLib.Win32API class In-Reply-To: <28cf1677025dd82a1e654b9463677889@ruby-forum.com> References: <28cf1677025dd82a1e654b9463677889@ruby-forum.com> Message-ID: <4B342496A3EFEB48839E10BB4BF5964C1826E25F@TK5EX14MBXC129.redmond.corp.microsoft.com> I wouldn't recommend using Win32API. It's not well designed interop library. What you need is calli IL instruction. It takes a pointer to a function and arguments and calls the function. C# doesn't support this so you need some helpers. You can either emit them at run-time and call them via delegates (that's what our implementation of Win32API does), or you can write them in IL, if you know the signatures you need, compile them to an assembly (ilasm ILHelpers.il /dll /out=ILHelpers.dll) and use the assembly directly from Ruby (see attached file). Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of James Leskovar Sent: Sunday, November 29, 2009 11:05 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Leveraging StdLib.Win32API class Hi all, I'm working on using metasm (http://metasm.cr0.org/) with IronRuby in order to generate and ultimately execute code at runtime. At the moment, I've been successful in using metasm to get back a string containing the encoded x86 instruction opcodes. The next step would be to allocate memory for the code, copy over the encoded instructions, mark the region as executable, and get back an IntPtr. Which brings me to Win32API. I think using Win32API would probably be the easiest way in order to get my code running, though currently there's no way to directly specify the function pointer of the function to be called (initializer only supports module and export name.) I've noticed that the Win32API CLR class seems to have a Function property, but no way to utilize it from ruby code. Are there any suggestions about how I could use the Win32API class, or any alternate solutions? Thanks in advance, James -- 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 -------------- A non-text attachment was scrubbed... Name: ILHelpers.il Type: application/octet-stream Size: 1002 bytes Desc: ILHelpers.il URL: From Tomas.Matousek at microsoft.com Mon Nov 30 14:20:30 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Mon, 30 Nov 2009 19:20:30 +0000 Subject: [Ironruby-core] invoke member and dynamic binding isn't the same? In-Reply-To: References: <4B342496A3EFEB48839E10BB4BF5964C1826BF7B@TK5EX14MBXC129.redmond.corp.microsoft.com> Message-ID: <4B342496A3EFEB48839E10BB4BF5964C1826E28B@TK5EX14MBXC129.redmond.corp.microsoft.com> It seems that you reference IronRuby binaries built against CLR 2.0. You need to use CLR4 binaries: http://ironruby.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=33305 Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Monday, November 30, 2009 1:08 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] invoke member and dynamic binding isn't the same? I've included a C# project with all the files you need as attachment. http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=3213 --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Wed, Nov 25, 2009 at 6:16 PM, Tomas Matousek > wrote: Can you send the entire source code that sets ?Something? and then the entire C# method that accesses it, ideally a minimal repro? Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Wednesday, November 25, 2009 5:29 AM To: ironruby-core Subject: [Ironruby-core] invoke member and dynamic binding isn't the same? Hi I have some ruby code, which through a process of instance_eval and other meta programming tricks builds an object with a method assign defined on it. I have this code in C# var scope = Engine.CreateScope(); scope.SetVariable("ctxt", this); Engine.ExecuteFile("rubyfile.rb", scope); This code correctly sets a something property on this (linked with ctxt) but when I then want to call a method on it that should exist public dynamic Something { get; set; } Something.assign("ivan") Unhandled Exception: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: 'Iro nRuby.Builtins.RubyObject' does not contain a definition for 'assign' at CallSite.Target(Closure , CallSite , Object , String ) at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid2[T0,T1](CallSite site, T0 arg0, T1 arg1) at BugTracker_40.Bug.Assign(String assignee) in C:\dev\ironruby-in-action\Sam ples\BugTracker_40\BugTracker_40\Bug.cs:line 60 at BugTracker_40.Program.Main(String[] args) in C:\dev\ironruby-in-action\Sam ples\BugTracker_40\BugTracker_40\Program.cs:line 13 However the same code with: var _rubyOperations = Engine.CreateOperations() public object Something { get; set; } _rubyOperations.InvokeMember(Something, "assign", "ivan") does work. The question is why? Is this the expected behavior? Am I missing an assembly reference (it has Ironruby.*, Microsoft.Scripting, Microsoft.Scripting.Core) --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tomas.Matousek at microsoft.com Mon Nov 30 15:40:48 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Mon, 30 Nov 2009 20:40:48 +0000 Subject: [Ironruby-core] Code Review: BugFixesZ3 Message-ID: <4B342496A3EFEB48839E10BB4BF5964C1826E323@TK5EX14MBXC129.redmond.corp.microsoft.com> tfpt review "/shelveset:BugFixesZ3;REDMOND\tomat" DLR: Fixes http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=3183: OutAttribute on parameters whose type is not ByRef should be ignored. The attribute is only used by native marshaller. Removes dead and duplicate code (various reflection related helpers) and moves them to ReflectionUtils or TypeUtils. Fixes http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=957. Removes non-null restriction on the instance parameter of an extension method - C# allows to call the extension method on null value: public static class Ext { public static bool IsNull(this object value) { return value == null; } } public static void F(object o) { Console.WriteLine(o.IsNull()); } public static void Main() { F(null); } We also didn't recognize extension methods correctly if they are compiled by desktop C# 3.0 (our IsExtension method only detected those that are compiled by us and thus use ExtensionAttribute in ExtensionAttribute.dll). This causes binding to extension methods to behave differently on desktop CLR from Silverlight. The fix is to use ExtensionAttribute from System.Core v3.5 assembly if it is available at runtime. Ruby: Fixes http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=2827: adds ToString, GetHashCode, GetType methods on NilClass. http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=2914 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=2913 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=3068 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=2962 Tomas -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: BugFixesZ3.diff Type: application/octet-stream Size: 52192 bytes Desc: BugFixesZ3.diff URL: